]> git.pld-linux.org Git - packages/gtranslator.git/blob - gtranslator-gtkspell3.patch
- updated gettext BR
[packages/gtranslator.git] / gtranslator-gtkspell3.patch
1 --- a/configure.ac
2 +++ b/configure.ac
3 @@ -84,7 +84,7 @@ GDL_REQUIRED=3.6.0
4  GDA_REQUIRED=4.2.3
5  PEAS_REQUIRED=1.2.0
6  GDICT_OPTIONAL=0.11.0
7 -GTKSPELL_OPTIONAL=2.99.99
8 +GTKSPELL_OPTIONAL=3.0.0
9  JSON_GLIB_OPTIONAL=0.12.0
10  
11  AC_ARG_WITH(gda,
12 @@ -174,14 +174,14 @@ dnl -------------------------------------------------------------------
13  dnl Check for gtkspell >= 3.0 and use it if found
14  dnl -------------------------------------------------------------------
15  have_gtkspell=no
16 -AC_ARG_WITH(gtkspell3,
17 +AC_ARG_WITH(gtkspell,
18              AS_HELP_STRING([--with-gtkspell],[Build with spell support]),,
19              with_gtkspell=auto)
20  
21  if test x"$with_gtkspell" != "xno"
22  then
23          PKG_CHECK_MODULES([GTKSPELL], [
24 -                gtkspell-3.0 >= $GTKSPELL_OPTIONAL
25 +                gtkspell3-3.0 >= $GTKSPELL_OPTIONAL
26          ], have_gtkspell=yes, have_gtkspell=no)
27  
28          if test x"$have_gtkspell" = "xyes"
29 @@ -339,7 +339,7 @@ if [ test x"$have_gtkspell" = "xyes" ]; then
30         echo "Building spell support: ................................YES"
31  else
32         echo "Building spell support: ................................NO"
33 -               echo "        Requires gtkspell >= $GTKSPELL_OPTIONAL"
34 +               echo "        Requires gtkspell3 >= $GTKSPELL_OPTIONAL"
35  fi
36  
37  echo "
38 --- a/src/gtr-view.c
39 +++ b/src/gtr-view.c
40 @@ -65,7 +65,7 @@ struct _GtrViewPrivate
41    gchar *search_text;
42  
43  #ifdef HAVE_GTKSPELL
44 -  GtkSpell *spell;
45 +  GtkSpellChecker *spell;
46  #endif
47  };
48  
49 @@ -75,11 +75,10 @@ gtr_attach_gtkspell (GtrView * view)
50  {
51    GError *error = NULL;
52    gchar *errortext = NULL;
53 -  view->priv->spell = NULL;
54  
55 -  view->priv->spell =
56 -    gtkspell_new_attach (GTK_TEXT_VIEW (view), NULL, &error);
57 -  if (view->priv->spell == NULL)
58 +  view->priv->spell = gtk_spell_checker_new ();
59 +  gtk_spell_checker_set_language (view->priv->spell, NULL, &error);
60 +  if (error)
61      {
62        g_warning (_("gtkspell error: %s\n"), error->message);
63        errortext =
64 @@ -90,6 +89,11 @@ gtr_attach_gtkspell (GtrView * view)
65        g_error_free (error);
66        g_free (errortext);
67      }
68 +  else
69 +    {
70 +      gtk_spell_checker_attach (view->priv->spell,
71 +                                GTK_TEXT_VIEW (view));
72 +    }
73  }
74  #endif
75  
76 @@ -263,7 +267,7 @@ gtr_view_enable_spellcheck (GtrView * view, gboolean enable)
77  #ifdef HAVE_GTKSPELL
78        if (!view->priv->spell)
79          return;
80 -      gtkspell_detach (view->priv->spell);
81 +      gtk_spell_checker_detach (view->priv->spell);
82  #endif
83      }
84  }
This page took 0.062489 seconds and 3 git commands to generate.