diff options
author | fiaxh <git@lightrise.org> | 2019-09-10 19:11:41 +0200 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2019-09-10 19:36:11 +0200 |
commit | bd7fde99af3df59c5ec96184b2649b4308250b24 (patch) | |
tree | 49f67c73f6ecc69bb949ea81b49814c90a13f0bd /main/src/ui/global_search.vala | |
parent | d5d305193ce527f1cc3022c406de35d9a85d4ccb (diff) | |
download | dino-bd7fde99af3df59c5ec96184b2649b4308250b24.tar.gz dino-bd7fde99af3df59c5ec96184b2649b4308250b24.zip |
fixup Fix some warnings
Diffstat (limited to 'main/src/ui/global_search.vala')
-rw-r--r-- | main/src/ui/global_search.vala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala index db7dbc0f..74e96999 100644 --- a/main/src/ui/global_search.vala +++ b/main/src/ui/global_search.vala @@ -205,8 +205,8 @@ public class GlobalSearch : Overlay { regex_str += ")"; // Color the keywords - int elongated_by = 0; try { + int elongated_by = 0; Regex highlight_regex = new Regex(regex_str); MatchInfo match_info; string markup_text_bak = markup_text.down(); @@ -218,19 +218,19 @@ public class GlobalSearch : Overlay { elongated_by += "<span bgcolor=\"yellow\">".length + "</span>".length; } markup_text_bak += ""; // We need markup_text_bak to live until here because url_regex.match does not copy the string - - label.label = markup_text; - grid.attach(label, 1, 1, 1, 1); - - Button button = new Button() { relief=ReliefStyle.NONE, visible=true }; - button.clicked.connect(() => { - selected_item(item); - }); - button.add(grid); - return button; } catch (RegexError e) { assert_not_reached(); } + + label.label = markup_text; + grid.attach(label, 1, 1, 1, 1); + + Button button = new Button() { relief=ReliefStyle.NONE, visible=true }; + button.clicked.connect(() => { + selected_item(item); + }); + button.add(grid); + return button; } private Grid get_context_message_widget(MessageItem item) { |