[gnome-disk-utility] Rearrange dialog used for editing /etc/fstab entries
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Rearrange dialog used for editing /etc/fstab entries
- Date: Tue, 21 Feb 2012 18:19:13 +0000 (UTC)
commit 5b7cc9de23806d5b109697b44856c1370a0d6747
Author: David Zeuthen <davidz redhat com>
Date: Tue Feb 21 12:52:22 2012 -0500
Rearrange dialog used for editing /etc/fstab entries
After feedback from Jon McCann, thanks.
Signed-off-by: David Zeuthen <davidz redhat com>
data/ui/edit-fstab-dialog.ui | 649 ++++++++++++++++++---------------------
data/ui/palimpsest.ui | 2 +-
src/palimpsest/gdufstabdialog.c | 136 ++++-----
3 files changed, 360 insertions(+), 427 deletions(-)
---
diff --git a/data/ui/edit-fstab-dialog.ui b/data/ui/edit-fstab-dialog.ui
index 139052f..3b1f7df 100644
--- a/data/ui/edit-fstab-dialog.ui
+++ b/data/ui/edit-fstab-dialog.ui
@@ -13,228 +13,186 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area6">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button7">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button8">
- <property name="label">gtk-apply</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="fstab-infobar-hbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkCheckButton" id="fstab-configure-checkbutton">
- <property name="label" translatable="yes">Con_figure mount point and options</property>
+ <object class="GtkBox" id="fstab-infobar-hbox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_markup" translatable="yes">Checked if entry in the <b>/etc/fstab</b> file exists for the device</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkGrid" id="fstab-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">24</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</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>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">I_dentify As</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">fstab-device-combobox</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</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">2</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">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="fstab-directory-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Mount _Point</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">fstab-directory-entry</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
<child>
- <object class="GtkGrid" id="fstab-grid">
+ <object class="GtkLabel" id="fstab-type-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Filesystem _Type</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">fstab-type-entry</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="fstab-directory-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="fstab-type-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</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>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Device</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">fstab-device-combobox</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <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>
- <object class="GtkLabel" id="fstab-directory-label">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">D_irectory</property>
+ <property name="label" translatable="yes">Display _Name</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">fstab-directory-entry</property>
+ <property name="mnemonic_widget">fstab-name-entry</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="fstab-type-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Type</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">fstab-type-entry</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="fstab-directory-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</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="invisible_char_set">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="fstab-type-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</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="invisible_char_set">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="fstab-options-entry">
+ <object class="GtkEntry" id="fstab-name-entry">
<property name="visible">True</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="tooltip_text" translatable="yes">If set, the name to use for the device in the user interface [x-gvfs-name=]</property>
+ <property name="hexpand">True</property>
<property name="invisible_char">â</property>
<property name="invisible_char_set">True</property>
</object>
@@ -246,34 +204,33 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="fstab-options-label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_Options</property>
+ <property name="label" translatable="yes">Icon Na_me</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">fstab-options-entry</property>
+ <property name="mnemonic_widget">fstab-icon-entry</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="fstab-noauto-checkbutton">
- <property name="label" translatable="yes">Don't mount at startup</property>
+ <object class="GtkEntry" id="fstab-icon-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">If checked, the device will not be mounted at startup [noauto]</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">If set, the name of the icon to use in the device in the user interface [x-gvfs-icon=]</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -283,215 +240,202 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="fstab-nofail-checkbutton">
- <property name="label" translatable="yes">Don't wait for device at startup</property>
+ <object class="GtkCheckButton" id="fstab-show-checkbutton">
+ <property name="label" translatable="yes">Show in user interface</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">If checked, the system won't wait for the device at startup [nofail]</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, the device is always shown in the user interface no matter what its directory is [x-gvfs-show]</property>
+ <property name="tooltip_text" translatable="yes">If checked, the device is always shown in the user interface no matter what its directory is [x-gvfs-show]</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">6</property>
- <property name="width">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="fstab-auth-checkbutton">
<property name="label" translatable="yes">Require additional authorization to mount</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, additional authorization is required to mount the device [x-udisks-auth]</property>
<property name="tooltip_text" translatable="yes">If checked, additional authorization is required to mount the device [x-udisks-auth]</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">7</property>
- <property name="width">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="fstab-show-checkbutton">
- <property name="label" translatable="yes">Always show in user interface</property>
+ <object class="GtkCheckButton" id="fstab-nofail-checkbutton">
+ <property name="label" translatable="yes">Don't wait for device at startup</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">If checked, the device is always shown in the user interface no matter what its directory is [x-gvfs-show]</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, the system won&apos;t wait for the device at startup [nofail]</property>
+ <property name="tooltip_text" translatable="yes">If checked, the system won't wait for the device at startup [nofail]</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">8</property>
- <property name="width">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="fstab-hide-checkbutton">
- <property name="label" translatable="yes">Never show in user interface</property>
+ <object class="GtkCheckButton" id="fstab-noauto-checkbutton">
+ <property name="label" translatable="yes">Don't mount at startup</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">If checked, the device is never shown in the user interface no matter what its directory is [x-gvfs-hide]</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, the device will not be mounted at startup [noauto]</property>
+ <property name="tooltip_text" translatable="yes">If checked, the device will not be mounted at startup [noauto]</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">9</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">10</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Display _Name</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">fstab-name-entry</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <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="GtkEntry" id="fstab-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">If set, the name to use for the device in the user interface [x-gvfs-name=]</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â</property>
- <property name="invisible_char_set">True</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="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Icon Na_me</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">fstab-icon-entry</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="fstab-icon-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">If set, the name of the icon to use in the device in the user interface [x-gvfs-icon=]</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â</property>
- <property name="invisible_char_set">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>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">10</property>
- <property name="width">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <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-options-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Mount _Options</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">fstab-options-entry</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <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="GtkLinkButton" id="linkbutton1">
- <property name="label" translatable="yes">What's this?</property>
+ <object class="GtkEntry" id="fstab-options-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="use_action_appearance">False</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- <property name="uri">man:fstab</property>
+ <property name="tooltip_markup" translatable="yes">The mount options stored in the <b>/etc/fstab</b> file</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <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>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLinkButton" id="linkbutton1">
+ <property name="label" translatable="yes">What's this?</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
+ <property name="xalign">0</property>
+ <property name="uri">man:fstab</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area6">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="fstab-button-cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="fstab-button-apply">
+ <property name="label">gtk-apply</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_markup" translatable="yes">Click to create or update entry in the <b>/etc/fstab</b> file</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -499,18 +443,37 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="fstab-button-reset">
+ <property name="label" translatable="yes">Reset</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_markup" translatable="yes">Click to remove the entry from the <b>/etc/fstab</b> file</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
- <action-widget response="0">button7</action-widget>
- <action-widget response="-10">button8</action-widget>
+ <action-widget response="-6">fstab-button-cancel</action-widget>
+ <action-widget response="-10">fstab-button-apply</action-widget>
+ <action-widget response="1">fstab-button-reset</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="fstab-freq-adjustment">
diff --git a/data/ui/palimpsest.ui b/data/ui/palimpsest.ui
index 0fc9f54..506dd9f 100644
--- a/data/ui/palimpsest.ui
+++ b/data/ui/palimpsest.ui
@@ -163,7 +163,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Edit fstab entry...</property>
+ <property name="label" translatable="yes">Edit mount options...</property>
<property name="use_underline">True</property>
</object>
</child>
diff --git a/src/palimpsest/gdufstabdialog.c b/src/palimpsest/gdufstabdialog.c
index 50c5aeb..775d979 100644
--- a/src/palimpsest/gdufstabdialog.c
+++ b/src/palimpsest/gdufstabdialog.c
@@ -35,7 +35,7 @@
typedef struct
{
GtkWidget *dialog;
- GtkWidget *configure_checkbutton;
+ GtkWidget *reset_button;
GtkWidget *grid;
GtkWidget *infobar_hbox;
@@ -49,7 +49,6 @@ typedef struct
GtkWidget *nofail_checkbutton;
GtkWidget *auth_checkbutton;
GtkWidget *show_checkbutton;
- GtkWidget *hide_checkbutton;
GtkWidget *name_entry;
GtkWidget *icon_entry;
@@ -60,12 +59,10 @@ static void
update (FstabDialogData *data,
GtkWidget *widget)
{
- gboolean ui_configured;
gchar *ui_fsname;
const gchar *ui_dir;
const gchar *ui_type;
const gchar *ui_opts;
- gboolean configured;
const gchar *fsname;
const gchar *dir;
const gchar *type;
@@ -74,7 +71,6 @@ update (FstabDialogData *data,
if (data->orig_fstab_entry != NULL)
{
- configured = TRUE;
g_variant_lookup (data->orig_fstab_entry, "fsname", "^&ay", &fsname);
g_variant_lookup (data->orig_fstab_entry, "dir", "^&ay", &dir);
g_variant_lookup (data->orig_fstab_entry, "type", "^&ay", &type);
@@ -82,14 +78,12 @@ update (FstabDialogData *data,
}
else
{
- configured = FALSE;
fsname = "";
dir = "";
type = "";
opts = "";
}
- ui_configured = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->configure_checkbutton));
ui_fsname = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (data->device_combobox));
ui_dir = gtk_entry_get_text (GTK_ENTRY (data->directory_entry));
ui_type = gtk_entry_get_text (GTK_ENTRY (data->type_entry));
@@ -100,41 +94,28 @@ update (FstabDialogData *data,
gdu_options_update_check_option (data->options_entry, "nofail", widget, data->nofail_checkbutton, TRUE);
gdu_options_update_check_option (data->options_entry, "x-udisks-auth", widget, data->auth_checkbutton, FALSE);
gdu_options_update_check_option (data->options_entry, "x-gvfs-show", widget, data->show_checkbutton, FALSE);
- gdu_options_update_check_option (data->options_entry, "x-gvfs-hide", widget, data->hide_checkbutton, FALSE);
gdu_options_update_entry_option (data->options_entry, "x-gvfs-name=", widget, data->name_entry);
gdu_options_update_entry_option (data->options_entry, "x-gvfs-icon=", widget, data->icon_entry);
g_object_thaw_notify (G_OBJECT (data->options_entry));
can_apply = FALSE;
- if (configured != ui_configured)
+ if (g_strcmp0 (ui_fsname, fsname) != 0 ||
+ g_strcmp0 (ui_dir, dir) != 0 ||
+ g_strcmp0 (ui_type, type) != 0 ||
+ g_strcmp0 (ui_opts, opts) != 0)
{
can_apply = TRUE;
}
- else if (ui_configured)
- {
- if (g_strcmp0 (ui_fsname, fsname) != 0 ||
- g_strcmp0 (ui_dir, dir) != 0 ||
- g_strcmp0 (ui_type, type) != 0 ||
- g_strcmp0 (ui_opts, opts) != 0)
- {
- can_apply = TRUE;
- }
- }
/* sanity-check and validate */
- if (ui_configured)
+ if (strlen (ui_fsname) == 0 ||
+ strlen (ui_dir) == 0 ||
+ strlen (ui_type) == 0 ||
+ strlen (ui_opts) == 0)
{
- if (strlen (ui_fsname) == 0 ||
- strlen (ui_dir) == 0 ||
- strlen (ui_type) == 0 ||
- strlen (ui_opts) == 0)
- {
- can_apply = FALSE;
- }
+ can_apply = FALSE;
}
- gtk_widget_set_sensitive (data->grid, ui_configured);
-
gtk_dialog_set_response_sensitive (GTK_DIALOG (data->dialog),
GTK_RESPONSE_APPLY,
can_apply);
@@ -218,7 +199,7 @@ fstab_on_device_combobox_changed (GtkComboBox *combobox,
s = strrchr (fsname, '=');
if (s == NULL)
s = "/disk";
- proposed_mount_point = g_strdup_printf ("/media/%s", s + 1);
+ proposed_mount_point = g_strdup_printf ("/mnt/%s", s + 1);
gtk_entry_set_text (GTK_ENTRY (data->directory_entry), proposed_mount_point);
g_free (proposed_mount_point);
@@ -410,7 +391,7 @@ gdu_fstab_dialog_show (GduWindow *window,
memset (&data, '\0', sizeof (FstabDialogData));
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.reset_button = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-button-reset"));
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"));
@@ -421,7 +402,6 @@ gdu_fstab_dialog_show (GduWindow *window,
data.nofail_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-nofail-checkbutton"));
data.auth_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-auth-checkbutton"));
data.show_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-show-checkbutton"));
- data.hide_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-hide-checkbutton"));
data.name_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-name-entry"));
data.icon_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-icon-entry"));
@@ -455,10 +435,10 @@ gdu_fstab_dialog_show (GduWindow *window,
fsname = NULL;
dir = "";
type = "auto";
- opts = "nosuid,nodev,nofail";
+ opts = "nosuid,nodev,nofail,x-gvfs-show";
/* propose noauto if the media is removable - otherwise e.g. systemd will time out at boot */
if (drive != NULL && udisks_drive_get_removable (drive))
- opts = "nosuid,nodev,noauto";
+ opts = "nosuid,nodev,noauto,x-gvfs-show";
freq = 0;
passno = 0;
}
@@ -468,7 +448,6 @@ gdu_fstab_dialog_show (GduWindow *window,
drive,
block,
fsname);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data.configure_checkbutton), configured);
gtk_entry_set_text (GTK_ENTRY (data.directory_entry), dir);
gtk_entry_set_text (GTK_ENTRY (data.type_entry), type);
gtk_entry_set_text (GTK_ENTRY (data.options_entry), opts);
@@ -487,11 +466,13 @@ gdu_fstab_dialog_show (GduWindow *window,
gtk_widget_show_all (dialog);
+ /* Show "Reset" button only if already configured */
+ if (!configured)
+ gtk_widget_hide (data.reset_button);
+
update_device_explanation (&data);
update (&data, NULL);
- g_signal_connect (data.configure_checkbutton,
- "notify::active", G_CALLBACK (on_property_changed), &data);
g_signal_connect (data.device_combobox,
"notify::active", G_CALLBACK (on_property_changed), &data);
g_signal_connect (data.directory_entry,
@@ -510,17 +491,32 @@ gdu_fstab_dialog_show (GduWindow *window,
"notify::active", G_CALLBACK (on_property_changed), &data);
g_signal_connect (data.show_checkbutton,
"notify::active", G_CALLBACK (on_property_changed), &data);
- g_signal_connect (data.hide_checkbutton,
- "notify::active", G_CALLBACK (on_property_changed), &data);
g_signal_connect (data.name_entry,
"notify::text", G_CALLBACK (on_property_changed), &data);
g_signal_connect (data.icon_entry,
"notify::text", G_CALLBACK (on_property_changed), &data);
response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (response == GTK_RESPONSE_APPLY)
+ if (response == 1) /* application-defined for "fstab-button-reset" */
+ {
+ GError *error;
+
+ error = NULL;
+ if (!udisks_block_call_remove_configuration_item_sync (block,
+ g_variant_new ("(s a{sv})", "fstab", data.orig_fstab_entry),
+ g_variant_new ("a{sv}", NULL), /* options */
+ NULL, /* GCancellable */
+ &error))
+ {
+ gdu_window_show_error (window,
+ _("Error removing old /etc/fstab entry"),
+ error);
+ g_error_free (error);
+ goto out;
+ }
+ }
+ else if (response == GTK_RESPONSE_APPLY)
{
- gboolean ui_configured;
gchar *ui_fsname;
const gchar *ui_dir;
const gchar *ui_type;
@@ -528,10 +524,10 @@ gdu_fstab_dialog_show (GduWindow *window,
gint freq = 0;
gint passno = 0;
GError *error;
- GVariant *old_item;
- GVariant *new_item;
+ GVariant *old_item = NULL;
+ GVariant *new_item = NULL;
+ GVariantBuilder builder;
- ui_configured = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data.configure_checkbutton));
ui_fsname = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (data.device_combobox));
ui_dir = gtk_entry_get_text (GTK_ENTRY (data.directory_entry));
ui_type = gtk_entry_get_text (GTK_ENTRY (data.type_entry));
@@ -544,45 +540,19 @@ gdu_fstab_dialog_show (GduWindow *window,
gtk_widget_hide (dialog);
- old_item = NULL;
- new_item = NULL;
-
- if (configured)
- {
- old_item = g_variant_new ("(s a{sv})", "fstab", data.orig_fstab_entry);
- }
-
- if (ui_configured)
- {
- GVariantBuilder builder;
- g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
- g_variant_builder_add (&builder, "{sv}", "fsname", g_variant_new_bytestring (ui_fsname));
- g_variant_builder_add (&builder, "{sv}", "dir", g_variant_new_bytestring (ui_dir));
- g_variant_builder_add (&builder, "{sv}", "type", g_variant_new_bytestring (ui_type));
- g_variant_builder_add (&builder, "{sv}", "opts", g_variant_new_bytestring (ui_opts));
- g_variant_builder_add (&builder, "{sv}", "freq", g_variant_new_int32 (freq));
- g_variant_builder_add (&builder, "{sv}", "passno", g_variant_new_int32 (passno));
- new_item = g_variant_new ("(sa{sv})", "fstab", &builder);
- }
-
- if (old_item != NULL && new_item == NULL)
- {
- error = NULL;
- if (!udisks_block_call_remove_configuration_item_sync (block,
- old_item,
- g_variant_new ("a{sv}", NULL), /* options */
- NULL, /* GCancellable */
- &error))
- {
- gdu_window_show_error (window,
- _("Error removing old /etc/fstab entry"),
- error);
- g_error_free (error);
- g_free (ui_fsname);
- goto out;
- }
- }
- else if (old_item == NULL && new_item != NULL)
+ if (data.orig_fstab_entry != NULL)
+ old_item = g_variant_new ("(s a{sv})", "fstab", data.orig_fstab_entry);
+
+ g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
+ g_variant_builder_add (&builder, "{sv}", "fsname", g_variant_new_bytestring (ui_fsname));
+ g_variant_builder_add (&builder, "{sv}", "dir", g_variant_new_bytestring (ui_dir));
+ g_variant_builder_add (&builder, "{sv}", "type", g_variant_new_bytestring (ui_type));
+ g_variant_builder_add (&builder, "{sv}", "opts", g_variant_new_bytestring (ui_opts));
+ g_variant_builder_add (&builder, "{sv}", "freq", g_variant_new_int32 (freq));
+ g_variant_builder_add (&builder, "{sv}", "passno", g_variant_new_int32 (passno));
+ new_item = g_variant_new ("(sa{sv})", "fstab", &builder);
+
+ if (old_item == NULL && new_item != NULL)
{
error = NULL;
if (!udisks_block_call_add_configuration_item_sync (block,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]