void HandleGConfChanged(object sender, GConf.NotifyEventArgs args) { if (PreferencesChanged != null) { PreferencesChanged(this, new PreferencesChangedEventArgs(args.Key.Substring(RootPath.Length + 1), args.Value)); } }
private static void OnSettingChanged(object sender, GConf.NotifyEventArgs args) { if (SettingChanged != null) { SettingChanged(sender, args); } }
void OnGConfNotify(object sender, GConf.NotifyEventArgs args) { switch (args.Key) { case GConfHelper.SHARED_CATEGORIES_KEY: case GConfHelper.SHARE_ALL_CATEGORIES_KEY: case GConfHelper.LIBRARY_NAME_KEY: Restart(); break; case GConfHelper.SHARE_LIBRARY_KEY: if ((bool)args.Value && !IsRunning) { Start(); } else if (!(bool)args.Value && IsRunning) { Stop(); } break; default: break; } }
/// <summary> /// Event Handler for Settings changed /// </summary> private void OnSettingChanged(object sender, GConf.NotifyEventArgs args) { if (args.Key != null && args.Key == ClientConfig.KEY_IFOLDER_DEBUG_PRINT_SIMIAS_EVENT_ERRORS) { printErrors = (bool)args.Value; Debug.PrintLine(String.Format("Print Simias Event Errors: {0}", printErrors)); } }
// Handlers // Handlers :: OnAmazonDevTagChanged /// <summary> /// Handler called when the Amazon dev tag is changed in GConf. /// </summary> /// <param name="o"> /// The calling object. /// </param> /// <param name="args"> /// The <see cref="GConf.NotifyEventArgs" />. /// </param> private void OnAmazonDevTagChanged (object o, GConf.NotifyEventArgs args) { amazon_dev_tag = (string)args.Value; // Tag is 'missing' if set to the default value amazon_dev_tag_missing = (amazon_dev_tag == GConfDefaultAmazonDevTag); }
public void HandleNotify(object sender, GConf.NotifyEventArgs args) { if (!enabled) { return; } NotifyEventArgs newArgs = new NotifyEventArgs(args.Key, args.Value); notify(sender, newArgs); }
static void OnSettingChanged(object sender, GConf.NotifyEventArgs args) { if (cache.ContainsKey(args.Key)) { cache [args.Key] = args.Value; } if (SettingChanged != null) { SettingChanged(sender, args); } }
void BindingChanged(object sender, GConf.NotifyEventArgs args) { if (args.Key == gconf_path) { Logger.Log.Debug("Binding for '{0}' changed to '{1}'!", gconf_path, args.Value); UnsetBinding(); key_sequence = (string)args.Value; SetBinding(); } }
void OnGConfNotify(object sender, GConf.NotifyEventArgs args) { if (args.Key == GConfHelper.LOOK_FOR_LIBRARIES_KEY) { if ((bool)args.Value && !client_running) { StartClient(); } else if (!(bool)args.Value && client_running) { StopClient(); } } }
private void OnGConfNotify(object o, GConf.NotifyEventArgs args) { if (refresh_id > 0) { return; } // Wait 5 seconds before reloading the proxy, and block any // other notifications. This notification will be raised on // any minor change (e.g. htt->http->http:->http:/->http://) // to any of the GNOME proxy settings. Also, at any given // point in the modification of the settings, the state may // be invalid, so retain the previous good configuration. refresh_id = GLib.Timeout.Add(5000, RefreshProxy); }
private void HighlightConfigChanged(object sender, GConf.NotifyEventArgs args) { TextTag tag; foreach (Style s in config.styles) { s.Read(); tag = TagTable.Lookup(s.path); if (tag != null) { tag.Foreground = s.color; //tag.Weight = Convert.ToInt32 (s.weight); } } Highlight(); }
private void OnThemesPathChangedEventHandler(object sender, GConf.NotifyEventArgs a) { string path = (string)config.GConfClient.Get(config.GConfPath + "themesDownloadPath"); if (Directory.Exists(path)) { SettingsLocationFc.SetCurrentFolder(path); } else { new CInfoWindow(Catalog.GetString("Error"), Catalog.GetString("The download location has been changed manually! " + "Normally, this is no problem at all! But if you change " + "the location to a place that doesn't exists then it will " + "be a problem!\n\n So this is a \"Location couldn't be " + "found\" message. Please correct the download location!"), Gtk.Stock.DialogError, true); } }
// Handlers // Handlers :: OnWatchedFoldersChanged private void OnWatchedFoldersChanged (object o, GConf.NotifyEventArgs args) { string [] old_watched_folders = watched_folders; watched_folders = (string [])args.Value; if (WatchedFoldersChanged != null) { WatchedFoldersChanged(); } ArrayList new_dinfos = new ArrayList(); // Sort old folders // Needed for the binary search Array.Sort(old_watched_folders); foreach (string s in watched_folders) { int idx = Array.BinarySearch(old_watched_folders, s); if (idx > -1) { continue; } DirectoryInfo dinfo = new DirectoryInfo(s); if (!dinfo.Exists) { continue; } new_dinfos.Add(dinfo); } if (new_dinfos.Count <= 0) { return; } new AddFoldersThread(new_dinfos); }
// Handlers // Handlers :: OnConfigChanged /// <summary> /// Handler called when a GConf key has been changed. /// </summary> /// <remarks> /// This re-runs <see cref="Setup" />. /// </remarks> private void OnConfigChanged(object o, GConf.NotifyEventArgs args) { Setup(); }
public void OnPreferencesChanged(object sender, GConf.NotifyEventArgs args) { LoadPreference(args.Key); }
static void OnAccountsSettingChanged(object sender, GConf.NotifyEventArgs args) { SetupAccountUrlToUidMap(); }
// Handlers // Handlers :: OnAmazonLocaleChanged /// <summary> /// Handler called when the Amazon locale is changed in GConf. /// </summary> /// <param name="o"> /// The calling object. /// </param> /// <param name="args"> /// The <see cref="GConf.NotifyEventArgs" />. /// </param> private void OnAmazonLocaleChanged (object o, GConf.NotifyEventArgs args) { amazon_locale = (string)args.Value; }
private void onSettingsChanged(object Sender, GConf.NotifyEventArgs args) { readSystemProxySettings(); }
public void GConf_Changed(object sender, GConf.NotifyEventArgs args) { UpdateFromGConf(); }
// Handlers :: OnOnlyCompleteAlbumsChanged private void OnOnlyCompleteAlbumsChanged(object o, GConf.NotifyEventArgs args) { only_complete_albums = (bool)args.Value; }