summaryrefslogtreecommitdiff
path: root/src/caja-window.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-08-09 12:22:45 +0200
committerraveit65 <[email protected]>2016-08-12 22:37:47 +0200
commitf7308f8d78c839411b76b6e45868156dd3543506 (patch)
tree4169334262d209c14db4ef22b3393873e5bde4c4 /src/caja-window.c
parentf5164f75918a8e65ccde9565c4fd9f366064172e (diff)
downloadcaja-f7308f8d78c839411b76b6e45868156dd3543506.tar.bz2
caja-f7308f8d78c839411b76b6e45868156dd3543506.tar.xz
GTK+-3 window: port GtkTable to GtkGrid
Diffstat (limited to 'src/caja-window.c')
-rw-r--r--src/caja-window.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/caja-window.c b/src/caja-window.c
index 4fae7f39..96c97e4e 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -130,7 +130,11 @@ static const struct
static void
caja_window_init (CajaWindow *window)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkWidget *grid;
+#else
GtkWidget *table;
+#endif
GtkWidget *menu;
GtkWidget *statusbar;
@@ -178,10 +182,18 @@ caja_window_init (CajaWindow *window)
/* Set initial window title */
gtk_window_set_title (GTK_WINDOW (window), _("Caja"));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ grid = gtk_grid_new ();
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
+ window->details->grid = grid;
+ gtk_widget_show (grid);
+ gtk_container_add (GTK_CONTAINER (window), grid);
+#else
table = gtk_table_new (1, 6, FALSE);
window->details->table = table;
gtk_widget_show (table);
gtk_container_add (GTK_CONTAINER (window), table);
+#endif
statusbar = gtk_statusbar_new ();
gtk_widget_set_name (statusbar, "statusbar-noborder");
@@ -201,6 +213,11 @@ caja_window_init (CajaWindow *window)
menu = gtk_ui_manager_get_widget (window->details->ui_manager, "/MenuBar");
window->details->menubar = menu;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_set_hexpand (menu, TRUE);
+ gtk_widget_show (menu);
+ gtk_grid_attach (GTK_GRID (grid), menu, 0, 0, 1, 1);
+#else
gtk_widget_show (menu);
gtk_table_attach (GTK_TABLE (table),
menu,
@@ -208,6 +225,7 @@ caja_window_init (CajaWindow *window)
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
0, 0);
+#endif
/* Register to menu provider extension signal managing menu updates */
g_signal_connect_object (caja_signaller_get_current (), "popup_menu_changed",