~osomon/phatch/extract-all-metadata

« back to all changes in this revision

Viewing changes to phatch/pyWx/gui.py

  • Committer: spe.stani.be at gmail
  • Date: 2009-06-15 02:40:12 UTC
  • Revision ID: spe.stani.be@gmail.com-20090615024012-xekqmq40jlbt3m5y
change file structure

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
wx = ensure('2.8','2.6')
37
37
 
38
38
#force wxpython2.6 for testing
39
 
##import wxversion
40
 
##wxversion.select('2.6')
41
 
##import wx
 
39
#import wxversion
 
40
#wxversion.select('2.6')
 
41
#import wx
42
42
 
43
43
#check with other encoding
44
44
##wx.SetDefaultPyEncoding('ISO8859-15')
285
285
            item = library.Append(id,label)
286
286
            self.library_files[id] = actionlist[1]
287
287
            self.Bind(wx.EVT_MENU, self.on_menu_file_library, item)
288
 
        self.menu_file.InsertMenu(3,wx.ID_EDIT, _("Open &Library"),library,"")
 
288
        #wx2.6 compatible
 
289
        wx_ID_EDIT = 5030
 
290
        self.menu_file.InsertMenu(3,wx_ID_EDIT, _("Open &Library"),library,"")
289
291
        #shell
290
292
        self.shell = None
291
293
        #menu_item (for enabling/disabling)
850
852
    
851
853
    def get_action_list_files(self):
852
854
        global_library  = glob.glob(os.path.join(
853
 
            self.settings["PHATCH_ACTIONLISTS_PATH"],'*'+ct.EXTENSION))
 
855
            self.settings['PHATCH_ACTIONLISTS_PATH'],'*'+ct.EXTENSION))
854
856
        local_library   = glob.glob(os.path.join(
855
857
            ct.USER_ACTIONLISTS_PATH,'*'+ct.EXTENSION))
856
858
        return global_library+local_library
891
893
            cli[key] = settings[key]
892
894
        if os.path.exists(ct.USER_SETTINGS_PATH):
893
895
            f               = open(ct.USER_SETTINGS_PATH,'rb')
894
 
            self.settings.update(cPickle.load(f))
 
896
            #exclude paths as they should not be overwritten
 
897
            for key,value in cPickle.load(f).items():
 
898
                #FIXME: paths should not be in settings
 
899
                if not 'PATH' in key:
 
900
                    self.settings[key] = value
895
901
            f.close()
896
902
        self.settings.update(cli)
897
903