Description: Patch upstream to work with gtk2.
Index: mathwar-0.2.5/src/about_dlg.c
===================================================================
--- mathwar-0.2.5.orig/src/about_dlg.c 2009-12-07 20:22:00.000000000 -0500
+++ mathwar-0.2.5/src/about_dlg.c 2009-12-07 20:23:12.000000000 -0500
@@ -41,6 +41,7 @@
{
GtkWidget *about_dlg;
GString *logo_str;
+ GdkPixbuf *logo_img=NULL;
const gchar *authors[] = {
"Ken Sodemann <stufflehead@bigfoot.com>",
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)
Index: mathwar-0.2.5/src/draw.c
===================================================================
--- mathwar-0.2.5.orig/src/draw.c 2009-12-07 20:22:00.000000000 -0500
+++ mathwar-0.2.5/src/draw.c 2009-12-07 20:23:12.000000000 -0500
@@ -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);
}
Index: mathwar-0.2.5/src/mainwin.c
===================================================================
--- mathwar-0.2.5.orig/src/mainwin.c 2009-12-07 20:22:00.000000000 -0500
+++ mathwar-0.2.5/src/mainwin.c 2009-12-07 20:23:12.000000000 -0500
@@ -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;
}
Index: mathwar-0.2.5/src/prop_dlg.c
===================================================================
--- mathwar-0.2.5.orig/src/prop_dlg.c 2009-12-07 20:22:00.000000000 -0500
+++ mathwar-0.2.5/src/prop_dlg.c 2009-12-07 20:23:12.000000000 -0500
@@ -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:
Index: mathwar-0.2.5/src/support.c
===================================================================
--- mathwar-0.2.5.orig/src/support.c 2009-12-07 20:22:00.000000000 -0500
+++ mathwar-0.2.5/src/support.c 2009-12-07 20:23:12.000000000 -0500
@@ -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;
}
-
+*/
Index: mathwar-0.2.5/src/support.h
===================================================================
--- mathwar-0.2.5.orig/src/support.h 2009-12-07 20:22:00.000000000 -0500
+++ mathwar-0.2.5/src/support.h 2009-12-07 20:23:12.000000000 -0500
@@ -61,5 +61,5 @@
const gchar *filename,
gboolean gnome_pixmap);
-GdkImlibImage* create_image (const gchar *filename);
+/*GdkImlibImage* create_image (const gchar *filename);*/