diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-03 18:09:12 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-03 18:09:12 +0100 |
commit | a29029b8cbfb2c55ede22d63a6b6c06c70b0ed32 (patch) | |
tree | 129f30b904cabc52b71c8745af149e1da3c643ab | |
parent | bd1cdbda6cb945059382d251e9aa0772a8295714 (diff) |
flatpak: make sure gpu screen recorder gtk is installed systemwide when launching gsr-ui as a daemon as well
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index abfabb3..6b2a3ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -405,7 +405,7 @@ static void hide_window_when_recording_systray_callback(GtkMenuItem*, gpointer) static void set_label_selectable(gpointer data, gpointer) { GtkWidget *widget = GTK_WIDGET(data); - if (GTK_IS_LABEL(widget)) + if(GTK_IS_LABEL(widget)) gtk_label_set_selectable(GTK_LABEL(widget), true); } @@ -4520,6 +4520,16 @@ static void startup_new_ui(bool launched_by_daemon) { } } + if(!flatpak_is_installed_as_system()) { + GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + "GPU Screen Recorder needs to be installed system-wide to use the new UI. You can run this command to install GPU Screen recorder system-wide:\n" + "flatpak install --system com.dec05eba.gpu_screen_recorder\n"); + set_dialog_selectable(dialog); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); + return; + } + if(config.main_config.installed_gsr_global_hotkeys_version != GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION) { if(!kms_server_proxy_setup_gsr_ui( "An update is available. The new GPU Screen Recorder UI needs root privileges to finish update to make global hotkeys and recording work on any system.\n" |