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 675245 - Provide an app menu
Provide an app menu
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: interface
3.4.x
Other All
: Normal normal
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks: 674957
 
 
Reported: 2012-05-01 14:49 UTC by Allan Day
Modified: 2012-09-01 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: Port to GtkApplication (11.28 KB, patch)
2012-05-04 15:09 UTC, Florian Müllner
none Details | Review
Remove the now unused bacon files (11.89 KB, patch)
2012-05-04 15:09 UTC, Florian Müllner
none Details | Review
ui: Use GtkApplicationWindow rather than GtkWindow (923 bytes, patch)
2012-05-04 15:09 UTC, Florian Müllner
none Details | Review
Add an application menu (27.50 KB, patch)
2012-05-04 15:09 UTC, Florian Müllner
none Details | Review
Remove the remaining menubar (21.16 KB, patch)
2012-05-04 15:09 UTC, Florian Müllner
none Details | Review
Add an application menu (29.73 KB, patch)
2012-05-04 15:18 UTC, Florian Müllner
none Details | Review
main: Port to GtkApplication (11.17 KB, patch)
2012-06-16 11:58 UTC, Christophe Fergeau
none Details | Review
Remove the now unused bacon files (11.90 KB, patch)
2012-06-16 11:59 UTC, Christophe Fergeau
none Details | Review
ui: Use GtkApplicationWindow rather than GtkWindow (925 bytes, patch)
2012-06-16 11:59 UTC, Christophe Fergeau
none Details | Review
Add an application menu (29.51 KB, patch)
2012-06-16 11:59 UTC, Christophe Fergeau
none Details | Review
Remove the remaining menubar (21.15 KB, patch)
2012-06-16 11:59 UTC, Christophe Fergeau
none Details | Review
main: Port to GtkApplication (11.17 KB, patch)
2012-07-22 13:35 UTC, Christophe Fergeau
none Details | Review
Remove the now unused bacon files (11.90 KB, patch)
2012-07-22 13:35 UTC, Christophe Fergeau
none Details | Review
ui: Use GtkApplicationWindow rather than GtkWindow (925 bytes, patch)
2012-07-22 13:35 UTC, Christophe Fergeau
none Details | Review
Add an application menu (30.98 KB, patch)
2012-07-22 13:35 UTC, Christophe Fergeau
none Details | Review
Remove the remaining menubar (21.18 KB, patch)
2012-07-22 13:36 UTC, Christophe Fergeau
none Details | Review
Add "{Un,}Select All" button (5.18 KB, patch)
2012-08-12 20:04 UTC, Christophe Fergeau
none Details | Review
Add "{Un,}Select All" button (5.18 KB, patch)
2012-08-12 20:10 UTC, Christophe Fergeau
none Details | Review
Add "{Un,}Select All" button (5.18 KB, patch)
2012-08-12 20:15 UTC, Christophe Fergeau
none Details | Review
Add "{Un,}Select All" button (5.18 KB, patch)
2012-08-12 20:16 UTC, Christophe Fergeau
accepted-commit_now Details | Review
suggested changes to "Remove the remaining menubar" (1.97 KB, patch)
2012-08-12 20:31 UTC, Christophe Fergeau
accepted-commit_now Details | Review

Description Allan Day 2012-05-01 14:49:04 UTC
See - https://live.gnome.org/GnomeGoals/PortToGMenu

You should be able to replace the menu bar with the app menu. Suggested app menu format:

Disc >
---
Submit Track Names
---
Preferences
---
Help
About Sound Juicer
Quit


Where disc is a submenu containing:

Re-read
Duplicate
Eject

I'm a bit unsure about the submit track names entry - the label could be clearer.
Comment 1 Florian Müllner 2012-05-04 15:09:13 UTC
Created attachment 213445 [details] [review]
main: Port to GtkApplication
Comment 2 Florian Müllner 2012-05-04 15:09:19 UTC
Created attachment 213446 [details] [review]
Remove the now unused bacon files
Comment 3 Florian Müllner 2012-05-04 15:09:23 UTC
Created attachment 213447 [details] [review]
ui: Use GtkApplicationWindow rather than GtkWindow
Comment 4 Florian Müllner 2012-05-04 15:09:28 UTC
Created attachment 213448 [details] [review]
Add an application menu
Comment 5 Florian Müllner 2012-05-04 15:09:33 UTC
Created attachment 213449 [details] [review]
Remove the remaining menubar
Comment 6 Florian Müllner 2012-05-04 15:18:31 UTC
Created attachment 213450 [details] [review]
Add an application menu

