Commit Graph

4126 Commits

Author SHA1 Message Date
Mikkel Krautz
e83d01c795 Merge PR #2506: Plugins: fill out pids map on Linux. 2016-08-10 21:23:48 +02:00
Mikkel Krautz
d3f79b6f2f Merge PR #2500: Transifex translation update 2016-08-08 20:09:39 +02:00
Mikkel Krautz
664ca408ba Merge PR #2498: GlobalShortcut, Themes: move hard-coded stylesheet from GlobalShortcut.ui into the Themes class's default stylesheet. 2016-08-08 20:09:18 +02:00
MumbleTransifexBot
7ac1e27a47 Transifex translation update
Mode: default
Minimum percent translated: 0
Matched 41 languages
2016-08-08 01:27:40 +00:00
Mikkel Krautz
613b7fc6f3 GlobalShortcut, Themes: move hard-coded stylesheet from GlobalShortcut.ui into the Themes class's default stylesheet. 2016-08-07 21:03:08 +02:00
Mikkel Krautz
56ffa37929 GlobalShortcut: use MUComboBox. 2016-08-07 19:37:19 +02:00
Mikkel Krautz
29e905aa2f Use MUComboBox in .ui files. 2016-08-07 19:37:18 +02:00
Mikkel Krautz
4b7ebd97d5 MainWindow: use MUComboBox. 2016-08-07 19:37:18 +02:00
Mikkel Krautz
25c0740f5c Add MUComboBox.
This adds a new QComboBox subclass called MUComboBox
to widgets/MUComboBox.{cpp,h}.

This QComboBox subclass explicitly uses a QListView
as the backing view for the QComboBox.

This fixes various styling issues for QComboBox
on macOS.

By default on macOS, QComboBoxes are backed by
something that tries to emulate a native macOS
menu. However, that QAbstractItemView behaves
inconsistently when styled. For example, it does
not seem possible to set the size of individual
items, because they're restricted to the height
of a normal macOS menu item.
Also, in some cases (such as the QComboBox used
for the transmission picker in MainWindow's
QToolbar),  the height of the QAbstractItemView
was also wrong when styled. This caused the combo
box to always scroll, even though it seemingly
was sized correctly.

To get consistent behavior, we use QListView as
the QComboBox's view in MUComboBox.

Also, at least for the default Mumble themes,
I've observed some weird eliding behavior for
the text of added items in the transmission picker
QComboBox in MainWindow's toolbar. Because of that,
for MUComboBox, we don't show ellipses by default.
This fixes the display of the combo box in the
MainWindow's toolbar.
2016-08-07 19:30:15 +02:00
Mikkel Krautz
0a9c69db1a Merge PR #2470: OSInfo: fix new Windows 10 OSInfo to not include NUL values in the displayable version string. 2016-08-07 01:27:35 +02:00
Mikkel Krautz
ad10136d39 Merge PR #2493: Various mumble_plugin.h and ManualPlugin fixes 2016-08-07 01:26:47 +02:00
Mikkel Krautz
2df5f2f77b OSInfo: fix new Windows 10 OSInfo to not include NUL values in the displayable version string.
These strings from the registry are NUL terminated, but in practice, this
isn't guaranteed.

This means that the displayable version string for Windows 10 currently
contains NUL values.

The Mumble client doesn't care, but it isn't very nice. It breaks things
like CVP providers that don't sanitize Murmur's output.

To fix the problem, this change introduces a regString function that
converts a wchar_t string to QString. Any NUL value in the input
string will terminate the string.

Fixes mumble-voip/mumble#2469
2016-08-06 17:34:41 +02:00
Mikkel Krautz
9fbe678b21 ManualPlugin: remove unnecessary mumble_plugin.h preamble. 2016-08-06 17:18:10 +02:00
Mikkel Krautz
e7ff17b315 Merge PR #2492: GlobalShortcut_win: log product guid when adding a new DirectInput device. 2016-08-06 16:41:30 +02:00
Mikkel Krautz
896f6f521f Merge PR #2491: GlobalShortcut_win: log product GUID when excluding an XInput device from DirectInput processing. 2016-08-06 16:41:10 +02:00
Mikkel Krautz
d3aa65d986 GlobalShortcut_win: log product guid when adding a new DirectInput device.
Previously, we only logged the instance GUID, not the product GUID.

With this change, the log line when adding a new device contains both.
2016-08-06 14:54:07 +02:00
Mikkel Krautz
682d33b827 GlobalShortcut_win: log product GUID when excluding an XInput device from DirectInput processing.
3rdparty/xinputcheck-src uses the product GUID in its list of well-known
devices.

For debugging purposes, it makes sense for us to log this here.
2016-08-06 14:37:37 +02:00
Mikkel Krautz
3ad420fc1e GlobalShortcut_win: fix XboxInput button mask in buttonName().
The controller ID is shifted 24 bits, so the correct mask is
0x00ffffff.

Also, 0x00ffffffff (40 bits) should have been a red flag, since
we're working with uint32_t types here.

