[Xfce4-commits] [apps/catfish] 01/01: Better handling of Wayland screen sizes
noreply at xfce.org
noreply at xfce.org
Wed Jan 1 19:02:41 CET 2020
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 9941667bfd3f549e2786577e43dcd9938c4a062b
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Jan 1 13:02:36 2020 -0500
Better handling of Wayland screen sizes
---
catfish/CatfishWindow.py | 27 ++++++++++--------
po/catfish.pot | 72 ++++++++++++++++++++++++------------------------
2 files changed, 52 insertions(+), 47 deletions(-)
diff --git a/catfish/CatfishWindow.py b/catfish/CatfishWindow.py
index 6a5335e..134f115 100644
--- a/catfish/CatfishWindow.py
+++ b/catfish/CatfishWindow.py
@@ -324,17 +324,22 @@ class CatfishWindow(Window):
(screen_width, screen_height) = self.get_screen_size()
(display_width, display_height) = self.get_display_size()
- if (window_height > screen_height or window_width > screen_width):
- window_width = min(display_width, 650)
- window_height = min(display_height, 470)
+ if (screen_width, screen_height) == (-1, -1) or \
+ (display_width, display_height) == (-1, -1):
+ # Failed detection, likely using Wayland, don't resize
+ pass
+ else:
+ if (window_height > screen_height or window_width > screen_width):
+ window_width = min(display_width, 650)
+ window_height = min(display_height, 470)
- paned.set_property('height_request', window_height)
- paned.set_property('width_request', window_width)
+ paned.set_property('height_request', window_height)
+ paned.set_property('width_request', window_width)
- if (window_x >= 0 and window_y >= 0):
- if (window_x + window_width <= screen_width) and \
- (window_y + window_height <= screen_height):
- self.move(window_x, window_y)
+ if (window_x >= 0 and window_y >= 0):
+ if (window_x + window_width <= screen_width) and \
+ (window_y + window_height <= screen_height):
+ self.move(window_x, window_y)
self.refresh_search_entry()
@@ -391,13 +396,13 @@ class CatfishWindow(Window):
def get_screen_size(self):
s = Gdk.Screen.get_default()
if s is None:
- return (800, 600)
+ return (-1, -1)
return (s.get_width(), s.get_height())
def get_display_size(self):
d = Gdk.Display.get_default()
if d is None:
- return (800, 600)
+ return (-1, -1)
w = Gdk.get_default_root_window()
m = d.get_monitor_at_window(w)
diff --git a/po/catfish.pot b/po/catfish.pot
index 157d627..89ac648 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: 2020-01-01 12:41-0500\n"
+"POT-Creation-Date: 2020-01-01 13:01-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"
@@ -209,11 +209,11 @@ msgstr ""
msgid "File Type"
msgstr ""
-#: ../data/ui/CatfishWindow.ui.h:27 ../catfish/CatfishWindow.py:1316
+#: ../data/ui/CatfishWindow.ui.h:27 ../catfish/CatfishWindow.py:1321
msgid "Modified"
msgstr ""
-#: ../data/ui/CatfishWindow.ui.h:29 ../catfish/CatfishWindow.py:1761
+#: ../data/ui/CatfishWindow.ui.h:29 ../catfish/CatfishWindow.py:1766
msgid "Results will be displayed as soon as they are found."
msgstr ""
@@ -223,7 +223,7 @@ msgstr ""
#. Restore Cancel button
#. Buttons
-#: ../data/ui/CatfishWindow.ui.h:31 ../catfish/CatfishWindow.py:711
+#: ../data/ui/CatfishWindow.ui.h:31 ../catfish/CatfishWindow.py:716
#: ../catfish_lib/SudoDialog.py:193
msgid "Cancel"
msgstr ""
@@ -356,152 +356,152 @@ msgstr ""
msgid "Never"
msgstr ""
-#: ../catfish/CatfishWindow.py:369
+#: ../catfish/CatfishWindow.py:374
#, python-format
msgid ""
"Enter your query above to find your files\n"
"or click the %s icon for more options."
msgstr ""
-#: ../catfish/CatfishWindow.py:726
+#: ../catfish/CatfishWindow.py:731
msgid "An error occurred while updating the database."
msgstr ""
-#: ../catfish/CatfishWindow.py:728
+#: ../catfish/CatfishWindow.py:733
msgid "Authentication failed."
msgstr ""
-#: ../catfish/CatfishWindow.py:734
+#: ../catfish/CatfishWindow.py:739
msgid "Authentication cancelled."
msgstr ""
-#: ../catfish/CatfishWindow.py:740
+#: ../catfish/CatfishWindow.py:745
msgid "Search database updated successfully."
msgstr ""
#. Update the Cancel button to Close, make it default
-#: ../catfish/CatfishWindow.py:801
+#: ../catfish/CatfishWindow.py:806
msgid "Close"
msgstr ""
#. Set the dialog status to running.
-#: ../catfish/CatfishWindow.py:815
+#: ../catfish/CatfishWindow.py:820
msgid "Updating..."
msgstr ""
-#: ../catfish/CatfishWindow.py:849
+#: ../catfish/CatfishWindow.py:854
msgid "Stop Search"
msgstr ""
-#: ../catfish/CatfishWindow.py:850
+#: ../catfish/CatfishWindow.py:855
msgid ""
"Search is in progress...\n"
"Press the cancel button or the Escape key to stop."
msgstr ""
-#: ../catfish/CatfishWindow.py:859
+#: ../catfish/CatfishWindow.py:864
msgid "Begin Search"
msgstr ""
-#: ../catfish/CatfishWindow.py:1137
+#: ../catfish/CatfishWindow.py:1142
#, python-format
msgid "\"%s\" could not be opened."
msgstr ""
-#: ../catfish/CatfishWindow.py:1189
+#: ../catfish/CatfishWindow.py:1194
#, python-format
msgid "\"%s\" could not be saved."
msgstr ""
-#: ../catfish/CatfishWindow.py:1206
+#: ../catfish/CatfishWindow.py:1211
#, python-format
msgid "\"%s\" could not be deleted."
msgstr ""
-#: ../catfish/CatfishWindow.py:1245
+#: ../catfish/CatfishWindow.py:1250
#, python-format
msgid "Save \"%s\" as..."
msgstr ""
-#: ../catfish/CatfishWindow.py:1280
+#: ../catfish/CatfishWindow.py:1285
#, python-format
msgid ""
"Are you sure that you want to \n"
"permanently delete \"%s\"?"
msgstr ""
-#: ../catfish/CatfishWindow.py:1284
+#: ../catfish/CatfishWindow.py:1289
#, python-format
msgid ""
"Are you sure that you want to \n"
"permanently delete the %i selected files?"
msgstr ""
-#: ../catfish/CatfishWindow.py:1287
+#: ../catfish/CatfishWindow.py:1292
msgid "If you delete a file, it is permanently lost."
msgstr ""
-#: ../catfish/CatfishWindow.py:1310
+#: ../catfish/CatfishWindow.py:1315
msgid "Filename"
msgstr ""
-#: ../catfish/CatfishWindow.py:1312
+#: ../catfish/CatfishWindow.py:1317
msgid "Size"
msgstr ""
-#: ../catfish/CatfishWindow.py:1314
+#: ../catfish/CatfishWindow.py:1319
msgid "Location"
msgstr ""
-#: ../catfish/CatfishWindow.py:1326
+#: ../catfish/CatfishWindow.py:1331
msgid "Preview"
msgstr ""
-#: ../catfish/CatfishWindow.py:1334
+#: ../catfish/CatfishWindow.py:1339
msgid "Details"
msgstr ""
-#: ../catfish/CatfishWindow.py:1551
+#: ../catfish/CatfishWindow.py:1556
msgid "Today"
msgstr ""
-#: ../catfish/CatfishWindow.py:1553
+#: ../catfish/CatfishWindow.py:1558
msgid "Yesterday"
msgstr ""
-#: ../catfish/CatfishWindow.py:1634
+#: ../catfish/CatfishWindow.py:1639
msgid "No files found."
msgstr ""
-#: ../catfish/CatfishWindow.py:1636
+#: ../catfish/CatfishWindow.py:1641
msgid ""
"Try making your search less specific\n"
"or try another directory."
msgstr ""
-#: ../catfish/CatfishWindow.py:1643
+#: ../catfish/CatfishWindow.py:1648
msgid "1 file found."
msgstr ""
-#: ../catfish/CatfishWindow.py:1645
+#: ../catfish/CatfishWindow.py:1650
#, python-format
msgid "%i files found."
msgstr ""
-#: ../catfish/CatfishWindow.py:1651
+#: ../catfish/CatfishWindow.py:1656
msgid "bytes"
msgstr ""
-#: ../catfish/CatfishWindow.py:1759 ../catfish/CatfishWindow.py:1769
+#: ../catfish/CatfishWindow.py:1764 ../catfish/CatfishWindow.py:1774
msgid "Searching..."
msgstr ""
-#: ../catfish/CatfishWindow.py:1767
+#: ../catfish/CatfishWindow.py:1772
#, python-format
msgid "Searching for \"%s\""
msgstr ""
-#: ../catfish/CatfishWindow.py:1856
+#: ../catfish/CatfishWindow.py:1861
#, python-format
msgid "Search results for \"%s\""
msgstr ""
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list