/[straw]/straw/src/lib/SubscribeDialog.py
ViewVC logotype

Diff of /straw/src/lib/SubscribeDialog.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by jmalonzo, Mon Oct 20 07:33:20 2003 UTC revision 1.22 by jmalonzo, Wed Oct 22 12:23:50 2003 UTC
# Line 11  from error import log Line 11  from error import log
11  def set_busy_cursor():  def set_busy_cursor():
12      rw = gtk.gdk.get_default_root_window()      rw = gtk.gdk.get_default_root_window()
13      rw.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))      rw.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
     del rw  
14    
15  def set_ready_cursor():  def set_ready_cursor():
16      rw = gtk.gdk.get_default_root_window()      rw = gtk.gdk.get_default_root_window()
17      rw.set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))      rw.set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
     del rw  
18    
19  class SubscribeDialog:  class SubscribeDialog:
20      COLUMN_SUBSCRIBE = 0      COLUMN_SUBSCRIBE = 0
# Line 61  class SubscribeDialog: Line 59  class SubscribeDialog:
59    
60      def on_start_page_next(self, *args):      def on_start_page_next(self, *args):
61          self._find_assistant.set_page(self._location_page)          self._find_assistant.set_page(self._location_page)
   
62          if self._url == "":          if self._url == "":
63              self._subscribe_site_entry.set_text("")              self._subscribe_site_entry.set_text("")
64              self._find_assistant.set_buttons_sensitive(gtk.TRUE, gtk.FALSE, gtk.TRUE, gtk.TRUE)              self._find_assistant.set_buttons_sensitive(gtk.TRUE, gtk.FALSE, gtk.TRUE, gtk.TRUE)
   
65          return gtk.TRUE          return gtk.TRUE
66    
67      def on_start_page_cancel(self, *args):      def on_start_page_cancel(self, *args):
# Line 86  class SubscribeDialog: Line 82  class SubscribeDialog:
82              set_ready_cursor()              set_ready_cursor()
83              self._url = url              self._url = url
84    
85            if (len(self._feeds) < 1):
86                self._find_assistant.set_buttons_sensitive(gtk.TRUE, gtk.FALSE, gtk.TRUE, gtk.TRUE)
87    
88          return gtk.TRUE          return gtk.TRUE
89    
90      def on_location_page_cancel(self, *args):      def on_location_page_cancel(self, *args):
# Line 208  class SubscribeDialog: Line 207  class SubscribeDialog:
207    
208          if feed.sticky:          if feed.sticky:
209              self.add_feed(id, feed, ps)              self.add_feed(id, feed, ps)
210                self._find_assistant.set_buttons_sensitive(gtk.TRUE, gtk.TRUE, gtk.TRUE, gtk.TRUE)
211          else:          else:
212              self.remove_feed(id)              self.remove_feed(id)
213                if (len(self._feeds) < 1):
214                    # let's prevent the user from going on without selecting a feed
215                    self._find_assistant.set_buttons_sensitive(gtk.TRUE, gtk.FALSE, gtk.TRUE, gtk.TRUE)
216    
217          model.set(iter, self.COLUMN_STATUS_FLAG, feed.sticky)          model.set(iter, self.COLUMN_STATUS_FLAG, feed.sticky)
218            return gtk.TRUE
219    
220    
221      def add_feed(self, id, feed, summary):      def add_feed(self, id, feed, summary):

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26