[gnome-builder] create-project: use EggThreeGrid
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] create-project: use EggThreeGrid
- Date: Sun, 18 Sep 2016 10:03:19 +0000 (UTC)
commit 0c6480235049be9f375c920dc05ea72581b3e54e
Author: Christian Hergert <chergert redhat com>
Date: Sun Sep 18 03:02:02 2016 -0700
create-project: use EggThreeGrid
This removes a bunch of our GtkBox of GtkBox with size groups to enforce
the layout of the create-project widget.
Instead, we can use the new EggThreeGrid which was made precisely for
this case.
.../create-project/gbp-create-project-widget.ui | 389 ++++++++------------
1 files changed, 161 insertions(+), 228 deletions(-)
---
diff --git a/plugins/create-project/gbp-create-project-widget.ui
b/plugins/create-project/gbp-create-project-widget.ui
index 5b3bf01..b8958f1 100644
--- a/plugins/create-project/gbp-create-project-widget.ui
+++ b/plugins/create-project/gbp-create-project-widget.ui
@@ -17,231 +17,210 @@
<property name="valign">start</property>
<property name="visible">true</property>
<child>
- <object class="GtkBox">
- <property name="orientation">horizontal</property>
- <property name="expand">true</property>
- <property name="valign">end</property>
- <property name="spacing">12</property>
+ <object class="EggThreeGrid" id="three_grid">
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">24</property>
<property name="visible">true</property>
+
<child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="vexpand">true</property>
+ <object class="GtkLabel" id="project_name_label">
<property name="halign">end</property>
- <property name="spacing">24</property>
+ <property name="label" translatable="yes">Project Name</property>
+ <property name="valign">start</property>
<property name="visible">true</property>
- <child>
- <object class="GtkBox" id="row1_1">
- <property name="visible">true</property>
- <child>
- <object class="GtkLabel" id="project_name_label">
- <property name="label" translatable="yes">Project Name</property>
- <property name="halign">end</property>
- <property name="hexpand">true</property>
- <property name="valign">start</property>
- <property name="visible">true</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="row2_1">
- <property name="label" translatable="yes">Project Location</property>
- <property name="halign">end</property>
- <property name="hexpand">true</property>
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="row3_1">
- <property name="label" translatable="yes">Language</property>
- <property name="expand">true</property>
- <property name="halign">end</property>
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="row4_1">
- <property name="orientation">vertical</property>
- <property name="visible">true</property>
- <child>
- <object class="GtkLabel" id="license_label">
- <property name="label" translatable="yes">License</property>
- <property name="expand">true</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
- <property name="visible">true</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="row5_1">
- <property name="label" translatable="yes">Version Control</property>
- <property name="expand">true</property>
- <property name="halign">end</property>
- <property name="visible">true</property>
- </object>
- </child>
</object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">0</property>
+ </packing>
</child>
- <child type="center">
+ <child>
<object class="GtkBox">
+ <property name="spacing">6</property>
<property name="orientation">vertical</property>
- <property name="expand">false</property>
- <property name="spacing">24</property>
<property name="visible">true</property>
<child>
- <object class="GtkBox" id="row1_2">
- <property name="spacing">6</property>
- <property name="orientation">vertical</property>
- <property name="visible">true</property>
- <child>
- <object class="GtkEntry" id="project_name_entry">
- <property name="width-chars">50</property>
- <property name="expand">true</property>
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="xalign">0.0</property>
- <property name="wrap">true</property>
- <property name="visible">true</property>
- <property name="max-width-chars">60</property>
- <property name="label" translatable="yes">Unique name that is used for your
project's folder and other technical resources. Should be in lower case without spaces and may not start with
a number.</property>
- <style>
- <class name="dim-label"/>
- </style>
- <attributes>
- <attribute name="scale" value="0.833333"/>
- </attributes>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="row2_2">
+ <object class="GtkEntry" id="project_name_entry">
+ <property name="width-chars">50</property>
<property name="expand">true</property>
<property name="visible">true</property>
- <child>
- <object class="EggFileChooserEntry" id="project_location_entry">
- <property name="action">select-folder</property>
- <property name="title" translatable="yes">Select Project Directory</property>
- <property name="hexpand">true</property>
- <property name="visible">true</property>
- </object>
- </child>
</object>
</child>
<child>
- <object class="EggRadioBox" id="project_language_chooser">
- <property name="expand">true</property>
+ <object class="GtkLabel">
+ <property name="xalign">0.0</property>
+ <property name="wrap">true</property>
<property name="visible">true</property>
+ <property name="max-width-chars">60</property>
+ <property name="label" translatable="yes">Unique name that is used for your
project's folder and other technical resources. Should be in lower case without spaces and may not start with
a number.</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="0.833333"/>
+ </attributes>
</object>
</child>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkLabel">
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Project Location</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="EggFileChooserEntry" id="project_location_entry">
+ <property name="action">select-folder</property>
+ <property name="title" translatable="yes">Select Project Directory</property>
+ <property name="hexpand">true</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">1</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkLabel">
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Language</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="EggRadioBox" id="project_language_chooser">
+ <property name="expand">true</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">2</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkLabel" id="license_label">
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">License</property>
+ <property name="valign">start</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="EggRadioBox" id="license_chooser">
+ <property name="active-id">gpl_3</property>
+ <property name="expand">true</property>
+ <property name="visible">true</property>
+ <items>
+ <item id="gpl_3" translatable="yes">GPLv3+</item>
+ <item id="lgpl_3" translatable="yes">LGPLv3+</item>
+ <item id="agpl_3" translatable="yes">AGPLv3+</item>
+ <item id="mit_x11" translatable="yes">MIT/X11</item>
+ <item id="gpl_2" translatable="yes">GPLv2+</item>
+ <item id="lgpl_2_1" translatable="yes">LGPLv2.1+</item>
+ <item id="none" translatable="yes">No license</item>
+ </items>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">3</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkLabel">
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Version Control</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="versioning_box">
+ <property name="orientation">horizontal</property>
+ <property name="visible">true</property>
<child>
- <object class="EggRadioBox" id="license_chooser">
- <property name="active-id">gpl_3</property>
- <property name="expand">true</property>
+ <object class="GtkSwitch" id="versioning_switch">
+ <property name="active">true</property>
+ <property name="halign">start</property>
<property name="visible">true</property>
- <items>
- <item id="gpl_3" translatable="yes">GPLv3+</item>
- <item id="lgpl_3" translatable="yes">LGPLv3+</item>
- <item id="agpl_3" translatable="yes">AGPLv3+</item>
- <item id="mit_x11" translatable="yes">MIT/X11</item>
- <item id="gpl_2" translatable="yes">GPLv2+</item>
- <item id="lgpl_2_1" translatable="yes">LGPLv2.1+</item>
- <item id="none" translatable="yes">No license</item>
- </items>
</object>
</child>
<child>
- <object class="GtkBox" id="versioning_box">
- <property name="orientation">horizontal</property>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Uses the Git version control
system</property>
<property name="visible">true</property>
- <child>
- <object class="GtkSwitch" id="versioning_switch">
- <property name="active">true</property>
- <property name="halign">start</property>
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Uses the Git version control
system</property>
- <property name="visible">true</property>
- <style>
- <class name="dim-label"/>
- </style>
- <attributes>
- <attribute name="scale" value="0.833333"/>
- </attributes>
- </object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
- </child>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="0.833333"/>
+ </attributes>
</object>
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
</child>
</object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">4</property>
+ </packing>
</child>
+
<child>
<object class="GtkBox">
- <property name="spacing">24</property>
- <property name="halign">start</property>
- <property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
- <object class="GtkLabel" id="spacer1">
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="spacer2">
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="spacer3">
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="spacer4">
+ <object class="GtkToggleButton" id="license_more">
+ <property name="active" bind-source="license_chooser" bind-property="show-more"
bind-flags="bidirectional"/>
+ <property name="sensitive" bind-source="license_chooser" bind-property="has-more"/>
+ <property name="valign">start</property>
+ <property name="vexpand">false</property>
<property name="visible">true</property>
+ <property name="focus-on-click">false</property>
+ <style>
+ <class name="flat"/>
+ <class name="image-button"/>
+ </style>
<child>
- <object class="GtkToggleButton" id="license_more">
- <property name="active" bind-source="license_chooser" bind-property="show-more"
bind-flags="bidirectional"/>
- <property name="sensitive" bind-source="license_chooser"
bind-property="has-more"/>
- <property name="valign">start</property>
+ <object class="GtkImage">
+ <property name="icon-name">view-more-symbolic</property>
<property name="visible">true</property>
- <property name="focus-on-click">false</property>
- <style>
- <class name="flat"/>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage">
- <property name="icon-name">view-more-symbolic</property>
- <property name="visible">true</property>
- </object>
- </child>
</object>
</child>
</object>
</child>
- <child>
- <object class="GtkLabel" id="spacer5">
- <property name="visible">true</property>
- </object>
- </child>
</object>
<packing>
- <property name="expand">true</property>
- <property name="pack-type">end</property>
+ <property name="column">right</property>
+ <property name="row">3</property>
</packing>
</child>
+
</object>
</child>
<child>
@@ -285,55 +264,9 @@
<object class="GtkSizeGroup">
<property name="mode">vertical</property>
<widgets>
- <widget name="row1_1"/>
- <widget name="row1_2"/>
- <widget name="spacer1"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup">
- <property name="mode">vertical</property>
- <widgets>
<widget name="project_name_label"/>
<widget name="project_name_entry"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup">
- <property name="mode">vertical</property>
- <widgets>
- <widget name="row2_1"/>
- <widget name="row2_2"/>
- <widget name="spacer2"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup">
- <property name="mode">vertical</property>
- <widgets>
- <widget name="row3_1"/>
- <widget name="project_language_chooser"/>
- <widget name="spacer3"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup">
- <property name="mode">vertical</property>
- <widgets>
- <widget name="row4_1"/>
- <widget name="license_chooser"/>
- <widget name="spacer4"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup">
- <property name="mode">vertical</property>
- <widgets>
<widget name="license_label"/>
- <widget name="license_more"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup">
- <property name="mode">vertical</property>
- <widgets>
- <widget name="row5_1"/>
- <widget name="versioning_box"/>
- <widget name="spacer5"/>
</widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]