diff --git a/adstreme/glade/kg-frontend/kg-frontend.glade b/adstreme/glade/kg-frontend/kg-frontend.glade index 4f6fb2d..265c6b1 100644 --- a/adstreme/glade/kg-frontend/kg-frontend.glade +++ b/adstreme/glade/kg-frontend/kg-frontend.glade @@ -14,13 +14,11 @@ 500 True False - stock_filters True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST - True @@ -43,10 +41,6 @@ 0.5 0 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 5 @@ -181,31 +175,6 @@ True 0 - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - True @@ -262,10 +231,6 @@ 0.5 0 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 0 @@ -284,6 +249,156 @@ False + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + einlesen + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-quit + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + raus hier + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + diff --git a/adstreme/glade/kg_frontend.py b/adstreme/glade/kg_frontend.py index 2db3f45..8ca1cd6 100644 --- a/adstreme/glade/kg_frontend.py +++ b/adstreme/glade/kg_frontend.py @@ -14,6 +14,8 @@ class KeywordGeneratorFrontend: self.gui = self.gtk.glade.XML(gladefile) # set button handlers actions = { "on_bu_ok_clicked": self.clicked_ok, + "on_bu_filechoose_clicked": self.choose_file, + "on_bu_exit_clicked": self.exit, "on_window1_destroy": self.exit } # connect the actions to the events self.gui.signal_autoconnect (actions) @@ -34,6 +36,18 @@ class KeywordGeneratorFrontend: self.textbuffer = self.outputfield.get_buffer() self.textbuffer.set_text(self.keywords) + def choose_file(self, widget): + import filechooser + fcd = filechooser.FileChooserDialog() + filename = fcd.getfilename() + if filename: + print "hier haste den dateinamen, mach damit was du willst :)" + print filename + else: + self.outputfield = self.gui.get_widget("tf_output") + self.textbuffer = self.outputfield.get_buffer() + self.textbuffer.set_text("Du hast leider keine Datei ausgewaehlt") + def exit(self, widget): print "schiss digga" self.sys.exit(1)