From 6d521fefabb56c76fba6f5f6c003d345e29ca662 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Fri, 1 Feb 2008 11:54:26 -0500 Subject: [PATCH] Renamed Bugzilla -> Trac, bugzilla -> trac --- Tomboy.Trac.make | 8 +++---- src/Bugzilla.addin.xml | 25 ---------------------- src/BugzillaPreferencesFactory.cs | 13 ----------- src/InsertBugAction.cs | 6 +++--- src/Trac.addin.xml | 25 ++++++++++++++++++++++ src/{BugzillaLink.cs => TracLink.cs} | 6 +++--- src/{BugzillaNoteAddin.cs => TracNoteAddin.cs} | 18 ++++++++-------- src/{BugzillaPreferences.cs => TracPreferences.cs} | 20 ++++++++--------- src/TracPreferencesFactory.cs | 13 +++++++++++ 9 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 src/Bugzilla.addin.xml delete mode 100644 src/BugzillaPreferencesFactory.cs create mode 100644 src/Trac.addin.xml rename src/{BugzillaLink.cs => TracLink.cs} (92%) rename src/{BugzillaNoteAddin.cs => TracNoteAddin.cs} (82%) rename src/{BugzillaPreferences.cs => TracPreferences.cs} (94%) create mode 100644 src/TracPreferencesFactory.cs diff --git a/Tomboy.Trac.make b/Tomboy.Trac.make index 58809f3..51fc17f 100644 --- a/Tomboy.Trac.make +++ b/Tomboy.Trac.make @@ -28,10 +28,10 @@ endif SOURCES := \ src/InsertBugAction.cs \ - src/BugzillaPreferencesFactory.cs \ - src/BugzillaPreferences.cs \ - src/BugzillaNoteAddin.cs \ - src/BugzillaLink.cs \ + src/TracPreferencesFactory.cs \ + src/TracPreferences.cs \ + src/TracNoteAddin.cs \ + src/TracLink.cs \ EMBEDDEDFILES := \ diff --git a/src/Bugzilla.addin.xml b/src/Bugzilla.addin.xml deleted file mode 100644 index 1b08fbb..0000000 --- a/src/Bugzilla.addin.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/BugzillaPreferencesFactory.cs b/src/BugzillaPreferencesFactory.cs deleted file mode 100644 index b69d0a2..0000000 --- a/src/BugzillaPreferencesFactory.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using Tomboy; - -namespace Tomboy.Bugzilla -{ - public class BugzillaPreferenceFactory : AddinPreferenceFactory - { - public override Gtk.Widget CreatePreferenceWidget () - { - return new BugzillaPreferences (); - } - } -} diff --git a/src/InsertBugAction.cs b/src/InsertBugAction.cs index 01e0ee3..5942e18 100644 --- a/src/InsertBugAction.cs +++ b/src/InsertBugAction.cs @@ -1,17 +1,17 @@ using System; -namespace Tomboy.Bugzilla +namespace Tomboy.Trac { public class InsertBugAction : SplitterAction { - BugzillaLink Tag; + TracLink Tag; int Offset; string Id; public InsertBugAction (Gtk.TextIter start, string id, Gtk.TextBuffer buffer, - BugzillaLink tag) + TracLink tag) { Tag = tag; Id = id; diff --git a/src/Trac.addin.xml b/src/Trac.addin.xml new file mode 100644 index 0000000..fdd4e9e --- /dev/null +++ b/src/Trac.addin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/BugzillaLink.cs b/src/TracLink.cs similarity index 92% rename from src/BugzillaLink.cs rename to src/TracLink.cs index a4e78ab..aa0aecd 100644 --- a/src/BugzillaLink.cs +++ b/src/TracLink.cs @@ -1,9 +1,9 @@ using System; using Tomboy; -namespace Tomboy.Bugzilla +namespace Tomboy.Trac { - public class BugzillaLink : DynamicNoteTag + public class TracLink : DynamicNoteTag { private const string UriAttributeName = "uri"; private const string StockIconFilename = "stock_bug.png"; @@ -45,7 +45,7 @@ namespace Tomboy.Bugzilla string host = uri.Host; // TODO: Get this in a safer way - string imageDir = "~/.tomboy/BugzillaIcons/"; + string imageDir = "~/.tomboy/TracIcons/"; string imagePath = imageDir.Replace ("~", Environment.GetEnvironmentVariable ("HOME")) + host + ".png"; try { diff --git a/src/BugzillaNoteAddin.cs b/src/TracNoteAddin.cs similarity index 82% rename from src/BugzillaNoteAddin.cs rename to src/TracNoteAddin.cs index cdabae6..eada0a9 100644 --- a/src/BugzillaNoteAddin.cs +++ b/src/TracNoteAddin.cs @@ -9,23 +9,23 @@ using System.Xml; using Tomboy; -namespace Tomboy.Bugzilla +namespace Tomboy.Trac { - public class BugzillaNoteAddin : NoteAddin + public class TracNoteAddin : NoteAddin { static int last_bug; - public const string BugzillaLinkTagName = "link:bugzilla"; + public const string TracLinkTagName = "link:trac"; - static BugzillaNoteAddin () + static TracNoteAddin () { last_bug = -1; } public override void Initialize () { - if (!Note.TagTable.IsDynamicTagRegistered (BugzillaLinkTagName)) { - Note.TagTable.RegisterDynamicTag (BugzillaLinkTagName, typeof (BugzillaLink)); + if (!Note.TagTable.IsDynamicTagRegistered (TracLinkTagName)) { + Note.TagTable.RegisterDynamicTag (TracLinkTagName, typeof (TracLink)); } } @@ -44,7 +44,7 @@ namespace Tomboy.Bugzilla [GLib.ConnectBefore] void OnDragDataReceived (object sender, Gtk.DragDataReceivedArgs args) { - Logger.Debug ("Bugzilla.OnDragDataReceived"); + Logger.Debug ("Trac.OnDragDataReceived"); foreach (Gdk.Atom atom in args.Context.Targets) { if (atom.Name == "text/uri-list" || atom.Name == "_NETSCAPE_URL") { @@ -85,8 +85,8 @@ namespace Tomboy.Bugzilla } last_bug = id; - BugzillaLink link_tag = (BugzillaLink) - Note.TagTable.CreateDynamicTag (BugzillaLinkTagName); + TracLink link_tag = (TracLink) + Note.TagTable.CreateDynamicTag (TracLinkTagName); link_tag.BugUrl = uri; // Place the cursor in the position where the uri was diff --git a/src/BugzillaPreferences.cs b/src/TracPreferences.cs similarity index 94% rename from src/BugzillaPreferences.cs rename to src/TracPreferences.cs index 824dae6..10eacb9 100644 --- a/src/BugzillaPreferences.cs +++ b/src/TracPreferences.cs @@ -2,9 +2,9 @@ using System; using System.IO; using Mono.Unix; -namespace Tomboy.Bugzilla +namespace Tomboy.Trac { - public class BugzillaPreferences : Gtk.VBox + public class TracPreferences : Gtk.VBox { Gtk.TreeView icon_tree; Gtk.ListStore icon_store; @@ -14,22 +14,22 @@ namespace Tomboy.Bugzilla string last_opened_dir; - static string IMAGE_DIR = "~/.tomboy/BugzillaIcons"; + static string IMAGE_DIR = "~/.tomboy/TracIcons"; static string image_dir = null; - static BugzillaPreferences () + static TracPreferences () { // TODO: Get this in a safer way image_dir = IMAGE_DIR.Replace ("~", Environment.GetEnvironmentVariable ("HOME")); } - public BugzillaPreferences () + public TracPreferences () : base (false, 12) { last_opened_dir = Environment.GetEnvironmentVariable ("HOME"); Gtk.Label l = new Gtk.Label (Catalog.GetString ( - "You can use any bugzilla just by dragging links " + + "You can use any trac just by dragging links " + "into notes. If you want a special icon for " + "certain hosts, add them here.")); l.Wrap = true; @@ -116,7 +116,7 @@ namespace Tomboy.Bugzilla void UpdateIconStore () { - // Read ~/.tomboy/BugzillaIcons/" + // Read ~/.tomboy/TracIcons/" if (!Directory.Exists (image_dir)) return; @@ -131,7 +131,7 @@ namespace Tomboy.Bugzilla try { pixbuf = new Gdk.Pixbuf (icon_file); } catch (Exception e) { - Logger.Warn ("Error loading Bugzilla Icon {0}: {1}", icon_file, e.Message); + Logger.Warn ("Error loading Trac Icon {0}: {1}", icon_file, e.Message); } if (pixbuf == null) @@ -227,7 +227,7 @@ run_add_dialog: Gtk.MessageType.Warning, Gtk.ButtonsType.Ok, Catalog.GetString ("No host name specified"), - Catalog.GetString ("You must specify the Bugzilla " + + Catalog.GetString ("You must specify the Trac " + "host name to use with this icon.")); warn.Run (); warn.Destroy (); @@ -244,7 +244,7 @@ run_add_dialog: dialog.Destroy (); - // Copy the file to the BugzillaIcons directory + // Copy the file to the TracIcons directory string err_msg; if (!CopyToBugizllaIconsDir (icon_file, host, out err_msg)) { HIGMessageDialog err = diff --git a/src/TracPreferencesFactory.cs b/src/TracPreferencesFactory.cs new file mode 100644 index 0000000..6bd7821 --- /dev/null +++ b/src/TracPreferencesFactory.cs @@ -0,0 +1,13 @@ +using System; +using Tomboy; + +namespace Tomboy.Trac +{ + public class TracPreferenceFactory : AddinPreferenceFactory + { + public override Gtk.Widget CreatePreferenceWidget () + { + return new TracPreferences (); + } + } +} -- 2.11.4.GIT