[gnome-packagekit] trivial: Remove some unused functionality



commit 78fcecf7f128cd27c9c6fae6ffc25e9df661b306
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 18 14:29:53 2016 +0100

    trivial: Remove some unused functionality

 data/org.gnome.packagekit.gschema.migrate |    1 -
 data/org.gnome.packagekit.gschema.xml     |    5 -----
 src/gpk-application.c                     |   23 -----------------------
 src/gpk-common.c                          |    6 ------
 src/gpk-common.h                          |    2 --
 src/gpk-log.c                             |   17 +----------------
 6 files changed, 1 insertions(+), 53 deletions(-)
---
diff --git a/data/org.gnome.packagekit.gschema.migrate b/data/org.gnome.packagekit.gschema.migrate
index 3a4f560..ef98d09 100644
--- a/data/org.gnome.packagekit.gschema.migrate
+++ b/data/org.gnome.packagekit.gschema.migrate
@@ -1,7 +1,6 @@
 [org.gnome.packagekit]
 enable-autoremove = /apps/gnome-packagekit/enable_autoremove
 show-depends = /apps/gnome-packagekit/show_depends
-autocomplete = /apps/gnome-packagekit/autocomplete
 filter-basename = /apps/gnome-packagekit/application/filter_basename
 filter-newest = /apps/gnome-packagekit/application/filter_newest
 filter-arch = /apps/gnome-packagekit/application/filter_arch
diff --git a/data/org.gnome.packagekit.gschema.xml b/data/org.gnome.packagekit.gschema.xml
index 1889cc6..65f4ec3 100644
--- a/data/org.gnome.packagekit.gschema.xml
+++ b/data/org.gnome.packagekit.gschema.xml
@@ -15,11 +15,6 @@
       <summary>Ask the user if additional packages should be installed</summary>
       <description>Ask the user if additional packages should be installed.</description>
     </key>
-    <key name="autocomplete" type="b">
-      <default>false</default>
-      <summary>If search terms should be completed automatically</summary>
-      <description>If search terms should be completed automatically.</description>
-    </key>
     <key name="filter-basename" type="b">
       <default>false</default>
       <summary>Filter using basename in gpk-application</summary>
