[hamster-applet] adding html to the file extension by default (benefit of having preselected file name)
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] adding html to the file extension by default (benefit of having preselected file name)
- Date: Thu, 14 Jan 2010 22:58:23 +0000 (UTC)
commit 497f2390ade6394fe0fd35b0959e59ff9e1379bd
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu Jan 14 22:57:41 2010 +0000
adding html to the file extension by default (benefit of having preselected file name)
hamster/widgets/reportchooserdialog.py | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/hamster/widgets/reportchooserdialog.py b/hamster/widgets/reportchooserdialog.py
index e61cea7..00dceb8 100644
--- a/hamster/widgets/reportchooserdialog.py
+++ b/hamster/widgets/reportchooserdialog.py
@@ -36,13 +36,12 @@ class ReportChooserDialog(gtk.Dialog):
self.dialog = gtk.FileChooserDialog(title = _("Save report - Time Tracker"),
- parent = None,
+ parent = self,
+ action = gtk.FILE_CHOOSER_ACTION_SAVE,
buttons=(gtk.STOCK_CANCEL,
gtk.RESPONSE_CANCEL,
gtk.STOCK_SAVE,
gtk.RESPONSE_OK))
-
- self.dialog.set_action(gtk.FILE_CHOOSER_ACTION_SAVE)
self.dialog.set_current_folder(os.path.expanduser("~"))
self.filters = {}
@@ -86,8 +85,8 @@ class ReportChooserDialog(gtk.Dialog):
def show(self, start_date, end_date):
#set suggested name to something readable, replace backslashes with dots
#so the name is valid in linux
- filename = "Time track %s - %s." % (start_date.strftime("%x").replace("/", "."),
- end_date.strftime("%x").replace("/", "."))
+ filename = "Time track %s - %s.html" % (start_date.strftime("%x").replace("/", "."),
+ end_date.strftime("%x").replace("/", "."))
self.dialog.set_current_name(filename)
response = self.dialog.run()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]