File gtk-2.12+-gtktooltips-migration.patch of Package scim-hangul
diff -urN scim-hangul-0.3.2.orig/src/scim_hangul_imengine_setup.cpp scim-hangul-0.3.2/src/scim_hangul_imengine_setup.cpp
--- scim-hangul-0.3.2.orig/src/scim_hangul_imengine_setup.cpp 2012-06-06 21:16:11.461171489 +0800
+++ scim-hangul-0.3.2/src/scim_hangul_imengine_setup.cpp 2012-06-07 14:26:15.325313207 +0800
@@ -225,15 +225,9 @@
on_default_combo_box_changed (GtkComboBox *combobox,
gpointer user_data);
-static GtkWidget *
-create_options_page(GtkTooltips *tooltip);
-
-static GtkWidget *
-create_keyboard_page(GtkTooltips *tooltip);
-
// Function implementations.
static GtkWidget *
-create_options_page(GtkTooltips *tooltips)
+create_options_page()
{
GtkWidget *vbox;
GtkWidget *button;
@@ -243,25 +237,25 @@
button = gtk_check_button_new_with_mnemonic (_("_Use ascii input mode"));
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
- gtk_tooltips_set_tip(tooltips, button,
+ gtk_widget_set_tooltip_text(button,
_("Whether to enable to change the input mode "
- "between hangul and ascii mode."), NULL);
+ "between hangul and ascii mode."));
g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(on_default_toggle_button_toggled), NULL);
use_ascii_mode_button = button;
button = gtk_check_button_new_with_mnemonic (_("_Show candidate comment"));
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
- gtk_tooltips_set_tip(tooltips, button,
- _("Whether to show the comment of candidates or not."), NULL);
+ gtk_widget_set_tooltip_text(button,
+ _("Whether to show the comment of candidates or not."));
g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(on_default_toggle_button_toggled), NULL);
show_candidate_comment_button = button;
button = gtk_check_button_new_with_mnemonic (_("_Commit by word"));
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
- gtk_tooltips_set_tip(tooltips, button,
- _("Whether not to commit until any non-hangul character is inputed."), NULL);
+ gtk_widget_set_tooltip_text(button,
+ _("Whether not to commit until any non-hangul character is inputed."));
g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(on_default_toggle_button_toggled), NULL);
commit_by_word_button = button;
@@ -270,7 +264,7 @@
}
static GtkWidget *
-create_keyboard_page(GtkTooltips *tooltips)
+create_keyboard_page()
{
unsigned int i;
@@ -293,14 +287,14 @@
GtkWidget *vbox2 = gtk_vbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, TRUE, 0);
- GtkWidget *combo_box = gtk_combo_box_new_text();
+ GtkWidget *combo_box = gtk_combo_box_text_new();
gtk_box_pack_start(GTK_BOX(vbox2), combo_box, FALSE, TRUE, 0);
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("2bul"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("3bul 2bul-shifted"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("3bul Final"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("3bul 390"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("3bul No-Shift"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("3bul Yetgeul"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("2bul"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("3bul 2bul-shifted"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("3bul Final"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("3bul 390"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("3bul No-Shift"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("3bul Yetgeul"));
g_signal_connect(G_OBJECT(combo_box), "changed",
G_CALLBACK (on_default_combo_box_changed), NULL);
keyboard_layout_combo = combo_box;
@@ -338,7 +332,7 @@
gtk_table_attach (GTK_TABLE (table), key_bindings[i].entry, 1, 2, i, i+1,
(GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
(GtkAttachOptions) (GTK_FILL), 4, 4);
- gtk_entry_set_editable (GTK_ENTRY (key_bindings[i].entry), FALSE);
+ gtk_editable_set_editable (GTK_EDITABLE (key_bindings[i].entry), FALSE);
gtk_entry_set_text (GTK_ENTRY (key_bindings[i].entry),
key_bindings[i].data.c_str());
@@ -354,8 +348,8 @@
g_signal_connect(G_OBJECT(key_bindings[i].entry), "changed",
G_CALLBACK (on_default_editable_changed), NULL);
- gtk_tooltips_set_tip(tooltips, key_bindings[i].entry,
- _(key_bindings[i].tooltip), NULL);
+ gtk_widget_set_tooltip_text(key_bindings[i].entry,
+ _(key_bindings[i].tooltip));
}
return vbox1;
@@ -367,20 +361,17 @@
GtkWidget *notebook;
GtkWidget *label;
GtkWidget *page;
- GtkTooltips *tooltips;
-
- tooltips = gtk_tooltips_new ();
// Create the Notebook.
notebook = gtk_notebook_new ();
// Create the first page.
- page = create_keyboard_page(tooltips);
+ page = create_keyboard_page();
label = gtk_label_new (_("Keyboard"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
// Create the second page.
- page = create_options_page(tooltips);
+ page = create_options_page();
label = gtk_label_new (_("Options"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);