diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-03-17 16:44:33 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-03-17 16:44:33 +0000 |
commit | 001333b1308edd51069f67e3d633abbf6a2978b0 (patch) | |
tree | 811d61f1408d44fb8c496990c00ea4b2afefadec | |
parent | 58facf2f0db4e60a78f101c6d6273b4331981deb (diff) | |
parent | 09ac621b4caf975b36433bdb0f053317c960223e (diff) | |
download | ayatana-indicator-sound-001333b1308edd51069f67e3d633abbf6a2978b0.tar.gz ayatana-indicator-sound-001333b1308edd51069f67e3d633abbf6a2978b0.tar.bz2 ayatana-indicator-sound-001333b1308edd51069f67e3d633abbf6a2978b0.zip |
merged localisaton fixes
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | src/Makefile.am | 16 | ||||
-rw-r--r-- | src/common-defs.h | 3 | ||||
-rw-r--r-- | src/playlists-menu-item.vala | 10 | ||||
-rw-r--r-- | src/sound-service.c | 6 | ||||
-rw-r--r-- | vapi/config.vapi | 8 |
7 files changed, 34 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am index 86af943..1742c47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,10 @@ SUBDIRS = \ data \ po -EXTRA_DIST = autogen.sh vapi/common-defs.vapi +EXTRA_DIST = \ + autogen.sh \ + vapi/common-defs.vapi \ + vapi/config.vapi DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall diff --git a/po/POTFILES.in b/po/POTFILES.in index 2f68d1a..35c47bd 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.c diff --git a/src/Makefile.am b/src/Makefile.am index f7dc2ef..ae0d55a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,8 +56,7 @@ music_bridge_VALASOURCES = \ settings-manager.vala \ playlists-menu-item.vala \ freedesktop-interfaces.vala \ - fetch-file.vala - + fetch-file.vala music_bridge_VALAFLAGS = \ --ccode \ @@ -69,10 +68,11 @@ music_bridge_VALAFLAGS = \ --pkg gee-1.0 \ --pkg Dbusmenu-0.4 \ --pkg common-defs \ - --pkg gio-2.0 \ - --pkg gio-unix-2.0 \ - --pkg gdk-pixbuf-2.0 \ - --pkg libxml-2.0 + --pkg config \ + --pkg gio-2.0 \ + --pkg gio-unix-2.0 \ + --pkg gdk-pixbuf-2.0 \ + --pkg libxml-2.0 $(MAINTAINER_VALAFLAGS) @@ -137,10 +137,10 @@ EXTRA_DIST = \ ####################### BUILT_SOURCES = \ music_bridge_vala.stamp \ - $(music_bridge_APIFILES) \ + $(music_bridge_APIFILES) \ gen-sound-service.xml.h \ gen-sound-service.xml.c \ - $(music_bridge_VALASOURCES:.vala=.c) + $(music_bridge_VALASOURCES:.vala=.c) CLEANFILES = \ $(BUILT_SOURCES) diff --git a/src/common-defs.h b/src/common-defs.h index 21aab60..68cb0b8 100644 --- a/src/common-defs.h +++ b/src/common-defs.h @@ -19,6 +19,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef __COMMON_DEFS_H__ #define __COMMON_DEFS_H__ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif typedef enum { MUTED, diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 98d18f4..79ab506 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -17,11 +17,13 @@ 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 Config; using Dbusmenu; using DbusmenuPlaylists; using DbusmenuPlaylist; using Gee; + public class PlaylistsMenuitem : PlayerItem { private HashMap<int, Dbusmenu.Menuitem> current_playlists; @@ -31,12 +33,14 @@ public class PlaylistsMenuitem : PlayerItem { Object ( item_type: MENUITEM_TYPE, owner: parent ); } + construct{ 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 +78,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 +122,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); } diff --git a/src/sound-service.c b/src/sound-service.c index cfc0b7e..7e6426c 100644 --- a/src/sound-service.c +++ b/src/sound-service.c @@ -51,11 +51,11 @@ main: int main (int argc, char ** argv) { + g_type_init(); - - setlocale (LC_ALL, ""); - bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); textdomain (GETTEXT_PACKAGE); + bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); + setlocale (LC_ALL, ""); IndicatorService *service = indicator_service_new_version(INDICATOR_SOUND_DBUS_NAME, INDICATOR_SOUND_DBUS_VERSION); diff --git a/vapi/config.vapi b/vapi/config.vapi new file mode 100644 index 0000000..4be6d11 --- /dev/null +++ b/vapi/config.vapi @@ -0,0 +1,8 @@ +[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")] +namespace Config { + public const string GETTEXT_PACKAGE; + public const string LOCALEDIR; + public const string PKGDATADIR; + public const string PACKAGE_NAME; + public const string PACKAGE_VERSION; +} |