5 > GString* content_gtk3 = g_string_sized_new(512);
7 > g_string_append(content_gtk3,
8 > "# DO NOT EDIT! This file will be overwritten by LXAppearance.\n\n");
10 < g_string_append_printf(content,
12 > {g_string_append_printf(content,
14 > g_string_append_printf(content_gtk3,
15 > "gtk-theme-name=%s\n", app.widget_theme);};
17 < g_string_append_printf(content,
19 > {g_string_append_printf(content,
21 > g_string_append_printf(content_gtk3,
22 > "gtk-icon-theme-name=%s\n", app.icon_theme);};
24 < g_string_append_printf(content,
26 > {g_string_append_printf(content,
28 > g_string_append_printf(content_gtk3,
29 > "gtk-font-name=%s\n", app.default_font);};
31 < g_string_append_printf(content,
33 > {g_string_append_printf(content,
35 > g_string_append_printf(content_gtk3,
36 > "gtk-cursor-theme-name=%s\n", app.cursor_theme);};
39 > g_string_append_printf(content_gtk3,
40 > "gtk-cursor-theme-size=%d\n"
41 > "gtk-toolbar-style=%s\n"
42 > "gtk-toolbar-icon-size=%s\n"
43 > "gtk-button-images=%d\n"
44 > "gtk-menu-images=%d\n"
45 > #if GTK_CHECK_VERSION(2, 14, 0)
46 > "gtk-enable-event-sounds=%d\n"
47 > "gtk-enable-input-feedback-sounds=%d\n"
49 > "gtk-xft-antialias=%d\n"
50 > "gtk-xft-hinting=%d\n"
52 > , app.cursor_theme_size,
53 > tb_styles[app.toolbar_style],
54 > tb_icon_sizes[app.toolbar_icon_size],
55 > app.button_images ? 1 : 0,
56 > app.menu_images ? 1 : 0,
57 > #if GTK_CHECK_VERSION(2, 14, 0)
58 > app.enable_event_sound ? 1 : 0,
59 > app.enable_input_feedback ? 1 : 0,
61 > app.enable_antialising ? 1 : 0,
62 > app.enable_hinting ? 1 : 0
65 < g_string_append_printf(content,
67 > {g_string_append_printf(content,
69 > g_string_append_printf(content_gtk3,
70 > "gtk-xft-hintstyle=%s\n", app.hinting_style);};
72 < g_string_append_printf(content,
74 > {g_string_append_printf(content,
76 > g_string_append_printf(content_gtk3,
77 > "gtk-xft-rgba=%s\n", app.font_rgba);};
79 > g_string_append_printf(content_gtk3,
80 > "gtk-color-scheme=%s\n",
83 > g_string_append_printf(content_gtk3, "\n");
85 < g_string_prepend(content, "[Settings] \n");
86 < char* file_path_gtk3 = g_build_filename(g_get_home_dir(), "gtk-3.0", NULL);
87 < char* file_path_settings = g_build_filename(g_get_home_dir(), "gtk-3.0", "settings.ini", NULL);
89 > g_string_prepend(content_gtk3, "[Settings] \n");
90 > char* file_path_gtk3 = g_build_filename(getenv("XDG_CONFIG_HOME"), "gtk-3.0", NULL);
91 > char* file_path_settings = g_build_filename(getenv("XDG_CONFIG_HOME"), "gtk-3.0", "settings.ini", NULL);
93 < g_file_set_contents(file_path_settings, content->str, content->len, NULL);
95 > g_file_set_contents(file_path_settings, content_gtk3->str, content_gtk3->len, NULL);
97 > g_string_free(content_gtk3, TRUE);
100 > g_free(file_path_gtk3);
101 > g_free(file_path_settings);