tomboy r1773 - in trunk: . Tomboy data
- From: sschweiz svn gnome org
- To: svn-commits-list gnome org
- Subject: tomboy r1773 - in trunk: . Tomboy data
- Date: Sun, 13 Jan 2008 17:10:15 +0000 (GMT)
Author: sschweiz
Date: Sun Jan 13 17:10:15 2008
New Revision: 1773
URL: http://svn.gnome.org/viewvc/tomboy?rev=1773&view=rev
Log:
* Tomboy/NoteWindow.cs, Tomboy/Preferences.cs, data/tomboy.schemas.in:
Added a preference to disable closing notes with Escape, the default
is enabled. Fixes bug #444912.
Modified:
trunk/ChangeLog
trunk/Tomboy/NoteWindow.cs
trunk/Tomboy/Preferences.cs
trunk/data/tomboy.schemas.in
Modified: trunk/Tomboy/NoteWindow.cs
==============================================================================
--- trunk/Tomboy/NoteWindow.cs (original)
+++ trunk/Tomboy/NoteWindow.cs Sun Jan 13 17:10:15 2008
@@ -159,7 +159,12 @@
Gtk.AccelFlags.Visible);
// Have Esc key close the note window
- KeyPressEvent += KeyPressed;
+ if ((bool) Preferences.Get (Preferences.ENABLE_CLOSE_NOTE_ON_ESCAPE))
+ KeyPressEvent += KeyPressed;
+
+ // Watch the escape setting in GConf
+ Preferences.Client.AddNotify (Preferences.ENABLE_CLOSE_NOTE_ON_ESCAPE,
+ OnEscapeSettingChanged);
// Increase Indent
global_keys.AddAccelerator (new EventHandler (ChangeDepthRightHandler),
@@ -195,6 +200,16 @@
Move (x, y);
}
+ void OnEscapeSettingChanged (object sender, GConf.NotifyEventArgs args)
+ {
+ // enable escape key
+ if ((bool) args.Value)
+ KeyPressEvent += KeyPressed;
+ // disable escape key
+ else
+ KeyPressEvent -= KeyPressed;
+ }
+
void KeyPressed (object sender, Gtk.KeyPressEventArgs args)
{
args.RetVal = true;
Modified: trunk/Tomboy/Preferences.cs
==============================================================================
--- trunk/Tomboy/Preferences.cs (original)
+++ trunk/Tomboy/Preferences.cs Sun Jan 13 17:10:15 2008
@@ -14,6 +14,7 @@
public const string ENABLE_STARTUP_NOTES = "/apps/tomboy/enable_startup_notes";
public const string ENABLE_AUTO_BULLETED_LISTS = "/apps/tomboy/enable_bulleted_lists";
public const string ENABLE_ICON_PASTE = "/apps/tomboy/enable_icon_paste";
+ public const string ENABLE_CLOSE_NOTE_ON_ESCAPE = "/apps/tomboy/enable_close_note_on_escape";
public const string START_NOTE_URI = "/apps/tomboy/start_note";
public const string CUSTOM_FONT_FACE = "/apps/tomboy/custom_font_face";
@@ -75,6 +76,9 @@
case ENABLE_ICON_PASTE:
return false;
+ case ENABLE_CLOSE_NOTE_ON_ESCAPE:
+ return true;
+
case START_NOTE_URI:
return String.Empty;
Modified: trunk/data/tomboy.schemas.in
==============================================================================
--- trunk/data/tomboy.schemas.in (original)
+++ trunk/data/tomboy.schemas.in Sun Jan 13 17:10:15 2008
@@ -406,6 +406,20 @@
</schema>
<schema>
+ <key>/schemas/apps/tomboy/enable_close_note_on_escape</key>
+ <applyto>/apps/tomboy/enable_close_note_on_escape</applyto>
+ <owner>tomboy</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable closing notes with escape.</short>
+ <long>
+ If enabled, an opened note can be closed by hitting the escape key.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/desktop/gnome/url-handlers/note/command</key>
<applyto>/desktop/gnome/url-handlers/note/command</applyto>
<owner>tomboy</owner>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]