diff options
Diffstat (limited to 'IdeMain.py')
-rw-r--r-- | IdeMain.py | 33 |
1 files changed, 28 insertions, 5 deletions
@@ -157,7 +157,7 @@ class IdeMain(Gtk.Window): elif accion == "Abrir": - self.__abrir() + self.__abrir(direccion = None) def __abrir_proyecto(self, widget, archivo): """ @@ -260,14 +260,37 @@ class IdeMain(Gtk.Window): No hace nada. """ - pass + self.base_panel.abrir_archivo(None) - def __abrir(self, widget=None): + def __abrir(self, widget=None, direccion=None): """ - No hace nada. + Abre un archivo. + """ + + if direccion != None: + + self.base_panel.abrir_archivo(direccion) + print direccion + + else: + + filechooser = My_FileChooser( + parent_window = self, + action_type = Gtk.FileChooserAction.OPEN, + filter_type = "*.py", + title = "Abrir archivo", + path = BatovideWorkSpace) + + filechooser.connect('load', self.abrir) + + respuesta = filechooser.run() + + def abrir(self, widget, direccion): + """ + Abre archivo. """ - pass + self.__abrir(direccion = direccion) def __exit(self, widget=None): """ |