Skip to content

Commit 08a3756

Browse files
committed
Disable desktop integration
1 parent 635fdd7 commit 08a3756

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

data/io.github.leolost2605.detective.appdata.xml.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
<ul>
6161
<li>Fixes icons for some (especially flatpak) apps not showing</li>
6262
<li>Fixes a small visual glitch that caused the background of the search view to have a slightly different color</li>
63-
<li>When selecting an app that already has an window open the window will now be focused, possibly switching to its workspace</li>
6463
<li>App results sorting now takes recently launched apps into account</li>
6564
<li>Improved finding installed apps</li>
6665
<li>Detective will now find apps that were installed while it is running</li>

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
option ('desktopintegration', type : 'boolean', value : false)

plugins/AppsPlugin/Plugin.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ public class AppMatch : Match {
5353
public override async void activate () throws Error {
5454
RelevancyService.get_default ().app_launched (app_id);
5555

56+
#if DESKTOP_INTEGRATION
5657
var desktop_integration = yield DesktopIntegration.get_instance ();
5758
foreach (var window in yield desktop_integration.get_windows ()) {
5859
if (window.properties["app-id"].get_string () == app_id) {
5960
yield desktop_integration.focus_window (window.uid);
6061
return;
6162
}
6263
}
64+
#endif
6365

6466
Process.spawn_command_line_async ("flatpak-spawn --host " + exec);
6567
}

plugins/AppsPlugin/meson.build

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1+
desktopintegration = get_option('desktopintegration')
2+
3+
sources = [
4+
'Plugin.vala',
5+
'RelevancyService.vala'
6+
]
7+
8+
if desktopintegration
9+
sources += 'DesktopIntegration.vala'
10+
add_project_arguments(['--define', 'DESKTOP_INTEGRATION'], language: 'vala')
11+
endif
12+
113
shared_library(
214
'AppsPlugin',
3-
sources: [
4-
'DesktopIntegration.vala',
5-
'Plugin.vala',
6-
'RelevancyService.vala'
7-
],
15+
sources: sources,
816
dependencies: [
917
lib_dep,
1018
meson.get_compiler('c').find_library ('m')
1119
],
1220
install: true,
13-
install_dir: plugin_dir
21+
install_dir: plugin_dir,
1422
)

0 commit comments

Comments
 (0)