summaryrefslogtreecommitdiff
path: root/mate-volume-control
diff options
context:
space:
mode:
Diffstat (limited to 'mate-volume-control')
-rw-r--r--mate-volume-control/gvc-balance-bar.c4
-rw-r--r--mate-volume-control/gvc-channel-bar.c12
-rw-r--r--mate-volume-control/gvc-combo-box.c4
-rw-r--r--mate-volume-control/gvc-level-bar.c3
-rw-r--r--mate-volume-control/gvc-mixer-dialog.c2
-rw-r--r--mate-volume-control/gvc-stream-status-icon.c54
6 files changed, 1 insertions, 78 deletions
diff --git a/mate-volume-control/gvc-balance-bar.c b/mate-volume-control/gvc-balance-bar.c
index f7a33b9..9d3555b 100644
--- a/mate-volume-control/gvc-balance-bar.c
+++ b/mate-volume-control/gvc-balance-bar.c
@@ -344,12 +344,8 @@ gvc_balance_bar_set_balance_type (GvcBalanceBar *bar, GvcBalanceType btype)
break;
}
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.0);
-#endif
/* Frame */
frame = gtk_frame_new (NULL);
diff --git a/mate-volume-control/gvc-channel-bar.c b/mate-volume-control/gvc-channel-bar.c
index 4cecebd..ad05abf 100644
--- a/mate-volume-control/gvc-channel-bar.c
+++ b/mate-volume-control/gvc-channel-bar.c
@@ -340,24 +340,16 @@ update_marks (GvcChannelBar *bar)
gtk_widget_set_halign (bar->priv->high_image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (bar->priv->high_image, GTK_ALIGN_START);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.0);
-#endif
} else {
gtk_widget_set_halign (bar->priv->low_image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (bar->priv->low_image, GTK_ALIGN_CENTER);
gtk_widget_set_halign (bar->priv->high_image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (bar->priv->high_image, GTK_ALIGN_CENTER);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5);
-#endif
}
}
@@ -1102,12 +1094,8 @@ gvc_channel_bar_init (GvcChannelBar *bar)
gtk_widget_set_no_show_all (bar->priv->high_image, TRUE);
bar->priv->label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5);
-#endif
gtk_widget_set_no_show_all (bar->priv->label, TRUE);
/* Frame */
diff --git a/mate-volume-control/gvc-combo-box.c b/mate-volume-control/gvc-combo-box.c
index 3fc71c6..fe77f95 100644
--- a/mate-volume-control/gvc-combo-box.c
+++ b/mate-volume-control/gvc-combo-box.c
@@ -354,12 +354,8 @@ gvc_combo_box_init (GvcComboBox *combobox)
combobox->priv->label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (combobox->priv->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (combobox->priv->label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (combobox->priv->label), 0.0, 0.5);
-#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (combobox->priv->label),
combobox->priv->combobox);
diff --git a/mate-volume-control/gvc-level-bar.c b/mate-volume-control/gvc-level-bar.c
index 48ba9a7..f75a884 100644
--- a/mate-volume-control/gvc-level-bar.c
+++ b/mate-volume-control/gvc-level-bar.c
@@ -676,9 +676,8 @@ gvc_level_bar_class_init (GvcLevelBarClass *klass)
widget_class->get_preferred_width = gvc_level_bar_get_preferred_width;
widget_class->get_preferred_height = gvc_level_bar_get_preferred_height;
widget_class->size_allocate = gvc_level_bar_size_allocate;
-#if GTK_CHECK_VERSION (3, 20, 0)
+
gtk_widget_class_set_css_name (widget_class, "gvc-level-bar");
-#endif
properties[PROP_ORIENTATION] =
g_param_spec_enum ("orientation",
diff --git a/mate-volume-control/gvc-mixer-dialog.c b/mate-volume-control/gvc-mixer-dialog.c
index 5acaff3..b36232c 100644
--- a/mate-volume-control/gvc-mixer-dialog.c
+++ b/mate-volume-control/gvc-mixer-dialog.c
@@ -2300,10 +2300,8 @@ gvc_mixer_dialog_class_init (GvcMixerDialogClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
-#if GTK_CHECK_VERSION (3, 20, 0)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_css_name (widget_class, "GvcMixerDialog");
-#endif
g_type_class_add_private (klass, sizeof (GvcMixerDialogPrivate));
}
diff --git a/mate-volume-control/gvc-stream-status-icon.c b/mate-volume-control/gvc-stream-status-icon.c
index 24c5573..70501c9 100644
--- a/mate-volume-control/gvc-stream-status-icon.c
+++ b/mate-volume-control/gvc-stream-status-icon.c
@@ -70,11 +70,7 @@ popup_dock (GvcStreamStatusIcon *icon, guint time)
GdkScreen *screen;
int x;
int y;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor_num;
-#else
- int monitor_num;
-#endif
GdkRectangle monitor;
GtkRequisition dock_req;
@@ -93,13 +89,8 @@ popup_dock (GvcStreamStatusIcon *icon, guint time)
gvc_channel_bar_set_orientation (GVC_CHANNEL_BAR (icon->priv->bar),
1 - orientation);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_point (gdk_screen_get_display (screen), area.x, area.y);
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_point (screen, area.x, area.y);
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
gtk_container_foreach (GTK_CONTAINER (icon->priv->dock),
(GtkCallback) gtk_widget_show_all, NULL);
@@ -141,7 +132,6 @@ popup_dock (GvcStreamStatusIcon *icon, guint time)
display = gtk_widget_get_display (icon->priv->dock);
do {
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat = gdk_display_get_default_seat (display);
GdkWindow *window = gtk_widget_get_window (icon->priv->dock);
@@ -157,40 +147,6 @@ popup_dock (GvcStreamStatusIcon *icon, guint time)
gtk_widget_hide (icon->priv->dock);
break;
}
-#else
- GdkDeviceManager *manager = gdk_display_get_device_manager (display);
- GdkDevice *pointer = gdk_device_manager_get_client_pointer (manager);
- GdkDevice *keyboard = gdk_device_get_associated_device (pointer);
- GdkWindow *window = gtk_widget_get_window (icon->priv->dock);
-
- if (gdk_device_grab (pointer,
- window,
- GDK_OWNERSHIP_NONE,
- TRUE,
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_SCROLL_MASK,
- NULL,
- time) != GDK_GRAB_SUCCESS) {
- gtk_grab_remove (icon->priv->dock);
- gtk_widget_hide (icon->priv->dock);
- break;
- }
-
- if (gdk_device_grab (keyboard,
- window,
- GDK_OWNERSHIP_NONE,
- TRUE,
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK,
- NULL,
- time) != GDK_GRAB_SUCCESS) {
- gdk_device_ungrab (pointer, time);
- gtk_grab_remove (icon->priv->dock);
- gtk_widget_hide (icon->priv->dock);
- }
-#endif
} while (0);
gtk_widget_grab_focus (icon->priv->dock);
@@ -324,13 +280,9 @@ on_status_icon_scroll_event (GtkStatusIcon *status_icon,
static void
gvc_icon_release_grab (GvcStreamStatusIcon *icon, GdkEventButton *event)
{
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkDisplay *display = gtk_widget_get_display (icon->priv->dock);
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
-#else
- gdk_device_ungrab (event->device, event->time);
-#endif
gtk_grab_remove (icon->priv->dock);
/* Hide again */
@@ -357,15 +309,9 @@ popdown_dock (GvcStreamStatusIcon *icon)
display = gtk_widget_get_display (icon->priv->dock);
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
-#else
- GdkDeviceManager *manager = gdk_display_get_device_manager (display);
- gdk_device_ungrab (gdk_device_manager_get_client_pointer (manager),
- GDK_CURRENT_TIME);
-#endif
/* Hide again */
gtk_widget_hide (icon->priv->dock);
}