This fixes button names for Xbox controllers that are at indexes > 0.
2016-08-06 14:31:36 +02:00
Mikkel Krautz
fe52ad076d Plugins: fill out pids map on Linux. 2016-08-04 23:34:00 +02:00
Mikkel Krautz
b126c4e206 Merge PR #2478: Log: check for QSizeF::isValid() in Log::validHtml() 2016-07-31 20:43:32 +02:00
Nascher
fb19de19a3 Log: check for QSizeF::isValid() in Log::validHtml().
It is possible for QTextDocument::size() to return
invalid sizes. For example, very big img tags with
sizes such as 33554451x33554451 cause QTextDocument
to return a QSizeF with a negative width or height.

This commits adds a call to QSizeF::isValid() to ensure
we treat QSizeFs with negative sizes as invalid.

Fixes mumble-voip/mumble#2477
2016-07-31 18:40:25 +02:00
Mikkel Krautz
3923ce829a Merge PR #2460: Transifex translation update 2016-07-31 12:11:39 +02:00
synapse84
b205f6de72 Removed RightToLeft property. 2016-07-29 20:02:11 -06:00
MumbleTransifexBot
6ed1904ef5 Transifex translation update
Mode: default
Minimum percent translated: 0
Matched 41 languages
2016-07-21 01:27:38 +00:00
Mikkel Krautz
88e664710d OSInfo: add Windows 10 displayable version string.
Fixes mumble-voip/mumble#1916
2016-07-20 23:37:08 +02:00
Mikkel Krautz
cf9877c56d Merge PR #2440: GlobalShortcut_win: add additional diagnostic logging to the DirectInput backend 2016-07-20 23:20:29 +02:00
Mikkel Krautz
4a99cde52c Merge PR #2446: AudioWizard: always use ClassicStyle. 2016-07-20 23:18:41 +02:00
Mikkel Krautz
acfa0444b9 Merge PR #2450: About: HTML-escape third party license text. 2016-07-20 23:16:54 +02:00
MumbleTransifexBot
1956b34038 Transifex translation update
Mode: default
Minimum percent translated: 0
Matched 41 languages
2016-07-19 01:27:38 +00:00
Mikkel Krautz
e0f368db1c About: HTML-escape third party license text.
Fixes mumble-voip/mumble#2448
2016-07-19 02:51:06 +02:00
Mikkel Krautz
7091a4c65e AudioWizard: always use ClassicStyle.
This is a sensible default, because it looks good using all themes.
Previously, we used Qt's default style, which is platform-specific.
On Windows, we got an Aero-like style.

This change also fixes our issue with some parts of the wizard not
being styled correctly.

Fixes mumble-voip/mumble#2436
2016-07-18 22:16:22 +02:00
Mikkel Krautz
57819f18d3 GlobalShortcut_win: log dwDevType when rejecting a blacklisted device.
Like we log dwDevType when adding a device, let us also log it when
rejecting a blacklisted device.

We never reach the other log statement when a device is rejected, so
without this change, we can't see the device type of blacklisted
devices in the log.
2016-07-18 15:37:52 +02:00
Mikkel Krautz
c2eb8013d4 GlobalShortcut_win: when adding a DirectInput device, log its dwDevType.
We've previously resorted to blacklisting devices that cause hangs and
other issues.

The goal of logging dwDevType here is to be able to diagnose such issues
in the future. It would be interesting to know what such devices advertise
themselves as to DirectInput.

Perhaps, once we have more data, we can limit the amount of devices we
query, instead of querying all devices all the time.
2016-07-18 15:37:51 +02:00
Mikkel Krautz
00f4e06340 GlobalShortcut_win: allow logging of a device's objects in verbose mode.
This commit adds a new config option,
"shortcut/windows/directinput/verboselogging".

If set to true, GlobalShortcut_win will log all objects (that is, buttons,
keys, axes, etc.) for a device.

Some devices, such as the keyboard from mumble-voip/mumble#2426 advertise
an odd number of objects. In this case, 1024 objects.

This will hopefully help us in troubleshooting this issue.
2016-07-18 15:37:36 +02:00
Mikkel Krautz
af38fdb8ca Merge PR #2424: Fix updatecheck result logging 2016-07-18 13:49:40 +02:00
Mikkel Krautz
0f9d5c1255 ManualPlugin: fix macOS build. 2016-07-17 23:48:40 +02:00
Mikkel Krautz
42ddfccb06 Remove hacks specific to the manual plugin from the build.
This removes a lot of very hacky stuff. Its own job was to
let the manual plugin be a separate DLL.

Now that the manual plugin is built into Mumble itself, all
these dirty tricks can be removed.

Since we don't have to export a lot of symbols that we don't
use anymore, the linker can remove a lot of unused code for us:

