[tali] Use a GtkHeaderBar



commit 8832d9e7edf45363ef64b926622268e8cc6c2688
Author: Mario Wenzel <maweki gmail com>
Date:   Wed Jan 15 17:43:29 2014 +0100

    Use a GtkHeaderBar
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722227

 src/gyahtzee.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gyahtzee.c b/src/gyahtzee.c
index 01c0b89..532700a 100644
--- a/src/gyahtzee.c
+++ b/src/gyahtzee.c
@@ -719,6 +719,7 @@ GyahtzeeCreateMainWindow (void)
   GtkWidget *toolbar;
   GtkWidget *tmp;
   GtkWidget *dicebox;
+  GtkWidget *hbar;
   GMenu *app_menu, *section;
   int i, j;
 
@@ -726,6 +727,7 @@ GyahtzeeCreateMainWindow (void)
   gtk_window_set_application (GTK_WINDOW (window), application);
   gtk_window_set_title (GTK_WINDOW (window), _(appName));
   gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (window), TRUE);
+  gtk_window_set_icon_name(GTK_WINDOW (window), "tali");
 
   //games_conf_add_window (GTK_WINDOW (window), NULL);
 
@@ -758,6 +760,13 @@ GyahtzeeCreateMainWindow (void)
   update_undo_sensitivity();
   gtk_application_set_app_menu (GTK_APPLICATION (application), G_MENU_MODEL (app_menu));
 
+        /*--- Headerbar ---*/
+  hbar = gtk_header_bar_new ();
+  gtk_header_bar_set_show_close_button (hbar, TRUE);
+  gtk_header_bar_set_title (hbar, _(appName));
+  gtk_widget_show (hbar);
+  gtk_window_set_titlebar (GTK_WINDOW (window), hbar);
+
        /*---- Content ----*/
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);


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