conduit r1300 - in trunk: . conduit conduit/gtkui conduit/modules/FileModule



Author: jstowers
Date: Tue Feb 12 10:26:58 2008
New Revision: 1300
URL: http://svn.gnome.org/viewvc/conduit?rev=1300&view=rev

Log:
2008-02-12  John Stowers  <john stowers gmail com>

	* conduit/Settings.py:
	* conduit/gtkui/UI.py: Make the rgba colormap a gconf option until I can
	work out why it corrupts screen rendering on my system
	
	* conduit/modules/FileModule/FileConfiguration.py: Finally save and restore
	the selected folder correctly. Fixes bug #510523



Modified:
   trunk/ChangeLog
   trunk/conduit/Settings.py
   trunk/conduit/gtkui/UI.py
   trunk/conduit/modules/FileModule/FileConfiguration.py

Modified: trunk/conduit/Settings.py
==============================================================================
--- trunk/conduit/Settings.py	(original)
+++ trunk/conduit/Settings.py	Tue Feb 12 10:26:58 2008
@@ -91,6 +91,7 @@
         'gui_minimize_to_tray'      :   False,          #Behaviour when one minimizes the main window, should it iconify?
         'gui_initial_canvas_height' :   450,            #Reduce to ~300 for eepc, etc
         'gui_initial_canvas_width'  :   450,            #Reduce for eepc, etc
+        'gui_use_rgba_colormap'     :   False,          #Seems to corrupt gtkmozembed on some systems
         'web_login_browser'         :   "gtkmozembed"   #When loggin into websites use: "system","gtkmozembed","webkit","gtkhtml"
     }
     CONDUIT_GCONF_DIR = "/apps/conduit/"

Modified: trunk/conduit/gtkui/UI.py
==============================================================================
--- trunk/conduit/gtkui/UI.py	(original)
+++ trunk/conduit/gtkui/UI.py	Tue Feb 12 10:26:58 2008
@@ -89,12 +89,12 @@
         #Initialize the mainWindow
         self.mainWindow = self.widgets.get_widget("MainWindow")
         #Enable RGBA colormap
-        #screen = self.mainWindow.get_screen()
-        #colormap = screen.get_rgba_colormap()
-        #if colormap == None:
-        #    colormap = screen.get_rgb_colormap()
-        #gtk.widget_set_default_colormap(colormap)       
-        
+        if conduit.GLOBALS.settings.get("gui_use_rgba_colormap") == True:
+            screen = self.mainWindow.get_screen()
+            colormap = screen.get_rgba_colormap()
+            if colormap == None:
+                colormap = screen.get_rgb_colormap()
+            gtk.widget_set_default_colormap(colormap)       
         self.mainWindow.set_position(gtk.WIN_POS_CENTER)
         self.mainWindow.set_icon_name("conduit")
         title = "%s" % conduit.APPNAME

Modified: trunk/conduit/modules/FileModule/FileConfiguration.py
==============================================================================
--- trunk/conduit/modules/FileModule/FileConfiguration.py	(original)
+++ trunk/conduit/modules/FileModule/FileConfiguration.py	Tue Feb 12 10:26:58 2008
@@ -301,6 +301,7 @@
 
 class _FolderTwoWayConfigurator:
     def __init__(self, mainWindow, folder, folderGroupName, includeHidden, compareIgnoreMtime):
+        log.debug("Starting new folder chooser at %s" % folder)
         self.folder = folder
         self.includeHidden = includeHidden
         self.folderGroupName = folderGroupName
@@ -341,9 +342,16 @@
                 dialog.emit_stop_by_name("response")
             else:
                 self.folderGroupName = self.folderEntry.get_text()
-                self.folder = Vfs.uri_make_canonical(
-                                    self.folderChooser.get_current_folder_uri()
-                                    )
+                #I think the logic here is ugly, and rather non-symmetric.
+                #Basically get_uri returns the selected folder uri, OR the current
+                #(read: same as get_folder_uri) uri if none is selected. 
+                #The non symmetric part is that when we pre-load the filechooser
+                #at time+1, we call set_current_folder_uri() #because the set_uri()
+                #call doesnt make sense in a folderchooser where you want 
+                #to be *inside* the selected folder and not one below it.
+                selected = self.folderChooser.get_uri()
+                self.folder = Vfs.uri_make_canonical(selected)
+                log.debug("Folderconfig returned %s (non-canonical: %s)" % (self.folder,selected))
                 self.includeHidden = self.hiddenCb.get_active()
                 self.compareIgnoreMtime = self.mtimeCb.get_active()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]