Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.1:Update
scim-canna
gtk-2.4+-combobox-migration.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtk-2.4+-combobox-migration.patch of Package scim-canna
diff -urN scim-canna-1.0.0.orig/src/scim_canna_imengine_setup.cpp scim-canna-1.0.0/src/scim_canna_imengine_setup.cpp --- scim-canna-1.0.0.orig/src/scim_canna_imengine_setup.cpp 2012-06-12 16:03:17.658651082 +0800 +++ scim-canna-1.0.0/src/scim_canna_imengine_setup.cpp 2012-06-12 23:35:08.360720666 +0800 @@ -344,23 +344,22 @@ (GtkAttachOptions) (GTK_FILL), 4, 4); gtk_widget_show (label); - entry->widget = gtk_combo_new (); + entry->widget = gtk_combo_box_text_new_with_entry (); + GtkWidget *entry_inner = gtk_bin_get_child (GTK_BIN (entry->widget)); gtk_label_set_mnemonic_widget (GTK_LABEL (label), - GTK_COMBO (entry->widget)->entry); - gtk_combo_set_value_in_list (GTK_COMBO (entry->widget), TRUE, FALSE); - gtk_combo_set_case_sensitive (GTK_COMBO (entry->widget), TRUE); - gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (entry->widget)->entry), + entry_inner); + gtk_editable_set_editable (GTK_EDITABLE (entry_inner), FALSE); gtk_widget_show (GTK_WIDGET (entry->widget)); gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (entry->widget), 1, 2, idx, idx + 1, (GtkAttachOptions) (GTK_FILL|GTK_EXPAND), (GtkAttachOptions) (GTK_FILL), 4, 4); - g_object_set_data (G_OBJECT (GTK_COMBO (entry->widget)->entry), + g_object_set_data (G_OBJECT (entry_inner), DATA_POINTER_KEY, (gpointer) candidates_p); - g_signal_connect ((gpointer) GTK_COMBO (entry->widget)->entry, "changed", + g_signal_connect ((gpointer) entry_inner, "changed", G_CALLBACK (on_default_combo_changed), entry); @@ -535,27 +534,23 @@ } static void -setup_combo_value (GtkCombo *combo, const String & str) +setup_combo_value (GtkComboBoxText *combo, const String & str) { - GList *list = NULL; const char *defval = NULL; ComboConfigCandidate *data = static_cast<ComboConfigCandidate*> - (g_object_get_data (G_OBJECT (GTK_COMBO(combo)->entry), + (g_object_get_data (G_OBJECT (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo)))), DATA_POINTER_KEY)); for (unsigned int i = 0; data[i].label; i++) { - list = g_list_append (list, (gpointer) _(data[i].label)); + gtk_combo_box_text_append_text (combo, _(data[i].label)); if (!strcmp (data[i].data, str.c_str ())) defval = _(data[i].label); } - gtk_combo_set_popdown_strings (combo, list); - g_list_free (list); - if (defval) - gtk_entry_set_text (GTK_ENTRY (combo->entry), defval); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo))), defval); } static void @@ -570,8 +565,8 @@ for (unsigned int i = 0; i < __config_string_common_num; i++) { StringConfigData &entry = __config_string_common[i]; - if (entry.widget && GTK_IS_COMBO (entry.widget)) - setup_combo_value (GTK_COMBO (entry.widget), entry.value); + if (entry.widget && GTK_IS_COMBO_BOX (entry.widget)) + setup_combo_value (GTK_COMBO_BOX_TEXT (entry.widget), entry.value); else if (entry.widget && GTK_IS_ENTRY (entry.widget)) gtk_entry_set_text (GTK_ENTRY (entry.widget), entry.value.c_str ());
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