[epiphany] Revert "search engine dialog"



commit 860573d9b1f655c1e0915863fbd5fa256b0b0412
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Jan 26 08:38:22 2017 -0600

    Revert "search engine dialog"
    
    This reverts commit 493302357b89d0b46d7d305ca64d9fb0646d6962.
    
    Didn't mean to commit this, it's not quite ready yet

 lib/ephy-search-engine-manager.c          |    9 +-
 src/Makefile.am                           |    2 -
 src/ephy-search-engine-dialog.c           |  231 ---------------------
 src/ephy-search-engine-dialog.h           |   33 ---
 src/prefs-dialog.c                        |   15 --
 src/resources/epiphany.gresource.xml      |    1 -
 src/resources/gtk/prefs-dialog.ui         |   47 +----
 src/resources/gtk/search-engine-dialog.ui |  311 -----------------------------
 8 files changed, 11 insertions(+), 638 deletions(-)
---
diff --git a/lib/ephy-search-engine-manager.c b/lib/ephy-search-engine-manager.c
index 60a44e3..8bb451d 100644
--- a/lib/ephy-search-engine-manager.c
+++ b/lib/ephy-search-engine-manager.c
@@ -139,8 +139,7 @@ static void
 ephy_search_engine_manager_apply_settings (EphySearchEngineManager *manager)
 {
   GHashTableIter iter;
-  gpointer key;
-  gpointer value;
+  gpointer key, value;
   int size;
   int i = 0;
   char **search_engine_names;
@@ -155,14 +154,12 @@ ephy_search_engine_manager_apply_settings (EphySearchEngineManager *manager)
   search_engine_urls = g_malloc(size + 1);
 
   g_hash_table_iter_init (&iter, manager->search_engines);
-
   while (g_hash_table_iter_next (&iter, &key, &value))
   {
     search_engine_names[i] = key;
     search_engine_urls[i] = value;
     i++;
   }
-
   search_engine_names[size] = NULL;
   search_engine_urls[size] = NULL;
 
@@ -176,8 +173,8 @@ ephy_search_engine_manager_apply_settings (EphySearchEngineManager *manager)
                        "search-engines-urls",
                        (const char * const*) search_engine_urls);
 
-  g_free (search_engine_names);
-  g_free (search_engine_urls);
+  g_strfreev (search_engine_names);
+  g_strfreev (search_engine_urls);
 }
 
 void
diff --git a/src/Makefile.am b/src/Makefile.am
index b0a1249..d860d82 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,8 +58,6 @@ libephymain_la_SOURCES = \
        ephy-lockdown.h                         \
        ephy-notebook.c                         \
        ephy-notebook.h                         \
-       ephy-search-engine-dialog.c             \
-       ephy-search-engine-dialog.h             \
        ephy-session.c                          \
        ephy-session.h                          \
        ephy-shell.c                            \
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 0b9ded7..3f9e16b 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -33,7 +33,6 @@
 #include "ephy-gui.h"
 #include "ephy-langs.h"
 #include "ephy-prefs.h"
-#include "ephy-search-engine-dialog.h"
 #include "ephy-session.h"
 #include "ephy-settings.h"
 #include "ephy-shell.h"
@@ -563,19 +562,6 @@ on_manage_passwords_button_clicked (GtkWidget   *button,
 }
 
 static void
-on_search_engine_dialog_button_clicked (GtkWidget   *button,
-                                        PrefsDialog *dialog)
-{
-  GtkWindow *search_engine_dialog;
-
-  search_engine_dialog = GTK_WINDOW (ephy_search_engine_dialog_new ());
-
-  gtk_window_set_transient_for (search_engine_dialog, GTK_WINDOW (dialog));
-  gtk_window_set_modal (search_engine_dialog, TRUE);
-  gtk_window_present (search_engine_dialog);
-}
-
-static void
 prefs_dialog_class_init (PrefsDialogClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -638,7 +624,6 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
 
   gtk_widget_class_bind_template_callback (widget_class, on_manage_cookies_button_clicked);
   gtk_widget_class_bind_template_callback (widget_class, on_manage_passwords_button_clicked);
-  gtk_widget_class_bind_template_callback (widget_class, on_search_engine_dialog_button_clicked);
 }
 
 static void
diff --git a/src/resources/epiphany.gresource.xml b/src/resources/epiphany.gresource.xml
index 068ce0a..eca494b 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -28,7 +28,6 @@
     <file preprocess="xml-stripblanks" compressed="true">gtk/passwords-dialog.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/prefs-dialog.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/prefs-lang-dialog.ui</file>
-    <file preprocess="xml-stripblanks" compressed="true">gtk/search-engine-dialog.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/shortcuts-dialog.ui</file>
   </gresource>
   <gresource prefix="/org/gnome/Epiphany/icons">
diff --git a/src/resources/gtk/prefs-dialog.ui b/src/resources/gtk/prefs-dialog.ui
index 0eb008e..f6ada45 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -5,14 +5,10 @@
     <columns>
       <!-- column-name name -->
       <column type="gchararray"/>
-
       <!-- column-name stock url -->
       <column type="gchararray"/>
-
       <!-- column-name url -->
-      -<column type="gchararray"/>
-
-
+      <column type="gchararray"/>
     </columns>
   </object>
   <template class="PrefsDialog" parent="GtkDialog">
@@ -173,27 +169,13 @@
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkBox">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="halign">start</property>
-                            <property name="hexpand">True</property>
-                            <property name="label" translatable="yes">Search Engines</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                        </child>
-                       <child>
-                          <object class="GtkButton" id="search_engine_dialog_button">
-                            <property name="label" translatable="yes">_Manage Search Engines</property>
-                            <property name="visible">True</property>
-                            <property name="use-underline">True</property>
-                            <signal name="clicked" handler="on_search_engine_dialog_button_clicked"/>
-                          </object>
-                        </child>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Search</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                     <child>
@@ -209,7 +191,7 @@
                             <child>
                               <object class="GtkLabel">
                                 <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Default Search Engine :</property>
+                                <property name="label" translatable="yes">_Engine:</property>
                                 <property name="use-underline">True</property>
                                 <property name="mnemonic-widget">search_engine_combo</property>
                               </object>
@@ -224,19 +206,6 @@
                                 <property name="position">1</property>
                               </packing>
                             </child>
-                       <child>
-                       <!--
-                          <object class="GtkButton" id="search_engine_dialog_button">
-                            <property name="label" translatable="yes">_Manage Search Engines</property>
-                            <property name="visible">True</property>
-                            <property name="use-underline">True</property>
-                            <signal name="clicked" handler="on_search_engine_dialog_button_clicked"/>
-                          </object>
-                          <packing>
-                                <property name="expand">False</property>
-                          </packing>
-                         -->
-                        </child>
                           </object>
                         </child>
                       </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]