[epiphany] search engine dialog



commit 493302357b89d0b46d7d305ca64d9fb0646d6962
Author: cedlemo <cedlemo gmx com>
Date:   Wed Jan 25 14:47:45 2017 +0100

    search engine dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776738

 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, 638 insertions(+), 11 deletions(-)
---
diff --git a/lib/ephy-search-engine-manager.c b/lib/ephy-search-engine-manager.c
index 8bb451d..60a44e3 100644
--- a/lib/ephy-search-engine-manager.c
+++ b/lib/ephy-search-engine-manager.c
@@ -139,7 +139,8 @@ static void
 ephy_search_engine_manager_apply_settings (EphySearchEngineManager *manager)
 {
   GHashTableIter iter;
-  gpointer key, value;
+  gpointer key;
+  gpointer value;
   int size;
   int i = 0;
   char **search_engine_names;
@@ -154,12 +155,14 @@ 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;
 
@@ -173,8 +176,8 @@ ephy_search_engine_manager_apply_settings (EphySearchEngineManager *manager)
                        "search-engines-urls",
                        (const char * const*) search_engine_urls);
 
-  g_strfreev (search_engine_names);
-  g_strfreev (search_engine_urls);
+  g_free (search_engine_names);
+  g_free (search_engine_urls);
 }
 
 void
