summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessx-status/applet.c4
-rw-r--r--battstat/battstat_applet.c4
-rw-r--r--charpick/charpick.c52
-rw-r--r--charpick/properties.c15
-rw-r--r--command/command.c12
-rw-r--r--configure.ac6
-rw-r--r--cpufreq/src/cpufreq-applet.c7
-rw-r--r--cpufreq/src/cpufreq-prefs.c7
-rw-r--r--drivemount/drive-button.c26
-rw-r--r--drivemount/drivemount.c7
-rw-r--r--geyes/geyes.c22
-rw-r--r--geyes/themes.c15
-rw-r--r--mateweather/mateweather-applet.c7
-rw-r--r--mateweather/mateweather-dialog.c111
-rw-r--r--mateweather/mateweather-pref.c28
-rw-r--r--netspeed/src/netspeed.c42
-rw-r--r--stickynotes/stickynotes.c7
-rw-r--r--stickynotes/stickynotes_applet_callbacks.c16
-rw-r--r--timerapplet/timerapplet.c16
-rw-r--r--trashapplet/src/trashapplet.c22
-rw-r--r--trashapplet/src/xstuff.c9
21 files changed, 12 insertions, 423 deletions
diff --git a/accessx-status/applet.c b/accessx-status/applet.c
index 41f9da2b..32b59553 100644
--- a/accessx-status/applet.c
+++ b/accessx-status/applet.c
@@ -153,14 +153,10 @@ static void help_cb(GtkAction* action, AccessxStatusApplet* sapplet)
GError* error = NULL;
GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(sapplet->applet));
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window(NULL,
"help:mate-accessx-status",
gtk_get_current_event_time(),
&error);
-#else
- gtk_show_uri(screen, "help:mate-accessx-status", gtk_get_current_event_time(), &error);
-#endif
if (error)
{
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index e8940eba..71e3c76a 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -1136,11 +1136,7 @@ battstat_show_help( ProgressData *battstat, const char *section )
else
uri = g_strdup ("help:mate-battstat");
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (battstat->applet)),
-#endif
uri,
gtk_get_current_event_time (),
&error);
diff --git a/charpick/charpick.c b/charpick/charpick.c
index f896b6b3..97e076df 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -380,7 +380,6 @@ chooser_button_clicked (GtkButton *button, charpick_data *curr_data)
indication be drawn on the label itself when space is tight. Taken from the clock applet.
FIXME : This is an Evil Hack and should be fixed when the focus padding can be overridden at the gtk+ level */
-#if GTK_CHECK_VERSION (3, 20, 0)
static inline void force_no_button_padding (GtkWidget *widget)
{
GtkCssProvider *provider;
@@ -403,34 +402,6 @@ static inline void force_no_button_padding (GtkWidget *widget)
gtk_widget_set_name (widget, "charpick-applet-button");
}
-#else
-static inline void force_no_focus_padding (GtkWidget *widget)
-{
- static gboolean first_time = TRUE;
- GtkCssProvider *provider;
-
- if (first_time) {
- provider = gtk_css_provider_new ();
-
- gtk_css_provider_load_from_data (provider,
- "#charpick-applet-button {\n"
- "-GtkWidget-focus-line-width: 0px;\n"
- "-GtkWidget-focus-padding: 0px;\n"
- "}",
- -1,
- NULL);
- gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-
- g_object_unref (provider);
-
- first_time = FALSE;
- }
-
- gtk_widget_set_name (widget, "charpick-applet-button");
-}
-#endif
/* creates table of buttons, sets up their callbacks, and packs the table in
the event box */
@@ -481,12 +452,10 @@ build_table(charpick_data *p_curr_data)
}
gtk_container_add (GTK_CONTAINER (button), arrow);
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
- /* FIXME : evil hack (see force_no_focus_padding) */
-#if GTK_CHECK_VERSION (3, 20, 0)
+
+ /* FIXME : evil hack (see force_no_button_padding) */
force_no_button_padding (button);
-#else
- force_no_focus_padding (button);
-#endif
+
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (chooser_button_clicked),
@@ -524,12 +493,10 @@ build_table(charpick_data *p_curr_data)
g_free (atk_desc);
gtk_widget_show (toggle_button[i]);
gtk_button_set_relief(GTK_BUTTON(toggle_button[i]), GTK_RELIEF_NONE);
- /* FIXME : evil hack (see force_no_focus_padding) */
-#if GTK_CHECK_VERSION (3, 20, 0)
+
+ /* FIXME : evil hack (see force_no_button_padding) */
force_no_button_padding (toggle_button[i]);
-#else
- force_no_focus_padding (toggle_button[i]);
-#endif
+
gtk_widget_set_tooltip_text (toggle_button[i], name);
g_free (name);
@@ -660,17 +627,10 @@ help_cb (GtkAction *action,
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"help:mate-char-palette",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (curr_data->applet)),
- "help:mate-char-palette",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) { /* FIXME: the user needs to see this */
g_warning ("help error: %s\n", error->message);
diff --git a/charpick/properties.c b/charpick/properties.c
index 4842b478..4676968a 100644
--- a/charpick/properties.c
+++ b/charpick/properties.c
@@ -415,11 +415,7 @@ create_hig_catagory (GtkWidget *main_box, gchar *title)
tmp = g_strdup_printf ("<b>%s</b>", title);
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
@@ -459,11 +455,7 @@ static void default_chars_frame_create(charpick_data *curr_data)
label = gtk_label_new_with_mnemonic(_("_Palettes:"));
gtk_box_pack_start(GTK_BOX(vbox3), label, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show(label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
@@ -507,17 +499,10 @@ phelp_cb (GtkDialog *dialog, gint tab, gpointer data)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (dialog),
"help:mate-char-palette/charpick-prefs",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
- "help:mate-char-palette/charpick-prefs",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) { /* FIXME: the user needs to see this */
g_warning ("help error: %s\n", error->message);
diff --git a/command/command.c b/command/command.c
index 395dbd5f..eadf5d28 100644
--- a/command/command.c
+++ b/command/command.c
@@ -144,36 +144,24 @@ command_settings_callback (GtkAction *action, CommandApplet *command_applet)
gtk_container_set_border_width (GTK_CONTAINER (dialog), 10);
widget = gtk_label_new (_("Command:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 0, 1, 1);
command = gtk_entry_new ();
gtk_grid_attach (grid, command, 2, 0, 1, 1);
widget = gtk_label_new (_("Interval (seconds):"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 1, 1, 1);
interval = gtk_spin_button_new_with_range (1.0, 86400.0, 1.0);
gtk_grid_attach (grid, interval, 2, 1, 1, 1);
widget = gtk_label_new (_("Maximum width (chars):"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 2, 1, 1);
width = gtk_spin_button_new_with_range(1.0, 100.0, 1.0);
diff --git a/configure.ac b/configure.ac
index 11e85870..982277d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,9 +11,9 @@ AC_CONFIG_MACRO_DIR(m4)
dnl ***************************************************************************
dnl *** Minimum library versions for MATE-APPLETS ***
dnl ***************************************************************************
-GLIB_REQUIRED=2.36.0
-GIO_REQUIRED=2.15.3
-GTK_REQUIRED=3.14.0
+GLIB_REQUIRED=2.50.0
+GIO_REQUIRED=2.50.0
+GTK_REQUIRED=3.22.0
LIBPANEL4_REQUIRED=1.17.0
LIBGTOP_REQUIRED=2.12.0
LIBNOTIFY_REQUIRED=0.7.0
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index 4b22ea21..335c8c63 100644
--- a/cpufreq/src/cpufreq-applet.c
+++ b/cpufreq/src/cpufreq-applet.c
@@ -593,17 +593,10 @@ cpufreq_applet_help_cb (GtkAction *action,
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"help:mate-cpufreq-applet",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (applet)),
- "help:mate-cpufreq-applet",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
cpufreq_utils_display_error (_("Could not open help document"),
diff --git a/cpufreq/src/cpufreq-prefs.c b/cpufreq/src/cpufreq-prefs.c
index 43009ed0..38c28402 100644
--- a/cpufreq/src/cpufreq-prefs.c
+++ b/cpufreq/src/cpufreq-prefs.c
@@ -356,17 +356,10 @@ cpufreq_prefs_dialog_response_cb (CPUFreqPrefs *prefs,
GError *error = NULL;
if (response == GTK_RESPONSE_HELP) {
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (prefs->priv->dialog),
"help:mate-cpufreq-applet/cpufreq-applet-prefs",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (prefs->priv->dialog)),
- "help:mate-cpufreq-applet/cpufreq-applet-prefs",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
cpufreq_utils_display_error (_("Could not open help document"),
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index bd01805e..1b1a758c 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -72,7 +72,6 @@ drive_button_class_init (DriveButtonClass *class)
provider = gtk_css_provider_new ();
-#if GTK_CHECK_VERSION (3, 20, 0)
gtk_css_provider_load_from_data (provider,
"#drive-button {\n"
" border-width: 0px;\n"
@@ -80,15 +79,6 @@ drive_button_class_init (DriveButtonClass *class)
" margin: 0px;\n"
"}",
-1, NULL);
-#else
- gtk_css_provider_load_from_data (provider,
- "#drive-button {\n"
- " border-width: 0px;\n"
- " -GtkWidget-focus-line-width: 0px;\n"
- " -GtkWidget-focus-padding: 0px;\n"
- "}",
- -1, NULL);
-#endif
gtk_style_context_add_provider_for_screen (gdk_screen_get_default(),
GTK_STYLE_PROVIDER (provider),
@@ -176,7 +166,6 @@ drive_button_unrealize (GtkWidget *widget)
}
#endif /* 0 */
-#if GTK_CHECK_VERSION(3, 22, 0)
static int
_gtk_get_monitor_num (GdkMonitor *monitor)
{
@@ -193,7 +182,6 @@ _gtk_get_monitor_num (GdkMonitor *monitor)
return -1;
}
-#endif
/* the following function is adapted from gtkmenuitem.c */
static void
@@ -207,12 +195,8 @@ position_menu (GtkMenu *menu, gint *x, gint *y,
GtkRequisition requisition;
GtkTextDirection direction;
GdkRectangle monitor;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor_num;
GdkDisplay *display;
-#else
- gint monitor_num;
-#endif
g_return_if_fail (menu != NULL);
g_return_if_fail (x != NULL);
@@ -227,17 +211,11 @@ position_menu (GtkMenu *menu, gint *x, gint *y,
theight = requisition.height;
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
-#if GTK_CHECK_VERSION (3, 22, 0)
display =gdk_screen_get_display (screen);
monitor_num = gdk_display_get_monitor_at_window (display, gtk_widget_get_window (widget));
if (monitor_num == NULL)
monitor_num = gdk_display_get_monitor (display, 0);
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
- if (monitor_num < 0) monitor_num = 0;
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
if (!gdk_window_get_origin (gtk_widget_get_window (widget), &tx, &ty)) {
g_warning ("Menu not on screen");
@@ -263,11 +241,7 @@ position_menu (GtkMenu *menu, gint *x, gint *y,
*x = CLAMP (tx, monitor.x, MAX (monitor.x, monitor.x + monitor.width - twidth));
*y = ty;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_menu_set_monitor (menu, _gtk_get_monitor_num (monitor_num));
-#else
- gtk_menu_set_monitor (menu, monitor_num);
-#endif
}
static gboolean
diff --git a/drivemount/drivemount.c b/drivemount/drivemount.c
index 57a7031a..433aa6cc 100644
--- a/drivemount/drivemount.c
+++ b/drivemount/drivemount.c
@@ -132,17 +132,10 @@ display_help (GtkAction *action,
screen = gtk_widget_get_screen (GTK_WIDGET (drive_list));
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"help:mate-drivemount",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (screen,
- "help:mate-drivemount",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
GtkWidget *dialog;
diff --git a/geyes/geyes.c b/geyes/geyes.c
index 2c8ed8a8..00f85fd7 100644
--- a/geyes/geyes.c
+++ b/geyes/geyes.c
@@ -124,33 +124,20 @@ static gint
timer_cb (EyesApplet *eyes_applet)
{
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
- GdkDevice *device;
-#endif
gint x, y;
gint pupil_x, pupil_y;
gint i;
display = gtk_widget_get_display (GTK_WIDGET (eyes_applet->applet));
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (display);
-#else
- device_manager = gdk_display_get_device_manager (display);
- device = gdk_device_manager_get_client_pointer (device_manager);
-#endif
for (i = 0; i < eyes_applet->num_eyes; i++) {
if (gtk_widget_get_realized (eyes_applet->eyes[i])) {
-#if GTK_CHECK_VERSION (3, 20, 0)
gdk_window_get_device_position (gtk_widget_get_window (eyes_applet->eyes[i]),
gdk_seat_get_pointer (seat),
&x, &y, NULL);
-#else
- gdk_window_get_device_position (gtk_widget_get_window (eyes_applet->eyes[i]), device, &x, &y, NULL);
-#endif
+
if ((x != eyes_applet->pointer_last_x[i]) || (y != eyes_applet->pointer_last_y[i])) {
calculate_pupil_xy (eyes_applet, x, y, &pupil_x, &pupil_y, eyes_applet->eyes[i]);
@@ -342,17 +329,10 @@ help_cb (GtkAction *action,
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"help:mate-geyes",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (eyes_applet->applet)),
- "help:mate-geyes",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
diff --git a/geyes/themes.c b/geyes/themes.c
index 687c4694..b9226a66 100644
--- a/geyes/themes.c
+++ b/geyes/themes.c
@@ -216,17 +216,10 @@ phelp_cb (GtkDialog *dialog)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (dialog),
"help:mate-geyes/geyes-settings",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
- "help:mate-geyes/geyes-settings",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
GtkWidget *error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
@@ -326,11 +319,7 @@ properties_cb (GtkAction *action,
label = gtk_label_new (_(title));
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (category_vbox), label, FALSE, FALSE, 0);
g_free (title);
@@ -348,11 +337,7 @@ properties_cb (GtkAction *action,
gtk_widget_show (control_vbox);
label = gtk_label_new_with_mnemonic (_("_Select a theme:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (control_vbox), label, FALSE, FALSE, 0);
scrolled = gtk_scrolled_window_new (NULL, NULL);
diff --git a/mateweather/mateweather-applet.c b/mateweather/mateweather-applet.c
index 59768635..f6e65ce2 100644
--- a/mateweather/mateweather-applet.c
+++ b/mateweather/mateweather-applet.c
@@ -53,17 +53,10 @@ static void help_cb (GtkAction *action,
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"help:mateweather",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (gw_applet->applet)),
- "help:mateweather",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index 5f7911dc..c2eefea7 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -109,17 +109,10 @@ static void response_cb(MateWeatherDialog* dialog, gint id, gpointer data)
static void link_cb(GtkButton* button, gpointer data)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"http://www.weather.com/",
gtk_get_current_event_time (),
NULL);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (button)),
- "http://www.weather.com/",
- gtk_get_current_event_time (),
- NULL);
-#endif
}
static gchar* replace_multiple_new_lines(gchar* s)
@@ -234,274 +227,170 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog)
gtk_widget_show (cond_location_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_location_lbl, 0, 0, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_location_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_location_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_location_lbl), 0.0, 0.5);
-#endif
cond_update_lbl = gtk_label_new (_("Last update:"));
gtk_widget_show (cond_update_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_update_lbl, 0, 1, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_update_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_update_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_update_lbl), 0.0, 0.5);
-#endif
cond_cond_lbl = gtk_label_new (_("Conditions:"));
gtk_widget_show (cond_cond_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_cond_lbl, 0, 2, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_cond_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_cond_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_cond_lbl), 0.0, 0.5);
-#endif
cond_sky_lbl = gtk_label_new (_("Sky:"));
gtk_widget_show (cond_sky_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_sky_lbl, 0, 3, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_sky_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_sky_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_sky_lbl), 0.0, 0.5);
-#endif
cond_temp_lbl = gtk_label_new (_("Temperature:"));
gtk_widget_show (cond_temp_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_temp_lbl, 0, 4, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_temp_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_temp_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_temp_lbl), 0.0, 0.5);
-#endif
cond_apparent_lbl = gtk_label_new (_("Feels like:"));
gtk_widget_show (cond_apparent_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_apparent_lbl, 0, 5, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_apparent_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_apparent_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_apparent_lbl), 0.0, 0.5);
-#endif
cond_dew_lbl = gtk_label_new (_("Dew point:"));
gtk_widget_show (cond_dew_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_dew_lbl, 0, 6, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_dew_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_dew_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_dew_lbl), 0.0, 0.5);
-#endif
cond_humidity_lbl = gtk_label_new (_("Relative humidity:"));
gtk_widget_show (cond_humidity_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_humidity_lbl, 0, 7, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_humidity_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_humidity_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_humidity_lbl), 0.0, 0.5);
-#endif
cond_wind_lbl = gtk_label_new (_("Wind:"));
gtk_widget_show (cond_wind_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_wind_lbl, 0, 8, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_wind_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_wind_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_wind_lbl), 0.0, 0.5);
-#endif
cond_pressure_lbl = gtk_label_new (_("Pressure:"));
gtk_widget_show (cond_pressure_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_pressure_lbl, 0, 9, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_pressure_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_pressure_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_pressure_lbl), 0.0, 0.5);
-#endif
cond_vis_lbl = gtk_label_new (_("Visibility:"));
gtk_widget_show (cond_vis_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_vis_lbl, 0, 10, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_vis_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_vis_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_vis_lbl), 0.0, 0.5);
-#endif
cond_sunrise_lbl = gtk_label_new (_("Sunrise:"));
gtk_widget_show (cond_sunrise_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_sunrise_lbl, 0, 11, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_sunrise_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_sunrise_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_sunrise_lbl), 0.0, 0.5);
-#endif
cond_sunset_lbl = gtk_label_new (_("Sunset:"));
gtk_widget_show (cond_sunset_lbl);
gtk_grid_attach (GTK_GRID (cond_grid), cond_sunset_lbl, 0, 12, 1, 1);
gtk_label_set_justify (GTK_LABEL (cond_sunset_lbl), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (cond_sunset_lbl), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (cond_sunset_lbl), 0.0, 0.5);
-#endif
priv->cond_location = gtk_label_new ("");
gtk_widget_show (priv->cond_location);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_location, 1, 0, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_location), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_location), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_location), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_location), 0.0, 0.5);
-#endif
priv->cond_update = gtk_label_new ("");
gtk_widget_show (priv->cond_update);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_update, 1, 1, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_update), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_update), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_update), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_update), 0.0, 0.5);
-#endif
priv->cond_cond = gtk_label_new ("");
gtk_widget_show (priv->cond_cond);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_cond, 1, 2, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_cond), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_cond), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_cond), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_cond), 0.0, 0.5);
-#endif
priv->cond_sky = gtk_label_new ("");
gtk_widget_show (priv->cond_sky);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sky, 1, 3, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_sky), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_sky), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_sky), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_sky), 0.0, 0.5);
-#endif
priv->cond_temp = gtk_label_new ("");
gtk_widget_show (priv->cond_temp);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_temp, 1, 4, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_temp), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_temp), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_temp), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_temp), 0.0, 0.5);
-#endif
priv->cond_apparent = gtk_label_new ("");
gtk_widget_show (priv->cond_apparent);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_apparent, 1, 5, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_apparent), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_apparent), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_apparent), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_apparent), 0.0, 0.5);
-#endif
priv->cond_dew = gtk_label_new ("");
gtk_widget_show (priv->cond_dew);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_dew, 1, 6, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_dew), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_dew), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_dew), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_dew), 0.0, 0.5);
-#endif
priv->cond_humidity = gtk_label_new ("");
gtk_widget_show (priv->cond_humidity);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_humidity, 1, 7, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_humidity), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_humidity), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_humidity), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_humidity), 0.0, 0.5);
-#endif
priv->cond_wind = gtk_label_new ("");
gtk_widget_show (priv->cond_wind);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_wind, 1, 8, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_wind), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_wind), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_wind), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_wind), 0.0, 0.5);
-#endif
priv->cond_pressure = gtk_label_new ("");
gtk_widget_show (priv->cond_pressure);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_pressure, 1, 9, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_pressure), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_pressure), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_pressure), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_pressure), 0.0, 0.5);
-#endif
priv->cond_vis = gtk_label_new ("");
gtk_widget_show (priv->cond_vis);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_vis, 1, 10, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_vis), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_vis), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_vis), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_vis), 0.0, 0.5);
-#endif
priv->cond_sunrise = gtk_label_new ("");
gtk_widget_show (priv->cond_sunrise);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sunrise, 1, 11, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_sunrise), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_sunrise), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_sunrise), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_sunrise), 0.0, 0.5);
-#endif
priv->cond_sunset = gtk_label_new ("");
gtk_widget_show (priv->cond_sunset);
gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sunset, 1, 12, 1, 1);
gtk_label_set_selectable (GTK_LABEL (priv->cond_sunset), TRUE);
gtk_label_set_justify (GTK_LABEL (priv->cond_sunset), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->cond_sunset), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->cond_sunset), 0.0, 0.5);
-#endif
cond_frame_alignment = gtk_alignment_new (0.5, 0, 1, 0);
gtk_widget_show (cond_frame_alignment);
diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c
index ef907583..ba3828bb 100644
--- a/mateweather/mateweather-pref.c
+++ b/mateweather/mateweather-pref.c
@@ -555,11 +555,7 @@ static GtkWidget* create_hig_category(GtkWidget* main_box, gchar* title)
tmp = g_strdup_printf ("<b>%s</b>", title);
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
@@ -744,14 +740,10 @@ static void help_cb(GtkDialog* dialog, MateWeatherPref* pref)
current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (pref->priv->notebook));
uri = g_strdup_printf ("help:mateweather/mateweather-prefs#mateweather-%s", (current_page == 0) ? "metric" : "change-location");
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (dialog),
uri,
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), uri, gtk_get_current_event_time (), &error);
-#endif
g_free (uri);
if (error)
@@ -862,11 +854,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)
temp_label = gtk_label_new_with_mnemonic (_("_Temperature unit:"));
gtk_label_set_use_markup (GTK_LABEL (temp_label), TRUE);
gtk_label_set_justify (GTK_LABEL (temp_label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (temp_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (temp_label), 0.0, 0.5);
-#endif
gtk_widget_show (temp_label);
temp_combo = gtk_combo_box_text_new ();
@@ -888,11 +876,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)
speed_label = gtk_label_new_with_mnemonic (_("_Wind speed unit:"));
gtk_label_set_use_markup (GTK_LABEL (speed_label), TRUE);
gtk_label_set_justify (GTK_LABEL (speed_label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (speed_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (speed_label), 0.0, 0.5);
-#endif
gtk_widget_show (speed_label);
speed_combo = gtk_combo_box_text_new ();
@@ -919,11 +903,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)
pres_label = gtk_label_new_with_mnemonic (_("_Pressure unit:"));
gtk_label_set_use_markup (GTK_LABEL (pres_label), TRUE);
gtk_label_set_justify (GTK_LABEL (pres_label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (pres_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (pres_label), 0.0, 0.5);
-#endif
gtk_widget_show (pres_label);
pres_combo = gtk_combo_box_text_new ();
@@ -953,11 +933,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)
dist_label = gtk_label_new_with_mnemonic (_("_Visibility unit:"));
gtk_label_set_use_markup (GTK_LABEL (dist_label), TRUE);
gtk_label_set_justify (GTK_LABEL (dist_label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (dist_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (dist_label), 0, 0.5);
-#endif
gtk_widget_show (dist_label);
dist_combo = gtk_combo_box_text_new ();
@@ -1124,11 +1100,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)
gtk_container_add (GTK_CONTAINER (pref->priv->notebook), pref_loc_hbox);
tree_label = gtk_label_new_with_mnemonic (_("_Select a location:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (tree_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (tree_label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (pref_loc_hbox), tree_label, FALSE, FALSE, 0);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c
index bafb81bf..4ecdae6e 100644
--- a/netspeed/src/netspeed.c
+++ b/netspeed/src/netspeed.c
@@ -730,9 +730,6 @@ timeout_function(MateNetspeedApplet *applet)
static void
display_help (GtkWidget *dialog, const gchar *section)
{
-#if !GTK_CHECK_VERSION (3, 22, 0)
- GdkScreen *screen;
-#endif
GError *error = NULL;
gboolean ret;
char *uri;
@@ -742,15 +739,10 @@ display_help (GtkWidget *dialog, const gchar *section)
else
uri = g_strdup ("help:mate-netspeed-applet");
-#if GTK_CHECK_VERSION (3, 22, 0)
ret = gtk_show_uri_on_window (NULL,
uri,
gtk_get_current_event_time (),
&error);
-#else
- screen = gtk_widget_get_screen (dialog);
- ret = gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error);
-#endif
g_free (uri);
if (ret == FALSE) {
@@ -989,12 +981,8 @@ settings_cb(GtkAction *action, gpointer data)
category_header_label = gtk_label_new(header_str);
gtk_label_set_use_markup(GTK_LABEL(category_header_label), TRUE);
gtk_label_set_justify(GTK_LABEL(category_header_label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (category_header_label), 0.0);
gtk_label_set_yalign (GTK_LABEL (category_header_label), 0.5);
-#else
- gtk_misc_set_alignment(GTK_MISC (category_header_label), 0.0, 0.5);
-#endif
gtk_box_pack_start(GTK_BOX (category_vbox), category_header_label, FALSE, FALSE, 0);
g_free(header_str);
@@ -1013,12 +1001,8 @@ settings_cb(GtkAction *action, gpointer data)
network_device_label = gtk_label_new_with_mnemonic(_("Network _device:"));
gtk_label_set_justify(GTK_LABEL(network_device_label), GTK_JUSTIFY_LEFT);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (network_device_label), 0.0f);
gtk_label_set_yalign (GTK_LABEL (network_device_label), 0.5f);
-#else
- gtk_misc_set_alignment(GTK_MISC(network_device_label), 0.0f, 0.5f);
-#endif
gtk_size_group_add_widget(category_label_size_group, network_device_label);
gtk_box_pack_start(GTK_BOX (network_device_hbox), network_device_label, FALSE, FALSE, 0);
@@ -1239,7 +1223,6 @@ showinfo_cb(GtkAction *action, gpointer data)
gtk_label_set_selectable(GTK_LABEL(hwaddr_text), TRUE);
gtk_label_set_selectable(GTK_LABEL(ptpip_text), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (ip_label), 0.0f);
gtk_label_set_yalign (GTK_LABEL (ip_label), 0.5f);
gtk_label_set_xalign (GTK_LABEL (ip_text), 0.0f);
@@ -1264,20 +1247,6 @@ showinfo_cb(GtkAction *action, gpointer data)
gtk_label_set_yalign (GTK_LABEL (outbytes_label), 0.5f);
gtk_label_set_xalign (GTK_LABEL (applet->outbytes_text), 0.0f);
gtk_label_set_yalign (GTK_LABEL (applet->outbytes_text), 0.5f);
-#else
- gtk_misc_set_alignment(GTK_MISC(ip_label), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(ip_text), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(netmask_label), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(netmask_text), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(hwaddr_label), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(hwaddr_text), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(ptpip_label), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(ptpip_text), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(inbytes_label), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(applet->inbytes_text), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(outbytes_label), 0.0f, 0.5f);
- gtk_misc_set_alignment(GTK_MISC(applet->outbytes_text), 0.0f, 0.5f);
-#endif
gtk_grid_attach(GTK_GRID(grid), ip_label, 0, 0, 1, 1);
gtk_grid_attach(GTK_GRID(grid), ip_text, 1, 0, 1, 1);
@@ -1301,15 +1270,10 @@ showinfo_cb(GtkAction *action, gpointer data)
gtk_label_set_selectable (GTK_LABEL (ipv6_text), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (ipv6_label), 0.0f);
gtk_label_set_yalign (GTK_LABEL (ipv6_label), 0.5f);
gtk_label_set_xalign (GTK_LABEL (ipv6_text), 0.0f);
gtk_label_set_yalign (GTK_LABEL (ipv6_text), 0.5f);
-#else
- gtk_misc_set_alignment (GTK_MISC (ipv6_label), 0.0f, 0.5f);
- gtk_misc_set_alignment (GTK_MISC (ipv6_text), 0.0f, 0.5f);
-#endif
gtk_grid_attach (GTK_GRID (grid), ipv6_label, 0, 3, 1, 1);
gtk_grid_attach (GTK_GRID (grid), ipv6_text, 1, 3, 1, 1);
}
@@ -1338,18 +1302,12 @@ showinfo_cb(GtkAction *action, gpointer data)
essid_label = gtk_label_new (_("ESSID:"));
essid_text = gtk_label_new (applet->devinfo.essid);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (signal_label), 0.0f);
gtk_label_set_yalign (GTK_LABEL (signal_label), 0.5f);
gtk_label_set_xalign (GTK_LABEL (essid_label), 0.0f);
gtk_label_set_yalign (GTK_LABEL (essid_label), 0.5f);;
gtk_label_set_xalign (GTK_LABEL (essid_text), 0.0f);
gtk_label_set_yalign (GTK_LABEL (essid_text), 0.5f);
-#else
- gtk_misc_set_alignment (GTK_MISC (signal_label), 0.0f, 0.5f);
- gtk_misc_set_alignment (GTK_MISC (essid_label), 0.0f, 0.5f);
- gtk_misc_set_alignment (GTK_MISC (essid_text), 0.0f, 0.5f);
-#endif
gtk_label_set_selectable (GTK_LABEL (essid_text), TRUE);
gtk_grid_attach (GTK_GRID (grid), signal_label, 2, 4, 1, 1);
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
index 6b07b9fe..50d0f83a 100644
--- a/stickynotes/stickynotes.c
+++ b/stickynotes/stickynotes.c
@@ -378,17 +378,10 @@ static void
response_cb (GtkWidget *dialog, gint id, gpointer data)
{
if (id == GTK_RESPONSE_HELP)
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (dialog),
"help:mate-stickynotes-applet/stickynotes-settings-individual",
gtk_get_current_event_time (),
NULL);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
- "help:mate-stickynotes-applet/stickynotes-settings-individual",
- gtk_get_current_event_time (),
- NULL);
-#endif
else if (id == GTK_RESPONSE_CLOSE)
gtk_widget_hide (dialog);
}
diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c
index 81938256..a5e1281f 100644
--- a/stickynotes/stickynotes_applet_callbacks.c
+++ b/stickynotes/stickynotes_applet_callbacks.c
@@ -335,17 +335,11 @@ void menu_preferences_cb(GtkAction *action, StickyNotesApplet *applet)
void menu_help_cb(GtkAction *action, StickyNotesApplet *applet)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
+
gtk_show_uri_on_window (NULL,
"help:mate-stickynotes-applet",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (applet->w_applet)),
- "help:mate-stickynotes-applet",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("There was an error displaying help: %s"), error->message);
@@ -531,17 +525,11 @@ void preferences_response_cb(GtkWidget *dialog, gint response, gpointer data)
{
if (response == GTK_RESPONSE_HELP) {
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
+
gtk_show_uri_on_window (GTK_WINDOW (dialog),
"help:mate-stickynotes-applet/stickynotes-advanced-settings",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
- "help:mate-stickynotes-applet/stickynotes-advanced-settings",
- gtk_get_current_event_time (),
- &error);
-#endif
if (error) {
dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("There was an error displaying help: %s"), error->message);
diff --git a/timerapplet/timerapplet.c b/timerapplet/timerapplet.c
index 9b2db8ce..20b7a30c 100644
--- a/timerapplet/timerapplet.c
+++ b/timerapplet/timerapplet.c
@@ -303,12 +303,8 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
gtk_container_set_border_width (GTK_CONTAINER (dialog), 10);
widget = gtk_label_new (_("Name:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 0, 1, 1);
widget = gtk_entry_new ();
@@ -316,12 +312,8 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
g_settings_bind (applet->settings, NAME_KEY, widget, "text", G_SETTINGS_BIND_DEFAULT);
widget = gtk_label_new (_("Hours:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 1, 1, 1);
widget = gtk_spin_button_new_with_range (0.0, 100.0, 1.0);
@@ -331,12 +323,8 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
g_signal_connect (widget, "value-changed", G_CALLBACK (timer_spin_button_value_changed), applet);
widget = gtk_label_new (_("Minutes:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 2, 1, 1);
widget = gtk_spin_button_new_with_range (0.0, 59.0, 1.0);
@@ -346,12 +334,8 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
g_signal_connect (widget, "value-changed", G_CALLBACK (timer_spin_button_value_changed), applet);
widget = gtk_label_new (_("Seconds:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 1.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
-#endif
gtk_grid_attach (grid, widget, 1, 3, 1, 1);
widget = gtk_spin_button_new_with_range (0.0, 59.0, 1.0);
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index 942cf67e..c2036cf0 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -368,17 +368,10 @@ trash_applet_open_folder (GtkAction *action,
{
GError *err = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"trash:",
gtk_get_current_event_time (),
&err);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (applet)),
- "trash:",
- gtk_get_current_event_time (),
- &err);
-#endif
if (err)
{
@@ -395,17 +388,10 @@ trash_applet_show_help (GtkAction *action,
GError *err = NULL;
/* FIXME - Actually, we need a user guide */
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
"help:mate-trashapplet",
gtk_get_current_event_time (),
&err);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (applet)),
- "help:mate-trashapplet",
- gtk_get_current_event_time (),
- &err);
-#endif
if (err)
{
@@ -513,11 +499,7 @@ confirm_delete_immediately (GtkWidget *parent_view,
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
g_free (str);
@@ -525,11 +507,7 @@ confirm_delete_immediately (GtkWidget *parent_view,
label = gtk_label_new (detail);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
g_free (detail);
diff --git a/trashapplet/src/xstuff.c b/trashapplet/src/xstuff.c
index 5255bf0d..b7432a09 100644
--- a/trashapplet/src/xstuff.c
+++ b/trashapplet/src/xstuff.c
@@ -153,11 +153,7 @@ xstuff_zoom_animate (GtkWidget *widget, GdkRectangle *opt_rect)
GdkScreen *gscreen;
GdkRectangle rect, dest;
GtkAllocation allocation;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
-#else
- int monitor;
-#endif
if (opt_rect)
rect = *opt_rect;
@@ -173,14 +169,9 @@ xstuff_zoom_animate (GtkWidget *widget, GdkRectangle *opt_rect)
}
gscreen = gtk_widget_get_screen (widget);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor = gdk_display_get_monitor_at_window (gdk_screen_get_display (gscreen),
gtk_widget_get_window (widget));
gdk_monitor_get_geometry (monitor, &dest);
-#else
- monitor = gdk_screen_get_monitor_at_window (gscreen, gtk_widget_get_window (widget));
- gdk_screen_get_monitor_geometry (gscreen, monitor, &dest);
-#endif
draw_zoom_animation (gscreen,
rect.x, rect.y, rect.width, rect.height,