[Glade-users] GtkFileFilter



I'd created a GtkFileFilter[filefilter1] with glade3.

I don't know how to set the patterns *.png, *.jpeg ...

Here is my code

class ImpressiveGUI:

    

    def __init__(self):

        builder = gtk.Builder()

        builder.add_from_file("Impressive_GUI.glade")

        self.window = builder.get_object("main_window")

        builder.connect_signals(self)

             

    def on_main_window_destroy(self, widget, data=None):

        gtk.main_quit()

    def on_btn_quit_clicked(self, widget, data=None):

        gtk.main_quit()

        

        

    def on_btn_go_clicked(self, w):

        #On envoie la pr?sentation

        global filename

        try:

            subprocess.Popen([myImpressive, filename], shell=False)

        except NameError:

            print ('Pas de fichiers s?lectionn?s')

        

    def on_filechooserbutton1_file_set(self, chooser):

        #On r?cup?re le chemin du fichier

        global filename

        filename = chooser.get_filename()

        

        

        

    

if __name__ == "__main__":

    gui = ImpressiveGUI()

    gui.window.show()

    gtk.main()

Thanks for help

-- 
Jean-Louis Frucot
mail frucot.jeanlouis at free.fr

http://gnusquetaires.org
http://gnusquetaires.org/forums/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]