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()
commit()
Attempt to create a commit from the index and commit message.
copy_display()
diff_context_menu_event(event)
Create the context menu for the diff display.
diff_context_menu_setup()
Set up the context menu for the diff display.
diff_key_press_event(event)
Handle shortcut keys in the diff view.
diff_selection()
dragEnterEvent(event)
Accepts drops
dropEvent(event)
Apply dropped patches with git-am
export_state()
Exports data for save/restore
import_state(state)
Imports data for save/restore
mode
process_diff_selection(selected=False, staged=True, apply_to_worktree=False, reverse=False)
Implement un/staging of selected lines or hunks.
selected_line()
set_display(text)
Set the diff text display.
show_cursor_position()
Update the UI with the current row and column.
stage()
Stage selected files, or all files if no selection exists.
stage_hunk()
Stage a specific hunk.
stage_hunk_selection()
Stage selected lines.
undo_hunk()
Destructively remove a hunk from a worktree file.
undo_selection()
Destructively check out content for the selected file from $head.
unstage()
Unstage selected files, or all files if no selection exists.
unstage_hunk(cached=True)
Unstage a hunk.
unstage_hunk_selection()
Unstage selected lines.

Previous topic

cola.views.log – Log viewer

Next topic

cola.views.mainwindow – Main window base class

This Page