~bakrss.developers/bakrss/main

« back to all changes in this revision

Viewing changes to feedgtk.py

  • Committer: akus-py
  • Date: 2009-03-30 20:32:34 UTC
  • mfrom: (7.1.2 bakrss)
  • Revision ID: akus.py@gmail.com-20090330203234-fdgsxzjcdoagkrbt
load database added

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import gtk
5
5
import gtk.glade
6
6
import gobject
7
 
from add_dialog import Add_dialog
 
7
from GuiTools import Add_dialog, Prefs_dialog
8
8
 
9
9
class Feed:
10
10
    #sito="http://feeds.delicious.com/v2/rss/twelvetone"
16
16
        signals = {"gtk_main_quit" : gtk.main_quit,
17
17
                   "on_add_btn_clicked" : self.on_add_btn_clicked,
18
18
                   "on_refresh_btn_clicked" : self.on_refresh_btn_clicked,
 
19
                   "on_prefs_menu_item_activate": self.on_prefs_menu_item_activate,
 
20
                   "on_check_screen_toggled" : self.on_check_screen_toggled,
19
21
                   }
20
22
        #Glade file init
21
 
        self.glade = gtk.glade.XML("Gui.glade")
 
23
        self.glade = gtk.glade.XML("Gui.glade", "main_window")
22
24
        self.glade.signal_autoconnect(signals)
23
 
        self.window = self.glade.get_widget("window")
 
25
        self.window = self.glade.get_widget("main_window")
24
26
        self.scrolledwindow = self.glade.get_widget("scrolledwindow")
25
27
        self.add_btn = self.glade.get_widget("add_btn")
26
28
        self.refresh_btn = self.glade.get_widget("refresh_btn")
 
29
        self.check_screen = self.glade.get_widget("check_screen")
27
30
        
28
31
        #Treeview widget
29
32
        self.liststore=gtk.ListStore(int,str,str,str)
100
103
        for key in feeds.keys():
101
104
            self.liststore.append([line,feeds[key][0],feeds[key][1],key])
102
105
            line+=1
 
106
            
 
107
    def on_check_screen_toggled(self, widget):
 
108
        if self.check_screen.get_active():
 
109
            self.window.fullscreen()
 
110
        else:
 
111
            self.window.unfullscreen()
 
112
            
 
113
    def on_prefs_menu_item_activate(self, widget):
 
114
        Prefs_dialog()
103
115
        
104
116
    def main(self):
105
117
        gtk.main()