[Xfce4-commits] Refactor the handling of minimum volumes
Updating branch refs/heads/master to 10d82e6eb52dd4f27db48386bf208c2157bc9e3d (commit) from d87694483f47d69bd52320b125e5db85f9481cd4 (commit) commit 10d82e6eb52dd4f27db48386bf208c2157bc9e3d Author: Guido Berhoerster Date: Wed Dec 26 18:57:53 2012 +0100 Refactor the handling of minimum volumes Move the logic that automatically mutes a track when the volume reaches the minimun and unmutes a track when the volume is raised from the minimum from the volume button widget into the plugin code. panel-plugin/xfce-mixer-plugin.c | 22 ++ panel-plugin/xfce-volume-button.c | 24 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 7600cb2..5562e80 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -864,18 +864,32 @@ static void xfce_mixer_plugin_button_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble button_volume) { - gint volume; + gint old_volume; + gint new_volume; g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin->card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin->track)); + old_volume = xfce_mixer_plugin_get_volume (mixer_plugin); /* Convert relative to absolute volume */ - volume = (gint) round (mixer_plugin->track->min_volume + (button_volume * (mixer_plugin->track->max_volume - mixer_plugin->track->min_volume))); + new_volume = (gint) round (mixer_plugin->track->min_volume + (button_volume * (mixer_plugin->track->max_volume - mixer_plugin->track->min_volume))); - xfce_mixer_debug ("button emitted 'volume-changed', new volume is %d (%d%%)", volume, (gint) round (button_volume * 100)); + xfce_mixer_debug ("button emitted 'volume-changed', new volume is %d (%d%%)", new_volume, (gint) round (button_volume * 100)); - xfce_mixer_plugin_set_volume (mixer_plugin, volume); + xfce_mixer_plugin_set_volume (mixer_plugin, new_volume); + + /* Mute when volume reaches the minimum, unmute if volume is raised from the minimum */ + if (old_volume > mixer_plugin->track->min_volume && new_volume == mixer_plugin->track->min_volume) +{ + xfce_mixer_plugin_set_muted (mixer_plugin, TRUE); + xfce_mixer_plugin_update_muted (mixer_plugin, TRUE); +} + else if (old_volume == mixer_plugin->track->min_volume && new_volume > mixer_plugin->track->min_volume) +{ + xfce_mixer_plugin_set_muted (mixer_plugin, FALSE); + xfce_mixer_plugin_update_muted (mixer_plugin, FALSE); +} } diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index 223701b..6877614 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -459,16 +459,8 @@ xfce_volume_button_scale_changed_value (XfceVolumeButton *button, if (fabs (new_value - old_value) > VOLUME_EPSILON) { - /* Mute when volume reaches 0%, unmute if volume is raised from 0% */ - if (new_value < VOLUME_EPSILON && !button->is_muted && !button->no_mute) -xfce_volume_button_set_muted (button, TRUE); - else if (old_value < VOLUME_EPSILON && button->is_muted && !button->no_mute) -xfce_volume_button_set_muted (button, FALSE); - else -{ - /* Update the state of the button */ - xfce_volume_button_update (button); -} + /* Update the state of the button */ + xfce_volume_button_update (button); /* Notify listeners of the new volume */ g_signal_emit_by_name (button, "volume-changed", new_value); @@ -789,16 +781,8 @@ xfce_volume_button_scroll_event (GtkWidget *widget, new_value = gtk_adjustment_get_value (GTK_ADJUSTMENT (button->adjustment)); if (fabs (new_value - old_value) > VOLUME_EPSILON) { - /* Mute when volume reaches 0%, unmute if volume is raised from 0% */ - if (new_value < VOLUME_EPSILON && !button->is_muted && !button->no_mute) -xfce_volume_button_set_muted (button, TRUE); - else if (old_value < VOLUME_EPSILON && button->is_muted && !button->no_mute) -xfce_volume_button_set_muted (button, FALSE); - else -{ - /* Update the state of the button */ - xfce_volume_button_update (button); -} + /* Update the state of the button */ + xfce_volume_button_update (button); /* Notify listeners of the new volume */ g_signal_emit_by_name (button, "volume-changed", new_value); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Do not assume a minimum volume of 0 in the keyboard shortcut handling
Updating branch refs/heads/master to d87694483f47d69bd52320b125e5db85f9481cd4 (commit) from 2a898d0ed8474a8258be4f9d384575d84b412474 (commit) commit d87694483f47d69bd52320b125e5db85f9481cd4 Author: Guido Berhoerster Date: Wed Dec 26 18:40:23 2012 +0100 Do not assume a minimum volume of 0 in the keyboard shortcut handling panel-plugin/xfce-mixer-plugin.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index bc3f353..7600cb2 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -1076,13 +1076,13 @@ xfce_mixer_plugin_volume_key_pressed (const char *keystring, xfce_mixer_plugin_set_volume (mixer_plugin, new_volume); xfce_mixer_plugin_update_volume (mixer_plugin, new_volume); - /* Mute when volume reaches 0%, unmute if volume is raised from 0% */ - if (old_volume > 0 && new_volume == 0) + /* Mute when volume reaches the minimum, unmute if volume is raised from the minimum */ + if (old_volume > mixer_plugin->track->min_volume && new_volume == mixer_plugin->track->min_volume) { xfce_mixer_plugin_set_muted (mixer_plugin, TRUE); xfce_mixer_plugin_update_muted (mixer_plugin, TRUE); } - else if (old_volume == 0 && new_volume > 0) + else if (old_volume == mixer_plugin->track->min_volume && new_volume > mixer_plugin->track->min_volume) { xfce_mixer_plugin_set_muted (mixer_plugin, FALSE); xfce_mixer_plugin_update_muted (mixer_plugin, FALSE); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Correct debugging instructions
Updating branch refs/heads/master to 2a898d0ed8474a8258be4f9d384575d84b412474 (commit) from 1f1226f034b4f6e541df01afec8d8ceb1e56f9fb (commit) commit 2a898d0ed8474a8258be4f9d384575d84b412474 Author: Guido Berhoerster Date: Mon Dec 24 17:03:20 2012 +0100 Correct debugging instructions README |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 97c1a37..94a5fe2 100644 --- a/README +++ b/README @@ -44,8 +44,9 @@ which will print additional diagnostic output useful for bug reports. For xfce4-mixer it can be activated by specifying the --debug command line option, diagnostic messages will be printed to stderr. For the panel plugin, please follow the instructions at http://docs.xfce.org/xfce/xfce4-panel/debugging and -set the PANEL_DEBUG environment variable to "mixer", the disgnostic output can -then be found in the log file corresponding to the plugin. +set the PANEL_DEBUG environment variable to "xfce4-mixer-plugin,gdb", the +diagnostic output will be printed to stderr and backtraces will appear in the +log file corresponding to the plugin. Known Problems with GStreamer ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Avoid unused variable warning when buildwing without keybinder (bug #9544)
Updating branch refs/heads/master to 1f1226f034b4f6e541df01afec8d8ceb1e56f9fb (commit) from 807367beb9e36d0f63af4bb0d2246c085b971121 (commit) commit 1f1226f034b4f6e541df01afec8d8ceb1e56f9fb Author: Guido Berhoerster Date: Sat Dec 22 11:34:46 2012 +0100 Avoid unused variable warning when buildwing without keybinder (bug #9544) panel-plugin/xfce-mixer-plugin.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index f34a252..bc3f353 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -363,7 +363,9 @@ xfce_mixer_plugin_set_property (GObject *object, gchar *track_label = NULL; GstMixerTrack *track = NULL; XfceMixerTrackType track_type = G_TYPE_INVALID; +#ifdef HAVE_KEYBINDER gbooleanenable_keyboard_shortcuts; +#endif switch(prop_id) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Move the XFCE_MIXER_PLUGIN_DEFAULT_COMMAND macro to where it is used
Updating branch refs/heads/master to 4231c6afe0f7ac4f293176fafd7011fd2b82cec3 (commit) from cf9140afb33b162d15b72ea7bbdfb8a4734fe4f5 (commit) commit 4231c6afe0f7ac4f293176fafd7011fd2b82cec3 Author: Guido Berhoerster Date: Sat Oct 27 12:16:02 2012 +0200 Move the XFCE_MIXER_PLUGIN_DEFAULT_COMMAND macro to where it is used panel-plugin/xfce-mixer-plugin.c |2 ++ panel-plugin/xfce-plugin-dialog.h |2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 2270b4f..f34a252 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -63,6 +63,8 @@ enum +#define XFCE_MIXER_PLUGIN_DEFAULT_COMMAND "xfce4-mixer" + #ifdef HAVE_KEYBINDER #define XFCE_MIXER_PLUGIN_RAISE_VOLUME_KEY "XF86AudioRaiseVolume" #define XFCE_MIXER_PLUGIN_LOWER_VOLUME_KEY "XF86AudioLowerVolume" diff --git a/panel-plugin/xfce-plugin-dialog.h b/panel-plugin/xfce-plugin-dialog.h index 890fe3f..11c0210 100644 --- a/panel-plugin/xfce-plugin-dialog.h +++ b/panel-plugin/xfce-plugin-dialog.h @@ -39,8 +39,6 @@ typedef struct _XfcePluginDialog XfcePluginDialog; #define IS_XFCE_PLUGIN_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_XFCE_PLUGIN_DIALOG)) #define XFCE_PLUGIN_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_XFCE_PLUGIN_DIALOG, XfcePluginDialogClass)) -#define XFCE_MIXER_PLUGIN_DEFAULT_COMMAND "xfce4-mixer" - GType xfce_plugin_dialog_get_type (void) G_GNUC_CONST; GtkWidget *xfce_plugin_dialog_new (XfcePanelPlugin *plugin); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Extend documentation in README
Updating branch refs/heads/master to cf9140afb33b162d15b72ea7bbdfb8a4734fe4f5 (commit) from f69b93cd4d4ce70366b9096486ba79c15993e16e (commit) commit cf9140afb33b162d15b72ea7bbdfb8a4734fe4f5 Author: Guido Berhoerster Date: Sat Oct 27 12:11:53 2012 +0200 Extend documentation in README Add information about optional support for keyboard shortcuts via libkeybinder. Document Xfconf configuration. README | 43 --- 1 files changed, 36 insertions(+), 7 deletions(-) diff --git a/README b/README index 48756f0..97c1a37 100644 --- a/README +++ b/README @@ -1,9 +1,39 @@ xfce4-mixer Information === -This package contains a volume control application based on GStreamer -0.10 written to conceptually fit into the Xfce desktop environment. It -includes a plugin for the Xfce panel. +This package contains a volume control application based on GStreamer written +to conceptually fit into the Xfce desktop environment. It includes a plugin for +the Xfce panel. + + +Keyboard Shortcuts +-- + +The panel plugin optionally supports global keyboard shortcuts for raising and +lowering the volume, as well as muting the selected track if compiled against +libkeybinder. The plugin will then handle the XF86AudioRaiseVolume, +XF86AudioLowerVolume, and XF86AudioMute keyboard symbols. + + +Xfconf Configuration + + +The mixer application supports the following properties in the xfce4-mixer +channel: + +/window-width width of the main window (integer) +/window-height height of the main window width (integer) +/sound-card selected sound card (string) +/sound-cards/* visible controls of a particular sound card (array +of strings) + +The panel plugin supports the following properties: + +sound-card selected sound card (string) +track selected track (sting) +command command which can be run from the plugin menu +(string) +enable-keyboard-shortcuts enables or disables keyboard shortcuts (boolean) Debugging @@ -22,8 +52,7 @@ Known Problems with GStreamer - * No sound card detected: if this happens you're probably missing a -GStreamer plugin for your sound system. If you get this message on a -Debian or Ubuntu system and you're using ALSA then installing -gstreamer0.10-alsa should fix it. On OpenBSD installing -gst-plugins-good might help. +GStreamer plugin for your sound system. If you get this message on a Debian +or Ubuntu system and you're using ALSA then installing gstreamer0.10-alsa +should fix it. On OpenBSD installing gst-plugins-good might help. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix mnemonics in the plugin menu that conflict with those of default menu items (bug #9339)
Updating branch refs/heads/master to 34e0d0d10a3a1fafdbcb3853355ccac76c6460bd (commit) from 56f0897a397b26a45e21fbaa3e0c758ed180e7a5 (commit) commit 34e0d0d10a3a1fafdbcb3853355ccac76c6460bd Author: Guido Berhoerster Date: Sat Oct 27 11:12:29 2012 +0200 Fix mnemonics in the plugin menu that conflict with those of default menu items (bug #9339) panel-plugin/xfce-mixer-plugin.c |4 ++-- po/am.po |4 ++-- po/ar.po |4 ++-- po/ast.po|4 ++-- po/bg.po |4 ++-- po/ca.po |4 ++-- po/cs.po |4 ++-- po/da.po |4 ++-- po/de.po |4 ++-- po/el.po |4 ++-- po/en_GB.po |4 ++-- po/es.po |4 ++-- po/eu.po |4 ++-- po/fi.po |4 ++-- po/fr.po |4 ++-- po/gl.po |4 ++-- po/he.po |4 ++-- po/hr.po |4 ++-- po/hu.po |4 ++-- po/id.po |4 ++-- po/is.po |4 ++-- po/it.po |4 ++-- po/ja.po |4 ++-- po/kk.po |4 ++-- po/ko.po |4 ++-- po/lt.po |4 ++-- po/lv.po |4 ++-- po/nb.po |4 ++-- po/nl.po |4 ++-- po/nn.po |4 ++-- po/pl.po |4 ++-- po/pt.po |4 ++-- po/pt_BR.po |4 ++-- po/ro.po |4 ++-- po/ru.po |4 ++-- po/si.po |4 ++-- po/sk.po |4 ++-- po/sr.po |4 ++-- po/sv.po |4 ++-- po/tr.po |4 ++-- po/ug.po |4 ++-- po/uk.po |4 ++-- po/ur.po |4 ++-- po/ur_PK.po |4 ++-- po/vi.po |4 ++-- po/xfce4-mixer.pot |4 ++-- po/zh_CN.po |4 ++-- po/zh_TW.po |4 ++-- 48 files changed, 96 insertions(+), 96 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index ef2720d..2270b4f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -303,7 +303,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); /* Add menu item for muting */ - mixer_plugin->mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_("_Mute")); + mixer_plugin->mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_("Mu_te")); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (mixer_plugin->mute_menu_item)); g_signal_connect_swapped (G_OBJECT (mixer_plugin->mute_menu_item), "toggled", G_CALLBACK (xfce_mixer_plugin_mute_item_toggled), mixer_plugin); gtk_widget_show (mixer_plugin->mute_menu_item); @@ -311,7 +311,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) /* Add menu item for running the user-defined command */ command_image = gtk_image_new_from_icon_name ("multimedia-volume-control", GTK_ICON_SIZE_MENU); gtk_widget_show (command_image); - command_menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Run Audio Mixer")); + command_menu_item = gtk_image_menu_item_new_with_mnemonic (_("Run Audio Mi_xer")); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (command_menu_item), command_image); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (command_menu_item)); g_signal_connect_swapped (G_OBJECT (command_menu_item), "activate", G_CALLBACK (xfce_mixer_plugin_command_item_activated), mixer_plugin); diff --git a/po/am.po b/po/am.po index e8049b3..adae584 100644 --- a/po/am.po +++ b/po/am.po @@ -18,11 +18,11 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306 -msgid "_Mute" +msgid "Mu_te" msgstr "" #: ../panel-plugin/xfce-mixer-plugin.c:314 -msgid "_Run Audio Mixer" +msgid "Run Audio Mi_xer" msgstr "" #: ../panel-plugin/xfce-mixer-plugin.c:581 ../xfce4-mixer/main.c:148 diff --git a/po/ar.po b/po/ar.po index 108864d..3621f3d 100644 --- a/po/ar.po +++ b/po/ar.po @@ -24,11 +24,11 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306
[Xfce4-commits] Rename variable which may shadow index(3) (bug #9374)
Updating branch refs/heads/master to f69b93cd4d4ce70366b9096486ba79c15993e16e (commit) from 34e0d0d10a3a1fafdbcb3853355ccac76c6460bd (commit) commit f69b93cd4d4ce70366b9096486ba79c15993e16e Author: Guido Berhoerster Date: Sat Oct 27 11:17:13 2012 +0200 Rename variable which may shadow index(3) (bug #9374) libxfce4mixer/libxfce4mixer.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 26683b8..99140a8 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -460,20 +460,20 @@ _xfce_mixer_add_track_labels (gpointer data, GstMixerTrack *track; gchar *label; gchar *xfce_mixer_label; - guint index; + guint track_index; for (iter = gst_mixer_list_tracks (mixer); iter != NULL; iter = g_list_next (iter)) { track = GST_MIXER_TRACK (iter->data); - g_object_get (track, "label", &label, "index", &index, NULL); + g_object_get (track, "label", &label, "index", &track_index, NULL); /* * Build display label including the index if there are mutiple tracks of * the same name */ - if (index > 0) -xfce_mixer_label = g_strdup_printf ("%s (%d)", label, index); + if (track_index > 0) +xfce_mixer_label = g_strdup_printf ("%s (%d)", label, track_index); else xfce_mixer_label = g_strdup (label); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Extend documentation in README
Updating branch refs/heads/xfce-4.10 to 77ddfcf9255f9c010aba72404c15772b313620ff (commit) from 9393482d5b4012f2277e87990a7f881178f29cab (commit) commit 77ddfcf9255f9c010aba72404c15772b313620ff Author: Guido Berhoerster Date: Sat Oct 27 12:11:53 2012 +0200 Extend documentation in README Add information about optional support for keyboard shortcuts via libkeybinder. Document Xfconf configuration. README | 43 --- 1 files changed, 36 insertions(+), 7 deletions(-) diff --git a/README b/README index 48756f0..97c1a37 100644 --- a/README +++ b/README @@ -1,9 +1,39 @@ xfce4-mixer Information === -This package contains a volume control application based on GStreamer -0.10 written to conceptually fit into the Xfce desktop environment. It -includes a plugin for the Xfce panel. +This package contains a volume control application based on GStreamer written +to conceptually fit into the Xfce desktop environment. It includes a plugin for +the Xfce panel. + + +Keyboard Shortcuts +-- + +The panel plugin optionally supports global keyboard shortcuts for raising and +lowering the volume, as well as muting the selected track if compiled against +libkeybinder. The plugin will then handle the XF86AudioRaiseVolume, +XF86AudioLowerVolume, and XF86AudioMute keyboard symbols. + + +Xfconf Configuration + + +The mixer application supports the following properties in the xfce4-mixer +channel: + +/window-width width of the main window (integer) +/window-height height of the main window width (integer) +/sound-card selected sound card (string) +/sound-cards/* visible controls of a particular sound card (array +of strings) + +The panel plugin supports the following properties: + +sound-card selected sound card (string) +track selected track (sting) +command command which can be run from the plugin menu +(string) +enable-keyboard-shortcuts enables or disables keyboard shortcuts (boolean) Debugging @@ -22,8 +52,7 @@ Known Problems with GStreamer - * No sound card detected: if this happens you're probably missing a -GStreamer plugin for your sound system. If you get this message on a -Debian or Ubuntu system and you're using ALSA then installing -gstreamer0.10-alsa should fix it. On OpenBSD installing -gst-plugins-good might help. +GStreamer plugin for your sound system. If you get this message on a Debian +or Ubuntu system and you're using ALSA then installing gstreamer0.10-alsa +should fix it. On OpenBSD installing gst-plugins-good might help. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix mnemonics in the plugin menu that conflict with those of default menu items (bug #9339)
Updating branch refs/heads/xfce-4.10 to fe5bee84ef4f84a446ad24a73a51308cd292f866 (commit) from 5225ebf3660a7c31242f03ee4fb29f377c69f52b (commit) commit fe5bee84ef4f84a446ad24a73a51308cd292f866 Author: Guido Berhoerster Date: Sat Oct 27 11:12:29 2012 +0200 Fix mnemonics in the plugin menu that conflict with those of default menu items (bug #9339) panel-plugin/xfce-mixer-plugin.c |4 ++-- po/am.po |4 ++-- po/ar.po |4 ++-- po/ast.po|4 ++-- po/bg.po |4 ++-- po/ca.po |4 ++-- po/cs.po |4 ++-- po/da.po |4 ++-- po/de.po |4 ++-- po/el.po |4 ++-- po/en_GB.po |4 ++-- po/es.po |4 ++-- po/eu.po |4 ++-- po/fi.po |4 ++-- po/fr.po |4 ++-- po/gl.po |4 ++-- po/he.po |4 ++-- po/hr.po |4 ++-- po/hu.po |4 ++-- po/id.po |4 ++-- po/is.po |4 ++-- po/it.po |4 ++-- po/ja.po |4 ++-- po/kk.po |4 ++-- po/ko.po |4 ++-- po/lt.po |4 ++-- po/lv.po |4 ++-- po/nb.po |4 ++-- po/nl.po |4 ++-- po/nn.po |4 ++-- po/pl.po |4 ++-- po/pt.po |4 ++-- po/pt_BR.po |4 ++-- po/ro.po |4 ++-- po/ru.po |4 ++-- po/si.po |4 ++-- po/sk.po |4 ++-- po/sr.po |4 ++-- po/sv.po |4 ++-- po/tr.po |4 ++-- po/ug.po |4 ++-- po/uk.po |4 ++-- po/ur.po |4 ++-- po/ur_PK.po |4 ++-- po/vi.po |4 ++-- po/xfce4-mixer.pot |4 ++-- po/zh_CN.po |4 ++-- po/zh_TW.po |4 ++-- 48 files changed, 96 insertions(+), 96 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index ef2720d..2270b4f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -303,7 +303,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); /* Add menu item for muting */ - mixer_plugin->mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_("_Mute")); + mixer_plugin->mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_("Mu_te")); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (mixer_plugin->mute_menu_item)); g_signal_connect_swapped (G_OBJECT (mixer_plugin->mute_menu_item), "toggled", G_CALLBACK (xfce_mixer_plugin_mute_item_toggled), mixer_plugin); gtk_widget_show (mixer_plugin->mute_menu_item); @@ -311,7 +311,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) /* Add menu item for running the user-defined command */ command_image = gtk_image_new_from_icon_name ("multimedia-volume-control", GTK_ICON_SIZE_MENU); gtk_widget_show (command_image); - command_menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Run Audio Mixer")); + command_menu_item = gtk_image_menu_item_new_with_mnemonic (_("Run Audio Mi_xer")); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (command_menu_item), command_image); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (command_menu_item)); g_signal_connect_swapped (G_OBJECT (command_menu_item), "activate", G_CALLBACK (xfce_mixer_plugin_command_item_activated), mixer_plugin); diff --git a/po/am.po b/po/am.po index e8049b3..adae584 100644 --- a/po/am.po +++ b/po/am.po @@ -18,11 +18,11 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306 -msgid "_Mute" +msgid "Mu_te" msgstr "" #: ../panel-plugin/xfce-mixer-plugin.c:314 -msgid "_Run Audio Mixer" +msgid "Run Audio Mi_xer" msgstr "" #: ../panel-plugin/xfce-mixer-plugin.c:581 ../xfce4-mixer/main.c:148 diff --git a/po/ar.po b/po/ar.po index 108864d..3621f3d 100644 --- a/po/ar.po +++ b/po/ar.po @@ -24,11 +24,11 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306
[Xfce4-commits] Rename variable which may shadow index(3) (bug #9374)
Updating branch refs/heads/xfce-4.10 to 9393482d5b4012f2277e87990a7f881178f29cab (commit) from fe5bee84ef4f84a446ad24a73a51308cd292f866 (commit) commit 9393482d5b4012f2277e87990a7f881178f29cab Author: Guido Berhoerster Date: Sat Oct 27 11:17:13 2012 +0200 Rename variable which may shadow index(3) (bug #9374) libxfce4mixer/libxfce4mixer.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 26683b8..99140a8 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -460,20 +460,20 @@ _xfce_mixer_add_track_labels (gpointer data, GstMixerTrack *track; gchar *label; gchar *xfce_mixer_label; - guint index; + guint track_index; for (iter = gst_mixer_list_tracks (mixer); iter != NULL; iter = g_list_next (iter)) { track = GST_MIXER_TRACK (iter->data); - g_object_get (track, "label", &label, "index", &index, NULL); + g_object_get (track, "label", &label, "index", &track_index, NULL); /* * Build display label including the index if there are mutiple tracks of * the same name */ - if (index > 0) -xfce_mixer_label = g_strdup_printf ("%s (%d)", label, index); + if (track_index > 0) +xfce_mixer_label = g_strdup_printf ("%s (%d)", label, track_index); else xfce_mixer_label = g_strdup (label); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Initialize window width and height to default values
Updating branch refs/heads/xfce-4.10 to 5225ebf3660a7c31242f03ee4fb29f377c69f52b (commit) from 7bf8b274e81e80fdcd958ed082950ff5ae418830 (commit) commit 5225ebf3660a7c31242f03ee4fb29f377c69f52b Author: Guido Berhoerster Date: Thu Oct 11 23:18:57 2012 +0200 Initialize window width and height to default values libxfce4mixer/xfce-mixer-preferences.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libxfce4mixer/xfce-mixer-preferences.c b/libxfce4mixer/xfce-mixer-preferences.c index 117ebcf..a5e5996 100644 --- a/libxfce4mixer/xfce-mixer-preferences.c +++ b/libxfce4mixer/xfce-mixer-preferences.c @@ -134,8 +134,8 @@ xfce_mixer_preferences_init (XfceMixerPreferences *preferences) { preferences->channel = xfconf_channel_get ("xfce4-mixer"); - preferences->window_width = 1; - preferences->window_height = 1; + preferences->window_width = 640; + preferences->window_height = 400; preferences->sound_card = NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Initialize window width and height to default values
Updating branch refs/heads/master to 56f0897a397b26a45e21fbaa3e0c758ed180e7a5 (commit) from 7bf8b274e81e80fdcd958ed082950ff5ae418830 (commit) commit 56f0897a397b26a45e21fbaa3e0c758ed180e7a5 Author: Guido Berhoerster Date: Thu Oct 11 23:18:57 2012 +0200 Initialize window width and height to default values libxfce4mixer/xfce-mixer-preferences.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libxfce4mixer/xfce-mixer-preferences.c b/libxfce4mixer/xfce-mixer-preferences.c index 117ebcf..a5e5996 100644 --- a/libxfce4mixer/xfce-mixer-preferences.c +++ b/libxfce4mixer/xfce-mixer-preferences.c @@ -134,8 +134,8 @@ xfce_mixer_preferences_init (XfceMixerPreferences *preferences) { preferences->channel = xfconf_channel_get ("xfce4-mixer"); - preferences->window_width = 1; - preferences->window_height = 1; + preferences->window_width = 640; + preferences->window_height = 400; preferences->sound_card = NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag xfce4-mixer-4.10.0
Updating annotated tag refs/tags/xfce4-mixer-4.10.0 as new annotated tag to 9def3165245d4c2670a8d922885d846bc8090b63 (tag) succeeds xfce4-mixer-4.9.0-18-g3c72b21 tagged by Guido Berhoerster on 2012-10-10 16:59 +0200 Guido Berhoerster (1): Release 4.10.0 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating branch xfce-4.10
Updating branch refs/heads/xfce-4.10 as new branch to 7bf8b274e81e80fdcd958ed082950ff5ae418830 (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/xfce-4.10 for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Post-release bump
Updating branch refs/heads/master to 7bf8b274e81e80fdcd958ed082950ff5ae418830 (commit) from b9bf9b56f9e02fa6e772dfce5cf161302d913ed6 (commit) commit 7bf8b274e81e80fdcd958ed082950ff5ae418830 Author: Guido Berhoerster Date: Wed Oct 10 16:59:59 2012 +0200 Post-release bump configure.ac.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 35a5689..51dd93e 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -26,7 +26,7 @@ m4_define([xfce4_mixer_version_minor], [10]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], []) +m4_define([xfce4_mixer_version_tag], [git]) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Release 4.10.0
Updating branch refs/heads/master to b9bf9b56f9e02fa6e772dfce5cf161302d913ed6 (commit) from 3c72b211a2c9222cee6dc6e998f63b443814030b (commit) commit b9bf9b56f9e02fa6e772dfce5cf161302d913ed6 Author: Guido Berhoerster Date: Wed Oct 10 16:59:35 2012 +0200 Release 4.10.0 NEWS|7 +++ configure.ac.in |4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 1c6733c..089cd47 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +4.10.0 +== +- Do not use G_VALUE_INIT which is only available in glib >= 2.30 +- Translation updates: Dutch (Flemish), Japanese, Croatian, Portuguese, Spanish + (Castilian), German, Indonesian, Ukrainian, Polish, Chinese (Taiwan) + + 4.9.0 = - Handle a negative minimal volume correctly. diff --git a/configure.ac.in b/configure.ac.in index 45fe951..35a5689 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -22,11 +22,11 @@ dnl *** dnl *** Version information *** dnl *** m4_define([xfce4_mixer_version_major], [4]) -m4_define([xfce4_mixer_version_minor], [9]) +m4_define([xfce4_mixer_version_minor], [10]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], [git]) +m4_define([xfce4_mixer_version_tag], []) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix broken Spanish translation
Updating branch refs/heads/master to 3c72b211a2c9222cee6dc6e998f63b443814030b (commit) from dc38f3c380ae300bbf2214baae54654c93f4b956 (commit) commit 3c72b211a2c9222cee6dc6e998f63b443814030b Author: Guido Berhoerster Date: Wed Oct 10 16:58:38 2012 +0200 Fix broken Spanish translation po/es.po |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/po/es.po b/po/es.po index 27a8b80..a33a5ca 100644 --- a/po/es.po +++ b/po/es.po @@ -114,7 +114,7 @@ msgstr "Mostrar versión y salir" #: ../xfce4-mixer/main.c:130 #, c-format msgid "xfce4-mixer: Failed to initialize xfconf: %s\n" -msgstr "xfce4-mixer: Fallo al inicializar xfconf: %s" +msgstr "xfce4-mixer: Fallo al inicializar xfconf: %s\n" #: ../xfce4-mixer/xfce-mixer-container.c:218 msgid "_Playback" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix typo in German translation
Updating branch refs/heads/master to 750822b39022f850c8618d7c0fde5636f7276a0b (commit) from 286e4a3568aff4f5775d7e0f6c9c1bcb4a6b7b02 (commit) commit 750822b39022f850c8618d7c0fde5636f7276a0b Author: Guido Berhoerster Date: Thu Oct 4 08:47:38 2012 +0200 Fix typo in German translation po/de.po |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/po/de.po b/po/de.po index 1969a80..ca70c7b 100644 --- a/po/de.po +++ b/po/de.po @@ -115,7 +115,7 @@ msgstr "Version anzeigen und Programm beenden" #: ../xfce4-mixer/main.c:130 #, c-format msgid "xfce4-mixer: Failed to initialize xfconf: %s\n" -msgstr "xfce4-mixer: Konnte xfconf nicht initialisieren: %s" +msgstr "xfce4-mixer: Konnte xfconf nicht initialisieren: %s\n" #: ../xfce4-mixer/xfce-mixer-container.c:218 msgid "_Playback" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Update Indonesian (id) translation
Updating branch refs/heads/master to 286e4a3568aff4f5775d7e0f6c9c1bcb4a6b7b02 (commit) from 2815cda6cf075e2871a89e33d0e067bcb78f873d (commit) commit 286e4a3568aff4f5775d7e0f6c9c1bcb4a6b7b02 Author: Guido Berhoerster Date: Wed Oct 3 23:24:44 2012 +0200 Update Indonesian (id) translation po/id.po | 164 +++-- 1 files changed, 41 insertions(+), 123 deletions(-) diff --git a/po/id.po b/po/id.po index 9259730..f3e5295 100644 --- a/po/id.po +++ b/po/id.po @@ -2,16 +2,17 @@ # Copyright (C) 2008 THE xfce4-mixer'S COPYRIGHT HOLDER # This file is distributed under the same license as the xfce package. # Andhika Padmawan , 2008. +# Guido Berhoerster , 2012. # msgid "" msgstr "" "Project-Id-Version: xfce4-mixer\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-09-29 13:30+\n" -"PO-Revision-Date: 2009-01-27 22:24+0700\n" -"Last-Translator: Andhika Padmawan \n" +"PO-Revision-Date: 2012-10-03 21:22+0200\n" +"Last-Translator: Guido Berhoerster \n" "Language-Team: \n" -"Language: \n" +"Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,24 +20,23 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306 msgid "_Mute" -msgstr "" +msgstr "_Bisu" #: ../panel-plugin/xfce-mixer-plugin.c:314 msgid "_Run Audio Mixer" -msgstr "" +msgstr "_Jalankan Audio Mixer" #: ../panel-plugin/xfce-mixer-plugin.c:581 ../xfce4-mixer/main.c:148 msgid "" "GStreamer was unable to detect any sound devices. Some sound system specific " "GStreamer packages may be missing. It may also be a permissions problem." msgstr "" -"GStreamer tak dapat mendeteksi kartu suara apapun. Beberapa sistem suara " -"spesifik GStreamer mungkin hilang. Atau mungkin juga masalah hak akses." +"GStreamer tak dapat mendeteksi kartu suara apapun. Beberapa paket GStreamer " +"untuk sistem suara tak diinstall. Atau mungkin juga masalah hak akses." #: ../panel-plugin/xfce-mixer-plugin.c:931 -#, fuzzy msgid "No command defined" -msgstr "Tak ada perintah klik-kiri yang ditentukan" +msgstr "Tak ada perintah yang ditentukan" #. Generate error message and insert the current command #: ../panel-plugin/xfce-mixer-plugin.c:939 @@ -47,38 +47,34 @@ msgid "" "providing the full path to the command." msgstr "" "Tak dapat mengeksekusi perintah \"%s\". Pastikan bahwa lokasi perintah ikut " -"disertakan dalam variabel lingkungan ALAMAT atau anda menyediakan alamat " -"penuh ke perintah." +"disertakan dalam variabel lingkungan PATH atau Anda menyediakan lokasi " +"lengkap ke perintah." #: ../panel-plugin/xfce-plugin-dialog.c:150 -#, fuzzy msgid "Audio Mixer Plugin" -msgstr "Plugin Mixer" +msgstr "Plugin Audio Mixer" #: ../panel-plugin/xfce-plugin-dialog.c:152 -#, fuzzy msgid "Configure the sound card and mixer track" -msgstr "Atur kartu suara anda dan kendalikan volume jalur terpilih" +msgstr "Atur kartu suara dan jalur mixer" #: ../panel-plugin/xfce-plugin-dialog.c:165 #: ../xfce4-mixer/xfce-mixer-window.c:185 -#, fuzzy msgid "Sound _card:" -msgstr "Kartu suara:" +msgstr "Kartu _suara:" #: ../panel-plugin/xfce-plugin-dialog.c:174 -#, fuzzy msgid "Mixer _track:" -msgstr "Jalur mixer" +msgstr "_Jalur mixer:" #: ../panel-plugin/xfce-volume-button.c:854 msgid "No valid device and/or element." -msgstr "" +msgstr "Tak ada device dan/atau jalur." #: ../panel-plugin/xfce-volume-button.c:859 #, c-format msgid "%s: muted" -msgstr "" +msgstr "%s: bisu" #: ../panel-plugin/xfce-volume-button.c:861 #, c-format @@ -91,19 +87,18 @@ msgstr "%s: %i%%" #: ../xfce4-mixer/xfce-mixer-window.c:413 #: ../xfce4-mixer/xfce-mixer-window.c:427 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:1 -#, fuzzy msgid "Audio Mixer" -msgstr "Mixer" +msgstr "Audio Mixer" #: ../panel-plugin/mixer.desktop.in.h:2 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:2 msgid "Adjust volume levels" -msgstr "" +msgstr "Sesuaikan tingkat volume" #: ../libxfce4mixer/libxfce4mixer.c:422 #, c-format msgid "Unknown Volume Control %d" -msgstr "Kontrol Volume %d Tak Dikenal" +msgstr "Kendali Volume %d Tak Dikenal" #: ../xfce4-mixer/main.c:86 msgid "Enable debugging output"
[Xfce4-commits] Update German (de) translation
Updating branch refs/heads/master to 2815cda6cf075e2871a89e33d0e067bcb78f873d (commit) from fd37934307aff01b5704c7deba6aabf269831689 (commit) commit 2815cda6cf075e2871a89e33d0e067bcb78f873d Author: Guido Berhoerster Date: Wed Oct 3 10:19:10 2012 +0200 Update German (de) translation po/de.po | 140 ++--- 1 files changed, 32 insertions(+), 108 deletions(-) diff --git a/po/de.po b/po/de.po index b70ecce..1969a80 100644 --- a/po/de.po +++ b/po/de.po @@ -5,14 +5,15 @@ # Jannis Pohlmann , 2008. # Fabian Nowak , 2008 # Enrico Tröger , 2009. +# Guido Berhoerster , 2012. # msgid "" msgstr "" -"Project-Id-Version: xfce4-mixer 4.6.0\n" +"Project-Id-Version: xfce4-mixer 4.10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-09-29 13:30+\n" -"PO-Revision-Date: 2009-01-31 16:03+0100\n" -"Last-Translator: Enrico Tröger \n" +"PO-Revision-Date: 2012-10-03 07:28+0200\n" +"Last-Translator: Guido Berhoerster \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" @@ -23,11 +24,11 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306 msgid "_Mute" -msgstr "" +msgstr "_Stummschalten" #: ../panel-plugin/xfce-mixer-plugin.c:314 msgid "_Run Audio Mixer" -msgstr "" +msgstr "_Mixer öffnen" #: ../panel-plugin/xfce-mixer-plugin.c:581 ../xfce4-mixer/main.c:148 msgid "" @@ -39,9 +40,8 @@ msgstr "" "Problem mit den Benutzerrechten sein." #: ../panel-plugin/xfce-mixer-plugin.c:931 -#, fuzzy msgid "No command defined" -msgstr "Kein Befehl für den Linksklick definiert" +msgstr "Kein Befehl definiert" #. Generate error message and insert the current command #: ../panel-plugin/xfce-mixer-plugin.c:939 @@ -55,36 +55,30 @@ msgstr "" "existiert und der angegebene Pfad korrekt ist." #: ../panel-plugin/xfce-plugin-dialog.c:150 -#, fuzzy msgid "Audio Mixer Plugin" -msgstr "Lautstärkeregelung" +msgstr "Lautstärkeregler-Plugin" #: ../panel-plugin/xfce-plugin-dialog.c:152 -#, fuzzy msgid "Configure the sound card and mixer track" -msgstr "" -"Konfigurieren Sie Ihre Soundkarte(n) und regeln Sie die Lautstärke " -"ausgewählter Elemente" +msgstr "Konfigurieren Sie die Soundkarte und das Element" #: ../panel-plugin/xfce-plugin-dialog.c:165 #: ../xfce4-mixer/xfce-mixer-window.c:185 -#, fuzzy msgid "Sound _card:" -msgstr "Soundkarte:" +msgstr "_Soundkarte:" #: ../panel-plugin/xfce-plugin-dialog.c:174 -#, fuzzy msgid "Mixer _track:" -msgstr "Element" +msgstr "Element:" #: ../panel-plugin/xfce-volume-button.c:854 msgid "No valid device and/or element." -msgstr "" +msgstr "Kein gültiges Gerät und/oder Element." #: ../panel-plugin/xfce-volume-button.c:859 #, c-format msgid "%s: muted" -msgstr "" +msgstr "%s: stumm" #: ../panel-plugin/xfce-volume-button.c:861 #, c-format @@ -97,14 +91,13 @@ msgstr "%s: %i%%" #: ../xfce4-mixer/xfce-mixer-window.c:413 #: ../xfce4-mixer/xfce-mixer-window.c:427 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:1 -#, fuzzy msgid "Audio Mixer" -msgstr "Lautstärkeregelung" +msgstr "Lautstärkeregler" #: ../panel-plugin/mixer.desktop.in.h:2 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:2 msgid "Adjust volume levels" -msgstr "" +msgstr "Lautstärke einstellen" #: ../libxfce4mixer/libxfce4mixer.c:422 #, c-format @@ -113,36 +106,32 @@ msgstr "Unbekannter Lautstärkeregler %d" #: ../xfce4-mixer/main.c:86 msgid "Enable debugging output" -msgstr "" +msgstr "Ausgabe zur Fehlerdiagnose aktivieren" #: ../xfce4-mixer/main.c:87 msgid "Show version and exit" -msgstr "" +msgstr "Version anzeigen und Programm beenden" #: ../xfce4-mixer/main.c:130 -#, fuzzy, c-format +#, c-format msgid "xfce4-mixer: Failed to initialize xfconf: %s\n" -msgstr "Konnte xfconf nicht initialisieren. Grund: %s" +msgstr "xfce4-mixer: Konnte xfconf nicht initialisieren: %s" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "_Playback" -msgstr "Wiedergabe" +msgstr "_Wiedergabe" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "C_apture" -msgstr "Aufnahme" +msgstr "_Aufnahme" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "S_witches" -msgstr "Schalter" +msgstr "_Schalter" #: ../xfce4-mixe
[Xfce4-commits] Creating annotated tag xfce4-mixer-4.9.0
Updating annotated tag refs/tags/xfce4-mixer-4.9.0 as new annotated tag to 97339e61c5975dc6b6b2ee9f1a6680ef666103d9 (tag) succeeds xfce4-mixer-4.8.0-88-g484886f tagged by Guido Berhoerster on 2012-09-28 17:55 +0200 Guido Berhoerster (1): Release 4.9.0 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Do not use G_VALUE_INIT which is only available in glib >= 2.30
Updating branch refs/heads/master to 91598f7c345e4e66d5dcead7615e29b92affc584 (commit) from 5c0458cb0fda7ea5258d6f253ff8d662230d5e59 (commit) commit 91598f7c345e4e66d5dcead7615e29b92affc584 Author: Guido Berhoerster Date: Thu Sep 27 18:25:55 2012 +0200 Do not use G_VALUE_INIT which is only available in glib >= 2.30 panel-plugin/xfce-volume-button.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index 4a25fb3..223701b 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -983,7 +983,7 @@ void xfce_volume_button_set_no_mute (XfceVolumeButton *button, gboolean no_mute) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -997,7 +997,7 @@ xfce_volume_button_set_no_mute (XfceVolumeButton *button, gboolean xfce_volume_button_get_no_mute (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); @@ -1013,7 +1013,7 @@ void xfce_volume_button_set_muted (XfceVolumeButton *button, gboolean is_muted) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1027,7 +1027,7 @@ xfce_volume_button_set_muted (XfceVolumeButton *button, gboolean xfce_volume_button_get_muted (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); @@ -1073,7 +1073,7 @@ void xfce_volume_button_set_track_label (XfceVolumeButton *button, const gchar *track_label) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1087,7 +1087,7 @@ xfce_volume_button_set_track_label (XfceVolumeButton *button, gchar* xfce_volume_button_get_track_label (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), NULL); @@ -1103,7 +1103,7 @@ void xfce_volume_button_set_is_configured (XfceVolumeButton *button, gboolean is_configured) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1117,7 +1117,7 @@ xfce_volume_button_set_is_configured (XfceVolumeButton *button, gboolean xfce_volume_button_get_is_configured (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); @@ -1133,7 +1133,7 @@ void xfce_volume_button_set_screen_position (XfceVolumeButton *button, XfceScreenPosition screen_position) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1147,7 +1147,7 @@ xfce_volume_button_set_screen_position (XfceVolumeButton *button, XfceScreenPosition xfce_volume_button_get_screen_position (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a typo
Updating branch refs/heads/master to 5c0458cb0fda7ea5258d6f253ff8d662230d5e59 (commit) from a89852c76caf70a546bf436581d712156ec1d563 (commit) commit 5c0458cb0fda7ea5258d6f253ff8d662230d5e59 Author: Guido Berhoerster Date: Thu Sep 27 17:41:30 2012 +0200 Fix a typo libxfce4mixer/xfce-mixer-debug.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/libxfce4mixer/xfce-mixer-debug.c b/libxfce4mixer/xfce-mixer-debug.c index d45b92d..54449b3 100644 --- a/libxfce4mixer/xfce-mixer-debug.c +++ b/libxfce4mixer/xfce-mixer-debug.c @@ -82,10 +82,7 @@ xfce_mixer_debug_init (const gchar *log_domain, } #else if (!debug_mode) -{ - g_log_set_handler (log_domain, G_LOG_LEVEL_DEBUG, xfce4_mixer_dummy_log_handler, NULL); - g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, xfce4_mixer_dummy_log_handler, NULL); -} +g_log_set_handler (log_domain, G_LOG_LEVEL_DEBUG, xfce_mixer_dummy_log_handler, NULL); #endif /* GLIB_CHECK_VERSION (2,32,0) */ } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Post-release bump
Updating branch refs/heads/master to a89852c76caf70a546bf436581d712156ec1d563 (commit) from 8905290888a001222487273c36a570a2c0b1f5f1 (commit) commit a89852c76caf70a546bf436581d712156ec1d563 Author: Guido Berhoerster Date: Thu Sep 27 17:05:57 2012 +0200 Post-release bump configure.ac.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index b325ab9..45fe951 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -26,7 +26,7 @@ m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], []) +m4_define([xfce4_mixer_version_tag], [git]) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Release 4.9.0
Updating branch refs/heads/master to 8905290888a001222487273c36a570a2c0b1f5f1 (commit) from 484886fbb7fc18ad77cda0f82a84c463f2011c51 (commit) commit 8905290888a001222487273c36a570a2c0b1f5f1 Author: Guido Berhoerster Date: Thu Sep 27 17:04:10 2012 +0200 Release 4.9.0 configure.ac.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 45fe951..b325ab9 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -26,7 +26,7 @@ m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], [git]) +m4_define([xfce4_mixer_version_tag], []) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Refactor the plugin
Updating branch refs/heads/master to 484886fbb7fc18ad77cda0f82a84c463f2011c51 (commit) from 5369a8e17dcab5d6431a290552a50fc966d45fa4 (commit) commit 484886fbb7fc18ad77cda0f82a84c463f2011c51 Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Refactor the plugin Refactor and simplify the plugin code. Added some more debugging output to the plugin. panel-plugin/xfce-mixer-plugin.c | 523 ++ 1 files changed, 300 insertions(+), 223 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 2cb25c8..ef2720d 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -71,43 +71,51 @@ enum -static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_configure_plugin (XfcePanelPlugin *plugin); -static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin *plugin, - gint size); -static void xfce_mixer_plugin_screen_position_changed (XfcePanelPlugin *plugin, - XfceScreenPosition screen_position); -static void xfce_mixer_plugin_button_toggled(XfceMixerPlugin *mixer_plugin, - GtkToggleButton *togglebutton); -static void xfce_mixer_plugin_volume_changed(XfceMixerPlugin *mixer_plugin, - gdouble volume); -static void xfce_mixer_plugin_mute_changed (XfceMixerPlugin *mixer_plugin, - gboolean muted); -static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, - GtkCheckMenuItem *mute_menu_item); -static void xfce_mixer_plugin_command_item_activated(XfceMixerPlugin *mixer_plugin, - GtkMenuItem *menuitem); -static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object); -static void xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_bus_message (GstBus *bus, - GstMessage *message, - XfceMixerPlugin *mixer_plugin); +static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); +static void xfce_mixer_plugin_set_property(GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void xfce_mixer_plugin_get_property(GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); +static void xfce_mixer_plugin_configure_plugin(XfcePanelPlugin *plugin); +static gboolean xfce_mixer_plugin_size_changed(XfcePanelPlugin *plugin, + gint size); +static void xfce_mixer_plugin_screen_position_changed (XfcePanelPlugin *plugin
[Xfce4-commits] Improve the mixer widgets
Updating branch refs/heads/master to 6c88d1adf7dc933a678e4fd47f7912958f1c3426 (commit) from a474e1e7809a8d07ee5458f73402698f7cd0d3b3 (commit) commit 6c88d1adf7dc933a678e4fd47f7912958f1c3426 Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Improve the mixer widgets Separate labels from track and option widgets and align labels and option widgets horizontally. Reduce the distance between faders in track widgets and ensure it is always the same. Put the chain buttons above the mute and record buttons and add lines to the left and right of them. Default to unlocked state if the volume differs between the channels of a track. NEWS|8 ++ xfce4-mixer/xfce-mixer-option.c | 42 ++- xfce4-mixer/xfce-mixer-switch.c | 39 +++ xfce4-mixer/xfce-mixer-track.c | 251 --- xfce4-mixer/xfce-mixer.c| 60 +++--- 5 files changed, 263 insertions(+), 137 deletions(-) diff --git a/NEWS b/NEWS index 0d0eb5b..9b0940e 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,14 @@ changed. - Handle options list changed messages which indicate that the available options of a track have changed. +- Separate labels from track and option widgets and align labels and option + widgets horizontally. +- Reduce the distance between faders in track widgets and ensure it is always + the same. +- Put the chain buttons above the mute and record buttons and add lines to the + left and right of them. +- Default to unlocked state if the volume differs between the channels of a + track. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c index 8ad8682..c9a79b5 100644 --- a/xfce4-mixer/xfce-mixer-option.c +++ b/xfce4-mixer/xfce-mixer-option.c @@ -54,12 +54,12 @@ static void xfce_mixer_option_bus_message (GstBus *bus, struct _XfceMixerOptionClass { - GtkHBoxClass __parent__; + GtkComboBoxClass __parent__; }; struct _XfceMixerOption { - GtkHBox __parent__; + GtkComboBox__parent__; GtkListStore *list_store; @@ -67,8 +67,6 @@ struct _XfceMixerOption GstMixerTrack *track; guint signal_handler_id; - GtkWidget *combo; - gboolean ignore_signals; }; @@ -99,7 +97,7 @@ xfce_mixer_option_get_type (void) NULL, }; - type = g_type_register_static (GTK_TYPE_HBOX, "XfceMixerOption", &info, 0); + type = g_type_register_static (GTK_TYPE_COMBO_BOX, "XfceMixerOption", &info, 0); } return type; @@ -181,26 +179,13 @@ static void xfce_mixer_option_create_contents (XfceMixerOption *option) { GstMixerOptions *options; - GtkWidget *label; GtkCellRenderer *renderer; const GList *options_iter; GtkTreeIter tree_iter; const gchar *active_option; - const gchar *track_label; - gchar *title; gint i; gint active_index = 0; - gtk_box_set_homogeneous (GTK_BOX (option), FALSE); - gtk_box_set_spacing (GTK_BOX (option), 12); - - track_label = xfce_mixer_get_track_label (option->track); - title = g_strdup_printf ("%s:", track_label); - - label = gtk_label_new (title); - gtk_box_pack_start (GTK_BOX (option), label, FALSE, FALSE, 0); - gtk_widget_show (label); - options = GST_MIXER_OPTIONS (option->track); active_option = gst_mixer_get_option (GST_MIXER (option->card), options); @@ -215,21 +200,18 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) active_index = i; } - option->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (option->list_store)); - gtk_box_pack_start (GTK_BOX (option), option->combo, FALSE, FALSE, 0); + gtk_combo_box_set_model (GTK_COMBO_BOX (option), GTK_TREE_MODEL (option->list_store)); /* Make read-only options insensitive */ if (GST_MIXER_TRACK_HAS_FLAG (option->track, GST_MIXER_TRACK_READONLY)) -gtk_widget_set_sensitive (option->combo, FALSE); - gtk_combo_box_set_active (GTK_COMBO_BOX (option->combo), active_index); - gtk_widget_show (option->combo); +gtk_widget_set_sensitive (GTK_WIDGET (option), FALSE); + gtk_combo_box_set_active (GTK_COMBO_BOX (option), active_index); + gtk_widget_show (GTK_WIDGET (option)); renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (option->combo), renderer, TRUE); - gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (option->combo), renderer, "text", OPTION_COLUMN); - - g_signal_connect (option->combo, "changed", G_CALLBACK (xfce_mixer_option_changed), option); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (option), renderer, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (option), renderer, "text", OPTION_COLUMN); - g_free (title); + g_signal_connect (option, "changed", G_CALLBACK (xfce_
[Xfce4-commits] Improve usability of the mixer and plugin configuration dialog
Updating branch refs/heads/master to 5369a8e17dcab5d6431a290552a50fc966d45fa4 (commit) from 69ea8a3321eb316642873441df7386b6ca02320e (commit) commit 5369a8e17dcab5d6431a290552a50fc966d45fa4 Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Improve usability of the mixer and plugin configuration dialog Add mnemonics for all tabs and the soud card combob box of the mixer main window. Add labels with mnemonics for the soud card and track combo boxes of the plugin configuration dialog. Improve the wording of the message shown when no controls are visible and visually follow the layout of an alert popup. NEWS |6 panel-plugin/xfce-plugin-dialog.c | 46 +++ xfce4-mixer/xfce-mixer-container.c | 29 +++--- xfce4-mixer/xfce-mixer-window.c|7 + 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index 9b0940e..1c6733c 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,12 @@ left and right of them. - Default to unlocked state if the volume differs between the channels of a track. +- Add mnemonics for all tabs and the soud card combob box of the mixer main + window. +- Add labels with mnemonics for the soud card and track combo boxes of the + plugin configuration dialog. +- Improve the wording of the message shown when no controls are visible and + visually follow the layout of an alert popup. 4.8.0 diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 1680834..f89f872 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -142,11 +142,9 @@ xfce_plugin_dialog_new (XfcePanelPlugin *plugin) static void xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) { - GtkWidget *alignment; - GtkWidget *vbox; + GtkWidget *table; GtkWidget *button; GtkWidget *label; - gchar *title; gtk_window_set_icon_name (GTK_WINDOW (dialog), "multimedia-volume-control"); gtk_window_set_title (GTK_WINDOW (dialog), _("Audio Mixer Plugin")); @@ -157,43 +155,29 @@ xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_show (button); - vbox = gtk_vbox_new (FALSE, 6); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); - gtk_widget_show (vbox); + table = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 12); + gtk_table_set_col_spacings (GTK_TABLE (table), 12); + gtk_container_set_border_width (GTK_CONTAINER (table), 6); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table); + gtk_widget_show (table); - label = gtk_label_new (NULL); - title = g_strdup_printf ("%s", _("Sound card")); - gtk_label_set_markup (GTK_LABEL (label), title); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + label = gtk_label_new_with_mnemonic (_("Sound _card:")); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_show (label); - g_free (title); - - alignment = gtk_alignment_new (0.0, 0.0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0); - gtk_widget_show (alignment); dialog->card_combo = xfce_mixer_card_combo_new (NULL); - gtk_container_add (GTK_CONTAINER (alignment), dialog->card_combo); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->card_combo); + gtk_table_attach (GTK_TABLE (table), dialog->card_combo, 1, 2, 0, 1, GTK_FILL|GTK_EXPAND, GTK_SHRINK, 0, 0); gtk_widget_show (dialog->card_combo); - label = gtk_label_new (NULL); - title = g_strdup_printf ("%s", _("Mixer track")); - gtk_label_set_markup (GTK_LABEL (label), title); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + label = gtk_label_new_with_mnemonic (_("Mixer _track:")); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->track_combo); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_show (label); - g_free (title); - - alignment = gtk_alignment_new (0.0, 0.0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0); - gtk_widget_show (alignment); dialog->track_combo = xfce_mixer_track_combo_new (NULL, NULL); - gtk_container_add (GTK_CONTAINER (alignment), dialog->track_combo); + gtk_table_attach (GTK_TABLE (table), dialog->track_combo, 1, 2, 1, 2, GTK_FILL|GTK
[Xfce4-commits] Handle GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED messages in XfceMixerOption
Updating branch refs/heads/master to a474e1e7809a8d07ee5458f73402698f7cd0d3b3 (commit) from d4d898b1740c02c55b0dbc0ad707c1e7e0ae (commit) commit a474e1e7809a8d07ee5458f73402698f7cd0d3b3 Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Handle GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED messages in XfceMixerOption NEWS|2 + xfce4-mixer/xfce-mixer-option.c | 120 +++ 2 files changed, 99 insertions(+), 23 deletions(-) diff --git a/NEWS b/NEWS index eedf761..0d0eb5b 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,8 @@ Prevent read-only tracks from being selected in the panel-plugin. - Handle mixer changed messages which indicate that the tracks of a mixer have changed. +- Handle options list changed messages which indicate that the available + options of a track have changed. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c index e965378..8ad8682 100644 --- a/xfce4-mixer/xfce-mixer-option.c +++ b/xfce4-mixer/xfce-mixer-option.c @@ -1,6 +1,7 @@ /* vi:set expandtab sw=2 sts=2: */ /*- * Copyright (c) 2008 Jannis Pohlmann + * Copyright (c) 2012 Guido Berhoerster * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +35,10 @@ +#define OPTION_COLUMN 0 + + + static void xfce_mixer_option_class_init (XfceMixerOptionClass *klass); static void xfce_mixer_option_init(XfceMixerOption *option); static void xfce_mixer_option_dispose (GObject *object); @@ -41,6 +46,9 @@ static void xfce_mixer_option_finalize(GObject *object); static void xfce_mixer_option_create_contents (XfceMixerOption *option); static void xfce_mixer_option_changed (GtkComboBox *combo, XfceMixerOption *option); +static void xfce_mixer_option_bus_message (GstBus *bus, + GstMessage *message, + XfceMixerOption *option); @@ -53,8 +61,11 @@ struct _XfceMixerOption { GtkHBox __parent__; + GtkListStore *list_store; + GstElement*card; GstMixerTrack *track; + guint signal_handler_id; GtkWidget *combo; @@ -115,6 +126,8 @@ static void xfce_mixer_option_init (XfceMixerOption *option) { option->ignore_signals = FALSE; + + option->signal_handler_id = xfce_mixer_bus_connect (G_CALLBACK (xfce_mixer_option_bus_message), option); } @@ -130,6 +143,16 @@ xfce_mixer_option_dispose (GObject *object) static void xfce_mixer_option_finalize (GObject *object) { + XfceMixerOption *option = XFCE_MIXER_OPTION (object); + + if (option->signal_handler_id > 0) +{ + xfce_mixer_bus_disconnect (option->signal_handler_id); + option->signal_handler_id = 0; +} + + gtk_list_store_clear (option->list_store); + g_object_unref (option->list_store); } @@ -159,11 +182,14 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) { GstMixerOptions *options; GtkWidget *label; - const GList *iter; + GtkCellRenderer *renderer; + const GList *options_iter; + GtkTreeIter tree_iter; const gchar *active_option; const gchar *track_label; gchar *title; gint i; + gint active_index = 0; gtk_box_set_homogeneous (GTK_BOX (option), FALSE); gtk_box_set_spacing (GTK_BOX (option), 12); @@ -178,22 +204,29 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) options = GST_MIXER_OPTIONS (option->track); active_option = gst_mixer_get_option (GST_MIXER (option->card), options); - option->combo = gtk_combo_box_new_text (); + option->list_store = gtk_list_store_new (2, G_TYPE_STRING, GST_TYPE_MIXER_TRACK); - for (iter = options->values, i = 0; iter != NULL; iter = g_list_next (iter), ++i) + for (options_iter = gst_mixer_options_get_values (options), i = 0; options_iter != NULL; options_iter = g_list_next (options_iter), ++i) { - gtk_combo_box_append_text (GTK_COMBO_BOX (option->combo), iter->data); + gtk_list_store_append (option->list_store, &tree_iter); + gtk_list_store_set (option->list_store, &tree_iter, OPTION_COLUMN, options_iter->data, -1); - if (G_UNLIKELY (g_utf8_collate (active_option, iter->data) == 0)) -gtk_combo_box_set_active (GTK_COMBO_BOX (option->combo), i); + if (G_UNLIKELY (g_utf8_collate (active_option, options_iter->data) == 0)) +active_index = i; } - + + option->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (option->list_store)); gtk_box_pack_start (GTK_BOX (option), option->combo, FALSE, FALSE, 0); /* Make
[Xfce4-commits] Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages
Updating branch refs/heads/master to d4d898b1740c02c55b0dbc0ad707c1e7e0ae (commit) from 47d1cee0825f316b24ee826c5c2f1d6cd53b465d (commit) commit d4d898b1740c02c55b0dbc0ad707c1e7e0ae Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages Connect every mixer to a GstBus in libxfce4mixer and add a signal handler for messages that handles GST_MIXER_MESSAGE_MIXER_CHANGED messages for every card and adds labels to all tracks. Refactor XfceMixer in order to allow updating itself in case the tracks have changed, preserving the currently active tab if possible; handle GST_MIXER_MESSAGE_MIXER_CHANGED messages accordingly and allow the card property to be changed. Make XfceMixerTrackCombo and XfceMixerControlsDialog listen to the bus and handle GST_MIXER_MESSAGE_MIXER_CHANGED messages for the current sound card by rebuilding the track list. Let XfceMixerPlugin refresh the track and attemt to retain the currently selected one when receiving a GST_MIXER_MESSAGE_MIXER_CHANGED for the currently selected card. NEWS |2 + libxfce4mixer/libxfce4mixer.c| 57 - libxfce4mixer/xfce-mixer-track-combo.c | 78 -- panel-plugin/xfce-mixer-plugin.c | 17 +- xfce4-mixer/xfce-mixer-controls-dialog.c | 40 +++- xfce4-mixer/xfce-mixer-window.c | 51 ++-- xfce4-mixer/xfce-mixer.c | 430 +- xfce4-mixer/xfce-mixer.h |4 +- 8 files changed, 428 insertions(+), 251 deletions(-) diff --git a/NEWS b/NEWS index 9798e77..eedf761 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,8 @@ - Handle tracks which are marked read-only by GStreamer or which have no mute or record functionality by making the corresponding widgets insensitive. Prevent read-only tracks from being selected in the panel-plugin. +- Handle mixer changed messages which indicate that the tracks of a mixer have + changed. 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 451e1d8..244196c 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -40,11 +40,16 @@ -static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, - gpointer user_data); -static void _xfce_mixer_add_track_labels (gpointer data, - gpointer user_data); -static void _xfce_mixer_destroy_mixer(GstMixer *mixer); +static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, + gpointeruser_data); +static void _xfce_mixer_add_track_labels (gpointerdata, + gpointeruser_data); +static void _xfce_mixer_init_mixer (gpointerdata, + gpointeruser_data); +static void _xfce_mixer_destroy_mixer(GstMixer *mixer); +static void _xfce_mixer_bus_message (GstBus *bus, + GstMessage *message, + gpointeruser_data); @@ -85,12 +90,16 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, &counter); - /* Add custom labels to all tracks of all mixers */ - g_list_foreach (mixers, (GFunc) _xfce_mixer_add_track_labels, NULL); - /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); + + /* + * Add custom labels to all tracks of all mixers and create a GstBus for + * each mixer device and connect an internal signal handler to receive + * notifications about track list changes + */ + g_list_foreach (mixers, (GFunc) _xfce_mixer_init_mixer, NULL); } } @@ -188,7 +197,6 @@ xfce_mixer_select_card (GstElement *card) { g_return_if_fail (GST_IS_MIXER (card)); - gst_element_set_bus (card, bus); selected_card = card; } @@ -361,6 +369,7 @@ void xfce_mixer_bus_disconnect (guint signal_handler_id) { g_return_if_fail (refcount > 0); + if (signal_handler_id != 0) g_signal_handler_disconnect (bus, signal_handler_id); } @@ -478,14 +487,44 @@ _xfce_mixer_add_track_labels (gpointer data, static void +_xfce_mixer_init_mixer (gpointer data, +gpointer user_data) +{ + GstMixer *card = GST_MIXER (data); + + /* Add custom labels to all tracks */ + _xfce_mixer_add_track_labels (card, NULL); + + /* Add bus to every card and connect to internal signal handler */ + gst_element_set_bus (GST_ELEMENT (card), bus); + g_signal_connect (bus, "message::element", G_CALLBACK (_xfce_mixer_bus_message), NULL); +} + + + +static void _xfce_mi
[Xfce4-commits] Handle read-only tracks or tracks with no mute/record functionality
Updating branch refs/heads/master to 47d1cee0825f316b24ee826c5c2f1d6cd53b465d (commit) from 444b8b826fd6b2c3d27f5d57309c7e5d40e08ed2 (commit) commit 47d1cee0825f316b24ee826c5c2f1d6cd53b465d Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Handle read-only tracks or tracks with no mute/record functionality Handle tracks which are marked read-only by GStreamer by making the corresponding widgets insensitive in the mixer application and by preventing them from being selected in the panel plugin. Require GStreamer 0.10.25 in order avoid #ifdefs. Handle missing record/mute functionality by making the corresponding buttons in the mixer application UI insensitive and by disallowing mute actions in the panel plugin. NEWS |3 + configure.ac.in|2 +- libxfce4mixer/libxfce4mixer.c | 47 +++- libxfce4mixer/xfce-mixer-track-combo.c | 16 +-- panel-plugin/xfce-mixer-plugin.c | 67 ++-- panel-plugin/xfce-volume-button.c | 76 --- panel-plugin/xfce-volume-button.h |3 + xfce4-mixer/xfce-mixer-option.c|3 + xfce4-mixer/xfce-mixer-switch.c|9 xfce4-mixer/xfce-mixer-track.c | 15 ++ 10 files changed, 201 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index 10f1d89..9798e77 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,9 @@ - Add runtime debugging mode to both the mixer and the panel plugin. - Add man page for xfce4-mixer. - Handle identically named tracks by making use of the track index property. +- Handle tracks which are marked read-only by GStreamer or which have no mute + or record functionality by making the corresponding widgets insensitive. + Prevent read-only tracks from being selected in the panel-plugin. 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index aa0b086..45fe951 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -96,7 +96,7 @@ dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) -XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) +XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.25]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([UNIQUE], [unique-1.0], [1.1]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index c14ee27..451e1d8 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -224,31 +224,56 @@ xfce_mixer_get_track (GstElement *card, GstMixerTrack * xfce_mixer_get_default_track (GstElement *card) { - GstMixerTrack *track = NULL; - const GList *iter; - GstMixerTrack *track_tmp; - const GList *tracks; + GstMixerTrack *track = NULL; + XfceMixerTrackType track_type = G_TYPE_INVALID; + const GList*iter; + GstMixerTrack *track_tmp; + XfceMixerTrackType track_type_tmp; g_return_val_if_fail (GST_IS_MIXER (card), NULL); - /* Try to get the master track */ + /* + * Try to get the master track if it is a playback or capture track and not + * read-only + */ for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) { track_tmp = GST_MIXER_TRACK (iter->data); + track_type_tmp = xfce_mixer_track_type_new (track_tmp); - if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER)) + if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER) && + (track_type_tmp == XFCE_MIXER_TRACK_TYPE_PLAYBACK || + track_type_tmp == XFCE_MIXER_TRACK_TYPE_CAPTURE) && + !GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_READONLY)) { track = track_tmp; + track_type = track_type_tmp; break; } } - /* If there is no master track, try to get the first track */ - if (!GST_IS_MIXER_TRACK (track)) + /* + * If there is no master track, try to get the first track which is a + * playback or capture track and not read-only + */ + if (!GST_IS_MIXER_TRACK (track) || + (track_type != XFCE_MIXER_TRACK_TYPE_PLAYBACK && + track_type != XFCE_MIXER_TRACK_TYPE_CAPTURE) || + GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_READONLY)) { - tracks = gst_mixer_list_tracks (GST_MIXER (card)); - if (g_list_length (tracks) > 0) -track = g_list_first (tracks)->data; + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track_tmp = GST_MIXER_TRACK (iter->data); + track_type = xfce_mixer_track_type_new (trac
[Xfce4-commits] Handle identically named tracks by making use of the track index property
Updating branch refs/heads/master to 444b8b826fd6b2c3d27f5d57309c7e5d40e08ed2 (commit) from f270a407b2400ae7bc0ea0ca463af18e8273d6b7 (commit) commit 444b8b826fd6b2c3d27f5d57309c7e5d40e08ed2 Author: Guido Berhoerster Date: Thu Sep 27 16:31:09 2012 +0200 Handle identically named tracks by making use of the track index property Handle identically named tracks by using an custom track label which sonsists of the GstMixerTrack label property and the index value if it is greater than 0. NEWS |1 + libxfce4mixer/libxfce4mixer.c| 62 ++ libxfce4mixer/libxfce4mixer.h|1 + libxfce4mixer/xfce-mixer-preferences.c | 16 libxfce4mixer/xfce-mixer-track-combo.c |7 +--- panel-plugin/xfce-mixer-plugin.c | 15 +++ panel-plugin/xfce-plugin-dialog.c| 13 ++ xfce4-mixer/xfce-mixer-controls-dialog.c | 17 +++- xfce4-mixer/xfce-mixer-option.c |5 +- xfce4-mixer/xfce-mixer-switch.c |5 +- xfce4-mixer/xfce-mixer-track.c |6 +-- xfce4-mixer/xfce-mixer.c | 27 - 12 files changed, 97 insertions(+), 78 deletions(-) diff --git a/NEWS b/NEWS index 72651a7..10f1d89 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ - Add tooltips to scale widgets in the mixer. - Add runtime debugging mode to both the mixer and the panel plugin. - Add man page for xfce4-mixer. +- Handle identically named tracks by making use of the track index property. 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index da0bfe4..c14ee27 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -40,9 +40,11 @@ -static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, - gpointer user_data); -static void _xfce_mixer_destroy_mixer (GstMixer *mixer); +static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, + gpointer user_data); +static void _xfce_mixer_add_track_labels (gpointer data, + gpointer user_data); +static void _xfce_mixer_destroy_mixer(GstMixer *mixer); @@ -83,6 +85,9 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, &counter); + /* Add custom labels to all tracks of all mixers */ + g_list_foreach (mixers, (GFunc) _xfce_mixer_add_track_labels, NULL); + /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); @@ -195,23 +200,20 @@ xfce_mixer_get_track (GstElement *card, { GstMixerTrack *track = NULL; const GList *iter; - gchar *label; + const gchar *label; g_return_val_if_fail (GST_IS_MIXER (card), NULL); g_return_val_if_fail (track_name != NULL, NULL); for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) { - g_object_get (GST_MIXER_TRACK (iter->data), "label", &label, NULL); + label = xfce_mixer_get_track_label (GST_MIXER_TRACK (iter->data)); if (g_utf8_collate (label, track_name) == 0) { track = iter->data; - g_free (label); break; } - - g_free (label); } return track; @@ -311,6 +313,15 @@ xfce_mixer_get_default_track_list (GstElement *card) +const gchar * +xfce_mixer_get_track_label (GstMixerTrack *track) +{ + g_return_val_if_fail (GST_IS_MIXER_TRACK (track), NULL); + return g_object_get_data (G_OBJECT (track), "xfce-mixer-track-label"); +} + + + guint xfce_mixer_bus_connect (GCallback callback, gpointer user_data) @@ -407,6 +418,41 @@ _xfce_mixer_filter_mixer (GstMixer *mixer, static void +_xfce_mixer_add_track_labels (gpointer data, + gpointer user_data) +{ + GstMixer *mixer = GST_MIXER (data); + const GList *iter; + GstMixerTrack *track; + gchar *label; + gchar *xfce_mixer_label; + guint index; + + for (iter = gst_mixer_list_tracks (mixer); iter != NULL; iter = g_list_next (iter)) +{ + track = GST_MIXER_TRACK (iter->data); + + g_object_get (track, "label", &label, "index", &index, NULL); + + /* + * Build display label including the index if there are mutiple tracks of + * the same name + */ + if (index > 0) +xfce_mixer_label = g_strdup_printf ("%s (%d)", label, index); + else +xfce_mixer_label = g_strdup (label); + + /* Set label to be used by xfce4-mixer */ + g_object_set_data_full (G_OBJECT (track), "xfce-mixer-track-label", xfce_m
[Xfce4-commits] Add man page for xfce4-mixer
Updating branch refs/heads/master to f270a407b2400ae7bc0ea0ca463af18e8273d6b7 (commit) from dad36c37b03c420fd904c3fa98f4b25c9094cc65 (commit) commit f270a407b2400ae7bc0ea0ca463af18e8273d6b7 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Add man page for xfce4-mixer NEWS |1 + xfce4-mixer/Makefile.am |2 ++ xfce4-mixer/xfce4-mixer.1 | 43 +++ 3 files changed, 46 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index b9aa6b5..72651a7 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ more meaningful. - Add tooltips to scale widgets in the mixer. - Add runtime debugging mode to both the mixer and the panel plugin. +- Add man page for xfce4-mixer. 4.8.0 diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index 819ab28..820711f 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -51,6 +51,8 @@ xfce4_mixer_LDFLAGS = \ -lgstaudio-0.10 \ -lgstinterfaces-0.10 +dist_man_MANS = xfce4-mixer.1 + desktop_in_files = xfce4-mixer.desktop.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) diff --git a/xfce4-mixer/xfce4-mixer.1 b/xfce4-mixer/xfce4-mixer.1 new file mode 100644 index 000..39b266b --- /dev/null +++ b/xfce4-mixer/xfce4-mixer.1 @@ -0,0 +1,43 @@ +.\" Copyright (c) 2012 Guido Berhoerster +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +.\" +.TH XFCE4\-MIXER 1 "1 Aug 2012" +.SH NAME +xfce4\-mixer \- adjust volume levels +.SH SYNOPSIS +\fBxfce4\-mixer\fR +[\fB\-dhV?\fR] +.SH DESCRIPTION +\fBxfce4\-mixer\fR is an audio mixer which allows you to adjust input and +output volume levels on your sound card(s). +.SH OPTIONS +The following options are supported: +.TP +.BR \-d ", " \-\-debug +Print diagnostic output useful for debugging to stderr. +.TP +.BR \-h ", " \-? ", " \-\-help +Print a summary of all command line options and exit. +.TP +.BR \-V ", " \-\-version +Print the version number and exit. +.SH EXIT STATUS +.TP +.B 0 +The program has exited normally. +.TP +.B >0 +An Error has occurred. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Use CPPFLAGS in Makefiles
Updating branch refs/heads/master to dad36c37b03c420fd904c3fa98f4b25c9094cc65 (commit) from 54f6ac04677a7caac0dcd8dcb1dd1a7e44d05490 (commit) commit dad36c37b03c420fd904c3fa98f4b25c9094cc65 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Use CPPFLAGS in Makefiles libxfce4mixer/Makefile.am |6 -- panel-plugin/Makefile.am |6 -- xfce4-mixer/Makefile.am |8 +--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 4107cdd..792a95e 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -19,13 +19,15 @@ libxfce4mixer_la_SOURCES = \ xfce-mixer-debug.h \ xfce-mixer-debug.c -libxfce4mixer_la_CFLAGS = \ +libxfce4mixer_la_CPPFLAGS =\ -I$(top_builddir) \ -I$(top_srcdir) \ -DDATADIR=\"$(datadir)\"\ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DG_LOG_DOMAIN=\"libxfce4mixer\"\ - -DMIXER_DATADIR=\"$(pkgdatadir)\" \ + -DMIXER_DATADIR=\"$(pkgdatadir)\" + +libxfce4mixer_la_CFLAGS = \ $(PLATFORM_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_FLAGS)\ diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index fa27e29..a494682 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -12,12 +12,14 @@ libmixer_la_SOURCES = \ xfce-mixer-plugin.h \ xfce-mixer-plugin.c -libmixer_la_CFLAGS = \ +libmixer_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir) \ -DDATADIR=\"$(datadir)\"\ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ - -DG_LOG_DOMAIN=\"xfce4-mixer-plugin\" \ + -DG_LOG_DOMAIN=\"xfce4-mixer-plugin\" + +libmixer_la_CFLAGS = \ $(PLATFORM_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index 8735737..819ab28 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -18,13 +18,15 @@ xfce4_mixer_SOURCES = \ xfce-mixer-window.h \ xfce-mixer-window.c -xfce4_mixer_CFLAGS = \ +xfce4_mixer_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir) \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DDATADIR=\"$(datadir)\"\ -DMIXER_DATADIR=\"$(pkgdatadir)\" \ - -DG_LOG_DOMAIN=\"xfce4-mixer\" \ + -DG_LOG_DOMAIN=\"xfce4-mixer\" + +xfce4_mixer_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(UNIQUE_CFLAGS)\ @@ -35,7 +37,7 @@ xfce4_mixer_CFLAGS = \ xfce4_mixer_DEPENDENCIES = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la - + xfce4_mixer_LDFLAGS = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la \ $(GLIB_LIBS)\ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add runtime debugging mode
Updating branch refs/heads/master to 54f6ac04677a7caac0dcd8dcb1dd1a7e44d05490 (commit) from 506e6255217c5c3fa54783df05019db7f303dc1a (commit) commit 54f6ac04677a7caac0dcd8dcb1dd1a7e44d05490 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Add runtime debugging mode Add a runtime debugging mode to both the mixer application and the panel plugin which will print additional diagnostic output. Add a "--debug" command line option to xfce4-mixer which will activate the debugging mode. Make the panel plugin look for the PANEL_DEBUG environment variable containing "mixer" in order to enable the debugging mode. Add custom xfce_mixer_debug() function for printing debugging output. Replace DBG() macro with xfce_mixer_debug(). Print relevant GStreamer data on startup when in debugging mode. Add "--version command" line option to xfce4-mixer which will print the version. NEWS |1 + README | 14 ++ libxfce4mixer/Makefile.am|4 +- libxfce4mixer/libxfce4mixer.c|4 + libxfce4mixer/libxfce4mixer.h|1 + libxfce4mixer/xfce-mixer-debug.c | 258 ++ libxfce4mixer/xfce-mixer-debug.h | 45 +++ panel-plugin/xfce-mixer-plugin.c | 14 ++ xfce4-mixer/Makefile.am |1 + xfce4-mixer/main.c | 58 +++-- xfce4-mixer/xfce-mixer.c |8 +- 11 files changed, 389 insertions(+), 19 deletions(-) diff --git a/NEWS b/NEWS index 2286c16..b9aa6b5 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,7 @@ xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. - Add tooltips to scale widgets in the mixer. +- Add runtime debugging mode to both the mixer and the panel plugin. 4.8.0 diff --git a/README b/README index 98df7c5..48756f0 100644 --- a/README +++ b/README @@ -5,6 +5,19 @@ This package contains a volume control application based on GStreamer 0.10 written to conceptually fit into the Xfce desktop environment. It includes a plugin for the Xfce panel. + +Debugging +- + +Both the mixer application and the panel plugin have a builtin debugging mode +which will print additional diagnostic output useful for bug reports. For +xfce4-mixer it can be activated by specifying the --debug command line option, +diagnostic messages will be printed to stderr. For the panel plugin, please +follow the instructions at http://docs.xfce.org/xfce/xfce4-panel/debugging and +set the PANEL_DEBUG environment variable to "mixer", the disgnostic output can +then be found in the log file corresponding to the plugin. + + Known Problems with GStreamer - @@ -13,3 +26,4 @@ Known Problems with GStreamer Debian or Ubuntu system and you're using ALSA then installing gstreamer0.10-alsa should fix it. On OpenBSD installing gst-plugins-good might help. + diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 8f44cd4..4107cdd 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -15,7 +15,9 @@ libxfce4mixer_la_SOURCES = \ xfce-mixer-track-type.h \ xfce-mixer-track-type.c \ xfce-mixer-preferences.h\ - xfce-mixer-preferences.c + xfce-mixer-preferences.c\ + xfce-mixer-debug.h \ + xfce-mixer-debug.c libxfce4mixer_la_CFLAGS = \ -I$(top_builddir) \ diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 6ca9466..da0bfe4 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -23,6 +23,10 @@ #include #endif +#ifdef HAVE_STRING_H +#include +#endif + #include #include diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 473817c..8628df9 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -32,6 +32,7 @@ #include "xfce-mixer-card-combo.h" #include "xfce-mixer-track-combo.h" #include "xfce-mixer-track-type.h" +#include "xfce-mixer-debug.h" #define XFCE_MIXER_TYPE_VALUE_ARRAY (xfce_mixer_value_array_get_type ()) diff --git a/libxfce4mixer/xfce-mixer-debug.c b/libxfce4mixer/xfce-mixer-debug.c new file mode 100644 index 000..d45b92d --- /dev/null +++ b/libxfce4mixer/xfce-mixer-debug.c @@ -0,0 +1,258 @@ +/* vi:set expandtab sw=2 sts=2: */ +/*- + * Copyright (c) 2012 Guido Berhoerster + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Ge
[Xfce4-commits] Add tooltips to scale widgets in the mixer
Updating branch refs/heads/master to 506e6255217c5c3fa54783df05019db7f303dc1a (commit) from 45a774fb7c341a2255b652563166fe6576520578 (commit) commit 506e6255217c5c3fa54783df05019db7f303dc1a Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Add tooltips to scale widgets in the mixer NEWS |1 + xfce4-mixer/xfce-mixer-track.c | 24 +++- 2 files changed, 24 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 4cb9822..2286c16 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ - Remove UI for configuring the mixer command from the panel plugin and assume xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. +- Add tooltips to scale widgets in the mixer. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-track.c b/xfce4-mixer/xfce-mixer-track.c index 579f562..366a557 100644 --- a/xfce4-mixer/xfce-mixer-track.c +++ b/xfce4-mixer/xfce-mixer-track.c @@ -185,6 +185,7 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) GtkWidget *fader; gdouble step; gchar *track_label; + gchar *tooltip_text; gint channel; gint columns; gint*volumes; @@ -203,7 +204,6 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) /* Put the name of the track on top of the other elements */ g_object_get (track->gst_track, "label", &track_label, NULL); label = gtk_label_new (track_label); - g_free (track_label); gtk_misc_set_alignment (GTK_MISC (label), 0.5f, 0.5f); gtk_table_attach (GTK_TABLE (track), label, 0, columns, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0); gtk_widget_show (label); @@ -213,15 +213,20 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) /* Create a fader for each channel */ for (channel = 0; channel < track->gst_track->num_channels; ++channel) { + tooltip_text = g_strdup_printf (_("Volume of channel %d on %s"), channel, track_label); + fader = gtk_vscale_new_with_range (track->gst_track->min_volume, track->gst_track->max_volume, step); gtk_scale_set_draw_value (GTK_SCALE (fader), FALSE); gtk_range_set_inverted (GTK_RANGE (fader), TRUE); gtk_range_set_value (GTK_RANGE (fader), volumes[channel]); + gtk_widget_set_tooltip_text (fader, tooltip_text); g_signal_connect (fader, "value-changed", G_CALLBACK (xfce_mixer_track_fader_changed), track); gtk_table_attach (GTK_TABLE (track), fader, channel, channel + 1, 1, 2, GTK_SHRINK, GTK_FILL|GTK_EXPAND, 0, 0); gtk_widget_show (fader); track->channel_faders = g_list_append (track->channel_faders, fader); + + g_free (tooltip_text); } /* Create a horizontal for the control buttons */ @@ -232,34 +237,49 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) /* Create mute button for playback tracks */ if (G_LIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { + tooltip_text = g_strdup_printf (_("Mute/unmute %s"), track_label); + track->mute_button = gtk_toggle_button_new (); image = gtk_image_new_from_icon_name ("audio-volume-high", XFCE_MIXER_ICON_SIZE); gtk_button_set_image (GTK_BUTTON (track->mute_button), image); + gtk_widget_set_tooltip_text (track->mute_button, tooltip_text); g_signal_connect (track->mute_button, "toggled", G_CALLBACK (xfce_mixer_track_mute_toggled), track); gtk_box_pack_start (GTK_BOX (button_box), track->mute_button, FALSE, FALSE, 0); gtk_widget_show (track->mute_button); + + g_free (tooltip_text); } if (G_LIKELY (track->gst_track->num_channels >= 2)) { + tooltip_text = g_strdup_printf (_("Lock channels for %s together"), track_label); + track->lock_button = gtk_toggle_button_new (); image = gtk_image_new_from_file (DATADIR "/pixmaps/xfce4-mixer/chain.png"); gtk_button_set_image (GTK_BUTTON (track->lock_button), image); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track->lock_button), TRUE); + gtk_widget_set_tooltip_text (track->lock_button, tooltip_text); g_signal_connect (track->lock_button, "toggled", G_CALLBACK (xfce_mixer_track_lock_toggled), track); gtk_box_pack_start (GTK_BOX (button_box), track->lock_button, FALSE, FALSE, 0); gtk_widget_show (track->lock_button); + + g_free (tooltip_text); } /* Create record button for capture tracks */ if (G_UNLIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_CAPTURE)) { + tooltip_text = g_strdup_printf (_("Enable/disable audible input from %s in output"), track_label); + track->record_button = gtk_toggle_button_new (); image = gtk_imag
[Xfce4-commits] Remove UI for configuring the mixer command from the panel plugin
Updating branch refs/heads/master to 45a774fb7c341a2255b652563166fe6576520578 (commit) from 88fb4e4474e507575b5b7bf6b4486a04cf573e0f (commit) commit 45a774fb7c341a2255b652563166fe6576520578 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Remove UI for configuring the mixer command from the panel plugin Remove UI for configuring the mixer command from the panel plugin and assume xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. NEWS |3 + panel-plugin/xfce-mixer-plugin.c | 22 ++ panel-plugin/xfce-plugin-dialog.c | 168 + 3 files changed, 10 insertions(+), 183 deletions(-) diff --git a/NEWS b/NEWS index 7cab556..4cb9822 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ - Make xfce4-mixer a singleton application, executing xfce4-mixer while another instance is already running brings the running instance to the foreground (bug #5676). +- Remove UI for configuring the mixer command from the panel plugin and assume + xfce4-mixer, make the panel plugin context menu entry for running the mixer + more meaningful. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 65939c3..beaba3f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -276,6 +276,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) { XfceMixerPlugin *mixer_plugin = XFCE_MIXER_PLUGIN (plugin); GtkWidget *command_menu_item; + GtkWidget *command_image; xfce_panel_plugin_menu_show_configure (plugin); @@ -286,7 +287,10 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) gtk_widget_show (mixer_plugin->mute_menu_item); /* Add menu item for running the user-defined command */ - command_menu_item = gtk_menu_item_new_with_mnemonic (_("_Run command")); + command_image = gtk_image_new_from_icon_name ("multimedia-volume-control", GTK_ICON_SIZE_MENU); + gtk_widget_show (command_image); + command_menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Run Audio Mixer")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (command_menu_item), command_image); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (command_menu_item)); g_signal_connect_swapped (G_OBJECT (command_menu_item), "activate", G_CALLBACK (xfce_mixer_plugin_command_item_activated), mixer_plugin); gtk_widget_show (command_menu_item); @@ -692,26 +696,12 @@ xfce_mixer_plugin_command_item_activated (XfceMixerPlugin *mixer_plugin, GtkMenuItem *menuitem) { gchar *message; - gint response; g_return_if_fail (mixer_plugin != NULL); if (G_UNLIKELY (mixer_plugin->command == NULL || strlen (mixer_plugin->command) == 0)) { - /* Run error message dialog */ - response = xfce_message_dialog (NULL, - _("No command defined"), - GTK_STOCK_DIALOG_ERROR, - NULL, - _("No command defined yet. You can change this in the plugin properties."), - XFCE_BUTTON_TYPE_MIXED, _("Properties"), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT, - GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT, - NULL); - - /* Configure the plugin if requested by the user */ - if (G_LIKELY (response == GTK_RESPONSE_ACCEPT)) -xfce_mixer_plugin_configure_plugin (XFCE_PANEL_PLUGIN (mixer_plugin)); - + xfce_dialog_show_error (NULL, NULL, _("No command defined")); return; } diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index c45b59a..86f584e 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -45,24 +45,18 @@ static void xfce_plugin_dialog_init (XfcePluginDialog static void xfce_plugin_dialog_dispose(GObject *object); static void xfce_plugin_dialog_finalize (GObject *object); static void xfce_plugin_dialog_create_contents(XfcePluginDialog *dialog); -static void xfce_plugin_dialog_command_button_clicked (XfcePluginDialog *dialog); static void xfce_plugin_dialog_soundcard_changed (XfcePluginDialog *dialog, GstElement *card, XfceMixerCardCombo *combo); static void xfce_plugin_dialog_track_changed (XfcePluginDialog *dialog, GstMixerTrack *track,
[Xfce4-commits] Make xfce4-mixer a singleton application (bug #5676)
Updating branch refs/heads/master to 88fb4e4474e507575b5b7bf6b4486a04cf573e0f (commit) from 3dfd08968ee1653bc9fca9b4e2d9eadadb5fb626 (commit) commit 88fb4e4474e507575b5b7bf6b4486a04cf573e0f Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Make xfce4-mixer a singleton application (bug #5676) Make xfce4-mixer a singleton application using libunique, executing xfce4-mixer while another instance is already running brings the running instance to the foreground. NEWS|3 ++ configure.ac.in |1 + xfce4-mixer/Makefile.am |2 + xfce4-mixer/main.c | 73 -- 4 files changed, 69 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index e5e133a..7cab556 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ - Add a popup with a scale for setting the volume to the panel plugin which is opened on left click, allow running the uder-defined command previously bound to left click from the panel plugin context menu instead. +- Make xfce4-mixer a singleton application, executing xfce4-mixer while another + instance is already running brings the running instance to the foreground + (bug #5676). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 4baffdb..aa0b086 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -98,6 +98,7 @@ XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([UNIQUE], [unique-1.0], [1.1]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index fd17aeb..e5a45f0 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -26,6 +26,7 @@ xfce4_mixer_CFLAGS = \ -DMIXER_DATADIR=\"$(pkgdatadir)\" \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ + $(UNIQUE_CFLAGS)\ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCE4UI_CFLAGS)\ $(XFCONF_CFLAGS)\ @@ -39,6 +40,7 @@ xfce4_mixer_LDFLAGS = \ $(GLIB_LIBS)\ $(GTHREAD_LIBS) \ $(GTK_LIBS) \ + $(UNIQUE_LIBS) \ $(LIBXFCE4UTIL_LIBS)\ $(LIBXFCE4UI_LIBS) \ $(XFCONF_LIBS) \ diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c index a4c32d7..5a65f0b 100644 --- a/xfce4-mixer/main.c +++ b/xfce4-mixer/main.c @@ -1,6 +1,7 @@ /* vi:set expandtab sw=2 sts=2: */ /*- * Copyright (c) 2008 Jannis Pohlmann + * Copyright (c) 2012 Guido Berhoerster * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +29,9 @@ #include +#include +#include + #include #include #include @@ -38,12 +42,42 @@ +static UniqueResponse +message_received (UniqueApp *app, + UniqueCommand command, + UniqueMessageData *message, + guint time_, + GtkWidget *window) +{ + UniqueResponse response; + + switch (command) +{ + case UNIQUE_ACTIVATE: +/* Move window to the screen the command was started on */ +gtk_window_set_screen (GTK_WINDOW (window), unique_message_data_get_screen (message)); +/* Bring window to the foreground */ +gtk_window_present_with_time (GTK_WINDOW (window), time_); +response = UNIQUE_RESPONSE_OK; +break; + default: +/* Invalid command */ +response = UNIQUE_RESPONSE_FAIL; +break; +} + + return response; +} + + + int main (intargc, char **argv) { - GtkWidget *window; - GError*error = NULL; + UniqueApp *app; + GtkWidget *window; + GError*error = NULL; /* Setup translation domain */ xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8"); @@ -96,17 +130,36 @@ main (intargc, return EXIT_FAILURE; } - /* Cre
[Xfce4-commits] Populate the mixer with whitelisted controls by default (bug #4945)
Updating branch refs/heads/master to 4f8aa9895a40baa7151d441b60c092c00d7c18f6 (commit) from 46d08678f7a1cbeb3970c03b5a91e55ec284a1ec (commit) commit 4f8aa9895a40baa7151d441b60c092c00d7c18f6 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Populate the mixer with whitelisted controls by default (bug #4945) Populate the mixer with whitelisted controls in the absence of an existing configuration. Select controls either based on the whitelist flag for mixers that support it or fall back to a static whitelist. NEWS |2 + libxfce4mixer/libxfce4mixer.c | 80 ++-- libxfce4mixer/libxfce4mixer.h |1 + libxfce4mixer/xfce-mixer-preferences.c | 59 +++- 4 files changed, 126 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index f2e2825..6d04cab 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,8 @@ muting (bug #5314). - Set the main window to normal rather than dialog type (bug #7623). - Keep the sound card and controls in sync between the mixer and xfconf. +- Populate the mixer with whitelisted controls in the absence of an existing + configuration (bug #4945). 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 7bb9293..6ca9466 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -42,10 +42,25 @@ static void _xfce_mixer_destroy_mixer (GstMixer *mixer); -static guint refcount = 0; -static GList *mixers = NULL; -static GstBus *bus = NULL; -static GstElement *selected_card = NULL; +static guintrefcount = 0; +static GList *mixers = NULL; +static GstBus *bus = NULL; +static GstElement *selected_card = NULL; +static const gchar *tracks_whitelist[] = +{ + "cd", + "digital output", + "front", + "headphone", + "line", + "master", + "mic", + "pcm", + "recording", + "speaker", + "volume", + NULL +}; @@ -235,6 +250,63 @@ xfce_mixer_get_default_track (GstElement *card) +GList * +xfce_mixer_get_default_track_list (GstElement *card) +{ + gboolean mixer_has_whitelist = FALSE; + const GList *iter; + GList *track_list = NULL; + GstMixerTrack *track; + gchar *track_label; + gchar *track_label_lower; + gint i; + + g_return_val_if_fail (GST_IS_MIXER (card), NULL); + + if (gst_mixer_get_mixer_flags (GST_MIXER (card)) & GST_MIXER_FLAG_HAS_WHITELIST) +mixer_has_whitelist = TRUE; + + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track = GST_MIXER_TRACK (iter->data); + + /* Use the whitelist flag when available and fall back to a static whitelist */ + if (mixer_has_whitelist) +{ + if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_WHITELIST)) +track_list = g_list_prepend (track_list, track); +} + else +{ + track_label = NULL; + + if (g_object_class_find_property (G_OBJECT_GET_CLASS (track), "untranslated-label")) +g_object_get (track, "untranslated-label", &track_label, NULL); + + if (track_label == NULL) +g_object_get (track, "label", &track_label, NULL); + + track_label_lower = g_utf8_strdown (track_label, -1); + + for (i = 0; tracks_whitelist[i] != NULL; ++i) +{ + if (strstr (track_label_lower, tracks_whitelist[i]) != NULL) +{ + track_list = g_list_prepend (track_list, track); + break; +} +} + + g_free (track_label_lower); + g_free (track_label); +} +} + + return track_list; +} + + + guint xfce_mixer_bus_connect (GCallback callback, gpointer user_data) diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 187db3f..473817c 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -49,6 +49,7 @@ void xfce_mixer_select_card(GstElement *card); GstMixerTrack *xfce_mixer_get_track (GstElement*card, const gchar *track_name); GstMixerTrack *xfce_mixer_get_default_track (GstElement*card); +GList *xfce_mixer_get_default_track_list (GstElement*card); guint xfce_mixer_bus_connect(GCallback callback, gpointer user_data); void xfce_mixer_bus_disconnect (guint signal_handler_id); diff --git a/libxfce4mixer/xfce-mixer-preferences.c b/libxfce4mixer/xfce-mixer-preferences.c index 2c
[Xfce4-commits] Add popup with a scale for setting the volume to the panel plugin
Updating branch refs/heads/master to 3dfd08968ee1653bc9fca9b4e2d9eadadb5fb626 (commit) from 4f8aa9895a40baa7151d441b60c092c00d7c18f6 (commit) commit 3dfd08968ee1653bc9fca9b4e2d9eadadb5fb626 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Add popup with a scale for setting the volume to the panel plugin Add a popup with a scale for setting the volume to the panel plugin which is opened on left click, allow running the user-defined command previously bound to left click from the panel plugin context menu instead. Subclass GtkToggleButton instaed of GtkButton. NEWS |3 + README|3 +- panel-plugin/xfce-mixer-plugin.c | 177 ++ panel-plugin/xfce-plugin-dialog.c |4 +- panel-plugin/xfce-volume-button.c | 678 + panel-plugin/xfce-volume-button.h | 36 ++- 6 files changed, 666 insertions(+), 235 deletions(-) diff --git a/NEWS b/NEWS index 6d04cab..e5e133a 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,9 @@ - Keep the sound card and controls in sync between the mixer and xfconf. - Populate the mixer with whitelisted controls in the absence of an existing configuration (bug #4945). +- Add a popup with a scale for setting the volume to the panel plugin which is + opened on left click, allow running the uder-defined command previously bound + to left click from the panel plugin context menu instead. 4.8.0 diff --git a/README b/README index e8a0645..98df7c5 100644 --- a/README +++ b/README @@ -3,8 +3,7 @@ xfce4-mixer Information This package contains a volume control application based on GStreamer 0.10 written to conceptually fit into the Xfce desktop environment. It -also contains a plugin for the Xfce panel which is especially designed -for use with the mouse wheel. +includes a plugin for the Xfce panel. Known Problems with GStreamer - diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 1e6e7d6..65939c3 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -71,38 +71,43 @@ enum -static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_set_property(GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_get_property(GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_configure_plugin(XfcePanelPlugin *plugin); -static gboolean xfce_mixer_plugin_size_changed(XfcePanelPlugin *plugin, - gint size); -static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, - gdouble volume); -static void xfce_mixer_plugin_mute_changed(XfceMixerPlugin *mixer_plugin, - gboolean muted); -static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, - GtkCheckMenuItem *mute_menu_item); -static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object); -static void xfce_mixer_plugin_update_track(XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_bus_message (GstBus *bus, - GstMessage *message, - XfceMixerPlugin *mixer_plugin); +static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); +static void xfce_mixer_plugin_set_property (GObject *object, + guint prop_id
[Xfce4-commits] Keep the sound card and controls in sync between the mixer and xfconf
Updating branch refs/heads/master to 46d08678f7a1cbeb3970c03b5a91e55ec284a1ec (commit) from 3e0def60db29746e501586d36d33ea305540a2e8 (commit) commit 46d08678f7a1cbeb3970c03b5a91e55ec284a1ec Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Keep the sound card and controls in sync between the mixer and xfconf Also apply changes in the controls dialog instantly to the mixer window. NEWS |1 + configure.ac.in |1 + libxfce4mixer/Makefile.am|2 + libxfce4mixer/libxfce4mixer.c| 19 ++ libxfce4mixer/libxfce4mixer.h|5 + libxfce4mixer/xfce-mixer-preferences.c | 308 ++ libxfce4mixer/xfce-mixer-preferences.h | 12 +- xfce4-mixer/xfce-mixer-controls-dialog.c | 181 ++ xfce4-mixer/xfce-mixer-controls-dialog.h |6 +- xfce4-mixer/xfce-mixer-window.c | 189 ++- xfce4-mixer/xfce-mixer.c | 24 ++- 11 files changed, 443 insertions(+), 305 deletions(-) diff --git a/NEWS b/NEWS index 59ff72e..f2e2825 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ - Add global keyboard shortcuts for raising and lowering the volume as well as muting (bug #5314). - Set the main window to normal rather than dialog type (bug #7623). +- Keep the sound card and controls in sync between the mixer and xfconf. 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index d4b86d7..4baffdb 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -95,6 +95,7 @@ dnl *** Check for required packages *** dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 399bb2d..8f44cd4 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -30,6 +30,7 @@ libxfce4mixer_la_CFLAGS = \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCE4UI_CFLAGS)\ $(XFCONF_CFLAGS)\ + $(DBUS_GLIB_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) libxfce4mixer_la_LDFLAGS = \ @@ -42,6 +43,7 @@ libxfce4mixer_la_LIBADD = \ $(LIBXFCE4UTIL_LIBS)\ $(LIBXFCE4UI_LIBS) \ $(XFCONF_LIBS) \ + $(DBUS_GLIB_LIBS) \ $(GST_PLUGINS_BASE_LIBS)\ -lgstaudio-0.10 \ -lgstinterfaces-0.10 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index b25ecc5..7bb9293 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -25,6 +25,8 @@ #include +#include + #include #include @@ -350,3 +352,20 @@ xfce_mixer_utf8_cmp (const gchar *s1, const gchar *s2) return g_utf8_collate (s1, s2); } + + +GType +xfce_mixer_value_array_get_type (void) +{ + static volatile gsize type__volatile = 0; + GType type; + + if (g_once_init_enter (&type__volatile)) +{ + type = dbus_g_type_get_collection ("GPtrArray", G_TYPE_VALUE); + g_once_init_leave (&type__volatile, type); +} + + return type__volatile; +} + diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 41f5816..187db3f 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -24,6 +24,8 @@ #include +#include + #include #include "xfce-mixer-preferences.h" @@ -31,6 +33,8 @@ #include "xfce-mixer-track-combo.h" #include "xfce-mixer-track-type.h" +#define XFCE_MIXER_TYPE_VALUE_ARRAY (xfce_mixer_value_array_get_type ()) + G_BEGIN_DECLS; void xfce_mixer_init (void); @@ -52,6 +56,7 @@ gint xfce_mixer_get_max_volume (gint *volumes, gint num_channels); intxfce_mixer_utf8_cmp (const gchar *s1, const gchar *s2); +GType xfce_mixer_value_array_get_type (void); G_END_DECLS; diff --git a/libxfce4mixer/xfce-mixer-preferences.c b/libxfce4mixer
[Xfce4-commits] Set the main window to normal rather than dialog type (bug #7623)
Updating branch refs/heads/master to 3e0def60db29746e501586d36d33ea305540a2e8 (commit) from 117ff721b989bcf8cd8e0fbeaa692c14c1ecf5ef (commit) commit 3e0def60db29746e501586d36d33ea305540a2e8 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Set the main window to normal rather than dialog type (bug #7623) NEWS|1 + xfce4-mixer/xfce-mixer-window.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 400ccdd..59ff72e 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ - Do not use deprecated APIs and adjust requirements to Xfce 4.10. - Add global keyboard shortcuts for raising and lowering the volume as well as muting (bug #5314). +- Set the main window to normal rather than dialog type (bug #7623). 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index 85ffe04..11ecf1d 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -163,6 +163,7 @@ xfce_mixer_window_init (XfceMixerWindow *window) g_object_get (window->preferences, "window-width", &width, "window-height", &height, "sound-card", &active_card, NULL); /* Configure the main window */ + gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_icon_name (GTK_WINDOW (window), "multimedia-volume-control"); gtk_window_set_title (GTK_WINDOW (window), _("Audio Mixer")); gtk_window_set_default_size (GTK_WINDOW (window), width, height); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add optional global keyboard shortcuts (bug #5314)
Updating branch refs/heads/master to 117ff721b989bcf8cd8e0fbeaa692c14c1ecf5ef (commit) from 2be23d2118b673e869d25f00d9ea5f1b427add3c (commit) commit 117ff721b989bcf8cd8e0fbeaa692c14c1ecf5ef Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Add optional global keyboard shortcuts (bug #5314) Add optional global keyboard shortcuts for raising and lowering the volume as well as muting. Make the plugin single-instance. NEWS |2 + configure.ac.in |7 ++ panel-plugin/Makefile.am |6 +- panel-plugin/mixer.desktop.in|2 +- panel-plugin/xfce-mixer-plugin.c | 207 +- 5 files changed, 220 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 853354f..400ccdd 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ - Add an item to the panel plugin context menu for muting (bug #7944). - Make name and description more meaningful (bug #5817). - Do not use deprecated APIs and adjust requirements to Xfce 4.10. +- Add global keyboard shortcuts for raising and lowering the volume as well as + muting (bug #5314). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 37eccde..d4b86d7 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -103,6 +103,12 @@ XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) dnl *** +dnl *** Check for optional packages *** +dnl *** +XDT_CHECK_OPTIONAL_PACKAGE([KEYBINDER], [keybinder], [0.2.2], [keybinder], + [keybinder Support]) + +dnl *** dnl *** Check for debugging support *** dnl *** XDT_FEATURE_DEBUG(mixer_debug_default) @@ -143,5 +149,6 @@ dnl *** echo echo "Build Configuration:" echo +echo " * keybinder Support:${KEYBINDER_FOUND:-no}" echo " * Debug Support:$enable_debug" echo diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index 2170005..fa27e29 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -25,7 +25,8 @@ libmixer_la_CFLAGS = \ $(LIBXFCE4UI_CFLAGS)\ $(LIBXFCE4PANEL_CFLAGS) \ $(XFCONF_CFLAGS)\ - $(GST_PLUGINS_BASE_CFLAGS) + $(GST_PLUGINS_BASE_CFLAGS) \ + $(KEYBINDER_CFLAGS) libmixer_la_DEPENDENCIES = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la @@ -47,7 +48,8 @@ libmixer_la_LIBADD = \ $(XFCONF_LIBS) \ $(GST_PLUGINS_BASE_LIBS)\ -lgstaudio-0.10 \ - -lgstinterfaces-0.10 + -lgstinterfaces-0.10\ + $(KEYBINDER_LIBS) desktopdir = $(datadir)/xfce4/panel/plugins diff --git a/panel-plugin/mixer.desktop.in b/panel-plugin/mixer.desktop.in index fb45c14..f4e7637 100644 --- a/panel-plugin/mixer.desktop.in +++ b/panel-plugin/mixer.desktop.in @@ -5,4 +5,4 @@ _Comment=Adjust volume levels Icon=multimedia-volume-control X-XFCE-Internal=false X-XFCE-Module=mixer -X-XFCE-Unique=false +X-XFCE-Unique=true diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index eb2042a..1e6e7d6 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -36,6 +36,10 @@ #include #include +#ifdef HAVE_KEYBINDER +#include +#endif + #include "xfce-mixer-plugin.h" #include "libxfce4mixer/libxfce4mixer.h" @@ -51,11 +55,22 @@ enum PROP_SOUND_CARD, PROP_TRACK, PROP_COMMAND, +#ifdef HAVE_KEYBINDER + PROP_ENABLE_KEYBOARD_SHORTCUTS, +#endif N_PROPERTIES, }; +#ifdef HAVE_KEYBINDER +#define XFCE_MIXER_PLUGIN_RAISE_VOLUME_KEY "XF86AudioRaiseVolume" +#define XFCE_MIXER_PLUGIN_LOWER_VOLUME_KEY "XF86AudioLowerVolume" +#define XFCE_MIXER_PLUGIN_MUTE_KEY "XF86AudioMute" +#endif + + + static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); static void xfce_mixer_plugin_set_property(GObject *object, guint prop_id, @@ -83,6 +98,12 @@ static void xfce_mixer_plugin_update_track (XfceMixerPlugin static void xfce_mixer_plugin_bus_message (GstBus *bus,
[Xfce4-commits] Do not use deprecated APIs and adjust requirements to Xfce 4.10
Updating branch refs/heads/master to 2be23d2118b673e869d25f00d9ea5f1b427add3c (commit) from 397c3ea65a63d770509b141b4db45a11541e5ba3 (commit) commit 2be23d2118b673e869d25f00d9ea5f1b427add3c Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Do not use deprecated APIs and adjust requirements to Xfce 4.10 Raise the minimum requirements of Xfce components to 4.10 which is the currently supported version. Raise the minimum requirements of GTK/glib to match those of Xfce 4.10. Raise the minimum required gstreamer version to 0.10.23, it was released in 2009 and will allow us to use GST_MIXER_FLAG_HAS_WHITELIST in the mixer. Replace the usage of GTK/glib API parts which have been deprecated in the minimum required GTK version. NEWS |1 + configure.ac.in | 33 +++-- libxfce4mixer/libxfce4mixer.c | 10 -- libxfce4mixer/libxfce4mixer.h |4 panel-plugin/xfce-mixer-plugin.c | 22 -- panel-plugin/xfce-volume-button.c |3 ++- xfce4-mixer/xfce-mixer-window.c |7 --- xfce4-mixer/xfce-mixer.c | 13 - 8 files changed, 14 insertions(+), 79 deletions(-) diff --git a/NEWS b/NEWS index cf8b487..853354f 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ value (bug #8291). - Add an item to the panel plugin context menu for muting (bug #7944). - Make name and description more meaningful (bug #5817). +- Do not use deprecated APIs and adjust requirements to Xfce 4.10. 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index f391d31..37eccde 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -93,28 +93,14 @@ AC_CHECK_LIB([m],[round]) dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0]) -XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) -XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) - -dnl ** -dnl *** Check for GstMixer bus support *** -dnl ** -HAVE_GST_MIXER_NOTIFICATION=no -PKG_CHECK_MODULES(GST_MIXER_NOTIFICATION_API, - gstreamer-plugins-base-0.10 >= 0.10.14, - HAVE_GST_MIXER_NOTIFICATION=yes, - HAVE_GST_MIXER_NOTIFICATION=no) -if test "x$HAVE_GST_MIXER_NOTIFICATION" = "xyes"; then - AC_DEFINE(HAVE_GST_MIXER_NOTIFICATION, 1, -[Have GStreamer mixer notification API]) -fi +XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) dnl *** dnl *** Check for debugging support *** @@ -157,10 +143,5 @@ dnl *** echo echo "Build Configuration:" echo -if test "x$HAVE_GST_MIXER_NOTIFICATION" = "xyes"; then -echo " * GStreamer mixer notification support: yes" -else -echo " * GStreamer mixer notification support: no" -fi echo " * Debug Support:$enable_debug" echo diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 86ea5db..b25ecc5 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -42,10 +42,8 @@ static void _xfce_mixer_destroy_mixer (GstMixer *mixer); static guint refcount = 0; static GList *mixers = NULL; -#ifdef HAVE_GST_MIXER_NOTIFICATION static GstBus *bus = NULL; static GstElement *selected_card = NULL; -#endif @@ -64,11 +62,9 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, &counter); -#ifdef HAVE_GST_MIXER_NOTIFICATION /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); -#endif } } @@ -82,10 +78,8 @@ xfce_mixer_shutdown (void) g_list_foreach (mixers, (GFunc) _xfce_mixer_destroy_mixer, NULL); g_list_free (mixers); -#ifdef HAVE_GST_MIXER_NOTIFICATION gst_bus_remove_signal_watch (bus); gst_object_unref (
[Xfce4-commits] Make name and description more meaningful (bug #5817)
Updating branch refs/heads/master to 397c3ea65a63d770509b141b4db45a11541e5ba3 (commit) from e64ddd86a5abfaf6e34d5cd1d57eb0b5656ce6c6 (commit) commit 397c3ea65a63d770509b141b4db45a11541e5ba3 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Make name and description more meaningful (bug #5817) NEWS |1 + panel-plugin/mixer.desktop.in |4 ++-- panel-plugin/xfce-plugin-dialog.c |2 +- xfce4-mixer/main.c |2 +- xfce4-mixer/xfce-mixer-window.c|4 ++-- xfce4-mixer/xfce4-mixer.desktop.in |4 ++-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index e3a9aaf..cf8b487 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ - Mute a track when the volume is set to 0% and unmute when set to a higher value (bug #8291). - Add an item to the panel plugin context menu for muting (bug #7944). +- Make name and description more meaningful (bug #5817). 4.8.0 diff --git a/panel-plugin/mixer.desktop.in b/panel-plugin/mixer.desktop.in index fb46a41..fb45c14 100644 --- a/panel-plugin/mixer.desktop.in +++ b/panel-plugin/mixer.desktop.in @@ -1,7 +1,7 @@ [Xfce Panel] Type=X-XFCE-PanelPlugin -_Name=Mixer -_Comment=Volume control for your sound card +_Name=Audio Mixer +_Comment=Adjust volume levels Icon=multimedia-volume-control X-XFCE-Internal=false X-XFCE-Module=mixer diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 789a18c..4a120bf 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -193,7 +193,7 @@ xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) gchar *title; gtk_window_set_icon_name (GTK_WINDOW (dialog), "multimedia-volume-control"); - gtk_window_set_title (GTK_WINDOW (dialog), _("Mixer Plugin")); + gtk_window_set_title (GTK_WINDOW (dialog), _("Audio Mixer Plugin")); xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog), _("Configure the mixer track and left-click command")); diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c index e459f8f..a4c32d7 100644 --- a/xfce4-mixer/main.c +++ b/xfce4-mixer/main.c @@ -58,7 +58,7 @@ main (intargc, #endif /* Set application name */ - g_set_application_name (_("Mixer")); + g_set_application_name (_("Audio Mixer")); /* Initialize GTK+ */ gtk_init (&argc, &argv); diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index 0c6a1e9..14bd6f3 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -164,7 +164,7 @@ xfce_mixer_window_init (XfceMixerWindow *window) /* Configure the main window */ gtk_window_set_icon_name (GTK_WINDOW (window), "multimedia-volume-control"); - gtk_window_set_title (GTK_WINDOW (window), _("Mixer")); + gtk_window_set_title (GTK_WINDOW (window), _("Audio Mixer")); gtk_window_set_default_size (GTK_WINDOW (window), width, height); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); gtk_dialog_set_has_separator (GTK_DIALOG (window), FALSE); @@ -283,7 +283,7 @@ xfce_mixer_window_soundcard_changed (XfceMixerCardCombo *combo, g_return_if_fail (IS_XFCE_MIXER_WINDOW (window)); g_return_if_fail (GST_IS_MIXER (card)); - title = g_strdup_printf ("%s - %s", _("Mixer"), xfce_mixer_get_card_display_name (card)); + title = g_strdup_printf ("%s - %s", _("Audio Mixer"), xfce_mixer_get_card_display_name (card)); gtk_window_set_title (GTK_WINDOW (window), title); g_free (title); diff --git a/xfce4-mixer/xfce4-mixer.desktop.in b/xfce4-mixer/xfce4-mixer.desktop.in index c962d84..42ac691 100644 --- a/xfce4-mixer/xfce4-mixer.desktop.in +++ b/xfce4-mixer/xfce4-mixer.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Version=1.0 -_Name=Mixer -_Comment=Audio mixer for the Xfce Desktop Environment +_Name=Audio Mixer +_Comment=Adjust volume levels Icon=multimedia-volume-control Exec=xfce4-mixer Type=Application ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add an item to the panel plugin context menu for muting (bug #7944)
Updating branch refs/heads/master to e64ddd86a5abfaf6e34d5cd1d57eb0b5656ce6c6 (commit) from f543917aea0dd551490cf25806c4260d9740b288 (commit) commit e64ddd86a5abfaf6e34d5cd1d57eb0b5656ce6c6 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Add an item to the panel plugin context menu for muting (bug #7944) NEWS |1 + panel-plugin/xfce-mixer-plugin.c | 81 +++-- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 80a8b8a..e3a9aaf 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ - Indicate in the plugin tooltip whether the track is muted. - Mute a track when the volume is set to 0% and unmute when set to a higher value (bug #8291). +- Add an item to the panel plugin context menu for muting (bug #7944). 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 1dc6d97..a382cf1 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -72,6 +72,10 @@ static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume); +static void xfce_mixer_plugin_mute_changed(XfceMixerPlugin *mixer_plugin, + gboolean muted); +static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, + GtkCheckMenuItem *mute_menu_item); static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, GParamSpec *pspec, GObject *object); @@ -112,6 +116,7 @@ struct _XfceMixerPlugin /* Widgets */ GtkWidget *hvbox; GtkWidget *button; + GtkWidget *mute_menu_item; /* Reference to the plugin private xfconf channel */ XfconfChannel *plugin_channel; @@ -192,6 +197,8 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) mixer_plugin->message_handler_id = 0; #endif + mixer_plugin->mute_menu_item = NULL; + /* Initialize xfconf */ xfconf_init (NULL); @@ -228,6 +235,12 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Add menu item for muting */ + mixer_plugin->mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_("_Mute")); + xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (mixer_plugin->mute_menu_item)); + g_signal_connect_swapped (G_OBJECT (mixer_plugin->mute_menu_item), "toggled", G_CALLBACK (xfce_mixer_plugin_mute_item_toggled), mixer_plugin); + gtk_widget_show (mixer_plugin->mute_menu_item); + /* Only occupy a single row in deskbar mode */ xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); @@ -561,13 +574,9 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, static void -xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object) +xfce_mixer_plugin_mute_changed (XfceMixerPlugin *mixer_plugin, +gboolean muted) { - gboolean mute; - - g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin->card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin->track)); @@ -575,19 +584,22 @@ xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, mixer_plugin->ignore_bus_messages = TRUE; #endif - g_object_get (object, "is-muted", &mute, NULL); if (G_LIKELY (xfce_mixer_track_type_new (mixer_plugin->track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { /* Apply mute change to the sound card */ - gst_mixer_set_mute (GST_MIXER (mixer_plugin->card), mixer_plugin->track, mute); + gst_mixer_set_mute (GST_MIXER (mixer_plugin->card), mixer_plugin->track, muted); } else { /* Toggle capture */ - gst_mixer_set_record (GST_MIXER (mixer_plugin->card), mixer_plugin->track, !mute); + gst_mixer_set_record (GST_MIXER (mixer_plugin->card), mixer_plugin->track, !muted); } + /* Update mute menu item */ + if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mixer_plugin->mute_menu_item)) != muted) +gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mixer_plugin->mute_menu_item), muted); + #ifdef HAVE_
[Xfce4-commits] Indicate in the plugin tooltip whether the track is muted
Updating branch refs/heads/master to e749d2a409a4228ac1f0a59c081f4d14b01b8297 (commit) from 87bb9e4fe2cdec665b6e7aefad2c0bc3695a2b98 (commit) commit e749d2a409a4228ac1f0a59c081f4d14b01b8297 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Indicate in the plugin tooltip whether the track is muted Let XfceVolumeButton keep state istelf by adding a "is-muted" property and remove the "mute-toggled" signal. NEWS |1 + panel-plugin/xfce-mixer-plugin.c | 16 +-- panel-plugin/xfce-volume-button.c | 84 panel-plugin/xfce-volume-button.h |3 +- 4 files changed, 61 insertions(+), 43 deletions(-) diff --git a/NEWS b/NEWS index c056db7..c4ccfac 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). - Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips. +- Indicate in the plugin tooltip whether the track is muted. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 5f367ea..73fbef0 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -68,8 +68,9 @@ static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume); -static void xfce_mixer_plugin_mute_toggled(XfceMixerPlugin *mixer_plugin, - gboolean mute); +static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, + GParamSpec *pspec, + GObject *object); static void xfce_mixer_plugin_update_track(XfceMixerPlugin *mixer_plugin); #ifdef HAVE_GST_MIXER_NOTIFICATION static void xfce_mixer_plugin_bus_message (GstBus *bus, @@ -205,7 +206,7 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) /* Create volume button for the plugin */ mixer_plugin->button = xfce_volume_button_new (); g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "volume-changed", G_CALLBACK (xfce_mixer_plugin_volume_changed), mixer_plugin); - g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "mute-toggled", G_CALLBACK (xfce_mixer_plugin_mute_toggled), mixer_plugin); + g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "notify::is-muted", G_CALLBACK (xfce_mixer_plugin_is_muted_property_changed), mixer_plugin); g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "clicked", G_CALLBACK (xfce_mixer_plugin_clicked), mixer_plugin); gtk_container_add (GTK_CONTAINER (mixer_plugin->hvbox), mixer_plugin->button); gtk_widget_show (mixer_plugin->button); @@ -556,9 +557,12 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, static void -xfce_mixer_plugin_mute_toggled (XfceMixerPlugin *mixer_plugin, -gboolean mute) +xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, + GParamSpec *pspec, + GObject *object) { + gboolean mute; + g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin->card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin->track)); @@ -567,6 +571,8 @@ xfce_mixer_plugin_mute_toggled (XfceMixerPlugin *mixer_plugin, mixer_plugin->ignore_bus_messages = TRUE; #endif + g_object_get (object, "is-muted", &mute, NULL); + if (G_LIKELY (xfce_mixer_track_type_new (mixer_plugin->track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { /* Apply mute change to the sound card */ diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index ca2236b..e80c792 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -48,6 +48,7 @@ enum PROP_0, PROP_TRACK_LABEL, PROP_IS_CONFIGURED, + PROP_IS_MUTED, N_PROPERTIES, }; @@ -57,7 +58,6 @@ enum enum { VOLUME_CHANGED, - MUTE_TOGGLED, LAST_SIGNAL, }; @@ -106,8 +106,6 @@ static void xfce_volume_button_volume_changed (XfceVolumeButton *butt gdouble volume); static void xfce_volume_button_update_icons (XfceVolumeButton *button,
[Xfce4-commits] Mute a track when the volume is set to 0% and unmute when set to a higher value
Updating branch refs/heads/master to f543917aea0dd551490cf25806c4260d9740b288 (commit) from e749d2a409a4228ac1f0a59c081f4d14b01b8297 (commit) commit f543917aea0dd551490cf25806c4260d9740b288 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Mute a track when the volume is set to 0% and unmute when set to a higher value Mute a track automatically when the volume button reaches 0% and unmute it again when above 0% (bug #8291). Improve the volume calculations by using round() rather than truncating. NEWS |2 + configure.ac.in |6 panel-plugin/xfce-mixer-plugin.c |6 +++- panel-plugin/xfce-volume-button.c | 43 - xfce4-mixer/xfce-mixer-track.c| 54 5 files changed, 91 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index c4ccfac..80a8b8a 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ - Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips. - Indicate in the plugin tooltip whether the track is muted. +- Mute a track when the volume is set to 0% and unmute when set to a higher + value (bug #8291). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 6a42c74..f391d31 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -84,6 +84,12 @@ dnl *** Check for i18n support *** dnl ** XDT_I18N([@LINGUAS@]) +dnl ** +dnl *** Check for libm *** +dnl ** +AC_CHECK_HEADERS([math.h]) +AC_CHECK_LIB([m],[round]) + dnl *** dnl *** Check for required packages *** dnl *** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 73fbef0..1dc6d97 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -23,6 +23,10 @@ #include #endif +#ifdef HAVE_MATH_H +#include +#endif + #include #include @@ -537,7 +541,7 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, volume_range = mixer_plugin->track->max_volume - mixer_plugin->track->min_volume; /* Determine new volume */ - new_volume = mixer_plugin->track->min_volume + (volume * volume_range); + new_volume = (gint) round (mixer_plugin->track->min_volume + (volume * volume_range)); /* Set all channel volumes to the new volume */ for (i = 0; i < mixer_plugin->track->num_channels; ++i) diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index e80c792..826d4be 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -23,6 +23,10 @@ #include #endif +#ifdef HAVE_MATH_H +#include +#endif + #include #include @@ -216,7 +220,7 @@ xfce_volume_button_class_init (XfceVolumeButtonClass *klass) g_param_spec_boolean ("is-muted", "is-muted", "is-muted", - FALSE, + TRUE, G_PARAM_READABLE | G_PARAM_WRITABLE)); button_signals[VOLUME_CHANGED] = g_signal_new ("volume-changed", @@ -240,15 +244,15 @@ xfce_volume_button_init (XfceVolumeButton *button) button->is_configured = FALSE; - /* By default we expect the button not to be muted */ - button->is_muted = FALSE; - /* Allocate array for preloaded icons */ button->pixbufs = g_new0 (GdkPixbuf*, G_N_ELEMENTS (icons)-1); /* Create adjustment for the button (from 0.0 to 1.0 in 5% steps) */ button->adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.0); + /* Set to muted by default since the initial adjustment value is 0 */ + button->is_muted = TRUE; + /* Create a new scaled image for the button icon */ button->image = xfce_panel_image_new (); gtk_container_add (GTK_CONTAINER (button), button->image); @@ -478,7 +482,8 @@ xfce_volume_button_scrolled (GtkWidget*widget, GdkEventScroll *event, XfceVolumeButton *button) { - gdouble value; + gdouble old_value; + gdouble new_value; gdouble step_increment; g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); @@ -489,7 +494,7 @@ xfce_volume_button_scrolled (GtkWidget*widget, return TRUE; /* Get current adjustment value and the step increment size */ - g_object_get (G_OBJECT (button->adjustment), "value", &value, "step-increment", &step_increment, NULL); + g_object_get (G_OBJECT (button->adjustment), "value", &old_value, "step-increment", &step_
[Xfce4-commits] Clearly indicate in the plugin when there is no valid card and/or element
Updating branch refs/heads/master to bd01221ec80da339af7cba076d46aa3fdeee4053 (commit) from df715a44cee9f5c1ff4a6bef3427f0c8ef717823 (commit) commit bd01221ec80da339af7cba076d46aa3fdeee4053 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Clearly indicate in the plugin when there is no valid card and/or element If the panel plugin has no valid configuration, that is no valid card and/or element, show the muted icon and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). NEWS |2 + panel-plugin/xfce-mixer-plugin.c |6 +- panel-plugin/xfce-volume-button.c | 131 +++-- panel-plugin/xfce-volume-button.h | 22 --- 4 files changed, 143 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index 5035212..01cfa15 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ - Make the panel plugin use sensible default settings (first card, master track) in the absence of an existing configuration (bug #5716, bug #6624, bug #7125). +- Clearly indicate in the plugin when there is no valid card and/or element + and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 1062d1b..ef4d49f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -610,10 +610,11 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) g_return_if_fail (IS_XFCE_MIXER_PLUGIN (mixer_plugin)); - /* Reset tooltip and return if the card or track is invalid */ + /* Set the volume button to invalid state and return if the card or track is invalid */ if (!GST_IS_MIXER (mixer_plugin->card) || !GST_IS_MIXER_TRACK (mixer_plugin->track)) { - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, NULL, NULL); + xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), FALSE); + gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, _("No valid device and/or element."), NULL); return; } @@ -641,6 +642,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) muted = !GST_MIXER_TRACK_HAS_FLAG (mixer_plugin->track, GST_MIXER_TRACK_RECORD); /* Update the volume button */ + xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), TRUE); xfce_volume_button_set_volume (XFCE_VOLUME_BUTTON (mixer_plugin->button), volume); xfce_volume_button_set_muted (XFCE_VOLUME_BUTTON (mixer_plugin->button), muted); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index adb94a7..3b5d90e 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -42,6 +42,16 @@ +/* Properties */ +enum +{ + PROP_0, + PROP_IS_CONFIGURED, + N_PROPERTIES, +}; + + + /* Signal identifiers */ enum { @@ -72,6 +82,14 @@ static void xfce_volume_button_class_init (XfceVolumeButtonClass *klas static void xfce_volume_button_init (XfceVolumeButton *button); static void xfce_volume_button_dispose(GObject *object); static void xfce_volume_button_finalize (GObject *object); +static void xfce_volume_button_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void xfce_volume_button_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); #if 0 static gboolean xfce_volume_button_key_pressed(GtkWidget *widget, GdkEventKey *event, @@ -119,6 +137,9 @@ struct _XfceVolumeButton /* Array of preloaded icons */ GdkPixbuf **pixbufs; + /* Whether the button is configured */ + gbooleanis_configured; + /* Mute state of the button */ gbooleanis_muted; }; @@ -169,10 +190,20 @@ xfce_volume_button_class_init (XfceVolumeButtonClass *klass) gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = xfce_volume_button_dispose; gobject_class->finalize = xfce_volume_button_finalize; + gobject_class->set_property = xfce_volume_button_set_property; + gobject_class->get_property = xfce_volume_button_get_property; klass->volume_changed = xfce_volume_button_volume_changed; klass->mute_toggled = xfce_volume_button_mute
[Xfce4-commits] Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips
Updating branch refs/heads/master to 87bb9e4fe2cdec665b6e7aefad2c0bc3695a2b98 (commit) from bd01221ec80da339af7cba076d46aa3fdeee4053 (commit) commit 87bb9e4fe2cdec665b6e7aefad2c0bc3695a2b98 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips NEWS |2 + panel-plugin/xfce-mixer-plugin.c | 21 +-- panel-plugin/xfce-volume-button.c | 72 + panel-plugin/xfce-volume-button.h |3 ++ 4 files changed, 78 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index 01cfa15..c056db7 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ bug #7125). - Clearly indicate in the plugin when there is no valid card and/or element and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). +- Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle + tooltips. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index ef4d49f..5f367ea 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -93,9 +93,6 @@ struct _XfceMixerPlugin /* Parent type */ XfcePanelPlugin __parent__; - /* Tooltips structure */ - GtkTooltips *tooltips; - /* Sound card being used */ GstElement *card; gchar *card_name; @@ -199,10 +196,6 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) /* Initialize the mixer library */ xfce_mixer_init (); - /* Allocate a tooltips structure */ - mixer_plugin->tooltips = gtk_tooltips_new (); - gtk_tooltips_set_delay (mixer_plugin->tooltips, 10); - /* Create container for the plugin */ mixer_plugin->hvbox = GTK_WIDGET (xfce_hvbox_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0)); xfce_panel_plugin_add_action_widget (XFCE_PANEL_PLUGIN (mixer_plugin), mixer_plugin->hvbox); @@ -523,7 +516,6 @@ static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume) { - gchar *tip_text; gint *volumes; gint volume_range; gint new_volume; @@ -537,11 +529,6 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, mixer_plugin->ignore_bus_messages = TRUE; #endif - /* Set tooltip (e.g. 'Master: 50%') */ - tip_text = g_strdup_printf (_("%s: %i%%"), mixer_plugin->track_label, (gint) (volume * 100)); - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, tip_text, "test"); - g_free (tip_text); - /* Allocate array for track volumes */ volumes = g_new (gint, mixer_plugin->track->num_channels); @@ -606,7 +593,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) gint volume_range; gdoublevolume; gint *volumes; - gchar *tip_text; g_return_if_fail (IS_XFCE_MIXER_PLUGIN (mixer_plugin)); @@ -614,7 +600,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) if (!GST_IS_MIXER (mixer_plugin->card) || !GST_IS_MIXER_TRACK (mixer_plugin->track)) { xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), FALSE); - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, _("No valid device and/or element."), NULL); return; } @@ -628,11 +613,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) /* Determine maximum value as double between 0.0 and 1.0 */ volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin->track->num_channels) - mixer_plugin->track->min_volume) / volume_range; - /* Set tooltip (e.g. 'Master: 50%') */ - tip_text = g_strdup_printf (_("%s: %i%%"), mixer_plugin->track_label, (gint) (volume * 100)); - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, tip_text, "test"); - g_free (tip_text); - /* Determine track type */ track_type = xfce_mixer_track_type_new (mixer_plugin->track); @@ -645,6 +625,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), TRUE); xfce_volume_button_set_volume (XFCE_VOLUME_BUTTON (mixer_plugin->button), volume); xfce_volume_button_set_muted (XFCE_VOLUME_BUTTON (mixer_plugin->button), muted); + xfce_volume_button_set_track_label (XFCE_VOLUME_BUTTON (mixer_plugin->button), mixer_plugin->track_label); /* Free volume array */ g_free (volumes); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index 3b5d90e..ca2236b 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -46,6 +46,7 @@ enum { PROP_0, + PROP_TRACK_LABEL, PROP_IS_CONFIGURED, N_PROPERTIES,
[Xfce4-commits] Make the panel plugin use sensible default settings
Updating branch refs/heads/master to df715a44cee9f5c1ff4a6bef3427f0c8ef717823 (commit) from 421d875b57d6a9e05cd58f79183a1691eb23633b (commit) commit df715a44cee9f5c1ff4a6bef3427f0c8ef717823 Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Make the panel plugin use sensible default settings Make the panel plugin use sensible default settings (first card, master track) in the absence of an existing configuration instead of starting in an invalid state and forcing the user to configure it (bug #5716, bug #6624, bug #7125). NEWS |3 ++ libxfce4mixer/libxfce4mixer.c | 52 libxfce4mixer/libxfce4mixer.h |2 + libxfce4mixer/xfce-mixer-track-combo.c |7 ++-- panel-plugin/xfce-mixer-plugin.c | 49 +- 5 files changed, 101 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index d6f..5035212 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ - Update the icons on theme change (bug #3498). - Support xfce4-panel 4.10 with its deskbar mode (bug #8350). - Use xfconf for the panel plugin configuration. +- Make the panel plugin use sensible default settings (first card, master + track) in the absence of an existing configuration (bug #5716, bug #6624, + bug #7125). 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index b7ad3b7..86ea5db 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -128,6 +128,23 @@ xfce_mixer_get_card (const gchar *name) +GstElement * +xfce_mixer_get_default_card (void) +{ + GList *cards; + GstElement *card = NULL; + + cards = xfce_mixer_get_cards (); + + /* Try to get the first card */ + if (g_list_length (cards) > 0) +card = g_list_first (cards)->data; + + return card; +} + + + const gchar * xfce_mixer_get_card_display_name (GstElement *card) { @@ -189,6 +206,41 @@ xfce_mixer_get_track (GstElement *card, +GstMixerTrack * +xfce_mixer_get_default_track (GstElement *card) +{ + GstMixerTrack *track = NULL; + const GList *iter; + GstMixerTrack *track_tmp; + const GList *tracks; + + g_return_val_if_fail (GST_IS_MIXER (card), NULL); + + /* Try to get the master track */ + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track_tmp = GST_MIXER_TRACK (iter->data); + + if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER)) +{ + track = track_tmp; + break; +} +} + + /* If there is no master track, try to get the first track */ + if (!GST_IS_MIXER_TRACK (track)) +{ + tracks = gst_mixer_list_tracks (GST_MIXER (card)); + if (g_list_length (tracks) > 0) +track = g_list_first (tracks)->data; +} + + return track; +} + + + #ifdef HAVE_GST_MIXER_NOTIFICATION guint xfce_mixer_bus_connect (GCallback callback, diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index a68ff6d..93365dd 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -38,11 +38,13 @@ void xfce_mixer_shutdown (void); GList *xfce_mixer_get_cards (void); GstElement*xfce_mixer_get_card (const gchar *name); +GstElement*xfce_mixer_get_default_card (void); const gchar *xfce_mixer_get_card_internal_name (GstElement*card); const gchar *xfce_mixer_get_card_display_name (GstElement*card); void xfce_mixer_select_card(GstElement*card); GstMixerTrack *xfce_mixer_get_track (GstElement*card, const gchar *track_name); +GstMixerTrack *xfce_mixer_get_default_track (GstElement*card); #ifdef HAVE_GST_MIXER_NOTIFICATION guint xfce_mixer_bus_connect(GCallback callback, diff --git a/libxfce4mixer/xfce-mixer-track-combo.c b/libxfce4mixer/xfce-mixer-track-combo.c index f99a0ef..4c19acf 100644 --- a/libxfce4mixer/xfce-mixer-track-combo.c +++ b/libxfce4mixer/xfce-mixer-track-combo.c @@ -192,7 +192,6 @@ xfce_mixer_track_combo_set_soundcard (XfceMixerTrackCombo *combo, XfceMixerTrackType type; GtkTreeItertree_iter; const GList *iter; - GList *cards; gchar *label; gint counter; gint active_index = 0; @@ -205,10 +204,10 @@ xfce_mixer_track_combo_set_soundcard (XfceMixerTrackCombo *combo, combo->card = card; else { - cards = xfce_mixer_get_cards (); + card = xfce_mixer_get_default_card (); - if (G_LIKELY (g_list_length (cards) > 0)) -combo->card = g_list_first (cards)->data; + if (GST_IS_MIXER (card)) +combo->card = card; } /* Try to re-use the current track */ diff --git a/pane
[Xfce4-commits] Support xfce4-panel 4.10 with its deskbar mode
Updating branch refs/heads/master to f0e810321ef39e0ab57b567469b3785626f7cffc (commit) from 396bda88e53ff968bbbd30c46396695de0e90476 (commit) commit f0e810321ef39e0ab57b567469b3785626f7cffc Author: Guido Berhoerster Date: Thu Sep 27 16:31:08 2012 +0200 Support xfce4-panel 4.10 with its deskbar mode Add support for the deskbar mode introduced by xfce4-panel 4.10 and set the small property for the plugin so that it only occupies a single row in deskbar mode (bug #8350). NEWS |1 + configure.ac.in |1 + panel-plugin/xfce-mixer-plugin.c |6 ++ panel-plugin/xfce-volume-button.c |6 +- 4 files changed, 13 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index ab83293..1f72815 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ - Modernize build system and build panel plugin as a module. - Use standard icons where possible. - Update the icons on theme change (bug #3498). +- Support xfce4-panel 4.10 with its deskbar mode (bug #8350). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 8624259..6a42c74 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -94,6 +94,7 @@ XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) +XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) dnl ** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index e2470a0..a396cc6 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -210,6 +210,9 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Only occupy a single row in deskbar mode */ + xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); + /* Connect to plugin signals */ g_signal_connect_swapped (G_OBJECT (plugin), "free-data", G_CALLBACK (xfce_mixer_plugin_free), mixer_plugin); g_signal_connect_swapped (G_OBJECT (plugin), "size-changed", G_CALLBACK (xfce_mixer_plugin_size_changed), mixer_plugin); @@ -231,6 +234,9 @@ xfce_mixer_plugin_size_changed (XfceMixerPlugin *mixer_plugin, { g_return_val_if_fail (mixer_plugin != NULL, FALSE); + /* The plugin only occupies a single row */ + size /= xfce_panel_plugin_get_nrows (XFCE_PANEL_PLUGIN (mixer_plugin)); + /* Determine size for the volume button icons */ size -= 2 + 2 * MAX (mixer_plugin->button->style->xthickness, mixer_plugin->button->style->ythickness); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index cc9bfed..adb94a7 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -38,6 +38,10 @@ +#define VOLUME_EPSILON 0.005 + + + /* Signal identifiers */ enum { @@ -415,7 +419,7 @@ xfce_volume_button_update (XfceVolumeButton *button) /* Determine the difference between upper and lower bound (= volume range) */ range = (upper - lower) / (G_N_ELEMENTS (icons) - 2); - if (G_UNLIKELY (button->is_muted || value < 0.005)) + if (G_UNLIKELY (button->is_muted || value < VOLUME_EPSILON)) { /* By definition, use the first icon if the button is muted or the volume is 0 */ pixbuf = button->pixbufs[0]; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Modernize build system and build panel plugin as a module
Updating branch refs/heads/master to 4f1e62309cf996f8a593438fa9edc6afa6d7b522 (commit) from f9ca75a7dedad8eaef97c0a1a11d397664bae78a (commit) commit 4f1e62309cf996f8a593438fa9edc6afa6d7b522 Author: Guido Berhoerster Date: Thu Sep 27 16:31:03 2012 +0200 Modernize build system and build panel plugin as a module Modernize configure.in.in and rename to configure.ac.in. Require a C99 capable compiler. Build the plugin as a module. Remove unnecessary trickery with desktop file substitutions. Remove HACKING, THANKS, TODO and add INSTALL file. Fix dummy ChangeLog generation. AUTHORS|1 + INSTALL| 365 Makefile.am| 19 +- NEWS |1 + TODO |9 - autogen.sh | 30 ++- configure.in.in => configure.ac.in | 24 +- panel-plugin/Makefile.am | 42 +-- ...mixer-plugin.desktop.in.in => mixer.desktop.in} |3 +- panel-plugin/xfce-mixer-plugin.c |2 +- po/POTFILES.in |4 +- xfce4-mixer/Makefile.am| 19 +- ...-mixer.desktop.in.in => xfce4-mixer.desktop.in} |0 13 files changed, 442 insertions(+), 77 deletions(-) diff --git a/AUTHORS b/AUTHORS index c40ddc1..14d2553 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,2 @@ Jannis Pohlmann +Guido Berhoerster diff --git a/HACKING b/HACKING deleted file mode 100644 index e69de29..000 diff --git a/INSTALL b/INSTALL new file mode 100644 index 000..81fd332 --- /dev/null +++ b/INSTALL @@ -0,0 +1,365 @@ +Installation Instructions +* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to instal
[Xfce4-commits] Do not try to destroy the mixer window twice after a delete-event (bug #8288)
Updating branch refs/heads/master to f9ca75a7dedad8eaef97c0a1a11d397664bae78a (commit) from b15809e07aeec55cce1d8184f4ec4905ceb97130 (commit) commit f9ca75a7dedad8eaef97c0a1a11d397664bae78a Author: Guido Berhoerster Date: Sat Sep 22 09:15:33 2012 +0200 Do not try to destroy the mixer window twice after a delete-event (bug #8288) NEWS|2 ++ xfce4-mixer/xfce-mixer-window.c |6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 50eff9e..7bdbf49 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ = - Handle a negative minimal volume correctly. - Fix a potential NULL pointer dereference. +- Do not try to destroy the mixer window twice after a delete-event + (bug #8288). 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index acbc67f..0c6a1e9 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -333,8 +333,6 @@ xfce_mixer_window_close (GtkAction *action, { /* This is a nasty hack to save the settings before the application quits */ xfce_mixer_window_closed (GTK_WIDGET (window), NULL, window); - - gtk_main_quit (); } @@ -350,7 +348,9 @@ xfce_mixer_window_closed (GtkWidget *window, gtk_window_get_size (GTK_WINDOW (mixer_window), &width, &height); g_object_set (G_OBJECT (mixer_window->preferences), "window-width", width, "window-height", height, NULL); - return FALSE; + gtk_main_quit (); + + return TRUE; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a potential NULL pointer dereference
Updating branch refs/heads/master to b15809e07aeec55cce1d8184f4ec4905ceb97130 (commit) from ddda5c6e98f17d407405a7020d7b7804f9ba4b2a (commit) commit b15809e07aeec55cce1d8184f4ec4905ceb97130 Author: Guido Berhoerster Date: Sat Sep 22 09:15:33 2012 +0200 Fix a potential NULL pointer dereference NEWS |1 + libxfce4mixer/xfce-mixer-track-type.c |4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 41ffe45..50eff9e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 4.9.0 = - Handle a negative minimal volume correctly. +- Fix a potential NULL pointer dereference. 4.8.0 diff --git a/libxfce4mixer/xfce-mixer-track-type.c b/libxfce4mixer/xfce-mixer-track-type.c index f0f1cb8..298443c 100644 --- a/libxfce4mixer/xfce-mixer-track-type.c +++ b/libxfce4mixer/xfce-mixer-track-type.c @@ -57,7 +57,9 @@ XfceMixerTrackType xfce_mixer_track_type_new (GstMixerTrack *track) { XfceMixerTrackType type = XFCE_MIXER_TRACK_TYPE_CAPTURE; - + + g_return_val_if_fail (GST_IS_MIXER_TRACK (track), G_TYPE_INVALID); + if (G_UNLIKELY (GST_IS_MIXER_OPTIONS (track))) type = XFCE_MIXER_TRACK_TYPE_OPTIONS; else ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Handle a negative minimal volume correctly
Updating branch refs/heads/master to ddda5c6e98f17d407405a7020d7b7804f9ba4b2a (commit) from 554fb0d71bd9a9df86f8aea912cbe34d3f080a81 (commit) commit ddda5c6e98f17d407405a7020d7b7804f9ba4b2a Author: Guido Berhoerster Date: Sat Sep 22 09:15:32 2012 +0200 Handle a negative minimal volume correctly NEWS |5 + configure.in.in |4 ++-- libxfce4mixer/libxfce4mixer.c|3 +++ panel-plugin/xfce-mixer-plugin.c |6 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 06eed79..41ffe45 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +4.9.0 += +- Handle a negative minimal volume correctly. + + 4.8.0 = - Fix too small plugin button in the new panel. diff --git a/configure.in.in b/configure.in.in index 0f3f977..e043134 100644 --- a/configure.in.in +++ b/configure.in.in @@ -21,11 +21,11 @@ dnl *** dnl *** Version information *** dnl *** m4_define([xfce4_mixer_version_major], [4]) -m4_define([xfce4_mixer_version_minor], [8]) +m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], []) +m4_define([xfce4_mixer_version_tag], [git]) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [svn], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 69746c0..d75c571 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -218,6 +218,9 @@ xfce_mixer_get_max_volume (gint *volumes, g_return_val_if_fail (volumes != NULL, 0); + if (num_channels > 0) +max = volumes[0]; + for (--num_channels; num_channels >= 0; --num_channels) if (volumes[num_channels] > max) max = volumes[num_channels]; diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index f6cf276..d56d43f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -525,6 +525,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) { XfceMixerTrackType track_type; gboolean muted = FALSE; + gint volume_range; gdoublevolume; gint *volumes; gchar *tip_text; @@ -537,8 +538,11 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) volumes = g_new (gint, mixer_plugin->track->num_channels); gst_mixer_get_volume (GST_MIXER (mixer_plugin->card), mixer_plugin->track, volumes); + /* Determine difference between max and min volume */ + volume_range = mixer_plugin->track->max_volume - mixer_plugin->track->min_volume; + /* Determine maximum value as double between 0.0 and 1.0 */ - volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin->track->num_channels)) / mixer_plugin->track->max_volume; + volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin->track->num_channels) - mixer_plugin->track->min_volume) / volume_range; /* Set tooltip (e.g. 'Master: 50%') */ tip_text = g_strdup_printf (_("%s: %i%%"), mixer_plugin->track_label, (gint) (volume * 100)); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Improve usability of the mixer and plugin configuration dialog
Updating branch refs/heads/gber/improvements to 55c363bff10c6c19213ca11d3738348d8848e9e8 (commit) from 3188fdb09b84ef7fcea91c1a82293f1a147db425 (commit) commit 55c363bff10c6c19213ca11d3738348d8848e9e8 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Improve usability of the mixer and plugin configuration dialog Add mnemonics for all tabs and the soud card combob box of the mixer main window. Add labels with mnemonics for the soud card and track combo boxes of the plugin configuration dialog. Improve the wording of the message shown when no controls are visible and visually follow the layout of an alert popup. NEWS |6 panel-plugin/xfce-plugin-dialog.c | 45 xfce4-mixer/xfce-mixer-container.c | 29 --- xfce4-mixer/xfce-mixer-window.c|6 +--- 4 files changed, 48 insertions(+), 38 deletions(-) diff --git a/NEWS b/NEWS index 9b0940e..1c6733c 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,12 @@ left and right of them. - Default to unlocked state if the volume differs between the channels of a track. +- Add mnemonics for all tabs and the soud card combob box of the mixer main + window. +- Add labels with mnemonics for the soud card and track combo boxes of the + plugin configuration dialog. +- Improve the wording of the message shown when no controls are visible and + visually follow the layout of an alert popup. 4.8.0 diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 7c16644..cae8a44 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -143,10 +143,9 @@ static void xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) { GtkWidget *alignment; - GtkWidget *vbox; + GtkWidget *table; GtkWidget *button; GtkWidget *label; - gchar *title; gtk_window_set_icon_name (GTK_WINDOW (dialog), "multimedia-volume-control"); gtk_window_set_title (GTK_WINDOW (dialog), _("Audio Mixer Plugin")); @@ -157,43 +156,29 @@ xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_show (button); - vbox = gtk_vbox_new (FALSE, 6); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); - gtk_widget_show (vbox); + table = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 12); + gtk_table_set_col_spacings (GTK_TABLE (table), 12); + gtk_container_set_border_width (GTK_CONTAINER (table), 6); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table); + gtk_widget_show (table); - label = gtk_label_new (NULL); - title = g_strdup_printf ("%s", _("Sound card")); - gtk_label_set_markup (GTK_LABEL (label), title); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + label = gtk_label_new_with_mnemonic (_("Sound _card:")); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_show (label); - g_free (title); - - alignment = gtk_alignment_new (0.0, 0.0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0); - gtk_widget_show (alignment); dialog->card_combo = xfce_mixer_card_combo_new (NULL); - gtk_container_add (GTK_CONTAINER (alignment), dialog->card_combo); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->card_combo); + gtk_table_attach (GTK_TABLE (table), dialog->card_combo, 1, 2, 0, 1, GTK_FILL|GTK_EXPAND, GTK_SHRINK, 0, 0); gtk_widget_show (dialog->card_combo); - label = gtk_label_new (NULL); - title = g_strdup_printf ("%s", _("Mixer track")); - gtk_label_set_markup (GTK_LABEL (label), title); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + label = gtk_label_new_with_mnemonic (_("Mixer _track:")); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->track_combo); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_show (label); - g_free (title); - - alignment = gtk_alignment_new (0.0, 0.0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0); - gtk_widget_show (alignment); dialog->track_combo = xfce_mixer_track_combo_new (NULL, NULL); - gtk_container_add (GTK_CONTAINER (alignment), dialog->track_combo); + gtk_table_attach (GTK_TABLE (table), dialog->track_combo, 1, 2, 1, 2, GTK_FILL|GTK_EXPAND, GTK_SHRINK, 0, 0); gtk_widg
[Xfce4-commits] Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages
Updating branch refs/heads/gber/improvements to fb97549cd34ed3fdc3f8a9d5b1d58a0e9facf65e (commit) from 1cc5a806d513be3e3424ea270342ed72e0a18739 (commit) commit fb97549cd34ed3fdc3f8a9d5b1d58a0e9facf65e Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages Connect every mixer to a GstBus in libxfce4mixer and add a signal handler for messages that handles GST_MIXER_MESSAGE_MIXER_CHANGED messages for every card and adds labels to all tracks. Refactor XfceMixer in order to allow updating itself in case the tracks have changed, preserving the currently active tab if possible; handle GST_MIXER_MESSAGE_MIXER_CHANGED messages accordingly and allow the card property to be changed. Make XfceMixerTrackCombo and XfceMixerControlsDialog listen to the bus and handle GST_MIXER_MESSAGE_MIXER_CHANGED messages for the current sound card by rebuilding the track list. Let XfceMixerPlugin refresh the track and attemt to retain the currently selected one when receiving a GST_MIXER_MESSAGE_MIXER_CHANGED for the currently selected card. NEWS |2 + libxfce4mixer/libxfce4mixer.c| 57 - libxfce4mixer/xfce-mixer-track-combo.c | 78 -- panel-plugin/xfce-mixer-plugin.c | 17 +- xfce4-mixer/xfce-mixer-controls-dialog.c | 40 +++- xfce4-mixer/xfce-mixer-window.c | 51 ++-- xfce4-mixer/xfce-mixer.c | 432 +- xfce4-mixer/xfce-mixer.h |4 +- 8 files changed, 430 insertions(+), 251 deletions(-) diff --git a/NEWS b/NEWS index 9798e77..eedf761 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,8 @@ - Handle tracks which are marked read-only by GStreamer or which have no mute or record functionality by making the corresponding widgets insensitive. Prevent read-only tracks from being selected in the panel-plugin. +- Handle mixer changed messages which indicate that the tracks of a mixer have + changed. 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 451e1d8..244196c 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -40,11 +40,16 @@ -static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, - gpointer user_data); -static void _xfce_mixer_add_track_labels (gpointer data, - gpointer user_data); -static void _xfce_mixer_destroy_mixer(GstMixer *mixer); +static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, + gpointeruser_data); +static void _xfce_mixer_add_track_labels (gpointerdata, + gpointeruser_data); +static void _xfce_mixer_init_mixer (gpointerdata, + gpointeruser_data); +static void _xfce_mixer_destroy_mixer(GstMixer *mixer); +static void _xfce_mixer_bus_message (GstBus *bus, + GstMessage *message, + gpointeruser_data); @@ -85,12 +90,16 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, &counter); - /* Add custom labels to all tracks of all mixers */ - g_list_foreach (mixers, (GFunc) _xfce_mixer_add_track_labels, NULL); - /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); + + /* + * Add custom labels to all tracks of all mixers and create a GstBus for + * each mixer device and connect an internal signal handler to receive + * notifications about track list changes + */ + g_list_foreach (mixers, (GFunc) _xfce_mixer_init_mixer, NULL); } } @@ -188,7 +197,6 @@ xfce_mixer_select_card (GstElement *card) { g_return_if_fail (GST_IS_MIXER (card)); - gst_element_set_bus (card, bus); selected_card = card; } @@ -361,6 +369,7 @@ void xfce_mixer_bus_disconnect (guint signal_handler_id) { g_return_if_fail (refcount > 0); + if (signal_handler_id != 0) g_signal_handler_disconnect (bus, signal_handler_id); } @@ -478,14 +487,44 @@ _xfce_mixer_add_track_labels (gpointer data, static void +_xfce_mixer_init_mixer (gpointer data, +gpointer user_data) +{ + GstMixer *card = GST_MIXER (data); + + /* Add custom labels to all tracks */ + _xfce_mixer_add_track_labels (card, NULL); + + /* Add bus to every card and connect to internal signal handler */ + gst_element_set_bus (GST_ELEMENT (card), bus); + g_signal_connect (bus, "message::element", G_CALLBACK (_xfce_mixer_bus_message), NULL); +} +
[Xfce4-commits] Improve the mixer widgets
Updating branch refs/heads/gber/improvements to 504d1ac40d5dfc393510d9979f2df8761017a1ae (commit) from fc0f8d26f5bcd194a1e69118086b847ee55de251 (commit) commit 504d1ac40d5dfc393510d9979f2df8761017a1ae Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Improve the mixer widgets Separate labels from track and option widgets and align labels and option widgets horizontally. Reduce the distance between faders in track widgets and ensure it is always the same. Put the chain buttons above the mute and record buttons and add lines to the left and right of them. Default to unlocked state if the volume differs between the channels of a track. NEWS|8 ++ xfce4-mixer/xfce-mixer-option.c | 42 ++- xfce4-mixer/xfce-mixer-switch.c | 39 +++ xfce4-mixer/xfce-mixer-track.c | 251 --- xfce4-mixer/xfce-mixer.c| 60 +++--- 5 files changed, 263 insertions(+), 137 deletions(-) diff --git a/NEWS b/NEWS index 0d0eb5b..9b0940e 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,14 @@ changed. - Handle options list changed messages which indicate that the available options of a track have changed. +- Separate labels from track and option widgets and align labels and option + widgets horizontally. +- Reduce the distance between faders in track widgets and ensure it is always + the same. +- Put the chain buttons above the mute and record buttons and add lines to the + left and right of them. +- Default to unlocked state if the volume differs between the channels of a + track. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c index 8ad8682..c9a79b5 100644 --- a/xfce4-mixer/xfce-mixer-option.c +++ b/xfce4-mixer/xfce-mixer-option.c @@ -54,12 +54,12 @@ static void xfce_mixer_option_bus_message (GstBus *bus, struct _XfceMixerOptionClass { - GtkHBoxClass __parent__; + GtkComboBoxClass __parent__; }; struct _XfceMixerOption { - GtkHBox __parent__; + GtkComboBox__parent__; GtkListStore *list_store; @@ -67,8 +67,6 @@ struct _XfceMixerOption GstMixerTrack *track; guint signal_handler_id; - GtkWidget *combo; - gboolean ignore_signals; }; @@ -99,7 +97,7 @@ xfce_mixer_option_get_type (void) NULL, }; - type = g_type_register_static (GTK_TYPE_HBOX, "XfceMixerOption", &info, 0); + type = g_type_register_static (GTK_TYPE_COMBO_BOX, "XfceMixerOption", &info, 0); } return type; @@ -181,26 +179,13 @@ static void xfce_mixer_option_create_contents (XfceMixerOption *option) { GstMixerOptions *options; - GtkWidget *label; GtkCellRenderer *renderer; const GList *options_iter; GtkTreeIter tree_iter; const gchar *active_option; - const gchar *track_label; - gchar *title; gint i; gint active_index = 0; - gtk_box_set_homogeneous (GTK_BOX (option), FALSE); - gtk_box_set_spacing (GTK_BOX (option), 12); - - track_label = xfce_mixer_get_track_label (option->track); - title = g_strdup_printf ("%s:", track_label); - - label = gtk_label_new (title); - gtk_box_pack_start (GTK_BOX (option), label, FALSE, FALSE, 0); - gtk_widget_show (label); - options = GST_MIXER_OPTIONS (option->track); active_option = gst_mixer_get_option (GST_MIXER (option->card), options); @@ -215,21 +200,18 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) active_index = i; } - option->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (option->list_store)); - gtk_box_pack_start (GTK_BOX (option), option->combo, FALSE, FALSE, 0); + gtk_combo_box_set_model (GTK_COMBO_BOX (option), GTK_TREE_MODEL (option->list_store)); /* Make read-only options insensitive */ if (GST_MIXER_TRACK_HAS_FLAG (option->track, GST_MIXER_TRACK_READONLY)) -gtk_widget_set_sensitive (option->combo, FALSE); - gtk_combo_box_set_active (GTK_COMBO_BOX (option->combo), active_index); - gtk_widget_show (option->combo); +gtk_widget_set_sensitive (GTK_WIDGET (option), FALSE); + gtk_combo_box_set_active (GTK_COMBO_BOX (option), active_index); + gtk_widget_show (GTK_WIDGET (option)); renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (option->combo), renderer, TRUE); - gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (option->combo), renderer, "text", OPTION_COLUMN); - - g_signal_connect (option->combo, "changed", G_CALLBACK (xfce_mixer_option_changed), option); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (option), renderer, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (option), renderer, "text", OPTION_COLUMN); - g_free (title); + g_signal_connect (option, "changed", G_CALL
[Xfce4-commits] Handle read-only tracks or tracks with no mute/record functionality
Updating branch refs/heads/gber/improvements to 1cc5a806d513be3e3424ea270342ed72e0a18739 (commit) from 3c50d140ccf8b220de5efb9b7965abb3936f8774 (commit) commit 1cc5a806d513be3e3424ea270342ed72e0a18739 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Handle read-only tracks or tracks with no mute/record functionality Handle tracks which are marked read-only by GStreamer by making the corresponding widgets insensitive in the mixer application and by preventing them from being selected in the panel plugin. Require GStreamer 0.10.25 in order avoid #ifdefs. Handle missing record/mute functionality by making the corresponding buttons in the mixer application UI insensitive and by disallowing mute actions in the panel plugin. NEWS |3 + configure.in.in|2 +- libxfce4mixer/libxfce4mixer.c | 47 +++- libxfce4mixer/xfce-mixer-track-combo.c | 16 +-- panel-plugin/xfce-mixer-plugin.c | 65 +-- panel-plugin/xfce-volume-button.c | 76 --- panel-plugin/xfce-volume-button.h |3 + xfce4-mixer/xfce-mixer-option.c|3 + xfce4-mixer/xfce-mixer-switch.c|9 xfce4-mixer/xfce-mixer-track.c | 15 ++ 10 files changed, 200 insertions(+), 39 deletions(-) diff --git a/NEWS b/NEWS index 10f1d89..9798e77 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,9 @@ - Add runtime debugging mode to both the mixer and the panel plugin. - Add man page for xfce4-mixer. - Handle identically named tracks by making use of the track index property. +- Handle tracks which are marked read-only by GStreamer or which have no mute + or record functionality by making the corresponding widgets insensitive. + Prevent read-only tracks from being selected in the panel-plugin. 4.8.0 diff --git a/configure.in.in b/configure.in.in index a1f7c12..05cbd93 100644 --- a/configure.in.in +++ b/configure.in.in @@ -92,7 +92,7 @@ dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) -XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) +XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.25]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([UNIQUE], [unique-1.0], [1.1]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index c14ee27..451e1d8 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -224,31 +224,56 @@ xfce_mixer_get_track (GstElement *card, GstMixerTrack * xfce_mixer_get_default_track (GstElement *card) { - GstMixerTrack *track = NULL; - const GList *iter; - GstMixerTrack *track_tmp; - const GList *tracks; + GstMixerTrack *track = NULL; + XfceMixerTrackType track_type = G_TYPE_INVALID; + const GList*iter; + GstMixerTrack *track_tmp; + XfceMixerTrackType track_type_tmp; g_return_val_if_fail (GST_IS_MIXER (card), NULL); - /* Try to get the master track */ + /* + * Try to get the master track if it is a playback or capture track and not + * read-only + */ for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) { track_tmp = GST_MIXER_TRACK (iter->data); + track_type_tmp = xfce_mixer_track_type_new (track_tmp); - if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER)) + if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER) && + (track_type_tmp == XFCE_MIXER_TRACK_TYPE_PLAYBACK || + track_type_tmp == XFCE_MIXER_TRACK_TYPE_CAPTURE) && + !GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_READONLY)) { track = track_tmp; + track_type = track_type_tmp; break; } } - /* If there is no master track, try to get the first track */ - if (!GST_IS_MIXER_TRACK (track)) + /* + * If there is no master track, try to get the first track which is a + * playback or capture track and not read-only + */ + if (!GST_IS_MIXER_TRACK (track) || + (track_type != XFCE_MIXER_TRACK_TYPE_PLAYBACK && + track_type != XFCE_MIXER_TRACK_TYPE_CAPTURE) || + GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_READONLY)) { - tracks = gst_mixer_list_tracks (GST_MIXER (card)); - if (g_list_length (tracks) > 0) -track = g_list_first (tracks)->data; + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track_tmp = GST_MIXER_TRACK (iter->data); + track_type = xfce_mixer_track_type_new (trac
[Xfce4-commits] Handle GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED messages in XfceMixerOption
Updating branch refs/heads/gber/improvements to fc0f8d26f5bcd194a1e69118086b847ee55de251 (commit) from fb97549cd34ed3fdc3f8a9d5b1d58a0e9facf65e (commit) commit fc0f8d26f5bcd194a1e69118086b847ee55de251 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Handle GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED messages in XfceMixerOption NEWS|2 + xfce4-mixer/xfce-mixer-option.c | 120 +++ 2 files changed, 99 insertions(+), 23 deletions(-) diff --git a/NEWS b/NEWS index eedf761..0d0eb5b 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,8 @@ Prevent read-only tracks from being selected in the panel-plugin. - Handle mixer changed messages which indicate that the tracks of a mixer have changed. +- Handle options list changed messages which indicate that the available + options of a track have changed. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c index e965378..8ad8682 100644 --- a/xfce4-mixer/xfce-mixer-option.c +++ b/xfce4-mixer/xfce-mixer-option.c @@ -1,6 +1,7 @@ /* vi:set expandtab sw=2 sts=2: */ /*- * Copyright (c) 2008 Jannis Pohlmann + * Copyright (c) 2012 Guido Berhoerster * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +35,10 @@ +#define OPTION_COLUMN 0 + + + static void xfce_mixer_option_class_init (XfceMixerOptionClass *klass); static void xfce_mixer_option_init(XfceMixerOption *option); static void xfce_mixer_option_dispose (GObject *object); @@ -41,6 +46,9 @@ static void xfce_mixer_option_finalize(GObject *object); static void xfce_mixer_option_create_contents (XfceMixerOption *option); static void xfce_mixer_option_changed (GtkComboBox *combo, XfceMixerOption *option); +static void xfce_mixer_option_bus_message (GstBus *bus, + GstMessage *message, + XfceMixerOption *option); @@ -53,8 +61,11 @@ struct _XfceMixerOption { GtkHBox __parent__; + GtkListStore *list_store; + GstElement*card; GstMixerTrack *track; + guint signal_handler_id; GtkWidget *combo; @@ -115,6 +126,8 @@ static void xfce_mixer_option_init (XfceMixerOption *option) { option->ignore_signals = FALSE; + + option->signal_handler_id = xfce_mixer_bus_connect (G_CALLBACK (xfce_mixer_option_bus_message), option); } @@ -130,6 +143,16 @@ xfce_mixer_option_dispose (GObject *object) static void xfce_mixer_option_finalize (GObject *object) { + XfceMixerOption *option = XFCE_MIXER_OPTION (object); + + if (option->signal_handler_id > 0) +{ + xfce_mixer_bus_disconnect (option->signal_handler_id); + option->signal_handler_id = 0; +} + + gtk_list_store_clear (option->list_store); + g_object_unref (option->list_store); } @@ -159,11 +182,14 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) { GstMixerOptions *options; GtkWidget *label; - const GList *iter; + GtkCellRenderer *renderer; + const GList *options_iter; + GtkTreeIter tree_iter; const gchar *active_option; const gchar *track_label; gchar *title; gint i; + gint active_index = 0; gtk_box_set_homogeneous (GTK_BOX (option), FALSE); gtk_box_set_spacing (GTK_BOX (option), 12); @@ -178,22 +204,29 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) options = GST_MIXER_OPTIONS (option->track); active_option = gst_mixer_get_option (GST_MIXER (option->card), options); - option->combo = gtk_combo_box_new_text (); + option->list_store = gtk_list_store_new (2, G_TYPE_STRING, GST_TYPE_MIXER_TRACK); - for (iter = options->values, i = 0; iter != NULL; iter = g_list_next (iter), ++i) + for (options_iter = gst_mixer_options_get_values (options), i = 0; options_iter != NULL; options_iter = g_list_next (options_iter), ++i) { - gtk_combo_box_append_text (GTK_COMBO_BOX (option->combo), iter->data); + gtk_list_store_append (option->list_store, &tree_iter); + gtk_list_store_set (option->list_store, &tree_iter, OPTION_COLUMN, options_iter->data, -1); - if (G_UNLIKELY (g_utf8_collate (active_option, iter->data) == 0)) -gtk_combo_box_set_active (GTK_COMBO_BOX (option->combo), i); + if (G_UNLIKELY (g_utf8_collate (active_option, options_iter->data) == 0)) +active_index = i; } - + + option->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (option->list_store)); gtk_box_pack_start (GTK_BOX (option), option->combo, FALSE, FALSE, 0);
[Xfce4-commits] Handle identically named tracks by making use of the track index property
Updating branch refs/heads/gber/improvements to 3c50d140ccf8b220de5efb9b7965abb3936f8774 (commit) from bdb4f9ff7fb216a224f864447806d4ce912cc475 (commit) commit 3c50d140ccf8b220de5efb9b7965abb3936f8774 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Handle identically named tracks by making use of the track index property Handle identically named tracks by using an custom track label which sonsists of the GstMixerTrack label property and the index value if it is greater than 0. NEWS |1 + libxfce4mixer/libxfce4mixer.c| 62 ++ libxfce4mixer/libxfce4mixer.h|1 + libxfce4mixer/xfce-mixer-preferences.c | 16 libxfce4mixer/xfce-mixer-track-combo.c |7 +--- panel-plugin/xfce-mixer-plugin.c | 15 +++ panel-plugin/xfce-plugin-dialog.c| 13 ++ xfce4-mixer/xfce-mixer-controls-dialog.c | 17 +++- xfce4-mixer/xfce-mixer-option.c |5 +- xfce4-mixer/xfce-mixer-switch.c |5 +- xfce4-mixer/xfce-mixer-track.c |6 +-- xfce4-mixer/xfce-mixer.c | 27 - 12 files changed, 97 insertions(+), 78 deletions(-) diff --git a/NEWS b/NEWS index 72651a7..10f1d89 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ - Add tooltips to scale widgets in the mixer. - Add runtime debugging mode to both the mixer and the panel plugin. - Add man page for xfce4-mixer. +- Handle identically named tracks by making use of the track index property. 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index da0bfe4..c14ee27 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -40,9 +40,11 @@ -static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, - gpointer user_data); -static void _xfce_mixer_destroy_mixer (GstMixer *mixer); +static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, + gpointer user_data); +static void _xfce_mixer_add_track_labels (gpointer data, + gpointer user_data); +static void _xfce_mixer_destroy_mixer(GstMixer *mixer); @@ -83,6 +85,9 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, &counter); + /* Add custom labels to all tracks of all mixers */ + g_list_foreach (mixers, (GFunc) _xfce_mixer_add_track_labels, NULL); + /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); @@ -195,23 +200,20 @@ xfce_mixer_get_track (GstElement *card, { GstMixerTrack *track = NULL; const GList *iter; - gchar *label; + const gchar *label; g_return_val_if_fail (GST_IS_MIXER (card), NULL); g_return_val_if_fail (track_name != NULL, NULL); for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) { - g_object_get (GST_MIXER_TRACK (iter->data), "label", &label, NULL); + label = xfce_mixer_get_track_label (GST_MIXER_TRACK (iter->data)); if (g_utf8_collate (label, track_name) == 0) { track = iter->data; - g_free (label); break; } - - g_free (label); } return track; @@ -311,6 +313,15 @@ xfce_mixer_get_default_track_list (GstElement *card) +const gchar * +xfce_mixer_get_track_label (GstMixerTrack *track) +{ + g_return_val_if_fail (GST_IS_MIXER_TRACK (track), NULL); + return g_object_get_data (G_OBJECT (track), "xfce-mixer-track-label"); +} + + + guint xfce_mixer_bus_connect (GCallback callback, gpointer user_data) @@ -407,6 +418,41 @@ _xfce_mixer_filter_mixer (GstMixer *mixer, static void +_xfce_mixer_add_track_labels (gpointer data, + gpointer user_data) +{ + GstMixer *mixer = GST_MIXER (data); + const GList *iter; + GstMixerTrack *track; + gchar *label; + gchar *xfce_mixer_label; + guint index; + + for (iter = gst_mixer_list_tracks (mixer); iter != NULL; iter = g_list_next (iter)) +{ + track = GST_MIXER_TRACK (iter->data); + + g_object_get (track, "label", &label, "index", &index, NULL); + + /* + * Build display label including the index if there are mutiple tracks of + * the same name + */ + if (index > 0) +xfce_mixer_label = g_strdup_printf ("%s (%d)", label, index); + else +xfce_mixer_label = g_strdup (label); + + /* Set label to be used by xfce4-mixer */ + g_object_set_data_full (G_OBJECT (track), "xfce-mixer-track-label", x
[Xfce4-commits] Add runtime debugging mode
Updating branch refs/heads/gber/improvements to f89cede2c468f683f3c99593f320073d99f19c1e (commit) from 3805dc99e574268e8c08a42e6b1d129025fed21c (commit) commit f89cede2c468f683f3c99593f320073d99f19c1e Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Add runtime debugging mode Add a runtime debugging mode to both the mixer application and the panel plugin which will print additional diagnostic output. Add a "--debug" command line option to xfce4-mixer which will activate the debugging mode. Make the panel plugin look for the PANEL_DEBUG environment variable containing "mixer" in order to enable the debugging mode. Add custom xfce_mixer_debug() function for printing debugging output. Replace DBG() macro with xfce_mixer_debug(). Print relevant GStreamer data on startup when in debugging mode. Add "--version command" line option to xfce4-mixer which will print the version. NEWS |1 + README | 14 ++ libxfce4mixer/Makefile.am|4 +- libxfce4mixer/libxfce4mixer.c|4 + libxfce4mixer/libxfce4mixer.h|1 + libxfce4mixer/xfce-mixer-debug.c | 259 ++ libxfce4mixer/xfce-mixer-debug.h | 53 panel-plugin/xfce-mixer-plugin.c | 14 ++ xfce4-mixer/Makefile.am |1 + xfce4-mixer/main.c | 58 +++-- xfce4-mixer/xfce-mixer.c |8 +- 11 files changed, 398 insertions(+), 19 deletions(-) diff --git a/NEWS b/NEWS index 2286c16..b9aa6b5 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,7 @@ xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. - Add tooltips to scale widgets in the mixer. +- Add runtime debugging mode to both the mixer and the panel plugin. 4.8.0 diff --git a/README b/README index 98df7c5..48756f0 100644 --- a/README +++ b/README @@ -5,6 +5,19 @@ This package contains a volume control application based on GStreamer 0.10 written to conceptually fit into the Xfce desktop environment. It includes a plugin for the Xfce panel. + +Debugging +- + +Both the mixer application and the panel plugin have a builtin debugging mode +which will print additional diagnostic output useful for bug reports. For +xfce4-mixer it can be activated by specifying the --debug command line option, +diagnostic messages will be printed to stderr. For the panel plugin, please +follow the instructions at http://docs.xfce.org/xfce/xfce4-panel/debugging and +set the PANEL_DEBUG environment variable to "mixer", the disgnostic output can +then be found in the log file corresponding to the plugin. + + Known Problems with GStreamer - @@ -13,3 +26,4 @@ Known Problems with GStreamer Debian or Ubuntu system and you're using ALSA then installing gstreamer0.10-alsa should fix it. On OpenBSD installing gst-plugins-good might help. + diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 8f44cd4..4107cdd 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -15,7 +15,9 @@ libxfce4mixer_la_SOURCES = \ xfce-mixer-track-type.h \ xfce-mixer-track-type.c \ xfce-mixer-preferences.h\ - xfce-mixer-preferences.c + xfce-mixer-preferences.c\ + xfce-mixer-debug.h \ + xfce-mixer-debug.c libxfce4mixer_la_CFLAGS = \ -I$(top_builddir) \ diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 6ca9466..da0bfe4 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -23,6 +23,10 @@ #include #endif +#ifdef HAVE_STRING_H +#include +#endif + #include #include diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 473817c..8628df9 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -32,6 +32,7 @@ #include "xfce-mixer-card-combo.h" #include "xfce-mixer-track-combo.h" #include "xfce-mixer-track-type.h" +#include "xfce-mixer-debug.h" #define XFCE_MIXER_TYPE_VALUE_ARRAY (xfce_mixer_value_array_get_type ()) diff --git a/libxfce4mixer/xfce-mixer-debug.c b/libxfce4mixer/xfce-mixer-debug.c new file mode 100644 index 000..a5b6205 --- /dev/null +++ b/libxfce4mixer/xfce-mixer-debug.c @@ -0,0 +1,259 @@ +/* vi:set expandtab sw=2 sts=2: */ +/*- + * Copyright (c) 2012 Guido Berhoerster + * + * This program is free software; you can redistribute it and/or modify + * it under the ter
[Xfce4-commits] Add man page for xfce4-mixer
Updating branch refs/heads/gber/improvements to bdb4f9ff7fb216a224f864447806d4ce912cc475 (commit) from 7d7a0be13c09457d40fb27e5161bc1dd14cacc4e (commit) commit bdb4f9ff7fb216a224f864447806d4ce912cc475 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Add man page for xfce4-mixer NEWS |1 + xfce4-mixer/Makefile.am |2 ++ xfce4-mixer/xfce4-mixer.1 | 43 +++ 3 files changed, 46 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index b9aa6b5..72651a7 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ more meaningful. - Add tooltips to scale widgets in the mixer. - Add runtime debugging mode to both the mixer and the panel plugin. +- Add man page for xfce4-mixer. 4.8.0 diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index 819ab28..820711f 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -51,6 +51,8 @@ xfce4_mixer_LDFLAGS = \ -lgstaudio-0.10 \ -lgstinterfaces-0.10 +dist_man_MANS = xfce4-mixer.1 + desktop_in_files = xfce4-mixer.desktop.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) diff --git a/xfce4-mixer/xfce4-mixer.1 b/xfce4-mixer/xfce4-mixer.1 new file mode 100644 index 000..39b266b --- /dev/null +++ b/xfce4-mixer/xfce4-mixer.1 @@ -0,0 +1,43 @@ +.\" Copyright (c) 2012 Guido Berhoerster +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +.\" +.TH XFCE4\-MIXER 1 "1 Aug 2012" +.SH NAME +xfce4\-mixer \- adjust volume levels +.SH SYNOPSIS +\fBxfce4\-mixer\fR +[\fB\-dhV?\fR] +.SH DESCRIPTION +\fBxfce4\-mixer\fR is an audio mixer which allows you to adjust input and +output volume levels on your sound card(s). +.SH OPTIONS +The following options are supported: +.TP +.BR \-d ", " \-\-debug +Print diagnostic output useful for debugging to stderr. +.TP +.BR \-h ", " \-? ", " \-\-help +Print a summary of all command line options and exit. +.TP +.BR \-V ", " \-\-version +Print the version number and exit. +.SH EXIT STATUS +.TP +.B 0 +The program has exited normally. +.TP +.B >0 +An Error has occurred. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Use CPPFLAGS in Makefiles
Updating branch refs/heads/gber/improvements to 7d7a0be13c09457d40fb27e5161bc1dd14cacc4e (commit) from f89cede2c468f683f3c99593f320073d99f19c1e (commit) commit 7d7a0be13c09457d40fb27e5161bc1dd14cacc4e Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Use CPPFLAGS in Makefiles libxfce4mixer/Makefile.am |6 -- panel-plugin/Makefile.am |6 -- xfce4-mixer/Makefile.am |8 +--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 4107cdd..792a95e 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -19,13 +19,15 @@ libxfce4mixer_la_SOURCES = \ xfce-mixer-debug.h \ xfce-mixer-debug.c -libxfce4mixer_la_CFLAGS = \ +libxfce4mixer_la_CPPFLAGS =\ -I$(top_builddir) \ -I$(top_srcdir) \ -DDATADIR=\"$(datadir)\"\ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DG_LOG_DOMAIN=\"libxfce4mixer\"\ - -DMIXER_DATADIR=\"$(pkgdatadir)\" \ + -DMIXER_DATADIR=\"$(pkgdatadir)\" + +libxfce4mixer_la_CFLAGS = \ $(PLATFORM_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_FLAGS)\ diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index fa27e29..a494682 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -12,12 +12,14 @@ libmixer_la_SOURCES = \ xfce-mixer-plugin.h \ xfce-mixer-plugin.c -libmixer_la_CFLAGS = \ +libmixer_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir) \ -DDATADIR=\"$(datadir)\"\ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ - -DG_LOG_DOMAIN=\"xfce4-mixer-plugin\" \ + -DG_LOG_DOMAIN=\"xfce4-mixer-plugin\" + +libmixer_la_CFLAGS = \ $(PLATFORM_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index 8735737..819ab28 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -18,13 +18,15 @@ xfce4_mixer_SOURCES = \ xfce-mixer-window.h \ xfce-mixer-window.c -xfce4_mixer_CFLAGS = \ +xfce4_mixer_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir) \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DDATADIR=\"$(datadir)\"\ -DMIXER_DATADIR=\"$(pkgdatadir)\" \ - -DG_LOG_DOMAIN=\"xfce4-mixer\" \ + -DG_LOG_DOMAIN=\"xfce4-mixer\" + +xfce4_mixer_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(UNIQUE_CFLAGS)\ @@ -35,7 +37,7 @@ xfce4_mixer_CFLAGS = \ xfce4_mixer_DEPENDENCIES = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la - + xfce4_mixer_LDFLAGS = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la \ $(GLIB_LIBS)\ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add tooltips to scale widgets in the mixer
Updating branch refs/heads/gber/improvements to 3805dc99e574268e8c08a42e6b1d129025fed21c (commit) from 0ba34e52028d6e448151738ceaebe579e0cc72f9 (commit) commit 3805dc99e574268e8c08a42e6b1d129025fed21c Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Add tooltips to scale widgets in the mixer NEWS |1 + xfce4-mixer/xfce-mixer-track.c | 24 +++- 2 files changed, 24 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 4cb9822..2286c16 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ - Remove UI for configuring the mixer command from the panel plugin and assume xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. +- Add tooltips to scale widgets in the mixer. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-track.c b/xfce4-mixer/xfce-mixer-track.c index 579f562..366a557 100644 --- a/xfce4-mixer/xfce-mixer-track.c +++ b/xfce4-mixer/xfce-mixer-track.c @@ -185,6 +185,7 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) GtkWidget *fader; gdouble step; gchar *track_label; + gchar *tooltip_text; gint channel; gint columns; gint*volumes; @@ -203,7 +204,6 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) /* Put the name of the track on top of the other elements */ g_object_get (track->gst_track, "label", &track_label, NULL); label = gtk_label_new (track_label); - g_free (track_label); gtk_misc_set_alignment (GTK_MISC (label), 0.5f, 0.5f); gtk_table_attach (GTK_TABLE (track), label, 0, columns, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0); gtk_widget_show (label); @@ -213,15 +213,20 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) /* Create a fader for each channel */ for (channel = 0; channel < track->gst_track->num_channels; ++channel) { + tooltip_text = g_strdup_printf (_("Volume of channel %d on %s"), channel, track_label); + fader = gtk_vscale_new_with_range (track->gst_track->min_volume, track->gst_track->max_volume, step); gtk_scale_set_draw_value (GTK_SCALE (fader), FALSE); gtk_range_set_inverted (GTK_RANGE (fader), TRUE); gtk_range_set_value (GTK_RANGE (fader), volumes[channel]); + gtk_widget_set_tooltip_text (fader, tooltip_text); g_signal_connect (fader, "value-changed", G_CALLBACK (xfce_mixer_track_fader_changed), track); gtk_table_attach (GTK_TABLE (track), fader, channel, channel + 1, 1, 2, GTK_SHRINK, GTK_FILL|GTK_EXPAND, 0, 0); gtk_widget_show (fader); track->channel_faders = g_list_append (track->channel_faders, fader); + + g_free (tooltip_text); } /* Create a horizontal for the control buttons */ @@ -232,34 +237,49 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track) /* Create mute button for playback tracks */ if (G_LIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { + tooltip_text = g_strdup_printf (_("Mute/unmute %s"), track_label); + track->mute_button = gtk_toggle_button_new (); image = gtk_image_new_from_icon_name ("audio-volume-high", XFCE_MIXER_ICON_SIZE); gtk_button_set_image (GTK_BUTTON (track->mute_button), image); + gtk_widget_set_tooltip_text (track->mute_button, tooltip_text); g_signal_connect (track->mute_button, "toggled", G_CALLBACK (xfce_mixer_track_mute_toggled), track); gtk_box_pack_start (GTK_BOX (button_box), track->mute_button, FALSE, FALSE, 0); gtk_widget_show (track->mute_button); + + g_free (tooltip_text); } if (G_LIKELY (track->gst_track->num_channels >= 2)) { + tooltip_text = g_strdup_printf (_("Lock channels for %s together"), track_label); + track->lock_button = gtk_toggle_button_new (); image = gtk_image_new_from_file (DATADIR "/pixmaps/xfce4-mixer/chain.png"); gtk_button_set_image (GTK_BUTTON (track->lock_button), image); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track->lock_button), TRUE); + gtk_widget_set_tooltip_text (track->lock_button, tooltip_text); g_signal_connect (track->lock_button, "toggled", G_CALLBACK (xfce_mixer_track_lock_toggled), track); gtk_box_pack_start (GTK_BOX (button_box), track->lock_button, FALSE, FALSE, 0); gtk_widget_show (track->lock_button); + + g_free (tooltip_text); } /* Create record button for capture tracks */ if (G_UNLIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_CAPTURE)) { + tooltip_text = g_strdup_printf (_("Enable/disable audible input from %s in output"), track_label); + track->record_button = gtk_toggle_button_new (); image = g
[Xfce4-commits] Remove UI for configuring the mixer command from the panel plugin
Updating branch refs/heads/gber/improvements to 0ba34e52028d6e448151738ceaebe579e0cc72f9 (commit) from 9ebcc4e61a394cecf298f859810f2ae81b3df1fa (commit) commit 0ba34e52028d6e448151738ceaebe579e0cc72f9 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Remove UI for configuring the mixer command from the panel plugin Remove UI for configuring the mixer command from the panel plugin and assume xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. NEWS |3 + panel-plugin/xfce-mixer-plugin.c | 22 ++ panel-plugin/xfce-plugin-dialog.c | 168 + 3 files changed, 10 insertions(+), 183 deletions(-) diff --git a/NEWS b/NEWS index 7cab556..4cb9822 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ - Make xfce4-mixer a singleton application, executing xfce4-mixer while another instance is already running brings the running instance to the foreground (bug #5676). +- Remove UI for configuring the mixer command from the panel plugin and assume + xfce4-mixer, make the panel plugin context menu entry for running the mixer + more meaningful. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index ca0166c..ec7e60b 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -247,6 +247,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) { XfceMixerPlugin *mixer_plugin = XFCE_MIXER_PLUGIN (plugin); GtkWidget *command_menu_item; + GtkWidget *command_image; xfce_panel_plugin_menu_show_configure (plugin); @@ -257,7 +258,10 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) gtk_widget_show (mixer_plugin->mute_menu_item); /* Add menu item for running the user-defined command */ - command_menu_item = gtk_menu_item_new_with_mnemonic (_("_Run command")); + command_image = gtk_image_new_from_icon_name ("multimedia-volume-control", GTK_ICON_SIZE_MENU); + gtk_widget_show (command_image); + command_menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Run Audio Mixer")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (command_menu_item), command_image); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (command_menu_item)); g_signal_connect_swapped (G_OBJECT (command_menu_item), "activate", G_CALLBACK (xfce_mixer_plugin_command_item_activated), mixer_plugin); gtk_widget_show (command_menu_item); @@ -620,26 +624,12 @@ xfce_mixer_plugin_command_item_activated (XfceMixerPlugin *mixer_plugin, GtkMenuItem *menuitem) { gchar *message; - gint response; g_return_if_fail (mixer_plugin != NULL); if (G_UNLIKELY (mixer_plugin->command == NULL || strlen (mixer_plugin->command) == 0)) { - /* Run error message dialog */ - response = xfce_message_dialog (NULL, - _("No command defined"), - GTK_STOCK_DIALOG_ERROR, - NULL, - _("No command defined yet. You can change this in the plugin properties."), - XFCE_BUTTON_TYPE_MIXED, _("Properties"), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT, - GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT, - NULL); - - /* Configure the plugin if requested by the user */ - if (G_LIKELY (response == GTK_RESPONSE_ACCEPT)) -xfce_mixer_plugin_configure_plugin (XFCE_PANEL_PLUGIN (mixer_plugin)); - + xfce_dialog_show_error (NULL, NULL, _("No command defined")); return; } diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 7167dd0..85a319a 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -45,24 +45,18 @@ static void xfce_plugin_dialog_init (XfcePluginDialog static void xfce_plugin_dialog_dispose(GObject *object); static void xfce_plugin_dialog_finalize (GObject *object); static void xfce_plugin_dialog_create_contents(XfcePluginDialog *dialog); -static void xfce_plugin_dialog_command_button_clicked (XfcePluginDialog *dialog); static void xfce_plugin_dialog_soundcard_changed (XfcePluginDialog *dialog, GstElement *card, XfceMixerCardCombo *combo); static void xfce_plugin_dialog_track_changed (XfcePluginDialog *dialog, GstMixerTrack
[Xfce4-commits] Add popup with a scale for setting the volume to the panel plugin
Updating branch refs/heads/gber/improvements to 94fe3cdf3f8a1b9d49db6a4c360c584e2fd66709 (commit) from 262dc4c272c28b0d4411fb8dfbdf8a58574f96bd (commit) commit 94fe3cdf3f8a1b9d49db6a4c360c584e2fd66709 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Add popup with a scale for setting the volume to the panel plugin Add a popup with a scale for setting the volume to the panel plugin which is opened on left click, allow running the user-defined command previously bound to left click from the panel plugin context menu instead. Subclass GtkToggleButton instaed of GtkButton. NEWS |3 + README|3 +- panel-plugin/xfce-mixer-plugin.c | 177 ++ panel-plugin/xfce-plugin-dialog.c |4 +- panel-plugin/xfce-volume-button.c | 657 panel-plugin/xfce-volume-button.h | 36 ++- 6 files changed, 646 insertions(+), 234 deletions(-) diff --git a/NEWS b/NEWS index 6d04cab..e5e133a 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,9 @@ - Keep the sound card and controls in sync between the mixer and xfconf. - Populate the mixer with whitelisted controls in the absence of an existing configuration (bug #4945). +- Add a popup with a scale for setting the volume to the panel plugin which is + opened on left click, allow running the uder-defined command previously bound + to left click from the panel plugin context menu instead. 4.8.0 diff --git a/README b/README index e8a0645..98df7c5 100644 --- a/README +++ b/README @@ -3,8 +3,7 @@ xfce4-mixer Information This package contains a volume control application based on GStreamer 0.10 written to conceptually fit into the Xfce desktop environment. It -also contains a plugin for the Xfce panel which is especially designed -for use with the mouse wheel. +includes a plugin for the Xfce panel. Known Problems with GStreamer - diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index aa5ed41..ca0166c 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -64,37 +64,42 @@ enum -static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_set_property(GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_get_property(GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_configure_plugin(XfcePanelPlugin *plugin); -static gboolean xfce_mixer_plugin_size_changed(XfcePanelPlugin *plugin, - gint size); -static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, - gdouble volume); -static void xfce_mixer_plugin_mute_changed(XfceMixerPlugin *mixer_plugin, - gboolean muted); -static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, - GtkCheckMenuItem *mute_menu_item); -static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object); -static void xfce_mixer_plugin_update_track(XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_bus_message (GstBus *bus, - GstMessage *message, - XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_volume_key_pressed (const char *keystring, - void *user_data); -static void xfce_mixer_plugin_mute_pressed(const char
[Xfce4-commits] Make xfce4-mixer a singleton application (bug #5676)
Updating branch refs/heads/gber/improvements to 9ebcc4e61a394cecf298f859810f2ae81b3df1fa (commit) from 94fe3cdf3f8a1b9d49db6a4c360c584e2fd66709 (commit) commit 9ebcc4e61a394cecf298f859810f2ae81b3df1fa Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Make xfce4-mixer a singleton application (bug #5676) Make xfce4-mixer a singleton application using libunique, executing xfce4-mixer while another instance is already running brings the running instance to the foreground. NEWS|3 ++ configure.in.in |1 + xfce4-mixer/Makefile.am |2 + xfce4-mixer/main.c | 73 -- 4 files changed, 69 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index e5e133a..7cab556 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ - Add a popup with a scale for setting the volume to the panel plugin which is opened on left click, allow running the uder-defined command previously bound to left click from the panel plugin context menu instead. +- Make xfce4-mixer a singleton application, executing xfce4-mixer while another + instance is already running brings the running instance to the foreground + (bug #5676). 4.8.0 diff --git a/configure.in.in b/configure.in.in index cbefa48..a1f7c12 100644 --- a/configure.in.in +++ b/configure.in.in @@ -94,6 +94,7 @@ XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([UNIQUE], [unique-1.0], [1.1]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index fd17aeb..e5a45f0 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -26,6 +26,7 @@ xfce4_mixer_CFLAGS = \ -DMIXER_DATADIR=\"$(pkgdatadir)\" \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ + $(UNIQUE_CFLAGS)\ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCE4UI_CFLAGS)\ $(XFCONF_CFLAGS)\ @@ -39,6 +40,7 @@ xfce4_mixer_LDFLAGS = \ $(GLIB_LIBS)\ $(GTHREAD_LIBS) \ $(GTK_LIBS) \ + $(UNIQUE_LIBS) \ $(LIBXFCE4UTIL_LIBS)\ $(LIBXFCE4UI_LIBS) \ $(XFCONF_LIBS) \ diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c index a4c32d7..5a65f0b 100644 --- a/xfce4-mixer/main.c +++ b/xfce4-mixer/main.c @@ -1,6 +1,7 @@ /* vi:set expandtab sw=2 sts=2: */ /*- * Copyright (c) 2008 Jannis Pohlmann + * Copyright (c) 2012 Guido Berhoerster * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +29,9 @@ #include +#include +#include + #include #include #include @@ -38,12 +42,42 @@ +static UniqueResponse +message_received (UniqueApp *app, + UniqueCommand command, + UniqueMessageData *message, + guint time_, + GtkWidget *window) +{ + UniqueResponse response; + + switch (command) +{ + case UNIQUE_ACTIVATE: +/* Move window to the screen the command was started on */ +gtk_window_set_screen (GTK_WINDOW (window), unique_message_data_get_screen (message)); +/* Bring window to the foreground */ +gtk_window_present_with_time (GTK_WINDOW (window), time_); +response = UNIQUE_RESPONSE_OK; +break; + default: +/* Invalid command */ +response = UNIQUE_RESPONSE_FAIL; +break; +} + + return response; +} + + + int main (intargc, char **argv) { - GtkWidget *window; - GError*error = NULL; + UniqueApp *app; + GtkWidget *window; + GError*error = NULL; /* Setup translation domain */ xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8"); @@ -96,17 +130,36 @@ main (intargc, return EXIT_FAILURE;
[Xfce4-commits] Keep the sound card and controls in sync between the mixer and xfconf
Updating branch refs/heads/gber/improvements to e44805b64256bf4c62820c30576e3e1953ffc35d (commit) from 0e3a152d919a492a84972dab0ab82ca89ba085ea (commit) commit e44805b64256bf4c62820c30576e3e1953ffc35d Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Keep the sound card and controls in sync between the mixer and xfconf Also apply changes in the controls dialog instantly to the mixer window. NEWS |1 + configure.in.in |1 + libxfce4mixer/Makefile.am|2 + libxfce4mixer/libxfce4mixer.c| 19 ++ libxfce4mixer/libxfce4mixer.h|5 + libxfce4mixer/xfce-mixer-preferences.c | 308 ++ libxfce4mixer/xfce-mixer-preferences.h | 12 +- xfce4-mixer/xfce-mixer-controls-dialog.c | 181 ++ xfce4-mixer/xfce-mixer-controls-dialog.h |6 +- xfce4-mixer/xfce-mixer-window.c | 189 ++- xfce4-mixer/xfce-mixer.c | 24 ++- 11 files changed, 443 insertions(+), 305 deletions(-) diff --git a/NEWS b/NEWS index 59ff72e..f2e2825 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ - Add global keyboard shortcuts for raising and lowering the volume as well as muting (bug #5314). - Set the main window to normal rather than dialog type (bug #7623). +- Keep the sound card and controls in sync between the mixer and xfconf. 4.8.0 diff --git a/configure.in.in b/configure.in.in index d0175e3..cbefa48 100644 --- a/configure.in.in +++ b/configure.in.in @@ -91,6 +91,7 @@ dnl *** Check for required packages *** dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 399bb2d..8f44cd4 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -30,6 +30,7 @@ libxfce4mixer_la_CFLAGS = \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCE4UI_CFLAGS)\ $(XFCONF_CFLAGS)\ + $(DBUS_GLIB_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) libxfce4mixer_la_LDFLAGS = \ @@ -42,6 +43,7 @@ libxfce4mixer_la_LIBADD = \ $(LIBXFCE4UTIL_LIBS)\ $(LIBXFCE4UI_LIBS) \ $(XFCONF_LIBS) \ + $(DBUS_GLIB_LIBS) \ $(GST_PLUGINS_BASE_LIBS)\ -lgstaudio-0.10 \ -lgstinterfaces-0.10 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index b25ecc5..7bb9293 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -25,6 +25,8 @@ #include +#include + #include #include @@ -350,3 +352,20 @@ xfce_mixer_utf8_cmp (const gchar *s1, const gchar *s2) return g_utf8_collate (s1, s2); } + + +GType +xfce_mixer_value_array_get_type (void) +{ + static volatile gsize type__volatile = 0; + GType type; + + if (g_once_init_enter (&type__volatile)) +{ + type = dbus_g_type_get_collection ("GPtrArray", G_TYPE_VALUE); + g_once_init_leave (&type__volatile, type); +} + + return type__volatile; +} + diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 41f5816..187db3f 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -24,6 +24,8 @@ #include +#include + #include #include "xfce-mixer-preferences.h" @@ -31,6 +33,8 @@ #include "xfce-mixer-track-combo.h" #include "xfce-mixer-track-type.h" +#define XFCE_MIXER_TYPE_VALUE_ARRAY (xfce_mixer_value_array_get_type ()) + G_BEGIN_DECLS; void xfce_mixer_init (void); @@ -52,6 +56,7 @@ gint xfce_mixer_get_max_volume (gint *volumes, gint num_channels); intxfce_mixer_utf8_cmp (const gchar *s1, const gchar *s2); +GType xfce_mixer_value_array_get_type (void); G_END_DECLS; diff --git a/libxfce4mixer/xfce-mixer-preferences.c
[Xfce4-commits] Populate the mixer with whitelisted controls by default (bug #4945)
Updating branch refs/heads/gber/improvements to 262dc4c272c28b0d4411fb8dfbdf8a58574f96bd (commit) from e44805b64256bf4c62820c30576e3e1953ffc35d (commit) commit 262dc4c272c28b0d4411fb8dfbdf8a58574f96bd Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Populate the mixer with whitelisted controls by default (bug #4945) Populate the mixer with whitelisted controls in the absence of an existing configuration. Select controls either based on the whitelist flag for mixers that support it or fall back to a static whitelist. NEWS |2 + libxfce4mixer/libxfce4mixer.c | 80 ++-- libxfce4mixer/libxfce4mixer.h |1 + libxfce4mixer/xfce-mixer-preferences.c | 59 +++- 4 files changed, 126 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index f2e2825..6d04cab 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,8 @@ muting (bug #5314). - Set the main window to normal rather than dialog type (bug #7623). - Keep the sound card and controls in sync between the mixer and xfconf. +- Populate the mixer with whitelisted controls in the absence of an existing + configuration (bug #4945). 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 7bb9293..6ca9466 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -42,10 +42,25 @@ static void _xfce_mixer_destroy_mixer (GstMixer *mixer); -static guint refcount = 0; -static GList *mixers = NULL; -static GstBus *bus = NULL; -static GstElement *selected_card = NULL; +static guintrefcount = 0; +static GList *mixers = NULL; +static GstBus *bus = NULL; +static GstElement *selected_card = NULL; +static const gchar *tracks_whitelist[] = +{ + "cd", + "digital output", + "front", + "headphone", + "line", + "master", + "mic", + "pcm", + "recording", + "speaker", + "volume", + NULL +}; @@ -235,6 +250,63 @@ xfce_mixer_get_default_track (GstElement *card) +GList * +xfce_mixer_get_default_track_list (GstElement *card) +{ + gboolean mixer_has_whitelist = FALSE; + const GList *iter; + GList *track_list = NULL; + GstMixerTrack *track; + gchar *track_label; + gchar *track_label_lower; + gint i; + + g_return_val_if_fail (GST_IS_MIXER (card), NULL); + + if (gst_mixer_get_mixer_flags (GST_MIXER (card)) & GST_MIXER_FLAG_HAS_WHITELIST) +mixer_has_whitelist = TRUE; + + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track = GST_MIXER_TRACK (iter->data); + + /* Use the whitelist flag when available and fall back to a static whitelist */ + if (mixer_has_whitelist) +{ + if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_WHITELIST)) +track_list = g_list_prepend (track_list, track); +} + else +{ + track_label = NULL; + + if (g_object_class_find_property (G_OBJECT_GET_CLASS (track), "untranslated-label")) +g_object_get (track, "untranslated-label", &track_label, NULL); + + if (track_label == NULL) +g_object_get (track, "label", &track_label, NULL); + + track_label_lower = g_utf8_strdown (track_label, -1); + + for (i = 0; tracks_whitelist[i] != NULL; ++i) +{ + if (strstr (track_label_lower, tracks_whitelist[i]) != NULL) +{ + track_list = g_list_prepend (track_list, track); + break; +} +} + + g_free (track_label_lower); + g_free (track_label); +} +} + + return track_list; +} + + + guint xfce_mixer_bus_connect (GCallback callback, gpointer user_data) diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 187db3f..473817c 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -49,6 +49,7 @@ void xfce_mixer_select_card(GstElement *card); GstMixerTrack *xfce_mixer_get_track (GstElement*card, const gchar *track_name); GstMixerTrack *xfce_mixer_get_default_track (GstElement*card); +GList *xfce_mixer_get_default_track_list (GstElement*card); guint xfce_mixer_bus_connect(GCallback callback, gpointer user_data); void xfce_mixer_bus_disconnect (guint signal_handler_id); diff --git a/libxfce4mixer/xfce-mixer-preferences.c b/libxfce4mixer/xfce-mixer-preferences.c index 2c
[Xfce4-commits] Set the main window to normal rather than dialog type (bug #7623)
Updating branch refs/heads/gber/improvements to 0e3a152d919a492a84972dab0ab82ca89ba085ea (commit) from 55c863fed1600579a886104029e86dfd25964b1e (commit) commit 0e3a152d919a492a84972dab0ab82ca89ba085ea Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Set the main window to normal rather than dialog type (bug #7623) NEWS|1 + xfce4-mixer/xfce-mixer-window.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 400ccdd..59ff72e 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ - Do not use deprecated APIs and adjust requirements to Xfce 4.10. - Add global keyboard shortcuts for raising and lowering the volume as well as muting (bug #5314). +- Set the main window to normal rather than dialog type (bug #7623). 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index 85ffe04..11ecf1d 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -163,6 +163,7 @@ xfce_mixer_window_init (XfceMixerWindow *window) g_object_get (window->preferences, "window-width", &width, "window-height", &height, "sound-card", &active_card, NULL); /* Configure the main window */ + gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_icon_name (GTK_WINDOW (window), "multimedia-volume-control"); gtk_window_set_title (GTK_WINDOW (window), _("Audio Mixer")); gtk_window_set_default_size (GTK_WINDOW (window), width, height); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Do not use deprecated APIs and adjust requirements to Xfce 4.10
Updating branch refs/heads/gber/improvements to e2656dab9c66887b491acb14d0d96b53c2f46c3d (commit) from ba12818b6b2bcc11b7724f2b72e58d2c2875acd1 (commit) commit e2656dab9c66887b491acb14d0d96b53c2f46c3d Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Do not use deprecated APIs and adjust requirements to Xfce 4.10 Raise the minimum requirements of Xfce components to 4.10 which is the currently supported version. Raise the minimum requirements of GTK/glib to match those of Xfce 4.10. Raise the minimum required gstreamer version to 0.10.23, it was released in 2009 and will allow us to use GST_MIXER_FLAG_HAS_WHITELIST in the mixer. Replace the usage of GTK/glib API parts which have been deprecated in the minimum required GTK version. NEWS |1 + configure.in.in | 32 +++- libxfce4mixer/libxfce4mixer.c | 10 -- libxfce4mixer/libxfce4mixer.h |4 panel-plugin/xfce-mixer-plugin.c | 22 -- panel-plugin/xfce-volume-button.c |3 ++- xfce4-mixer/xfce-mixer-window.c |7 --- xfce4-mixer/xfce-mixer.c | 13 - 8 files changed, 14 insertions(+), 78 deletions(-) diff --git a/NEWS b/NEWS index cf8b487..853354f 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ value (bug #8291). - Add an item to the panel plugin context menu for muting (bug #7944). - Make name and description more meaningful (bug #5817). +- Do not use deprecated APIs and adjust requirements to Xfce 4.10. 4.8.0 diff --git a/configure.in.in b/configure.in.in index e38c539..91250d8 100644 --- a/configure.in.in +++ b/configure.in.in @@ -89,27 +89,14 @@ AC_CHECK_LIB([m],[round]) dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0]) -XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) -XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) - -dnl ** -dnl *** Check for GstMixer bus support *** -dnl ** -HAVE_GST_MIXER_NOTIFICATION=no -PKG_CHECK_MODULES(GST_MIXER_NOTIFICATION_API, - gstreamer-plugins-base-0.10 >= 0.10.14, - HAVE_GST_MIXER_NOTIFICATION=yes, - HAVE_GST_MIXER_NOTIFICATION=no) -if test "x$HAVE_GST_MIXER_NOTIFICATION" = "xyes"; then - AC_DEFINE(HAVE_GST_MIXER_NOTIFICATION, 1, -[Have GStreamer mixer notification API]) -fi +XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) dnl *** dnl *** Check for debugging support *** @@ -152,10 +139,5 @@ dnl *** echo echo "Build Configuration:" echo -if test "x$HAVE_GST_MIXER_NOTIFICATION" = "xyes"; then -echo " * GStreamer mixer notification support: yes" -else -echo " * GStreamer mixer notification support: no" -fi echo " * Debug Support:$enable_debug" echo diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 86ea5db..b25ecc5 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -42,10 +42,8 @@ static void _xfce_mixer_destroy_mixer (GstMixer *mixer); static guint refcount = 0; static GList *mixers = NULL; -#ifdef HAVE_GST_MIXER_NOTIFICATION static GstBus *bus = NULL; static GstElement *selected_card = NULL; -#endif @@ -64,11 +62,9 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, &counter); -#ifdef HAVE_GST_MIXER_NOTIFICATION /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); -#endif } } @@ -82,10 +78,8 @@ xfce_mixer_shutdown (void) g_list_foreach (mixers, (GFunc) _xfce_mixer_destroy_mixer, NULL); g_list_free (mixers); -#ifdef HAVE_GST_MIXER_NOTIFICATION gst_bus_remove_signal_watch (bus); gst_object_unref (bus); -#endif } } @@ -168,10 +162,8 @@ xfce_mixer
[Xfce4-commits] Add global keyboard shortcuts (bug #5314)
Updating branch refs/heads/gber/improvements to 55c863fed1600579a886104029e86dfd25964b1e (commit) from e2656dab9c66887b491acb14d0d96b53c2f46c3d (commit) commit 55c863fed1600579a886104029e86dfd25964b1e Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Add global keyboard shortcuts (bug #5314) Add global keyboard shortcuts for raising and lowering the volume as well as muting. Make the plugin single-instance. NEWS |2 + configure.in.in |1 + panel-plugin/Makefile.am |6 +- panel-plugin/mixer.desktop.in|2 +- panel-plugin/xfce-mixer-plugin.c | 139 ++ 5 files changed, 147 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 853354f..400ccdd 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ - Add an item to the panel plugin context menu for muting (bug #7944). - Make name and description more meaningful (bug #5817). - Do not use deprecated APIs and adjust requirements to Xfce 4.10. +- Add global keyboard shortcuts for raising and lowering the volume as well as + muting (bug #5314). 4.8.0 diff --git a/configure.in.in b/configure.in.in index 91250d8..d0175e3 100644 --- a/configure.in.in +++ b/configure.in.in @@ -97,6 +97,7 @@ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) +XDT_CHECK_PACKAGE([KEYBINDER], [keybinder], [0.2.2]) dnl *** dnl *** Check for debugging support *** diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index 2170005..fa27e29 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -25,7 +25,8 @@ libmixer_la_CFLAGS = \ $(LIBXFCE4UI_CFLAGS)\ $(LIBXFCE4PANEL_CFLAGS) \ $(XFCONF_CFLAGS)\ - $(GST_PLUGINS_BASE_CFLAGS) + $(GST_PLUGINS_BASE_CFLAGS) \ + $(KEYBINDER_CFLAGS) libmixer_la_DEPENDENCIES = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la @@ -47,7 +48,8 @@ libmixer_la_LIBADD = \ $(XFCONF_LIBS) \ $(GST_PLUGINS_BASE_LIBS)\ -lgstaudio-0.10 \ - -lgstinterfaces-0.10 + -lgstinterfaces-0.10\ + $(KEYBINDER_LIBS) desktopdir = $(datadir)/xfce4/panel/plugins diff --git a/panel-plugin/mixer.desktop.in b/panel-plugin/mixer.desktop.in index fb45c14..f4e7637 100644 --- a/panel-plugin/mixer.desktop.in +++ b/panel-plugin/mixer.desktop.in @@ -5,4 +5,4 @@ _Comment=Adjust volume levels Icon=multimedia-volume-control X-XFCE-Internal=false X-XFCE-Module=mixer -X-XFCE-Unique=false +X-XFCE-Unique=true diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 7e7a8cc..aa5ed41 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -36,6 +36,8 @@ #include #include +#include + #include "xfce-mixer-plugin.h" #include "libxfce4mixer/libxfce4mixer.h" @@ -56,6 +58,12 @@ enum +#define XFCE_MIXER_PLUGIN_RAISE_VOLUME_KEY "XF86AudioRaiseVolume" +#define XFCE_MIXER_PLUGIN_LOWER_VOLUME_KEY "XF86AudioLowerVolume" +#define XFCE_MIXER_PLUGIN_MUTE_KEY "XF86AudioMute" + + + static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); static void xfce_mixer_plugin_set_property(GObject *object, guint prop_id, @@ -83,6 +91,10 @@ static void xfce_mixer_plugin_update_track (XfceMixerPlugin static void xfce_mixer_plugin_bus_message (GstBus *bus, GstMessage *message, XfceMixerPlugin *mixer_plugin); +static void xfce_mixer_plugin_volume_key_pressed (const char *keystring, + void *user_data); +static void xfce_mixer_plugin_mute_pressed(const char *keystring, + void *user_data); @@ -202,6 +214,9 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) /*
[Xfce4-commits] Make name and description more meaningful (bug #5817)
Updating branch refs/heads/gber/improvements to ba12818b6b2bcc11b7724f2b72e58d2c2875acd1 (commit) from 6b489027ba0a6fe7054340f36ae2851dc204f144 (commit) commit ba12818b6b2bcc11b7724f2b72e58d2c2875acd1 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Make name and description more meaningful (bug #5817) NEWS |1 + panel-plugin/mixer.desktop.in |4 ++-- panel-plugin/xfce-plugin-dialog.c |2 +- xfce4-mixer/main.c |2 +- xfce4-mixer/xfce-mixer-window.c|4 ++-- xfce4-mixer/xfce4-mixer.desktop.in |4 ++-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index e3a9aaf..cf8b487 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ - Mute a track when the volume is set to 0% and unmute when set to a higher value (bug #8291). - Add an item to the panel plugin context menu for muting (bug #7944). +- Make name and description more meaningful (bug #5817). 4.8.0 diff --git a/panel-plugin/mixer.desktop.in b/panel-plugin/mixer.desktop.in index fb46a41..fb45c14 100644 --- a/panel-plugin/mixer.desktop.in +++ b/panel-plugin/mixer.desktop.in @@ -1,7 +1,7 @@ [Xfce Panel] Type=X-XFCE-PanelPlugin -_Name=Mixer -_Comment=Volume control for your sound card +_Name=Audio Mixer +_Comment=Adjust volume levels Icon=multimedia-volume-control X-XFCE-Internal=false X-XFCE-Module=mixer diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 715eb86..87b9deb 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -193,7 +193,7 @@ xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) gchar *title; gtk_window_set_icon_name (GTK_WINDOW (dialog), "multimedia-volume-control"); - gtk_window_set_title (GTK_WINDOW (dialog), _("Mixer Plugin")); + gtk_window_set_title (GTK_WINDOW (dialog), _("Audio Mixer Plugin")); xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog), _("Configure the mixer track and left-click command")); diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c index e459f8f..a4c32d7 100644 --- a/xfce4-mixer/main.c +++ b/xfce4-mixer/main.c @@ -58,7 +58,7 @@ main (intargc, #endif /* Set application name */ - g_set_application_name (_("Mixer")); + g_set_application_name (_("Audio Mixer")); /* Initialize GTK+ */ gtk_init (&argc, &argv); diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index 0c6a1e9..14bd6f3 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -164,7 +164,7 @@ xfce_mixer_window_init (XfceMixerWindow *window) /* Configure the main window */ gtk_window_set_icon_name (GTK_WINDOW (window), "multimedia-volume-control"); - gtk_window_set_title (GTK_WINDOW (window), _("Mixer")); + gtk_window_set_title (GTK_WINDOW (window), _("Audio Mixer")); gtk_window_set_default_size (GTK_WINDOW (window), width, height); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); gtk_dialog_set_has_separator (GTK_DIALOG (window), FALSE); @@ -283,7 +283,7 @@ xfce_mixer_window_soundcard_changed (XfceMixerCardCombo *combo, g_return_if_fail (IS_XFCE_MIXER_WINDOW (window)); g_return_if_fail (GST_IS_MIXER (card)); - title = g_strdup_printf ("%s - %s", _("Mixer"), xfce_mixer_get_card_display_name (card)); + title = g_strdup_printf ("%s - %s", _("Audio Mixer"), xfce_mixer_get_card_display_name (card)); gtk_window_set_title (GTK_WINDOW (window), title); g_free (title); diff --git a/xfce4-mixer/xfce4-mixer.desktop.in b/xfce4-mixer/xfce4-mixer.desktop.in index c962d84..42ac691 100644 --- a/xfce4-mixer/xfce4-mixer.desktop.in +++ b/xfce4-mixer/xfce4-mixer.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Version=1.0 -_Name=Mixer -_Comment=Audio mixer for the Xfce Desktop Environment +_Name=Audio Mixer +_Comment=Adjust volume levels Icon=multimedia-volume-control Exec=xfce4-mixer Type=Application ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add an item to the panel plugin context menu for muting (bug #7944)
Updating branch refs/heads/gber/improvements to 6b489027ba0a6fe7054340f36ae2851dc204f144 (commit) from 488d88259619f24c45c878159e227b48d995fa36 (commit) commit 6b489027ba0a6fe7054340f36ae2851dc204f144 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Add an item to the panel plugin context menu for muting (bug #7944) NEWS |1 + panel-plugin/xfce-mixer-plugin.c | 81 +++-- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 80a8b8a..e3a9aaf 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ - Indicate in the plugin tooltip whether the track is muted. - Mute a track when the volume is set to 0% and unmute when set to a higher value (bug #8291). +- Add an item to the panel plugin context menu for muting (bug #7944). 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 75570ff..f708789 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -72,6 +72,10 @@ static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume); +static void xfce_mixer_plugin_mute_changed(XfceMixerPlugin *mixer_plugin, + gboolean muted); +static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, + GtkCheckMenuItem *mute_menu_item); static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, GParamSpec *pspec, GObject *object); @@ -112,6 +116,7 @@ struct _XfceMixerPlugin /* Widgets */ GtkWidget *hvbox; GtkWidget *button; + GtkWidget *mute_menu_item; /* Reference to the plugin private xfconf channel */ XfconfChannel *plugin_channel; @@ -192,6 +197,8 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) mixer_plugin->message_handler_id = 0; #endif + mixer_plugin->mute_menu_item = NULL; + /* Initialize xfconf */ xfconf_init (NULL); @@ -228,6 +235,12 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Add menu item for muting */ + mixer_plugin->mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_("_Mute")); + xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (mixer_plugin->mute_menu_item)); + g_signal_connect_swapped (G_OBJECT (mixer_plugin->mute_menu_item), "toggled", G_CALLBACK (xfce_mixer_plugin_mute_item_toggled), mixer_plugin); + gtk_widget_show (mixer_plugin->mute_menu_item); + /* Only occupy a single row in deskbar mode */ xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); @@ -558,13 +571,9 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, static void -xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object) +xfce_mixer_plugin_mute_changed (XfceMixerPlugin *mixer_plugin, +gboolean muted) { - gboolean mute; - - g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin->card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin->track)); @@ -572,19 +581,22 @@ xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, mixer_plugin->ignore_bus_messages = TRUE; #endif - g_object_get (object, "is-muted", &mute, NULL); if (G_LIKELY (xfce_mixer_track_type_new (mixer_plugin->track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { /* Apply mute change to the sound card */ - gst_mixer_set_mute (GST_MIXER (mixer_plugin->card), mixer_plugin->track, mute); + gst_mixer_set_mute (GST_MIXER (mixer_plugin->card), mixer_plugin->track, muted); } else { /* Toggle capture */ - gst_mixer_set_record (GST_MIXER (mixer_plugin->card), mixer_plugin->track, !mute); + gst_mixer_set_record (GST_MIXER (mixer_plugin->card), mixer_plugin->track, !muted); } + /* Update mute menu item */ + if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mixer_plugin->mute_menu_item)) != muted) +gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mixer_plugin->mute_menu_item), muted); + #ifd
[Xfce4-commits] Mute a track when the volume is set to 0% and unmute when set to a higher value
Updating branch refs/heads/gber/improvements to 488d88259619f24c45c878159e227b48d995fa36 (commit) from 521f16c2f9904c11af1d1a0ee09db504ac727771 (commit) commit 488d88259619f24c45c878159e227b48d995fa36 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Mute a track when the volume is set to 0% and unmute when set to a higher value Mute a track automatically when the volume button reaches 0% and unmute it again when above 0% (bug #8291). Improve the volume calculations by using round() rather than truncating. NEWS |2 + configure.in.in |6 panel-plugin/xfce-mixer-plugin.c |6 +++- panel-plugin/xfce-volume-button.c | 43 - xfce4-mixer/xfce-mixer-track.c| 54 5 files changed, 91 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index c4ccfac..80a8b8a 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ - Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips. - Indicate in the plugin tooltip whether the track is muted. +- Mute a track when the volume is set to 0% and unmute when set to a higher + value (bug #8291). 4.8.0 diff --git a/configure.in.in b/configure.in.in index e5dd9c8..e38c539 100644 --- a/configure.in.in +++ b/configure.in.in @@ -80,6 +80,12 @@ dnl *** Check for i18n support *** dnl ** XDT_I18N([@LINGUAS@]) +dnl ** +dnl *** Check for libm *** +dnl ** +AC_CHECK_HEADERS([math.h]) +AC_CHECK_LIB([m],[round]) + dnl *** dnl *** Check for required packages *** dnl *** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 82f7db3..75570ff 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -23,6 +23,10 @@ #include #endif +#ifdef HAVE_MATH_H +#include +#endif + #include #include @@ -534,7 +538,7 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, volume_range = mixer_plugin->track->max_volume - mixer_plugin->track->min_volume; /* Determine new volume */ - new_volume = mixer_plugin->track->min_volume + (volume * volume_range); + new_volume = round (mixer_plugin->track->min_volume + (volume * volume_range)); /* Set all channel volumes to the new volume */ for (i = 0; i < mixer_plugin->track->num_channels; ++i) diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index e80c792..826d4be 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -23,6 +23,10 @@ #include #endif +#ifdef HAVE_MATH_H +#include +#endif + #include #include @@ -216,7 +220,7 @@ xfce_volume_button_class_init (XfceVolumeButtonClass *klass) g_param_spec_boolean ("is-muted", "is-muted", "is-muted", - FALSE, + TRUE, G_PARAM_READABLE | G_PARAM_WRITABLE)); button_signals[VOLUME_CHANGED] = g_signal_new ("volume-changed", @@ -240,15 +244,15 @@ xfce_volume_button_init (XfceVolumeButton *button) button->is_configured = FALSE; - /* By default we expect the button not to be muted */ - button->is_muted = FALSE; - /* Allocate array for preloaded icons */ button->pixbufs = g_new0 (GdkPixbuf*, G_N_ELEMENTS (icons)-1); /* Create adjustment for the button (from 0.0 to 1.0 in 5% steps) */ button->adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.0); + /* Set to muted by default since the initial adjustment value is 0 */ + button->is_muted = TRUE; + /* Create a new scaled image for the button icon */ button->image = xfce_panel_image_new (); gtk_container_add (GTK_CONTAINER (button), button->image); @@ -478,7 +482,8 @@ xfce_volume_button_scrolled (GtkWidget*widget, GdkEventScroll *event, XfceVolumeButton *button) { - gdouble value; + gdouble old_value; + gdouble new_value; gdouble step_increment; g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); @@ -489,7 +494,7 @@ xfce_volume_button_scrolled (GtkWidget*widget, return TRUE; /* Get current adjustment value and the step increment size */ - g_object_get (G_OBJECT (button->adjustment), "value", &value, "step-increment", &step_increment, NULL); + g_object_get (G_OBJECT (button->adjustment), "value", &old_value, "step-increment",
[Xfce4-commits] Indicate in the plugin tooltip whether the track is muted
Updating branch refs/heads/gber/improvements to 521f16c2f9904c11af1d1a0ee09db504ac727771 (commit) from c307eeda920f331185b204da2f8ba0633c316e90 (commit) commit 521f16c2f9904c11af1d1a0ee09db504ac727771 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Indicate in the plugin tooltip whether the track is muted Let XfceVolumeButton keep state istelf by adding a "is-muted" property and remove the "mute-toggled" signal. NEWS |1 + panel-plugin/xfce-mixer-plugin.c | 16 +-- panel-plugin/xfce-volume-button.c | 84 panel-plugin/xfce-volume-button.h |3 +- 4 files changed, 61 insertions(+), 43 deletions(-) diff --git a/NEWS b/NEWS index c056db7..c4ccfac 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). - Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips. +- Indicate in the plugin tooltip whether the track is muted. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index da09a72..82f7db3 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -68,8 +68,9 @@ static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume); -static void xfce_mixer_plugin_mute_toggled(XfceMixerPlugin *mixer_plugin, - gboolean mute); +static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, + GParamSpec *pspec, + GObject *object); static void xfce_mixer_plugin_update_track(XfceMixerPlugin *mixer_plugin); #ifdef HAVE_GST_MIXER_NOTIFICATION static void xfce_mixer_plugin_bus_message (GstBus *bus, @@ -205,7 +206,7 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) /* Create volume button for the plugin */ mixer_plugin->button = xfce_volume_button_new (); g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "volume-changed", G_CALLBACK (xfce_mixer_plugin_volume_changed), mixer_plugin); - g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "mute-toggled", G_CALLBACK (xfce_mixer_plugin_mute_toggled), mixer_plugin); + g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "notify::is-muted", G_CALLBACK (xfce_mixer_plugin_is_muted_property_changed), mixer_plugin); g_signal_connect_swapped (G_OBJECT (mixer_plugin->button), "clicked", G_CALLBACK (xfce_mixer_plugin_clicked), mixer_plugin); gtk_container_add (GTK_CONTAINER (mixer_plugin->hvbox), mixer_plugin->button); gtk_widget_show (mixer_plugin->button); @@ -553,9 +554,12 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, static void -xfce_mixer_plugin_mute_toggled (XfceMixerPlugin *mixer_plugin, -gboolean mute) +xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, + GParamSpec *pspec, + GObject *object) { + gboolean mute; + g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin->card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin->track)); @@ -564,6 +568,8 @@ xfce_mixer_plugin_mute_toggled (XfceMixerPlugin *mixer_plugin, mixer_plugin->ignore_bus_messages = TRUE; #endif + g_object_get (object, "is-muted", &mute, NULL); + if (G_LIKELY (xfce_mixer_track_type_new (mixer_plugin->track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { /* Apply mute change to the sound card */ diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index ca2236b..e80c792 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -48,6 +48,7 @@ enum PROP_0, PROP_TRACK_LABEL, PROP_IS_CONFIGURED, + PROP_IS_MUTED, N_PROPERTIES, }; @@ -57,7 +58,6 @@ enum enum { VOLUME_CHANGED, - MUTE_TOGGLED, LAST_SIGNAL, }; @@ -106,8 +106,6 @@ static void xfce_volume_button_volume_changed (XfceVolumeButton *butt gdouble volume); static void xfce_volume_button_update_icons (XfceVolumeButton *button,
[Xfce4-commits] Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips
Updating branch refs/heads/gber/improvements to c307eeda920f331185b204da2f8ba0633c316e90 (commit) from 53d9468b2b5c8ac538d661f8f478026c629aa3c7 (commit) commit c307eeda920f331185b204da2f8ba0633c316e90 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips NEWS |2 + panel-plugin/xfce-mixer-plugin.c | 21 +-- panel-plugin/xfce-volume-button.c | 72 + panel-plugin/xfce-volume-button.h |3 ++ 4 files changed, 78 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index 01cfa15..c056db7 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ bug #7125). - Clearly indicate in the plugin when there is no valid card and/or element and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). +- Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle + tooltips. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 2bfcefa..da09a72 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -93,9 +93,6 @@ struct _XfceMixerPlugin /* Parent type */ XfcePanelPlugin __parent__; - /* Tooltips structure */ - GtkTooltips *tooltips; - /* Sound card being used */ GstElement *card; gchar *card_name; @@ -199,10 +196,6 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) /* Initialize the mixer library */ xfce_mixer_init (); - /* Allocate a tooltips structure */ - mixer_plugin->tooltips = gtk_tooltips_new (); - gtk_tooltips_set_delay (mixer_plugin->tooltips, 10); - /* Create container for the plugin */ mixer_plugin->hvbox = GTK_WIDGET (xfce_hvbox_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0)); xfce_panel_plugin_add_action_widget (XFCE_PANEL_PLUGIN (mixer_plugin), mixer_plugin->hvbox); @@ -520,7 +513,6 @@ static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume) { - gchar *tip_text; gint *volumes; gint volume_range; gint new_volume; @@ -534,11 +526,6 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, mixer_plugin->ignore_bus_messages = TRUE; #endif - /* Set tooltip (e.g. 'Master: 50%') */ - tip_text = g_strdup_printf (_("%s: %i%%"), mixer_plugin->track_label, (gint) (volume * 100)); - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, tip_text, "test"); - g_free (tip_text); - /* Allocate array for track volumes */ volumes = g_new (gint, mixer_plugin->track->num_channels); @@ -603,7 +590,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) gint volume_range; gdoublevolume; gint *volumes; - gchar *tip_text; g_return_if_fail (IS_XFCE_MIXER_PLUGIN (mixer_plugin)); @@ -611,7 +597,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) if (!GST_IS_MIXER (mixer_plugin->card) || !GST_IS_MIXER_TRACK (mixer_plugin->track)) { xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), FALSE); - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, _("No valid device and/or element."), NULL); return; } @@ -625,11 +610,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) /* Determine maximum value as double between 0.0 and 1.0 */ volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin->track->num_channels) - mixer_plugin->track->min_volume) / volume_range; - /* Set tooltip (e.g. 'Master: 50%') */ - tip_text = g_strdup_printf (_("%s: %i%%"), mixer_plugin->track_label, (gint) (volume * 100)); - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, tip_text, "test"); - g_free (tip_text); - /* Determine track type */ track_type = xfce_mixer_track_type_new (mixer_plugin->track); @@ -642,6 +622,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), TRUE); xfce_volume_button_set_volume (XFCE_VOLUME_BUTTON (mixer_plugin->button), volume); xfce_volume_button_set_muted (XFCE_VOLUME_BUTTON (mixer_plugin->button), muted); + xfce_volume_button_set_track_label (XFCE_VOLUME_BUTTON (mixer_plugin->button), mixer_plugin->track_label); /* Free volume array */ g_free (volumes); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index 3b5d90e..ca2236b 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -46,6 +46,7 @@ enum { PROP_0, + PROP_TRACK_LABEL, PROP_IS_CONFIGURED, N_
[Xfce4-commits] Clearly indicate in the plugin when there is no valid card and/or element
Updating branch refs/heads/gber/improvements to 53d9468b2b5c8ac538d661f8f478026c629aa3c7 (commit) from 26d23803f3b14abe109210432d808cff0b93eb5c (commit) commit 53d9468b2b5c8ac538d661f8f478026c629aa3c7 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Clearly indicate in the plugin when there is no valid card and/or element If the panel plugin has no valid configuration, that is no valid card and/or element, show the muted icon and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). NEWS |2 + panel-plugin/xfce-mixer-plugin.c |6 +- panel-plugin/xfce-volume-button.c | 131 +++-- panel-plugin/xfce-volume-button.h | 22 --- 4 files changed, 143 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index 5035212..01cfa15 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ - Make the panel plugin use sensible default settings (first card, master track) in the absence of an existing configuration (bug #5716, bug #6624, bug #7125). +- Clearly indicate in the plugin when there is no valid card and/or element + and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index de64a92..2bfcefa 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -607,10 +607,11 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) g_return_if_fail (IS_XFCE_MIXER_PLUGIN (mixer_plugin)); - /* Reset tooltip and return if the card or track is invalid */ + /* Set the volume button to invalid state and return if the card or track is invalid */ if (!GST_IS_MIXER (mixer_plugin->card) || !GST_IS_MIXER_TRACK (mixer_plugin->track)) { - gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, NULL, NULL); + xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), FALSE); + gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, _("No valid device and/or element."), NULL); return; } @@ -638,6 +639,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) muted = !GST_MIXER_TRACK_HAS_FLAG (mixer_plugin->track, GST_MIXER_TRACK_RECORD); /* Update the volume button */ + xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin->button), TRUE); xfce_volume_button_set_volume (XFCE_VOLUME_BUTTON (mixer_plugin->button), volume); xfce_volume_button_set_muted (XFCE_VOLUME_BUTTON (mixer_plugin->button), muted); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index adb94a7..3b5d90e 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -42,6 +42,16 @@ +/* Properties */ +enum +{ + PROP_0, + PROP_IS_CONFIGURED, + N_PROPERTIES, +}; + + + /* Signal identifiers */ enum { @@ -72,6 +82,14 @@ static void xfce_volume_button_class_init (XfceVolumeButtonClass *klas static void xfce_volume_button_init (XfceVolumeButton *button); static void xfce_volume_button_dispose(GObject *object); static void xfce_volume_button_finalize (GObject *object); +static void xfce_volume_button_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void xfce_volume_button_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); #if 0 static gboolean xfce_volume_button_key_pressed(GtkWidget *widget, GdkEventKey *event, @@ -119,6 +137,9 @@ struct _XfceVolumeButton /* Array of preloaded icons */ GdkPixbuf **pixbufs; + /* Whether the button is configured */ + gbooleanis_configured; + /* Mute state of the button */ gbooleanis_muted; }; @@ -169,10 +190,20 @@ xfce_volume_button_class_init (XfceVolumeButtonClass *klass) gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = xfce_volume_button_dispose; gobject_class->finalize = xfce_volume_button_finalize; + gobject_class->set_property = xfce_volume_button_set_property; + gobject_class->get_property = xfce_volume_button_get_property; klass->volume_changed = xfce_volume_button_volume_changed; klass->mute_toggled = xfce_vol
[Xfce4-commits] Make the panel plugin use sensible default settings
Updating branch refs/heads/gber/improvements to 26d23803f3b14abe109210432d808cff0b93eb5c (commit) from b924d03fefb339aee39062bc266f347ac0bfe69c (commit) commit 26d23803f3b14abe109210432d808cff0b93eb5c Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Make the panel plugin use sensible default settings Make the panel plugin use sensible default settings (first card, master track) in the absence of an existing configuration instead of starting in an invalid state and forcing the user to configure it (bug #5716, bug #6624, bug #7125). NEWS |3 ++ libxfce4mixer/libxfce4mixer.c | 52 libxfce4mixer/libxfce4mixer.h |2 + libxfce4mixer/xfce-mixer-track-combo.c |7 ++-- panel-plugin/xfce-mixer-plugin.c | 49 +- 5 files changed, 101 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index d6f..5035212 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ - Update the icons on theme change (bug #3498). - Support xfce4-panel 4.10 with its deskbar mode (bug #8350). - Use xfconf for the panel plugin configuration. +- Make the panel plugin use sensible default settings (first card, master + track) in the absence of an existing configuration (bug #5716, bug #6624, + bug #7125). 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index b7ad3b7..86ea5db 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -128,6 +128,23 @@ xfce_mixer_get_card (const gchar *name) +GstElement * +xfce_mixer_get_default_card (void) +{ + GList *cards; + GstElement *card = NULL; + + cards = xfce_mixer_get_cards (); + + /* Try to get the first card */ + if (g_list_length (cards) > 0) +card = g_list_first (cards)->data; + + return card; +} + + + const gchar * xfce_mixer_get_card_display_name (GstElement *card) { @@ -189,6 +206,41 @@ xfce_mixer_get_track (GstElement *card, +GstMixerTrack * +xfce_mixer_get_default_track (GstElement *card) +{ + GstMixerTrack *track = NULL; + const GList *iter; + GstMixerTrack *track_tmp; + const GList *tracks; + + g_return_val_if_fail (GST_IS_MIXER (card), NULL); + + /* Try to get the master track */ + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track_tmp = GST_MIXER_TRACK (iter->data); + + if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER)) +{ + track = track_tmp; + break; +} +} + + /* If there is no master track, try to get the first track */ + if (!GST_IS_MIXER_TRACK (track)) +{ + tracks = gst_mixer_list_tracks (GST_MIXER (card)); + if (g_list_length (tracks) > 0) +track = g_list_first (tracks)->data; +} + + return track; +} + + + #ifdef HAVE_GST_MIXER_NOTIFICATION guint xfce_mixer_bus_connect (GCallback callback, diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index a68ff6d..93365dd 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -38,11 +38,13 @@ void xfce_mixer_shutdown (void); GList *xfce_mixer_get_cards (void); GstElement*xfce_mixer_get_card (const gchar *name); +GstElement*xfce_mixer_get_default_card (void); const gchar *xfce_mixer_get_card_internal_name (GstElement*card); const gchar *xfce_mixer_get_card_display_name (GstElement*card); void xfce_mixer_select_card(GstElement*card); GstMixerTrack *xfce_mixer_get_track (GstElement*card, const gchar *track_name); +GstMixerTrack *xfce_mixer_get_default_track (GstElement*card); #ifdef HAVE_GST_MIXER_NOTIFICATION guint xfce_mixer_bus_connect(GCallback callback, diff --git a/libxfce4mixer/xfce-mixer-track-combo.c b/libxfce4mixer/xfce-mixer-track-combo.c index f99a0ef..4c19acf 100644 --- a/libxfce4mixer/xfce-mixer-track-combo.c +++ b/libxfce4mixer/xfce-mixer-track-combo.c @@ -192,7 +192,6 @@ xfce_mixer_track_combo_set_soundcard (XfceMixerTrackCombo *combo, XfceMixerTrackType type; GtkTreeItertree_iter; const GList *iter; - GList *cards; gchar *label; gint counter; gint active_index = 0; @@ -205,10 +204,10 @@ xfce_mixer_track_combo_set_soundcard (XfceMixerTrackCombo *combo, combo->card = card; else { - cards = xfce_mixer_get_cards (); + card = xfce_mixer_get_default_card (); - if (G_LIKELY (g_list_length (cards) > 0)) -combo->card = g_list_first (cards)->data; + if (GST_IS_MIXER (card)) +combo->card = card; } /* Try to re-use the current track */ diff -
[Xfce4-commits] Support xfce4-panel 4.10 with its deskbar mode
Updating branch refs/heads/gber/improvements to 73ecc6e97f485b4fb7a0f6fa64013f4a0ba06076 (commit) from 2476a6a1854c820e534fe9a53a1ce056593787f1 (commit) commit 73ecc6e97f485b4fb7a0f6fa64013f4a0ba06076 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Support xfce4-panel 4.10 with its deskbar mode Add support for the deskbar mode introduced by xfce4-panel 4.10 and set the small property for the plugin so that it only occupies a single row in deskbar mode (bug #8350). NEWS |1 + configure.in.in |2 +- panel-plugin/xfce-mixer-plugin.c |6 ++ panel-plugin/xfce-volume-button.c |6 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ab83293..1f72815 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ - Modernize build system and build panel plugin as a module. - Use standard icons where possible. - Update the icons on theme change (bug #3498). +- Support xfce4-panel 4.10 with its deskbar mode (bug #8350). 4.8.0 diff --git a/configure.in.in b/configure.in.in index c2153a1..e5dd9c8 100644 --- a/configure.in.in +++ b/configure.in.in @@ -89,7 +89,7 @@ XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) +XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) dnl ** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index e2470a0..a396cc6 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -210,6 +210,9 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Only occupy a single row in deskbar mode */ + xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); + /* Connect to plugin signals */ g_signal_connect_swapped (G_OBJECT (plugin), "free-data", G_CALLBACK (xfce_mixer_plugin_free), mixer_plugin); g_signal_connect_swapped (G_OBJECT (plugin), "size-changed", G_CALLBACK (xfce_mixer_plugin_size_changed), mixer_plugin); @@ -231,6 +234,9 @@ xfce_mixer_plugin_size_changed (XfceMixerPlugin *mixer_plugin, { g_return_val_if_fail (mixer_plugin != NULL, FALSE); + /* The plugin only occupies a single row */ + size /= xfce_panel_plugin_get_nrows (XFCE_PANEL_PLUGIN (mixer_plugin)); + /* Determine size for the volume button icons */ size -= 2 + 2 * MAX (mixer_plugin->button->style->xthickness, mixer_plugin->button->style->ythickness); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index cc9bfed..adb94a7 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -38,6 +38,10 @@ +#define VOLUME_EPSILON 0.005 + + + /* Signal identifiers */ enum { @@ -415,7 +419,7 @@ xfce_volume_button_update (XfceVolumeButton *button) /* Determine the difference between upper and lower bound (= volume range) */ range = (upper - lower) / (G_N_ELEMENTS (icons) - 2); - if (G_UNLIKELY (button->is_muted || value < 0.005)) + if (G_UNLIKELY (button->is_muted || value < VOLUME_EPSILON)) { /* By definition, use the first icon if the button is muted or the volume is 0 */ pixbuf = button->pixbufs[0]; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Modernize build system and build panel plugin as a module
Updating branch refs/heads/gber/improvements to 294b8fcd8e786ae870cd20b9f28daf19fd70c735 (commit) from 2df866c1df3f06834884533dac33f6eb2d966d3d (commit) commit 294b8fcd8e786ae870cd20b9f28daf19fd70c735 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Modernize build system and build panel plugin as a module Modernize configure.in.in. Build the plugin as a module. Remove unnecessary trickery with desktop file substitutions. --HG-- rename : panel-plugin/xfce4-mixer-plugin.desktop.in.in => panel-plugin/mixer.desktop.in rename : xfce4-mixer/xfce4-mixer.desktop.in.in => xfce4-mixer/xfce4-mixer.desktop.in AUTHORS|1 + NEWS |1 + autogen.sh | 30 +- configure.in.in| 18 panel-plugin/Makefile.am | 42 ...mixer-plugin.desktop.in.in => mixer.desktop.in} |3 +- panel-plugin/xfce-mixer-plugin.c |2 +- xfce4-mixer/Makefile.am| 19 +--- ...-mixer.desktop.in.in => xfce4-mixer.desktop.in} |0 9 files changed, 62 insertions(+), 54 deletions(-) diff --git a/AUTHORS b/AUTHORS index c40ddc1..14d2553 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,2 @@ Jannis Pohlmann +Guido Berhoerster diff --git a/NEWS b/NEWS index 7bdbf49..6d0998c 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ - Fix a potential NULL pointer dereference. - Do not try to destroy the mixer window twice after a delete-event (bug #8288). +- Modernize build system and build panel plugin as a module. 4.8.0 diff --git a/autogen.sh b/autogen.sh index 2c644e9..ae2cb53 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,6 +3,7 @@ # vi:set et ai sw=2 sts=2 ts=2: */ #- # Copyright (c) 2009 Jannis Pohlmann +# Copyright (c) 2012 Guido Berhoerster # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -19,7 +20,32 @@ # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. -(type xdt-autogen) >/dev/null 2>&1 || { +# finds the given command in $PATH +findpath () { +if [ $# -ne 1 ] || [ -z "$1" ]; then +return 1 +fi + +_findpath_cmd="$1" +oIFS="${IFS}" +IFS=: +set -- ${PATH} +IFS="${oIFS}" + +while [ $# -gt 0 ]; do +if [ -x "$1/${_findpath_cmd}" ]; then +printf "%s\n" "$1/${_findpath_cmd}" +unset _findpath_cmd oIFS +return 0 +fi +shift +done + +unset _findpath_cmd oIFS +return 1 +} + +xdt_autogen="$(findpath xdt-autogen)" || { cat >&2 < +# Copyright (c) 2012 Guido Berhoerster # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -26,25 +27,25 @@ m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) m4_define([xfce4_mixer_version_tag], [git]) -m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [svn], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) +m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** dnl *** Debugging support for SVN snapshots *** dnl *** -m4_define([mixer_debug_default], [ifelse(xfce4_mixer_version_tag(), [svn], [full], [minimum])]) +m4_define([mixer_debug_default], [ifelse(xfce4_mixer_version_tag(), [git], [full], [minimum])]) dnl *** dnl *** Initialize autoconf *** dnl *** -AC_COPYRIGHT([Copyright (c) 2008-2011 Jannis Pohlmann .]) +AC_COPYRIGHT([Copyright (c) 2008-2011 Jannis Pohlmann . +Copyright (c) 2012 Guido Berhoerster .]) AC_INIT([xfce4-mixer], [xfce4_mixer_version], [http://bugzilla.xfce.org/], [xfce4-mixer]) -AC_REVISION([$Id$]) -AC_PREREQ([2.50]) +AC_PREREQ([2.60]) dnl *** dnl *** Initialize automake *** dnl *** -AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()]) +AM_INIT_AUTOMAKE([1.11 foreign check-news
[Xfce4-commits] Do not try to destroy the mixer window twice after a delete-event (bug #8288)
Updating branch refs/heads/gber/improvements to 2df866c1df3f06834884533dac33f6eb2d966d3d (commit) from cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7 (commit) commit 2df866c1df3f06834884533dac33f6eb2d966d3d Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Do not try to destroy the mixer window twice after a delete-event (bug #8288) NEWS|2 ++ xfce4-mixer/xfce-mixer-window.c |6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 50eff9e..7bdbf49 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ = - Handle a negative minimal volume correctly. - Fix a potential NULL pointer dereference. +- Do not try to destroy the mixer window twice after a delete-event + (bug #8288). 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index acbc67f..0c6a1e9 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -333,8 +333,6 @@ xfce_mixer_window_close (GtkAction *action, { /* This is a nasty hack to save the settings before the application quits */ xfce_mixer_window_closed (GTK_WIDGET (window), NULL, window); - - gtk_main_quit (); } @@ -350,7 +348,9 @@ xfce_mixer_window_closed (GtkWidget *window, gtk_window_get_size (GTK_WINDOW (mixer_window), &width, &height); g_object_set (G_OBJECT (mixer_window->preferences), "window-width", width, "window-height", height, NULL); - return FALSE; + gtk_main_quit (); + + return TRUE; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a potential NULL pointer dereference
Updating branch refs/heads/gber/improvements to cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7 (commit) from 626dbba8864ab23ef406259cfd750f54cfabf391 (commit) commit cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Fix a potential NULL pointer dereference NEWS |1 + libxfce4mixer/xfce-mixer-track-type.c |4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 41ffe45..50eff9e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 4.9.0 = - Handle a negative minimal volume correctly. +- Fix a potential NULL pointer dereference. 4.8.0 diff --git a/libxfce4mixer/xfce-mixer-track-type.c b/libxfce4mixer/xfce-mixer-track-type.c index f0f1cb8..298443c 100644 --- a/libxfce4mixer/xfce-mixer-track-type.c +++ b/libxfce4mixer/xfce-mixer-track-type.c @@ -57,7 +57,9 @@ XfceMixerTrackType xfce_mixer_track_type_new (GstMixerTrack *track) { XfceMixerTrackType type = XFCE_MIXER_TRACK_TYPE_CAPTURE; - + + g_return_val_if_fail (GST_IS_MIXER_TRACK (track), G_TYPE_INVALID); + if (G_UNLIKELY (GST_IS_MIXER_OPTIONS (track))) type = XFCE_MIXER_TRACK_TYPE_OPTIONS; else ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Handle a negative minimal volume correctly
Updating branch refs/heads/gber/improvements to 626dbba8864ab23ef406259cfd750f54cfabf391 (commit) from c0c6816a9d37f3915ec421e4fab0e58edf5847d7 (commit) commit 626dbba8864ab23ef406259cfd750f54cfabf391 Author: Guido Berhoerster Date: Fri Sep 21 12:00:36 2012 +0200 Handle a negative minimal volume correctly NEWS |5 + configure.in.in |4 ++-- libxfce4mixer/libxfce4mixer.c|3 +++ panel-plugin/xfce-mixer-plugin.c |6 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 06eed79..41ffe45 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +4.9.0 += +- Handle a negative minimal volume correctly. + + 4.8.0 = - Fix too small plugin button in the new panel. diff --git a/configure.in.in b/configure.in.in index 0f3f977..e043134 100644 --- a/configure.in.in +++ b/configure.in.in @@ -21,11 +21,11 @@ dnl *** dnl *** Version information *** dnl *** m4_define([xfce4_mixer_version_major], [4]) -m4_define([xfce4_mixer_version_minor], [8]) +m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], []) +m4_define([xfce4_mixer_version_tag], [git]) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [svn], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 69746c0..d75c571 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -218,6 +218,9 @@ xfce_mixer_get_max_volume (gint *volumes, g_return_val_if_fail (volumes != NULL, 0); + if (num_channels > 0) +max = volumes[0]; + for (--num_channels; num_channels >= 0; --num_channels) if (volumes[num_channels] > max) max = volumes[num_channels]; diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index f6cf276..d56d43f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -525,6 +525,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) { XfceMixerTrackType track_type; gboolean muted = FALSE; + gint volume_range; gdoublevolume; gint *volumes; gchar *tip_text; @@ -537,8 +538,11 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) volumes = g_new (gint, mixer_plugin->track->num_channels); gst_mixer_get_volume (GST_MIXER (mixer_plugin->card), mixer_plugin->track, volumes); + /* Determine difference between max and min volume */ + volume_range = mixer_plugin->track->max_volume - mixer_plugin->track->min_volume; + /* Determine maximum value as double between 0.0 and 1.0 */ - volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin->track->num_channels)) / mixer_plugin->track->max_volume; + volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin->track->num_channels) - mixer_plugin->track->min_volume) / volume_range; /* Set tooltip (e.g. 'Master: 50%') */ tip_text = g_strdup_printf (_("%s: %i%%"), mixer_plugin->track_label, (gint) (volume * 100)); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating branch gber/improvements
Updating branch refs/heads/gber/improvements as new branch to 55c363bff10c6c19213ca11d3738348d8848e9e8 (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/gber/improvements for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits