From e249d18da9b432b957eed5b4733348ad8caea79c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 20 Jul 2024 02:20:05 +0200 Subject: Dont show error if the desktop portal menu was closed by the user --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 359d0db..439fc81 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1652,6 +1652,8 @@ static gboolean on_start_replay_button_click(GtkButton *button, gpointer userdat "You need to have pkexec installed and a polkit agent running to record your monitor", G_NOTIFICATION_PRIORITY_URGENT); } else if(exit_status == 50) { show_notification(app, "GPU Screen Recorder", "Desktop portal capture failed. Either you canceled the desktop portal or your Wayland compositor doesn't support desktop portal capture or it's incorrectly setup on your system", G_NOTIFICATION_PRIORITY_URGENT); + } else if(exit_status == 60) { + // Canceled by the user } else if(!exit_success || (already_dead && exit_status != 0)) { show_notification(app, "GPU Screen Recorder", "Failed to start replay. Either your graphics card doesn't support GPU Screen Recorder with the settings you used or you don't have enough disk space to record a video", G_NOTIFICATION_PRIORITY_URGENT); @@ -1848,6 +1850,8 @@ static gboolean on_start_recording_button_click(GtkButton *button, gpointer user "You need to have pkexec installed and a polkit agent running to record your monitor", G_NOTIFICATION_PRIORITY_URGENT); } else if(exit_status == 50) { show_notification(app, "GPU Screen Recorder", "Desktop portal capture failed. Either you canceled the desktop portal or your Wayland compositor doesn't support desktop portal capture or it's incorrectly setup on your system", G_NOTIFICATION_PRIORITY_URGENT); + } else if(exit_status == 60) { + // Canceled by the user } else if(!exit_success || (already_dead && exit_status != 0)) { show_notification(app, "GPU Screen Recorder", "Failed to save video. Either your graphics card doesn't support GPU Screen Recorder with the settings you used or you don't have enough disk space to record a video. Run GPU Screen Recorder from the terminal to see more information when this failure happens", G_NOTIFICATION_PRIORITY_URGENT); } else if(exit_success) { @@ -2002,6 +2006,8 @@ static gboolean on_start_streaming_button_click(GtkButton *button, gpointer user "You need to have pkexec installed and a polkit agent running to record your monitor", G_NOTIFICATION_PRIORITY_URGENT); } else if(exit_status == 50) { show_notification(app, "GPU Screen Recorder", "Desktop portal capture failed. Either you canceled the desktop portal or your Wayland compositor doesn't support desktop portal capture or it's incorrectly setup on your system", G_NOTIFICATION_PRIORITY_URGENT); + } else if(exit_status == 60) { + // Canceled by the user } else if(!exit_success || (already_dead && exit_status != 0)) { show_notification(app, "GPU Screen Recorder", "Failed to stream video. There is either an error in your streaming config or your graphics card doesn't support GPU Screen Recorder with the settings you used", G_NOTIFICATION_PRIORITY_URGENT); } else if(exit_success) { -- cgit v1.2.3