~ubuntu-branches/debian/stretch/pondus/stretch

« back to all changes in this revision

Viewing changes to pondus/gui/dialog_save_file.py

  • Committer: Bazaar Package Importer
  • Author(s): Eike Nicklas
  • Date: 2011-06-09 10:42:07 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110609104207-g0de826d0skhc42r
Tags: 0.8.0-1
* new upstream release
* update Standards-Version to 3.9.2: no changes required
* switch to debhelper 7
* debian/control:
  - update Description
  - remove ${python:Breaks}

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
see LICENSE or http://www.opensource.org/licenses/mit-license.php
9
9
"""
10
10
 
 
11
import pygtk
 
12
pygtk.require('2.0')
 
13
 
11
14
import gtk
12
15
import os
13
16
 
41
44
        # show the dialog
42
45
        self.chooser.show_all()
43
46
 
44
 
 
45
47
    def run(self, plot=None):
46
48
        """Runs the dialog and closes it afterwards."""
47
49
        response = self.chooser.run()
58
60
        """Updates the file ending of the target file."""
59
61
        ending = filetypeselector.get_active_text()
60
62
        filename = os.path.split(self.chooser.get_filename())[1]
61
 
        filebase  = os.path.splitext(filename)[0]
 
63
        filebase = os.path.splitext(filename)[0]
62
64
        self.chooser.set_current_name(filebase + ending)