tags 515323 + patch
thank you
Hi,
Attached is a patch that will build with Gtk 2 as well as some packaging
fixes. Probably needs better testing as Spanish is not my first language.
Hope it helps.
Thanks,
Barry deFreese
Debian QA
diff -u i2e-0.5.1/debian/changelog i2e-0.5.1/debian/changelog
--- i2e-0.5.1/debian/changelog
+++ i2e-0.5.1/debian/changelog
@@ -1,3 +1,15 @@
+i2e (0.5.1-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Build with Gtk2. (Closes: #515323).
+ * Make clean not ignore errors.
+ * Bump debhelper build-dep to >> 5.0.0.
+ * Add debian/compat and set to 5.
+ * Bump Standards Version to 3.8.0.
+ + Menu policy transition.
+
+ -- Barry deFreese <bdefre...@debian.org> Fri, 13 Mar 2009 15:40:44 -0400
+
i2e (0.5.1-2) unstable; urgency=low
* Lintian fixes:
diff -u i2e-0.5.1/debian/control i2e-0.5.1/debian/control
--- i2e-0.5.1/debian/control
+++ i2e-0.5.1/debian/control
@@ -2,12 +2,12 @@
Section: text
Priority: optional
Maintainer: Javier Fernandez-Sanguino Pen~a <j...@computer.org>
-Build-Depends: gettext, libgtk1.2-dev, debhelper (>> 3.0.0)
-Standards-Version: 3.5.8.0
+Build-Depends: debhelper (>> 5.0.0), gettext, libgtk2.0-dev
+Standards-Version: 3.8.0
Package: i2e
Architecture: any
-Depends: gettext,${shlibs:Depends}
+Depends: gettext,${shlibs:Depends}, ${misc:Depends}
Description: English-Spanish translation dictionary
English to Spanish (and viceversa) translation dictionary.
It can be used both in X and text mode and has a learning
diff -u i2e-0.5.1/debian/rules i2e-0.5.1/debian/rules
--- i2e-0.5.1/debian/rules
+++ i2e-0.5.1/debian/rules
@@ -22,7 +22,7 @@
rm -f build-stamp install-stamp
# Add here commands to clean up after the build process.
- -$(MAKE) clean
+ $(MAKE) clean
dh_clean
@@ -34,7 +34,7 @@
dh_installdirs
# Add here commands to install the package into debian/tmp.
- $(MAKE) install DESTDIR=`pwd`/debian/tmp
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/i2e
touch install-stamp
diff -u i2e-0.5.1/debian/menu i2e-0.5.1/debian/menu
--- i2e-0.5.1/debian/menu
+++ i2e-0.5.1/debian/menu
@@ -1,6 +1,6 @@
?package(i2e):\
needs="X11"\
- section="Apps/Text"\
+ section="Applications/Text"\
description="English-Spanish dictionary"\
title="i2e"\
command="/usr/bin/i2e"
diff -u i2e-0.5.1/i2e.c i2e-0.5.1/i2e.c
--- i2e-0.5.1/i2e.c
+++ i2e-0.5.1/i2e.c
@@ -262,21 +262,30 @@
gtk_widget_show( subtabla );
/* widget para el texto de la traduccion en la subtabla */
- datos.salida = gtk_text_new( NULL, NULL );
- gtk_text_set_editable( GTK_TEXT( datos.salida ), FALSE );
- gtk_text_set_word_wrap( GTK_TEXT( datos.salida ), FALSE );
+/* BDD */
+/* datos.salida = gtk_text_new( NULL, NULL ); */
+ datos.salida = gtk_text_view_new();
+/* BDD */
+/* gtk_text_set_editable( GTK_TEXT( datos.salida ), FALSE ); */
+/* gtk_text_set_word_wrap( GTK_TEXT( datos.salida ), FALSE ); */
+ gtk_text_view_set_editable( GTK_TEXT_VIEW( datos.salida ), FALSE );
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( datos.salida ), GTK_WRAP_WORD );
gtk_table_attach_defaults( GTK_TABLE( subtabla ), datos.salida, 0, 1, 0, 1);
gtk_widget_show( datos.salida );
/* scroll horizontal en la subtabla */
- barra = gtk_hscrollbar_new( GTK_TEXT( datos.salida )->hadj );
+/* BDD */
+/* barra = gtk_hscrollbar_new( GTK_TEXT( datos.salida )->hadj ); */
+ barra = gtk_hscrollbar_new( GTK_TEXT_VIEW( datos.salida )->hadjustment );
GTK_WIDGET_UNSET_FLAGS( GTK_HSCROLLBAR( barra ), GTK_CAN_FOCUS );
gtk_table_attach( GTK_TABLE( subtabla ), barra, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0 );
gtk_widget_show( barra );
/* scroll vertical en la subtabla */
- barra = gtk_vscrollbar_new( GTK_TEXT( datos.salida )->vadj );
+/* BDD */
+/* barra = gtk_vscrollbar_new( GTK_TEXT( datos.salida )->vadj ); */
+ barra = gtk_vscrollbar_new( GTK_TEXT_VIEW( datos.salida )->vadjustment );
GTK_WIDGET_UNSET_FLAGS( GTK_VSCROLLBAR( barra ), GTK_CAN_FOCUS );
gtk_table_attach( GTK_TABLE( subtabla ), barra, 1, 2, 0, 1,
GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0 );
diff -u i2e-0.5.1/Makefile i2e-0.5.1/Makefile
--- i2e-0.5.1/Makefile
+++ i2e-0.5.1/Makefile
@@ -9,22 +9,22 @@
OBJS = i2e.o traduce.o mensaje.o aprende.o funciones.o
i2e : po/es.mo $(OBJS) Makefile
- $(CC) $(CFLAG) $(OBJS) -o i2e `gtk-config --libs`
+ $(CC) $(CFLAG) $(OBJS) -o i2e `pkg-config --libs gtk+-2.0`
i2e.o : i2e.c i2e.h
- $(CC) $(CFLAG) -c i2e.c -o i2e.o `gtk-config --cflags`
+ $(CC) $(CFLAG) -c i2e.c -o i2e.o `pkg-config --cflags gtk+-2.0`
traduce.o : traduce.c i2e.h
- $(CC) $(CFLAG) -c traduce.c -o traduce.o `gtk-config --cflags`
+ $(CC) $(CFLAG) -c traduce.c -o traduce.o `pkg-config --cflags gtk+-2.0`
mensaje.o : mensaje.c i2e.h
- $(CC) $(CFLAG) -c mensaje.c -o mensaje.o `gtk-config --cflags`
+ $(CC) $(CFLAG) -c mensaje.c -o mensaje.o `pkg-config --cflags gtk+-2.0`
aprende.o : aprende.c i2e.h
- $(CC) $(CFLAG) -c aprende.c -o aprende.o `gtk-config --cflags`
+ $(CC) $(CFLAG) -c aprende.c -o aprende.o `pkg-config --cflags gtk+-2.0`
funciones.o : funciones.c i2e.h
- $(CC) $(CFLAG) -c funciones.c -o funciones.o `gtk-config --cflags`
+ $(CC) $(CFLAG) -c funciones.c -o funciones.o `pkg-config --cflags
gtk+-2.0`
po/es.mo : po/es.po
msgfmt -o po/es.mo po/es.po
only in patch2:
unchanged:
--- i2e-0.5.1.orig/traduce.c
+++ i2e-0.5.1/traduce.c
@@ -33,14 +33,21 @@
FILE *f;
int i;
char *LENGUAJE[] = { _("English"), _("Spanish") };
+/* BDD */
+ GtkTextBuffer *salidosbuf;
+ GtkTextIter *salidositer;
datos = (parametros *)data;
texto = strtrim( gtk_entry_get_text( GTK_ENTRY( datos->entrada )));
gtk_entry_set_text( GTK_ENTRY( datos->entrada ), texto );
- gtk_text_backward_delete( GTK_TEXT( datos->salida ),
- gtk_text_get_length( GTK_TEXT( datos->salida )));
+/* BDD */
+/* gtk_text_backward_delete( GTK_TEXT( datos->salida ), */
+/* gtk_text_get_length( GTK_TEXT( datos->salida ))); */
+
+ salidosbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(datos->salida));
+ gtk_text_buffer_set_text(salidosbuf, "", 0);
if (! strlen( texto ))
{
@@ -151,8 +158,13 @@
strcat( tr, "\n" );
}
- gtk_text_insert( GTK_TEXT( datos->salida ), NULL, NULL, NULL,
- tr, strlen( tr ));
+/* BDD */
+/* gtk_text_insert( GTK_TEXT( datos->salida ), NULL, NULL, NULL, */
+/* tr, strlen( tr )); */
+
+ gtk_text_buffer_get_end_iter(salidosbuf, salidositer);
+ gtk_text_buffer_insert(salidosbuf, salidositer, tr, strlen( tr ));
+
if (! encontrado )
encontrado = 1;
}
@@ -181,7 +193,9 @@
if ( encontrado )
{
- gtk_text_backward_delete( GTK_TEXT( datos->salida ), 1 );
+/* BDD */
+/* gtk_text_backward_delete( GTK_TEXT( datos->salida ), 1 ); */
+ gtk_text_buffer_set_text(salidosbuf, "", 0);
}
else
{
@@ -191,13 +205,19 @@
g_string_append( patron, texto );
g_string_append( patron, "\"" );
- gtk_text_insert( GTK_TEXT( datos->salida ), NULL, NULL, NULL,
- patron->str, patron->len );
+/* BDD */
+/* gtk_text_insert( GTK_TEXT( datos->salida ), NULL, NULL, NULL, */
+/* patron->str, patron->len ); */
+
+ gtk_text_buffer_get_end_iter( salidosbuf, salidositer );
+ gtk_text_buffer_insert( salidosbuf, salidositer, patron->str, patron->len
);
g_string_free( patron, TRUE );
}
- gtk_adjustment_set_value( GTK_TEXT( datos->salida )->vadj, 0.0 );
+/* BDD */
+/* gtk_adjustment_set_value( GTK_TEXT( datos->salida )->vadj, 0.0 ); */
+ gtk_adjustment_set_value( GTK_TEXT_VIEW( datos->salida )->vadjustment, 0.0 );
regfree( &buffer );
g_free( linea );
--- i2e-0.5.1.orig/debian/compat
+++ i2e-0.5.1/debian/compat
@@ -0,0 +1 @@
+5