Port to gtkspell3
OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/gtranslator?expand=0&rev=50
This commit is contained in:
parent
8d9aa06f09
commit
ec223261c8
98
gtranslator-gtkspell3.patch
Normal file
98
gtranslator-gtkspell3.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From cf33d8761dbfc7f6c8b27c3146efcad81f8fbde9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kalev Lember <kalevlember@gmail.com>
|
||||||
|
Date: Sun, 13 Jan 2013 13:19:40 +0000
|
||||||
|
Subject: Port to gtkspell3
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=691655
|
||||||
|
---
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index c1ba5b6..3fe9c46 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -84,7 +84,7 @@ GDL_REQUIRED=3.6.0
|
||||||
|
GDA_REQUIRED=4.2.3
|
||||||
|
PEAS_REQUIRED=1.2.0
|
||||||
|
GDICT_OPTIONAL=0.11.0
|
||||||
|
-GTKSPELL_OPTIONAL=2.99.99
|
||||||
|
+GTKSPELL_OPTIONAL=3.0.0
|
||||||
|
JSON_GLIB_OPTIONAL=0.12.0
|
||||||
|
|
||||||
|
AC_ARG_WITH(gda,
|
||||||
|
@@ -174,14 +174,14 @@ dnl -------------------------------------------------------------------
|
||||||
|
dnl Check for gtkspell >= 3.0 and use it if found
|
||||||
|
dnl -------------------------------------------------------------------
|
||||||
|
have_gtkspell=no
|
||||||
|
-AC_ARG_WITH(gtkspell3,
|
||||||
|
+AC_ARG_WITH(gtkspell,
|
||||||
|
AS_HELP_STRING([--with-gtkspell],[Build with spell support]),,
|
||||||
|
with_gtkspell=auto)
|
||||||
|
|
||||||
|
if test x"$with_gtkspell" != "xno"
|
||||||
|
then
|
||||||
|
PKG_CHECK_MODULES([GTKSPELL], [
|
||||||
|
- gtkspell-3.0 >= $GTKSPELL_OPTIONAL
|
||||||
|
+ gtkspell3-3.0 >= $GTKSPELL_OPTIONAL
|
||||||
|
], have_gtkspell=yes, have_gtkspell=no)
|
||||||
|
|
||||||
|
if test x"$have_gtkspell" = "xyes"
|
||||||
|
@@ -339,7 +339,7 @@ if [ test x"$have_gtkspell" = "xyes" ]; then
|
||||||
|
echo "Building spell support: ................................YES"
|
||||||
|
else
|
||||||
|
echo "Building spell support: ................................NO"
|
||||||
|
- echo " Requires gtkspell >= $GTKSPELL_OPTIONAL"
|
||||||
|
+ echo " Requires gtkspell3 >= $GTKSPELL_OPTIONAL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "
|
||||||
|
diff --git a/src/gtr-view.c b/src/gtr-view.c
|
||||||
|
index 59f18e8..b9c4f6a 100644
|
||||||
|
--- a/src/gtr-view.c
|
||||||
|
+++ b/src/gtr-view.c
|
||||||
|
@@ -65,7 +65,7 @@ struct _GtrViewPrivate
|
||||||
|
gchar *search_text;
|
||||||
|
|
||||||
|
#ifdef HAVE_GTKSPELL
|
||||||
|
- GtkSpell *spell;
|
||||||
|
+ GtkSpellChecker *spell;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -75,11 +75,10 @@ gtr_attach_gtkspell (GtrView * view)
|
||||||
|
{
|
||||||
|
GError *error = NULL;
|
||||||
|
gchar *errortext = NULL;
|
||||||
|
- view->priv->spell = NULL;
|
||||||
|
|
||||||
|
- view->priv->spell =
|
||||||
|
- gtkspell_new_attach (GTK_TEXT_VIEW (view), NULL, &error);
|
||||||
|
- if (view->priv->spell == NULL)
|
||||||
|
+ view->priv->spell = gtk_spell_checker_new ();
|
||||||
|
+ gtk_spell_checker_set_language (view->priv->spell, NULL, &error);
|
||||||
|
+ if (error)
|
||||||
|
{
|
||||||
|
g_warning (_("gtkspell error: %s\n"), error->message);
|
||||||
|
errortext =
|
||||||
|
@@ -90,6 +89,11 @@ gtr_attach_gtkspell (GtrView * view)
|
||||||
|
g_error_free (error);
|
||||||
|
g_free (errortext);
|
||||||
|
}
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ gtk_spell_checker_attach (view->priv->spell,
|
||||||
|
+ GTK_TEXT_VIEW (view));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -263,7 +267,7 @@ gtr_view_enable_spellcheck (GtrView * view, gboolean enable)
|
||||||
|
#ifdef HAVE_GTKSPELL
|
||||||
|
if (!view->priv->spell)
|
||||||
|
return;
|
||||||
|
- gtkspell_detach (view->priv->spell);
|
||||||
|
+ gtk_spell_checker_detach (view->priv->spell);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
cgit v0.9.1
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 21 19:00:46 UTC 2013 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Port to granslator3:
|
||||||
|
+ Add gtranslator-gtkspell3.patch
|
||||||
|
+ Replace pkgconfig(gtkspell-3.0) BuildRequires with
|
||||||
|
pkgconfig(gtkspell3-3.0).
|
||||||
|
+ Add gnome-common BuildRequires and call to autoreconf, as above
|
||||||
|
patch touches the build system.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jan 4 13:32:30 UTC 2013 - dimstar@opensuse.org
|
Fri Jan 4 13:32:30 UTC 2013 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -24,7 +24,11 @@ License: GPL-3.0+
|
|||||||
Group: Development/Tools/Other
|
Group: Development/Tools/Other
|
||||||
Url: http://gtranslator.sourceforge.net
|
Url: http://gtranslator.sourceforge.net
|
||||||
Source: http://download.gnome.org/sources/gtranslator/2.91/%{name}-%{version}.tar.xz
|
Source: http://download.gnome.org/sources/gtranslator/2.91/%{name}-%{version}.tar.xz
|
||||||
|
# PATCH-FIX-UPSTREAM gtranslator-gtkspell3.patch dimstar@opensuse.org -- Port to gtkspell3, taken from git
|
||||||
|
Patch0: gtranslator-gtkspell3.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
# Needed for patch0
|
||||||
|
BuildRequires: gnome-common
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: yelp-tools
|
BuildRequires: yelp-tools
|
||||||
# Not using a pkgconfig() BuildRequires, to allow building against libgda 4.0 and 5.0
|
# Not using a pkgconfig() BuildRequires, to allow building against libgda 4.0 and 5.0
|
||||||
@ -37,7 +41,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
|
|||||||
BuildRequires: pkgconfig(gsettings-desktop-schemas)
|
BuildRequires: pkgconfig(gsettings-desktop-schemas)
|
||||||
BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.2
|
BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.2
|
||||||
BuildRequires: pkgconfig(gtksourceview-3.0) >= 3.0.0
|
BuildRequires: pkgconfig(gtksourceview-3.0) >= 3.0.0
|
||||||
BuildRequires: pkgconfig(gtkspell-3.0)
|
BuildRequires: pkgconfig(gtkspell3-3.0)
|
||||||
BuildRequires: pkgconfig(iso-codes)
|
BuildRequires: pkgconfig(iso-codes)
|
||||||
BuildRequires: pkgconfig(json-glib-1.0)
|
BuildRequires: pkgconfig(json-glib-1.0)
|
||||||
BuildRequires: pkgconfig(libpeas-1.0) >= 1.2.0
|
BuildRequires: pkgconfig(libpeas-1.0) >= 1.2.0
|
||||||
@ -66,9 +70,12 @@ files imminently.
|
|||||||
%lang_package
|
%lang_package
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
translation-update-upstream
|
translation-update-upstream
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# Needed for patch0
|
||||||
|
autoreconf -fiv
|
||||||
%configure \
|
%configure \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-scrollkeeper \
|
--disable-scrollkeeper \
|
||||||
|
Loading…
Reference in New Issue
Block a user