diff options
author | raveit65 <[email protected]> | 2016-06-28 21:05:32 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-07-14 16:15:12 +0200 |
commit | b6a3e80fcc696a941958e574716cd740c6667f65 (patch) | |
tree | 45996fab9c34c208054a6013c0dbbdc138835c04 | |
parent | 6247be1f934beaf7f5e523dd476df538385d9ae0 (diff) | |
download | caja-b6a3e80fcc696a941958e574716cd740c6667f65.tar.bz2 caja-b6a3e80fcc696a941958e574716cd740c6667f65.tar.xz |
GTK+-3 pathbar: do not use deprecated gtk_alignment_new
inspired from:
https://git.gnome.org/browse/nautilus/commit/src?id=d808c2d
-rw-r--r-- | src/caja-pathbar.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c index bdd78004..90c966b2 100644 --- a/src/caja-pathbar.c +++ b/src/caja-pathbar.c @@ -90,7 +90,9 @@ struct _ButtonData GtkWidget *image; GtkWidget *label; +#if !GTK_CHECK_VERSION (3, 0, 0) GtkWidget *alignment; +#endif guint ignore_changes : 1; guint file_is_hidden : 1; guint fake_root : 1; @@ -1589,7 +1591,7 @@ set_label_size_request (ButtonData *button_data) pango_layout_get_pixel_size (layout, &bold_width, &bold_height); - gtk_widget_set_size_request (button_data->alignment, + gtk_widget_set_size_request (button_data->label, MAX (width, bold_width), MAX (height, bold_height)); @@ -2059,11 +2061,9 @@ make_directory_button (CajaPathBar *path_bar, case DEFAULT_LOCATION_BUTTON: button_data->label = gtk_label_new (NULL); #if GTK_CHECK_VERSION(3,0,0) - button_data->alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); - gtk_container_add (GTK_CONTAINER (button_data->alignment), button_data->label); child = gtk_hbox_new (FALSE, 2); gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (child), button_data->alignment, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (child), button_data->label, FALSE, FALSE, 0); #else label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label); @@ -2076,11 +2076,9 @@ make_directory_button (CajaPathBar *path_bar, default: button_data->label = gtk_label_new (NULL); #if GTK_CHECK_VERSION(3,0,0) - button_data->alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); - gtk_container_add (GTK_CONTAINER (button_data->alignment), button_data->label); child = gtk_hbox_new (FALSE, 2); gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (child), button_data->alignment, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (child), button_data->label, FALSE, FALSE, 0); #else label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label); |