GNOME Bugzilla – Bug 623120
Screenshot tool in interactive mode is confusing when setting a delay
Last modified: 2021-05-25 12:37:36 UTC
When wanting to take a screenshot and setting a delay, the window just closes and nothing happens until the screenshot is taken. There should be a window informing the user of the time remaining, so he doesn't think that the application just closed without taking a screenshot. This bug has been reported at Launchpad: https://bugs.launchpad.net/gnome-utils/+bug/599667
Created attachment 169165 [details] [review] Fixes the bug by adding a countdown. I attached a patch that solves this.
Review of attachment 169165 [details] [review]: please, don't use tabs to indent - and, especially: please don't redefine tabs to be equivalent to 2 spaces. use spaces to indent. also, I'd rather see something like the count-down widget used by Cheese instead of a plain GtkLabel. ::: gnome-screenshot/gnome-screenshot.c @@ +531,3 @@ + delay_label = gtk_label_new(""); + gtk_box_pack_start (GTK_BOX (content_area), delay_label, FALSE, FALSE, 0); + gtk_widget_show (delay_label); don't show the label if it's empty. @@ +1142,3 @@ + gtk_widget_hide (GTK_WIDGET (dialog)); + gtk_widget_destroy (GTK_WIDGET (dialog)); + // If we don't add a timeout, the screenshot will include the dialog no C++/C99 comments. @@ +1148,3 @@ + internal_delay++; + + sprintf(label_string, _("The screenshot will be taken in %d seconds..."), seconds); don't use sprintf() with a localized string - you have no idea how long the localized number will be. use g_strdup_printf(). also, use ngettext() instead of the _() macro, to accommodate the plural forms. @@ +1383,2 @@ /* interactive mode overrides everything */ + GtkWidget *dialog; no C++/C99 declaration after statements.
Mohamed, have you had a chance to rewrite your patch based on feedback in comment #2?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/ Thank you for your understanding and your help.