public void SetAsWallpaper() { int width = 0; int height = 0; if (Hit ["fixme:width"] != null && Hit ["fixme:width"] == "") { width = Int32.Parse(Hit ["fixme:width"]); height = Int32.Parse(Hit ["fixme:height"]); } else { if (!System.IO.File.Exists(Hit.FileInfo.FullName)) { return; } Gdk.Pixbuf p = new Gdk.Pixbuf(Hit.FileInfo.FullName); width = p.Width; height = p.Height; } GConf.Client client = new GConf.Client(); client.Set("/desktop/gnome/background/picture_filename", Hit.FileInfo.FullName); if (width <= 640) { if (width == height) { // Tile client.Set("/desktop/gnome/background/picture_options", "wallpaper"); } else { // Center client.Set("/desktop/gnome/background/picture_options", "centered"); } } else if (height >= width) { // Stretch vertically, but not horizontally client.Set("/desktop/gnome/background/picture_options", "scaled"); } else { // Fit to screen client.Set("/desktop/gnome/background/picture_options", "stretched"); } client.SuggestSync(); }
private void _Set(string key, object valueobj) { #if CONFIG_DEBUG Trace.Call(key, valueobj); #endif #if CONFIG_GCONF _GConf.Set(_GConfPrefix + key, valueobj); #elif CONFIG_NINI string inisection = _IniGetSection(key); string inikey = _IniGetKey(key); IniSection section = m_IniDocument.Sections[inisection]; if (section == null) { m_IniDocument.Sections.Add(new IniSection(inisection)); section = m_IniDocument.Sections[inisection]; } if (valueobj is string[]) { // Nini does not support native string lists, have to emulate them section.Set(inikey, String.Join("|", (string[])valueobj)); } else { section.Set(inikey, valueobj.ToString()); } #endif }
override protected void Installation(CStatusWindow sw) { //Installieren sw.Mainlabel = Catalog.GetString(CConfiguration.txtInstalling); client.Set(GConfApplicationKey, ConOutp.ToString().Split('/')[0]); sw.Mainlabel = Catalog.GetString(CConfiguration.txtInstallDone); }
//All program relevant settings are saved here public void SaveProgramSettings() { try{ GConfClient.Set(gangGconfPath + "xPosition", Window.X); GConfClient.Set(gangGconfPath + "yPosition", Window.Y); GConfClient.Set(gangGconfPath + "width", Window.Width); GConfClient.Set(gangGconfPath + "height", Window.Height); GConfClient.Set(gangGconfPath + "themesDownloadPath", themesDownloadPath); GConfClient.Set(gangGconfPath + "xmlRefreshInterval", XmlRefreshInterval); GConfClient.Set(gangGconfPath + "proxyKind", (int)ProxyKind); GConfClient.Set(gangGconfPath + "proxyPort", gangProxy.Port); GConfClient.Set(gangGconfPath + "proxyIp", gangProxy.Ip); GConfClient.Set(gangGconfPath + "dontBotherMeForUpdates", DontBotherForUpdates); } catch (Exception e) { Console.Out.WriteLine(Catalog.GetString("Error") + ":" + Catalog.GetString("Program settings couldn't be saved") + ", " + e.Message); } }
override protected void Installation(CStatusWindow sw) { //Installieren sw.Mainlabel = Catalog.GetString(CConfiguration.txtInstalling); System.Threading.Thread.Sleep(500); client.Set(GConfDecorationKey, ConOutp.ToString().Split('/')[0]); sw.Mainlabel = Catalog.GetString(CConfiguration.txtInstallDone); }
public bool Set <T> (string key, T val) { bool success = true; try { client.Set(AbsolutePathForKey(key), val); } catch (Exception e) { Log.Error("Encountered error setting GConf key {0}: {1}", key, e.Message); Log.Debug(e.StackTrace); success = false; } return(success); }
public static void SetBackgroundImage (string path) { GConf.Client client = new GConf.Client (); client.Set ("/desktop/gnome/background/color_shading_type", "solid"); client.Set ("/desktop/gnome/background/primary_color", "#000000"); client.Set ("/desktop/gnome/background/picture_options", "stretched"); client.Set ("/desktop/gnome/background/picture_opacity", 100); client.Set ("/desktop/gnome/background/picture_filename", path); client.Set ("/desktop/gnome/background/draw_background", true); }
public static void SetBackgroundImage(string path) { GConf.Client client = new GConf.Client(); client.Set("/desktop/gnome/background/color_shading_type", "solid"); client.Set("/desktop/gnome/background/primary_color", "#000000"); client.Set("/desktop/gnome/background/picture_options", "zoom"); client.Set("/desktop/gnome/background/picture_opacity", 100); client.Set("/desktop/gnome/background/picture_filename", path); client.Set("/desktop/gnome/background/draw_background", true); }
public void Set(string path, string value) { Init(); gconf.Set(path, value); }
///<summary> /// _Set store in the XML file any data, all is synchronized on the fly ///</summary> private void _Set(string key, string valueobj) { _Conf.Set("/apps/medianet/" + key, valueobj); }
public void SetAsWallpaper () { int width = 0; int height = 0; if (Hit ["fixme:width"] != null && Hit ["fixme:width"] == "") { width = Int32.Parse (Hit ["fixme:width"]); height = Int32.Parse (Hit ["fixme:height"]); } else { if (! System.IO.File.Exists (Hit.FileInfo.FullName)) return; Gdk.Pixbuf p = new Gdk.Pixbuf (Hit.FileInfo.FullName); width = p.Width; height = p.Height; } GConf.Client client = new GConf.Client (); client.Set ("/desktop/gnome/background/picture_filename", Hit.FileInfo.FullName); if (width <= 640) { if (width == height) { // Tile client.Set ("/desktop/gnome/background/picture_options", "wallpaper"); } else { // Center client.Set ("/desktop/gnome/background/picture_options", "centered"); } } else if (height >= width) { // Stretch vertically, but not horizontally client.Set ("/desktop/gnome/background/picture_options", "scaled"); } else { // Fit to screen client.Set ("/desktop/gnome/background/picture_options", "stretched"); } client.SuggestSync (); }
// Methods :: Public :: Set /// <summary> /// Set a value in GConf. /// </summary> /// <param name="key"> /// The key. /// </param> /// <param name="val"> /// The value. /// </param> public static void Set(string key, object val) { gconf_client.Set(key, val); }
override public void Revert() { client = new GConf.Client(); client.Set(GConfIconThemeKey, prevIconTheme); revertIsAvailable = false; }
private void SetConfValue(string key, string val) { _gconf.Set(_sGCONF_KEY + "/" + key, val); }
override protected void Installation(CStatusWindow sw) { //Installieren sw.Mainlabel = Catalog.GetString(CConfiguration.txtInstalling); client.Set(GConfIconThemeKey, Folder[0]); }
public void on_web_directory_activate(object o, EventArgs args) { client.Set(GCONF_APP_PATH + "/web_directory", webDirectoryEntry.Text); }
public void Set(string key, string val) { c.Set(path + key, val); }
void Set <T> (string key, T val) { client.Set(ns + key, val); }
public override void Revert() { client = new GConf.Client(); client.Set(GConfIconThemeKey,prevIconTheme); revertIsAvailable=false; }