~bakrss.developers/bakrss/main

« back to all changes in this revision

Viewing changes to add_dialog.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:
1
 
import pygtk
2
 
import gtk
3
 
import gtk.glade
4
 
from dbaseclass import DbaseFeed
5
 
 
6
 
class Add_dialog:
7
 
    
8
 
    def __init__(self):
9
 
        
10
 
        signals = {"on_ok_btn_clicked" : self.on_ok_btn_clicked,
11
 
                   "on_abort_btn_clicked" : self.on_abort_btn_clicked,}
12
 
        self.glade = gtk.glade.XML('add_dialog.glade')
13
 
        self.glade.signal_autoconnect(signals)
14
 
        self.add_dialog = self.glade.get_widget('dialog')
15
 
        self.ok_btn = self.glade.get_widget("ok_btn")
16
 
        self.url_entry = self.glade.get_widget("url_entry")
17
 
        self.add_dialog.run()
18
 
        
19
 
    def on_ok_btn_clicked(self, widget):
20
 
        self.dbase = DbaseFeed()
21
 
        self.dbase.fill(self.url_entry.get_text())
22
 
        self.c=self.dbase.read()
23
 
        print self.c
24
 
        self.add_dialog.destroy()
25
 
    
26
 
    def on_abort_btn_clicked(self, widget):
27
 
        self.add_dialog.destroy()