summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-23 00:04:15 +0100
committermonsta <[email protected]>2016-01-25 16:53:59 +0300
commit1241ff234a8ec46542e97e48a6298b78c9a0d2b5 (patch)
tree1a23419da4aea0392649d03888b3cc2621011851 /libcaja-private
parent130906c9182c71a6049eca472f8d3b91804124cf (diff)
downloadcaja-1241ff234a8ec46542e97e48a6298b78c9a0d2b5.tar.bz2
caja-1241ff234a8ec46542e97e48a6298b78c9a0d2b5.tar.xz
GTK3: fix deprecated GtkMisc
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c13
-rw-r--r--libcaja-private/caja-icon-container.c7
-rw-r--r--libcaja-private/caja-mime-application-chooser.c4
-rw-r--r--libcaja-private/caja-open-with-dialog.c8
-rw-r--r--libcaja-private/caja-progress-info.c8
5 files changed, 27 insertions, 13 deletions
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index 749fda3f..6031e27a 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -221,7 +221,11 @@ file_list_ready_cb (GList *files,
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR);
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#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 (details->titles_vbox),
label, FALSE, FALSE, 0);
gtk_widget_show (label);
@@ -255,9 +259,12 @@ file_list_ready_cb (GList *files,
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_label_set_max_width_chars (GTK_LABEL (label), 60);
- gtk_widget_set_halign (label, GTK_ALIGN_START);
#else
gtk_widget_set_size_request (label, 350, -1);
+#endif
+#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 (details->titles_vbox),
@@ -595,7 +602,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
widget = gtk_image_new_from_icon_name ("dialog-warning",
GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION (3, 14, 0)
+#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
gtk_widget_set_valign (widget, GTK_ALIGN_START);
#else
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index f93e633f..1b77db00 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -9252,7 +9252,14 @@ caja_icon_container_start_renaming_selected_item (CajaIconContainer *container,
eel_editable_label_set_justify (EEL_EDITABLE_LABEL (details->rename_widget), GTK_JUSTIFY_CENTER);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_margin_start (details->rename_widget, 1);
+ gtk_widget_set_margin_end (details->rename_widget, 1);
+ gtk_widget_set_margin_top (details->rename_widget, 1);
+ gtk_widget_set_margin_bottom (details->rename_widget, 1);
+#else
gtk_misc_set_padding (GTK_MISC (details->rename_widget), 1, 1);
+#endif
gtk_layout_put (GTK_LAYOUT (container),
details->rename_widget, 0, 0);
}
diff --git a/libcaja-private/caja-mime-application-chooser.c b/libcaja-private/caja-mime-application-chooser.c
index 547a4685..e452c229 100644
--- a/libcaja-private/caja-mime-application-chooser.c
+++ b/libcaja-private/caja-mime-application-chooser.c
@@ -388,8 +388,8 @@ caja_mime_application_chooser_init (CajaMimeApplicationChooser *chooser)
gtk_box_set_homogeneous (GTK_BOX (chooser), FALSE);
chooser->details->label = gtk_label_new ("");
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (chooser->details->label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (chooser->details->label), 0);
#else
gtk_misc_set_alignment (GTK_MISC (chooser->details->label), 0.0, 0.5);
#endif
diff --git a/libcaja-private/caja-open-with-dialog.c b/libcaja-private/caja-open-with-dialog.c
index 1a507a3f..43b58ee2 100644
--- a/libcaja-private/caja-open-with-dialog.c
+++ b/libcaja-private/caja-open-with-dialog.c
@@ -857,8 +857,8 @@ caja_open_with_dialog_init (CajaOpenWithDialog *dialog)
gtk_box_pack_start (GTK_BOX (vbox), vbox2, TRUE, TRUE, 0);
dialog->details->label = gtk_label_new ("");
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (dialog->details->label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (dialog->details->label), 0.0);
#else
gtk_misc_set_alignment (GTK_MISC (dialog->details->label), 0.0, 0.5);
#endif
@@ -884,8 +884,8 @@ caja_open_with_dialog_init (CajaOpenWithDialog *dialog)
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_window, TRUE, TRUE, 0);
dialog->details->desc_label = gtk_label_new (_("Select an application to view its description."));
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (dialog->details->desc_label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (dialog->details->desc_label), 0.0);
#else
gtk_misc_set_alignment (GTK_MISC (dialog->details->desc_label), 0.0, 0.5);
#endif
diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c
index 613ed3de..e2383737 100644
--- a/libcaja-private/caja-progress-info.c
+++ b/libcaja-private/caja-progress-info.c
@@ -375,8 +375,8 @@ progress_widget_new (CajaProgressInfo *info)
gtk_widget_set_size_request (label, 500, -1);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#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
@@ -417,8 +417,8 @@ progress_widget_new (CajaProgressInfo *info)
0);
label = gtk_label_new ("details");
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#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