diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-20 16:17:02 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-20 16:17:02 +0100 |
commit | 64c176af81eb133ecdd13ca54e5c3dba657806ad (patch) | |
tree | b2816472eb9034f469ae59096f3118525ce4aedf /gst-mixer/src/window.c | |
parent | 89df05d618d097c98d0586c67e9d8fb9ae402cb6 (diff) | |
download | mate-media-64c176af81eb133ecdd13ca54e5c3dba657806ad.tar.bz2 mate-media-64c176af81eb133ecdd13ca54e5c3dba657806ad.tar.xz |
gst-mixer: Add GTK3 support
Bump minimum GTK2 version to use GtkComboBoxText for both GTK versions
Diffstat (limited to 'gst-mixer/src/window.c')
-rw-r--r-- | gst-mixer/src/window.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gst-mixer/src/window.c b/gst-mixer/src/window.c index c266ee0..58188c6 100644 --- a/gst-mixer/src/window.c +++ b/gst-mixer/src/window.c @@ -27,6 +27,9 @@ #include <gtk/gtk.h> #include <gio/gio.h> #include <gdk/gdkkeysyms.h> +#if GTK_CHECK_VERSION (3, 0, 0) +#include <gdk/gdkkeysyms-compat.h> +#endif #include "schemas.h" #include "preferences.h" @@ -61,7 +64,7 @@ cb_change (GtkComboBox *widget, { gchar *device_name; - device_name = gtk_combo_box_get_active_text (widget); + device_name = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget)); g_return_if_fail (device_name != NULL); g_settings_set_string (win->settings, MATE_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT, device_name); @@ -340,7 +343,7 @@ mate_volume_control_window_new (GList *elements) } active_element_num = count; - combo_box = gtk_combo_box_new_text (); + combo_box = gtk_combo_box_text_new (); renderer = gtk_cell_renderer_text_new (); g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo_box)); @@ -350,7 +353,7 @@ mate_volume_control_window_new (GList *elements) const gchar *name; name = g_object_get_data (item->data, "mate-volume-control-name"); - gtk_combo_box_append_text(GTK_COMBO_BOX (combo_box), name); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (combo_box), name); } gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), active_element_num); g_signal_connect (combo_box, "changed", G_CALLBACK (cb_change), win); |