mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-22 14:31:53 +02:00
Show fped's SVN revision in the title bar.
- Makefile: pass SVN version and commit status to CPP - gui.c (gui_main): show SVN revision in the title bar, if available git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5845 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
3d6ef48930
commit
53a01182a3
7
Makefile
7
Makefile
@ -37,13 +37,18 @@ LIBS_GTK = `pkg-config --libs gtk+-2.0`
|
|||||||
|
|
||||||
CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \
|
CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \
|
||||||
-Wmissing-declarations -Wno-format-zero-length
|
-Wmissing-declarations -Wno-format-zero-length
|
||||||
CFLAGS = -g -std=gnu99 $(CFLAGS_GTK) -DCPP='"cpp"' $(CFLAGS_WARN)
|
CFLAGS = -g -std=gnu99 $(CFLAGS_GTK) -DCPP='"cpp"' \
|
||||||
|
-DSVN_VERSION='"$(SVN_VERSION)$(SVN_STATUS)"' $(CFLAGS_WARN)
|
||||||
SLOPPY = -Wno-unused -Wno-implicit-function-declaration \
|
SLOPPY = -Wno-unused -Wno-implicit-function-declaration \
|
||||||
-Wno-missing-prototypes -Wno-missing-declarations
|
-Wno-missing-prototypes -Wno-missing-declarations
|
||||||
LDLIBS = -lm -lfl $(LIBS_GTK)
|
LDLIBS = -lm -lfl $(LIBS_GTK)
|
||||||
YACC = bison -y
|
YACC = bison -y
|
||||||
YYFLAGS = -v
|
YYFLAGS = -v
|
||||||
|
|
||||||
|
SVN_VERSION=$(shell svn info | sed '/Last Changed Rev: /s///p;d')
|
||||||
|
SVN_STATUS=$(shell [ -z "`svn status -q`" ] || echo +)
|
||||||
|
|
||||||
|
|
||||||
# ----- Verbosity control -----------------------------------------------------
|
# ----- Verbosity control -----------------------------------------------------
|
||||||
|
|
||||||
CPP := $(CPP) # make sure changing CC won't affect CPP
|
CPP := $(CPP) # make sure changing CC won't affect CPP
|
||||||
|
6
gui.c
6
gui.c
@ -314,7 +314,11 @@ int gui_main(void)
|
|||||||
root = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
root = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_position(GTK_WINDOW(root), GTK_WIN_POS_CENTER);
|
gtk_window_set_position(GTK_WINDOW(root), GTK_WIN_POS_CENTER);
|
||||||
gtk_window_set_default_size(GTK_WINDOW(root), 620, 460);
|
gtk_window_set_default_size(GTK_WINDOW(root), 620, 460);
|
||||||
gtk_window_set_title(GTK_WINDOW(root), "fped");
|
if (*SVN_VERSION)
|
||||||
|
gtk_window_set_title(GTK_WINDOW(root),
|
||||||
|
"fped (rev " SVN_VERSION ")");
|
||||||
|
else
|
||||||
|
gtk_window_set_title(GTK_WINDOW(root), "fped");
|
||||||
|
|
||||||
/* get root->window */
|
/* get root->window */
|
||||||
gtk_widget_show_all(root);
|
gtk_widget_show_all(root);
|
||||||
|
Loading…
Reference in New Issue
Block a user