diff options
-rw-r--r-- | src/indicator-sound.c | 48 | ||||
-rw-r--r-- | src/metadata-widget.c | 82 | ||||
-rw-r--r-- | src/transport-widget.c | 74 | ||||
-rw-r--r-- | src/volume-widget.c | 10 |
4 files changed, 113 insertions, 101 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 35045d7..ecf62a8 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -198,8 +198,8 @@ get_icon (IndicatorObject * io) { gchar* current_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(current_state)); - g_debug("At start-up attempting to set the image to %s", - current_name); + //g_debug("At start-up attempting to set the image to %s", + // current_name); speaker_image = indicator_image_helper(current_name); gtk_widget_show(GTK_WIDGET(speaker_image)); return speaker_image; @@ -238,7 +238,7 @@ free_the_animation_list() static gboolean new_transport_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client) { - g_debug("indicator-sound: new_transport_bar() called "); + //g_debug("indicator-sound: new_transport_bar() called "); GtkWidget* bar = NULL; @@ -257,7 +257,7 @@ new_transport_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbus static gboolean new_metadata_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client) { - g_debug("indicator-sound: new_metadata_widget"); + //g_debug("indicator-sound: new_metadata_widget"); GtkWidget* metadata = NULL; @@ -276,11 +276,11 @@ new_metadata_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm static gboolean new_title_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client) { - g_debug("indicator-sound: new_title_widget"); + //g_debug("indicator-sound: new_title_widget"); 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)); + //g_debug ("%s (\"%s\")", __func__, dbusmenu_menuitem_property_get(newitem, DBUSMENU_TITLE_MENUITEM_NAME)); GtkWidget* title = NULL; @@ -298,7 +298,7 @@ new_title_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusmenu static gboolean new_volume_slider_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client) { - g_debug("indicator-sound: new_volume_slider_widget"); + //g_debug("indicator-sound: new_volume_slider_widget"); GtkWidget* volume_widget = NULL; IndicatorObject *io = NULL; @@ -352,7 +352,7 @@ connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer u g_warning("Unable to get status proxy: %s", error->message); g_error_free(error); } - g_debug("about to connect to the signals"); + //g_debug("about to connect to the signals"); dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_INPUT_WHILE_MUTED, G_TYPE_BOOLEAN, G_TYPE_INVALID); dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_SINK_INPUT_WHILE_MUTED, G_CALLBACK(catch_signal_sink_input_while_muted), NULL, NULL); dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_MUTE_UPDATE, G_TYPE_BOOLEAN, G_TYPE_INVALID); @@ -420,7 +420,7 @@ prepare_blocked_animation() GdkPixbuf* blocked_buf = gtk_image_get_pixbuf(temp_image); if (mute_buf == NULL || blocked_buf == NULL) { - g_debug("Don bother with the animation, the theme aint got the goods !"); + //g_debug("Don bother with the animation, the theme aint got the goods !"); return; } @@ -512,7 +512,7 @@ fade_back_to_mute_image() return TRUE; } else { animation_id = 0; - g_debug("exit from animation now\n"); + //g_debug("exit from animation now\n"); return FALSE; } } @@ -521,12 +521,12 @@ static void reset_mute_blocking_animation() { if (animation_id != 0) { - g_debug("about to remove the animation_id callback from the mainloop!!**"); + //g_debug("about to remove the animation_id callback from the mainloop!!**"); g_source_remove(animation_id); animation_id = 0; } if (blocked_id != 0) { - g_debug("about to remove the blocked_id callback from the mainloop!!**"); + //g_debug("about to remove the blocked_id callback from the mainloop!!**"); g_source_remove(blocked_id); blocked_id = 0; } @@ -555,7 +555,7 @@ fetch_sink_availability_from_dbus(IndicatorSound* self) device_available = *available_input; if (device_available == FALSE) { update_state(STATE_SINKS_NONE); - g_debug("NO DEVICE AVAILABLE"); + //g_debug("NO DEVICE AVAILABLE"); } IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(self); @@ -566,7 +566,7 @@ fetch_sink_availability_from_dbus(IndicatorSound* self) } g_free(available_input); - g_debug("IndicatorSound::fetch_sink_availability_from_dbus ->%i", device_available); + //g_debug("IndicatorSound::fetch_sink_availability_from_dbus ->%i", device_available); } @@ -587,7 +587,7 @@ fetch_mute_value_from_dbus() if (initial_mute == TRUE) update_state(STATE_MUTED); g_free(mute_input); - g_debug("at the indicator start up and the MUTE returned from dbus method is %i", initial_mute); + //g_debug("at the indicator start up and the MUTE returned from dbus method is %i", initial_mute); } /*******************************************************************/ @@ -596,7 +596,7 @@ fetch_mute_value_from_dbus() static void catch_signal_sink_input_while_muted(DBusGProxy * proxy, gboolean block_value, gpointer userdata) { - g_debug("signal caught - sink input while muted with value %i", block_value); + //g_debug("signal caught - sink input while muted with value %i", block_value); if (block_value == 1 && blocked_id == 0 && animation_id == 0 && blocked_animation_list != NULL) { gchar* image_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_MUTED_WHILE_INPUT)); indicator_image_helper_update(speaker_image, image_name); @@ -616,7 +616,7 @@ catch_signal_sink_mute_update(DBusGProxy *proxy, gboolean mute_value, gpointer u } else { reset_mute_blocking_animation(); } - g_debug("signal caught - sink mute update with mute value: %i", mute_value); + //g_debug("signal caught - sink mute update with mute value: %i", mute_value); g_return_if_fail(IS_INDICATOR_SOUND(userdata)); IndicatorSound* indicator = INDICATOR_SOUND(userdata); IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(indicator); @@ -636,7 +636,7 @@ catch_signal_sink_availability_update(DBusGProxy *proxy, gboolean available_valu if (device_available == FALSE) { update_state(STATE_SINKS_NONE); } - g_debug("signal caught - sink availability update with value: %i", available_value); + //g_debug("signal caught - sink availability update with value: %i", available_value); } /*******************************************************************/ @@ -701,7 +701,7 @@ key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data) } new_value = CLAMP(new_value, 0, 100); if (new_value != current_value && current_state != STATE_MUTED) { - g_debug("Attempting to set the range from the key listener to %f", new_value); + //g_debug("Attempting to set the range from the key listener to %f", new_value); volume_widget_update(VOLUME_WIDGET(priv->volume_widget), new_value); } } @@ -711,7 +711,7 @@ key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data) static void style_changed_cb(GtkWidget *widget, gpointer user_data) { - g_debug("Just caught a style change event"); + //g_debug("Just caught a style change event"); update_state(current_state); reset_mute_blocking_animation(); update_state(current_state); @@ -722,7 +722,7 @@ style_changed_cb(GtkWidget *widget, gpointer user_data) static void indicator_sound_scroll (IndicatorObject *io, gint delta, IndicatorScrollDirection direction) { - g_debug("indicator-sound-scroll - current slider value"); + //g_debug("indicator-sound-scroll - current slider value"); if (device_available == FALSE || current_state == STATE_MUTED) return; @@ -736,12 +736,12 @@ indicator_sound_scroll (IndicatorObject *io, gint delta, IndicatorScrollDirectio gdouble value = gtk_range_get_value(range); GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (slider)); - g_debug("indicator-sound-scroll - current slider value %f", value); + //g_debug("indicator-sound-scroll - current slider value %f", value); if (direction == INDICATOR_OBJECT_SCROLL_UP) { value += adj->step_increment; } else { value -= adj->step_increment; } - g_debug("indicator-sound-scroll - update slider with value %f", value); + //g_debug("indicator-sound-scroll - update slider with value %f", value); volume_widget_update(VOLUME_WIDGET(priv->volume_widget), value); -}
\ No newline at end of file +} diff --git a/src/metadata-widget.c b/src/metadata-widget.c index 64bce36..850e315 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -27,7 +27,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <gtk/gtk.h> #include <glib.h> -static DbusmenuMenuitem* twin_item; typedef struct _MetadataWidgetPrivate MetadataWidgetPrivate; @@ -40,7 +39,8 @@ struct _MetadataWidgetPrivate GString* old_image_path; GtkWidget* artist_label; GtkWidget* piece_label; - GtkWidget* container_label; + GtkWidget* container_label; + DbusmenuMenuitem* twin_item; }; #define METADATA_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), METADATA_WIDGET_TYPE, MetadataWidgetPrivate)) @@ -52,6 +52,7 @@ static void metadata_widget_dispose (GObject *object); static void metadata_widget_finalize (GObject *object); static gboolean metadata_image_expose (GtkWidget *image, GdkEventExpose *event, gpointer user_data); static void metadata_widget_set_style (GtkWidget* button, GtkStyle* style); +static void metadata_widget_set_twin_item (MetadataWidget* self, DbusmenuMenuitem* twin_item); // keyevent consumers static gboolean metadata_widget_button_press_event (GtkWidget *menuitem, @@ -88,7 +89,7 @@ metadata_widget_class_init (MetadataWidgetClass *klass) static void metadata_widget_init (MetadataWidget *self) { - g_debug("MetadataWidget::metadata_widget_init"); + //g_debug("MetadataWidget::metadata_widget_init"); MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(self); GtkWidget *hbox; @@ -98,9 +99,9 @@ metadata_widget_init (MetadataWidget *self) // image priv->album_art = gtk_image_new(); - priv->image_path = g_string_new(dbusmenu_menuitem_property_get(twin_item, DBUSMENU_METADATA_MENUITEM_ARTURL)); + priv->image_path = g_string_new(dbusmenu_menuitem_property_get(priv->twin_item, DBUSMENU_METADATA_MENUITEM_ARTURL)); priv->old_image_path = g_string_new(""); - g_debug("Metadata::At startup and image path = %s", priv->image_path->str); + //g_debug("Metadata::At startup and image path = %s", priv->image_path->str); g_signal_connect(priv->album_art, "expose-event", G_CALLBACK(metadata_image_expose), @@ -115,7 +116,7 @@ metadata_widget_init (MetadataWidget *self) // artist GtkWidget* artist; - artist = gtk_label_new(dbusmenu_menuitem_property_get(twin_item, + artist = gtk_label_new(dbusmenu_menuitem_property_get(priv->twin_item, DBUSMENU_METADATA_MENUITEM_ARTIST)); gtk_misc_set_alignment(GTK_MISC(artist), (gfloat)0, (gfloat)0); gtk_misc_set_padding (GTK_MISC(artist), (gfloat)10, (gfloat)0); @@ -126,8 +127,8 @@ metadata_widget_init (MetadataWidget *self) // title GtkWidget* piece; - piece = gtk_label_new(dbusmenu_menuitem_property_get(twin_item, - DBUSMENU_METADATA_MENUITEM_TITLE)); + piece = gtk_label_new(dbusmenu_menuitem_property_get( priv->twin_item, + DBUSMENU_METADATA_MENUITEM_TITLE) ); gtk_misc_set_alignment(GTK_MISC(piece), (gfloat)0, (gfloat)0); gtk_misc_set_padding (GTK_MISC(piece), (gfloat)10, (gfloat)0); gtk_label_set_width_chars(GTK_LABEL(piece), 15); @@ -137,8 +138,8 @@ metadata_widget_init (MetadataWidget *self) // container GtkWidget* container; - container = gtk_label_new(dbusmenu_menuitem_property_get(twin_item, - DBUSMENU_METADATA_MENUITEM_ALBUM)); + container = gtk_label_new(dbusmenu_menuitem_property_get( priv->twin_item, + DBUSMENU_METADATA_MENUITEM_ALBUM) ); gtk_misc_set_alignment(GTK_MISC(container), (gfloat)0, (gfloat)0); gtk_misc_set_padding (GTK_MISC(container), (gfloat)10, (gfloat)0); gtk_label_set_width_chars(GTK_LABEL(container), 15); @@ -152,8 +153,6 @@ metadata_widget_init (MetadataWidget *self) gtk_box_pack_start (GTK_BOX (priv->hbox), vbox, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(twin_item), "property-changed", - G_CALLBACK(metadata_widget_property_update), self); gtk_widget_show_all (priv->hbox); g_signal_connect(self, "style-set", G_CALLBACK(metadata_widget_set_style), GTK_WIDGET(self)); @@ -191,10 +190,10 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user priv->theme_change_occured = FALSE; GdkPixbuf* pixbuf; pixbuf = gdk_pixbuf_new_from_file(priv->image_path->str, NULL); - g_debug("metadata_load_new_image -> pixbuf from %s", - priv->image_path->str); + //g_debug("metadata_load_new_image -> pixbuf from %s", + // priv->image_path->str); if(GDK_IS_PIXBUF(pixbuf) == FALSE){ - g_debug("problem loading the downloaded image just use the placeholder instead"); + //g_debug("problem loading the downloaded image just use the placeholder instead"); draw_album_art_placeholder(metadata); return TRUE; } @@ -211,9 +210,9 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user return TRUE; } -static void draw_album_art_placeholder(GtkWidget *metadata) -{ - +static void +draw_album_art_placeholder(GtkWidget *metadata) +{ cairo_t *cr; cr = gdk_cairo_create (metadata->window); GtkStyle *style; @@ -286,20 +285,20 @@ metadata_widget_button_press_event (GtkWidget *menuitem, GdkEventButton *event) { GtkClipboard* board = gtk_clipboard_get (GDK_NONE); - gchar* title = g_strdup(dbusmenu_menuitem_property_get(twin_item, - DBUSMENU_METADATA_MENUITEM_TITLE)); - gchar* artist = g_strdup(dbusmenu_menuitem_property_get(twin_item, - DBUSMENU_METADATA_MENUITEM_ARTIST)); - gchar* album = g_strdup(dbusmenu_menuitem_property_get(twin_item, - DBUSMENU_METADATA_MENUITEM_ALBUM)); - gchar* contents = g_strdup_printf("artist: %s \ntitle: %s \nalbum: %s", artist, title, album); - g_debug("contents to be copied will be : %s", contents); + + MetadataWidgetPrivate* priv = METADATA_WIDGET_GET_PRIVATE(METADATA_WIDGET(menuitem)); + + gchar* contents = g_strdup_printf("artist: %s \ntitle: %s \nalbum: %s", + dbusmenu_menuitem_property_get(priv->twin_item, + DBUSMENU_METADATA_MENUITEM_ARTIST), + dbusmenu_menuitem_property_get(priv->twin_item, + DBUSMENU_METADATA_MENUITEM_TITLE), + dbusmenu_menuitem_property_get(priv->twin_item, + DBUSMENU_METADATA_MENUITEM_ALBUM)); + //g_debug("contents to be copied will be : %s", contents); gtk_clipboard_set_text (board, contents, -1); gtk_clipboard_store (board); g_free(contents); - g_free(title); - g_free(artist); - g_free(album); return FALSE; } @@ -311,7 +310,7 @@ metadata_widget_property_update(DbusmenuMenuitem* item, gchar* property, g_return_if_fail (IS_METADATA_WIDGET (userdata)); if(g_value_get_int(value) == DBUSMENU_PROPERTY_EMPTY){ - g_debug("Metadata widget: property update - reset"); + //g_debug("Metadata widget: property update - reset"); GValue new_value = {0}; g_value_init(&new_value, G_TYPE_STRING); g_value_set_string(&new_value, g_strdup("")); @@ -338,7 +337,7 @@ metadata_widget_property_update(DbusmenuMenuitem* item, gchar* property, g_string_overwrite(priv->image_path, 0, g_value_get_string (value)); // if its a remote image queue a redraw incase the download took too long if (g_str_has_prefix(g_value_get_string (value), g_get_user_cache_dir())){ - g_debug("the image update is a download so redraw"); + //g_debug("the image update is a download so redraw"); gtk_widget_queue_draw(GTK_WIDGET(mitem)); } } @@ -488,7 +487,6 @@ image_set_from_pixbuf (GtkWidget *widget, cairo_destroy (cr); } -// TODO refactor next 3 methods into one once the style has been static void metadata_widget_style_labels(MetadataWidget* self, GtkLabel* label) { @@ -507,9 +505,20 @@ metadata_widget_set_style(GtkWidget* metadata, GtkStyle* style) MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(widg); priv->theme_change_occured = TRUE; gtk_widget_queue_draw(GTK_WIDGET(metadata)); - g_debug("metadata_widget: theme change"); + //g_debug("metadata_widget: theme change"); } +static void +metadata_widget_set_twin_item(MetadataWidget* self, + DbusmenuMenuitem* twin_item) +{ + MetadataWidgetPrivate* priv = METADATA_WIDGET_GET_PRIVATE(self); + priv->twin_item = twin_item; + g_signal_connect(G_OBJECT(priv->twin_item), "property-changed", + G_CALLBACK(metadata_widget_property_update), self); +} + + /** * transport_new: * @returns: a new #MetadataWidget. @@ -517,7 +526,10 @@ metadata_widget_set_style(GtkWidget* metadata, GtkStyle* style) GtkWidget* metadata_widget_new(DbusmenuMenuitem *item) { - twin_item = item; - return g_object_new(METADATA_WIDGET_TYPE, NULL); + + GtkWidget* widget = g_object_new(METADATA_WIDGET_TYPE, NULL); + metadata_widget_set_twin_item ( METADATA_WIDGET(widget), + item ); + return widget; } diff --git a/src/transport-widget.c b/src/transport-widget.c index cb09f2c..e7f0b4d 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -77,7 +77,7 @@ struct _TransportWidgetPrivate TransportWidgetEvent current_command; TransportWidgetState current_state; GHashTable* command_coordinates; - DbusmenuMenuitem* twin_item; + DbusmenuMenuitem* twin_item; }; typedef struct @@ -234,14 +234,14 @@ 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); - } + 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 @@ -261,15 +261,15 @@ transport_widget_button_press_event (GtkWidget *menuitem, g_return_val_if_fail ( IS_TRANSPORT_WIDGET(menuitem), FALSE ); TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE ( TRANSPORT_WIDGET(menuitem) ); - TransportWidgetEvent result = transport_widget_determine_button_event ( TRANSPORT_WIDGET(menuitem), + TransportWidgetEvent result = transport_widget_determine_button_event ( TRANSPORT_WIDGET(menuitem), event); if(result != TRANSPORT_NADA){ - priv->current_command = result; - cairo_t *cr; - cr = gdk_cairo_create (menuitem->window); - draw ( menuitem, cr ); - cairo_destroy ( cr ); - } + priv->current_command = result; + cairo_t *cr; + cr = gdk_cairo_create (menuitem->window); + draw ( menuitem, cr ); + cairo_destroy ( cr ); + } return TRUE; } @@ -278,26 +278,26 @@ transport_widget_button_release_event (GtkWidget *menuitem, GdkEventButton *event) { //g_debug("TransportWidget::menu_release_event"); - g_return_val_if_fail(IS_TRANSPORT_WIDGET(menuitem), FALSE); - TransportWidget* transport = TRANSPORT_WIDGET(menuitem); - TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE ( transport ); - - TransportWidgetEvent result = transport_widget_determine_button_event ( transport, - event ); - if(result != TRANSPORT_NADA){ - GValue value = {0}; - g_value_init(&value, G_TYPE_INT); - //g_debug("TransportWidget::menu_press_event - going to send value %i", (int)result); - g_value_set_int(&value, (int)result); - dbusmenu_menuitem_handle_event ( priv->twin_item, - "Transport state change", - &value, - 0 ); - } - - transport_widget_react_to_button_release ( transport, - result ); - return TRUE; + g_return_val_if_fail(IS_TRANSPORT_WIDGET(menuitem), FALSE); + TransportWidget* transport = TRANSPORT_WIDGET(menuitem); + TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE ( transport ); + + TransportWidgetEvent result = transport_widget_determine_button_event ( transport, + event ); + if(result != TRANSPORT_NADA){ + GValue value = {0}; + g_value_init(&value, G_TYPE_INT); + //g_debug("TransportWidget::menu_press_event - going to send value %i", (int)result); + g_value_set_int(&value, (int)result); + dbusmenu_menuitem_handle_event ( priv->twin_item, + "Transport state change", + &value, + 0 ); + } + + transport_widget_react_to_button_release ( transport, + result ); + return TRUE; } static TransportWidgetEvent @@ -1264,7 +1264,8 @@ draw (GtkWidget* button, cairo_t *cr) } } -static void transport_widget_set_twin_item(TransportWidget* self, +static void +transport_widget_set_twin_item(TransportWidget* self, DbusmenuMenuitem* twin_item) { TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE(self); @@ -1295,7 +1296,6 @@ transport_widget_property_update(DbusmenuMenuitem* item, gchar* property, } - /** * transport_widget_new: * @returns: a new #TransportWidget. diff --git a/src/volume-widget.c b/src/volume-widget.c index 1cfdcc4..6964741 100644 --- a/src/volume-widget.c +++ b/src/volume-widget.c @@ -76,7 +76,7 @@ volume_widget_class_init (VolumeWidgetClass *klass) static void volume_widget_init (VolumeWidget *self) { - g_debug("VolumeWidget::volume_widget_init"); + //g_debug("VolumeWidget::volume_widget_init"); VolumeWidgetPrivate * priv = VOLUME_WIDGET_GET_PRIVATE(self); priv->ido_volume_slider = ido_scale_menu_item_new_with_range ("VOLUME", IDO_RANGE_STYLE_DEFAULT, 0, 0, 100, 1); @@ -128,13 +128,13 @@ volume_widget_property_update(DbusmenuMenuitem* item, gchar* property, g_return_if_fail (IS_VOLUME_WIDGET (userdata)); VolumeWidget* mitem = VOLUME_WIDGET(userdata); VolumeWidgetPrivate * priv = VOLUME_WIDGET_GET_PRIVATE(mitem); - g_debug("scrub-widget::property_update for prop %s", property); + //g_debug("scrub-widget::property_update for prop %s", property); if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_LEVEL, property) == 0){ if(priv->grabbed == FALSE){ GtkWidget *slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)priv->ido_volume_slider); GtkRange *range = (GtkRange*)slider; gdouble update = g_value_get_double (value); - g_debug("volume-widget - update level with value %f", update); + //g_debug("volume-widget - update level with value %f", update); gtk_range_set_value(range, update); determine_state_from_volume(update); } @@ -152,7 +152,7 @@ volume_widget_set_twin_item(VolumeWidget* self, G_CALLBACK(volume_widget_property_update), self); gdouble initial_level = g_value_get_double (dbusmenu_menuitem_property_get_value(twin_item, DBUSMENU_VOLUME_MENUITEM_LEVEL)); - g_debug("volume_widget_set_twin_item initial level = %f", initial_level); + //g_debug("volume_widget_set_twin_item initial level = %f", initial_level); GtkWidget *slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)priv->ido_volume_slider); GtkRange *range = (GtkRange*)slider; gtk_range_set_value(range, initial_level); @@ -214,7 +214,7 @@ volume_widget_parent_changed (GtkWidget *widget, gpointer user_data) { gtk_widget_set_size_request (widget, 200, -1); - g_debug("volume_widget_parent_changed"); + //g_debug("volume_widget_parent_changed"); } static void |