[tomboy] Expose --debug command line flag.
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Subject: [tomboy] Expose --debug command line flag.
- Date: Mon, 4 May 2009 15:58:10 -0400 (EDT)
commit 8a7d77373425624d16522b485a69d30bd3361c1d
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Mon May 4 12:53:57 2009 -0700
Expose --debug command line flag.
---
Tomboy/Tomboy.cs | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/Tomboy/Tomboy.cs b/Tomboy/Tomboy.cs
index 42a1d8f..361cdf0 100644
--- a/Tomboy/Tomboy.cs
+++ b/Tomboy/Tomboy.cs
@@ -16,6 +16,7 @@ namespace Tomboy
{
public class Tomboy : Application
{
+ static bool debugging;
static NoteManager manager;
static TomboyTrayIcon tray_icon;
static TomboyTray tray = null;
@@ -34,6 +35,7 @@ namespace Tomboy
Catalog.Init ("tomboy", Defines.GNOME_LOCALE_DIR);
TomboyCommandLine cmd_line = new TomboyCommandLine (args);
+ debugging = cmd_line.Debug;
#if ENABLE_DBUS || WIN32 || MAC // Run command-line earlier with DBus enabled
if (cmd_line.NeedsExecute) {
@@ -99,6 +101,11 @@ namespace Tomboy
Logger.Log ("All done. Ciao!");
}
+ public static bool Debugging
+ {
+ get { return debugging; }
+ }
+
static string GetNotePath (string override_path)
{
// Default note location, as specified in --note-path or $TOMBOY_PATH
@@ -365,6 +372,7 @@ namespace Tomboy
public class TomboyCommandLine
{
+ bool debug;
bool new_note;
bool panel_applet;
string new_note_name;
@@ -383,6 +391,12 @@ namespace Tomboy
Parse (args);
}
+ // TODO: Document this option
+ public bool Debug
+ {
+ get { return debug; }
+ }
+
public bool UsePanelApplet
{
get {
@@ -475,6 +489,9 @@ namespace Tomboy
bool quit = false;
switch (args [idx]) {
+ case "--debug":
+ debug = true;
+ break;
#if ENABLE_DBUS || WIN32 || MAC
case "--new-note":
// Get optional name for new note...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]