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 778803 - Add "Report an Issue" to the app menu
Add "Report an Issue" to the app menu
Status: RESOLVED FIXED
Product: recipes
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-02-17 02:31 UTC by Matthias Clasen
Modified: 2017-03-03 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Addsa "Report Issue" menu item (786 bytes, patch)
2017-03-01 20:48 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (790 bytes, patch)
2017-03-02 05:06 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (790 bytes, patch)
2017-03-02 05:35 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (1.40 KB, patch)
2017-03-02 05:35 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (886 bytes, patch)
2017-03-02 05:35 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (1.40 KB, patch)
2017-03-02 05:36 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (814 bytes, patch)
2017-03-02 05:36 UTC, Maithili Bhide
none Details | Review
Adds a "Report Issue" menu item (aligned code) (2.47 KB, patch)
2017-03-02 15:32 UTC, Maithili Bhide
none Details | Review
Single patch for "Report Issue" menu item addition changes (3.03 KB, patch)
2017-03-02 19:37 UTC, Maithili Bhide
none Details | Review
Add a "Report Issue" item in the app menu (3.02 KB, patch)
2017-03-03 09:26 UTC, Maithili Bhide
none Details | Review
Add a "Report Issue" item in the app menu (3.45 KB, patch)
2017-03-03 14:21 UTC, Maithili Bhide
none Details | Review
Add a "Report Issue" item in the app menu (3.45 KB, patch)
2017-03-03 14:38 UTC, Maithili Bhide
committed Details | Review

Description Matthias Clasen 2017-02-17 02:31:31 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.
Comment 1 Maithili Bhide 2017-03-01 20:48:43 UTC
Created attachment 346997 [details] [review]
Addsa "Report Issue" menu item
Comment 2 Matthias Clasen 2017-03-01 21:04:03 UTC
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.
Comment 3 Maithili Bhide 2017-03-02 05:06:03 UTC
Created attachment 347019 [details] [review]
Adds a "Report Issue" menu item
Comment 4 Maithili Bhide 2017-03-02 05:35:03 UTC
Created attachment 347022 [details] [review]
Adds a "Report Issue" menu item
Comment 5 Maithili Bhide 2017-03-02 05:35:29 UTC
Created attachment 347023 [details] [review]
Adds a "Report Issue" menu item
Comment 6 Maithili Bhide 2017-03-02 05:35:58 UTC
Created attachment 347024 [details] [review]
Adds a "Report Issue" menu item
Comment 7 Maithili Bhide 2017-03-02 05:36:22 UTC
Created attachment 347025 [details] [review]
Adds a "Report Issue" menu item
Comment 8 Maithili Bhide 2017-03-02 05:36:45 UTC
Created attachment 347026 [details] [review]
Adds a "Report Issue" menu item
Comment 9 Matthias Clasen 2017-03-02 05:44:47 UTC
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 //
Comment 10 Matthias Clasen 2017-03-02 05:45:40 UTC
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 //
Comment 11 Matthias Clasen 2017-03-02 05:48:21 UTC
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"));
Comment 12 Matthias Clasen 2017-03-02 05:48:40 UTC
Review of attachment 347026 [details] [review]:

looks fine
Comment 13 Maithili Bhide 2017-03-02 15:32:36 UTC
Created attachment 347076 [details] [review]
Adds a "Report Issue" menu item (aligned code)
Comment 14 Matthias Clasen 2017-03-02 18:15:30 UTC
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.
Comment 15 Maithili Bhide 2017-03-02 19:37:32 UTC
Created attachment 347093 [details] [review]
Single patch for "Report Issue" menu item addition changes
Comment 16 Matthias Clasen 2017-03-02 19:43:15 UTC
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.
Comment 17 Maithili Bhide 2017-03-03 09:26:42 UTC
Created attachment 347120 [details] [review]
Add a "Report Issue" item in the app menu
Comment 18 Matthias Clasen 2017-03-03 13:10:42 UTC
Review of attachment 347120 [details] [review]:

All looks good now.
Comment 19 Matthias Clasen 2017-03-03 13:19:41 UTC
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 ?
Comment 20 Maithili Bhide 2017-03-03 14:21:52 UTC
Created attachment 347131 [details] [review]
Add a "Report Issue" item in the app menu
Comment 21 Maithili Bhide 2017-03-03 14:38:26 UTC
Created attachment 347143 [details] [review]
Add a "Report Issue" item in the app menu
Comment 22 Matthias Clasen 2017-03-03 18:54:17 UTC
Thanks for the patch, applied!
Attachment 347143 [details] pushed as cd68dd8 - Add a "Report Issue" item in the app menu