aboutsummaryrefslogtreecommitdiff
path: root/src/playlists-menu-item.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/playlists-menu-item.vala')
-rw-r--r--src/playlists-menu-item.vala18
1 files changed, 15 insertions, 3 deletions
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);
}