diff --git a/src/gpk-application.c b/src/gpk-application.c
index e895d86..8207fee 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -2676,9 +2676,7 @@ gpk_application_create_group_array_categories (GpkApplicationPrivate *priv)
 static void
 gpk_application_key_changed_cb (GSettings *settings, const gchar *key, GpkApplicationPrivate *priv)
 {
-       GtkEntryCompletion *completion;
        gboolean ret;
-       GtkEntry *entry;
 
        if (g_strcmp0 (key, GPK_SETTINGS_CATEGORY_GROUPS) == 0) {
                ret = g_settings_get_boolean (priv->settings, key);
@@ -2687,16 +2685,6 @@ gpk_application_key_changed_cb (GSettings *settings, const gchar *key, GpkApplic
                        gpk_application_create_group_array_categories (priv);
                else
                        gpk_application_create_group_array_enum (priv);
-       } else if (g_strcmp0 (key, GPK_SETTINGS_AUTOCOMPLETE) == 0) {
-               ret = g_settings_get_boolean (priv->settings, key);
-               entry = GTK_ENTRY (gtk_builder_get_object (priv->builder, "entry_text"));
-               if (ret) {
-                       completion = gpk_package_entry_completion_new ();
-                       gtk_entry_set_completion (entry, completion);
-                       g_object_unref (completion);
-               } else {
-                       gtk_entry_set_completion (entry, NULL);
-               }
        } else if (g_strcmp0 (key, "filter-newest") == 0) {
                /* refresh the search results */
                if (g_settings_get_boolean (priv->settings, key))
@@ -2912,10 +2900,8 @@ static void
 gpk_application_startup_cb (GtkApplication *application, GpkApplicationPrivate *priv)
 {
        GAction *action;
-       gboolean ret;
        GError *error = NULL;
        GMenuModel *menu;
-       GtkEntryCompletion *completion;
        GtkStyleContext *context;
        GtkTreeSelection *selection;
        GtkWidget *main_window;
@@ -3037,15 +3023,6 @@ gpk_application_startup_cb (GtkApplication *application, GpkApplicationPrivate *
        /* the fancy text entry widget */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "entry_text"));
 
-       /* autocompletion can be turned off as it's slow */
-       ret = g_settings_get_boolean (priv->settings, GPK_SETTINGS_AUTOCOMPLETE);
-       if (ret) {
-               /* create the completion object */
-               completion = gpk_package_entry_completion_new ();
-               gtk_entry_set_completion (GTK_ENTRY (widget), completion);
-               g_object_unref (completion);
-       }
-
        /* set focus on entry text */
        gtk_widget_grab_focus (widget);
        gtk_widget_show (widget);
diff --git a/src/gpk-common.c b/src/gpk-common.c
index baf4ee7..2d60ed6 100644
--- a/src/gpk-common.c
+++ b/src/gpk-common.c
@@ -459,9 +459,3 @@ gpk_strv_join_locale (gchar **array)
                                        array[3], array[4]);
        return NULL;
 }
-
-GtkEntryCompletion *
-gpk_package_entry_completion_new (void)
-{
-       return NULL;
-}
diff --git a/src/gpk-common.h b/src/gpk-common.h
index e343f9e..458f951 100644
--- a/src/gpk-common.h
+++ b/src/gpk-common.h
@@ -31,7 +31,6 @@
 G_BEGIN_DECLS
 
 #define GPK_SETTINGS_SCHEMA                            "org.gnome.packagekit"
-#define GPK_SETTINGS_AUTOCOMPLETE                      "autocomplete"
 #define GPK_SETTINGS_CATEGORY_GROUPS                   "category-groups"
 #define GPK_SETTINGS_DBUS_DEFAULT_INTERACTION          "dbus-default-interaction"
 #define GPK_SETTINGS_DBUS_ENFORCED_INTERACTION         "dbus-enforced-interaction"
@@ -70,7 +69,6 @@ gchar         *gpk_time_to_imprecise_string           (guint           time_secs);
 gboolean        gpk_check_privileged_user              (const gchar    *application_name,
                                                         gboolean        show_ui);
 gchar          *gpk_strv_join_locale                   (gchar          **array);
-GtkEntryCompletion *gpk_package_entry_completion_new   (void);
 gboolean        gpk_window_set_size_request            (GtkWindow      *window,
                                                         guint           width,
                                                         guint           height);
diff --git a/src/gpk-log.c b/src/gpk-log.c
index 998ce3d..fb01ad6 100644
--- a/src/gpk-log.c
+++ b/src/gpk-log.c
@@ -607,10 +607,7 @@ gpk_log_activate_cb (GtkApplication *application, gpointer user_data)
 static void
 gpk_log_startup_cb (GtkApplication *application, gpointer user_data)
 {
-       gboolean ret;
        GError *error = NULL;
-       GSettings *settings;
-       GtkEntryCompletion *completion;
        GtkTreeSelection *selection;
        GtkWidget *widget;
        GtkWindow *window;
@@ -659,19 +656,7 @@ gpk_log_startup_cb (GtkApplication *application, gpointer user_data)
        g_signal_connect (widget, "activate", G_CALLBACK (gpk_log_button_filter_cb), NULL);
 
        /* autocompletion can be turned off as it's slow */
-       settings = g_settings_new (GPK_SETTINGS_SCHEMA);
-       ret = g_settings_get_boolean (settings, GPK_SETTINGS_AUTOCOMPLETE);
-       if (ret) {
-               /* create the completion object */
-               completion = gpk_package_entry_completion_new ();
-               widget = GTK_WIDGET (gtk_builder_get_object (builder, "entry_package"));
-               gtk_entry_set_completion (GTK_ENTRY (widget), completion);
-               g_object_unref (completion);
-       } else {
-               /* use search as you type */
-               g_signal_connect (widget, "key-release-event", G_CALLBACK (gpk_log_entry_filter_cb), NULL);
-       }
-       g_object_unref (settings);
+       g_signal_connect (widget, "key-release-event", G_CALLBACK (gpk_log_entry_filter_cb), NULL);
 
        /* create list stores */
        list_store = gtk_list_store_new (GPK_LOG_COLUMN_LAST, G_TYPE_STRING, G_TYPE_STRING,


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