GNOME Bugzilla – Bug 759265
Improve user interface when app-menu is not shown
Last modified: 2019-07-25 08:53:57 UTC
Created attachment 317061 [details] Screenshot showing the odd user interface I just used gnome-screenshot outside of the regular GNOME Shell environment, meaning that app menus cannot be displayed in their regular fashion. For these situations, gnome-screenshot's interactive dialog tries to be helpful and displays some sort of menubar to the user, but this just looks odd (see the attached screenshot). What's worse, is that the save dialog popping up *after* the interactive dialog does use the "correct" behaviour. I have no idea of any discussion or rationale behind this, so please excuse my enthusiasm in case my work is not appreciated or just plain stupid.
Created attachment 317062 [details] [review] Patch fixing the odd user interface My editor removes whitespaces upon saving. If unwanted, I can remove those from the patch later (I have to go soon, so I'd rather throw this patch our here for review already). Commit message can be improved, and a link to this bugzilla ticket can be added as well. Also note that I removed the second help button, as it can be found in the app-menu itself.
Created attachment 317082 [details] [review] Patch fixing the odd user interface Noticed my previous work really was a quick fix. Updated patch removed the now unused declared variables, improves the commit message and adds a link to this bugzilla ticket. An issue introduced with this patch is that when quitting the (interactive) dialog via the "Quit" entry in the app menu, the following warnings are printed: (gnome-screenshot:16840): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed (gnome-screenshot:16840): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed (gnome-screenshot:16840): Gtk-CRITICAL **: gtk_style_context_remove_class: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed (gnome-screenshot:16840): Gtk-CRITICAL **: gtk_widget_queue_draw: assertion 'GTK_IS_WIDGET (widget)' failed (gnome-screenshot:16840): GLib-GObject-CRITICAL **: g_object_notify: assertion 'G_IS_OBJECT (object)' failed (gnome-screenshot:16840): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed I haven't yet traced those. I have fixed some warnings and deprecations in additional commits (the build now passes with -Werror), for which I would like to point you to my GitHub repository[0]. We can discuss these commits in another ticket or on a mailing list, just tell me what you want here. [0]: https://github.com/Unia/gnome-screenshot/commits/master
GTK now uses a much nicer fallback when the shell can't display the app menu (an icon in the leftmost corner of the headerbar), so this can be closed.