gnome-media r4162 - in trunk: . gnome-volume-control gnome-volume-control/src
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4162 - in trunk: . gnome-volume-control gnome-volume-control/src
- Date: Mon, 26 Jan 2009 16:08:37 +0000 (UTC)
Author: hadess
Date: Mon Jan 26 16:08:37 2009
New Revision: 4162
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4162&view=rev
Log:
2009-01-26 Bastien Nocera <hadess hadess net>
* configure.ac: Require GTK+ 2.15.x
2009-01-26 Bastien Nocera <hadess hadess net>
* src/Makefile.am: Fix automake warning
* src/gvc-applet.c (maybe_show_status_icons):
* src/gvc-mixer-dialog.c (gvc_mixer_dialog_constructor):
* src/gvc-stream-status-icon.c (on_status_icon_scroll_event),
(update_icon), (gvc_stream_status_icon_init): Remove ifdef's
from the volume control code, as GTK+ 2.15.1 is now required
(Closes: #564318)
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/gnome-volume-control/ChangeLog
trunk/gnome-volume-control/src/Makefile.am
trunk/gnome-volume-control/src/gvc-applet.c
trunk/gnome-volume-control/src/gvc-mixer-dialog.c
trunk/gnome-volume-control/src/gvc-stream-status-icon.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Jan 26 16:08:37 2009
@@ -87,6 +87,9 @@
dnl Check for the new volume control modules
dnl=======================================================================
+dnl The new gnome-volume-control needs a newer GTK+
+GTK_REQUIRED_VERSION=2.15.1
+
PKG_CHECK_MODULES(VOLUME_CONTROL,
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
gobject-2.0 >= $GLIB_REQUIRED_VERSION
Modified: trunk/gnome-volume-control/src/Makefile.am
==============================================================================
--- trunk/gnome-volume-control/src/Makefile.am (original)
+++ trunk/gnome-volume-control/src/Makefile.am Mon Jan 26 16:08:37 2009
@@ -5,7 +5,7 @@
gnome-volume-control \
$(NULL)
-INCLUDES = \
+AM_CPPFLAGS = \
$(WARN_CFLAGS) \
$(VOLUME_CONTROL_CFLAGS) \
$(PULSEAUDIO_CFLAGS) \
Modified: trunk/gnome-volume-control/src/gvc-applet.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-applet.c (original)
+++ trunk/gnome-volume-control/src/gvc-applet.c Mon Jan 26 16:08:37 2009
@@ -73,7 +73,7 @@
{
gboolean show;
GvcMixerStream *stream;
- GSList *source_outputs;
+ GSList *source_outputs, *l;
show = TRUE;
stream = gvc_mixer_control_get_default_sink (applet->priv->control);
@@ -87,7 +87,16 @@
stream = gvc_mixer_control_get_default_source (applet->priv->control);
source_outputs = gvc_mixer_control_get_source_outputs (applet->priv->control);
if (stream != NULL && source_outputs != NULL) {
- show = TRUE;
+ /* Check that we're not trying to add the peak detector
+ * as an application doing recording */
+ for (l = source_outputs ; l ; l = l->next) {
+ GvcMixerStream *s = l->data;
+
+ if (g_strcmp0 (gvc_mixer_stream_get_description (s), _("Peak detect")) != 0) {
+ show = TRUE;
+ break;
+ }
+ }
}
gtk_status_icon_set_visible (GTK_STATUS_ICON (applet->priv->input_status_icon), show);
Modified: trunk/gnome-volume-control/src/gvc-mixer-dialog.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-mixer-dialog.c (original)
+++ trunk/gnome-volume-control/src/gvc-mixer-dialog.c Mon Jan 26 16:08:37 2009
@@ -986,11 +986,7 @@
self = GVC_MIXER_DIALOG (object);
gtk_dialog_add_button (GTK_DIALOG (self), "gtk-close", GTK_RESPONSE_OK);
-#if GTK_CHECK_VERSION(2,14,0)
main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- main_vbox = GTK_DIALOG (self)->vbox;
-#endif
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
Modified: trunk/gnome-volume-control/src/gvc-stream-status-icon.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-stream-status-icon.c (original)
+++ trunk/gnome-volume-control/src/gvc-stream-status-icon.c Mon Jan 26 16:08:37 2009
@@ -260,7 +260,6 @@
activate_time);
}
-#if GTK_CHECK_VERSION(2,15,0)
static gboolean
on_status_icon_scroll_event (GtkStatusIcon *status_icon,
GdkEventScroll *event,
@@ -298,7 +297,6 @@
return FALSE;
}
-#endif
static void
gvc_icon_release_grab (GvcStreamStatusIcon *icon,
@@ -444,51 +442,31 @@
if (is_muted) {
markup = g_strdup_printf (
-#if GTK_CHECK_VERSION(2,15,0)
"<b>%s: %s</b>\n<small>%s</small>",
-#else
- "%s: %s\n%s",
-#endif
icon->priv->display_name,
_("Muted"),
gvc_mixer_stream_get_description (icon->priv->mixer_stream));
} else if (can_decibel && (db > PA_DECIBEL_MININFTY)) {
markup = g_strdup_printf (
-#if GTK_CHECK_VERSION(2,15,0)
"<b>%s: %.0f%%</b>\n<small>%0.2f dB\n%s</small>",
-#else
- "%s: %.0f%%\n%0.2f dB\n%s",
-#endif
icon->priv->display_name,
100 * (float)volume / PA_VOLUME_NORM,
db,
gvc_mixer_stream_get_description (icon->priv->mixer_stream));
} else if (can_decibel) {
markup = g_strdup_printf (
-#if GTK_CHECK_VERSION(2,15,0)
"<b>%s: %.0f%%</b>\n<small>-∞ dB\n%s</small>",
-#else
- "%s: %.0f%%\n-∞ dB\n%s",
-#endif
icon->priv->display_name,
100 * (float)volume / PA_VOLUME_NORM,
gvc_mixer_stream_get_description (icon->priv->mixer_stream));
} else {
markup = g_strdup_printf (
-#if GTK_CHECK_VERSION(2,15,0)
"<b>%s: %.0f%%</b>\n<small>%s</small>",
-#else
- "%s: %.0f%%\n%s",
-#endif
icon->priv->display_name,
100 * (float)volume / PA_VOLUME_NORM,
gvc_mixer_stream_get_description (icon->priv->mixer_stream));
}
-#if GTK_CHECK_VERSION(2,15,0)
gtk_status_icon_set_tooltip_markup (GTK_STATUS_ICON (icon), markup);
-#else
- gtk_status_icon_set_tooltip (GTK_STATUS_ICON (icon), markup);
-#endif
g_free (markup);
}
@@ -790,12 +768,10 @@
"popup-menu",
G_CALLBACK (on_status_icon_popup_menu),
icon);
-#if GTK_CHECK_VERSION(2,15,0)
g_signal_connect (icon,
"scroll-event",
G_CALLBACK (on_status_icon_scroll_event),
icon);
-#endif
g_signal_connect (icon,
"notify::visible",
G_CALLBACK (on_status_icon_visible_notify),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]