-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bleak Grey
committed
May 8, 2020
1 parent
2023ffe
commit 951ec9a
Showing
9 changed files
with
97 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
public class HeadsUp.Sources.Wordnik : WebViewSource { | ||
|
||
public Wordnik () { | ||
Object ( | ||
title: "Wordnik", | ||
icon: "document-properties-symbolic" | ||
); | ||
} | ||
|
||
public override string get_url () { | ||
return @"https://www.wordnik.com/words/$query"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
public class HeadsUp.WebViewSource : Source { | ||
|
||
Widgets.WebView webview; | ||
|
||
construct { | ||
webview = new Widgets.WebView (); | ||
webview.on_ready.connect (() => { | ||
stateful.show_content (); | ||
}); | ||
content = webview; | ||
} | ||
|
||
public override bool on_lookup (string q) { | ||
query = q; | ||
reload (); | ||
return true; | ||
} | ||
|
||
public virtual string get_url () { | ||
return ""; | ||
} | ||
|
||
void reload () { | ||
stateful.show_loading (); | ||
webview.load_uri (get_url ()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters