X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxoptions.c;h=5df840bbc558314a1d002904a99830e9cd65a2ef;hb=0e604fd62231e9375a446a4891efa1ede735f4d2;hp=e144e3d80d88063ee9320a36bf6a02986eab8011;hpb=e677df018f76f76bace476a381866294282e9f3f;p=xboard.git diff --git a/gtk/xoptions.c b/gtk/xoptions.c index e144e3d..5df840b 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -138,16 +138,6 @@ static Arg formArgs[] = { }; #endif -void -MarkMenuItem (char *menuRef, int state) -{ - MenuItem *item = MenuNameToItem(menuRef); - - if(item && item->handle) { - ((GtkCheckMenuItem *) (item->handle))->active = state; - } -} - void GetWidgetTextGTK(GtkWidget *w, char **buf) { GtkTextIter start; @@ -263,7 +253,8 @@ int SetWidgetFont (GtkWidget *w, char *s) { PangoFontDescription *pfd; - if (!s || !*s || *s == '#') return 0; // no spec, empty spec or spec of color: fail + if (!s || *s == '#') return 0; // no spec, or spec of color: fail + if(!*(char**)s) return 1; // empty spec: do nothing, but succeed pfd = pango_font_description_from_string(*(char**)s); gtk_widget_modify_font(w, pfd); return 1; @@ -713,6 +704,7 @@ AddHandler (Option *opt, DialogClass dlg, int nr) g_signal_connect(opt->handle, "key-press-event", G_CALLBACK (TypeInProc), (gpointer) (dlg<<16 | (opt - dialogOptions[dlg]))); break; case 5: // game list +printf("use %s\n", appData.gameListFont); SetWidgetFont(opt->handle, (char*) &appData.gameListFont); g_signal_connect(opt->handle, "button-press-event", G_CALLBACK (GameListEvent), (gpointer) 0 ); case 4: // game-list filter