[epiphany/wip/exalm/papercut: 1/2] prefs-general-page: Create search list box in UI file
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/papercut: 1/2] prefs-general-page: Create search list box in UI file
- Date: Sat, 12 Dec 2020 10:51:27 +0000 (UTC)
commit c2a819e8e33065fa3e193b8ec5fef6a942d9cfb2
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Dec 12 15:39:13 2020 +0500
prefs-general-page: Create search list box in UI file
src/preferences/prefs-general-page.c | 9 ++-------
src/resources/gtk/prefs-general-page.ui | 5 +++++
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c
index a0dd254b2..1ea40e4d0 100644
--- a/src/preferences/prefs-general-page.c
+++ b/src/preferences/prefs-general-page.c
@@ -72,7 +72,6 @@ struct _PrefsGeneralPage {
/* Search Engines */
GtkWidget *search_engine_group;
- GtkWidget *search_engine_listbox;
/* Session */
GtkWidget *session_box;
@@ -1279,12 +1278,6 @@ setup_general_page (PrefsGeneralPage *general_page)
G_SETTINGS_BIND_DEFAULT);
init_lang_listbox (general_page);
-
- /* ======================================================================== */
- /* ========================== Search engines ============================== */
- /* ======================================================================== */
- general_page->search_engine_listbox = ephy_search_engine_list_box_new ();
- gtk_container_add (GTK_CONTAINER (general_page->search_engine_group), general_page->search_engine_listbox);
}
static void
@@ -1292,6 +1285,8 @@ prefs_general_page_init (PrefsGeneralPage *general_page)
{
EphyEmbedShellMode mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
+ g_type_ensure (EPHY_TYPE_SEARCH_ENGINE_LIST_BOX);
+
gtk_widget_init_template (GTK_WIDGET (general_page));
setup_general_page (general_page);
diff --git a/src/resources/gtk/prefs-general-page.ui b/src/resources/gtk/prefs-general-page.ui
index cfc073453..c8b443f2d 100644
--- a/src/resources/gtk/prefs-general-page.ui
+++ b/src/resources/gtk/prefs-general-page.ui
@@ -213,6 +213,11 @@
<object class="HdyPreferencesGroup" id="search_engine_group">
<property name="title" translatable="yes">Search Engines</property>
<property name="visible">True</property>
+ <child>
+ <object class="EphySearchEngineListBox">
+ <property name="visible">True</property>
+ </object>
+ </child>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]