This repository was archived by the owner on Jun 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1313 <summary >Last opened tab</summary >
1414 <description >Saves the last opened tab</description >
1515 </key >
16+ <key name =" first" type =" i" >
17+ <default >0</default >
18+ <summary >First run</summary >
19+ <description >Sets if the application has been initialised yet</description >
20+ </key >
1621 </schema >
1722</schemalist >
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ public class App : Gtk.Application {
6464
6565
6666 var dev = new WebView .with_context (context);
67+ first_run(dev);
6768 set_appcache (dev, online);
6869 dev. load_uri (" https://devdocs.io" );
6970
@@ -145,6 +146,14 @@ public class App : Gtk.Application {
145146 }
146147 }
147148
149+ private void first_run (WebView view ) {
150+ var user_settings = new GLib .Settings (" com.github.mdh34.quickdocs" );
151+ if (user_settings. get_int(" first" ) == 0 ) {
152+ view. load_uri(" https://devdocs.io" );
153+ user_settings. set_int (" first" , 1 );
154+ }
155+ }
156+
148157 private void set_appcache (WebView view , bool online ) {
149158 var settings = view. get_settings ();
150159 if (online) {
You can’t perform that action at this time.
0 commit comments