aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac4
-rw-r--r--src/play-button.c3
-rw-r--r--src/transport-widget.c45
4 files changed, 58 insertions, 14 deletions
diff --git a/configure b/configure
index 8d1905a..c675b9f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for indicator-sound 0.4.6.
+# Generated by GNU Autoconf 2.67 for indicator-sound 0.4.7.
#
# Report bugs to <conor.curran@canonical.com>.
#
@@ -761,8 +761,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='indicator-sound'
PACKAGE_TARNAME='indicator-sound'
-PACKAGE_VERSION='0.4.6'
-PACKAGE_STRING='indicator-sound 0.4.6'
+PACKAGE_VERSION='0.4.7'
+PACKAGE_STRING='indicator-sound 0.4.7'
PACKAGE_BUGREPORT='conor.curran@canonical.com'
PACKAGE_URL=''
@@ -1560,7 +1560,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures indicator-sound 0.4.6 to adapt to many kinds of systems.
+\`configure' configures indicator-sound 0.4.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1630,7 +1630,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of indicator-sound 0.4.6:";;
+ short | recursive ) echo "Configuration of indicator-sound 0.4.7:";;
esac
cat <<\_ACEOF
@@ -1761,7 +1761,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-indicator-sound configure 0.4.6
+indicator-sound configure 0.4.7
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2130,7 +2130,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by indicator-sound $as_me 0.4.6, which was
+It was created by indicator-sound $as_me 0.4.7, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2950,7 +2950,7 @@ fi
# Define the identity of the package.
PACKAGE=indicator-sound
- VERSION=0.4.6
+ VERSION=0.4.7
cat >>confdefs.h <<_ACEOF
@@ -14081,7 +14081,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by indicator-sound $as_me 0.4.6, which was
+This file was extended by indicator-sound $as_me 0.4.7, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14147,7 +14147,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-indicator-sound config.status 0.4.6
+indicator-sound config.status 0.4.7
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index b4a9e91..19000bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
-AC_INIT(indicator-sound, 0.4.6, conor.curran@canonical.com)
+AC_INIT(indicator-sound, 0.4.7, conor.curran@canonical.com)
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-sound, 0.4.6)
+AM_INIT_AUTOMAKE(indicator-sound, 0.4.7)
AM_MAINTAINER_MODE
diff --git a/src/play-button.c b/src/play-button.c
index 2ab5fc8..5e8a90d 100644
--- a/src/play-button.c
+++ b/src/play-button.c
@@ -99,6 +99,7 @@ static void play_button_dispose (GObject *object);
static void play_button_finalize (GObject *object);
static gboolean play_button_expose (GtkWidget *button, GdkEventExpose *event);
+
static void draw (GtkWidget* button, cairo_t *cr);
G_DEFINE_TYPE (PlayButton, play_button, GTK_TYPE_DRAWING_AREA);
@@ -370,6 +371,7 @@ play_button_init (PlayButton *self)
next_list);
gtk_widget_set_size_request(GTK_WIDGET(self), 200, 50);
+
}
static void
@@ -395,6 +397,7 @@ play_button_expose (GtkWidget *button, GdkEventExpose *event)
event->area.width, event->area.height);
cairo_clip(cr);
+
draw (button, cr);
cairo_destroy (cr);
return FALSE;
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 2dfcbef..eba2099 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -54,10 +54,15 @@ static gboolean transport_widget_button_press_event (GtkWidget *menuitem,
GdkEventButton *event);
static gboolean transport_widget_button_release_event (GtkWidget *menuitem,
GdkEventButton *event);
-static void transport_widget_property_update(DbusmenuMenuitem* item,
+static void transport_widget_property_update( DbusmenuMenuitem* item,
gchar * property,
GValue * value,
- gpointer userdata);
+ gpointer userdata );
+static void transport_widget_menu_hidden ( GtkWidget *menu,
+ TransportWidget *transport);
+static void transport_widget_notify ( TransportWidget *item,
+ GParamSpec *pspec,
+ gpointer user_data );
G_DEFINE_TYPE (TransportWidget, transport_widget, GTK_TYPE_MENU_ITEM);
@@ -100,6 +105,11 @@ transport_widget_init (TransportWidget *self)
gtk_container_add (GTK_CONTAINER (self), priv->hbox);
gtk_widget_show_all (priv->hbox);
+
+ g_signal_connect (G_OBJECT(self),
+ "notify",
+ G_CALLBACK (transport_widget_notify),
+ NULL);
}
static void
@@ -129,6 +139,37 @@ static void transport_widget_set_twin_item(TransportWidget* self,
G_CALLBACK(transport_widget_property_update), self);
}
+static void
+transport_widget_notify (TransportWidget *item,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+
+ if (g_strcmp0 (pspec->name, "parent"))
+ {
+ GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (item));
+
+ if (parent)
+ {
+ g_signal_connect (parent, "hide",
+ G_CALLBACK (transport_widget_menu_hidden),
+ item);
+ }
+ }
+}
+
+static void
+transport_widget_menu_hidden ( GtkWidget *menu,
+ TransportWidget *transport)
+{
+ g_debug("Transport Widget's menu hidden method called");
+ g_return_if_fail(IS_TRANSPORT_WIDGET(transport));
+ TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(TRANSPORT_WIDGET(transport));
+ play_button_react_to_button_release(priv->play_button, TRANSPORT_NADA);
+
+}
+
+
/* keyevents */
static gboolean
transport_widget_button_press_event (GtkWidget *menuitem,