bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] suggested patch to gtkbearoff.c


From: Øystein Johansen
Subject: [Bug-gnubg] suggested patch to gtkbearoff.c
Date: Tue, 19 Aug 2003 20:02:27 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130

Hi,

I'm not commiting this patch before it's tried on an other system, but I can report that it works here.

In addition to the patch, tou must add these lines to gnubg.gtkrc

style "gnubg-bearoff-dice-menu" = "default"
{
  font = "-unknown-Atchoum-normal-r-normal-*-*-240-*-*-p-*-iso8859-1"
}
widget "*gnubg-bearoff-dice-menu" style "gnubg-bearoff-dice-menu"

I'm not sure if all systems have the font Atchoum?

Hope you like it!
-Øystein
Index: gtkbearoff.c
===================================================================
RCS file: /cvs/gnubg/gtkbearoff.c,v
retrieving revision 1.5
diff -u -r1.5 gtkbearoff.c
--- gtkbearoff.c        18 Aug 2003 16:54:03 -0000      1.5
+++ gtkbearoff.c        19 Aug 2003 17:59:30 -0000
@@ -3,9 +3,6 @@
  *
  * by Joern Thyssen <address@hidden>, 2003
  *
- * Based on Sho Sengoku's Equity Temperature Map
- * http://www46.pair.com/sengoku/TempMap/English/TempMap.html
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
  * published by the Free Software Foundation.
@@ -165,6 +162,7 @@
   GtkWidget *pwh;
   GtkWidget *pw;
   GtkWidget *pwItem;
+  GtkWidget *pwLabel;
   bearoffwidget *pbw;
   int i, j;
 
@@ -230,13 +228,18 @@
     
     for ( j = 0; j < 6; ++j ) {
       sprintf( sz, "%1d", j + 1 );
-      gtk_menu_append( GTK_MENU( pw ), 
-                       pwItem = gtk_menu_item_new_with_label( sz ) );
+      pwItem = gtk_menu_item_new();
+      pwLabel = gtk_label_new(sz);
+      gtk_widget_set_name ( GTK_WIDGET ( pwLabel ),
+                            "gnubg-bearoff-dice-menu" );
+      gtk_container_add(GTK_CONTAINER(pwItem), pwLabel);
+      gtk_menu_append( GTK_MENU( pw ), pwItem );
       gtk_signal_connect( GTK_OBJECT( pwItem ), "activate",
                           GTK_SIGNAL_FUNC( BearoffUpdated ), pbw );
     }
 
     pbw->apwDice[ i ] = gtk_option_menu_new();
+    gtk_widget_set_usize(pbw->apwDice[ i ], 70, 50 );
 
     gtk_option_menu_set_menu( GTK_OPTION_MENU( pbw->apwDice[ i ] ), pw );
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]