Adding upstream version 0.6.0.
[debian/lxappearance.git] / src / lxappearance.c
index 61092c1..1508258 100644 (file)
@@ -300,6 +300,9 @@ static void lxappearance_save_gtkrc()
         g_string_append_printf(content,
             "gtk-xft-rgba=\"%s\"\n", app.font_rgba);
 
+    if(app.modules && app.modules[0])
+        g_string_append_printf(content, "gtk-modules=\"%s\"\n", app.modules);
+
 #if 0
     /* unfortunately we cannot set colors without XSETTINGS daemon,
        themes will override any custom settings in .gtkrc-2.0 file */
@@ -351,20 +354,20 @@ static void lxappearance_save_gtkrc()
                           "gtk-toolbar-style", tb_styles[app.toolbar_style]);
     g_key_file_set_string(content_gtk3, "Settings",
                           "gtk-toolbar-icon-size", tb_icon_sizes[app.toolbar_icon_size]);
-    g_key_file_set_boolean(content_gtk3, "Settings",
-                           "gtk-button-images", app.button_images);
-    g_key_file_set_boolean(content_gtk3, "Settings",
-                           "gtk-menu-images", app.menu_images);
+    g_key_file_set_integer(content_gtk3, "Settings",
+                           "gtk-button-images", app.button_images ? 1 : 0);
+    g_key_file_set_integer(content_gtk3, "Settings",
+                           "gtk-menu-images", app.menu_images ? 1 : 0);
 #if GTK_CHECK_VERSION(2, 14, 0)
-    g_key_file_set_boolean(content_gtk3, "Settings",
-                           "gtk-enable-event-sounds", app.enable_event_sound);
-    g_key_file_set_boolean(content_gtk3, "Settings",
-                           "gtk-enable-input-feedback-sounds", app.enable_input_feedback);
+    g_key_file_set_integer(content_gtk3, "Settings",
+                           "gtk-enable-event-sounds", app.enable_event_sound ? 1 : 0);
+    g_key_file_set_integer(content_gtk3, "Settings",
+                           "gtk-enable-input-feedback-sounds", app.enable_input_feedback ? 1 : 0);
 #endif
-    g_key_file_set_boolean(content_gtk3, "Settings",
-                           "gtk-xft-antialias", app.enable_antialising);
-    g_key_file_set_boolean(content_gtk3, "Settings",
-                           "gtk-xft-hinting", app.enable_hinting);
+    g_key_file_set_integer(content_gtk3, "Settings",
+                           "gtk-xft-antialias", app.enable_antialising ? 1 : 0);
+    g_key_file_set_integer(content_gtk3, "Settings",
+                           "gtk-xft-hinting", app.enable_hinting ? 1 : 0);
 
     if(app.hinting_style)
         g_key_file_set_string(content_gtk3, "Settings",
@@ -374,6 +377,11 @@ static void lxappearance_save_gtkrc()
         g_key_file_set_string(content_gtk3, "Settings",
                               "gtk-xft-rgba", app.font_rgba);
 
+    if(app.modules && app.modules[0])
+        g_key_file_set_string(content_gtk3, "Settings", "gtk-modules", app.modules);
+    else
+        g_key_file_remove_key(content_gtk3, "Settings", "gtk-modules", NULL);
+
 #if 0
     /* unfortunately we cannot set colors without XSETTINGS daemon,
        themes will override any custom settings in .gtkrc-2.0 file */
@@ -522,6 +530,7 @@ static void settings_init()
                 "gtk-xft-hinting", &app.enable_hinting,
                 "gtk-xft-hintstyle", &app.hinting_style,
                 "gtk-xft-rgba", &app.font_rgba,
+                "gtk-modules", &app.modules,
                 NULL);
     /* try to figure out cursor theme used. */
     if(!app.cursor_theme || g_strcmp0(app.cursor_theme, "default") == 0)