File gtk-2.12+-gtktooltips-migration.patch of Package novel-pinyin
diff -urN novel-pinyin-0.2.4.orig/modules/scim/novel_pinyin_imengine_setup.cpp novel-pinyin-0.2.4/modules/scim/novel_pinyin_imengine_setup.cpp
--- novel-pinyin-0.2.4.orig/modules/scim/novel_pinyin_imengine_setup.cpp 2012-06-12 20:56:35.391649146 +0800
+++ novel-pinyin-0.2.4/modules/scim/novel_pinyin_imengine_setup.cpp 2012-06-12 21:02:29.878217454 +0800
@@ -297,8 +297,6 @@
NULL, NULL, NULL
};
-static GtkTooltips * __widget_tooltips = 0;
-
// Common callbacks
static void
__on_default_editable_changed (GtkEditable *editable,
@@ -350,8 +348,6 @@
GtkWidget *hbox;
GtkWidget *separator;
- __widget_tooltips = gtk_tooltips_new ();
-
// Create the Notebook.
notebook = gtk_notebook_new ();
gtk_widget_show (notebook);
@@ -514,7 +510,7 @@
gtk_table_attach (GTK_TABLE (table), __config_keyboards[i].entry, 1, 2, i, i+1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_entry_set_editable (GTK_ENTRY (__config_keyboards[i].entry), FALSE);
+ gtk_editable_set_editable (GTK_EDITABLE (__config_keyboards[i].entry), FALSE);
__config_keyboards[i].button = gtk_button_new_with_label ("...");
gtk_widget_show (__config_keyboards[i].button);
@@ -570,47 +566,47 @@
}
- // Set all tooltips.
+ // Set all tooltip.
- gtk_tooltips_set_tip (__widget_tooltips, __widget_auto_fill_preedit,
+ gtk_widget_set_tooltip_text (__widget_auto_fill_preedit,
_("Fill the preedit string automatically "
- "by a smart matching algorithm."), NULL);
+ "by a smart matching algorithm."));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_always_show_lookup,
+ gtk_widget_set_tooltip_text (__widget_always_show_lookup,
_("Lookup table will be always shown "
- "when there are any candidate phrases."), NULL);
+ "when there are any candidate phrases."));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_show_all_keys,
+ gtk_widget_set_tooltip_text (__widget_show_all_keys,
_("All inputed keys will be shown, "
"this option is only valid when "
- "\"Auto fill preedit\" is checked."), NULL);
+ "\"Auto fill preedit\" is checked."));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_dynamic_adjust,
+ gtk_widget_set_tooltip_text (__widget_dynamic_adjust,
_("Phrase library will be adjusted dynamically "
"according to the inputed contents. "
"The changed part of the phrase library will be "
- "stored in the user's local files."), NULL);
+ "stored in the user's local files."));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_save_period,
+ gtk_widget_set_tooltip_text (__widget_save_period,
_("Time period, in seconds, to "
- "save the user data."), NULL);
+ "save the user data."));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_tone,
+ gtk_widget_set_tooltip_text (__widget_tone,
_("Tone information will be used "
- "in matching the pinyin key."), NULL);
+ "in matching the pinyin key."));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_incomplete,
+ gtk_widget_set_tooltip_text (__widget_incomplete,
_("Pinyin keys which only have the initial part (Sheng Mu) "
- "will be allowed. "), NULL);
+ "will be allowed. "));
- gtk_tooltips_set_tip (__widget_tooltips, __widget_ambiguities [0],
+ gtk_widget_set_tooltip_text (__widget_ambiguities [0],
_("The following options control the ambiguous "
"behaviour of the pinyin matching algorithm, "
- "useful if the user cannot distinguish between them."), NULL);
+ "useful if the user cannot distinguish between them."));
for (i = 0; __config_keyboards [i].key; ++ i) {
- gtk_tooltips_set_tip (__widget_tooltips, __config_keyboards [i].entry,
- _(__config_keyboards [i].tooltip), NULL);
+ gtk_widget_set_tooltip_text (__config_keyboards [i].entry,
+ _(__config_keyboards [i].tooltip));
}
window = notebook;