Enable copying of the log
authorepage <eopage@byu.net>
Thu, 12 Nov 2009 03:00:14 +0000 (03:00 +0000)
committerepage <eopage@byu.net>
Thu, 12 Nov 2009 03:00:14 +0000 (03:00 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@572 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/constants.py
src/dc_glade.py
src/dialcentral.py
src/gv_views.py
support/builddeb.py

index 25d0576..c69e3bf 100644 (file)
@@ -7,3 +7,4 @@ __build__ = 3
 __app_magic__ = 0xdeadbeef
 _data_path_ = os.path.join(os.path.expanduser("~"), ".dialcentral")
 _user_settings_ = "%s/settings.ini" % _data_path_
+_user_logpath_ = "%s/dialcentral.log" % _data_path_
index edb2a5a..dcae51c 100755 (executable)
@@ -720,6 +720,11 @@ class Dialcentral(object):
                                        self._window.unfullscreen()
                                else:
                                        self._window.fullscreen()
+                       elif event.keyval == ord("l") and event.get_state() & gtk.gdk.CONTROL_MASK:
+                               with open(constants._user_logpath_, "r") as f:
+                                       logLines = f.xreadlines()
+                                       log = "".join(logLines)
+                                       self._clipboard.set_text(str(log))
                except Exception, e:
                        self._errorDisplay.push_exception()
 
index e29f311..0bc3eab 100755 (executable)
@@ -19,8 +19,7 @@ except OSError, e:
        if e.errno != 17:
                raise
 
-userLogPath = "%s/dialcentral.log" % constants._data_path_
-logging.basicConfig(level=logging.DEBUG, filename=userLogPath)
+logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_)
 _moduleLogger.info("Dialcentral %s-%s" % (constants.__version__, constants.__build__))
 
 try:
index cf9a733..4424566 100644 (file)
@@ -359,8 +359,7 @@ class SmsEntryDialog(object):
                                        messagePart[0]
                                        for messagePart in self._messagemodel
                                )
-                               # For some reason this kills clipboard stuff
-                               #self._clipboard.set_text(message)
+                               self._clipboard.set_text(str(message))
                except Exception, e:
                        _moduleLogger.exception(str(e))
 
index 09958d9..dd59406 100755 (executable)
@@ -32,6 +32,7 @@ __changelog__ = """
 * Fremantle: Notification Support including testing of custom notifications
 * UI Tweak: Cut down the number of times the login dialog is needlessly displayed
 * Bug Fix: Switching to accounts tab when callback is blank
+* Debugging: Log contents now accessible through Ctrl+l
 
 1.0.7
 * Sped up various login cases