[Thunar-workers] CVS: design/ui ChangeLog, 1.11, 1.12 ThunarBookmarksPane.py, 1.2, 1.3 ThunarFileInfo.py, 1.1, 1.2 ThunarPropertiesDialog.py, 1.6, 1.7

Benedikt Meurer benny at xfce.org
Thu Mar 3 23:35:11 CET 2005


Update of /var/cvs/thunar/design/ui
In directory espresso.foo-projects.org:/tmp/cvs-serv27950

Modified Files:
	ChangeLog ThunarBookmarksPane.py ThunarFileInfo.py 
	ThunarPropertiesDialog.py 
Log Message:
2005-03-03	Benedikt Meurer <benny at xfce.org>

	* ThunarBookmarksPane.py: Increase the icon size to 32.
	* ThunarFileInfo.py, ThunarPropertiesDialog.py: Connect most of the
	  Permission tab controls. Simplify the properties dialog a bit.




Index: ChangeLog
===================================================================
RCS file: /var/cvs/thunar/design/ui/ChangeLog,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ChangeLog	3 Mar 2005 19:11:22 -0000	1.11
+++ ChangeLog	3 Mar 2005 22:35:09 -0000	1.12
@@ -1,5 +1,11 @@
 2005-03-03	Benedikt Meurer <benny at xfce.org>
 
+	* ThunarBookmarksPane.py: Increase the icon size to 32.
+	* ThunarFileInfo.py, ThunarPropertiesDialog.py: Connect most of the
+	  Permission tab controls. Simplify the properties dialog a bit.
+
+2005-03-03	Benedikt Meurer <benny at xfce.org>
+
 	* ThunarWindow.py: Remove the frames around the toolbar and the menubar.
 	  We'll need to fix the Xfce theme instead.
 	* ThunarListView.py: Use ellipsized cell renderer if available. Get

Index: ThunarBookmarksPane.py
===================================================================
RCS file: /var/cvs/thunar/design/ui/ThunarBookmarksPane.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ThunarBookmarksPane.py	3 Mar 2005 00:25:18 -0000	1.2
+++ ThunarBookmarksPane.py	3 Mar 2005 22:35:09 -0000	1.3
@@ -38,7 +38,7 @@
     COLUMN_ICON = 1
     COLUMN_INFO = 2
 
-    ICON_SIZE = 22
+    ICON_SIZE = 32
 
 
     def __init__(self):

Index: ThunarFileInfo.py
===================================================================
RCS file: /var/cvs/thunar/design/ui/ThunarFileInfo.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ThunarFileInfo.py	27 Feb 2005 18:13:49 -0000	1.1
+++ ThunarFileInfo.py	3 Mar 2005 22:35:09 -0000	1.2
@@ -100,15 +100,34 @@
             return '-'
         return _humanize_size(self.stat[stat.ST_SIZE])
 
+    def get_full_size(self):
+        result = ''
+        size = self.stat[stat.ST_SIZE]
+        while size > 0:
+            if result != '':
+                result = ',' + result
+            if size > 1000:
+                result = '%03d%s' % ((size % 1000), result)
+            else:
+                result = '%d%s' % ((size % 1000), result)
+            size = size / 1000
+        return '%s (%s Bytes)' % (_humanize_size(self.stat[stat.ST_SIZE]), result)
+
     def get_atime(self):
         return time.strftime('%x %X', time.localtime(self.stat[stat.ST_ATIME]))
 
+    def get_ctime(self):
+        return time.strftime('%x %X', time.localtime(self.stat[stat.ST_CTIME]))
+
     def get_mtime(self):
         return time.strftime('%x %X', time.localtime(self.stat[stat.ST_MTIME]))
 
     def is_directory(self):
         return stat.S_ISDIR(self.stat[stat.ST_MODE])
 
