[gnome-software] Update the window title when showing offline updates
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Update the window title when showing offline updates
- Date: Thu, 12 Sep 2013 14:02:26 +0000 (UTC)
commit 2d381ce0573db1083dcd6d2f1253a75b12cc8133
Author: Richard Hughes <richard hughsie com>
Date: Thu Sep 12 14:57:33 2013 +0100
Update the window title when showing offline updates
src/gs-shell-updates.c | 6 ++++++
src/gs-shell.c | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 882895a..f4390a7 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -134,6 +134,7 @@ gs_shell_updates_refresh (GsShellUpdates *shell_updates,
{
GsShellUpdatesPrivate *priv = shell_updates->priv;
GtkWidget *widget;
+ GtkWindow *window;
GtkSpinner *spinner;
GList *list;
@@ -142,6 +143,11 @@ gs_shell_updates_refresh (GsShellUpdates *shell_updates,
gtk_widget_show (widget);
}
+ /* set the window title to be more specific */
+ window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "window_software"));
+ if (show_historical)
+ gtk_window_set_title (window, _("Recent Software Updates"));
+
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_updates"));
if (scroll_up) {
GtkAdjustment *adj;
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 0689686..2e122bf 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -84,6 +84,7 @@ gs_shell_change_mode (GsShell *shell, GsShellMode mode, GsApp *app, GsCategory *
{
GsShellPrivate *priv = shell->priv;
GtkWidget *widget;
+ GtkWindow *window;
const gchar *text;
if (priv->ignore_primary_buttons)
@@ -110,6 +111,10 @@ gs_shell_change_mode (GsShell *shell, GsShellMode mode, GsApp *app, GsCategory *
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "search_bar"));
gtk_widget_hide (widget);
+ /* set the window title back to default */
+ window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "window_software"));
+ gtk_window_set_title (window, _("Software"));
+
/* update main buttons according to mode */
priv->ignore_primary_buttons = TRUE;
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_all"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]