/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-08-01 16:16:31 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-20060801161631-ca1ac79e3726e307
Visual feedback when Olive is busy; follow bzr API changes; commit dialog update

2006-08-01  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/frontend/gtk/push.py: now the number of pushed revisions gets
      displayed (Fixed: #54698)
    * olive/backend/info.py: added is_checkout()
    * olive/frontend/gtk/commit.py: local commit checkbox shows up only if the
      current directory is a checkout
    * olive/backend/fileops.py: upgraded to new API (compare_trees deprecated)
    * many files: the cursor changes to a watch when performing time consuming
      operations (Fixed: #54015)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    pass
26
26
try:
27
27
    import gtk
 
28
    import gtk.gdk
28
29
    import gtk.glade
29
30
except:
30
31
    sys.exit(1)
79
80
        self.treeview_right = self.toplevel.get_widget('treeview_right')
80
81
        self._load_left()
81
82
        self._load_right()
82
 
    
 
83
        
83
84
    def _load_left(self):
84
85
        """ Load data into the left panel. (Bookmarks) """
85
86
        pass
88
89
        """ Load data into the right panel. (Filelist) """
89
90
        import olive.backend.fileops as fileops
90
91
        
 
92
        # set cursor to busy
 
93
        self.comm.set_busy(self.treeview_right)
 
94
        
91
95
        # Create ListStore
92
96
        liststore = gtk.ListStore(str, str, str)
93
97
        
128
132
        tvcolumn_filename.add_attribute(cell, 'text', 1)
129
133
        tvcolumn_status.pack_start(cell, True)
130
134
        tvcolumn_status.add_attribute(cell, 'text', 2)
 
135
        
 
136
        # set cursor to default
 
137
        self.comm.set_busy(self.treeview_right, False)
131
138
 
132
139
class OliveCommunicator:
133
140
    """ This class is responsible for the communication between the different
175
182
    def refresh_right(self, path=None):
176
183
        """ Refresh the file list. """
177
184
        import olive.backend.fileops as fileops
178
 
 
 
185
        
 
186
        self.set_busy(self.treeview_right)
 
187
        
179
188
        if path is None:
180
189
            path = self.get_path()
181
190
 
205
214
        
206
215
        # Add the ListStore to the TreeView
207
216
        self.treeview_right.set_model(liststore)
 
217
        
 
218
        self.set_busy(self.treeview_right, False)
 
219
 
 
220
    def set_busy(self, widget, busy=True):
 
221
        if busy:
 
222
            widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
 
223
        else:
 
224
            widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
 
225
        
 
226
        gtk.main_iteration(0)