[recipes] Make sure we set window titles consistently



commit aadf6bbfc5da7e1b32eb3fba2af88858c7eec4c9
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Feb 7 22:03:43 2017 -0500

    Make sure we set window titles consistently
    
    It was possible to end up in a situation where the window has
    no title, which causes it to show up in a suboptimal way in
    the GNOME shell overview. Fix this by setting the initial title
    to "Recipes", and explicitly setting it when we have no saved
    title.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777364

 src/gr-window.c  |    2 ++
 src/gr-window.ui |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-window.c b/src/gr-window.c
index 2ecc70a..69a569f 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -567,6 +567,8 @@ gr_window_go_back (GrWindow *window)
                 gtk_stack_set_visible_child_name (GTK_STACK (window->header_title_stack), "main");
                 gtk_stack_set_visible_child_name (GTK_STACK (window->header_end_stack), "search");
 
+                gtk_header_bar_set_title (GTK_HEADER_BAR (window->header), _("Recipes"));
+
                 gtk_stack_set_visible_child_name (GTK_STACK (window->main_stack), "recipes");
         }
         else {
diff --git a/src/gr-window.ui b/src/gr-window.ui
index e69f7e5..c41698c 100644
--- a/src/gr-window.ui
+++ b/src/gr-window.ui
@@ -10,6 +10,7 @@
       <object class="GtkHeaderBar" id="header">
         <property name="visible">1</property>
         <property name="show-close-button">1</property>
+        <property name="title" translatable="yes">Recipes</property>
         <child>
           <object class="GtkStack" id="header_start_stack">
             <property name="visible">1</property>


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