diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-20 16:16:24 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-20 16:16:24 +0100 |
commit | 89df05d618d097c98d0586c67e9d8fb9ae402cb6 (patch) | |
tree | d9551e69ecf73ee078f25dd30d977c64ea144676 /mate-volume-control/src/gvc-stream-status-icon.c | |
parent | 6bab762efb1b6a9f609650d3934bec09527360f8 (diff) | |
download | mate-media-89df05d618d097c98d0586c67e9d8fb9ae402cb6.tar.bz2 mate-media-89df05d618d097c98d0586c67e9d8fb9ae402cb6.tar.xz |
mate-volume-control: Add GTK3 support
Diffstat (limited to 'mate-volume-control/src/gvc-stream-status-icon.c')
-rw-r--r-- | mate-volume-control/src/gvc-stream-status-icon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mate-volume-control/src/gvc-stream-status-icon.c b/mate-volume-control/src/gvc-stream-status-icon.c index e0b5124..ce13a83 100644 --- a/mate-volume-control/src/gvc-stream-status-icon.c +++ b/mate-volume-control/src/gvc-stream-status-icon.c @@ -23,6 +23,7 @@ #include <stdlib.h> #include <stdio.h> #include <unistd.h> +#include <math.h> #include <glib.h> #include <glib/gi18n.h> @@ -37,6 +38,12 @@ #include "gvc-channel-bar.h" #include "gvc-stream-status-icon.h" +#if GTK_CHECK_VERSION (3, 0, 0) +#define MATE_DESKTOP_USE_UNSTABLE_API +#include <libmate-desktop/mate-desktop-utils.h> +#define gdk_spawn_command_line_on_screen mate_gdk_spawn_command_line_on_screen +#endif + #define GVC_STREAM_STATUS_ICON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_STREAM_STATUS_ICON, GvcStreamStatusIconPrivate)) struct GvcStreamStatusIconPrivate @@ -137,7 +144,11 @@ popup_dock (GvcStreamStatusIcon *icon, gtk_container_foreach (GTK_CONTAINER (icon->priv->dock), (GtkCallback) gtk_widget_show_all, NULL); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (icon->priv->dock, &dock_req, NULL); +#else gtk_widget_size_request (icon->priv->dock, &dock_req); +#endif if (orientation == GTK_ORIENTATION_VERTICAL) { if (area.x + area.width + dock_req.width <= monitor.x + monitor.width) { |