/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/frontend/gtk/__init__.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-07-21 18:18:20 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060721181820-450b5e29bb2614d9
2006-07-21  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/olive.glade: some UI refreshment (push, remove and commit dialog)
    * olive/frontend/gtk/push.py: implemented 'push' functionality
    * olive/frontend/gtk/commit.py: implemented 'commit' functionality
    * olive/frontend/gtk/remove.py: implemented 'remove' functionality
    * olive/frontend/gtk/add.py: implemented 'add' functionality
    * olive/frontend/gtk/handler.py: implemented 'init' functionality
    * olive/backend/fileops.py: added recursive mode to add(), added
      NotBranchError exception to add() and remove()

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
class OliveGtk:
38
38
    """ The main Olive GTK frontend class. This is called when launching the
39
 
    program."""
 
39
    program. """
40
40
    
41
41
    def __init__(self):
42
42
        # Load the glade file
57
57
        dic = { "on_window_main_destroy": gtk.main_quit,
58
58
                "on_quit_activate": gtk.main_quit,
59
59
                "on_about_activate": handler.on_about_activate,
 
60
                "on_menuitem_add_files_activate": handler.on_menuitem_add_files_activate,
 
61
                "on_menuitem_remove_file_activate": handler.on_menuitem_remove_file_activate,
60
62
                "on_menuitem_file_make_directory_activate": handler.not_implemented,
 
63
                "on_menuitem_branch_initialize_activate": handler.on_menuitem_branch_initialize_activate,
61
64
                "on_menuitem_branch_branch_activate": handler.on_menuitem_branch_branch_activate,
62
 
                "on_menuitem_branch_commit_activate": handler.not_implemented,
 
65
                "on_menuitem_branch_commit_activate": handler.on_menuitem_branch_commit_activate,
 
66
                "on_menuitem_branch_push_activate": handler.on_menuitem_branch_push_activate,
 
67
                "on_toolbutton_update_clicked": handler.not_implemented,
 
68
                "on_toolbutton_commit_clicked": handler.on_menuitem_branch_commit_activate,
 
69
                "on_toolbutton_pull_clicked": handler.not_implemented,
 
70
                "on_toolbutton_push_clicked": handler.on_menuitem_branch_push_activate,
63
71
                "on_treeview_right_row_activated": handler.on_treeview_right_row_activated }
64
72
        
65
73
        # Connect the signals to the handlers
144
152
    def get_path(self):
145
153
        """ Get the current path. """
146
154
        return self._path
 
155
    
 
156
    def get_selected_right(self):
 
157
        """ Get the selected filename. """
 
158
        treeselection = self.treeview_right.get_selection()
 
159
        (model, iter) = treeselection.get_selected()
 
160
        
 
161
        if iter is None:
 
162
            return None
 
163
        else:
 
164
            return model.get_value(iter, 1)
147
165
 
148
166
    def set_statusbar(self, message):
149
167
        """ Set the statusbar message. """