Пример #1
0
 def on_load_finish(self, view, webframe):
     self.load_finish_flag = True;
     agent.webv = self
     # overlay extra variables of web part
     variables = {
           'platform': 'Linux'
         , 'conf_dir': config.CONF_DIR
         , 'cache_dir': config.CACHE_DIR
         , 'avatar_cache_dir': config.AVATAR_CACHE_DIR
         , 'extra_fonts': utils.get_extra_fonts()
         , 'extra_exts': utils.get_extra_exts()
         , 'extra_themes': utils.get_extra_themes()
         , 'locale': utils.get_locale()
     };
     # and then, notify web part i am ready to work :)
     gobject.idle_add(view.execute_script, '''
         overlay_variables(%s);
         globals.load_flags = 1;
         ''' % json.dumps(variables))
Пример #2
0
 def on_load_finish(self, view, webframe):
     if self.load_finish_flag:
         return
     self.load_finish_flag = True;
     agent.webv = self
     # overlay extra variables of web part
     variables = {
           'platform': platform.system()
         , 'wrapper': 'python-gtk3'
         , 'conf_dir': config.get_path("conf")
         , 'cache_dir': config.get_path("cache")
         , 'avatar_cache_dir': config.get_path("avatar")
         , 'extra_fonts': utils.get_extra_fonts()
         , 'extra_exts': utils.get_extra_exts()
         , 'extra_themes': utils.get_extra_themes()
         , 'locale': utils.get_locale()
     };
     # and then, notify web part i am ready to work :)
     GObject.idle_add(view.execute_script, '''
         overlay_variables(%s);
         globals.load_flags = 1;
         ''' % json.dumps(variables))
Пример #3
0
 def on_load_finish(self, view, webframe):
     if self.load_finish_flag:
         return
     self.load_finish_flag = True;
     agent.webv = self
     # overlay extra variables of web part
     variables = {
           'platform': platform.system()
         , 'wrapper': 'python-gtk2'
         , 'conf_dir': config.CONF_DIR
         , 'cache_dir': config.CACHE_DIR
         , 'avatar_cache_dir': config.AVATAR_CACHE_DIR
         , 'extra_fonts': utils.get_extra_fonts()
         , 'extra_exts': utils.get_extra_exts()
         , 'extra_themes': utils.get_extra_themes()
         , 'locale': utils.get_locale()
     };
     # and then, notify web part i am ready to work :)
     gobject.idle_add(view.execute_script, '''
         overlay_variables(%s);
         globals.load_flags = 1;
         ''' % json.dumps(variables))