Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/evaluate.py
diff options
context:
space:
mode:
Diffstat (limited to 'evaluate.py')
-rwxr-xr-xevaluate.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/evaluate.py b/evaluate.py
index b000d4e..818f378 100755
--- a/evaluate.py
+++ b/evaluate.py
@@ -32,7 +32,7 @@ glib.set_prgname(appname)
glib.set_application_name(appname)
import gtk
-from options import Options
+from toolbars import Options
from canvas import Canvas
this_dir = os.path.split(__file__)[:-1]
@@ -100,14 +100,19 @@ class UnfullscreenButton(gtk.Window):
self._reposition()
-class Application(gtk.Window):
+class Window(gtk.Window):
def __init__(self):
gtk.Window.__init__(self)
- self.save_type = None
+ self.save_type = info.io_mode
self.file_path = None
+ self.filter = gtk.FileFilter()
+ self.filter.set_name('%s files' % info.name)
+ self.filter.add_mime_type('application/x-%s' % info.lower_name)
+ self.filter.add_pattern('*.gpt')
self.accel_group = gtk.AccelGroup()
self.add_accel_group(self.accel_group)
self.set_title(appname)
+ logger.debug(info.lower_name)
self.set_icon(gtk.gdk.pixbuf_new_from_file(os.path.join(datadir,
'%s.svg' % info.lower_name)))
self.connect('delete-event', lambda w, e: self.stop())
@@ -158,7 +163,6 @@ class Application(gtk.Window):
format_name = data[3]
filter_mime = data[2]
mime_type = data[1]
- # TRANS: This string could be already translated at hello-integration, if not, please translate there, not only here.
filechooser = gtk.FileChooserDialog(_("Export..."), self,
gtk.FILE_CHOOSER_ACTION_SAVE,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
@@ -181,7 +185,6 @@ class Application(gtk.Window):
gtk.main_quit()
def open(self):
- # TRANS: This string could be already translated at hello-integration, if not, please translate there, not only here.
filechooser = gtk.FileChooserDialog(_('Open...'), self,
gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
@@ -203,7 +206,6 @@ class Application(gtk.Window):
self.canvas.write_file(self.file_path)
def save_as(self):
- # TRANS: This string could be already translated at hello-integration, if not, please translate there, not only here.
filechooser = gtk.FileChooserDialog(_('Save...'), self,
gtk.FILE_CHOOSER_ACTION_SAVE,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
@@ -218,7 +220,9 @@ class Application(gtk.Window):
self.set_title('%s - %s' % (self.file_path, appname))
if __name__ == '__main__':
- window = Application()
+ logger.debug('Initializing %s' % info.name)
+ window = Window()
window.show()
gtk.main()
+ logger.debug('Closing %s' % info.name)
exit()