chiark / gitweb /
Insert a manual reference in the default status bar text.
authorJonas Kölker <jonaskoelker@yahoo.com>
Sat, 3 Oct 2015 13:01:48 +0000 (15:01 +0200)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 16:12:20 +0000 (17:12 +0100)
To guide developers to the resources they need.

[actual wording tweaked by SGT]

gtk.c
osx.m
puzzles.h
windows.c

diff --git a/gtk.c b/gtk.c
index 26b3ce0dfe44c6c654b8d7f6b3f80d36362bf49c..27eb5da4c5a44c53ace46ff3961f49c8e76855e6 100644 (file)
--- a/gtk.c
+++ b/gtk.c
@@ -2562,7 +2562,7 @@ static frontend *new_window(char *arg, int argtype, char **error)
        fe->statusctx = gtk_statusbar_get_context_id
            (GTK_STATUSBAR(fe->statusbar), "game");
        gtk_statusbar_push(GTK_STATUSBAR(fe->statusbar), fe->statusctx,
-                          "test");
+                          DEFAULT_STATUSBAR_TEXT);
 #if GTK_CHECK_VERSION(3,0,0)
        gtk_widget_get_preferred_size(fe->statusbar, &req, NULL);
 #else
diff --git a/osx.m b/osx.m
index 7a8bdeb3b27ee954b9e4a734a4d21b6d74c26b1b..47401241757a1b1b275e458866d1786c8d27be3d 100644 (file)
--- a/osx.m
+++ b/osx.m
@@ -569,7 +569,7 @@ struct frontend {
        [status setBezeled:YES];
        [status setBezelStyle:NSTextFieldSquareBezel];
        [status setDrawsBackground:YES];
-       [[status cell] setTitle:@""];
+       [[status cell] setTitle:@DEFAULT_STATUSBAR_TEXT];
        [status sizeToFit];
        rect2 = [status frame];
        rect.size.height += rect2.size.height;
index a40201686e6e98274c62dba28b3bf7283b3910f1..0d5aeee14fe0b3b00bf88bea74c95243f87e9606 100644 (file)
--- a/puzzles.h
+++ b/puzzles.h
@@ -587,4 +587,7 @@ extern const int gamecount;
 extern const game thegame;
 #endif
 
+/* A little bit of help to lazy developers */
+#define DEFAULT_STATUSBAR_TEXT "Use status_bar() to fill this in."
+
 #endif /* PUZZLES_PUZZLES_H */
index ba657c0d33ad2089aed6604b77086a29cd4544df..9cc66e2bd9eacc905fae6fc470cbc79b60dc1304 100644 (file)
--- a/windows.c
+++ b/windows.c
@@ -1702,7 +1702,8 @@ static int fe_set_midend(frontend *fe, midend *me)
     if (fe->statusbar)
         DestroyWindow(fe->statusbar);
     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,
                                       0, 0, 0, 0, /* status bar does these */
                                       NULL, NULL, fe->inst, NULL);