diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/common-defs.h | 1 | ||||
-rw-r--r-- | src/playlists-menu-item.vala | 18 |
6 files changed, 23 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 86af943..ef3b423 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,9 @@ SUBDIRS = \ data \ po -EXTRA_DIST = autogen.sh vapi/common-defs.vapi +EXTRA_DIST = \ + autogen.sh \ + vapi/common-defs.vapi DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall diff --git a/configure.ac b/configure.ac index 88535b1..a69ff69 100644 --- a/configure.ac +++ b/configure.ac @@ -149,6 +149,7 @@ data/icons/16x16/status/Makefile data/icons/scalable/Makefile data/icons/scalable/status/Makefile po/Makefile.in +src/config.vala ]) ########################### diff --git a/po/POTFILES.in b/po/POTFILES.in index 2f68d1a..37b6d8e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -2,3 +2,4 @@ src/indicator-sound.c src/mute-menu-item.c src/sound-service-dbus.c +src/playlists-menu-item.vala diff --git a/src/Makefile.am b/src/Makefile.am index f7dc2ef..ff9dda6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,7 +56,8 @@ music_bridge_VALASOURCES = \ settings-manager.vala \ playlists-menu-item.vala \ freedesktop-interfaces.vala \ - fetch-file.vala + fetch-file.vala \ + config.vala music_bridge_VALAFLAGS = \ @@ -140,6 +141,7 @@ BUILT_SOURCES = \ $(music_bridge_APIFILES) \ gen-sound-service.xml.h \ gen-sound-service.xml.c \ + config.vala \ $(music_bridge_VALASOURCES:.vala=.c) CLEANFILES = \ diff --git a/src/common-defs.h b/src/common-defs.h index 21aab60..e95b7e0 100644 --- a/src/common-defs.h +++ b/src/common-defs.h @@ -19,7 +19,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef __COMMON_DEFS_H__ #define __COMMON_DEFS_H__ - typedef enum { MUTED, ZERO_LEVEL, diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 98d18f4..b3d0aa2 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -17,11 +17,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +using GLib; +using Config; using Dbusmenu; using DbusmenuPlaylists; using DbusmenuPlaylist; using Gee; + public class PlaylistsMenuitem : PlayerItem { private HashMap<int, Dbusmenu.Menuitem> current_playlists; @@ -32,11 +35,20 @@ public class PlaylistsMenuitem : PlayerItem Object ( item_type: MENUITEM_TYPE, owner: parent ); } construct{ + + GLib.Intl.textdomain (Config.PACKAGE); + GLib.Intl.bindtextdomain (Config.PACKAGE, Config.LOCALEDIR); + GLib.Intl.bind_textdomain_codeset (Config.PACKAGE, "UTF-8"); + GLib.Intl.setlocale(GLib.LocaleCategory.ALL, ""); + + DesktopAppInfo.set_desktop_env ("GNOME"); + this.current_playlists = new HashMap<int, Dbusmenu.Menuitem>(); this.root_item = new Menuitem(); - this.root_item.property_set ( MENUITEM_PROP_LABEL, "Choose Playlist" ); + this.root_item.property_set ( MENUITEM_PROP_LABEL, _("Choose Playlist") ); this.root_item.property_set ( MENUITEM_PATH, "" ); + } public new void update (PlaylistDetails[] playlists) @@ -74,7 +86,7 @@ public class PlaylistsMenuitem : PlayerItem } if (within == false){ if (this.root_item.property_get (MENUITEM_PATH) == item.property_get (MENUITEM_PATH)){ - this.root_item.property_set (MENUITEM_PROP_LABEL, "Choose Playlist"); + this.root_item.property_set (MENUITEM_PROP_LABEL, _("Choose Playlist")); } this.root_item.child_delete (item); } @@ -118,7 +130,7 @@ public class PlaylistsMenuitem : PlayerItem public void active_playlist_update (PlaylistDetails detail) { var update = detail.name; - if ( update == "" ) update = "Choose Playlist"; + if ( update == "" ) update = _("Choose Playlist"); this.root_item.property_set (MENUITEM_PROP_LABEL, update); this.root_item.property_set (MENUITEM_PATH, detail.path); } |