Insert a manual reference in the default status bar text.

To guide developers to the resources they need.

[actual wording tweaked by SGT]
This commit is contained in:
Jonas Kölker
2015-10-03 15:01:48 +02:00
committed by Simon Tatham
parent b94be41445
commit 581becc3aa
4 changed files with 7 additions and 3 deletions

2
gtk.c
View File

@ -2562,7 +2562,7 @@ static frontend *new_window(char *arg, int argtype, char **error)
fe->statusctx = gtk_statusbar_get_context_id fe->statusctx = gtk_statusbar_get_context_id
(GTK_STATUSBAR(fe->statusbar), "game"); (GTK_STATUSBAR(fe->statusbar), "game");
gtk_statusbar_push(GTK_STATUSBAR(fe->statusbar), fe->statusctx, gtk_statusbar_push(GTK_STATUSBAR(fe->statusbar), fe->statusctx,
"test"); DEFAULT_STATUSBAR_TEXT);
#if GTK_CHECK_VERSION(3,0,0) #if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_preferred_size(fe->statusbar, &req, NULL); gtk_widget_get_preferred_size(fe->statusbar, &req, NULL);
#else #else

2
osx.m
View File

@ -569,7 +569,7 @@ struct frontend {
[status setBezeled:YES]; [status setBezeled:YES];
[status setBezelStyle:NSTextFieldSquareBezel]; [status setBezelStyle:NSTextFieldSquareBezel];
[status setDrawsBackground:YES]; [status setDrawsBackground:YES];
[[status cell] setTitle:@""]; [[status cell] setTitle:@DEFAULT_STATUSBAR_TEXT];
[status sizeToFit]; [status sizeToFit];
rect2 = [status frame]; rect2 = [status frame];
rect.size.height += rect2.size.height; rect.size.height += rect2.size.height;

View File

@ -587,4 +587,7 @@ extern const int gamecount;
extern const game thegame; extern const game thegame;
#endif #endif
/* A little bit of help to lazy developers */
#define DEFAULT_STATUSBAR_TEXT "Use status_bar() to fill this in."
#endif /* PUZZLES_PUZZLES_H */ #endif /* PUZZLES_PUZZLES_H */

View File

@ -1702,7 +1702,8 @@ static int fe_set_midend(frontend *fe, midend *me)
if (fe->statusbar) if (fe->statusbar)
DestroyWindow(fe->statusbar); DestroyWindow(fe->statusbar);
if (midend_wants_statusbar(fe->me)) { if (midend_wants_statusbar(fe->me)) {
fe->statusbar = CreateWindowEx(0, STATUSCLASSNAME, TEXT("ooh"), fe->statusbar = CreateWindowEx(0, STATUSCLASSNAME,
TEXT(DEFAULT_STATUSBAR_TEXT),
WS_CHILD | WS_VISIBLE, WS_CHILD | WS_VISIBLE,
0, 0, 0, 0, /* status bar does these */ 0, 0, 0, 0, /* status bar does these */
NULL, NULL, fe->inst, NULL); NULL, NULL, fe->inst, NULL);