diff --git a/src/Makefile.am b/src/Makefile.am
index d860d82..b0a1249 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,6 +58,8 @@ 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/ephy-search-engine-dialog.c b/src/ephy-search-engine-dialog.c
new file mode 100644
index 0000000..580703b
--- /dev/null
+++ b/src/ephy-search-engine-dialog.c
@@ -0,0 +1,231 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ *  Copyright © 2017 Cedric Le Moigne <cedlemo gmx com>
+ *
+ *  This file is part of Epiphany.
+ *
+ *  Epiphany is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Epiphany is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Epiphany.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "ephy-search-engine-dialog.h"
+#include "ephy-shell.h"
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <string.h>
+
+struct _EphySearchEngineDialog {
+  GtkDialog parent_instance;
+
+  EphySearchEngineManager *search_engine_manager;
+  GtkWidget *search_engine_add_button;
+  GtkWidget *search_engine_remove_button;
+  GtkWidget *search_engine_adress_entry;
+  GtkWidget *search_engine_default_switch;
+  GtkWidget *search_engine_list_box;
+  GtkWidget *search_engine_keyword_entry;
+};
+
+G_DEFINE_TYPE (EphySearchEngineDialog, ephy_search_engine_dialog, GTK_TYPE_DIALOG)
+
+static void
+remove_list_box_row_cb (GtkWidget *button,
+                        gpointer   data)
+{
+  GtkListBoxRow *list_box_row;
+  EphySearchEngineDialog *dialog;
+  EphySearchEngineManager *manager;
+  GtkLabel *search_engine_label;
+  const char *search_engine_name;
+
+  dialog = EPHY_SEARCH_ENGINE_DIALOG (data);
+  list_box_row = gtk_list_box_get_selected_row (GTK_LIST_BOX (dialog->search_engine_list_box));
+
+  gtk_container_remove (GTK_CONTAINER (dialog->search_engine_list_box),
+                        list_box_row);
+  search_engine_label = (gtk_container_get_children (GTK_CONTAINER (list_box_row)))->data;
+  search_engine_name = gtk_label_get_text (GTK_LABEL (search_engine_label));
+  manager = dialog->search_engine_manager;
+  ephy_search_engine_manager_delete_engine (manager, search_engine_name);
+}
+
+static void
+add_list_box_row (EphySearchEngineDialog *dialog,
+                  const char             *name,
+                  int                     position)
+{
+  GtkListBox *listbox;
+  GtkWidget *label;
+  GtkWidget *list_box_row;
+
+
+  label = gtk_label_new (name);
+  gtk_widget_set_halign (label, GTK_ALIGN_START);
+
+  list_box_row = gtk_list_box_row_new ();
+  gtk_container_add (GTK_CONTAINER (list_box_row), label);
+  gtk_widget_set_size_request (list_box_row, 160, -1);
+  gtk_widget_show_all (list_box_row);
+
+  listbox = GTK_LIST_BOX (dialog->search_engine_list_box);
+  gtk_list_box_insert (listbox, list_box_row, position);
+  gtk_list_box_select_row (listbox, GTK_LIST_BOX_ROW (list_box_row));
+}
+
+static void
+list_box_row_selected_cb (GtkListBox    *list_box,
+                          GtkListBoxRow *list_box_row,
+                          gpointer       data)
+{
+  EphySearchEngineDialog *dialog;
+  EphySearchEngineManager *manager;
+  GtkLabel *search_engine_label;
+  const char *search_engine_name;
+  const char *search_engine_url;
+  const char *search_engine_default;
+  gboolean is_default = FALSE;
+
+  if (!list_box_row)
+    return;
+
+  dialog = EPHY_SEARCH_ENGINE_DIALOG (data);
+  manager = dialog->search_engine_manager;
+
+  search_engine_label = (gtk_container_get_children (GTK_CONTAINER (list_box_row)))->data;
+  search_engine_name = gtk_label_get_text (GTK_LABEL (search_engine_label));
+
+  search_engine_url = ephy_search_engine_manager_get_url (manager, search_engine_name);
+  if (!search_engine_url)
+    search_engine_url = "";
+
+  gtk_entry_set_text (GTK_ENTRY (dialog->search_engine_adress_entry), search_engine_url);
+
+  search_engine_default = ephy_search_engine_manager_get_default_engine (manager);
+  if (strcmp (search_engine_name, search_engine_default) == 0)
+    is_default = TRUE;
+
+  gtk_switch_set_active (GTK_SWITCH (dialog->search_engine_default_switch),
+                         is_default);
+}
+
+static void
+ephy_search_engine_dialog_fill_list_box (EphySearchEngineDialog *dialog)
+{
+
+  GtkListBox *listbox;
+  EphySearchEngineManager *manager;
+  char **engines_names ;
+  uint n_engines;
+
+  listbox = GTK_LIST_BOX (dialog->search_engine_list_box);
+  manager = dialog->search_engine_manager;
+  engines_names = ephy_search_engine_manager_get_names (manager);
+  n_engines = g_strv_length (engines_names);
+
+  for (uint i = 0; i < n_engines; i++) {
+    const char *name = engines_names[i];
+    add_list_box_row (dialog, name, i);
+  }
+  g_strfreev (engines_names);
+
+  g_signal_connect (listbox,
+                    "row-selected",
+                    G_CALLBACK (list_box_row_selected_cb),
+                    dialog);
+  gtk_list_box_select_row (listbox,
+                           gtk_list_box_get_row_at_index (listbox, 0));
+}
+static void
+on_search_engine_add_button_clicked (GtkButton              *button,
+                                     EphySearchEngineDialog *dialog)
+{
+  EphySearchEngineManager *manager;
+  const char *new_engine_name =  "New Search Engine";
+  const char *new_engine_url = "New adress";
+  manager = dialog->search_engine_manager;
+  ephy_search_engine_manager_add_engine (manager, new_engine_name, new_engine_url);
+  add_list_box_row (dialog, new_engine_name, -1);
+}
+
+static void
+on_search_engine_remove_button_clicked (GtkButton              *button,
+                                        EphySearchEngineDialog *dialog)
+{
+  GtkListBoxRow *list_box_row;
+  EphySearchEngineManager *manager;
+  GtkLabel *search_engine_label;
+  const char *search_engine_name;
+
+  list_box_row = gtk_list_box_get_selected_row (GTK_LIST_BOX (dialog->search_engine_list_box));
+
+  gtk_container_remove (GTK_CONTAINER (dialog->search_engine_list_box),
+                        list_box_row);
+  search_engine_label = (gtk_container_get_children (GTK_CONTAINER (list_box_row)))->data;
+  search_engine_name = gtk_label_get_text (GTK_LABEL (search_engine_label));
+  manager = dialog->search_engine_manager;
+  ephy_search_engine_manager_delete_engine (manager, search_engine_name);
+}
+
+static void
+ephy_search_engine_dialog_class_init (EphySearchEngineDialogClass *klass)
+{
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+  gtk_widget_class_set_template_from_resource (widget_class,
+                                               "/org/gnome/epiphany/gtk/search-engine-dialog.ui");
+
+  gtk_widget_class_bind_template_child (widget_class,
+                                        EphySearchEngineDialog,
+                                        search_engine_add_button);
+  gtk_widget_class_bind_template_child (widget_class,
+                                        EphySearchEngineDialog,
+                                        search_engine_remove_button);
+  gtk_widget_class_bind_template_child (widget_class,
+                                        EphySearchEngineDialog,
+                                        search_engine_list_box);
+  gtk_widget_class_bind_template_child (widget_class,
+                                        EphySearchEngineDialog,
+                                        search_engine_keyword_entry);
+  gtk_widget_class_bind_template_child (widget_class,
+                                        EphySearchEngineDialog,
+                                        search_engine_adress_entry);
+  gtk_widget_class_bind_template_child (widget_class,
+                                        EphySearchEngineDialog,
+                                        search_engine_default_switch);
+
+  gtk_widget_class_bind_template_callback (widget_class, on_search_engine_add_button_clicked);
+  gtk_widget_class_bind_template_callback (widget_class, on_search_engine_remove_button_clicked);
+}
+
+static void
+ephy_search_engine_dialog_init (EphySearchEngineDialog *dialog)
+{
+  EphyEmbedShell *shell;
+
+  shell = ephy_embed_shell_get_default ();
+  dialog->search_engine_manager = ephy_embed_shell_get_search_engine_manager (shell);
+
+  gtk_widget_init_template (GTK_WIDGET (dialog));
+  ephy_search_engine_dialog_fill_list_box (dialog);
+}
+
+EphySearchEngineDialog *
+ephy_search_engine_dialog_new (void)
+{
+  return g_object_new (EPHY_TYPE_SEARCH_ENGINE_DIALOG,
+                       "use-header-bar", TRUE,
+                       NULL);
+}
diff --git a/src/ephy-search-engine-dialog.h b/src/ephy-search-engine-dialog.h
new file mode 100644
index 0000000..55fef91
--- /dev/null
+++ b/src/ephy-search-engine-dialog.h
@@ -0,0 +1,33 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ *  Copyright © 2017 Cedric Le Moigne <cedlemo gmx com>
+ *
+ *  This file is part of Epiphany.
+ *
+ *  Epiphany is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Epiphany is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Epiphany.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "ephy-window.h"
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EPHY_TYPE_SEARCH_ENGINE_DIALOG (ephy_search_engine_dialog_get_type ())
+G_DECLARE_FINAL_TYPE (EphySearchEngineDialog, ephy_search_engine_dialog, EPHY, SEARCH_ENGINE_DIALOG, 
GtkDialog);
+
+EphySearchEngineDialog  *ephy_search_engine_dialog_new (void);
+
+G_END_DECLS
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 3f9e16b..0b9ded7 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -33,6 +33,7 @@
 #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"
