Merge branch 'master' of ssh://srcbox.net/gkrellm

This commit is contained in:
Bill Wilson 2015-07-15 12:35:58 -05:00
commit 1d41790c9c
5 changed files with 609 additions and 531 deletions

1100
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
// //
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,3,5,0 FILEVERSION 2,3,6,0
PRODUCTVERSION 0,0,0,0 PRODUCTVERSION 0,0,0,0
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP FILETYPE VFT_APP

View File

@ -1895,7 +1895,7 @@ gchar *gkrellm_sys_get_system_name(void)
gkrellm_debug(DEBUG_SYSDEP, "Retrieving system name\n"); gkrellm_debug(DEBUG_SYSDEP, "Retrieving system name\n");
// Default value for sysname // Default value for sysname
g_strlcpy(sysname, "Unknown", sizeof(sysname)); g_strlcpy(sysname, "Windows Unknown", sizeof(sysname));
// Query version info // Query version info
memset(&vi, 0, sizeof(OSVERSIONINFOEXW)); memset(&vi, 0, sizeof(OSVERSIONINFOEXW));
@ -1917,14 +1917,19 @@ gchar *gkrellm_sys_get_system_name(void)
else else
GetSystemInfo(&si); GetSystemInfo(&si);
if (vi.dwMajorVersion == 6 && vi.dwMinorVersion == 0) /* NT Workstation identifies some Client/Desktop Windows version */
{ gboolean isWks = (vi.wProductType == VER_NT_WORKSTATION);
// Windows 6.0 aka Vista or Server 2008
if (vi.wProductType == VER_NT_WORKSTATION) if (vi.dwMajorVersion == 6)
g_strlcpy(sysname, "Windows Vista", sizeof(sysname)); {
else if (vi.dwMinorVersion == 0)
g_strlcpy(sysname, "Windows Server 2008", sizeof(sysname)); g_strlcpy(sysname, isWks ? "Windows Vista" : "Windows Server 2008", sizeof(sysname));
else if (vi.dwMinorVersion == 1)
g_strlcpy(sysname, isWks ? "Windows 7" : "Windows Server 2008 R2", sizeof(sysname));
else if (vi.dwMinorVersion == 2)
g_strlcpy(sysname, isWks ? "Windows 8" : "Windows Server 2012", sizeof(sysname));
else if (vi.dwMinorVersion == 3)
g_strlcpy(sysname, isWks ? "Windows 8.1" : "Windows Server 2012 R2", sizeof(sysname));
} }
else if (vi.dwMajorVersion == 5) else if (vi.dwMajorVersion == 5)
{ {
@ -1932,10 +1937,7 @@ gchar *gkrellm_sys_get_system_name(void)
if (vi.dwMinorVersion == 0) if (vi.dwMinorVersion == 0)
{ {
if (vi.wProductType == VER_NT_WORKSTATION) g_strlcpy(sysname, isWks ? "Windows 2000 Professional" : "Windows 2000 Server", sizeof(sysname));
g_strlcpy(sysname, "Windows 2000 Professional", sizeof(sysname));
else
g_strlcpy(sysname, "Windows 2000 Server", sizeof(sysname));
} }
else if (vi.dwMinorVersion == 1) else if (vi.dwMinorVersion == 1)
{ {

View File

@ -18,7 +18,7 @@ IDI_ICON3 ICON "gkrellm.ico"
// //
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,3,5,0 FILEVERSION 2,3,6,0
PRODUCTVERSION 0,0,0,0 PRODUCTVERSION 0,0,0,0
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP FILETYPE VFT_APP

View File

@ -49,15 +49,11 @@ gkrellm_winop_reset(void)
void void
gkrellm_winop_options(gint argc, gchar **argv) gkrellm_winop_options(gint argc, gchar **argv)
{ {
HWND hWnd = GDK_WINDOW_HWND(gkrellm_get_top_window()->window);
// This essentially hides the taskbar entry on win32, unfortunately // This essentially hides the taskbar entry on win32, unfortunately
// gtk_window_set_skip_taskbar_hint() is broken in GTK+ 2.14 // gtk_window_set_skip_taskbar_hint() does not have any effect
gtk_window_set_type_hint(GTK_WINDOW(gkrellm_get_top_window()), GDK_WINDOW_TYPE_HINT_UTILITY); gtk_window_set_type_hint(GTK_WINDOW(gkrellm_get_top_window()), GDK_WINDOW_TYPE_HINT_UTILITY);
// Set stay-on-top flag if requested gkrellm_winop_state_above(_GK.on_top);
if (_GK.on_top)
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
} }
void void
@ -344,6 +340,8 @@ gkrellm_winop_state_skip_pager(gboolean state)
void void
gkrellm_winop_state_above(gboolean state) gkrellm_winop_state_above(gboolean state)
{ {
GtkWindow *window = GTK_WINDOW(gkrellm_get_top_window());
gtk_window_set_keep_above(window, state);
} }
void void