Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HyperTextView #507

Merged
merged 69 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
8d8a68e
Granite.HyperTextView
marbetschar Jun 24, 2021
d8a7f4b
Make Linter Happy
marbetschar Jun 24, 2021
52354e9
Lint Me Happy
marbetschar Jun 24, 2021
cfb3984
Eventually the Linter shuts up
marbetschar Jun 24, 2021
d6159c3
Ignore parentheses, support local file paths
marbetschar Jun 25, 2021
e28dcc5
Ignore < and >, improves HTML/XML handling.
marbetschar Jun 25, 2021
06024ab
Improved Markdown Support
marbetschar Jun 25, 2021
de7f580
Added mailto: prefix check
marbetschar Jun 25, 2021
4025a13
Improved Performance for Large Texts
marbetschar Jun 27, 2021
db7a52b
Some text adjustments
marbetschar Jun 27, 2021
0d189a4
Fixed Linter error
marbetschar Jun 27, 2021
7aadf7e
Fixed Linting Error
marbetschar Jun 27, 2021
2d7e7dc
HyperTextView packed into ScrolledWindow
marbetschar Jun 27, 2021
ae48a19
Dealing with multibyte characters
marbetschar Jun 29, 2021
c5126bc
Fixed whitespace
marbetschar Jun 29, 2021
203c370
Dropped potential harmful max param
marbetschar Jun 29, 2021
a80f5c3
Add mailto protocol if needed
marbetschar Jun 30, 2021
d19ee18
Control + Click
marbetschar Jun 30, 2021
002fa00
Fixed deprecated window.get_pointer
marbetschar Jul 1, 2021
6132d1d
Bind key_press/key_release to toplevel window
marbetschar Jul 1, 2021
eff3a8b
Bind key_press/key_release signals to toplevel window
marbetschar Jul 1, 2021
b5180f4
Made toplevel_window signal handling more robust
marbetschar Jul 1, 2021
5e9dfd1
Disconnect from toplevel window seems not necessary
marbetschar Jul 1, 2021
e3f0864
Added warning in case toplevel window is missing
marbetschar Jul 1, 2021
59324d7
Make toplevel_window local variable
marbetschar Jul 1, 2021
ddf7600
Fixed Linting Errors
marbetschar Jul 1, 2021
a17292f
Removed empty lines
marbetschar Jul 1, 2021
39dc366
Merge branch 'master' into hypertextview
marbetschar Jul 5, 2021
c9d8f48
Dropped on comment and use single star
marbetschar Jul 6, 2021
c00f232
Merge branch 'master' into hypertextview
marbetschar Jul 6, 2021
cb8ed55
Require http(s):// but made mailto: optional
marbetschar Jul 7, 2021
c4a91df
Linter kills me
marbetschar Jul 7, 2021
69d6cf8
Added missing chars to http charset
marbetschar Jul 7, 2021
c7cca7a
Allow plus and hash signs
marbetschar Jul 7, 2021
3a4614a
Merge branch 'master' into hypertextview
marbetschar Jul 12, 2021
f8fd0a5
Merge branch 'master' into hypertextview
marbetschar Jul 13, 2021
5136977
Merge branch 'master' into hypertextview
marbetschar Jul 19, 2021
6a0fb0c
Merge branch 'master' into hypertextview
Jul 19, 2021
0055516
Changed "Unable" to "Could not"
marbetschar Jul 21, 2021
ae41c78
Use magic const to make full buffer rescan logic more obvious
marbetschar Jul 21, 2021
f7843eb
Updated header label to make functionality more obvious
marbetschar Jul 21, 2021
b92b415
Merge branch 'master' into hypertextview
marbetschar Jul 21, 2021
9e5a9a4
Merge branch 'master' into hypertextview
marbetschar Jul 27, 2021
e6c2973
Merge branch 'master' into hypertextview
cassidyjames Jul 27, 2021
df91697
Merge branch 'master' into hypertextview
marbetschar Aug 8, 2021
8087eff
Merge branch 'master' into hypertextview
marbetschar Aug 17, 2021
797519f
Use inline namespacing
marbetschar Aug 26, 2021
017c210
Using inline namespace
marbetschar Aug 26, 2021
3b3a10d
Added changes from Calendar tests
marbetschar Aug 26, 2021
5700bff
Merge branch 'master' into hypertextview
marbetschar Aug 26, 2021
050585b
Use Granite prefix
marbetschar Aug 26, 2021
24b13fe
Merge branch 'master' into hypertextview
marbetschar Aug 30, 2021
4356422
Merge branch 'master' into hypertextview
marbetschar Sep 6, 2021
edccbed
Addressed naming concerns
marbetschar Sep 6, 2021
828ae63
Fixed issue where initialization sometimes failed
marbetschar Sep 6, 2021
dd27f43
Fixed preview of HyperTextView caused by name-clash
marbetschar Sep 6, 2021
74831fb
Merge branch 'master' into hypertextview
marbetschar Sep 14, 2021
304db29
Added suggestions of @mcclurgm
marbetschar Sep 19, 2021
be393e1
Added popover fix from @jeremypw
marbetschar Sep 20, 2021
cd17ff7
Merge branch 'master' into hypertextview
marbetschar Sep 23, 2021
c2488e9
Merge branch 'master' into hypertextview
cassidyjames Sep 29, 2021
684f2d8
Update lib/Widgets/HyperTextView.vala
marbetschar Oct 4, 2021
cc2b6e8
Merge branch 'master' into hypertextview
marbetschar Oct 4, 2021
9d11b75
Merge branch 'master' into hypertextview
marbetschar Oct 10, 2021
8c9a957
Merge branch 'master' into hypertextview
marbetschar Oct 25, 2021
0a04662
Merge branch 'master' into hypertextview
cassidyjames Oct 26, 2021
7d667c1
Merge branch 'master' into hypertextview
danirabbit Nov 4, 2021
d63967a
Update HyperTextView.vala
danirabbit Nov 4, 2021
87dbe2e
Update granite.appdata.xml.in
danirabbit Nov 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/granite.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<p>New Features:</p>
<ul>
<li>min_length property for Granite.ValidatedEntry</li>
<li>Granite.HyperTextView for navigatable URLs in text views</li>
</ul>
<p>Improvements:</p>
<ul>
Expand Down
2 changes: 2 additions & 0 deletions demo/GraniteDemo.vala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Granite.Demo : Gtk.Application {
var date_time_picker_view = new DateTimePickerView ();
var dynamic_notebook_view = new DynamicNotebookView ();
var form_view = new FormView ();
var hypertext_view = new HyperTextViewGrid ();
var mode_button_view = new ModeButtonView ();
var overlaybar_view = new OverlayBarView ();
var seekbar_view = new SeekBarView ();
Expand All @@ -39,6 +40,7 @@ public class Granite.Demo : Gtk.Application {
main_stack.add_titled (date_time_picker_view, "pickers", "Date & Time");
main_stack.add_titled (dynamic_notebook_view, "dynamictab", "DynamicNotebook");
main_stack.add_titled (form_view, "formview", "Forms");
main_stack.add_titled (hypertext_view, "hypertextview", "HyperTextView");
main_stack.add_titled (mode_button_view, "selection_controls", "Selection Controls");
main_stack.add_titled (overlaybar_view, "overlaybar", "OverlayBar");
main_stack.add_titled (seekbar_view, "seekbar", "SeekBar");
Expand Down
42 changes: 42 additions & 0 deletions demo/Views/HyperTextViewGrid.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2021 elementary, Inc. (https://elementary.io)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/

public class HyperTextViewGrid : Gtk.Grid {
construct {
var hypertext_label = new Granite.HeaderLabel ("Hold Ctrl and click to follow the link");
var hypertext_textview = new Granite.HyperTextView ();
hypertext_textview.buffer.text = "elementary OS - https://elementary.io/\nThe fast, open and privacy-respecting replacement for Windows and macOS.";

var hypertext_scrolled_window = new Gtk.ScrolledWindow (null, null) {
height_request = 300,
width_request = 600
};
hypertext_scrolled_window.add (hypertext_textview);

margin = 12;
orientation = Gtk.Orientation.VERTICAL;
row_spacing = 3;
halign = Gtk.Align.CENTER;
valign = Gtk.Align.CENTER;
vexpand = true;
add (hypertext_label);
add (hypertext_scrolled_window);
show_all ();
}
}
1 change: 1 addition & 0 deletions demo/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ executable(
'Views/DialogsView.vala',
'Views/DynamicNotebookView.vala',
'Views/FormView.vala',
'Views/HyperTextViewGrid.vala',
'Views/ModeButtonView.vala',
'Views/OverlayBarView.vala',
'Views/SeekBarView.vala',
Expand Down
Loading