Exemple #1
0
def cmd_browse(args):
    from cola.widgets.browse import worktree_browser

    #context = cola.app.application_init(args)
    global context
    context = new_context(args)
    #view = worktree_browser(context, show=False, update=False, settings=args.settings)
    view = worktree_browser(context, show=False, update=False)
    #return cola.app.application_run(context, view)
    cola.app.initialize_view(context, view)
    cola.app.default_start(context, view)

    def open_repo(context):
        cola.guicmds.open_repo(context)

    view.open_repo_action = add_action(
        view, N_('Open...'), partial(cola.guicmds.open_repo, context))
    #	view, N_('Open...'), partial(open_repo, context))
    view.open_repo_action.triggered.connect(view.tree.action_refresh.trigger)
    actions.append(view.open_repo_action)
    #view.tree.update_actions()
    view.tree.action_refresh.trigger()
    #view.tree.model().refresh()
    view.refresh()
    #view.open_repo_action.trigger()
    #context.app.start()
    return view
Exemple #2
0
def cmd_browse(args):
    context = application_init(args)
    from cola.widgets.browse import worktree_browser
    view = worktree_browser(update=False, settings=args.settings)
    return application_start(context, view)
Exemple #3
0
def cmd_browse(args):
    context = application_init(args)
    from cola.widgets.browse import worktree_browser
    view = worktree_browser(update=False, settings=args.settings)
    return application_start(context, view)