From: epage Date: Sat, 16 May 2009 23:38:31 +0000 (+0000) Subject: Slight modifications to the sql dialog X-Git-Url: http://git.maemo.org/git/?p=quicknote;a=commitdiff_plain;h=b2ab1f3a8d244925e31302f0c2270fc38d07e804 Slight modifications to the sql dialog git-svn-id: file:///svnroot/quicknote/trunk@47 bb7704e3-badb-4cfa-9ab3-9374dc87eaa2 --- diff --git a/src/libquicknote.py b/src/libquicknote.py index 53eb70e..085c5d1 100644 --- a/src/libquicknote.py +++ b/src/libquicknote.py @@ -244,10 +244,10 @@ class QuicknoteProgram(hildon.Program): def _on_view_sql_history(self, widget = None, data = None, data2 = None): import libsqldialog - sqldiag = libsqldialog.sqlDialog(self._db) + sqldiag = libsqldialog.SqlDialog(self._db) res = sqldiag.run() sqldiag.hide() - if res == 444: + if res == sqldiag.EXPORT_RESPONSE: logging.info("exporting sql") dlg = hildon.FileChooserDialog(parent=self._window, action=gtk.FILE_CHOOSER_ACTION_SAVE) diff --git a/src/libsqldialog.py b/src/libsqldialog.py index e674692..682ca6f 100755 --- a/src/libsqldialog.py +++ b/src/libsqldialog.py @@ -22,22 +22,26 @@ except NameError: _ = lambda x: x -class sqlDialog(gtk.Dialog): +class SqlDialog(gtk.Dialog): + + EXPORT_RESPONSE = 444 def __init__(self, db): self.db = db logging.info("sqldialog, init") - gtk.Dialog.__init__(self, _("SQL History (the past two days):"), None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) + gtk.Dialog.__init__(self, _("SQL History (the past two days):"), None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) - self.add_button("Export", 444) + self.add_button(_("Export"), self.EXPORT_RESPONSE) + self.add_button(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT) self.set_position(gtk.WIN_POS_CENTER) self.liststore = gtk.ListStore(str, str, str) # create the TreeView using liststore self.treeview = gtk.TreeView(self.liststore) + self.treeview.set_rules_hint(True) # create a CellRenderers to render the data self.cell1 = gtk.CellRendererText() diff --git a/support/builddeb.py b/support/builddeb.py index 6eee5ad..703bdc9 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -16,8 +16,9 @@ __version__ = "0.7.7" __build__ = 0 __changelog__ = ''' 0.7.7 - * Slight modification to note history dialog to make each note more distinguishable + * Slight modifications to the note history and SQL dialogs * On zoom, also hiding the history status and button + * Touched up the note list, making it ellipsize at the end rather than scroll 0.7.6 * Line-wrap