[gnome-screenshot] interactive-dialog: use app menu button as fallback instead of menubar



commit 07ff6afd07b7fff602d93717dd98d2e7e355592e
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Sep 5 14:13:16 2017 -0700

    interactive-dialog: use app menu button as fallback instead of menubar
    
    When the app menu cannot be displayed, for instance because the shell
    does not support it, use the app menu button in the header bar as a
    fallback, instead of the double menubar.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787214

 src/screenshot-interactive-dialog.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/screenshot-interactive-dialog.c b/src/screenshot-interactive-dialog.c
index aaa6dc2..b39c16c 100644
--- a/src/screenshot-interactive-dialog.c
+++ b/src/screenshot-interactive-dialog.c
@@ -450,6 +450,8 @@ screenshot_interactive_dialog_new (CaptureClickedCallback f, gpointer user_data)
   dialog = gtk_application_window_new (GTK_APPLICATION (g_application_get_default ()));
 
   header_bar = gtk_header_bar_new ();
+  gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header_bar), TRUE);
+  gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (header_bar), "menu");
   gtk_window_set_titlebar (GTK_WINDOW (dialog), header_bar);
 
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);


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