cola.views.main – Main window
This view provides the main git-cola user interface.
-
class cola.views.main.MainView(parent=None)
The main cola interface.
-
action_copy()
-
action_cut()
-
action_delete()
-
copy_display()
-
diff_selection()
-
display(text)
-
display_log()
-
enter_diff_mode(text)
Enter diff mode; changes the ‘Staged’ header to ‘Changed’.
This also enables the ‘Exit <Mode> Mode’ button.
text is the message displayed on the button.
-
exit_diff_mode()
Exit diff mode; changes the ‘Changed’ header to ‘Staged’.
This also hides the ‘Exit Diff Mode’ button.
-
expand_status()
-
export_state()
- Exports data for save/restore
-
get_index_for_item(item)
- Given an item, returns the index of the item.
The indexes for unstaged items are grouped such that
the index of unmerged[1] = len(modified) + 1, etc.
-
get_modified(items)
-
get_modified_item(itemidx)
-
get_selection()
-
get_staged(items)
-
get_staged_item(itemidx)
-
get_unmerged(items)
-
get_unstaged(items)
-
get_unstaged_item(itemidx)
-
get_untracked(items)
-
import_state(state)
- Imports data for save/restore
-
reset_checkboxes()
-
reset_display()
-
selected_line()
-
set_modified(items)
- Adds items to the ‘Modified’ subtree.
-
set_staged(items, check=True)
- Adds items to the ‘Staged’ subtree.
-
set_unmerged(items)
- Adds items to the ‘Unmerged’ subtree.
-
set_untracked(items)
- Adds items to the ‘Untracked’ subtree.
-
setup_icons()
-
show_current_column()
-
show_diff()
-
show_editor()
-
tree_selection()
- Returns a list of (category, row) representing the tree selection.