aboutsummaryrefslogtreecommitdiff
path: root/src/title-menu-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/title-menu-item.c')
-rw-r--r--src/title-menu-item.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/title-menu-item.c b/src/title-menu-item.c
index 5e4ee1c..19df676 100644
--- a/src/title-menu-item.c
+++ b/src/title-menu-item.c
@@ -27,6 +27,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
#include <common-defs.h>
+#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
@@ -127,7 +128,7 @@ enum {
GType player_controller_get_type (void) G_GNUC_CONST;
TitleMenuitem* title_menuitem_new (PlayerController* parent);
TitleMenuitem* title_menuitem_construct (GType object_type, PlayerController* parent);
-const gchar* player_controller_get_name (PlayerController* self);
+GAppInfo* player_controller_get_app_info (PlayerController* self);
const gchar* player_controller_get_icon_name (PlayerController* self);
static void title_menuitem_real_handle_event (DbusmenuMenuitem* base, const gchar* name, GValue* input_value, guint timestamp);
PlayerController* player_item_get_owner (PlayerItem* self);
@@ -141,15 +142,14 @@ GeeHashSet* title_menuitem_attributes_format (void);
TitleMenuitem* title_menuitem_construct (GType object_type, PlayerController* parent) {
TitleMenuitem * self = NULL;
- const gchar* _tmp0_ = NULL;
+ GAppInfo* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
g_return_val_if_fail (parent != NULL, NULL);
self = (TitleMenuitem*) g_object_new (object_type, "item-type", DBUSMENU_TITLE_MENUITEM_TYPE, "owner", parent, NULL);
- _tmp0_ = player_controller_get_name (parent);
- dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_NAME, _tmp0_);
- _tmp1_ = player_controller_get_icon_name (parent);
- g_debug ("title-menu-item.vala:30: title init - icon name = %s", _tmp1_);
+ _tmp0_ = player_controller_get_app_info (parent);
+ _tmp1_ = g_app_info_get_name (_tmp0_);
+ dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_NAME, _tmp1_);
_tmp2_ = player_controller_get_icon_name (parent);
dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_ICON, _tmp2_);
dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_RUNNING, FALSE);