tag 460749 - patch tag 460794 + patch thanks Dear all,
I made some patches for transition to gnome2. The rest is to adjust the Build-Depends field in debian/control. For example, depends on libgnomeui-dev instead of libgnome-dev. And please also modify debian/rules to use autoconf & automake to re-generate the configure file. And as a side effect, I think I also fix #247067 in this patch. Regards, Ying-Chun Liu -- PaulLiu(劉穎駿) E-mail address: [EMAIL PROTECTED]
--- configure.in 2002-11-25 01:14:52.000000000 +0800 +++ configure.in 2008-01-29 22:52:59.059329011 +0800 @@ -24,23 +24,19 @@ AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE -AM_ACLOCAL_INCLUDE(macros) - -GNOME_INIT AC_PROG_CC AC_ISC_POSIX AC_HEADER_STDC -AM_PATH_GLIB(1.2.0) -GNOME_X_CHECKS -GNOME_COMPILE_WARNINGS +PKG_CHECK_MODULES(GNOME,[libgnomeui-2.0]) +AC_SUBST(GNOME_CFLAGS) +AC_SUBST(GNOME_LIBS) ALL_LINGUAS="fr da" AM_GNU_GETTEXT -AM_PATH_GDK_PIXBUF(0.9.0, ,AC_MSG_ERROR([Need gdk-pixbuf-0.9.0 or later!])) # Set PACKAGE_LOCALE_DIR in config.h if test "x${prefix}" = "xNONE"; then
--- src/Makefile.am 2002-11-19 00:10:53.000000000 +0800 +++ src/Makefile.am 2008-01-29 22:50:40.173117520 +0800 @@ -27,7 +27,8 @@ INCLUDES = \ -I$(top_srcdir)/intl \ $(GNOME_INCLUDEDIR) \ - $(GDK_PIXBUF_CFLAGS) + $(GDK_PIXBUF_CFLAGS) \ + @GNOME_CFLAGS@ bin_PROGRAMS = mathwar @@ -47,4 +48,5 @@ $(GNOME_LIBDIR) \ $(GNOMEUI_LIBS) \ $(INTLLIBS) \ - $(GDK_PIXBUF_LIBS) + $(GDK_PIXBUF_LIBS) \ + @GNOME_LIBS@
--- src/about_dlg.c 2002-11-19 00:10:53.000000000 +0800 +++ src/about_dlg.c 2008-01-29 22:55:28.184641264 +0800 @@ -41,6 +41,7 @@ { GtkWidget *about_dlg; GString *logo_str; + GdkPixbuf *logo_img=NULL; const gchar *authors[] = { "Ken Sodemann <[EMAIL PROTECTED]>", NULL @@ -48,11 +49,13 @@ logo_str = g_string_new (""); g_string_sprintf (logo_str, LOGO, PACKAGE_DATA_DIR); + logo_img = gdk_pixbuf_new_from_file(logo_str->str,NULL); about_dlg = gnome_about_new (PACKAGE, VERSION, _("Copyright (c) 2000-2002 Kenneth W. Sodemann"), - authors, _(MSG), - logo_str->str); + authors, NULL, NULL, + logo_img); + if (logo_img!=NULL) { g_object_unref(logo_img); logo_img = NULL; } g_string_free (logo_str, TRUE); if (parent != NULL) --- src/draw.c 2002-05-26 00:44:49.000000000 +0800 +++ src/draw.c 2008-01-29 22:50:03.243613055 +0800 @@ -188,7 +188,7 @@ * The position of the equal sign + the width of the equal sign, * plus some padding. */ - return (EQUAL_X + SIGN_SQR + CARD_X_PAD); + return (EQUAL_X + SIGN_SQR + CARD_X_PAD + CARD_WIDTH); } --- src/mainwin.c 2002-11-19 00:42:55.000000000 +0800 +++ src/mainwin.c 2008-01-29 22:54:26.206145776 +0800 @@ -566,7 +566,8 @@ GTK_SIGNAL_FUNC (on_pause_toggled), NULL); - yes_btn = gnome_stock_button (GNOME_STOCK_BUTTON_YES); + /*yes_btn = gnome_stock_button (GNOME_STOCK_BUTTON_YES);*/ + yes_btn = GTK_WIDGET(gtk_button_new_from_stock(GTK_STOCK_YES)); gtk_widget_ref (yes_btn); gtk_object_set_data_full (GTK_OBJECT (app1), YES_BUTTON, yes_btn, (GtkDestroyNotify) gtk_widget_unref); @@ -578,7 +579,8 @@ GTK_SIGNAL_FUNC (on_yes_clicked), NULL); - no_btn = gnome_stock_button (GNOME_STOCK_BUTTON_NO); + /*no_btn = gnome_stock_button (GNOME_STOCK_BUTTON_NO);*/ + no_btn = GTK_WIDGET(gtk_button_new_from_stock(GTK_STOCK_NO)); gtk_widget_ref (no_btn); gtk_object_set_data_full (GTK_OBJECT (app1), NO_BUTTON, no_btn, (GtkDestroyNotify) gtk_widget_unref); @@ -616,7 +618,7 @@ bar = GNOME_APPBAR (lookup_widget (mainwin, MAIN_APPBAR)); g_assert (bar != NULL); - gnome_appbar_set_progress (bar, pct); + gnome_appbar_set_progress_percentage (bar, pct); return; } --- src/prop_dlg.c 2002-05-30 09:02:01.000000000 +0800 +++ src/prop_dlg.c 2008-01-29 22:48:46.168555472 +0800 @@ -232,23 +232,23 @@ gint page_num, gpointer user_data) { - static GnomeHelpMenuEntry help_ref0 = { "MathWar", +/* static GnomeHelpMenuEntry help_ref0 = { "MathWar", "config.html#GENL-CONFIG" }; static GnomeHelpMenuEntry help_ref1 = { "MathWar", "cp-config.html" }; - static GnomeHelpMenuEntry help_ref2 = { "MathWar", "oper-config.html" }; + static GnomeHelpMenuEntry help_ref2 = { "MathWar", "oper-config.html" };*/ switch (page_num) { case 0: - gnome_help_display (NULL, &help_ref0); + gnome_help_display ("config.html#GENL-CONFIG","MathWar",NULL); break; case 1: - gnome_help_display (NULL, &help_ref1); + gnome_help_display ("cp-config.html","MathWar",NULL); break; case 2: - gnome_help_display (NULL, &help_ref2); + gnome_help_display ("oper-config.html", "MathWar", NULL); break; default: --- src/support.c 2002-02-18 03:59:30.000000000 +0800 +++ src/support.c 2008-01-29 22:50:13.672057041 +0800 @@ -92,7 +92,7 @@ /* * Use pixbuf to load and render the file. */ - im = gdk_pixbuf_new_from_file (fullname->str); + im = gdk_pixbuf_new_from_file (fullname->str,NULL); if (im != NULL) { gdk_pixbuf_render_pixmap_and_mask (im, &ret, NULL, 127); @@ -234,7 +234,7 @@ } /* This is an internally used function to create imlib images. */ -GdkImlibImage* +/*GdkImlibImage* create_image (const gchar *filename) { GdkImlibImage *image; @@ -251,4 +251,4 @@ g_free (pathname); return image; } - +*/ --- src/support.h 2002-02-18 03:59:30.000000000 +0800 +++ src/support.h 2008-01-29 22:50:05.576229508 +0800 @@ -61,5 +61,5 @@ const gchar *filename, gboolean gnome_pixmap); -GdkImlibImage* create_image (const gchar *filename); +/*GdkImlibImage* create_image (const gchar *filename);*/