aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-11 15:16:09 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-11 15:16:09 +0000
commit6b0f3ffcaf55d151d87f8dc60d16388b8f4557a2 (patch)
treea155128a12c7cf47ce15772906058910fa87ce1b /src
parente97cb2babe643545ac2ccc0484e3a5bc98dbfb2c (diff)
downloadayatana-indicator-sound-6b0f3ffcaf55d151d87f8dc60d16388b8f4557a2.tar.gz
ayatana-indicator-sound-6b0f3ffcaf55d151d87f8dc60d16388b8f4557a2.tar.bz2
ayatana-indicator-sound-6b0f3ffcaf55d151d87f8dc60d16388b8f4557a2.zip
applied Mikkel's suggestions
Diffstat (limited to 'src')
-rw-r--r--src/playlists-menu-item.vala5
-rw-r--r--src/sound-service-dbus.c2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala
index 9dcb686..b3fd7c6 100644
--- a/src/playlists-menu-item.vala
+++ b/src/playlists-menu-item.vala
@@ -84,10 +84,7 @@ public class PlaylistsMenuitem : PlayerItem
private string? parse_icon_path (string path)
{
- if (path == "")return null;
- var icon_file = File.new_for_path (path);
- if (icon_file.get_path() == null)return null;
- return icon_file.get_basename().split(".")[0];
+ return ( path == "" ? null : Path.get_basename(path).split(".")[0] );
}
public void update_individual_playlist (PlaylistDetails new_detail)
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 580304f..9e5cffe 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -148,7 +148,7 @@ sound_service_dbus_create_root_item (SoundServiceDbus* self)
priv->root_menuitem = dbusmenu_menuitem_new();
g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH);
- gchar* paths[] = {"/usr/share/banshee-1/icons", NULL};
+ const gchar* paths[] = {"/usr/share/banshee-1/icons", NULL};
dbusmenu_server_set_icon_paths (server,
paths);
dbusmenu_server_set_root (server, priv->root_menuitem);