[Xfce4-commits] [apps/catfish] 01/01: Simplify dialogs, use CSD for transient windows
noreply at xfce.org
noreply at xfce.org
Fri Dec 27 12:55:05 CET 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/catfish.
commit ce956719b85bd1514ab922adb85e4f0193539a70
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Dec 27 06:55:00 2019 -0500
Simplify dialogs, use CSD for transient windows
---
catfish/CatfishWindow.py | 2 +-
data/ui/AboutCatfishDialog.ui | 9 +-
data/ui/CatfishPreferences.ui | 11 +-
data/ui/CatfishWindow.ui | 503 +++++++++++++++++++++---------------------
po/catfish.pot | 60 ++---
5 files changed, 301 insertions(+), 284 deletions(-)
diff --git a/catfish/CatfishWindow.py b/catfish/CatfishWindow.py
index 8183a39..8e6459e 100644
--- a/catfish/CatfishWindow.py
+++ b/catfish/CatfishWindow.py
@@ -681,7 +681,7 @@ class CatfishWindow(Window):
self.update_index_unlock.grab_default()
# Restore Cancel button
- self.update_index_close.set_label(Gtk.STOCK_CANCEL)
+ self.update_index_close.set_label(_("Cancel"))
self.update_index_close.set_can_default(False)
self.update_index_close.set_receives_default(False)
diff --git a/data/ui/AboutCatfishDialog.ui b/data/ui/AboutCatfishDialog.ui
index c223cd5..be15cbe 100644
--- a/data/ui/AboutCatfishDialog.ui
+++ b/data/ui/AboutCatfishDialog.ui
@@ -35,8 +35,13 @@ Copyright (C) 2012-2019 Sean Davis <bluesabre at xfce.org></property>
<property name="artists">Nancy Runge <nancy at twotoasts.de></property>
<property name="logo_icon_name">catfish</property>
<property name="license_type">gpl-2-0</property>
- <child>
- <placeholder/>
+ <child type="titlebar">
+ <object class="GtkHeaderBar" id="hbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_close_button">True</property>
+ <property name="decoration_layout">:close</property>
+ </object>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
diff --git a/data/ui/CatfishPreferences.ui b/data/ui/CatfishPreferences.ui
index af6707d..5374d52 100644
--- a/data/ui/CatfishPreferences.ui
+++ b/data/ui/CatfishPreferences.ui
@@ -17,8 +17,17 @@
<property name="icon_name">catfish</property>
<property name="type_hint">dialog</property>
<child type="titlebar">
- <placeholder/>
+ <object class="GtkHeaderBar" id="hbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Catfish Preferences</property>
+ <property name="show_close_button">True</property>
+ <property name="decoration_layout">:close</property>
+ </object>
</child>
+ <action-widgets>
+ <action-widget response="-7">button1</action-widget>
+ </action-widgets>
<child internal-child="vbox">
<object class="GtkBox" id="catfish_prefs_layout">
<property name="can_focus">False</property>
diff --git a/data/ui/CatfishWindow.ui b/data/ui/CatfishWindow.ui
index 93d0faa..456b71e 100644
--- a/data/ui/CatfishWindow.ui
+++ b/data/ui/CatfishWindow.ui
@@ -1008,6 +1008,258 @@
</object>
</child>
</object>
+ <object class="GtkDialog" id="update_dialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="icon_name">catfish</property>
+ <property name="type_hint">dialog</property>
+ <property name="transient_for">Catfish</property>
+ <signal name="delete-event" handler="on_update_index_dialog_close" swapped="no"/>
+ <child type="titlebar">
+ <object class="GtkHeaderBar" id="hbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Update Search Database</property>
+ <property name="show_close_button">True</property>
+ <property name="decoration_layout">:close</property>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">update_close</action-widget>
+ <action-widget response="0">update_unlock</action-widget>
+ </action-widgets>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog_vbox3">
+ <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_area3">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="update_close">
+ <property name="label" translatable="yes">Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_update_index_dialog_close" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="update_unlock">
+ <property name="label" translatable="yes">Unlock</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="is_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_update_index_unlock_clicked" swapped="no"/>
+ </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="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkImage" id="update_dialog_icon">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">48</property>
+ <property name="icon_name">dialog-password</property>
+ <property name="use_fallback">True</property>
+ <property name="icon_size">6</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_database_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">24</property>
+ <property name="label" translatable="yes"><b>Database:</b></property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_modified_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Updated:</b></property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_primary_text">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><big><b>Update Search Database</b></big></property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_secondary_text">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">6</property>
+ <property name="label" translatable="yes">For faster search results, the search database needs to be refreshed.
+This action requires administrative rights.</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_database_details_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">24</property>
+ <property name="label"><tt>/var/lib/mlocate/mlocate.db</tt></property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_modified_details_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkInfoBar" id="update_dialog_infobar">
+ <property name="app_paintable">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="infobar-action_area2">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="content_area">
+ <object class="GtkBox" id="infobar-content_area2">
+ <property name="can_focus">False</property>
+ <property name="spacing">16</property>
+ <child>
+ <object class="GtkImage" id="update_dialog_infobar_icon">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">dialog-information</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="update_dialog_infobar_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">label</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">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">update_close</action-widget>
+ <action-widget response="0">update_unlock</action-widget>
+ </action-widgets>
+ </object>
<object class="GtkFileChooserButton" id="toolbar_folderchooser">
<property name="height_request">32</property>
<property name="visible">True</property>
@@ -1387,255 +1639,4 @@
<widget name="listboxrow8"/>
</widgets>
</object>
- <object class="GtkImage" id="update_unlock_icon">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixel_size">22</property>
- <property name="icon_name">dialog-password</property>
- <property name="use_fallback">True</property>
- </object>
- <object class="GtkDialog" id="update_dialog">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Update Search Database</property>
- <property name="resizable">False</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="destroy_with_parent">True</property>
- <property name="icon_name">catfish</property>
- <property name="type_hint">dialog</property>
- <property name="transient_for">Catfish</property>
- <signal name="delete-event" handler="on_update_index_dialog_close" swapped="no"/>
- <child>
- <placeholder/>
- </child>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog_vbox3">
- <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_area3">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="update_close">
- <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_stock">True</property>
- <signal name="clicked" handler="on_update_index_dialog_close" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="update_unlock">
- <property name="label" translatable="yes">Unlock</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="is_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="image">update_unlock_icon</property>
- <signal name="clicked" handler="on_update_index_unlock_clicked" swapped="no"/>
- </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="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">5</property>
- <property name="margin_right">5</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkImage" id="update_dialog_icon">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">dialog-password</property>
- <property name="use_fallback">True</property>
- <property name="icon_size">6</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="height">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_database_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">24</property>
- <property name="label" translatable="yes"><b>Database:</b></property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_modified_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>Updated:</b></property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_primary_text">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><big><b>Update Search Database</b></big></property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_secondary_text">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">6</property>
- <property name="label" translatable="yes">For faster search results, the search database needs to be refreshed.
-This action requires administrative rights.</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_database_details_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">24</property>
- <property name="label"><tt>/var/lib/mlocate/mlocate.db</tt></property>
- <property name="use_markup">True</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_modified_details_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkInfoBar" id="update_dialog_infobar">
- <property name="app_paintable">True</property>
- <property name="can_focus">False</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="infobar-action_area2">
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="layout_style">end</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child internal-child="content_area">
- <object class="GtkBox" id="infobar-content_area2">
- <property name="can_focus">False</property>
- <property name="spacing">16</property>
- <child>
- <object class="GtkImage" id="update_dialog_infobar_icon">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">dialog-information</property>
- <property name="use_fallback">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="update_dialog_infobar_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">label</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">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">update_close</action-widget>
- <action-widget response="0">update_unlock</action-widget>
- </action-widgets>
- </object>
</interface>
diff --git a/po/catfish.pot b/po/catfish.pot
index f765711..49fa8b7 100644
--- a/po/catfish.pot
+++ b/po/catfish.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-12-27 06:14-0500\n"
+"POT-Creation-Date: 2019-12-27 06:51-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -222,73 +222,80 @@ msgid "Results will be displayed as soon as they are found."
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:30
-msgid "Select a Directory"
+msgid "Update Search Database"
msgstr ""
-#: ../data/ui/CatfishWindow.ui.h:31
-msgid "Search for files"
+#. Restore Cancel button
+#. Buttons
+#: ../data/ui/CatfishWindow.ui.h:31 ../catfish/CatfishWindow.py:684
+#: ../catfish_lib/SudoDialog.py:196
+msgid "Cancel"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:32
-msgid "Compact List"
+msgid "Unlock"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:33
-msgid "Thumbnails"
+msgid "<b>Database:</b>"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:34
-msgid "Show _sidebar"
+msgid "<b>Updated:</b>"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:35
-msgid "Show _hidden files"
+msgid "<big><b>Update Search Database</b></big>"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:36
-msgid "Search file _contents"
-msgstr ""
-
-#: ../data/ui/CatfishWindow.ui.h:37
-msgid "_Match results exactly"
+msgid ""
+"For faster search results, the search database needs to be refreshed.\n"
+"This action requires administrative rights."
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:38
-msgid "_Refresh search index..."
+msgid "Select a Directory"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:39
-msgid "_Preferences"
+msgid "Search for files"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:40
-msgid "_About"
+msgid "Compact List"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:41
-msgid "Update Search Database"
+msgid "Thumbnails"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:42
-msgid "Unlock"
+msgid "Show _sidebar"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:43
-msgid "<b>Database:</b>"
+msgid "Show _hidden files"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:44
-msgid "<b>Updated:</b>"
+msgid "Search file _contents"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:45
-msgid "<big><b>Update Search Database</b></big>"
+msgid "_Match results exactly"
msgstr ""
#: ../data/ui/CatfishWindow.ui.h:46
-msgid ""
-"For faster search results, the search database needs to be refreshed.\n"
-"This action requires administrative rights."
+msgid "_Refresh search index..."
+msgstr ""
+
+#: ../data/ui/CatfishWindow.ui.h:47
+msgid "_Preferences"
+msgstr ""
+
+#: ../data/ui/CatfishWindow.ui.h:48
+msgid "_About"
msgstr ""
#: ../catfish/__init__.py:38
@@ -510,11 +517,6 @@ msgstr ""
msgid "Password:"
msgstr ""
-#. Buttons
-#: ../catfish_lib/SudoDialog.py:196
-msgid "Cancel"
-msgstr ""
-
#: ../catfish_lib/SudoDialog.py:199
msgid "OK"
msgstr ""
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list