File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -545,14 +545,11 @@ public class MainWindow : Gtk.ApplicationWindow {
545545 }
546546
547547 // -------------------------------------------------------------
548- // Main procedure that initiates a screenshot. If we are using
549- // elementary OS 7.1 or below, we will roll our own screenshot
550- // UI and functionality; otherwise, we will use the screenshot
551- // portal.
548+ // Main procedure that initiates a screenshot. If the backend
549+ // indicates that it can handle taking the screenshot, use the
550+ // backend to perform the screenshot; otherwise, use the portal.
552551 public void do_screenshot( Widget ? parent ) {
553- var os = Environment . get_os_info( " ID" );
554- var version = Environment . get_os_info( " VERSION" );
555- if ( (os == " elementary" ) && (double . parse(version) < 8.0 ) ) {
552+ if ( ScreenshotBackend . can_do_screenshots() ) {
556553 if ( parent == null ) {
557554 do_screenshot_nonportal( CaptureType . SCREEN );
558555 } else {
Original file line number Diff line number Diff line change @@ -94,9 +94,7 @@ public class ScreenshotBackend : Object {
9494 try {
9595 var introspectable = get_instrospectable();
9696 return true ;
97- } catch (Error e) {
98- warning (" Can not take screenshots on this system: %s\n " , e. message);
99- }
97+ } catch (Error e) {}
10098 return false ;
10199 }
102100
You can’t perform that action at this time.
0 commit comments