blob: 2091324c74b865a869a8a76db845414c8b737381 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
/*
* Copyright (C) 2007 The GNOME Foundation
* Written by Thomas Wood <thos@gnome.org>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libmate-desktop/mate-desktop-thumbnail.h>
#include "mate-theme-info.h"
#define APPEARANCE_SCHEMA "org.mate.control-center.appearance"
#define MORE_THEMES_URL_KEY "more-themes-url"
#define MORE_BACKGROUNDS_URL_KEY "more-backgrounds-url"
#define WP_SCHEMA "org.mate.background"
#define WP_FILE_KEY "picture-filename"
#define WP_OPTIONS_KEY "picture-options"
#define WP_SHADING_KEY "color-shading-type"
#define WP_PCOLOR_KEY "primary-color"
#define WP_SCOLOR_KEY "secondary-color"
#define INTERFACE_SCHEMA "org.mate.interface"
#define GTK_FONT_KEY "font-name"
#define MONOSPACE_FONT_KEY "monospace-font-name"
#define DOCUMENT_FONT_KEY "document-font-name"
#define GTK_THEME_KEY "gtk-theme"
#define ICON_THEME_KEY "icon-theme"
#define COLOR_SCHEME_KEY "gtk-color-scheme"
#define GTK_FONT_DEFAULT_VALUE "Sans 10"
#define LOCKDOWN_SCHEMA "org.mate.lockdown"
#define DISABLE_THEMES_SETTINGS_KEY "disable-theme-settings"
#define CAJA_SCHEMA "org.mate.caja.desktop"
#define DESKTOP_FONT_KEY "font"
#define MARCO_SCHEMA "org.mate.Marco.general"
#define MARCO_THEME_KEY "theme"
#define WINDOW_TITLE_FONT_KEY "titlebar-font"
#define WINDOW_TITLE_USES_SYSTEM_KEY "titlebar-uses-system-font"
#define NOTIFICATION_SCHEMA "org.mate.NotificationDaemon"
#define NOTIFICATION_THEME_KEY "theme"
#define MOUSE_SCHEMA "org.mate.peripherals-mouse"
#define CURSOR_THEME_KEY "cursor-theme"
#define CURSOR_SIZE_KEY "cursor-size"
#ifdef HAVE_XFT2
#define FONT_RENDER_SCHEMA "org.mate.font-rendering"
#define FONT_ANTIALIASING_KEY "antialiasing"
#define FONT_HINTING_KEY "hinting"
#define FONT_RGBA_ORDER_KEY "rgba-order"
#define FONT_DPI_KEY "dpi"
#endif /* HAVE_XFT2 */
typedef struct {
GSettings* settings;
GSettings* wp_settings;
GSettings* caja_settings;
GSettings* interface_settings;
GSettings* marco_settings;
GSettings* mouse_settings;
#ifdef HAVE_XFT2
GSettings* font_settings;
#endif /* HAVE_XFT2 */
GtkBuilder* ui;
MateDesktopThumbnailFactory* thumb_factory;
gulong screen_size_handler;
gulong screen_monitors_handler;
/* desktop */
GHashTable* wp_hash;
GtkIconView* wp_view;
GtkTreeModel* wp_model;
GtkWidget* wp_scpicker;
GtkWidget* wp_pcpicker;
GtkWidget* wp_style_menu;
GtkWidget* wp_color_menu;
GtkWidget* wp_rem_button;
GtkFileChooser* wp_filesel;
GtkWidget* wp_image;
GSList* wp_uris;
gint frame;
gint thumb_width;
gint thumb_height;
/* font */
GtkWidget* font_details;
GSList* font_groups;
/* themes */
GtkListStore* theme_store;
MateThemeMetaInfo* theme_custom;
GdkPixbuf* theme_icon;
GtkWidget* theme_save_dialog;
GtkWidget* theme_message_area;
GtkWidget* theme_message_label;
GtkWidget* apply_background_button;
GtkWidget* revert_font_button;
GtkWidget* apply_font_button;
GtkWidget* install_button;
GtkWidget* theme_info_icon;
GtkWidget* theme_error_icon;
gchar* revert_application_font;
gchar* revert_documents_font;
gchar* revert_desktop_font;
gchar* revert_windowtitle_font;
gchar* revert_monospace_font;
/* style */
GdkPixbuf* gtk_theme_icon;
GdkPixbuf* window_theme_icon;
GdkPixbuf* icon_theme_icon;
GtkWidget* style_message_area;
GtkWidget* style_message_label;
GtkWidget* style_install_button;
} AppearanceData;
#define appearance_capplet_get_widget(x, y) (GtkWidget*) gtk_builder_get_object(x->ui, y)
|