mumble_app.dll before (1.3.0~969):  40.345 KB
mumble_app.dll after:               36.819 KB
Difference:                         -3.526 KB
2016-07-17 00:32:11 +02:00
Mikkel Krautz
f59d080ece ManualPlugin.h: make include guards fit the src/mumble style. 2016-07-17 00:32:09 +02:00
Mikkel Krautz
32919bb3bf ManualPlugin.h: add missing LICENSE.header. 2016-07-17 00:32:09 +02:00
Mikkel Krautz
202fa2d55f Rename the manual plugin's files in src/mumble to be ManualPlugin.{cpp,h,ui}. 2016-07-17 00:32:08 +02:00
Mikkel Krautz
db4c16dc74 Teach the Plugins class about the built-in manual plugin. 2016-07-17 00:32:07 +02:00
Mikkel Krautz
a179f5d249 Move 'manual' plugin into Mumble itself.
The machinery needed to support the "manual" plugin as a DLL
file on Windows is very complex.

This is because we build Mumble itself as mumble_app.dll and link
our dependencies statically. And also because of various changes
made in Qt 5.

The manual plugin uses Qt. When Mumble linked dynamically against
Qt4Gui.dll, etc. - everything worked fine. The manual plugin simply
linked against the same DLLs.

With the move to mumble_app.dll, we also moved to statically link
against Qt for mumble_app.dll.

To accommodate the manual plugin, we implemented various hacks to
export the Qt symbols from mumble_app.dll that were necessary for
loading the manual plugin.

And that worked for a while.

However, right now, with Qt 5.6, the plugin is broken. And I get
a lot of weird crashes when interacting with the manual plugin.

Most of it boils down to the fact that both manual.dll and mumble_app.dll
have copies of statically initialized data, like QArrayData::shared_null.
Sharing objects between mumble_app.dll and manual.dll in this scenario is
impossible, because using the object in one module will cause one set of
statically initialized data to be used, while use in the other will cause
the other data to be accessed. This is especially bad for things that use
reference counting, because it'll get out of sync.

So, to get rid of this mess, we're moving the manual plugin into Mumble
itself. Functionally, it doesn't change anything. The manual plugin could
not be auto-updated because it depended on a specific Qt and Mumble
version. Mostly because it depended on the correct set of Qt symbols to be
exported from mumble_app.dll.

The plugin now works correctly, and we can safely remove a lot of the
hacks that were required to load the manual plugin in its earlier
incarnation.

The only downside is that we can't test the manual plugin in PAHelper.
But that wasn't really the case before either, because the plugin
practically depended on Mumble to run.
2016-07-17 00:32:06 +02:00
Mikkel Krautz
3ea298a58f Plugins: add MumblePluginQt to better support the 'manual' plugin.
If a plugin implements MumblePluginQt, it is a signal to Mumble
that the plugin wishes to use Qt-based about and config dialogs.

The MmublePluginQt interface includes two methods: "about" and
"config".

Mumble will call these methods with a pointer to a QWidget that
is suitable to be the parent for the plugin's about and/or config
dialogs.

The MumblePluginQt interface is only useful for plugins that use Qt.
That, for now, is only the "manual" plugin. In general, plugins can't
really use Qt unless they're very tightly coupled to Mumble.
2016-07-17 00:31:59 +02:00
Mikkel Krautz
b2f2277df2 Merge PR #2430: LCD: add workarounds for LCD drawing on Qt 5.6. 2016-07-17 00:20:52 +02:00
Mikkel Krautz
be4ae5b269 Merge PR #2419: MainWindow, CustomElements: implement proper Backtab/Shift-Tab behavior for MainWindow::qteChat. 2016-07-16 20:15:25 +02:00
Mikkel Krautz
615fe7f134 MainWindow: allow using F6 to switch between MainWindow's main widgets.
This new feature improves keyboard navigation in Mumble's main window
and is a great help to users of screen readers.

It was requested in mumble-voip/mumble#2291.

The behavior emulates Windows's (File) Explorer, where pressing F6
allows you to swtich focus between the application's main panes/panels.

In Mumble, pressing F6 switches between

  Log view -> Chat input bar -> User tree view -> Log view [...]

Fixes part of mumble-voip/mumble#2291
2016-07-16 19:13:02 +02:00
Mikkel Krautz
d573183015 GlobalShortcutWin: delay winhook initialization until after our first timeTicked() slot.
This removes any observable mouse lag from the winhook initialization
process.

Fixes mumble-voip/mumble#2273
2016-07-16 17:55:07 +02:00
Mikkel Krautz
c04aa4e882 LCD: add workarounds for LCD drawing on Qt 5.6.
This is a temporary workaround until we can get the issue fixed
upstream.

See mumble-voip/mumble#2429 for more information.
2016-07-15 23:32:26 +02:00
Mikkel Krautz
46b5b62781 Murmur: use aiUdpFlag.load() in comparisons to fix Qt <5.2 build.
Fixes mumble-voip/mumble#2420
2016-07-15 00:49:08 +02:00
Kissaki
edba745837 Fix missing update check failure message
We always want to log when the updatecheck fails.
As it was, when the info was logged was backwards.
Now it always logs.
2016-07-14 18:06:15 +02:00