From fb2e676440ebb7959924dc3638392739ac9a6020 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Wed, 12 Oct 2005 02:19:28 +0000 Subject: [PATCH] Add WU name to graphics window title. TODO: add app_version_num to window title. David or Rom, could you add app_version_num to struct APP_INIT_DATA? svn path=/trunk/boinc/; revision=8658 --- api/windows_opengl.C | 8 ++++++++ api/x_opengl.C | 10 +++++++++- checkin_notes | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/api/windows_opengl.C b/api/windows_opengl.C index 07a37ea6dd..1ea22ca447 100755 --- a/api/windows_opengl.C +++ b/api/windows_opengl.C @@ -136,6 +136,14 @@ static void make_new_window() { APP_INIT_DATA aid; boinc_get_init_data(aid); if (!strlen(aid.app_name)) strcpy(aid.app_name, "BOINC Application"); + char window_title[256]; + // keep following consistent with similar code in x_opengl.C + // TODO: add app_version_num to window title. David or Rom, could + // you add app_version_num to struct APP_INIT_DATA? + // + snprintf(window_title, 256, + "%s [workunit: %s]", aid.app_name, aid.wu_name + ); hWnd = CreateWindowEx(dwExStyle, BOINC_WINDOW_CLASS_NAME, aid.app_name, dwStyle|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, WindowRect.left, WindowRect.top, WindowRect.right-WindowRect.left,WindowRect.bottom-WindowRect.top, diff --git a/api/x_opengl.C b/api/x_opengl.C index e2198398ab..b4d5defa92 100644 --- a/api/x_opengl.C +++ b/api/x_opengl.C @@ -153,7 +153,15 @@ static void make_new_window(int mode) { } app_debug_msg("make_new_window(): now calling glutCreateWindow(%s)...\n", aid.app_name); - win = glutCreateWindow(aid.app_name); + char window_title[256]; + // keep following consistent with similar code in windows_opengl.C + // TODO: add app_version_num to window title. David or Rom, could + // you add app_version_num to struct APP_INIT_DATA? + // + snprintf(window_title, 256, + "%s version [workunit: %s]", aid.app_name, aid.wu_name + ); + win = glutCreateWindow(window_title); app_debug_msg("glutCreateWindow() succeeded. win = %d\n", win); // installing callbacks for the current window diff --git a/checkin_notes b/checkin_notes index 407bbbf91f..313803a110 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13018,9 +13018,15 @@ Rom 11 Oct 2005 (HEAD, staging, stable, boinc_core_release) Bruce 11 Oct 2005 - Fix bug in cancel WU script + - Add WU name to graphics window title. + TODO: add app_version_num to window title. + David or Rom, could you add app_version_num to struct APP_INIT_DATA? html/ ops/ cancel_wu_action.php + api/ + x_opengl.C + windows_opengl.C