appmenu-gtk-module always claims to have a menu even if there is none, so we need to
check that in advance and only write the window property announcing global menu support
if we successfully managed to acquire a menu
appmenu-gtk-module always announces a menu bar even if there is none, so we always
request a menu bar and when it turns out to be empty and have actually have an app menu
to fall back to we'll use that instead.
The original code resolved them when the menu was requested as I thought that made constructing the dbus menu
easier as in dbus menu it's just a contiguous list of actions. However, this also changed the mapping from
dbus action to GTK action (the latter does not have a unique ID system), so when a GTK app signalled a change
(e.g. a menu item got added/removed), the signal was for the original position of the item and not the
resolved one we were using internally.
By resolving everything on the fly, the IDs stay correct, and updating the menu mostly works now.
There's still something funky going on when moving from e.g. LibreOffice splash to LibreOffice Writer
but that needs to be investigated now.
The code assumes being enabled is the default, which is true, however
when we signal an action change from disabled to enabled, we would not send
along the enabled property and thus it never updated.
For simplicity, just always send it along.
I noticed in GammaRay there were two QQmlEngine instances in a Plasma session and found this.
Differential Revision: https://phabricator.kde.org/D10774
Summary:
Clicking on a button makes Qt grab the pointer, which means the screen can't be
locked. As we wait for the screen to be locked before switching, this never
happens.
BUG: 391007
Test Plan:
Previously the userswitcher only worked on every second try, now it works
always on the first click.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10802
Newer libprison might give nullpointers depending on compilation
options. Adapt code to be able to handle that.
Differential Revision: https://phabricator.kde.org/D10628
Summary:
this avoids some unwanted scene changes and speeds up the
first open a bit, also initialize the size of the dialog main item
so there is a resize less when the Dialog is first shown
Test Plan:
difference in show time is already visible, tough still not perfect,
something else needs to improve as well
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: apol, broulik, hein, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10692
Summary:
--add NeedsAttention status when a menu is showing, and
Passive status when the menu is not available
--remove status updates from plasmoid interface
Test Plan:
I used debug messages to confirm the status changes and
also Latte to check that dynamic background now works ok
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10710
The delegate is quite heavy with lots of seldom used items and opening the clipboard plasmoid takes a significant amount of time.
Differential Revision: https://phabricator.kde.org/D10557
Summary:
-- hiding a menu shouldnt initialize the currentIndex to -1
at all cases. When a secondary menu is already shown then
the currentIndex should be only the index of the new menu.
This improves also the qml bindings because currentIndex
doesnt change all the time with no reason.
Test Plan:
added debug messages in qml side to check the value of
currentIndex
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10695
Summary:
The favicons are located in the file favicons.sqlite file since FF 37 and the old table was removed in FF 41 resulting in crashes because the table wasn't found.
* Update SQL to match the tables in FF 58
* query.bindValue() needs a double colon in the string, see https://doc.qt.io/qt-5/qsqlquery.html#prepare
* Fix intendation (tab->spaces) in one line
BUG: 363136
Test Plan:
Firefox bookmark favicons now work and don't crash Krunner and Kickoff
{F5715653}
{F5715654}
Reviewers: #plasma, broulik, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: ngraham, elvisangelaccio, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10610
Summary:
CCBUG: 358231
CCBUG: 342056
Even the icon with the number of tasks pending moves from time to time.
To reduce the frozen time, a similar patch must be applied also to
frameworks/kwindowsystem src/platforms/xcb/kxmessages.cpp
frameworks/plasma-framework src/plasma/private/effectwatcher.cpp
According to the documentation (and a look to the source code)
http://doc.qt.io/qt-5/qabstractnativeeventfilter.html
The type of event eventType is specific to the platform plugin chosen
at run-time, and can be used to cast message to the right type.
On X11, eventType is set to "xcb_generic_event_t", and the message can
be casted to a xcb_generic_event_t pointer.
The other eventType are "windows_generic_MSG" and "mac_generic_NSEvent".
No other eventType starts with an 'x'.
Test Plan:
Cut & paste 2000 small files.
Before, a freeze (plasmashell not responding) of minutes
After, a freeze of seconds
Reviewers: #frameworks, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10627
Summary:
ServiceJob::setResult already does a emitResult.
Discovered with the assert created in https://phabricator.kde.org/D9862
Reviewers: #frameworks, #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10629
Indicates that there's a "drop down" history similar to a ComboBox.
The fact that you can press the down arrow to bring it up is hardly discoverable.
BUG: 375207
FIXED-IN: 5.13.0
Differential Revision: https://phabricator.kde.org/D10652
Summary:
Before: ~/.cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite
After: ~/.cache/krunner/bookmarkrunnerfirefoxdbfile.sqlite
My guess is that the slash got lost while porting from KDE4.
Test Plan: KRunner creates the new file and uses it.
Reviewers: mlaurent
Reviewed By: mlaurent
Subscribers: mlaurent, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10605
Also init after having connected to signals, this might fix issues where the menu won't show up the first time
an application window shows as the menu might have requested setting the window properties before we connected
to that (unlikely, but who knows).
This is in preparation for being able to fall back from window menu to application menu should the former be empty.
Summary:
baloo can also handle the following types
- Archive
- Spreadsheet
- Presentation
Let's use them
Test Plan: None, see D10623
Reviewers: #plasma_workspaces, davidedmundson
Reviewed By: #plasma_workspaces, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10624
Summary: BUG: 390499
Test Plan:
See callgrind in bug report
Added debug in the relevant section, unplugged a monitor. Saw my output
Reviewers: #plasma, broulik
Subscribers: jtamate, mart, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10538
Summary: All things we need exists in the top level CMakeLists
Test Plan: Compiles
Reviewers: #plasma, bshah
Reviewed By: #plasma, bshah
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10544
Summary:
With all desktop files being installed in KDE_INSTALL_KSERVICES5DIR,
having a namespace prevents clashes and also helps identifying the files.
Reviewers: #plasma, broulik, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10515
It's perfectly fine for a window to have a menu only consisting of application actions.
Also improve update logic by signalling individual item changes rather than having it rebuild
the menu every time. Also optimize the menu change handler to just update items when the same
number of items is inserted and removed at once
* Cleanup code and use categorized logging
* Monitor action changes (e.g. toggled state of checkbox)
* Monitor menu changes (e.g. menu label changed)
* Handle when app has no menu on startup but gets one later
* Disable GTK menu bar when we're running
When the window goes away there's no x window to remove properties from and also the
DBus interface for the menu seems to go away before we could unsubscribe