~bakrss.developers/bakrss/main

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import pygtk
import gtk
import gtk.glade
from dbaseclass import DbaseFeed

class Add_dialog:
    
    def __init__(self):
        
        signals = {"on_ok_btn_clicked" : self.on_ok_btn_clicked,
                   "on_abort_btn_clicked" : self.on_abort_btn_clicked,}
        self.glade = gtk.glade.XML("Gui.glade", "add_dialog")
        self.glade.signal_autoconnect(signals)
        self.add_dialog = self.glade.get_widget('add_dialog')
        self.ok_btn = self.glade.get_widget("ok_btn")
        self.url_entry = self.glade.get_widget("url_entry")
        self.add_dialog.run()
        
    def on_ok_btn_clicked(self, widget):
        self.dbase = DbaseFeed()
        self.dbase.fill(self.url_entry.get_text())
        self.add_dialog.destroy()
    
    def on_abort_btn_clicked(self, widget):
        self.add_dialog.destroy()

class Prefs_dialog:
    
    def __init__(self):
        
        signals = {"on_ok_btn_clicked" : self.on_ok_btn_clicked,
                   "on_abort_btn_clicked" : self.on_abort_btn_clicked,}
                   
        self.glade = gtk.glade.XML("Gui.glade", "prefs_dialog")
        self.prefs_dialog = self.glade.get_widget("prefs_dialog")
        self.prefs_dialog.run()
        
    def on_ok_btn_clicked(self, widget):
        self.prefs_dialog.destroy()
    
    def on_abort_btn_clicked(self, widget):
        self.prefs_dialog.destroy()