From 43add0d136610c73828a99ff3625cbae0c50c630 Mon Sep 17 00:00:00 2001 From: Anshul Hudda Date: Sun, 29 Jul 2018 19:19:04 +0530 Subject: [PATCH] window: Change view navigation to Alt+NUM help-overlay: Reflect the same in Shortcut menu Changing views with Ctrl+NUM is not in line with other applications, use the Alt modifier instead. Reflect the modification in Shortcut menu. Closes: #198 --- data/help-overlay.ui | 8 +- gnomemusic/window.py | 8 +- org.gnome.Music.json | 192 ++++++++++++++++++++++++------------------- 3 files changed, 117 insertions(+), 91 deletions(-) diff --git a/data/help-overlay.ui b/data/help-overlay.ui index e1d751970..ebddf7c40 100644 --- a/data/help-overlay.ui +++ b/data/help-overlay.ui @@ -90,28 +90,28 @@ True Go to Albums - <Ctrl>1 + <Alt>1 True Go to Artists - <Ctrl>2 + <Alt>2 True Go to Songs - <Ctrl>3 + <Alt>3 True Go to Playlists - <Ctrl>4 + <Alt>4 diff --git a/gnomemusic/window.py b/gnomemusic/window.py index 270f05935..0d849e0c5 100644 --- a/gnomemusic/window.py +++ b/gnomemusic/window.py @@ -383,16 +383,16 @@ class Window(Gtk.ApplicationWindow): and modifiers == mod1_mask): self.headerbar._on_back_button_clicked() if ((event.keyval in [Gdk.KEY_1, Gdk.KEY_KP_1]) - and modifiers == control_mask): + and modifiers == mod1_mask): self._toggle_view(View.ALBUM) if ((event.keyval in [Gdk.KEY_2, Gdk.KEY_KP_2]) - and modifiers == control_mask): + and modifiers == mod1_mask): self._toggle_view(View.ARTIST) if ((event.keyval in [Gdk.KEY_3, Gdk.KEY_KP_3]) - and modifiers == control_mask): + and modifiers == mod1_mask): self._toggle_view(View.SONG) if ((event.keyval in [Gdk.KEY_4, Gdk.KEY_KP_4]) - and modifiers == control_mask): + and modifiers == mod1_mask): self._toggle_view(View.PLAYLIST) else: if (event.keyval == Gdk.KEY_AudioPlay diff --git a/org.gnome.Music.json b/org.gnome.Music.json index 632bbe2f9..9bc24264d 100644 --- a/org.gnome.Music.json +++ b/org.gnome.Music.json @@ -1,20 +1,27 @@ { - "app-id": "org.gnome.MusicDevel", - "runtime": "org.gnome.Platform", - "runtime-version": "master", - "sdk": "org.gnome.Sdk", - "command": "gnome-music", - "tags": ["devel", "development", "nightly"], - "desktop-file-name-prefix": "(Development) ", - "finish-args": [ - "--share=ipc", "--socket=x11", + "app-id" : "org.gnome.MusicDevel", + "runtime" : "org.gnome.Platform", + "runtime-version" : "master", + "sdk" : "org.gnome.Sdk", + "command" : "gnome-music", + "tags" : [ + "devel", + "development", + "nightly" + ], + "desktop-file-name-prefix" : "(Development) ", + "finish-args" : [ + "--share=ipc", + "--socket=x11", "--share=network", "--socket=wayland", "--talk-name=org.freedesktop.Tracker1", "--env=TRACKER_SPARQL_BACKEND=bus", "--talk-name=org.gnome.OnlineAccounts", - "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro", - "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf", + "--filesystem=xdg-run/dconf", + "--filesystem=~/.config/dconf:ro", + "--talk-name=ca.desrt.dconf", + "--env=DCONF_USER_CONFIG_DIR=.config/dconf", "--own-name=org.mpris.MediaPlayer2.GnomeMusic", "--talk-name=org.gnome.SettingsDaemon.MediaKeys", "--talk-name=com.intel.dleyna-server", @@ -23,13 +30,13 @@ "--filesystem=xdg-cache/media-art" ], "build-options" : { - "cflags": "-O2 -g", - "cxxflags": "-O2 -g", - "env": { - "V": "1" + "cflags" : "-O2 -g", + "cxxflags" : "-O2 -g", + "env" : { + "V" : "1" } }, - "cleanup": [ + "cleanup" : [ "/include", "/lib/pkgconfig", "/share/pkgconfig", @@ -41,116 +48,135 @@ "*.la", "*.a" ], - "modules": [ + "modules" : [ { - "name": "libmediaart", - "sources": [ + "name" : "libmediaart", + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/libmediaart.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/libmediaart.git" } ] }, { - "name": "libdazzle", + "name" : "libdazzle", "config-opts" : [ "--libdir=/app/lib" ], - "buildsystem": "meson", - "sources": [ + "buildsystem" : "meson", + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/libdazzle.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/libdazzle.git" } ] }, { - "name": "tracker", - "cleanup": [ "/bin", "/etc", "/libexec" ], - "config-opts": [ "--disable-miner-apps", "--disable-static", - "--disable-tracker-extract", "--disable-tracker-needle", - "--disable-tracker-preferences", "--disable-artwork", - "--disable-tracker-writeback", "--disable-miner-user-guides", - "--with-bash-completion-dir=no" ], - "sources": [ + "name" : "tracker", + "cleanup" : [ + "/bin", + "/etc", + "/libexec" + ], + "config-opts" : [ + "--disable-miner-apps", + "--disable-static", + "--disable-tracker-extract", + "--disable-tracker-needle", + "--disable-tracker-preferences", + "--disable-artwork", + "--disable-tracker-writeback", + "--disable-miner-user-guides", + "--with-bash-completion-dir=no" + ], + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/tracker.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/tracker.git" } ] }, { - "name": "gnome-online-accounts", - "config-opts": [ "--enable-introspection", - "--disable-telepathy", - "--disable-documentation", - "--disable-backend", - "--disable-Werror" ], - "sources": [ + "name" : "gnome-online-accounts", + "config-opts" : [ + "--enable-introspection", + "--disable-telepathy", + "--disable-documentation", + "--disable-backend", + "--disable-Werror" + ], + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/gnome-online-accounts.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/gnome-online-accounts.git" } ] }, { - "name": "totem-pl-parser", - "buildsystem": "meson", - "sources": [ + "name" : "totem-pl-parser", + "buildsystem" : "meson", + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/totem-pl-parser.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/totem-pl-parser.git" } ] }, { - "name": "grilo", - "buildsystem": "meson", - "sources": [ + "name" : "grilo", + "buildsystem" : "meson", + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/grilo.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/grilo.git" } ], - "cleanup": [ "/include", "/bin" ] + "cleanup" : [ + "/include", + "/bin" + ] }, { - "name": "grilo-plugins", - "buildsystem": "meson", - "config-opts": [ "-Denable-dleyna=yes", - "-Denable-goa=yes", - "-Denable-tracker=yes", - "-Denable-bookmarks=no", - "-Denable-filesystem=no", - "-Denable-freebox=no", - "-Denable-localmetadata=no", - "-Denable-lua-factory=no", - "-Denable-metadata-store=no", - "-Denable-opensubtitles=no", - "-Denable-optical-media=no", - "-Denable-podcasts=no", - "-Denable-thetvdb=no", - "-Denable-tmdb=no", - "-Denable-vimeo=no", - "-Denable-youtube=no" ], - "sources": [ + "name" : "grilo-plugins", + "buildsystem" : "meson", + "config-opts" : [ + "-Denable-dleyna=yes", + "-Denable-goa=yes", + "-Denable-tracker=yes", + "-Denable-bookmarks=no", + "-Denable-filesystem=no", + "-Denable-freebox=no", + "-Denable-localmetadata=no", + "-Denable-lua-factory=no", + "-Denable-metadata-store=no", + "-Denable-opensubtitles=no", + "-Denable-optical-media=no", + "-Denable-podcasts=no", + "-Denable-thetvdb=no", + "-Denable-tmdb=no", + "-Denable-vimeo=no", + "-Denable-youtube=no" + ], + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/grilo-plugins.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/grilo-plugins.git" } ], - "cleanup": [ "/include" ] + "cleanup" : [ + "/include" + ] }, { - "name": "gnome-music", + "name" : "gnome-music", "config-opts" : [ "-Dprofile=development" ], - "buildsystem": "meson", - "sources": [ + "buildsystem" : "meson", + "sources" : [ { - "type": "git", - "url": "https://gitlab.gnome.org/GNOME/gnome-music.git" + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/gnome-music.git" } ] } -- GitLab