From de1227d4355f56017270f3a7541b8be21fd955af Mon Sep 17 00:00:00 2001 From: monsta Date: Sun, 20 Nov 2016 22:24:08 +0300 Subject: move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option and require libmatekbd and libmate-desktop >= 1.17 --- plugins/housekeeping/msd-ldsm-dialog.c | 13 ++----------- plugins/housekeeping/msd-ldsm-trash-empty.c | 11 +++-------- 2 files changed, 5 insertions(+), 19 deletions(-) (limited to 'plugins/housekeeping') diff --git a/plugins/housekeeping/msd-ldsm-dialog.c b/plugins/housekeeping/msd-ldsm-dialog.c index d95701f..190daf4 100644 --- a/plugins/housekeeping/msd-ldsm-dialog.c +++ b/plugins/housekeeping/msd-ldsm-dialog.c @@ -25,11 +25,6 @@ #define SETTINGS_SCHEMA "org.mate.SettingsDaemon.plugins.housekeeping" #define SETTINGS_IGNORE_PATHS "ignore-paths" -#if GTK_CHECK_VERSION (3, 0, 0) -#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) -#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) -#endif - enum { PROP_0, @@ -220,12 +215,8 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog) /* Create the image */ image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (image, GTK_ALIGN_START); gtk_widget_set_valign (image, GTK_ALIGN_END); -#else - gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); -#endif /* Create the labels */ dialog->priv->primary_label = gtk_label_new (NULL); @@ -261,10 +252,10 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog) /* Now set up the dialog's GtkBox's' */ gtk_box_set_spacing (GTK_BOX (main_vbox), 14); - hbox = gtk_hbox_new (FALSE, 12); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); - text_vbox = gtk_vbox_new (FALSE, 12); + text_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); gtk_box_pack_start (GTK_BOX (text_vbox), dialog->priv->primary_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (text_vbox), dialog->priv->secondary_label, TRUE, TRUE, 0); diff --git a/plugins/housekeeping/msd-ldsm-trash-empty.c b/plugins/housekeeping/msd-ldsm-trash-empty.c index 33b1635..c552c3b 100644 --- a/plugins/housekeeping/msd-ldsm-trash-empty.c +++ b/plugins/housekeeping/msd-ldsm-trash-empty.c @@ -26,11 +26,6 @@ #define CAJA_PREFS_SCHEMA "org.mate.caja.preferences" #define CAJA_CONFIRM_TRASH_KEY "confirm-trash" -#if GTK_CHECK_VERSION (3, 0, 0) -#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) -#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) -#endif - /* Some of this code has been borrowed from the trash-applet, courtesy of Ryan Lortie */ static GtkWidget *trash_empty_confirm_dialog = NULL; @@ -251,9 +246,9 @@ trash_empty_start () gtk_window_set_title (GTK_WINDOW (trash_empty_dialog), _("Emptying the trash")); - vbox1 = gtk_vbox_new (FALSE, 12); - vbox2 = gtk_vbox_new (FALSE, 0); - hbox = gtk_hbox_new (FALSE, 0); + vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); + vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); label1 = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (label1), TRUE); -- cgit v1.2.1