Index: PreferenceWindow.py =================================================================== --- PreferenceWindow.py (Revision 959) +++ PreferenceWindow.py (Arbeitskopie) @@ -228,14 +228,16 @@ formatsFrameAlig.set_padding( 24, 24, 24, 24 ) formatsFrameAlig.add( formatsFrame ) - self.logEntry = gtk.Entry() #TODO: add something to browse paths - self.logEntry.set_text( self.config.getLogPath() ) + self.chooser = gtk.FileChooserDialog(title='Select a Directory',action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) + logLabel = gtk.Label( _( '_Log path:' ) ) logLabel.set_use_underline( True ) - logLabel.set_mnemonic_widget( self.logEntry ) + logLabel.set_mnemonic_widget( self.chooser ) + dirchooserbutton = gtk.FileChooserButton(self.chooser) + dirchooserbutton.set_current_folder( self.config.getLogPath() ) pathHbox = gtk.HBox() pathHbox.pack_start(logLabel, True, True, 0) - pathHbox.pack_start(self.logEntry, True, True, 0) + pathHbox.pack_start(dirchooserbutton, True, True, 0) self.pack_start(self.saveLogs, False, False) self.pack_start(formatsFrameAlig, False, False) @@ -249,9 +251,8 @@ self.config.user['saveLogsAutomatically'] = self.saveLogs.get_active() self.config.user['logFormats'] = formats - self.config.user['logPath'] = self.logEntry.get_text() + self.config.user['logPath'] = self.chooser.get_current_folder() - class ConnectionTab( gtk.VBox ): '''This class represent the tab that contains the connection options'''