gnome-media r4088 - in trunk/gnome-volume-control: . src



Author: matthiasc
Date: Fri Dec 12 17:55:41 2008
New Revision: 4088
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4088&view=rev

Log:
Don't use GTK+ 2.16 api unconditionally


Modified:
   trunk/gnome-volume-control/ChangeLog
   trunk/gnome-volume-control/src/gvc-stream-status-icon.c

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	Fri Dec 12 17:55:41 2008
@@ -393,30 +393,54 @@
                 icon->priv->current_icon = n;
         }
 
+
         if (is_muted) {
-                markup = g_strdup_printf ("<b>%s: %s</b>\n<small>%s</small>",
+                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 ("<b>%s: %.0f%%</b>\n<small>%0.2f dB\n%s</small>",
+                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 ("<b>%s: %.0f%%</b>\n<small>-&#8734; dB\n%s</small>",
+                markup = g_strdup_printf (
+#if GTK_CHECK_VERSION(2.15.0)
+                                          "<b>%s: %.0f%%</b>\n<small>-&#8734; dB\n%s</small>",
+#else
+                                          "%s: %.0f%%\n-&#8734; 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 ("<b>%s: %.0f%%</b>\n<small>%s</small>",
+                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));
         }
-        gtk_status_icon_set_tooltip_markup (GTK_STATUS_ICON (icon),
-                                            markup);
+#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);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]