diff --git a/Userland/Applications/Browser/CMakeLists.txt b/Userland/Applications/Browser/CMakeLists.txt index ddb1d4ac3a..dbb02aa785 100644 --- a/Userland/Applications/Browser/CMakeLists.txt +++ b/Userland/Applications/Browser/CMakeLists.txt @@ -6,7 +6,6 @@ serenity_component( ) compile_gml(BrowserWindow.gml BrowserWindowGML.h browser_window_gml) -compile_gml(CookiesTab.gml CookiesTabGML.h cookies_tab_gml) compile_gml(EditBookmark.gml EditBookmarkGML.h edit_bookmark_gml) compile_gml(StorageWidget.gml StorageWidgetGML.h storage_widget_gml) compile_gml(Tab.gml TabGML.h tab_gml) @@ -18,7 +17,6 @@ set(SOURCES ConsoleWidget.cpp CookieJar.cpp CookiesModel.cpp - CookiesTabGML.h DownloadWidget.cpp EditBookmarkGML.h ElementSizePreviewWidget.cpp diff --git a/Userland/Applications/Browser/CookiesTab.gml b/Userland/Applications/Browser/CookiesTab.gml deleted file mode 100644 index 7de9c12777..0000000000 --- a/Userland/Applications/Browser/CookiesTab.gml +++ /dev/null @@ -1,16 +0,0 @@ -@GUI::Widget { - name: "cookies_tab" - layout: @GUI::VerticalBoxLayout { - margins: [4] - } - - @GUI::GroupBox { - layout: @GUI::VerticalBoxLayout { - margins: [6] - } - - @GUI::TableView { - name: "cookies_tableview" - } - } -} diff --git a/Userland/Applications/Browser/StorageWidget.cpp b/Userland/Applications/Browser/StorageWidget.cpp index e82b34385e..0efcc19ff6 100644 --- a/Userland/Applications/Browser/StorageWidget.cpp +++ b/Userland/Applications/Browser/StorageWidget.cpp @@ -8,7 +8,6 @@ #include "CookiesModel.h" #include "LocalStorageModel.h" #include -#include #include #include #include @@ -21,10 +20,7 @@ StorageWidget::StorageWidget() load_from_gml(storage_widget_gml); auto& tab_widget = *find_descendant_of_type_named("tab_widget"); - auto cookies_tab = tab_widget.try_add_tab("Cookies").release_value_but_fixme_should_propagate_errors(); - cookies_tab->load_from_gml(cookies_tab_gml); - - m_cookies_table_view = cookies_tab->find_descendant_of_type_named("cookies_tableview"); + m_cookies_table_view = tab_widget.find_descendant_of_type_named("cookies_tableview"); m_cookies_model = adopt_ref(*new CookiesModel()); m_cookie_sorting_model = MUST(GUI::SortingProxyModel::create(*m_cookies_model)); @@ -34,10 +30,7 @@ StorageWidget::StorageWidget() m_cookies_table_view->set_column_headers_visible(true); m_cookies_table_view->set_alternating_row_colors(true); - auto local_storage_tab = tab_widget.try_add_tab("Local Storage").release_value_but_fixme_should_propagate_errors(); - local_storage_tab->load_from_gml(cookies_tab_gml); - - m_local_storage_table_view = local_storage_tab->find_descendant_of_type_named("cookies_tableview"); + m_local_storage_table_view = tab_widget.find_descendant_of_type_named("local_storage_tableview"); m_local_storage_model = adopt_ref(*new LocalStorageModel()); m_local_storage_sorting_model = MUST(GUI::SortingProxyModel::create(*m_local_storage_model)); diff --git a/Userland/Applications/Browser/StorageWidget.gml b/Userland/Applications/Browser/StorageWidget.gml index 4e7eb0c49e..b1a44a6a35 100644 --- a/Userland/Applications/Browser/StorageWidget.gml +++ b/Userland/Applications/Browser/StorageWidget.gml @@ -6,5 +6,39 @@ @GUI::TabWidget { name: "tab_widget" + + @GUI::Widget { + title: "Cookies" + layout: @GUI::VerticalBoxLayout { + margins: [4] + } + + @GUI::GroupBox { + layout: @GUI::VerticalBoxLayout { + margins: [6] + } + + @GUI::TableView { + name: "cookies_tableview" + } + } + } + + @GUI::Widget { + title: "Local Storage" + layout: @GUI::VerticalBoxLayout { + margins: [4] + } + + @GUI::GroupBox { + layout: @GUI::VerticalBoxLayout { + margins: [6] + } + + @GUI::TableView { + name: "local_storage_tableview" + } + } + } } }