// // Update the search match highlight color based on the changed Preference dialog setting. // void OnSearchMatchColorSettingChanged(object sender, NotifyEventArgs args) { switch (args.Key) { case Preferences.ENABLE_CUSTOM_SEARCH_MATCH_COLOR: case Preferences.CUSTOM_SEARCH_MATCH_COLOR: UpdateSearchMatchColor(); break; } }
public void HandleNotify(object sender, GConf.NotifyEventArgs args) { if (!enabled) { return; } NotifyEventArgs newArgs = new NotifyEventArgs(args.Key, args.Value); notify(sender, newArgs); }
void BindingChanged (object sender, NotifyEventArgs args) { if (args.Key == pref_path) { Logger.Debug ("Binding for '{0}' changed to '{1}'!", pref_path, args.Value); UnsetBinding (); key_sequence = (string) args.Value; SetBinding (); } }
void BindingChanged(object sender, NotifyEventArgs args) { if (args.Key == pref_path) { Logger.Debug("Binding for '{0}' changed to '{1}'!", pref_path, args.Value); UnsetBinding(); key_sequence = (string)args.Value; SetBinding(); } }
void OnEnableSpellcheckChanged(object sender, NotifyEventArgs args) { if (args.Key != Preferences.ENABLE_SPELLCHECKING) { return; } if ((bool)args.Value) { Attach(); } else { Detach(); } }
// // Update the font based on the changed Preference dialog setting. // Also update the font based on the changed GConf GNOME document font setting. // void OnFontSettingChanged (object sender, NotifyEventArgs args) { switch (args.Key) { case Preferences.ENABLE_CUSTOM_FONT: UpdateCustomFontSetting (); break; case Preferences.CUSTOM_FONT_FACE: UpdateCustomFontSetting (); break; case GNOME_DOCUMENT_FONT_KEY: if (!(bool) Preferences.Get (Preferences.ENABLE_CUSTOM_FONT)) ModifyFontFromString ((string) args.Value); break; } }
public void Set (string key, object value) { try { CreatePath (key); prefsDoc.SelectSingleNode (key).InnerText = System.Convert.ToString(value); prefsDoc.Save(fileName); foreach (string nkey in events.Keys) { NotifyEventHandler handler = events [nkey] as NotifyEventHandler; if (handler != null && key.StartsWith (nkey)) { NotifyEventArgs args = new NotifyEventArgs (key, value); handler (this, args); } } } catch {} }
public void Set(string key, object value) { try { CreatePath(key); prefsDoc.SelectSingleNode(key).InnerText = System.Convert.ToString(value); prefsDoc.Save(fileName); foreach (string nkey in events.Keys) { NotifyEventHandler handler = events [nkey] as NotifyEventHandler; if (handler != null && key.StartsWith(nkey)) { NotifyEventArgs args = new NotifyEventArgs(key, value); handler(this, args); } } } catch {} }
void OnEnableWikiwordsChanged(object sender, NotifyEventArgs args) { if (args.Key != Preferences.ENABLE_WIKIWORDS) { return; } if ((bool)args.Value) { Buffer.InsertText += OnInsertText; Buffer.DeleteRange += OnDeleteRange; } else { Buffer.InsertText -= OnInsertText; Buffer.DeleteRange -= OnDeleteRange; } }
// // Update the font based on the changed Preference dialog setting. // Also update the font based on the changed GConf GNOME document font setting. // void OnFontSettingChanged(object sender, NotifyEventArgs args) { switch (args.Key) { case Preferences.ENABLE_CUSTOM_FONT: UpdateCustomFontSetting(); break; case Preferences.CUSTOM_FONT_FACE: UpdateCustomFontSetting(); break; case GNOME_DOCUMENT_FONT_KEY: if (!(bool)Preferences.Get(Preferences.ENABLE_CUSTOM_FONT)) { ModifyFontFromString((string)args.Value); } break; } }
void OnEnableWikiwordsChanged (object sender, NotifyEventArgs args) { if (args.Key != Preferences.ENABLE_WIKIWORDS) return; if ((bool) args.Value) { Buffer.InsertText += OnInsertText; Buffer.DeleteRange += OnDeleteRange; } else { Buffer.InsertText -= OnInsertText; Buffer.DeleteRange -= OnDeleteRange; } }
private void OnPrefsChanged(object sender, NotifyEventArgs args) { if (args.Key == CalculatorAddin.CALCULATOR_AUTOMATIC_MODE) setUp(); }
public void HandleNotify (object sender, GConf.NotifyEventArgs args) { if (!enabled) return; NotifyEventArgs newArgs = new NotifyEventArgs (args.Key, args.Value); notify (sender, newArgs); }
void EnableKeybindingsChanged (object sender, NotifyEventArgs args) { if (args.Key == Preferences.ENABLE_KEYBINDINGS) { bool enabled = (bool) args.Value; EnableDisable (enabled); } }
void HandlePreferencesSettingChanged (object sender, NotifyEventArgs args) { if (args.Key == Preferences.NOTE_RENAME_BEHAVIOR) { int rename_behavior = (int) args.Value; if (rename_behavior < 0 || rename_behavior > 2) { rename_behavior = 0; Preferences.Set (Preferences.NOTE_RENAME_BEHAVIOR, rename_behavior); } if (rename_behavior_combo.Active != rename_behavior) rename_behavior_combo.Active = rename_behavior; } else if (args.Key == Preferences.SYNC_AUTOSYNC_TIMEOUT) { int timeout = (int) args.Value; if (timeout <= 0 && autosyncCheck.Active) autosyncCheck.Active = false; else if (timeout > 0) { timeout = (timeout >= 5 && timeout < 1000) ? timeout : 5; if (!autosyncCheck.Active) autosyncCheck.Active = true; if ((int) autosyncSpinner.Value != timeout) autosyncSpinner.Value = timeout; } } }
static void OnSettingChanged (object sender, NotifyEventArgs args) { if (SettingChanged != null) { SettingChanged (sender, args); } }
void OnEnableSpellcheckChanged (object sender, NotifyEventArgs args) { if (args.Key != Preferences.ENABLE_SPELLCHECKING) return; if ((bool) args.Value) { Attach (); } else { Detach (); } }