Slight modifications to the sql dialog
authorepage <eopage@byu.net>
Sat, 16 May 2009 23:38:31 +0000 (23:38 +0000)
committerepage <eopage@byu.net>
Sat, 16 May 2009 23:38:31 +0000 (23:38 +0000)
git-svn-id: file:///svnroot/quicknote/trunk@47 bb7704e3-badb-4cfa-9ab3-9374dc87eaa2

src/libquicknote.py
src/libsqldialog.py
support/builddeb.py

index 53eb70e..085c5d1 100644 (file)
@@ -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)
index e674692..682ca6f 100755 (executable)
@@ -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()
index 6eee5ad..703bdc9 100755 (executable)
@@ -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