When opening 'Add Project' wizard it shows next fields empty:
Research area, Organisation, and Web site.
This happens because of EllipseStringIfNeeded() function that truncates the string to 0 symbols because the wizard window was not constructed yet and has undefined size.
This fixes#2444.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
The client shows what kind of operating system it has detected in startup log message and elsewhere. This is confusing and not helping in troubleshooting when people expect these messages to describe the client itself.
Change the messages to use client's build platform instead.
Startup log message, output of --version and user agent string should be safe to change without breaking anything. The client still uses OS platform in various places but changing these would break stuff:
- Scheduler request XML. Scheduler expects scheduler_request.platform_name to be OS primary platform.
- client_state.xml. Client writes OS primary platform and alt platforms separately to client_state.xml. The client reads primary platform only to see if it has changed. The client doesn't read alt platforms but some other program might and depends on the platforms being as they are now. Not changing this means the client won't be able to detect when its own platform has changed. OS platform changes are still detected.
- get_state GUI RPC. The client writes primary platform to client_state.platform_name and all platforms, including primary, to client_state.platform. BOINC Manager only reads client_state.platform. As such, client_state.platform_name could be changed to client's build platform but some 3rd party manager might depend on it being OS primary platform.
- time_stats_log. The client writes platform info there. Unclear who uses that information.
Closes#2386.
SET_LOCALE is no-op when using per-thread locales making SET_LOCALE
unnecessary.
When per-thread locales are not available using SET_LOCALE in
CDlgDiagnosticLogFlags can cause Manager to get stuck to C locale. The
lifetime of two SET_LOCALE objects can be interleaved if log flags are
loaded or saved and an async RPC is launched at the same time. If the
lifetimes are interleaved the first object sets global locale to C. The
second object saves the global locale that was set to C by the first
object. First object restores the global locale correctly. After that
the second object incorrectly restores the global locale to C.
On Linux, Manager sometimes prints timestamps in C locale instead of the
locale user has chosen. This happens when Manager is formatting a
timestamp and at the same time a GUI RPC is in progress. GUI RPCs
temporarily set the global locale to C locale with SET_LOCALE.
Use SET_LOCALE's per-thread locale version and set thread locale in
Manager's RPC thread to fix this.
Also clean up #ifdef mazes in SET_LOCALE and Manager's RPC thread now
that there are HAVE_* macros available. Remove OS X < 10.4 code because
that old OS X versions are not supported any more.
Fixes#2399.
Allows fixing and cleaning up per-thread locale support in Manager and
libboinc.
locale.h and xlocale.h were checked for libboinc_graphics. Move
xlocale.h check to correct place and remove locale.h check. locale.h has
been part of C standard library since C89.
The support for per-thread locales cannot be reliably inferred from the
existence of different headers. Some systems declare uselocale() in
locale.h, others in xlocale.h and xlocale.h is no longer included in GNU
libc. Instead explicitly check for uselocale() and
_configthreadlocale().
Add uselocale() check result to Mac config.h so that the #ifdef mazes
can be simplified.
Also correct quoting in AC_CHECK_FUNCS and AC_CHECK_HEADERS calls.
X11 has two clipboards, CLIPBOARD and PRIMARY. CLIPBOARD is used for
copy-paste operations in the same manner as in other GUI environments.
PRIMARY is used for text selections. Any selected text is automatically
copied to PRIMARY and can be pasted with mouse middle click.
wxClipboard is used to access both clipboard types. wxClipboard
remembers which clipboard was last used and continues to use it until it
is told otherwise. So when user selects text somewhere in Manager
wxClipboard is set to access PRIMARY. When user later clicks Copy button
in Properties dialog or in Event Log the text goes to PRIMARY against
user's expectations.
Fix this by telling wxClipboard to use CLIPBOARD in Properties dialog
and Event Log Copy buttons.
Use wxHtmlWindow instead of wxWebView.
Handle mouse events to show the correct state of the 'Copy selected' button.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
# By David Anderson
# Via David Anderson
* 'dpa_autologin_client' of https://github.com/BOINC/boinc:
Win installer: don't overwrite project list file.
login_token_lookup RPC: make it work for account managers too
Client: make autologin work for account managers as well as projects.
On Windows, wxListCtrl has a bug that makes it draw selected unfocused rows with colors used for selected focused rows when the row background color is wxSYS_COLOUR_BTNFACE.
With default color schemes, on Windows XP the list is drawn correctly, but on Windows 10 the (240,240,240) used in stripe color is coincidentally the same as wxSYS_COLOUR_BTNFACE and selected rows are drawn with wrong colors.
Fix this by using the same stripe color that wxWidgets would use by default and that is used in Projects, Tasks and Transfers lists. Future proof the code by including a workaround just in case Windows changes color scheme again. If such color scheme change occurs then the same workaround needs to be added to Projects, Tasks and Transfers lists.
Fixes#1083.
Since the method is overridden to be private it isn't callable from outside the class and the method isn't used inside the class either.
And overriding a base class method just to return a constant color isn't very useful when the same effect can be had by, e.g., calling SetBackgroundColour() in class' constructor.
On the other hand, trying to force the background color to white may conflict with the color scheme user has chosen and should not be done.
All in all, remove the code as not useful.
Part of #1083.
The nonstandard header <xlocale.h> has been removed.
Most programs should use <locale.h> instead.
If you have a specific need for the definition of
locale_t with no other declarations, please
contact libc-alpha@sourceware.org and explain.
Fix menu item description as requested in #1033.
Also this fixes#770 because now it shows correct branded product link that should be opened.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
Change text labels to remove inconsistency betweeb them and button text as described in #601
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>