summaryrefslogtreecommitdiff
path: root/inputmethod/scim-tomoe/patches/patch-ab
blob: 9946cf24cf3f7c85d3e4b2501b754f6b7c65ff48 (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
$NetBSD: patch-ab,v 1.1.2.1 2010/07/04 07:18:43 agc Exp $

* GtkSpinButton: setting an adjustment with non-zero page size is deprecated
* support gucharmap-2

--- src/scim_tomoe_prefs_widget.cpp.orig	2007-05-07 07:49:15.000000000 +0000
+++ src/scim_tomoe_prefs_widget.cpp
@@ -170,7 +170,7 @@ create_spin_button (ScimTomoePrefsWidget
     gtk_widget_show (label);
 
     GtkObject *adj = gtk_adjustment_new (value, min, max, step,
-                                         page_size, page_size);
+                                         page_size, 0.0);
     GtkWidget *spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0.0, 0);
     g_object_set_data (G_OBJECT (spin),
                        OBJECT_DATA_CONFIG_KEY, (gpointer) key);
@@ -472,9 +472,13 @@ apply_config (ScimTomoePrefsWidget *pref
         String (SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT_DEFAULT));
 
     if (font.length() > 0) {
-        gucharmap_charmap_set_font (charmap, font.c_str ());
+        PangoFontDescription *desc = pango_font_description_from_string(font.c_str ());
+        gucharmap_charmap_set_font_desc (charmap, desc);
+        pango_font_description_free (desc);
     } else {
-        gucharmap_charmap_set_font (charmap, NULL);
+        PangoFontDescription *desc = pango_font_description_new ();
+        gucharmap_charmap_set_font_desc (charmap, desc);
+        pango_font_description_free (desc);
         set_default_font (prefs, SCIM_TOMOE_CONFIG_CAND_FONT,
                           GTK_WIDGET (charmap));
     }