[gtk+] GtkApplicationWindow: Improve app menu label



commit 835e37f08f81a812464164a05ee3ffd8ce62d87a
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 20 20:06:25 2012 -0500

    GtkApplicationWindow: Improve app menu label
    
    When we are showing the app menu in process, use the application
    name, if it has been set. Otherwise, we still fall back to
    "Application".

 gtk/gtkapplicationwindow.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index a95dcb6..4d901d5 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -258,7 +258,14 @@ gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window
           app_menu = gtk_application_get_app_menu (gtk_window_get_application (GTK_WINDOW (window)));
 
           if (app_menu != NULL)
-            g_menu_append_submenu (window->priv->app_menu_section, _("Application"), app_menu);
+            {
+              const gchar *name;
+
+              name = g_get_application_name ();
+              if (name == g_get_prgname ())
+                name = _("Application");
+              g_menu_append_submenu (window->priv->app_menu_section, name, app_menu);
+            }
         }
     }
 }



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