--- /dev/null
+--- scim-skk-0.5.2/src/scim_skk_setup_dictionaries.cpp.orig 2005-12-18 12:36:36.000000000 +0100
++++ scim-skk-0.5.2/src/scim_skk_setup_dictionaries.cpp 2016-04-10 13:18:16.024989156 +0200
+@@ -170,7 +170,11 @@
+ dict_entry_widgets_dictfile_setup (DictionaryConfigWidgets *widgets)
+ {
+ GtkWidget *label;
++#if GTK_CHECK_VERSION(3, 0, 0)
++ widgets->widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
++#else
+ widgets->widget = gtk_hbox_new(FALSE, 0);
++#endif
+ label = gtk_label_new(widgets->title);
+ widgets->entry = gtk_entry_new();
+ widgets->button = gtk_button_new_with_label ("...");
+@@ -195,8 +199,13 @@
+ {
+ GtkWidget *hbox, *label;
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++ widgets->widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
++#else
+ widgets->widget = gtk_vbox_new(FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 0);
++#endif
+ gtk_widget_hide(widgets->widget);
+ label = gtk_label_new(_("Server Name:"));
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4);
+@@ -205,7 +214,11 @@
+ TRUE, TRUE, 4);
+ gtk_box_pack_start(GTK_BOX(widgets->widget), hbox,
+ FALSE, FALSE, 4);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
++#else
+ hbox = gtk_hbox_new(FALSE, 0);
++#endif
+ label = gtk_label_new(_("Port Number:"));
+ widgets->entry2 = gtk_entry_new();
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4);
+@@ -224,7 +237,11 @@
+ GtkWidget *button;
+
+ /* edit buttons */
++#if GTK_CHECK_VERSION(3, 0, 0)
++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
++#else
+ hbox = gtk_hbox_new(FALSE, 0);
++#endif
+ button = gtk_button_new_with_label(_("Add"));
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 4);
+ g_signal_connect((gpointer) button, "clicked",
+@@ -245,7 +262,11 @@
+ {
+ GtkWidget *tree;
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++ __widget_sysdicts = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
++#else
+ __widget_sysdicts = gtk_vbox_new(FALSE, 0);
++#endif
+ dict_list_setup(__config_sysdicts);
+
+ /* setup container for dictionaries selection */
+@@ -257,10 +278,18 @@
+
+ {
+ GtkWidget *hbox, *vbox, *button;
++#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(hbox), tree, TRUE, TRUE, 4);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
++#else
+ vbox = gtk_vbox_new(FALSE, 0);
++#endif
+ button = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
+ gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 4);
+ g_signal_connect((gpointer) button, "clicked",
+@@ -301,6 +330,30 @@
+ DictionaryConfigWidgets *data = static_cast <DictionaryConfigWidgets *> (user_data);
+
+ if (data) {
++#if GTK_CHECK_VERSION(3, 0, 0)
++ GtkWidget *dialog = gtk_file_chooser_dialog_new (_(data->title),
++ NULL,
++ GTK_FILE_CHOOSER_ACTION_OPEN,
++ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
++ GTK_STOCK_OPEN, GTK_RESPONSE_OK,
++ NULL);
++ gint result;
++
++ 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_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
++
++ if (!fname) fname = "";
++
++ gtk_entry_set_text (GTK_ENTRY (data->entry), fname);
++ }
++
++ gtk_widget_destroy (dialog);
++#else
+ GtkWidget *dialog = gtk_file_selection_new (_(data->title));
+ gint result;
+
+@@ -318,6 +371,7 @@
+ }
+
+ gtk_widget_destroy (dialog);
++#endif
+ }
+ }
+
+@@ -325,12 +379,20 @@
+ dict_type_changed_cb (GtkComboBox *combo,
+ gpointer userdata)
+ {
+- gchar *typetext = gtk_combo_box_get_active_text(combo);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ const gchar *typetext = gtk_entry_get_text(GTK_ENTRY (gtk_bin_get_child(GTK_BIN (combo))));
++#else
++ const gchar *typetext = gtk_combo_box_get_active_text(combo);
++#endif
+ for (int i = 0; __dict_type_names[i] != ""; i++) {
+ if (__dict_type_names[i] == typetext) {
+ gtk_widget_show_all(__widgets_dicts[i].widget);
+ } else {
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_widget_hide(__widgets_dicts[i].widget);
++#else
+ gtk_widget_hide_all(__widgets_dicts[i].widget);
++#endif
+ }
+ }
+ gtk_entry_set_text(GTK_ENTRY(__widgets_dicts[0].entry), "");
+@@ -351,37 +413,68 @@
+ gtk_window_set_title(GTK_WINDOW(dialog),
+ _("Add new dictionary"));
+
++#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);
+ label = gtk_label_new(_("Dictionary Type: "));
+ gtk_widget_show(label);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ __combo_box_dict_types = gtk_combo_box_text_new();
++ for (int i = 0; !__dict_type_names[i].empty(); i++) {
++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(__combo_box_dict_types),
++ __dict_type_names[i].data());
++ }
++#else
+ __combo_box_dict_types = gtk_combo_box_new_text();
+ for (int i = 0; !__dict_type_names[i].empty(); i++) {
+ gtk_combo_box_append_text(GTK_COMBO_BOX(__combo_box_dict_types),
+ __dict_type_names[i].data());
+ }
++#endif
+ g_signal_connect((gpointer) __combo_box_dict_types, "changed",
+ G_CALLBACK(dict_type_changed_cb),
+ NULL);
+ gtk_widget_show(__combo_box_dict_types);
+ gtk_box_pack_start(GTK_BOX(hbox), __combo_box_dict_types, FALSE, TRUE, 4);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox, FALSE, FALSE, 4);
++#else
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 4);
++#endif
+
+ /* dictionary file widgets */
+ dict_entry_widgets_dictfile_setup(&(__widgets_dicts[0]));
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), __widgets_dicts[0].widget,
++ TRUE, FALSE, 4);
++#else
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[0].widget,
+ TRUE, FALSE, 4);
++#endif
+
+ /* skkserv widgets */
+ dict_entry_widgets_skkserv_setup(&__widgets_dicts[1]);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), __widgets_dicts[1].widget,
++ TRUE, FALSE, 4);
++#else
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[1].widget,
+ TRUE, FALSE, 4);
++#endif
+
+ /* dictionary file widgets */
+ dict_entry_widgets_dictfile_setup(&__widgets_dicts[2]);
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), __widgets_dicts[2].widget,
++ TRUE, FALSE, 4);
++#else
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[2].widget,
+ TRUE, FALSE, 4);
++#endif
+
+ gtk_combo_box_set_active(GTK_COMBO_BOX(__combo_box_dict_types), 0);
+
+@@ -392,12 +485,18 @@
+ _("Add"),
+ GTK_RESPONSE_OK);
+ gtk_widget_grab_default(ok_button);
++#if !GTK_CHECK_VERSION(3, 0, 0)
+ gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE);
++#endif
+ gtk_widget_show(dialog);
+
+ result = gtk_dialog_run(GTK_DIALOG(dialog));
+ if (result == GTK_RESPONSE_OK) {
++#if GTK_CHECK_VERSION(3, 0, 0)
++ String dict_type = gtk_entry_get_text(GTK_ENTRY (gtk_bin_get_child(GTK_BIN (GTK_COMBO_BOX(__combo_box_dict_types)))));
++#else
+ String dict_type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(__combo_box_dict_types));
++#endif
+ String dict_name;
+ GtkTreeIter iter;
+ GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(userdata));
+--- scim-skk-0.5.2/src/scim_skk_imengine_setup.cpp.orig 2005-12-18 13:15:53.000000000 +0100
++++ scim-skk-0.5.2/src/scim_skk_imengine_setup.cpp 2016-04-10 19:12:05.354098248 +0200
+@@ -31,6 +31,7 @@
+ # include <config.h>
+ #endif
+
++#include <cstring>
+ #include <vector>
+
+ #include <scim.h>
+@@ -178,7 +179,10 @@
+ static GtkWidget * __widget_annot_highlight = 0;
+ static GtkWidget * __widget_ignore_return = 0;
+ static GtkWidget * __widget_selection_style = 0;
++#if GTK_CHECK_VERSION(3, 0, 0)
++#else
+ static GtkTooltips * __widget_tooltips = 0;
++#endif
+
+ static KeyboardConfigData __config_keyboards_common [] =
+ {
+@@ -483,10 +487,24 @@
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 4);
+
++#if GTK_CHECK_VERSION(2, 24, 0)
++ *widget = gtk_combo_box_text_new_with_entry ();
++ GtkWidget *combo_box_entry = gtk_bin_get_child (GTK_BIN (*widget));
++ gtk_editable_set_editable (GTK_EDITABLE (combo_box_entry), FALSE);
++
++ gtk_widget_show (*widget);
++ gtk_box_pack_start (GTK_BOX (hbox), *widget, FALSE, FALSE, 4);
++ g_object_set_data (G_OBJECT (combo_box_entry), DATA_POINTER_KEY,
++ (gpointer) candidates_p);
++
++ g_signal_connect (G_OBJECT (combo_box_entry), "changed",
++ G_CALLBACK (on_default_combo_changed),
++ data_p);
++#else
+ *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);
++ gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (*widget)->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,
+@@ -495,6 +513,7 @@
+ g_signal_connect ((gpointer) GTK_COMBO (*widget)->entry, "changed",
+ G_CALLBACK (on_default_combo_changed),
+ data_p);
++#endif
+
+ return hbox;
+ }
+@@ -527,11 +546,19 @@
+ if (label)
+ gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry->widget);
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++#else
+ if (!__widget_tooltips)
+ __widget_tooltips = gtk_tooltips_new();
++#endif
+ if (entry->tooltip)
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry->widget),
++ _(entry->tooltip));
++#else
+ gtk_tooltips_set_tip(__widget_tooltips, entry->widget,
+ _(entry->tooltip), NULL);
++#endif
+
+ return hbox;
+ }
+@@ -719,7 +746,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);
+@@ -738,11 +765,19 @@
+ &(data[i].data));
+ }
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++#else
+ if (!__widget_tooltips)
+ __widget_tooltips = gtk_tooltips_new();
++#endif
+ for (unsigned int i = 0; data[i].key; ++ i) {
++#if GTK_CHECK_VERSION(3, 0, 0)
++ gtk_widget_set_tooltip_text (GTK_WIDGET (data[i].entry),
++ _(data[i].tooltip));
++#else
+ gtk_tooltips_set_tip (__widget_tooltips, data[i].entry,
+ _(data[i].tooltip), NULL);
++#endif
+ }
+
+ return table;
+@@ -792,9 +827,20 @@
+ }
+
+ static void
+-setup_combo_value (GtkCombo *combo,
++setup_combo_value (GtkWidget *combo,
+ ComboConfigData *data, const String & str)
+ {
++#if GTK_CHECK_VERSION(2, 24, 0)
++ gint default_index = -1;
++ for (unsigned int i = 0; data[i].label; i++) {
++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _(data[i].label));
++ if (!strcmp (data[i].data, str.c_str ()))
++ default_index = i;
++ }
++
++ if (default_index != -1)
++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), default_index);
++#else
+ GList *list = NULL;
+ const char *defval = NULL;
+
+@@ -804,28 +850,29 @@
+ defval = _(data[i].label);
+ }
+
+- gtk_combo_set_popdown_strings (combo, list);
++ gtk_combo_set_popdown_strings (GTK_COMBO(combo), list);
+ g_list_free (list);
+
+ if (defval)
+- gtk_entry_set_text (GTK_ENTRY (combo->entry), defval);
++ gtk_entry_set_text (GTK_ENTRY (GTK_COMBO(combo)->entry), defval);
++#endif
+ }
+
+ static void
+ setup_widget_value ()
+ {
+ if (__widget_selection_style) {
+- setup_combo_value (GTK_COMBO (__widget_selection_style),
++ setup_combo_value (GTK_WIDGET (__widget_selection_style),
+ selection_style, __config_selection_style);
+ }
+
+ if (__widget_annot_pos) {
+- setup_combo_value (GTK_COMBO (__widget_annot_pos),
++ setup_combo_value (GTK_WIDGET (__widget_annot_pos),
+ annot_position, __config_annot_pos);
+ }
+
+ if (__widget_annot_target) {
+- setup_combo_value (GTK_COMBO (__widget_annot_target),
++ setup_combo_value (GTK_WIDGET (__widget_annot_target),
+ annot_target, __config_annot_target);
+ }
+
+@@ -1057,6 +1104,30 @@
+ FileConfigData *data = static_cast <FileConfigData *> (user_data);
+
+ if (data) {
++#if GTK_CHECK_VERSION(3, 0, 0)
++ GtkWidget *dialog = gtk_file_chooser_dialog_new (_(data->title),
++ NULL,
++ GTK_FILE_CHOOSER_ACTION_OPEN,
++ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
++ GTK_STOCK_OPEN, GTK_RESPONSE_OK,
++ NULL);
++ gint result;
++
++ 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_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
++
++ if (!fname) fname = "";
++
++ gtk_entry_set_text (GTK_ENTRY (data->entry), fname);
++ }
++
++ gtk_widget_destroy (dialog);
++#else
+ GtkWidget *dialog = gtk_file_selection_new (_(data->title));
+ gint result;
+
+@@ -1076,6 +1147,7 @@
+ }
+
+ gtk_widget_destroy (dialog);
++#endif
+ }
+ }
+