Beispiel #1
0
def create_toplevel(name, screen=None, orient='bottom'):
    client = gconf.client_get_default()
    engine = gconf.engine_get_default()
    dir = PANEL_CONFIG_DIR + '/toplevels/' + name
    _associate_schemas_in_dir(dir, PANEL_SCHEMAS_DIR + '/toplevels', client, engine) 

    client.set_int(dir+'/screen', screen and screen.get_number() or 0)
    client.set_string(dir+'/orientation', orient)
 def remove_keys (self, model, iter):
         engine = gconf.engine_get_default ()
         uid = model.get_value (iter, 3)
         key = "/apps/avant-window-navigator/applets/%s" % uid
         try:
                 engine.remove_dir (key)
         except:
                 pass                        
Beispiel #3
0
def add_applet(panel, name, iid, pos, right=False):
    client = gconf.client_get_default()
    engine = gconf.engine_get_default()

    dir = PANEL_CONFIG_DIR + '/applets/' + name

    _associate_schemas_in_dir(dir, PANEL_SCHEMAS_DIR + '/objects', client, engine) 
    client.set_string(dir + '/object_type', 'bonobo-applet')
    client.set_string(dir + '/toplevel_id', panel)
    client.set_int(dir + '/position', pos)
    client.set_bool(dir + '/panel_right_stick', not not right)

    client.set_string(dir + '/bonobo_iid', 'OAFIID:' + iid)
    
    _add_to_id_list('applet_id_list', name)