aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-06-16 21:21:25 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-06-16 21:21:25 -0400
commitb004f06319c37e63adee52cff5a6258e900ad8a2 (patch)
treec59b4b428d751a13d74aab9872c4cddb811d3e9d /src/indicator-sound.c
parent82a0655d82f040a729b225335b99fafba2786668 (diff)
parent808a7108ec6c8cca9423b25269c846b5c6e2461d (diff)
downloadayatana-indicator-sound-b004f06319c37e63adee52cff5a6258e900ad8a2.tar.gz
ayatana-indicator-sound-b004f06319c37e63adee52cff5a6258e900ad8a2.tar.bz2
ayatana-indicator-sound-b004f06319c37e63adee52cff5a6258e900ad8a2.zip
Import upstream version 0.7.1
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 5002463..f2ec0a2 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -31,7 +31,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "indicator-sound.h"
#include "transport-widget.h"
#include "metadata-widget.h"
-#include "title-widget.h"
#include "volume-widget.h"
#include "voip-input-widget.h"
#include "dbus-shared-names.h"
@@ -94,10 +93,6 @@ static gboolean new_metadata_widget (DbusmenuMenuitem * newitem,
DbusmenuMenuitem * parent,
DbusmenuClient * client,
gpointer user_data);
-static gboolean new_title_widget (DbusmenuMenuitem * newitem,
- DbusmenuMenuitem * parent,
- DbusmenuClient * client,
- gpointer user_data);
// DBUS communication
static GDBusNodeInfo *node_info = NULL;
@@ -208,9 +203,6 @@ get_menu (IndicatorObject * io)
dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client),
DBUSMENU_METADATA_MENUITEM_TYPE,
new_metadata_widget);
- dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client),
- DBUSMENU_TITLE_MENUITEM_TYPE,
- new_title_widget);
// Note: Not ideal but all key handling needs to be managed here and then
// delegated to the appropriate widget.
g_signal_connect (menu, "key-press-event", G_CALLBACK(key_press_cb), io);
@@ -360,36 +352,19 @@ new_metadata_widget (DbusmenuMenuitem * newitem,
g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE);
g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE);
+
metadata = metadata_widget_new (newitem);
+
+ g_debug ("%s (\"%s\")", __func__,
+ dbusmenu_menuitem_property_get(newitem, DBUSMENU_METADATA_MENUITEM_PLAYER_NAME));
+
GtkMenuItem *menu_metadata_widget = GTK_MENU_ITEM(metadata);
gtk_widget_show_all(metadata);
dbusmenu_gtkclient_newitem_base (DBUSMENU_GTKCLIENT(client),
- newitem, menu_metadata_widget, parent);
- return TRUE;
-}
-
-static gboolean
-new_title_widget(DbusmenuMenuitem * newitem,
- DbusmenuMenuitem * parent,
- DbusmenuClient * client,
- gpointer user_data)
-{
- g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE);
- g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE);
-
- g_debug ("%s (\"%s\")", __func__, dbusmenu_menuitem_property_get(newitem, DBUSMENU_TITLE_MENUITEM_NAME));
-
- GtkWidget* title = NULL;
-
- title = title_widget_new (newitem);
- GtkMenuItem *menu_title_widget = GTK_MENU_ITEM(title);
-
- gtk_widget_show_all(title);
-
- dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client),
- newitem,
- menu_title_widget, parent);
+ newitem,
+ menu_metadata_widget,
+ parent);
return TRUE;
}