summaryrefslogtreecommitdiff
path: root/src/caja-window.c
diff options
context:
space:
mode:
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",