@@ -562,6 +563,19 @@ 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);
@@ -624,6 +638,7 @@ 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 eca494b..068ce0a 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -28,6 +28,7 @@
     <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 f6ada45..0eb008e 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -5,10 +5,14 @@
     <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">
@@ -169,13 +173,27 @@
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkLabel">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="halign">start</property>
-                        <property name="label" translatable="yes">Search</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
+                        <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>
                       </object>
                     </child>
                     <child>
@@ -191,7 +209,7 @@
                             <child>
                               <object class="GtkLabel">
                                 <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Engine:</property>
+                                <property name="label" translatable="yes">_Default Search Engine :</property>
                                 <property name="use-underline">True</property>
                                 <property name="mnemonic-widget">search_engine_combo</property>
                               </object>
@@ -206,6 +224,19 @@
                                 <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>
diff --git a/src/resources/gtk/search-engine-dialog.ui b/src/resources/gtk/search-engine-dialog.ui
new file mode 100644
index 0000000..1f9e039
--- /dev/null
+++ b/src/resources/gtk/search-engine-dialog.ui
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.10"/>
+    <template class="EphySearchEngineDialog" parent="GtkDialog">
+      <property name="modal">True</property>
+      <property name="window_position">center</property>
+      <property name="destroy_with_parent">True</property>
+      <property name="type_hint">dialog</property>
+      <child internal-child="headerbar">
+        <object class="GtkHeaderBar">
+          <property name="title" translatable="yes">Manage Search Engines</property>
+          <property name="show-close-button">True</property>
+         <!--          <child>
+            <object class="GtkButton" id="new_engine_button">
+              <property name="visible">True</property>
+              <property name="can_focus">True</property>
+              <property name="receives_default">True</property>
+              <property name="image_position">top</property>
+              <property name="always_show_image">True</property>
+              <property name="tooltip_text" translatable="yes">Add search engine</property>
+              <signal name="clicked" handler="on_new_engine_button_clicked"/>
+              <child>
+                <object class="GtkImage" id="image1">
+                  <property name="visible">True</property>
+                  <property name="can_focus">False</property>
+                  <property name="icon-name">list-add-symbolic</property>
+                </object>
+              </child>
+            </object>
+         </child> -->
+        </object>
+      </child>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="can_focus">False</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin">12</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkScrolledWindow">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkViewport">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkListBox" id="search_engine_list_box">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                           <property name="selection-mode">single</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkButton" id="search_engine_add_button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                       <!--<property name="relief">none</property> -->
+                       <signal name="clicked" handler="on_search_engine_add_button_clicked"/>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="icon_name">list-add-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="search_engine_remove_button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                       <!--<property name="relief">none</property> -->
+                       <signal name="clicked" handler="on_search_engine_remove_button_clicked"/>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="icon_name">list-remove-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Search Engine Information</property>
+                   <property name="margin">6</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">12</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Keyword</property>
+                        <property name="justify">right</property>
+                        <property name="margin">6</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Adress</property>
+                        <property name="justify">right</property>
+                        <property name="margin">6</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="search_engine_keyword_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="width_chars">40</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="search_engine_adress_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="width_chars">40</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Default</property>
+                        <property name="justify">right</property>
+                        <property name="margin">6</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSwitch" id="search_engine_default_switch">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                       <property name="halign">start</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="icon_name">dialog-information-symbolic</property>
+                        <property name="icon_size">6</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="valign">end</property>
+                        <property name="label" translatable="yes">To determine the search URL, perform a 
search using the search engine that you want to add and check the resulting URL. Remove the search term from 
the resulting URL and replace it with “%s” (without the quotes).</property>
+                        <property name="wrap">True</property>
+                        <property name="max_width_chars">40</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+
+  </template>
+</interface>


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