Example #1
0
 def delete_file(self):
     dialog = ProgressDialog(_('Deleting...'), indeterminate=True)
     dialog.show()
     self.item.files.delete()
     dialog.hide()
     if self.menuw:
         self.menuw.delete_submenu(True, True)
Example #2
0
 def delete_file(self):
     dialog = ProgressDialog(_('Deleting...'), indeterminate=True)
     dialog.show()
     self.item.files.delete()
     dialog.hide()
     if self.menuw:
         self.menuw.delete_submenu(True, True)
Example #3
0
    def on_save_logs(self, button):

        title = _("Save conversation log")

        dialog = gtk.FileChooserDialog(
            title,
            None,
            gtk.FILE_CHOOSER_ACTION_SAVE,
            (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK),
        )

        dialog.set_default_response(gtk.RESPONSE_OK)
        dialog.show_all()

        response = dialog.run()

        while True:
            if response != gtk.RESPONSE_OK:
                break

            if dialog.get_filename():
                path = dialog.get_filename()
                f = open(path, "w")
                f.write(self.textBuffer.get_text(self.textBuffer.get_start_iter(), self.textBuffer.get_end_iter()))
                f.close()

                break

        dialog.hide()
Example #4
0
    def on_save_logs(self, button):

        title = (_("Save conversation log"))

        dialog = gtk.FileChooserDialog(title, None, \
                                gtk.FILE_CHOOSER_ACTION_SAVE, \
                                (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, \
                                gtk.STOCK_SAVE, gtk.RESPONSE_OK))

        dialog.set_default_response(gtk.RESPONSE_OK)
        dialog.show_all()

        response = dialog.run()

        while True:
            if response != gtk.RESPONSE_OK:
                break

            if dialog.get_filename():
                path = dialog.get_filename()
                f = open(path, "w")
                f.write(self.textBuffer.get_text(self.textBuffer.get_start_iter(),\
                      self.textBuffer.get_end_iter() ))
                f.close()

                break


        dialog.hide()