Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
scim-skk
gtk-2.24+-replace-functions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtk-2.24+-replace-functions.patch of Package scim-skk
diff -ur scim-skk-0.5.2.orig/src/scim_skk_imengine_setup.cpp scim-skk-0.5.2/src/scim_skk_imengine_setup.cpp --- scim-skk-0.5.2.orig/src/scim_skk_imengine_setup.cpp 2012-06-11 22:12:16.007565280 -0500 +++ scim-skk-0.5.2/src/scim_skk_imengine_setup.cpp 2012-06-11 22:44:07.315670643 -0500 @@ -180,7 +180,6 @@ static GtkWidget * __widget_annot_highlight = 0; static GtkWidget * __widget_ignore_return = 0; static GtkWidget * __widget_selection_style = 0; -static GtkTooltips * __widget_tooltips = 0; static KeyboardConfigData __config_keyboards_common [] = { @@ -485,16 +484,15 @@ gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 4); - *widget = gtk_combo_new (); - gtk_combo_set_value_in_list (GTK_COMBO (*widget), TRUE, FALSE); - gtk_combo_set_case_sensitive (GTK_COMBO (*widget), TRUE); - gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (*widget)->entry), FALSE); + *widget = gtk_combo_box_text_new_with_entry (); + GtkWidget *entry = gtk_bin_get_child (GTK_BIN (*widget)); + gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE); gtk_widget_show (*widget); gtk_box_pack_start (GTK_BOX (hbox), *widget, FALSE, FALSE, 4); - g_object_set_data (G_OBJECT (GTK_COMBO (*widget)->entry), DATA_POINTER_KEY, + g_object_set_data (G_OBJECT (entry), DATA_POINTER_KEY, (gpointer) candidates_p); - g_signal_connect ((gpointer) GTK_COMBO (*widget)->entry, "changed", + g_signal_connect ((gpointer) entry, "changed", G_CALLBACK (on_default_combo_changed), data_p); @@ -529,11 +527,9 @@ if (label) gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry->widget); - if (!__widget_tooltips) - __widget_tooltips = gtk_tooltips_new(); if (entry->tooltip) - gtk_tooltips_set_tip(__widget_tooltips, entry->widget, - _(entry->tooltip), NULL); + gtk_widget_set_tooltip_text (entry->widget, + _(entry->tooltip)); return hbox; } @@ -721,7 +717,7 @@ // Create keyboard setting. for (unsigned int i = 0; data[i].key; ++ i) { APPEND_ENTRY(_(data[i].label), data[i].entry, i); - gtk_entry_set_editable (GTK_ENTRY (data[i].entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (data[i].entry), FALSE); data[i].button = gtk_button_new_with_label ("..."); gtk_widget_show (data[i].button); @@ -740,11 +736,9 @@ &(data[i].data)); } - if (!__widget_tooltips) - __widget_tooltips = gtk_tooltips_new(); for (unsigned int i = 0; data[i].key; ++ i) { - gtk_tooltips_set_tip (__widget_tooltips, data[i].entry, - _(data[i].tooltip), NULL); + gtk_widget_set_tooltip_text (data[i].entry, + _(data[i].tooltip)); } return table; @@ -794,40 +788,38 @@ } static void -setup_combo_value (GtkCombo *combo, +setup_combo_value (GtkComboBoxText *combo, ComboConfigData *data, const String & str) { - GList *list = NULL; const char *defval = NULL; 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 setup_widget_value () { if (__widget_selection_style) { - setup_combo_value (GTK_COMBO (__widget_selection_style), + setup_combo_value (GTK_COMBO_BOX_TEXT (__widget_selection_style), selection_style, __config_selection_style); } if (__widget_annot_pos) { - setup_combo_value (GTK_COMBO (__widget_annot_pos), + setup_combo_value (GTK_COMBO_BOX_TEXT (__widget_annot_pos), annot_position, __config_annot_pos); } if (__widget_annot_target) { - setup_combo_value (GTK_COMBO (__widget_annot_target), + setup_combo_value (GTK_COMBO_BOX_TEXT (__widget_annot_target), annot_target, __config_annot_target); } @@ -1059,17 +1051,19 @@ FileConfigData *data = static_cast <FileConfigData *> (user_data); if (data) { - GtkWidget *dialog = gtk_file_selection_new (_(data->title)); + GtkWidget *dialog = gtk_file_chooser_dialog_new (_(data->title), GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(button))), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL ); gint result; - gtk_file_selection_set_filename(GTK_FILE_SELECTION (dialog), + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER (dialog), gtk_entry_get_text(GTK_ENTRY(data->entry))); result = gtk_dialog_run (GTK_DIALOG (dialog)); if (result == GTK_RESPONSE_OK) { const gchar *fname = - gtk_file_selection_get_filename (GTK_FILE_SELECTION (dialog)); + gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); if (!fname) fname = ""; diff -ur scim-skk-0.5.2.orig/src/scim_skk_setup_dictionaries.cpp scim-skk-0.5.2/src/scim_skk_setup_dictionaries.cpp --- scim-skk-0.5.2.orig/src/scim_skk_setup_dictionaries.cpp 2012-06-11 22:12:32.943353553 -0500 +++ scim-skk-0.5.2/src/scim_skk_setup_dictionaries.cpp 2012-06-11 22:13:10.159888284 -0500 @@ -37,7 +37,7 @@ static void file_selection_clicked_cb (GtkButton *button, gpointer user_data); -static void dict_type_changed_cb (GtkComboBox *combo, +static void dict_type_changed_cb (GtkComboBoxText *combo, gpointer user_data); static void dict_list_add_clicked_cb (GtkButton *button, gpointer user_data); @@ -302,16 +302,18 @@ DictionaryConfigWidgets *data = static_cast <DictionaryConfigWidgets *> (user_data); if (data) { - GtkWidget *dialog = gtk_file_selection_new (_(data->title)); + GtkWidget *dialog = gtk_file_chooser_dialog_new (_(data->title), GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(button))), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL ); gint result; - gtk_file_selection_set_filename(GTK_FILE_SELECTION (dialog), gtk_entry_get_text(GTK_ENTRY(data->entry))); + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER (dialog), gtk_entry_get_text(GTK_ENTRY(data->entry))); result = gtk_dialog_run (GTK_DIALOG (dialog)); if (result == GTK_RESPONSE_OK) { const gchar *fname = - gtk_file_selection_get_filename (GTK_FILE_SELECTION (dialog)); + gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); if (!fname) fname = ""; @@ -323,15 +325,15 @@ } static void -dict_type_changed_cb (GtkComboBox *combo, +dict_type_changed_cb (GtkComboBoxText *combo, gpointer userdata) { - gchar *typetext = gtk_combo_box_get_active_text(combo); + gchar *typetext = gtk_combo_box_text_get_active_text(combo); for (int i = 0; __dict_type_names[i] != ""; i++) { if (__dict_type_names[i] == typetext) { gtk_widget_show_all(__widgets_dicts[i].widget); } else { - gtk_widget_hide_all(__widgets_dicts[i].widget); + gtk_widget_hide(__widgets_dicts[i].widget); } } gtk_entry_set_text(GTK_ENTRY(__widgets_dicts[0].entry), ""); @@ -357,9 +359,9 @@ label = gtk_label_new(_("Dictionary Type: ")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); - __combo_box_dict_types = gtk_combo_box_new_text(); + __combo_box_dict_types = gtk_combo_box_text_new(); for (int i = 0; !__dict_type_names[i].empty(); i++) { - gtk_combo_box_append_text(GTK_COMBO_BOX(__combo_box_dict_types), + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(__combo_box_dict_types), __dict_type_names[i].data()); } g_signal_connect((gpointer) __combo_box_dict_types, "changed", @@ -367,21 +369,21 @@ NULL); gtk_widget_show(__combo_box_dict_types); gtk_box_pack_start(GTK_BOX(hbox), __combo_box_dict_types, FALSE, TRUE, 4); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 4); + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox, FALSE, FALSE, 4); /* dictionary file widgets */ dict_entry_widgets_dictfile_setup(&(__widgets_dicts[0])); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[0].widget, + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), __widgets_dicts[0].widget, TRUE, FALSE, 4); /* skkserv widgets */ dict_entry_widgets_skkserv_setup(&__widgets_dicts[1]); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[1].widget, + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), __widgets_dicts[1].widget, TRUE, FALSE, 4); /* dictionary file widgets */ dict_entry_widgets_dictfile_setup(&__widgets_dicts[2]); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[2].widget, + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), __widgets_dicts[2].widget, TRUE, FALSE, 4); gtk_combo_box_set_active(GTK_COMBO_BOX(__combo_box_dict_types), 0); @@ -393,12 +395,11 @@ _("Add"), GTK_RESPONSE_OK); gtk_widget_grab_default(ok_button); - gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE); gtk_widget_show(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); if (result == GTK_RESPONSE_OK) { - String dict_type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(__combo_box_dict_types)); + String dict_type = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(__combo_box_dict_types)); String dict_name; GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(userdata));
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