mirror of
https://github.com/localsend/localsend.git
synced 2026-06-23 04:10:07 +00:00
fix: disable tray manager on linux
This commit is contained in:
@@ -103,13 +103,15 @@ class _SettingsTabState extends ConsumerState<SettingsTab> {
|
||||
),
|
||||
),
|
||||
if (checkPlatformIsDesktop()) ...[
|
||||
_BooleanEntry(
|
||||
label: t.settingsTab.general.minimizeToTray,
|
||||
value: settings.minimizeToTray,
|
||||
onChanged: (b) async {
|
||||
await ref.read(settingsProvider.notifier).setMinimizeToTray(b);
|
||||
},
|
||||
),
|
||||
if (checkPlatform([TargetPlatform.windows, TargetPlatform.macOS])) ...[
|
||||
_BooleanEntry(
|
||||
label: t.settingsTab.general.minimizeToTray,
|
||||
value: settings.minimizeToTray,
|
||||
onChanged: (b) async {
|
||||
await ref.read(settingsProvider.notifier).setMinimizeToTray(b);
|
||||
},
|
||||
),
|
||||
],
|
||||
if (checkPlatform([TargetPlatform.windows])) ...[
|
||||
_SettingsEntry(
|
||||
label: t.settingsTab.general.launchAtStartup,
|
||||
|
||||
@@ -10,7 +10,7 @@ enum TrayEntry {
|
||||
}
|
||||
|
||||
Future<void> initTray() async {
|
||||
if (!checkPlatformIsDesktop()) {
|
||||
if (!checkPlatform([TargetPlatform.windows, TargetPlatform.macOS])) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#include <desktop_drop/desktop_drop_plugin.h>
|
||||
#include <screen_retriever/screen_retriever_plugin.h>
|
||||
#include <tray_manager/tray_manager_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
#include <window_manager/window_manager_plugin.h>
|
||||
|
||||
@@ -19,9 +18,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
|
||||
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
|
||||
g_autoptr(FlPluginRegistrar) tray_manager_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "TrayManagerPlugin");
|
||||
tray_manager_plugin_register_with_registrar(tray_manager_registrar);
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_drop
|
||||
screen_retriever
|
||||
tray_manager
|
||||
url_launcher_linux
|
||||
window_manager
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ static void my_application_activate(GApplication* application) {
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 400, 500);
|
||||
gtk_widget_realize(GTK_WIDGET(window));
|
||||
gtk_widget_show(GTK_WIDGET(window));
|
||||
|
||||
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
||||
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
|
||||
|
||||
+5
-3
@@ -1132,9 +1132,11 @@ packages:
|
||||
tray_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: tray_manager
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
path: "."
|
||||
ref: b37f5e088e0f02c45a684ae41e9d2da2d5c596db
|
||||
resolved-ref: b37f5e088e0f02c45a684ae41e9d2da2d5c596db
|
||||
url: "https://github.com/Tienisto/tray_manager.git"
|
||||
source: git
|
||||
version: "0.2.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
|
||||
+5
-1
@@ -40,7 +40,11 @@ dependencies:
|
||||
shelf_router: 1.1.3
|
||||
slang: 3.9.0
|
||||
slang_flutter: 3.9.0
|
||||
tray_manager: 0.2.0
|
||||
tray_manager:
|
||||
# https://github.com/leanflutter/tray_manager/issues/30
|
||||
git:
|
||||
url: https://github.com/Tienisto/tray_manager.git
|
||||
ref: b37f5e088e0f02c45a684ae41e9d2da2d5c596db
|
||||
url_launcher: 6.1.7
|
||||
uuid: 3.0.7
|
||||
wakelock: 0.6.2
|
||||
|
||||
Reference in New Issue
Block a user