GNOME Bugzilla – Bug 361311
RFE: Do you really want to send this without adding a note?
Last modified: 2008-08-04 00:28:58 UTC
Would be nice, if bug-buddy could ask the user, if he really wants to send a bug report, without adding any note -- if he did not.
Created attachment 79602 [details] [review] Implements a GtkMessageDialog This makes bug buddy check if the text has more than MIN_REPORT_DETAILS_CHARS, if not it shows a GtkMessageDialog. Pretty simple, please understand that the message is just a test because I can't think of something good. Misc Question: Does bug-buddy has a --dry-run option? I had to comment send_report to hack this.
Sorry for spamming but could we get this on 2.18? If not we are going to keep getting empty descriptions in bug reports.
Just wanted to remind you that this could avoid lots of useless needinfos. Or at least I think it would.
|˙ (ping)
|. (ping)
merry xmas, ping.
Diego, would you like to update the patch with a more meaningful message? BTW, why did you choose ten characters as the lowest threshold for good descriptions? Wouldn't it be better to let in anything > 0 but block without the choice to send it anyway those without any description at all?
Seems like I can't build b-b anymore: In file included from /usr/include/libbonoboui-2.0/bonobo/bonobo-dock-band.h:47, from /usr/include/libbonoboui-2.0/bonobo/bonobo-dock.h:55, from /usr/include/libgnomeui-2.0/libgnomeui/gnome-app.h:44, from /usr/include/libgnomeui-2.0/libgnomeui/libgnomeui.h:34, from /usr/include/libgnomeui-2.0/gnome.h:7, from bug-buddy.c:45: /usr/include/libbonoboui-2.0/bonobo/bonobo-dock-item.h:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bonobo_dock_item_get_type’ In file included from /usr/include/libbonoboui-2.0/bonobo/bonobo-dock.h:55, from /usr/include/libgnomeui-2.0/libgnomeui/gnome-app.h:44, from /usr/include/libgnomeui-2.0/libgnomeui/libgnomeui.h:34, from /usr/include/libgnomeui-2.0/gnome.h:7, from bug-buddy.c:45: /usr/include/libbonoboui-2.0/bonobo/bonobo-dock-band.h:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bonobo_dock_band_get_type’ In file included from /usr/include/libgnomeui-2.0/libgnomeui/gnome-app.h:44, from /usr/include/libgnomeui-2.0/libgnomeui/libgnomeui.h:34, from /usr/include/libgnomeui-2.0/gnome.h:7, from bug-buddy.c:45: /usr/include/libbonoboui-2.0/bonobo/bonobo-dock.h:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bonobo_dock_get_type’ In file included from /usr/include/libgnomeui-2.0/libgnomeui/libgnomeui.h:35, from /usr/include/libgnomeui-2.0/gnome.h:7, from bug-buddy.c:45: /usr/include/libgnomeui-2.0/libgnomeui/gnome-app-helper.h:621: error: expected specifier-qualifier-list before ‘GtkDestroyNotify’ /usr/include/libgnomeui-2.0/libgnomeui/gnome-app-helper.h:688: error: expected declaration specifiers or ‘...’ before ‘GtkDestroyNotify’ /usr/include/libgnomeui-2.0/libgnomeui/gnome-app-helper.h:726: error: expected declaration specifiers or ‘...’ before ‘GtkDestroyNotify’ /usr/include/libgnomeui-2.0/libgnomeui/gnome-app-helper.h:772: error: expected declaration specifiers or ‘...’ before ‘GtkDestroyNotify’ In file included from /usr/include/libgnomeui-2.0/libgnomeui/libgnomeui.h:62, from /usr/include/libgnomeui-2.0/gnome.h:7, from bug-buddy.c:45: /usr/include/libgnomeui-2.0/libgnomeui/gnome-client.h:460: error: expected declaration specifiers or ‘...’ before ‘GtkDestroyNotify’ In file included from /usr/include/libgnomeui-2.0/libgnomeui/libgnomeui.h:84, from /usr/include/libgnomeui-2.0/gnome.h:7, from bug-buddy.c:45: /usr/include/libgnomeui-2.0/libgnomeui/gnome-password-dialog.h:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gnome_password_dialog_get_type’ make[2]: *** [bug-buddy.o] Error 1 make[2]: Leaving directory `/home/diego/gnome/src/bug-buddy/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/diego/gnome/src/bug-buddy' make: *** [all] Error 2 Maybe something is too old on my system?
Yeah, I believe you have an old libgnome. Try to remove the $(DISABLE_DEPRECATED) line from src/Makefile.am, it should compile.
Created attachment 115668 [details] [review] [PATCH] Avoid sending reports with empty descriptions. Based on my bugzilla patch, this improves the message and updates it to use GtkBuilder instead of Glade. Also, it sets the button sensitive/unsensitive instead of hiding it. --- src/bug-buddy.c | 59 ++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 46 insertions(+), 13 deletions(-)
Ok, new patch. This one is updated and has a better message. On the misc side, I removed the hiding and made it sensitive'ness instead, dissapearing widgets are evil!.
I tested the patch, but thinking a bit better about it, I'm not completely sold on the approach. I mean, if the user doesn't want to send a meaningful description he won't send it even with a ten characters limit (he will just write ten random chars instead of two/three). The dialog itself is not a right approach IMHO, because there's no point in having the "Send" button sensitive and then denying the sending and popping up a dialog. What we could do instead is to make the "Send" button sensitive only if there's some text in the text view. Also maybe, for bonus points, the text view could be pre-filled with something like "Please insert your description here" which will go away as soon as you click on it. Thoughts?
What about leaving the button sensitive at all times, but if the number of characters in the description is below a certain threshold a confirmation dialog pops up: The problem description you entered is very short. This is probably not of much help to the developers investigating your report. If you provide a better description, for instance with a description of how to reproduce the crash, the issue can be more easily resolved. [Send anyway] [Review description] My $0.02.
Created attachment 115714 [details] [review] [PATCH] Prompt user to fill a longer description Implement a custom GtkDialog that offers the user the choice to Review description (default) or Send anyway. The number of chars that trigger this is <10. Personally it feels a bit unintuitive, but it might be due to wording, for some reason I feel that Send anyway should be the button to the right. Also remove the sensitive/insensitive bits, the dialog is blocking the window anyway. --- src/bug-buddy.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 111 insertions(+), 9 deletions(-)
Ok, updated to follow Wouter suggestion. Marking the other one obsolete. Please comment!. Attaching screenshot btw.
Created attachment 115715 [details] How it looks
(In reply to comment #17) > for some reason I feel that Send anyway should be the button to the right. Agreed, "progress" should be on the right, "abortion" on the left.
I'm missing a gtk_dialog_set_default_response() call in your patch. Using that also obsoletes the gtk_widget_grab_default() call afaik.
Comment on attachment 115714 [details] [review] [PATCH] Prompt user to fill a longer description Diego, thanks for the updated patch. It seems there's some kind of consensus this dialog is the way to go, so let's try to get this in before the UI freeze! Some comments: >+ dialog = gtk_dialog_new (); >+ There's no need to use a GtkDialog and manually pack the icon and the primary/secondary labels: you can use GtkMessageDialog which does that for you with nice functions. >+ /* Send anyway button */ >+ send_anyway = gtk_button_new_with_label (_("Send anyway")); >+ /* Review button */ >+ review = gtk_button_new_with_label (_("Review description")); >+ gtk_dialog_add_action_widget (GTK_DIALOG (dialog), >+ review, GTK_RESPONSE_CANCEL); Use gtk_dialog_add_button. Also, there's no need to use more than a GtkWidget pointer, as you don't want to store the pointers anyway. Just use one GtkWidget *widget. >+ GTK_WIDGET_SET_FLAGS (review, GTK_CAN_DEFAULT); >+ gtk_widget_grab_default (review); >+ gtk_widget_show (review); Use gtk_dialog_set_default_response.
Created attachment 115745 [details] [review] [PATCH] Use a GtkMessageDialog to warn about description This patch follow the last comments, although it still uses gtk_dialog_add_action_widget since gtk_dialog_add_button allows only stock buttons, which we don't want because dialogs without pretty icon+buttons are ugly and scary. Send anyway is now the default widget, GTK_WIDGET_SET_FLAGS was still needed because otherwise gtk_dialog_set_default_response would fail. --- src/bug-buddy.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 72 insertions(+), 9 deletions(-)
Obsoleting the older patch.
(In reply to comment #23) > This patch follow the last comments, although it still uses > gtk_dialog_add_action_widget since gtk_dialog_add_button allows only stock > buttons, which we don't want because dialogs without pretty icon+buttons are > ugly and scary. > Send anyway is now the default widget, GTK_WIDGET_SET_FLAGS was still needed > because otherwise gtk_dialog_set_default_response would fail. gtk_dialog_add_button returns the button widget after adding it, so you can use that method and set the icon later. That function will also set the GTK_CAN_DEFAULT flag on the button for you, so gtk_dialog_set_default_response will work with no additional effort.
Created attachment 115752 [details] [review] [PATCH] Use more purist GtkDialog for the warning This addresses the last comment about using gtk_dialog_add_button, nevermind I didn't realized it returned a GtkWidget* :). Now the patch should be ok. --- src/bug-buddy.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 68 insertions(+), 9 deletions(-)
Thanks Diego, the patch looks good now! Commit it to trunk please, with these nitpicks: - Primary text should be something like "The description you provided for the crash is very short. Are you sure you want to send it?" - Secondary text should be "A short description is probably not of much help to the developers investigating your report. If you provide a better one, for instance specifying a way to reproduce the crash, the issue can be more easily resolved". - In the source file, split the big secondary text line into more lines of about 80 chars each.
Committed to trunk. Feel free to fix the message lines, I split them but I'm not sure I did a good job... my current uptime is just too much :) I need to sleep. Sorry, double commit since I forgot again about the damn changelog entry :/
I notified gnome-i18n and gnome-doc-list about the new strings.
Right, i knew i forgot something, thank you.