GNOME Bugzilla – Bug 778803
Add "Report an Issue" to the app menu
Last modified: 2017-03-03 18:54:21 UTC
The menu item should appear between About and Quit and it should open http://bugzilla.gnome.org/enter_bug.cgi?product=recipes when clicked. To add an item to the app menu, edit src/menus.ui. The new menu item will refer to an action, say app.report-issue, which needs to be implemented in src/gr-app.c.
Created attachment 346997 [details] [review] Addsa "Report Issue" menu item
Something went wrong here - the patch you attached only includes the change to org.gnome.Recipes.json, not the changes to the src/menus.ui and src/gr-app.c files.
Created attachment 347019 [details] [review] Adds a "Report Issue" menu item
Created attachment 347022 [details] [review] Adds a "Report Issue" menu item
Created attachment 347023 [details] [review] Adds a "Report Issue" menu item
Created attachment 347024 [details] [review] Adds a "Report Issue" menu item
Created attachment 347025 [details] [review] Adds a "Report Issue" menu item
Created attachment 347026 [details] [review] Adds a "Report Issue" menu item
Review of attachment 347023 [details] [review]: Apart from formatting, looks good. ::: src/gr-app.c @@ +107,3 @@ + gr_window_show_report_issue (GR_WINDOW (win)); +} +// Cosmetic formatting fixes I'd like to see here: - Make sure to replace tabs with spaces - Remove the // markers. They don't really add anything - Line up the function parameters like this: static void report_issue_activated (GSimpleAction *action, GVariant *parameter, gpointer app) @@ +195,3 @@ { "search", search_activated, "s", NULL, NULL }, + { "quit", quit_activated, NULL, NULL, NULL }, + { "report-issue", report_issue_activated, NULL, NULL, NULL } // And here as well, line up with the rest of the array, and remove the //
Review of attachment 347024 [details] [review]: ::: src/gr-window.h @@ +84,2 @@ void gr_window_show_my_chef_information (GrWindow *window); +void gr_window_show_report_issue (GrWindow *window); // Again only cosmetics to complain about: line up with the other functions, and remove the //
Review of attachment 347025 [details] [review]: ::: src/gr-window.c @@ +87,3 @@ GtkWidget *chef_dialog; GtkWidget *about_dialog; + GtkWidget *report_issues; Make sure to replace tabs with spaces, and line things up @@ +1226,3 @@ + + g_autoptr(GError) error = NULL; + While this is valid C99, I prefer the traditional way and keep variable declaration at the beginning of the block, before all code. So this should be reordered as: const char *uri = "http://bugzilla.gnome.org/enter_bug.cgi?product=recipes"; g_autoptr(GError) error = NULL; gtk_header_bar_set_title (GTK_HEADER_BAR (window->header), _("Report Issue"));
Review of attachment 347026 [details] [review]: looks fine
Created attachment 347076 [details] [review] Adds a "Report Issue" menu item (aligned code)
I've tried the code and it works fine. There's still an issue with the patch generation - I can't get these patches to apply cleanly (or at all). I would recommend that you start over on a clean checkout of recipes, and generate a fresh patch: git clone git.gnome.org/recipes <make your changes> git add src/gr-app.c src/menus.ui src/gr-window.h src/gr-window.c git commit git format-patch HEAD^ That should give you a single patch containing all the changes, and it should hopefully apply cleanly on my system.
Created attachment 347093 [details] [review] Single patch for "Report Issue" menu item addition changes
Review of attachment 347093 [details] [review]: This patch looks perfect, as far as the code changes are concerned. Now let s just fix up the Subject line, and then it is ready to be merged. It looks like you removed the comment markers when editing the commit message template, so that the "Changes to be committed" part of the template gets into the subject line. Here is what I would suggest for a good commit message: Subject: Add a "Report Issue" item in the app menu Add an item in the about menu that launches a browser window pointing at bugzilla.gnome.org to report a bug against recipes.
Created attachment 347120 [details] [review] Add a "Report Issue" item in the app menu
Review of attachment 347120 [details] [review]: All looks good now.
Review of attachment 347120 [details] [review]: noticed an issue when building: the implementation of report_issue_activated got lost in the last iteration. Can you please add it back ?
Created attachment 347131 [details] [review] Add a "Report Issue" item in the app menu
Created attachment 347143 [details] [review] Add a "Report Issue" item in the app menu
Thanks for the patch, applied! Attachment 347143 [details] pushed as cd68dd8 - Add a "Report Issue" item in the app menu