+    def get_permissions_mode(self):
+        return self.stat[stat.ST_MODE]
+
     def get_permissions(self):
         from stat import S_ISDIR, S_IMODE
         mode = self.stat[stat.ST_MODE]

Index: ThunarPropertiesDialog.py
===================================================================
RCS file: /var/cvs/thunar/design/ui/ThunarPropertiesDialog.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ThunarPropertiesDialog.py	3 Mar 2005 19:11:22 -0000	1.6
+++ ThunarPropertiesDialog.py	3 Mar 2005 22:35:09 -0000	1.7
@@ -147,49 +147,27 @@
         align.show()
         row += 1 ### }
 
-        ### {
-        label = gtk.Label('<b>Location:</b>')
-        label.set_use_markup(True)
-        label.set_alignment(1.0, 0.5)
-        table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL)
-        label.show()
-
-        if exo_supported:
-            label = exo.EllipsizedLabel(info.get_parent().get_path())
-            label.set_ellipsize(exo.PANGO_ELLIPSIZE_START)
-        else:
-            label = gtk.Label(info.get_parent().get_path())
-            try:
-                label.set_ellipsize(pango.ELLIPSIZE_START)
-            except:
-                pass
-        label.set_alignment(0.0, 0.5)
-        label.set_selectable(True)
-        table.attach(label, 1, 2, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
-        label.show()
-        row += 1 ### }
-
-        if not info.is_directory():
-            ### {
-            label = gtk.Label('<b>Size:</b>')
-            label.set_use_markup(True)
-            label.set_alignment(1.0, 0.5)
-            table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL)
-            label.show()
-
-            label = gtk.Label(info.get_size())
-            label.set_alignment(0.0, 0.5)
-            label.set_selectable(True)
-            table.attach(label, 1, 2, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
-            label.show()
-            row += 1 ### }
-
-        ### {
-        align = gtk.Alignment(1.0, 1.0, 1.0, 1.0)
-        align.set_size_request(-1, 12)
-        table.attach(align, 0, 1, row, row + 1, 0, 0)
-        align.show()
-        row += 1 ### }
+#        ### {
+#        label = gtk.Label('<b>Location:</b>')
+#        label.set_use_markup(True)
+#        label.set_alignment(1.0, 0.5)
+#        table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL)
+#        label.show()
+#
+#        if exo_supported:
+#            label = exo.EllipsizedLabel(info.get_parent().get_path())
+#            label.set_ellipsize(exo.PANGO_ELLIPSIZE_START)
+#        else:
+#            label = gtk.Label(info.get_parent().get_path())
+#            try:
+#                label.set_ellipsize(pango.ELLIPSIZE_START)
+#            except:
+#                pass
+#        label.set_alignment(0.0, 0.5)
+#        label.set_selectable(True)
+#        table.attach(label, 1, 2, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
+#        label.show()
+#        row += 1 ### }
 
         ### {
         label = gtk.Label('<b>Modified:</b>')
@@ -219,6 +197,35 @@
         label.show()
         row += 1 ### }
 
+        ### {
+        align = gtk.Alignment(1.0, 1.0, 1.0, 1.0)
+        align.set_size_request(-1, 12)
+        table.attach(align, 0, 1, row, row + 1, 0, 0)
+        align.show()
+        row += 1 ### }
+
+        if not info.is_directory():
+            ### {
+            label = gtk.Label('<b>Size:</b>')
+            label.set_use_markup(True)
+            label.set_alignment(1.0, 0.5)
+            table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL)
+            label.show()
+
+            label = gtk.Label(info.get_full_size())
+            label.set_alignment(0.0, 0.5)
+            label.set_selectable(True)
+            table.attach(label, 1, 2, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
+            label.show()
+            row += 1 ### }
+
+            ### {
+            align = gtk.Alignment(1.0, 1.0, 1.0, 1.0)
+            align.set_size_request(-1, 12)
+            table.attach(align, 0, 1, row, row + 1, 0, 0)
+            align.show()
+            row += 1 ### }
+
 
 
         ###
@@ -270,11 +277,18 @@
         row += 1 ### }
 
         ### {
-        sep = gtk.HSeparator()
-        table.attach(sep, 0, 4, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
-        sep.show()
+        align = gtk.Alignment(1.0, 1.0, 1.0, 1.0)
+        align.set_size_request(-1, 12)
+        table.attach(align, 0, 4, row, row + 1, 0, 0)
+        align.show()
         row += 1 ### }
 
+#        ### {
+#        sep = gtk.HSeparator()
+#        table.attach(sep, 0, 4, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
+#        sep.show()
+#        row += 1 ### }
+
         ### {
         label = gtk.Label('<b>Owner:</b>')
         label.set_use_markup(True)
@@ -283,14 +297,17 @@
         label.show()
 
         button = gtk.CheckButton('Read')
+        button.set_active(info.get_permissions_mode() & 0400)
         table.attach(button, 1, 2, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
 
         button = gtk.CheckButton('Write')
+        button.set_active(info.get_permissions_mode() & 0200)
         table.attach(button, 2, 3, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
 
         button = gtk.CheckButton('Execute')
+        button.set_active(info.get_permissions_mode() & 0100)
         table.attach(button, 3, 4, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
         row += 1 ### }
@@ -303,14 +320,17 @@
         label.show()
 
         button = gtk.CheckButton('Read')
+        button.set_active(info.get_permissions_mode() & 0040)
         table.attach(button, 1, 2, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
 
         button = gtk.CheckButton('Write')
+        button.set_active(info.get_permissions_mode() & 0020)
         table.attach(button, 2, 3, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
 
         button = gtk.CheckButton('Execute')
+        button.set_active(info.get_permissions_mode() & 0010)
         table.attach(button, 3, 4, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
         row += 1 ### }
@@ -323,23 +343,33 @@
         label.show()
 
         button = gtk.CheckButton('Read')
+        button.set_active(info.get_permissions_mode() & 0004)
         table.attach(button, 1, 2, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
 
         button = gtk.CheckButton('Write')
+        button.set_active(info.get_permissions_mode() & 0002)
         table.attach(button, 2, 3, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
 
         button = gtk.CheckButton('Execute')
+        button.set_active(info.get_permissions_mode() & 0001)
         table.attach(button, 3, 4, row, row + 1, gtk.FILL, gtk.FILL)
         button.show()
         row += 1 ### }
 
         ### {
-        sep = gtk.HSeparator()
-        table.attach(sep, 0, 4, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
-        sep.show()
+        align = gtk.Alignment(1.0, 1.0, 1.0, 1.0)
+        align.set_size_request(-1, 12)
+        table.attach(align, 0, 4, row, row + 1, 0, 0)
+        align.show()
         row += 1 ### }
+
+#        ### {
+#        sep = gtk.HSeparator()
+#        table.attach(sep, 0, 4, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
+#        sep.show()
+#        row += 1 ### }
      
 #        ### {
 #        label = gtk.Label('<b>Special flags:</b>')
@@ -391,7 +421,7 @@
         table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL)
         label.show()
 
-        label = gtk.Label('0644')
+        label = gtk.Label('%04o' % (info.get_permissions_mode() & 0777))
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 4, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
         label.show()
@@ -404,8 +434,17 @@
         table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL)
         label.show()
 
-        label = gtk.Label('2005-02-15 17:55')
+        label = gtk.Label(info.get_ctime())
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 4, row, row + 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
         label.show()
         row += 1 ### }
+
+        ### {
+        align = gtk.Alignment(1.0, 1.0, 1.0, 1.0)
+        align.set_size_request(-1, 12)
+        table.attach(align, 0, 4, row, row + 1, 0, 0)
+        align.show()
+        row += 1 ### }
+
+




More information about the Thunar-workers mailing list