summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-14 17:43:34 +0300
committermonsta <[email protected]>2016-01-15 13:26:42 +0300
commitec624517412efde4892d3efdf43e15078dc77a2a (patch)
tree90c81c836d0ed23538d68cb7fad357bd30c10b8c /capplets
parent7865afb847c54c76adfb190cdedf11540f6614e7 (diff)
downloadmate-control-center-ec624517412efde4892d3efdf43e15078dc77a2a.tar.bz2
mate-control-center-ec624517412efde4892d3efdf43e15078dc77a2a.tar.xz
[GTK+3] common: fix deprecated usage of GtkMisc, GtkHBox, GtkVBox
Diffstat (limited to 'capplets')
-rw-r--r--capplets/common/file-transfer-dialog.c18
-rw-r--r--capplets/common/theme-thumbnail.c16
2 files changed, 33 insertions, 1 deletions
diff --git a/capplets/common/file-transfer-dialog.c b/capplets/common/file-transfer-dialog.c
index 9ec531cd..01f14cbd 100644
--- a/capplets/common/file-transfer-dialog.c
+++ b/capplets/common/file-transfer-dialog.c
@@ -305,7 +305,11 @@ file_transfer_dialog_init (FileTransferDialog *dlg)
gtk_widget_set_size_request (GTK_WIDGET (dlg), 350, -1);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
@@ -314,11 +318,20 @@ file_transfer_dialog_init (FileTransferDialog *dlg)
gtk_label_set_markup (GTK_LABEL (dlg->priv->status), markup);
g_free (markup);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (dlg->priv->status, GTK_ALIGN_START);
+ gtk_widget_set_valign (dlg->priv->status, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (dlg->priv->status), 0.0, 0.0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), dlg->priv->status, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
hbox = gtk_hbox_new (FALSE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
table = gtk_table_new (2, 2, FALSE);
@@ -326,8 +339,11 @@ file_transfer_dialog_init (FileTransferDialog *dlg)
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, FALSE, 0);
-
+#if GTK_CHECK_VERSION (3, 0, 0)
+ progress_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
progress_vbox = gtk_vbox_new (TRUE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), progress_vbox, FALSE, FALSE, 0);
dlg->priv->progress = gtk_progress_bar_new ();
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index 1523317f..9cd047f5 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -292,14 +292,22 @@ create_meta_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
gtk_container_add (GTK_CONTAINER (window), preview);
gtk_widget_realize (window);
gtk_widget_realize (preview);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (preview), vbox);
align = gtk_alignment_new (0, 0, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
stock_button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
gtk_container_add (GTK_CONTAINER (align), stock_button);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
box = gtk_hbox_new (FALSE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
checkbox = gtk_check_button_new ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), TRUE);
@@ -378,9 +386,17 @@ create_gtk_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
vbox = gtk_vbox_new (FALSE, 0);
+#endif
gtk_container_add (GTK_CONTAINER (window), vbox);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
box = gtk_hbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
stock_button = gtk_button_new_from_stock (GTK_STOCK_OPEN);