Woops, forgot to add the menu's ui file ...
Comment 7 Christophe Fergeau 2012-05-04 15:50:13 UTC
(In reply to comment #1)
> Created an attachment (id=213445) [details] [review]
> main: Port to GtkApplication

There was already a patch for than in bug #661363 :((
Comment 8 Matthias Clasen 2012-05-23 02:41:23 UTC
So, should we get one of the patches landed, then ?
Comment 9 Christophe Fergeau 2012-06-16 11:58:59 UTC
Created attachment 216560 [details] [review]
main: Port to GtkApplication
Comment 10 Christophe Fergeau 2012-06-16 11:59:02 UTC
Created attachment 216561 [details] [review]
Remove the now unused bacon files
Comment 11 Christophe Fergeau 2012-06-16 11:59:05 UTC
Created attachment 216562 [details] [review]
ui: Use GtkApplicationWindow rather than GtkWindow
Comment 12 Christophe Fergeau 2012-06-16 11:59:08 UTC
Created attachment 216563 [details] [review]
Add an application menu
Comment 13 Christophe Fergeau 2012-06-16 11:59:11 UTC
Created attachment 216564 [details] [review]
Remove the remaining menubar
Comment 14 Christophe Fergeau 2012-06-16 12:00:30 UTC
Here are the patches rebased against master. I've squashed in the last patch to get rid of a runtime warning. 

diff --git a/src/sj-main.c b/src/sj-main.c
index b59f677..71f4025 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -590,7 +590,7 @@ static void update_ui_for_album (AlbumDetails *album)
     set_action_enabled ("play", TRUE);
     set_action_enabled ("select-all", FALSE);
     set_action_enabled ("deselect-all", TRUE);
-    set_action_enabled ("prev-track", FALSE);
+    set_action_enabled ("previous-track", FALSE);
     set_action_enabled ("next-track", FALSE);
     set_duplication (TRUE);
Comment 15 Ross Burton 2012-07-04 15:40:13 UTC
I've enough confidence in Christophe to approve this series without reviewing it.  Hey Christophe, want to maintain SJ?
Comment 16 Matthias Clasen 2012-07-09 23:34:11 UTC
So, should we get the patches landed, then ?!
Comment 17 Christophe Fergeau 2012-07-10 07:35:10 UTC
wanted to have a look at these last evening, but got sidetracked with boxes :(
Ross, I'm fine with being a co-maintainer and do occasional releases, but I probably won't have much time either to work on it, and I'm also a morituri user these days, so a bit complicated ;)
Comment 18 Christophe Fergeau 2012-07-22 13:35:46 UTC
Created attachment 219414 [details] [review]
main: Port to GtkApplication
Comment 19 Christophe Fergeau 2012-07-22 13:35:50 UTC
Created attachment 219415 [details] [review]
Remove the now unused bacon files
Comment 20 Christophe Fergeau 2012-07-22 13:35:53 UTC
Created attachment 219416 [details] [review]
ui: Use GtkApplicationWindow rather than GtkWindow
Comment 21 Christophe Fergeau 2012-07-22 13:35:56 UTC
Created attachment 219417 [details] [review]
Add an application menu
Comment 22 Christophe Fergeau 2012-07-22 13:36:00 UTC
Created attachment 219418 [details] [review]
Remove the remaining menubar
Comment 23 Christophe Fergeau 2012-07-22 13:40:42 UTC
I've finally looked over these, and they look good. The series I've just attached does 2 things: it removes the set_duplication function and calls directly set_action_enabled instead, and it fixes translation of the app menu (it was missing from POTFILES.in, and for some reason, intltool wants "" around attribute values, not '')

Just a few questions:
- this removes 'Extract CD' from the menu, this makes sense to me, but I prefer to check it's intentional
- the app menu entries have no accelerators, same question, no idea if this is just something that was missed or if this is on purpose
Comment 24 Christophe Fergeau 2012-07-22 14:07:04 UTC
Filed https://bugs.launchpad.net/intltool/+bug/1027631 for the ' VS " issue
Comment 25 Christophe Fergeau 2012-07-22 16:51:42 UTC
{Un}select-all seems to be totally gone from the UI, I've sometimes had use for it, so I'm not sure we want to get rid of it altogether.
Comment 26 Matthias Clasen 2012-07-22 18:05:45 UTC
app menus intentionally don't show accelerators
Comment 27 Ross Burton 2012-07-23 06:42:06 UTC
Removing (Un)select All would probably result in bug reports pretty quickly so it should be bought back in some form.

Apart from that if teuf's reviewed the patches I'm happy to see them land.  After all teuf is a SJ maintainer now (congrats teuf!).
Comment 28 Florian Müllner 2012-07-23 08:45:44 UTC
(In reply to comment #27)
> Removing (Un)select All would probably result in bug reports pretty quickly so
> it should be bought back in some form.

(Un)select All is no longer exposed in the UI, but the functionality is still there ((<Shift>)<Control>a). I don't think it is suited for the application menu, however I'll talk to the designers about other means to expose it.
Comment 29 Matthias Clasen 2012-08-08 17:45:32 UTC
Any update on this from the designers ?
Comment 30 Allan Day 2012-08-08 17:48:58 UTC
We chatted yesterday on IRC. I suggested adding a Select All / Select None button, in line with Play and Extract, but justified to the right.

(Note that you should probably select all by default.)
Comment 31 Christophe Fergeau 2012-08-08 18:16:21 UTC
Fwiw, I'll be making a release today as Ross wants to get one out so that the GStreamer 1.0 stuff gets testing, hopefully we can merge this code soon after the release.
Comment 32 Christophe Fergeau 2012-08-12 20:04:55 UTC
Created attachment 220950 [details] [review]
Add "{Un,}Select All" button

The Unselect all/Select all menu entries have been removed as part
of the addition of the app menu an were only accessible through a
keyboard shortcut. After a discussion with the design team, readd
a button to provide this functionality.
Comment 33 Christophe Fergeau 2012-08-12 20:06:44 UTC
Here is the missing bit for this bug. Florian, Ross, it would be great if you could review this patch, then we can merge all of this. First comment is that I used "Unselect All" in the patch while the wording suggested by Allan was "Select None", I'll change that.
Comment 34 Christophe Fergeau 2012-08-12 20:09:48 UTC
Ah and some c&p fail in the gtksizegroup stuff
Comment 35 Christophe Fergeau 2012-08-12 20:10:47 UTC
Created attachment 220951 [details] [review]
Add "{Un,}Select All" button

The Unselect all/Select all menu entries have been removed as part
of the addition of the app menu an were only accessible through a
keyboard shortcut. After a discussion with the design team, readd
a button to provide this functionality.
Comment 36 Christophe Fergeau 2012-08-12 20:15:06 UTC
Created attachment 220952 [details] [review]
Add "{Un,}Select All" button

The Unselect all/Select all menu entries have been removed as part
of the addition of the app menu an were only accessible through a
keyboard shortcut. After a discussion with the design team, readd
a button to provide this functionality.
Comment 37 Christophe Fergeau 2012-08-12 20:16:01 UTC
Created attachment 220953 [details] [review]
Add "{Un,}Select All" button

The Unselect all/Select all menu entries have been removed as part
of the addition of the app menu an were only accessible through a
keyboard shortcut. After a discussion with the design team, readd
a button to provide this functionality.
Comment 38 Christophe Fergeau 2012-08-12 20:16:20 UTC
(sorry about the mess, took me a few tries to get things right :(
Comment 39 Christophe Fergeau 2012-08-12 20:31:59 UTC
Created attachment 220954 [details] [review]
suggested changes to "Remove the remaining menubar"

(In reply to comment #22)
> Created an attachment (id=219418) [details] [review]
> Remove the remaining menubar

This patch has 2 small issues: it adds whitespace in sj-play.h, and the handling of the play action can be simplified a bit, I'd squash the attached patch into that one.
Comment 40 Christophe Fergeau 2012-08-12 20:35:00 UTC
And one last thing I just noticed is that there is no action, no keyboard shortcut for Extract. This surprises me as this is what sound-juicer is meant for.
Comment 41 Florian Müllner 2012-08-12 22:14:31 UTC
Review of attachment 220953 [details] [review]:

Hmm, so if a single track is selected, I have to press the button twice to select all? Still, if the designers are happy, I'm happy :-)

The code looks good - thanks for pushing this forward!
Comment 42 Florian Müllner 2012-08-12 22:18:04 UTC
Review of attachment 220954 [details] [review]:

Looks great to me, thanks!

::: src/sj-main.c
@@ +1733,3 @@
   gtk_button_set_label(GTK_BUTTON(select_button), _("Select None"));
   gtk_actionable_set_action_name(GTK_ACTIONABLE(select_button), "win.deselect-all");
+  gtk_actionable_set_action_name(GTK_ACTIONABLE(play_button), "win.play");

Good catch!

::: src/sj-play.h
@@ -38,3 @@
 void toggle_play (void);
 
- void play_next_track (void);

Ugh, how did I end up doing that in the first place?
Comment 43 Christophe Fergeau 2012-09-01 17:05:30 UTC
Finally pushed all of this.