aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar/search_entry.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-02-14 14:55:59 +0100
committerfiaxh <git@lightrise.org>2022-07-27 20:34:20 +0200
commit7e7dcedaf31ee35499875491c9f569c575d28435 (patch)
tree0c5fee2b28baf320775fbc92b3c252e97d9d054f /main/src/ui/conversation_titlebar/search_entry.vala
parentf25bfb00969a7e09996da2d5500e6718f4cc0148 (diff)
downloaddino-7e7dcedaf31ee35499875491c9f569c575d28435.tar.gz
dino-7e7dcedaf31ee35499875491c9f569c575d28435.zip
Port from GTK3 to GTK4
Diffstat (limited to 'main/src/ui/conversation_titlebar/search_entry.vala')
-rw-r--r--main/src/ui/conversation_titlebar/search_entry.vala20
1 files changed, 8 insertions, 12 deletions
diff --git a/main/src/ui/conversation_titlebar/search_entry.vala b/main/src/ui/conversation_titlebar/search_entry.vala
index 109c54d7..a51d7d43 100644
--- a/main/src/ui/conversation_titlebar/search_entry.vala
+++ b/main/src/ui/conversation_titlebar/search_entry.vala
@@ -7,25 +7,21 @@ namespace Dino.Ui {
public class SearchMenuEntry : Plugins.ConversationTitlebarEntry, Object {
public string id { get { return "search"; } }
+ public double order { get { return 1; } }
- public GlobalSearchButton search_button = new GlobalSearchButton() { tooltip_text=_("Search messages"), visible = true };
+ public ToggleButton button = new ToggleButton() { tooltip_text=_("Search messages") };
public SearchMenuEntry() {
- search_button.set_image(new Gtk.Image.from_icon_name("system-search-symbolic", Gtk.IconSize.MENU) { visible = true });
+ button.set_icon_name("system-search-symbolic");
}
- public double order { get { return 1; } }
- public Plugins.ConversationTitlebarWidget? get_widget(Plugins.WidgetType type) {
- if (type == Plugins.WidgetType.GTK) {
- return search_button;
- }
- return null;
- }
-}
-
-public class GlobalSearchButton : Plugins.ConversationTitlebarWidget, Gtk.ToggleButton {
public new void set_conversation(Conversation conversation) { }
public new void unset_conversation() { }
+
+ public Object? get_widget(Plugins.WidgetType type) {
+ if (type != Plugins.WidgetType.GTK4) return null;
+ return button;
+ }
}
}