Commit 18cfadc8 authored by APOORV SACHAN's avatar APOORV SACHAN 🦋 Committed by António Fernandes

properties-window: Add Basic tab containers to template

This commit obtains the outer containers of the Basic page from the
widget template UI definition.

A new GtkBox to pack the icon widget is included.

The inner widgets are ported to the UI definition in the next commits.
parent 4d312be1
......@@ -82,6 +82,9 @@ struct _NautilusPropertiesWindow
GtkNotebook *notebook;
/* Basic tab widgets */
GtkBox *image_box;
GtkGrid *basic_grid;
GtkWidget *icon_button;
......@@ -3147,14 +3150,8 @@ create_basic_page (NautilusPropertiesWindow *window)
GtkGrid *grid;
GtkWidget *icon_pixmap_widget;
GtkWidget *volume_usage;
GtkWidget *hbox, *vbox;
GtkWidget *button;
hbox = create_page_with_box (window->notebook,
GTK_ORIENTATION_HORIZONTAL,
_("Basic"),
"help:gnome-help/nautilus-file-properties-basic");
/* Icon pixmap */
icon_pixmap_widget = create_image_widget (
......@@ -3162,19 +3159,13 @@ create_basic_page (NautilusPropertiesWindow *window)
gtk_widget_set_valign (icon_pixmap_widget, GTK_ALIGN_START);
gtk_widget_show (icon_pixmap_widget);
gtk_box_pack_start (GTK_BOX (hbox), icon_pixmap_widget, FALSE, FALSE, 0);
gtk_box_pack_start (window->image_box, icon_pixmap_widget, FALSE, FALSE, 0);
window->icon_chooser = NULL;
/* Grid */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (hbox), vbox);
grid = GTK_GRID (create_grid_with_standard_properties ());
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (grid), FALSE, FALSE, 0);
window->basic_grid = grid;
grid = window->basic_grid;
/* Name label. The text will be determined in update_name_field */
window->name_label = attach_title_field (grid, NULL);
......@@ -5781,6 +5772,8 @@ nautilus_properties_window_class_init (NautilusPropertiesWindowClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/nautilus/ui/nautilus-properties-window.ui");
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, notebook);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, image_box);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, basic_grid);
}
static void
......
......@@ -19,10 +19,91 @@
<property name="can_focus">True</property>
<property name="show_border">False</property>
<child>
<placeholder/>
<object class="GtkBox" id="basic_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="image_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="grid_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid" id="basic_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="tab_expand">True</property>
</packing>
</child>
<child type="tab">
<placeholder/>
<object class="GtkLabel" id="basic_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Basic</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment