Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:FactoryCandidates
scim-sunpinyin
scim-sunpinyin-remove-old-functions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File scim-sunpinyin-remove-old-functions.patch of Package scim-sunpinyin
diff --git a/src/sunpinyin_imengine_setup.cpp b/src/sunpinyin_imengine_setup.cpp index 9c26e76..1f4dcaa 100644 --- a/src/sunpinyin_imengine_setup.cpp +++ b/src/sunpinyin_imengine_setup.cpp @@ -130,13 +130,20 @@ on_value_changed(GtkWidget * widget, } static GtkWidget * +#if GTK_CHECK_VERSION(2, 12, 0) +create_options_page(GtkTooltip *tooltips) +#else create_options_page(GtkTooltips *tooltips) +#endif { GtkWidget *vbox; GtkWidget *label; GtkWidget *button; - +#if GTK_CHECK_VERSION(3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#else vbox = gtk_vbox_new (FALSE, 12); +#endif gtk_container_set_border_width(GTK_CONTAINER(vbox), 12); GtkWidget *table = gtk_table_new (2, 2, FALSE); @@ -149,17 +156,35 @@ create_options_page(GtkTooltips *tooltips) (GtkAttachOptions) (GTK_FILL), 4, 4); +#if GTK_CHECK_VERSION(2, 24, 0) + GtkWidget *combo_box = gtk_combo_box_text_new(); +#else GtkWidget *combo_box = gtk_combo_box_new_text(); +#endif gtk_table_attach (GTK_TABLE (table), combo_box, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 4, 4); +#if GTK_CHECK_VERSION(2, 24, 0) + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("Classic Style")); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("Instant Style")); +#else gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("Classic Style")); gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("Instant Style")); +#endif +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_widget_set_tooltip_text (combo_box, _("You may feel more comfortable in classic style, " + "if you are used to input methods like scim-pinyin." + " In instant style, the most possible candidate " + "word will show up in the preedit area right after " + "its pinyin is input.")); + +#else gtk_tooltips_set_tip(tooltips, combo_box, _("You may feel more comfortable in classic style, " "if you are used to input methods like scim-pinyin." " In instant style, the most possible candidate " "word will show up in the preedit area right after " "its pinyin is input."), NULL); +#endif g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(on_value_changed), NULL); input_style_combo = combo_box; @@ -170,15 +195,31 @@ create_options_page(GtkTooltips *tooltips) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 4, 4); +#if GTK_CHECK_VERSION(2, 24, 0) + combo_box = gtk_combo_box_text_new(); +#else combo_box = gtk_combo_box_new_text(); +#endif gtk_table_attach (GTK_TABLE (table), combo_box, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 4, 4); +#if GTK_CHECK_VERSION(2, 24, 0) + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("GB2312")); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("GBK")); +#else gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("GB2312")); gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("GBK")); +#endif +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_widget_set_tooltip_text (combo_box, _("Choosing GBK over GB2312 will trade some speed " + "with a larger charset in which I search candidate " + "words/characters for you.")); + +#else gtk_tooltips_set_tip(tooltips, combo_box, _("Choosing GBK over GB2312 will trade some speed " "with a larger charset in which I search candidate " "words/characters for you."), NULL); +#endif g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(on_value_changed), NULL); charset_combo = combo_box; @@ -203,7 +244,11 @@ create_options_page(GtkTooltips *tooltips) // MemoryPower GtkWidget *hbox; +#if GTK_CHECK_VERSION(3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -215,8 +260,13 @@ create_options_page(GtkTooltips *tooltips) gtk_misc_set_padding (GTK_MISC (label), 2, 0); button = gtk_spin_button_new_with_range (0, 10, 1); +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_widget_set_tooltip_text (button, _("The larger this number is, the faster I " + "memorize/forget new words.")); +#else gtk_tooltips_set_tip(tooltips, button, _("The larger this number is, the faster I " "memorize/forget new words."), NULL); +#endif g_signal_connect (G_OBJECT(button), "value_changed", G_CALLBACK(on_value_changed), NULL); gtk_widget_show (button); @@ -236,10 +286,17 @@ create_setup_window () GtkWidget *notebook; GtkWidget *label; GtkWidget *page; +#if GTK_CHECK_VERSION(2, 12, 0) + GtkTooltip *tooltips; +#else GtkTooltips *tooltips; +#endif // Create the shared tooltips. +#if GTK_CHECK_VERSION(2, 12, 0) +#else tooltips = gtk_tooltips_new (); +#endif notebook = gtk_notebook_new ();
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor