Skip to content
Browse files

spellcheck: Add GTK3 support

  • Loading branch information...
1 parent 642779e commit f689951dbab9da86c898e0df294f876744d8206b @b4n b4n committed Mar 18, 2013
Showing with 4 additions and 5 deletions.
  1. +0 −1 build/spellcheck.m4
  2. +4 −4 spellcheck/src/scplugin.c
View
1 build/spellcheck.m4
@@ -1,7 +1,6 @@
AC_DEFUN([GP_CHECK_SPELLCHECK],
[
GP_ARG_DISABLE([spellcheck], [auto])
- GP_CHECK_PLUGIN_GTK2_ONLY([spellcheck])
ENCHANT_VERSION=1.3
OPT_ENCHANT_VERSION=1.5
View
8 spellcheck/src/scplugin.c
@@ -82,7 +82,7 @@ static void populate_dict_combo(GtkComboBox *combo)
gtk_list_store_clear(GTK_LIST_STORE(model));
for (i = 0; i < sc_info->dicts->len; i++)
{
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), g_ptr_array_index(sc_info->dicts, i));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), g_ptr_array_index(sc_info->dicts, i));
if (utils_str_equal(g_ptr_array_index(sc_info->dicts, i), sc_info->default_language))
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), i);
@@ -102,7 +102,7 @@ static void configure_response_cb(GtkDialog *dialog, gint response, gpointer use
gchar *config_dir = g_path_get_dirname(sc_info->config_file);
GtkComboBox *combo = GTK_COMBO_BOX(g_object_get_data(G_OBJECT(dialog), "combo"));
- setptr(sc_info->default_language, gtk_combo_box_get_active_text(combo));
+ setptr(sc_info->default_language, gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo)));
#ifdef HAVE_ENCHANT_1_5
setptr(sc_info->dictionary_dir, g_strdup(gtk_entry_get_text(GTK_ENTRY(
g_object_get_data(G_OBJECT(dialog), "dict_dir")))));
@@ -274,7 +274,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 3);
- combo = gtk_combo_box_new_text();
+ combo = gtk_combo_box_text_new();
populate_dict_combo(GTK_COMBO_BOX(combo));
if (sc_info->dicts->len > 20)
@@ -305,7 +305,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
gtk_container_add(GTK_CONTAINER(button), image);
hbox = gtk_hbox_new(FALSE, 6);
- gtk_box_pack_start_defaults(GTK_BOX(hbox), entry_dir);
+ gtk_box_pack_start(GTK_BOX(hbox), entry_dir, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);

1 comment on commit f689951

@eht16
Geany member
eht16 commented on f689951 Mar 19, 2013

Thank you!

Please sign in to comment.
Something went wrong with that request. Please try again.