summaryrefslogtreecommitdiff
path: root/src/caja-information-panel.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-20 17:12:45 +0300
committerWolfgang Ulbrich <[email protected]>2016-01-23 03:59:55 +0100
commit333dad8ccd723175c2949c7fa0ad34b554f6af3c (patch)
treee89fa34c8e629f7d996e614154f54843fc86213d /src/caja-information-panel.c
parent421d3ed2cea75931b62a3a59efdcd16a4989f008 (diff)
downloadcaja-333dad8ccd723175c2949c7fa0ad34b554f6af3c.tar.bz2
caja-333dad8ccd723175c2949c7fa0ad34b554f6af3c.tar.xz
information-panel: use GtkWidget* instead of Gtk(H)Box
and don't use deprecated function in GTK+3 build
Diffstat (limited to 'src/caja-information-panel.c')
-rw-r--r--src/caja-information-panel.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/caja-information-panel.c b/src/caja-information-panel.c
index 19e2b01a..001a7cb9 100644
--- a/src/caja-information-panel.c
+++ b/src/caja-information-panel.c
@@ -54,7 +54,7 @@ struct CajaInformationPanelDetails
GtkVBox *container;
CajaWindowInfo *window;
CajaSidebarTitle *title;
- GtkHBox *button_box_centerer;
+ GtkWidget *button_box_centerer;
GtkVBox *button_box;
gboolean has_buttons;
CajaFile *file;
@@ -226,9 +226,14 @@ caja_information_panel_class_init (CajaInformationPanelClass *klass)
static void
make_button_box (CajaInformationPanel *information_panel)
{
- information_panel->details->button_box_centerer = GTK_HBOX (gtk_hbox_new (FALSE, 0));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ information_panel->details->button_box_centerer = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+ information_panel->details->button_box_centerer = gtk_hbox_new (FALSE, 0);
+#endif
+
gtk_box_pack_start (GTK_BOX (information_panel->details->container),
- GTK_WIDGET (information_panel->details->button_box_centerer), TRUE, TRUE, 0);
+ information_panel->details->button_box_centerer, TRUE, TRUE, 0);
information_panel->details->button_box = GTK_VBOX (caja_keep_last_vertical_box_new (4));
gtk_container_set_border_width (GTK_CONTAINER (information_panel->details->button_box), 8);
@@ -998,7 +1003,7 @@ caja_information_panel_update_buttons (CajaInformationPanel *information_panel)
if (information_panel->details->has_buttons)
{
gtk_container_remove (GTK_CONTAINER (information_panel->details->container),
- GTK_WIDGET (information_panel->details->button_box_centerer));
+ information_panel->details->button_box_centerer);
make_button_box (information_panel);
}
@@ -1022,7 +1027,7 @@ caja_information_panel_update_buttons (CajaInformationPanel *information_panel)
g_object_unref (default_app);
}
- gtk_widget_show (GTK_WIDGET (information_panel->details->button_box_centerer));
+ gtk_widget_show (information_panel->details->button_box_centerer);
}
static void