[gnome-software] Notify on app install from search too



commit 43e277745e0e9dcf3eb164225ed279253e9d2936
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Sep 5 07:36:24 2013 -0400

    Notify on app install from search too
    
    We should be consistent and notify in all places where
    we can install an application.

 src/gs-shell-search.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index 779290b..3a39059 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -61,11 +61,19 @@ gs_shell_search_app_widget_activated_cb (GtkListBox *list_box,
         gs_shell_show_app (shell_search->priv->shell, app);
 }
 
+static void
+gs_shell_search_installed_func (GsPluginLoader *plugin_loader, GsApp *app, gpointer user_data)
+{
+        if (app) {
+                gs_app_notify_installed (app);
+        }
+}
+
 /**
  * gs_shell_search_finished_func:
  **/
 static void
-gs_shell_search_finished_func (GsPluginLoader *plugin_loader, GsApp *app, gpointer user_data)
+gs_shell_search_removed_func (GsPluginLoader *plugin_loader, GsApp *app, gpointer user_data)
 {
 }
 
@@ -104,7 +112,7 @@ gs_shell_search_app_remove (GsShellSearch *shell_search, GsApp *app)
                gs_plugin_loader_app_remove (priv->plugin_loader,
                                             app,
                                             priv->cancellable,
-                                            gs_shell_search_finished_func,
+                                            gs_shell_search_removed_func,
                                             shell_search);
        }
        g_string_free (markup, TRUE);
@@ -121,7 +129,7 @@ gs_shell_search_app_install (GsShellSearch *shell_search, GsApp *app)
        gs_plugin_loader_app_install (priv->plugin_loader,
                                      app,
                                      priv->cancellable,
-                                     gs_shell_search_finished_func,
+                                     gs_shell_search_installed_func,
                                      shell_search);
 }
 


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