After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759265 - Improve user interface when app-menu is not shown
Improve user interface when app-menu is not shown
Status: RESOLVED OBSOLETE
Product: gnome-screenshot
Classification: Core
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screenshot-maint
gnome-screenshot-maint
Depends on:
Blocks:
 
 
Reported: 2015-12-09 17:46 UTC by Jente Hidskes
Modified: 2019-07-25 08:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing the odd user interface (27.72 KB, image/png)
2015-12-09 17:46 UTC, Jente Hidskes
  Details
Patch fixing the odd user interface (3.82 KB, patch)
2015-12-09 17:48 UTC, Jente Hidskes
none Details | Review
Patch fixing the odd user interface (4.16 KB, patch)
2015-12-09 23:09 UTC, Jente Hidskes
none Details | Review

Description Jente Hidskes 2015-12-09 17:46:41 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.
Comment 1 Jente Hidskes 2015-12-09 17:48:31 UTC
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.
Comment 2 Jente Hidskes 2015-12-09 23:09:01 UTC
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
Comment 3 Cosimo Cecchi 2019-07-25 08:53:57 UTC
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.