Revision: 54566
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54566&view=rev
Author:   bob1961
Date:     2013-03-08 14:57:55 +0000 (Fri, 08 Mar 2013)
Log Message:
-----------
Dynamically set the brlcad version in Archer's title bar.

Modified Paths:
--------------
    brlcad/trunk/src/archer/archer
    brlcad/trunk/src/libtclcad/tclcad_obj.c

Modified: brlcad/trunk/src/archer/archer
===================================================================
--- brlcad/trunk/src/archer/archer      2013-03-08 14:25:12 UTC (rev 54565)
+++ brlcad/trunk/src/archer/archer      2013-03-08 14:57:55 UTC (rev 54566)
@@ -251,10 +251,11 @@
     global env
     global tcl_platform
     global argv
+    global brlcad_version
 
     if {$::ArcherCore::inheritFromToplevel} {
        set ::ArcherCore::application [Archer .\#auto]
-       wm title $::ArcherCore::application "Archer"
+       wm title $::ArcherCore::application "Archer $brlcad_version"
        if {$tcl_platform(os) == "Windows NT"} {
            wm iconbitmap $::ArcherCore::application -default \
                [file join [bu_brlcad_data "icons"] archer.ico]
@@ -273,7 +274,7 @@
        wm geometry $::ArcherCore::application "$width\x$height+0+0"
        wm protocol $::ArcherCore::application WM_DELETE_WINDOW {exitArcher 
$::ArcherCore::application}
     } else {
-       wm title . "Archer"
+       wm title . "Archer $brlcad_version"
        if {$tcl_platform(os) == "Windows NT"} {
            wm iconbitmap . -default \
                [file join [bu_brlcad_data "html"] manuals archer archer.ico]

Modified: brlcad/trunk/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/trunk/src/libtclcad/tclcad_obj.c     2013-03-08 14:25:12 UTC (rev 
54565)
+++ brlcad/trunk/src/libtclcad/tclcad_obj.c     2013-03-08 14:57:55 UTC (rev 
54566)
@@ -93,6 +93,8 @@
 /* Private headers */
 #include "tclcad_private.h"
 
+#include "brlcad_version.h"
+
 #define TO_UNLIMITED -1
 
 /*
@@ -1252,9 +1254,16 @@
 int
 Go_Init(Tcl_Interp *interp)
 {
+    struct bu_vls version_str;
+
     if (library_initialized(0))
        return TCL_OK;
 
+    bu_vls_init(&version_str);
+    bu_vls_printf(&version_str, "set brlcad_version \"%s\"", brlcad_version());
+    (void)Tcl_Eval(interp, bu_vls_addr(&version_str));
+    bu_vls_free(&version_str);
+
     /*XXX Use of brlcad_interp is temporary */
     brlcad_interp = interp;
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to