[gnome-disk-utility/udisks2-port] Port fstab dialog to GtkGrid
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Port fstab dialog to GtkGrid
- Date: Thu, 22 Sep 2011 18:10:16 +0000 (UTC)
commit 011438a303b8944f19db6be97c1825a562843b26
Author: David Zeuthen <davidz redhat com>
Date: Thu Sep 22 14:10:12 2011 -0400
Port fstab dialog to GtkGrid
Signed-off-by: David Zeuthen <davidz redhat com>
data/ui/edit-fstab-dialog.ui | 196 ++++++++++++++++++++++-----------------
src/palimpsest/gdufstabdialog.c | 6 +-
2 files changed, 114 insertions(+), 88 deletions(-)
---
diff --git a/data/ui/edit-fstab-dialog.ui b/data/ui/edit-fstab-dialog.ui
index b1f39b9..368ed50 100644
--- a/data/ui/edit-fstab-dialog.ui
+++ b/data/ui/edit-fstab-dialog.ui
@@ -100,13 +100,11 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkTable" id="fstab-table">
+ <object class="GtkGrid" id="fstab-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">7</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">6</property>
+ <property name="row_spacing">10</property>
+ <property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="fstab-device-label">
<property name="visible">True</property>
@@ -120,7 +118,41 @@
</attributes>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="fstab-device-combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The <b>special device file</b> - use symlinks in the <b>/dev/disk</b> hierarchy to control the scope of the entry</property>
+ <property name="tooltip_text" translatable="yes">The special device file - use symlinks in the /dev/disk hierarchy to control the scope of the entry</property>
+ <property name="entry_text_column">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="fstab-device-explanation-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -136,9 +168,10 @@
</attributes>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -154,9 +187,10 @@
</attributes>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -172,51 +206,10 @@
</attributes>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="fstab-directory-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_markup" translatable="yes">The directory to mount the device in</property>
- <property name="invisible_char">â</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="fstab-type-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_markup" translatable="yes">The filesystem type to use</property>
- <property name="invisible_char">â</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="fstab-options-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_markup" translatable="yes">Mount options to use</property>
- <property name="invisible_char">â</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -232,9 +225,10 @@
</attributes>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -250,67 +244,99 @@
</attributes>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="fstab-freq-spinbutton">
+ <object class="GtkEntry" id="fstab-directory-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="tooltip_markup" translatable="yes">This field is used for these filesystems by the <b>dump(8)</b> command to determine which filesystems need to be dumped.</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The directory to mount the device in</property>
+ <property name="tooltip_text" translatable="yes">The directory to mount the device in</property>
<property name="invisible_char">â</property>
- <property name="adjustment">fstab-freq-adjustment</property>
- <property name="numeric">True</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="fstab-passno-spinbutton">
+ <object class="GtkEntry" id="fstab-type-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="tooltip_markup" translatable="yes">This field is used by the <b>fsck(8)</b> program to determine the order in which filesystem checks are done at reboot time.</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The filesystem type to use</property>
+ <property name="tooltip_text" translatable="yes">The filesystem type to use</property>
<property name="invisible_char">â</property>
- <property name="adjustment">fstab-passno-adjustment</property>
- <property name="numeric">True</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="fstab-device-combobox">
+ <object class="GtkEntry" id="fstab-options-entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">The <b>special device file</b> - use symlinks in the <b>/dev/disk</b> hierarchy to control the scope of the entry</property>
- <property name="entry_text_column">0</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Mount options to use</property>
+ <property name="tooltip_text" translatable="yes">Mount options to use</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="fstab-device-explanation-label">
+ <object class="GtkSpinButton" id="fstab-freq-spinbutton">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">This field is used for these filesystems by the <b>dump(8)</b> command to determine which filesystems need to be dumped.</property>
+ <property name="tooltip_text" translatable="yes">This field is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped.</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">fstab-freq-adjustment</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="fstab-passno-spinbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">This field is used by the <b>fsck(8)</b> program to determine the order in which filesystem checks are done at reboot time.</property>
+ <property name="tooltip_text" translatable="yes">This field is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time.</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">fstab-passno-adjustment</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -319,7 +345,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
diff --git a/src/palimpsest/gdufstabdialog.c b/src/palimpsest/gdufstabdialog.c
index f972967..a3e9683 100644
--- a/src/palimpsest/gdufstabdialog.c
+++ b/src/palimpsest/gdufstabdialog.c
@@ -36,7 +36,7 @@ typedef struct
{
GtkWidget *dialog;
GtkWidget *configure_checkbutton;
- GtkWidget *table;
+ GtkWidget *grid;
GtkWidget *infobar_hbox;
GtkWidget *device_combobox;
@@ -116,7 +116,7 @@ fstab_dialog_update (FstabDialogData *data)
}
}
- gtk_widget_set_sensitive (data->table, ui_configured);
+ gtk_widget_set_sensitive (data->grid, ui_configured);
gtk_dialog_set_response_sensitive (GTK_DIALOG (data->dialog),
GTK_RESPONSE_APPLY,
@@ -394,7 +394,7 @@ gdu_fstab_dialog_show (GduWindow *window,
data.dialog = dialog;
data.infobar_hbox = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-infobar-hbox"));
data.configure_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-configure-checkbutton"));
- data.table = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-table"));
+ data.grid = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-grid"));
data.device_combobox = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-device-combobox"));
data.device_explanation_label = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-device-explanation-label"));
data.directory_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-directory-entry"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]