1 --- gtkhtml-3.29.1/gtkhtml/gtkhtml.c 2009-10-26 07:49:58.000000000 +0100
2 +++ gtkhtml-3.29.1.mod/gtkhtml/gtkhtml.c 2009-11-22 12:46:18.000000000 +0100
5 static GtkLayoutClass *parent_class = NULL;
7 -static GConfClient *gconf_client = NULL;
8 -static GError *gconf_error = NULL;
9 +//static GConfClient *gconf_client = NULL;
10 +//static GError *gconf_error = NULL;
17 if (html->priv->notify_monospace_font_id) {
18 - gconf_client_notify_remove (gconf_client, html->priv->notify_monospace_font_id);
19 + //gconf_client_notify_remove (gconf_client, html->priv->notify_monospace_font_id);
20 html->priv->notify_monospace_font_id = 0;
24 static cairo_font_options_t *
25 get_font_options (void)
27 - gchar *antialiasing, *hinting, *subpixel_order;
28 - GConfClient *gconf = gconf_client_get_default ();
29 + //gchar *antialiasing, *hinting, *subpixel_order;
30 + //GConfClient *gconf = gconf_client_get_default ();
31 cairo_font_options_t *font_options = cairo_font_options_create ();
34 - antialiasing = gconf_client_get_string (gconf,
35 - "/desktop/gnome/font_rendering/antialiasing", NULL);
36 - if (antialiasing == NULL) {
37 - cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
39 - if (strcmp (antialiasing, "grayscale") == 0)
40 - cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY);
41 - else if (strcmp (antialiasing, "rgba") == 0)
42 - cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
43 - else if (strcmp (antialiasing, "none") == 0)
44 - cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_NONE);
46 - cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
48 - hinting = gconf_client_get_string (gconf,
49 - "/desktop/gnome/font_rendering/hinting", NULL);
50 - if (hinting == NULL) {
51 - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_DEFAULT);
53 - if (strcmp (hinting, "full") == 0)
54 - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_FULL);
55 - else if (strcmp (hinting, "medium") == 0)
56 - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_MEDIUM);
57 - else if (strcmp (hinting, "slight") == 0)
58 - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_SLIGHT);
59 - else if (strcmp (hinting, "none") == 0)
60 - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
62 - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_DEFAULT);
64 - subpixel_order = gconf_client_get_string (gconf,
65 - "/desktop/gnome/font_rendering/rgba_order", NULL);
66 - if (subpixel_order == NULL) {
67 - cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
69 - if (strcmp (subpixel_order, "rgb") == 0)
70 - cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_RGB);
71 - else if (strcmp (subpixel_order, "bgr") == 0)
72 - cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_BGR);
73 - else if (strcmp (subpixel_order, "vrgb") == 0)
74 - cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_VRGB);
75 - else if (strcmp (subpixel_order, "vbgr") == 0)
76 - cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_VBGR);
78 - cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
80 - g_free (antialiasing);
82 - g_free (subpixel_order);
83 - g_object_unref (gconf);
84 + //antialiasing = gconf_client_get_string (gconf,
85 + // "/desktop/gnome/font_rendering/antialiasing", NULL);
86 + //if (antialiasing == NULL) {
87 + // cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
89 + // if (strcmp (antialiasing, "grayscale") == 0)
90 + // cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY);
91 + // else if (strcmp (antialiasing, "rgba") == 0)
92 + // cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
93 + // else if (strcmp (antialiasing, "none") == 0)
94 + // cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_NONE);
96 + // cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
98 + cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
99 + //hinting = gconf_client_get_string (gconf,
100 + // "/desktop/gnome/font_rendering/hinting", NULL);
101 + //if (hinting == NULL) {
102 + // cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_DEFAULT);
104 + // if (strcmp (hinting, "full") == 0)
105 + // cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_FULL);
106 + // else if (strcmp (hinting, "medium") == 0)
107 + // cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_MEDIUM);
108 + // else if (strcmp (hinting, "slight") == 0)
109 + // cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_SLIGHT);
110 + // else if (strcmp (hinting, "none") == 0)
111 + // cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
113 + // cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_DEFAULT);
115 + cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_DEFAULT);
116 + //subpixel_order = gconf_client_get_string (gconf,
117 + // "/desktop/gnome/font_rendering/rgba_order", NULL);
118 + //if (subpixel_order == NULL) {
119 + // cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
121 + // if (strcmp (subpixel_order, "rgb") == 0)
122 + // cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_RGB);
123 + // else if (strcmp (subpixel_order, "bgr") == 0)
124 + // cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_BGR);
125 + // else if (strcmp (subpixel_order, "vrgb") == 0)
126 + // cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_VRGB);
127 + // else if (strcmp (subpixel_order, "vbgr") == 0)
128 + // cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_VBGR);
130 + // cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
132 + cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
133 + //g_free (antialiasing);
134 + //g_free (hinting);
135 + //g_free (subpixel_order);
136 + //g_object_unref (gconf);
140 @@ -913,36 +916,36 @@
141 font_var_points = !pango_font_description_get_size_is_absolute (style->font_desc);
143 gtk_widget_style_get (GTK_WIDGET (top_level), "fixed_font_name", &fixed_name, NULL);
145 - fixed_desc = pango_font_description_from_string (fixed_name);
146 - if (pango_font_description_get_family (fixed_desc)) {
147 - fixed_size = pango_font_description_get_size (fixed_desc);
148 - fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc);
149 - fixed_family = pango_font_description_get_family (fixed_desc);
151 - g_free (fixed_name);
157 - GConfClient *gconf;
159 - gconf = gconf_client_get_default ();
160 - fixed_name = gconf_client_get_string (gconf, "/desktop/gnome/interface/monospace_font_name", NULL);
162 - fixed_desc = pango_font_description_from_string (fixed_name);
164 - fixed_size = pango_font_description_get_size (fixed_desc);
165 - fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc);
166 - fixed_family = pango_font_description_get_family (fixed_desc);
168 - g_free (fixed_name);
172 - g_object_unref (gconf);
174 + //if (fixed_name) {
175 + // fixed_desc = pango_font_description_from_string (fixed_name);
176 + // if (pango_font_description_get_family (fixed_desc)) {
177 + // fixed_size = pango_font_description_get_size (fixed_desc);
178 + // fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc);
179 + // fixed_family = pango_font_description_get_family (fixed_desc);
181 + // g_free (fixed_name);
182 + // fixed_name = NULL;
186 + //if (!fixed_name) {
187 + // //GConfClient *gconf;
189 + // //gconf = gconf_client_get_default ();
190 + // //fixed_name = gconf_client_get_string (gconf, "/desktop/gnome/interface/monospace_font_name", NULL);
191 + // if (fixed_name) {
192 + // fixed_desc = pango_font_description_from_string (fixed_name);
193 + // if (fixed_desc) {
194 + // fixed_size = pango_font_description_get_size (fixed_desc);
195 + // fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc);
196 + // fixed_family = pango_font_description_get_family (fixed_desc);
198 + // g_free (fixed_name);
199 + // fixed_name = NULL;
202 + // //g_object_unref (gconf);
206 fixed_family = "Monospace";
207 @@ -2365,22 +2368,22 @@
208 if (!klass->properties) {
209 klass->properties = gtk_html_class_properties_new (GTK_WIDGET (html));
211 - if (!gconf_is_initialized ()) {
212 - gchar *argv[] = { (gchar *) "gtkhtml", NULL };
213 + //if (!gconf_is_initialized ()) {
214 + // gchar *argv[] = { (gchar *) "gtkhtml", NULL };
216 - g_warning ("gconf is not initialized, please call gconf_init before using GtkHTML library. "
217 - "Meanwhile it's initialized by gtkhtml itself.");
218 - gconf_init (1, argv, &gconf_error);
220 - g_error ("gconf error: %s\n", gconf_error->message);
223 - gconf_client = gconf_client_get_default ();
225 - g_error ("cannot create gconf_client\n");
226 - gconf_client_add_dir (gconf_client, GTK_HTML_GCONF_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, &gconf_error);
228 - g_error ("gconf error: %s\n", gconf_error->message);
229 + // g_warning ("gconf is not initialized, please call gconf_init before using GtkHTML library. "
230 + // "Meanwhile it's initialized by gtkhtml itself.");
231 + // //gconf_init (1, argv, &gconf_error);
232 + // //if (gconf_error)
233 + // // g_error ("gconf error: %s\n", gconf_error->message);
236 + //gconf_client = gconf_client_get_default ();
237 + //if (!gconf_client)
238 + // g_error ("cannot create gconf_client\n");
239 + //gconf_client_add_dir (gconf_client, GTK_HTML_GCONF_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, &gconf_error);
241 + // g_error ("gconf error: %s\n", gconf_error->message);
245 @@ -2748,41 +2751,41 @@
250 -read_key_theme (GtkHTMLClass *html_class)
254 - key_theme = gconf_client_get_string (gconf_client_get_default (), "/desktop/gnome/interface/gtk_key_theme", NULL);
255 - html_class->use_emacs_bindings = key_theme && !strcmp (key_theme, "Emacs");
256 - g_free (key_theme);
260 -client_notify_key_theme (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer data)
262 - read_key_theme ((GtkHTMLClass *) data);
266 -client_notify_monospace_font (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer data)
268 - GtkHTML *html = (GtkHTML *) data;
269 - HTMLEngine *e = html->engine;
270 - if (e && e->painter) {
271 - gtk_html_set_fonts (html, e->painter);
272 - html_engine_refresh_fonts (e);
277 -client_notify_cursor_blink (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer data)
279 - if (gconf_client_get_bool (client, "/desktop/gnome/interface/cursor_blink", NULL))
280 - html_engine_set_cursor_blink_timeout (gconf_client_get_int (client, "/desktop/gnome/interface/cursor_blink_time", NULL) / 2);
282 - html_engine_set_cursor_blink_timeout (0);
285 +//read_key_theme (GtkHTMLClass *html_class)
287 +// gchar *key_theme;
289 +// key_theme = gconf_client_get_string (gconf_client_get_default (), "/desktop/gnome/interface/gtk_key_theme", NULL);
290 +// html_class->use_emacs_bindings = key_theme && !strcmp (key_theme, "Emacs");
291 +// g_free (key_theme);
295 +//client_notify_key_theme (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer data)
297 +// read_key_theme ((GtkHTMLClass *) data);
301 +//client_notify_monospace_font (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer data)
303 +// GtkHTML *html = (GtkHTML *) data;
304 +// HTMLEngine *e = html->engine;
305 +// if (e && e->painter) {
306 +// gtk_html_set_fonts (html, e->painter);
307 +// html_engine_refresh_fonts (e);
312 +//client_notify_cursor_blink (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer data)
314 +// if (gconf_client_get_bool (client, "/desktop/gnome/interface/cursor_blink", NULL))
315 +// html_engine_set_cursor_blink_timeout (gconf_client_get_int (client, "/desktop/gnome/interface/cursor_blink_time", NULL) / 2);
317 +// html_engine_set_cursor_blink_timeout (0);
321 gtk_html_direction_changed (GtkWidget *widget, GtkTextDirection previous_dir)
322 @@ -2823,7 +2826,7 @@
323 GtkLayoutClass *layout_class;
324 GtkContainerClass *container_class;
326 - GConfClient *client;
327 + //GConfClient *client;
329 html_class = (GtkHTMLClass *) klass;
331 @@ -3176,18 +3179,18 @@
332 gtk_rc_parse (filename);
334 html_class->emacs_bindings = gtk_binding_set_find ("gtkhtml-bindings-emacs");
335 - read_key_theme (html_class);
336 + //read_key_theme (html_class);
338 - client = gconf_client_get_default ();
339 + //client = gconf_client_get_default ();
341 - gconf_client_notify_add (client, "/desktop/gnome/interface/gtk_key_theme",
342 - client_notify_key_theme, html_class, NULL, &gconf_error);
343 + //gconf_client_notify_add (client, "/desktop/gnome/interface/gtk_key_theme",
344 + // client_notify_key_theme, html_class, NULL, &gconf_error);
346 - gconf_client_notify_add (client, "/desktop/gnome/interface/cursor_blink", client_notify_cursor_blink, NULL, NULL, NULL);
347 - gconf_client_notify_add (client, "/desktop/gnome/interface/cursor_blink_time", client_notify_cursor_blink, NULL, NULL, NULL);
348 - client_notify_cursor_blink (client, 0, NULL, NULL);
349 + //gconf_client_notify_add (client, "/desktop/gnome/interface/cursor_blink", client_notify_cursor_blink, NULL, NULL, NULL);
350 + //gconf_client_notify_add (client, "/desktop/gnome/interface/cursor_blink_time", client_notify_cursor_blink, NULL, NULL, NULL);
351 + //client_notify_cursor_blink (client, 0, NULL, NULL);
353 - g_object_unref (client);
354 + //g_object_unref (client);
358 @@ -3195,8 +3198,8 @@
360 setup_class_properties (html);
363 - gconf_client = gconf_client_get_default ();
364 + //if (!gconf_client)
365 + // gconf_client = gconf_client_get_default ();
369 @@ -3478,9 +3481,9 @@
370 g_signal_connect (G_OBJECT (html->priv->im_context), "delete_surrounding",
371 G_CALLBACK (gtk_html_im_delete_surrounding_cb), html);
373 - html->priv->notify_monospace_font_id =
374 - gconf_client_notify_add (gconf_client_get_default (), "/desktop/gnome/interface/monospace_font_name",
375 - client_notify_monospace_font, html, NULL, &gconf_error);
376 + //html->priv->notify_monospace_font_id =
377 + // gconf_client_notify_add (gconf_client_get_default (), "/desktop/gnome/interface/monospace_font_name",
378 + // client_notify_monospace_font, html, NULL, &gconf_error);
380 gtk_html_construct (html);
382 @@ -3579,7 +3582,7 @@
383 g_signal_connect (G_OBJECT (html->engine), "object_requested",
384 G_CALLBACK (html_engine_object_requested_cb), html);
386 - init_properties_widget (html);
387 + //init_properties_widget (html);
391 @@ -6044,7 +6047,7 @@
393 gtk_html_build_with_gconf (void)
400 --- gtkhtml-3.29.1/gtkhtml/gtkhtml-properties.h 2009-06-26 13:14:48.000000000 +0200
401 +++ gtkhtml-3.29.1.mod/gtkhtml/gtkhtml-properties.h 2009-11-22 12:20:54.000000000 +0100
403 #define GTK_HTML_GNOME_CONFIG_PREFIX "/gtkhtml/Settings/"
406 -#include <gconf/gconf-client.h>
407 +//#include <gconf/gconf-client.h>
409 #include "gtkhtml-types.h"
412 void gtk_html_class_properties_destroy (GtkHTMLClassProperties *p);
413 void gtk_html_class_properties_copy (GtkHTMLClassProperties *p1,
414 GtkHTMLClassProperties *p2);
415 -void gtk_html_class_properties_load (GtkHTMLClassProperties *p,
416 - GConfClient *client);
417 -void gtk_html_class_properties_update (GtkHTMLClassProperties *p,
418 - GConfClient *client,
419 - GtkHTMLClassProperties *old);
420 +//void gtk_html_class_properties_load (GtkHTMLClassProperties *p,
421 +// GConfClient *client);
422 +//void gtk_html_class_properties_update (GtkHTMLClassProperties *p,
423 +// GConfClient *client,
424 +// GtkHTMLClassProperties *old);
428 --- gtkhtml-3.29.1/gtkhtml/gtkhtml-properties.c 2009-10-23 12:26:15.000000000 +0200
429 +++ gtkhtml-3.29.1.mod/gtkhtml/gtkhtml-properties.c 2009-12-11 00:57:25.000000000 +0100
430 @@ -102,20 +102,20 @@
435 -gtk_html_class_properties_load (GtkHTMLClassProperties *p, GConfClient *client)
439 +//gtk_html_class_properties_load (GtkHTMLClassProperties *p, GConfClient *client)
443 #define SET(t,x,prop) \
444 { key = g_strconcat (GTK_HTML_GCONF_DIR, x, NULL); \
445 gconf_client_set_ ## t (client, key, p->prop, NULL); \
449 -gtk_html_class_properties_update (GtkHTMLClassProperties *p, GConfClient *client, GtkHTMLClassProperties *old)
453 +//gtk_html_class_properties_update (GtkHTMLClassProperties *p, GConfClient *client, GtkHTMLClassProperties *old)