[gnome-software/wip/folders: 10/10] Trigger refresh of selected rows after changing folders
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/folders: 10/10] Trigger refresh of selected rows after changing folders
- Date: Thu, 14 Nov 2013 02:06:06 +0000 (UTC)
commit 50a2922e7ed30882d819731b2b05043d579eece4
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 13 20:17:41 2013 -0500
Trigger refresh of selected rows after changing folders
The selected rows may get a new folder when the app folder
dialog is done, so refresh them.
src/gs-shell-installed.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index 0cccdb7..c4f1fae 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -645,6 +645,25 @@ get_selected_apps (GsShellInstalled *shell_installed)
return list;
}
+static gboolean
+app_folder_dialog_done (GsShellInstalled *shell_installed)
+{
+ GsShellInstalledPrivate *priv = shell_installed->priv;
+ GList *children, *l;
+
+ children = gtk_container_get_children (GTK_CONTAINER (priv->list_box_installed));
+ for (l = children; l; l = l->next) {
+ GtkListBoxRow *row = l->data;
+ GsAppWidget *app_widget = GS_APP_WIDGET (gtk_bin_get_child (GTK_BIN (row)));
+ if (gs_app_widget_get_selected (app_widget)) {
+ gs_app_widget_refresh (app_widget);
+ }
+ }
+ g_list_free (children);
+
+ return FALSE;
+}
+
static void
show_folder_dialog (GtkButton *button, GsShellInstalled *shell_installed)
{
@@ -657,6 +676,8 @@ show_folder_dialog (GtkButton *button, GsShellInstalled *shell_installed)
dialog = gs_app_folder_dialog_new (GTK_WINDOW (toplevel), apps);
g_list_free (apps);
gtk_window_present (GTK_WINDOW (dialog));
+ g_signal_connect_swapped (dialog, "delete-event",
+ G_CALLBACK (app_folder_dialog_done), shell_installed);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]