[nautilus-actions: 41/45] Align widgets
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions: 41/45] Align widgets
- Date: Wed, 29 Jul 2009 21:21:12 +0000 (UTC)
commit 934564fc63a9c9fa6d0d95dceac3fd619e97d2dd
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jul 17 15:57:29 2009 +0200
Align widgets
ChangeLog | 5 +
src/nact/nact-action-conditions-editor.c | 23 ++---
src/nact/nact-action-profiles-editor.c | 7 +-
src/nact/nact-profile-conditions-editor.c | 14 +++-
src/nact/nautilus-actions-config.ui | 147 +++++++++++++++--------------
5 files changed, 113 insertions(+), 83 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 059a5ad..c65ce59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-07-16 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-profile-conditions-editor.c:
+ Align widgets.
+
+2009-07-16 Pierre Wieser <pwieser trychlos org>
+
* src/nact/base-window.c:
* src/nact/nact-main-window.c:
* src/nact/nact-action-conditions-editor.c:
diff --git a/src/nact/nact-action-conditions-editor.c b/src/nact/nact-action-conditions-editor.c
index a5d3b10..9c32223 100644
--- a/src/nact/nact-action-conditions-editor.c
+++ b/src/nact/nact-action-conditions-editor.c
@@ -314,26 +314,23 @@ on_initial_load_dialog( BaseWindow *dialog )
g_debug( "%s: dialog=%p", thisfn, dialog );
g_assert( NACT_IS_ACTION_CONDITIONS_EDITOR( dialog ));
- NactActionConditionsEditor *window = NACT_ACTION_CONDITIONS_EDITOR( dialog );
+ NactActionConditionsEditor *editor = NACT_ACTION_CONDITIONS_EDITOR( dialog );
- nact_imenu_item_initial_load( NACT_WINDOW( window ), window->private->edited );
+ nact_imenu_item_initial_load( NACT_WINDOW( editor ), editor->private->edited );
- NAActionProfile *profile = NA_ACTION_PROFILE( na_action_get_profiles( window->private->edited )->data );
- nact_iconditions_initial_load( NACT_WINDOW( window ), profile );
+ NAActionProfile *profile = NA_ACTION_PROFILE( na_action_get_profiles( editor->private->edited )->data );
+ nact_iconditions_initial_load( NACT_WINDOW( editor ), profile );
/* label alignements */
GtkSizeGroup *label_group = gtk_size_group_new( GTK_SIZE_GROUP_HORIZONTAL );
- nact_imenu_item_size_labels( NACT_WINDOW( window ), G_OBJECT( label_group ));
- nact_iconditions_size_labels( NACT_WINDOW( window ), G_OBJECT( label_group ));
+ nact_imenu_item_size_labels( NACT_WINDOW( editor ), G_OBJECT( label_group ));
+ nact_iconditions_size_labels( NACT_WINDOW( editor ), G_OBJECT( label_group ));
g_object_unref( label_group );
- /* buttons size
- * nb: while label sizing group works well with Glade 3.3 and GtkBuilder,
- * it doesn't with button size - so sizing them by code
- */
+ /* buttons size */
GtkSizeGroup *button_group = gtk_size_group_new( GTK_SIZE_GROUP_HORIZONTAL );
- nact_imenu_item_size_buttons( NACT_WINDOW( window ), G_OBJECT( button_group ));
- nact_iconditions_size_buttons( NACT_WINDOW( window ), G_OBJECT( button_group ));
+ nact_imenu_item_size_buttons( NACT_WINDOW( editor ), G_OBJECT( button_group ));
+ nact_iconditions_size_buttons( NACT_WINDOW( editor ), G_OBJECT( button_group ));
g_object_unref( button_group );
}
@@ -374,6 +371,8 @@ on_all_widgets_showed( BaseWindow *dialog )
}
g_debug( "%s: dialog=%p", thisfn, dialog );
+ g_assert( NACT_IS_ACTION_CONDITIONS_EDITOR( dialog ));
+ /*NactActionConditionsEditor *editor = NACT_ACTION_CONDITIONS_EDITOR( dialog );*/
GtkNotebook *notebook = GTK_NOTEBOOK( base_window_get_widget( dialog, "Notebook" ));
gtk_notebook_set_current_page( notebook, 0 );
diff --git a/src/nact/nact-action-profiles-editor.c b/src/nact/nact-action-profiles-editor.c
index 18f1274..6e4b271 100644
--- a/src/nact/nact-action-profiles-editor.c
+++ b/src/nact/nact-action-profiles-editor.c
@@ -321,6 +321,11 @@ on_initial_load_dialog( BaseWindow *dialog )
nact_iprofiles_list_initial_load( NACT_WINDOW( editor ));
nact_iprofiles_list_set_multiple_selection( NACT_WINDOW( editor ), FALSE );
nact_iprofiles_list_set_send_selection_changed_on_fill_list( NACT_WINDOW( editor ), FALSE );
+
+ /* label alignements */
+ GtkSizeGroup *label_group = gtk_size_group_new( GTK_SIZE_GROUP_HORIZONTAL );
+ nact_imenu_item_size_labels( NACT_WINDOW( editor ), G_OBJECT( label_group ));
+ g_object_unref( label_group );
}
static void
@@ -394,7 +399,7 @@ setup_buttons( NactActionProfilesEditor *dialog, gboolean can_save )
{
GtkWidget *cancel_button = gtk_button_new_from_stock( GTK_STOCK_CANCEL );
GtkWidget *close_button = gtk_button_new_from_stock( GTK_STOCK_CLOSE );
- GtkWidget *button = base_window_get_widget( BASE_WINDOW( dialog ), "CancelButton" );
+ GtkWidget *button = base_window_get_widget( BASE_WINDOW( dialog ), "CancelButton1" );
gtk_button_set_label( GTK_BUTTON( button ), can_save ? _( "_Cancel" ) : _( "_Close" ));
gtk_button_set_image( GTK_BUTTON( button ), can_save ? gtk_button_get_image( GTK_BUTTON( cancel_button )) : gtk_button_get_image( GTK_BUTTON( close_button )));
gtk_widget_destroy( cancel_button );
diff --git a/src/nact/nact-profile-conditions-editor.c b/src/nact/nact-profile-conditions-editor.c
index cc74067..deb24b1 100644
--- a/src/nact/nact-profile-conditions-editor.c
+++ b/src/nact/nact-profile-conditions-editor.c
@@ -323,6 +323,18 @@ on_initial_load_dialog( BaseWindow *dialog )
nact_iprofile_item_initial_load( NACT_WINDOW( editor ), editor->private->edited_profile );
nact_iconditions_initial_load( NACT_WINDOW( editor ), editor->private->edited_profile );
+
+ /* label alignements */
+ GtkSizeGroup *label_group = gtk_size_group_new( GTK_SIZE_GROUP_HORIZONTAL );
+ nact_iprofile_item_size_labels( NACT_WINDOW( editor ), G_OBJECT( label_group ));
+ nact_iconditions_size_labels( NACT_WINDOW( editor ), G_OBJECT( label_group ));
+ g_object_unref( label_group );
+
+ /* buttons size */
+ GtkSizeGroup *button_group = gtk_size_group_new( GTK_SIZE_GROUP_HORIZONTAL );
+ nact_iprofile_item_size_buttons( NACT_WINDOW( editor ), G_OBJECT( button_group ));
+ nact_iconditions_size_buttons( NACT_WINDOW( editor ), G_OBJECT( button_group ));
+ g_object_unref( button_group );
}
static void
@@ -409,7 +421,7 @@ setup_buttons( NactProfileConditionsEditor *editor, gboolean can_save )
GtkWidget *cancel_button = gtk_button_new_from_stock( GTK_STOCK_CANCEL );
GtkWidget *close_button = gtk_button_new_from_stock( GTK_STOCK_CLOSE );
- GtkWidget *dlg_cancel = base_window_get_widget( BASE_WINDOW( editor ), "CancelButton" );
+ GtkWidget *dlg_cancel = base_window_get_widget( BASE_WINDOW( editor ), "CancelButton2" );
gtk_button_set_label( GTK_BUTTON( dlg_cancel ), can_save ? _( "_Cancel" ) : _( "_Close" ));
gtk_button_set_image( GTK_BUTTON( dlg_cancel ), can_save ? gtk_button_get_image( GTK_BUTTON( cancel_button )) : gtk_button_get_image( GTK_BUTTON( close_button )));
diff --git a/src/nact/nautilus-actions-config.ui b/src/nact/nautilus-actions-config.ui
index 897d841..e2a92cf 100644
--- a/src/nact/nautilus-actions-config.ui
+++ b/src/nact/nautilus-actions-config.ui
@@ -75,6 +75,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="image">ActionDuplicateButtonImage</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -212,12 +213,12 @@
<object class="GtkVBox" id="MenuItemVBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label159">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Nautilus Menu Item</b>
-</property>
+ <property name="label" translatable="yes"><b>Nautilus Menu Item</b></property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -342,6 +343,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="expand">False</property>
@@ -361,8 +363,6 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -378,12 +378,11 @@
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
- <property name="spacing">4</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label40">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="ypad">4</property>
<property name="label" translatable="yes"><b>Action</b></property>
<property name="use_markup">True</property>
</object>
@@ -399,7 +398,7 @@
<property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">6</property>
- <property name="row_spacing">4</property>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="ActionPathLabel">
<property name="visible">True</property>
@@ -412,42 +411,28 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="CommandPathEntry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="width_chars">10</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="PathBrowseButton">
- <property name="label" translatable="yes">_Browse...</property>
+ <object class="GtkLabel" id="ActionParametersLabel">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Parameters :</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="ActionParametersLabel">
+ <object class="GtkEntry" id="CommandPathEntry">
<property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Parameters :</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">10</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
@@ -463,22 +448,20 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="LegendButton">
- <property name="label" translatable="yes">_Legend</property>
+ <object class="GtkButton" id="PathBrowseButton">
+ <property name="label" translatable="yes">_Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="image">LegendButtonImage</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
@@ -495,6 +478,25 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="LegendButton">
+ <property name="label" translatable="yes">_Legend</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">ActionLegendButtonImage</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -505,8 +507,6 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -532,7 +532,7 @@
<object class="GtkVBox" id="vbox394">
<property name="visible">True</property>
<property name="border_width">10</property>
- <property name="spacing">12</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="aaaLabelAlign7">
<property name="visible">True</property>
@@ -551,7 +551,7 @@
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
- <property name="column_spacing">4</property>
+ <property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="CLabelAlign1">
@@ -645,7 +645,7 @@
<child>
<object class="GtkHBox" id="hbox21">
<property name="visible">True</property>
- <property name="homogeneous">True</property>
+ <property name="spacing">14</property>
<child>
<object class="GtkRadioButton" id="OnlyFilesButton">
<property name="label" translatable="yes">Only files</property>
@@ -733,7 +733,7 @@
<object class="GtkVBox" id="vbox340">
<property name="visible">True</property>
<property name="border_width">12</property>
- <property name="spacing">6</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label46">
<property name="visible">True</property>
@@ -1359,7 +1359,7 @@ file(s)/folder(s)</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
- <property name="image">DuplicateButtonImage</property>
+ <property name="image">ProfileDuplicateButtonImage</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -1412,7 +1412,7 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="CancelButton">
+ <object class="GtkButton" id="CancelButton1">
<property name="label" translatable="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1450,7 +1450,7 @@ file(s)/folder(s)</property>
</object>
</child>
<action-widgets>
- <action-widget response="0">CancelButton</action-widget>
+ <action-widget response="0">CancelButton1</action-widget>
<action-widget response="-5">SaveButton</action-widget>
</action-widgets>
</object>
@@ -1464,7 +1464,7 @@ file(s)/folder(s)</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <object class="GtkNotebook" id="notebook2">
+ <object class="GtkNotebook" id="Notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
@@ -1473,10 +1473,12 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="border_width">10</property>
<property name="orientation">vertical</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
@@ -1491,8 +1493,9 @@ file(s)/folder(s)</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="ProfileLabelLabel">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Label :</property>
@@ -1520,6 +1523,8 @@ file(s)/folder(s)</property>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -1528,12 +1533,11 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
- <property name="spacing">4</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label40">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="ypad">4</property>
<property name="label" translatable="yes"><b>Action</b></property>
<property name="use_markup">True</property>
</object>
@@ -1549,7 +1553,7 @@ file(s)/folder(s)</property>
<property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">6</property>
- <property name="row_spacing">4</property>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="ActionPathLabel">
<property name="visible">True</property>
@@ -1621,7 +1625,7 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="image">LegendButtonImage1</property>
+ <property name="image">ProfileLegendButtonImage</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -1681,7 +1685,7 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="border_width">10</property>
<property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="aaaLabelAlign7">
<property name="visible">True</property>
@@ -1792,9 +1796,9 @@ file(s)/folder(s)</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="spacing">14</property>
<child>
<object class="GtkRadioButton" id="OnlyFilesButton">
<property name="label" translatable="yes">Only files</property>
@@ -1885,7 +1889,7 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label46">
<property name="visible">True</property>
@@ -2005,7 +2009,7 @@ file(s)/folder(s)</property>
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="CancelButton">
+ <object class="GtkButton" id="CancelButton2">
<property name="label" translatable="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2043,7 +2047,7 @@ file(s)/folder(s)</property>
</object>
</child>
<action-widgets>
- <action-widget response="0">CancelButton</action-widget>
+ <action-widget response="0">CancelButton2</action-widget>
<action-widget response="-5">OKButton</action-widget>
</action-widgets>
</object>
@@ -2110,10 +2114,10 @@ to extend a selection.</property>
<object class="GtkFileChooserWidget" id="ExportFolderChooser">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="use_preview_label">False</property>
<property name="local_only">False</property>
- <property name="action">select-folder</property>
<property name="preview_widget_active">False</property>
+ <property name="use_preview_label">False</property>
+ <property name="action">select-folder</property>
</object>
<packing>
<property name="position">0</property>
@@ -2162,10 +2166,10 @@ to extend a selection.</property>
<object class="GtkFileChooserWidget" id="filechooserwidget1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="use_preview_label">False</property>
<property name="local_only">False</property>
- <property name="select_multiple">True</property>
<property name="preview_widget_active">False</property>
+ <property name="select_multiple">True</property>
+ <property name="use_preview_label">False</property>
</object>
</child>
<child>
@@ -2185,12 +2189,7 @@ to extend a selection.</property>
</packing>
</child>
</object>
- <object class="GtkImage" id="LegendButtonImage">
- <property name="visible">True</property>
- <property name="stock">gtk-help</property>
- <property name="icon-size">4</property>
- </object>
- <object class="GtkImage" id="DuplicateButtonImage">
+ <object class="GtkImage" id="ProfileDuplicateButtonImage">
<property name="visible">True</property>
<property name="stock">gtk-copy</property>
<property name="icon-size">4</property>
@@ -2205,7 +2204,17 @@ to extend a selection.</property>
<property name="stock">gtk-save</property>
<property name="icon-size">4</property>
</object>
- <object class="GtkImage" id="LegendButtonImage1">
+ <object class="GtkImage" id="ProfileLegendButtonImage">
+ <property name="visible">True</property>
+ <property name="stock">gtk-help</property>
+ <property name="icon-size">4</property>
+ </object>
+ <object class="GtkImage" id="ActionDuplicateButtonImage">
+ <property name="visible">True</property>
+ <property name="stock">gtk-copy</property>
+ <property name="icon-size">4</property>
+ </object>
+ <object class="GtkImage" id="ActionLegendButtonImage">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon-size">4</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]