@@ -12,11 +12,11 @@ Gio._promisify(Gtk.FileDialog.prototype, "open", "open_finish");
1212Gio . _promisify ( Gtk . UriLauncher . prototype , "launch" , "launch_finish" ) ;
1313
1414const launch_file = workbench . builder . get_object ( "launch_file" ) ;
15- const file_name = workbench . builder . get_object ( "file_name" ) ;
15+ const file_name = workbench . builder . get_object < Gtk . Label > ( "file_name" ) ;
1616const file_location = workbench . builder . get_object ( "file_location" ) ;
1717const change_file = workbench . builder . get_object ( "change_file" ) ;
18- const uri_launch = workbench . builder . get_object ( "uri_launch" ) ;
19- const uri_details = workbench . builder . get_object ( "uri_details" ) ;
18+ const uri_launch = workbench . builder . get_object < Gtk . Button > ( "uri_launch" ) ;
19+ const uri_details = workbench . builder . get_object < Gtk . Entry > ( "uri_details" ) ;
2020
2121//File Launcher
2222
@@ -27,6 +27,7 @@ const file_launcher = new Gtk.FileLauncher({
2727} ) ;
2828
2929launch_file . connect ( "clicked" , ( ) => {
30+ // @ts -expect-error undetected async function
3031 file_launcher . launch ( workbench . window , null ) . catch ( console . error ) ;
3132} ) ;
3233
@@ -42,12 +43,14 @@ file_launcher.connect("notify::file", () => {
4243file_location . connect ( "clicked" , ( ) => {
4344 file_launcher
4445 . open_containing_folder ( workbench . window , null )
46+ // @ts -expect-error undetected async function
4547 . catch ( console . error ) ;
4648} ) ;
4749
4850change_file . connect ( "clicked" , ( ) => {
4951 new Gtk . FileDialog ( )
5052 . open ( workbench . window , null )
53+ // @ts -expect-error undetected async function
5154 . then ( ( file ) => {
5255 file_launcher . file = file ;
5356 } )
@@ -59,6 +62,7 @@ change_file.connect("clicked", () => {
5962uri_launch . connect ( "clicked" , ( ) => {
6063 new Gtk . UriLauncher ( { uri : uri_details . text } )
6164 . launch ( workbench . window , null )
65+ // @ts -expect-error undetected async function
6266 . catch ( console . error ) ;
6367} ) ;
6468uri_details . connect ( "changed" , ( ) => {
0 commit comments