Merge branch 'origin/master' into master-windows-changes
This commit is contained in:
commit
f9fd66dba5
2
configure
vendored
2
configure
vendored
|
@ -106,7 +106,7 @@ while true; do
|
||||||
--enable-plugin ) if [ -z "$ENABLED_PLUGINS" ]; then ENABLED_PLUGINS="$2"; else ENABLED_PLUGINS="$ENABLED_PLUGINS;$2"; fi; shift; shift ;;
|
--enable-plugin ) if [ -z "$ENABLED_PLUGINS" ]; then ENABLED_PLUGINS="$2"; else ENABLED_PLUGINS="$ENABLED_PLUGINS;$2"; fi; shift; shift ;;
|
||||||
--disable-plugin ) if [ -z "$DISABLED_PLUGINS" ]; then DISABLED_PLUGINS="$2"; else DISABLED_PLUGINS="$DISABLED_PLUGINS;$2"; fi; shift; shift ;;
|
--disable-plugin ) if [ -z "$DISABLED_PLUGINS" ]; then DISABLED_PLUGINS="$2"; else DISABLED_PLUGINS="$DISABLED_PLUGINS;$2"; fi; shift; shift ;;
|
||||||
--valac ) VALA_EXECUTABLE="$2"; shift; shift ;;
|
--valac ) VALA_EXECUTABLE="$2"; shift; shift ;;
|
||||||
--valac-flags ) VALAC_FLAGS="$2"; shift; shift ;;
|
--valac-flags ) VALACFLAGS="$2"; shift; shift ;;
|
||||||
--lib-suffix ) LIB_SUFFIX="$2"; shift; shift ;;
|
--lib-suffix ) LIB_SUFFIX="$2"; shift; shift ;;
|
||||||
--with-libsoup3 ) USE_SOUP3=yes; shift ;;
|
--with-libsoup3 ) USE_SOUP3=yes; shift ;;
|
||||||
--disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;;
|
--disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;;
|
||||||
|
|
|
@ -39,6 +39,9 @@ set(RESOURCE_LIST
|
||||||
icons/scalable/mimetypes/dino-file-table-symbolic.svg
|
icons/scalable/mimetypes/dino-file-table-symbolic.svg
|
||||||
icons/scalable/mimetypes/dino-file-video-symbolic.svg
|
icons/scalable/mimetypes/dino-file-video-symbolic.svg
|
||||||
|
|
||||||
|
icons/scalable/status/dino-bell-large-none-symbolic.svg
|
||||||
|
icons/scalable/status/dino-bell-large-symbolic.svg
|
||||||
|
icons/scalable/status/dino-block-symbolic.svg
|
||||||
icons/scalable/status/dino-double-tick-symbolic.svg
|
icons/scalable/status/dino-double-tick-symbolic.svg
|
||||||
icons/scalable/status/dino-party-popper-symbolic.svg
|
icons/scalable/status/dino-party-popper-symbolic.svg
|
||||||
icons/scalable/status/dino-security-high-symbolic.svg
|
icons/scalable/status/dino-security-high-symbolic.svg
|
||||||
|
@ -189,6 +192,7 @@ SOURCES
|
||||||
src/ui/conversation_content_view/quote_widget.vala
|
src/ui/conversation_content_view/quote_widget.vala
|
||||||
src/ui/conversation_content_view/reactions_widget.vala
|
src/ui/conversation_content_view/reactions_widget.vala
|
||||||
src/ui/conversation_content_view/subscription_notification.vala
|
src/ui/conversation_content_view/subscription_notification.vala
|
||||||
|
src/ui/conversation_content_view/unread_indicator_populator.vala
|
||||||
|
|
||||||
src/ui/chat_input/chat_input_controller.vala
|
src/ui/chat_input/chat_input_controller.vala
|
||||||
src/ui/chat_input/chat_text_view.vala
|
src/ui/chat_input/chat_text_view.vala
|
||||||
|
|
|
@ -2,68 +2,72 @@
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0"/>
|
||||||
<template class="DinoUiSelectJidFragment">
|
<template class="DinoUiSelectJidFragment">
|
||||||
<property name="height_request">500</property>
|
|
||||||
<property name="width_request">460</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="AdwClamp">
|
||||||
<property name="hexpand">1</property>
|
<property name="maximum-size">350</property>
|
||||||
<property name="margin-top">20</property>
|
<property name="tightening-threshold">300</property>
|
||||||
<property name="margin-end">80</property>
|
|
||||||
<property name="margin-bottom">20</property>
|
|
||||||
<property name="margin-start">80</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="row-spacing">10</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="entry">
|
|
||||||
<property name="activates_default">1</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<property name="vexpand">1</property>
|
<property name="margin-start">12</property>
|
||||||
|
<property name="margin-end">12</property>
|
||||||
|
<property name="margin-top">20</property>
|
||||||
|
<property name="margin-bottom">20</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">10</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkEntry" id="entry">
|
||||||
<property name="child">
|
<property name="activates-default">1</property>
|
||||||
<object class="GtkScrolledWindow" id="scrolled_window">
|
<property name="hexpand">1</property>
|
||||||
<property name="hscrollbar_policy">never</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="child">
|
|
||||||
<object class="GtkBox" id="box">
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="css-classes">toolbar</property>
|
<property name="hexpand">1</property>
|
||||||
<style>
|
<property name="vexpand">1</property>
|
||||||
<class name="toolbar"/>
|
<property name="orientation">vertical</property>
|
||||||
<class name="inline-toolbar"/>
|
|
||||||
</style>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="add_button">
|
<object class="GtkFrame">
|
||||||
<child>
|
<property name="child">
|
||||||
<object class="GtkImage">
|
<object class="GtkScrolledWindow" id="scrolled_window">
|
||||||
<property name="icon-name">list-add-symbolic</property>
|
<property name="hscrollbar-policy">never</property>
|
||||||
<property name="icon-size">normal</property>
|
<property name="hexpand">1</property>
|
||||||
|
<property name="vexpand">1</property>
|
||||||
|
<property name="child">
|
||||||
|
<object class="GtkBox" id="box">
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="remove_button">
|
<object class="GtkBox">
|
||||||
<property name="sensitive">0</property>
|
<property name="css-classes">toolbar</property>
|
||||||
|
<style>
|
||||||
|
<class name="toolbar"/>
|
||||||
|
<class name="inline-toolbar"/>
|
||||||
|
</style>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkButton" id="add_button">
|
||||||
<property name="icon-name">list-remove-symbolic</property>
|
<child>
|
||||||
<property name="icon-size">normal</property>
|
<object class="GtkImage">
|
||||||
|
<property name="icon-name">list-add-symbolic</property>
|
||||||
|
<property name="icon-size">normal</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="remove_button">
|
||||||
|
<property name="sensitive">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="icon-name">list-remove-symbolic</property>
|
||||||
|
<property name="icon-size">normal</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -40,6 +40,9 @@
|
||||||
<file>icons/scalable/mimetypes/dino-file-table-symbolic.svg</file>
|
<file>icons/scalable/mimetypes/dino-file-table-symbolic.svg</file>
|
||||||
<file>icons/scalable/mimetypes/dino-file-video-symbolic.svg</file>
|
<file>icons/scalable/mimetypes/dino-file-video-symbolic.svg</file>
|
||||||
<file>icons/scalable/status/dino-double-tick-symbolic.svg</file>
|
<file>icons/scalable/status/dino-double-tick-symbolic.svg</file>
|
||||||
|
<file>icons/scalable/status/dino-bell-large-none-symbolic.svg</file>
|
||||||
|
<file>icons/scalable/status/dino-bell-large-symbolic.svg</file>
|
||||||
|
<file>icons/scalable/status/dino-block-symbolic.svg</file>
|
||||||
<file>icons/scalable/status/dino-party-popper-symbolic.svg</file>
|
<file>icons/scalable/status/dino-party-popper-symbolic.svg</file>
|
||||||
<file>icons/scalable/status/dino-security-high-symbolic.svg</file>
|
<file>icons/scalable/status/dino-security-high-symbolic.svg</file>
|
||||||
<file>icons/scalable/status/dino-status-away.svg</file>
|
<file>icons/scalable/status/dino-status-away.svg</file>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 8 0 c -0.828125 0 -1.5 0.671875 -1.5 1.5 c 0 0.078125 0.007812 0.15625 0.019531 0.234375 c -0.871093 0.269531 -1.652343 0.773437 -2.257812 1.453125 l -2.730469 -2.730469 l -1.0625 1.0625 l 2.957031 2.957031 l 8.527344 8.523438 l 2.515625 2.519531 l 1.0625 -1.0625 l -1.570312 -1.570312 c 0.320312 -0.167969 0.539062 -0.5 0.539062 -0.886719 c 0 -0.554688 -0.445312 -1 -1 -1 h -0.5 v -4.5 c 0 -2.191406 -1.425781 -4.125 -3.519531 -4.773438 c 0.011719 -0.074218 0.019531 -0.152343 0.019531 -0.226562 c 0 -0.828125 -0.671875 -1.5 -1.5 -1.5 z m -4.988281 6.183594 c -0.007813 0.105468 -0.011719 0.210937 -0.011719 0.316406 v 4.5 h -0.5 c -0.554688 0 -1 0.445312 -1 1 s 0.445312 1 1 1 h 7.328125 z m 2.988281 7.816406 c 0 0.714844 0.382812 1.375 1 1.730469 c 0.617188 0.359375 1.382812 0.359375 2 0 c 0.617188 -0.355469 1 -1.015625 1 -1.730469 z m 0 0" fill="#222222"/></svg>
|
After Width: | Height: | Size: 1,007 B |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 8 0 c -0.828125 0 -1.5 0.671875 -1.5 1.5 c 0 0.078125 0.007812 0.152344 0.019531 0.230469 c -2.089843 0.648437 -3.515625 2.582031 -3.519531 4.769531 v 4.5 h -0.5 c -0.554688 0 -1 0.445312 -1 1 s 0.445312 1 1 1 h 11 c 0.554688 0 1 -0.445312 1 -1 s -0.445312 -1 -1 -1 h -0.5 v -4.5 c 0 -2.191406 -1.425781 -4.125 -3.519531 -4.773438 c 0.011719 -0.078124 0.019531 -0.152343 0.019531 -0.226562 c 0 -0.828125 -0.671875 -1.5 -1.5 -1.5 z m -2 14 c 0 0.714844 0.382812 1.375 1 1.734375 c 0.617188 0.355469 1.382812 0.355469 2 0 c 0.617188 -0.359375 1 -1.019531 1 -1.734375 z m 0 0" fill="#222222"/></svg>
|
After Width: | Height: | Size: 734 B |
7
main/data/icons/scalable/status/dino-block-symbolic.svg
Normal file
7
main/data/icons/scalable/status/dino-block-symbolic.svg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="#222">
|
||||||
|
<path d="m8 1c-3.8555 0-7 3.1445-7 7s3.1445 7 7 7 7-3.1445 7-7-3.1445-7-7-7zm0 2c2.7539 0 5 2.2461 5 5s-2.2461 5-5 5-5-2.2461-5-5 2.2461-5 5-5z"/>
|
||||||
|
<path d="m13.616 11.83-1.4375 1.4375-9.1054-9.0769 1.543-1.3323z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 369 B |
|
@ -282,6 +282,13 @@ window.dino-main .dino-chatinput-button button:checked:backdrop {
|
||||||
color: alpha(@theme_unfocused_selected_bg_color, 0.8);
|
color: alpha(@theme_unfocused_selected_bg_color, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dino-unread-line label {
|
||||||
|
color: @theme_selected_bg_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dino-unread-line separator {
|
||||||
|
background-color: @theme_selected_bg_color;
|
||||||
|
}
|
||||||
|
|
||||||
.dino-chatinput,
|
.dino-chatinput,
|
||||||
.dino-chatinput textview,
|
.dino-chatinput textview,
|
||||||
|
|
|
@ -53,6 +53,7 @@ sources = files(
|
||||||
'src/ui/conversation_content_view/quote_widget.vala',
|
'src/ui/conversation_content_view/quote_widget.vala',
|
||||||
'src/ui/conversation_content_view/reactions_widget.vala',
|
'src/ui/conversation_content_view/reactions_widget.vala',
|
||||||
'src/ui/conversation_content_view/subscription_notification.vala',
|
'src/ui/conversation_content_view/subscription_notification.vala',
|
||||||
|
'src/ui/conversation_content_view/unread_indicator_populator.vala',
|
||||||
'src/ui/conversation_details.vala',
|
'src/ui/conversation_details.vala',
|
||||||
'src/ui/conversation_list_titlebar.vala',
|
'src/ui/conversation_list_titlebar.vala',
|
||||||
'src/ui/conversation_selector/conversation_selector.vala',
|
'src/ui/conversation_selector/conversation_selector.vala',
|
||||||
|
@ -121,4 +122,4 @@ install_data('data/icons/scalable/apps/im.dino.Dino-symbolic.svg', install_dir:
|
||||||
install_data('data/icons/scalable/apps/im.dino.Dino.svg', install_dir: get_option('datadir') / 'hicolor/scalable/apps')
|
install_data('data/icons/scalable/apps/im.dino.Dino.svg', install_dir: get_option('datadir') / 'hicolor/scalable/apps')
|
||||||
install_data('data/im.dino.Dino.appdata.xml', install_dir: get_option('datadir') / 'metainfo')
|
install_data('data/im.dino.Dino.appdata.xml', install_dir: get_option('datadir') / 'metainfo')
|
||||||
install_data('data/im.dino.Dino.desktop', install_dir: get_option('datadir') / 'applications')
|
install_data('data/im.dino.Dino.desktop', install_dir: get_option('datadir') / 'applications')
|
||||||
install_data('data/im.dino.Dino.service', install_dir: get_option('datadir') / 'dbus-1/servces')
|
install_data('data/im.dino.Dino.service', install_dir: get_option('datadir') / 'dbus-1/services')
|
||||||
|
|
|
@ -24,6 +24,8 @@ public class AddConferenceDialog : Gtk.Dialog {
|
||||||
Object(use_header_bar : Util.use_csd() ? 1 : 0);
|
Object(use_header_bar : Util.use_csd() ? 1 : 0);
|
||||||
this.title = _("Join Channel");
|
this.title = _("Join Channel");
|
||||||
this.modal = true;
|
this.modal = true;
|
||||||
|
this.default_width = 460;
|
||||||
|
this.default_height = 550;
|
||||||
this.stream_interactor = stream_interactor;
|
this.stream_interactor = stream_interactor;
|
||||||
|
|
||||||
stack.visible = true;
|
stack.visible = true;
|
||||||
|
@ -101,6 +103,7 @@ public class AddConferenceDialog : Gtk.Dialog {
|
||||||
});
|
});
|
||||||
select_fragment.remove_jid.connect((row) => {
|
select_fragment.remove_jid.connect((row) => {
|
||||||
ConferenceListRow conference_row = row as ConferenceListRow;
|
ConferenceListRow conference_row = row as ConferenceListRow;
|
||||||
|
if (conference_row == null) return;
|
||||||
stream_interactor.get_module(MucManager.IDENTITY).remove_bookmark(conference_row.account, conference_row.bookmark);
|
stream_interactor.get_module(MucManager.IDENTITY).remove_bookmark(conference_row.account, conference_row.bookmark);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ public class SelectContactDialog : Gtk.Dialog {
|
||||||
public SelectContactDialog(StreamInteractor stream_interactor, Gee.List<Account> accounts) {
|
public SelectContactDialog(StreamInteractor stream_interactor, Gee.List<Account> accounts) {
|
||||||
Object(use_header_bar : Util.use_csd() ? 1 : 0);
|
Object(use_header_bar : Util.use_csd() ? 1 : 0);
|
||||||
modal = true;
|
modal = true;
|
||||||
|
this.default_width = 460;
|
||||||
|
this.default_height = 550;
|
||||||
|
|
||||||
this.stream_interactor = stream_interactor;
|
this.stream_interactor = stream_interactor;
|
||||||
this.accounts = accounts;
|
this.accounts = accounts;
|
||||||
|
|
|
@ -87,6 +87,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
|
||||||
Application app = GLib.Application.get_default() as Application;
|
Application app = GLib.Application.get_default() as Application;
|
||||||
app.plugin_registry.register_conversation_addition_populator(new ChatStatePopulator(stream_interactor));
|
app.plugin_registry.register_conversation_addition_populator(new ChatStatePopulator(stream_interactor));
|
||||||
app.plugin_registry.register_conversation_addition_populator(new DateSeparatorPopulator(stream_interactor));
|
app.plugin_registry.register_conversation_addition_populator(new DateSeparatorPopulator(stream_interactor));
|
||||||
|
app.plugin_registry.register_conversation_addition_populator(new UnreadIndicatorPopulator(stream_interactor));
|
||||||
|
|
||||||
// Rather than connecting to the leave event of the main_event_box directly,
|
// Rather than connecting to the leave event of the main_event_box directly,
|
||||||
// we connect to the parent event box that also wraps the overlaying message_menu_box.
|
// we connect to the parent event box that also wraps the overlaying message_menu_box.
|
||||||
|
@ -382,6 +383,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
|
||||||
foreach (ContentMetaItem item in items) {
|
foreach (ContentMetaItem item in items) {
|
||||||
do_insert_item(item);
|
do_insert_item(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
Application app = GLib.Application.get_default() as Application;
|
Application app = GLib.Application.get_default() as Application;
|
||||||
foreach (Plugins.NotificationPopulator populator in app.plugin_registry.notification_populators) {
|
foreach (Plugins.NotificationPopulator populator in app.plugin_registry.notification_populators) {
|
||||||
populator.init(conversation, this, Plugins.WidgetType.GTK4);
|
populator.init(conversation, this, Plugins.WidgetType.GTK4);
|
||||||
|
@ -398,6 +400,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_insert_item(item);
|
do_insert_item(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
using Gee;
|
||||||
|
using Gtk;
|
||||||
|
|
||||||
|
using Dino.Entities;
|
||||||
|
using Xmpp;
|
||||||
|
|
||||||
|
namespace Dino.Ui.ConversationSummary {
|
||||||
|
|
||||||
|
class UnreadIndicatorPopulator : Plugins.ConversationItemPopulator, Plugins.ConversationAdditionPopulator, Object {
|
||||||
|
|
||||||
|
public string id { get { return "unread_indicator"; } }
|
||||||
|
|
||||||
|
private StreamInteractor stream_interactor;
|
||||||
|
private Conversation? current_conversation;
|
||||||
|
private UnreadIndicatorItem? unread_indicator = null;
|
||||||
|
Plugins.ConversationItemCollection item_collection = null;
|
||||||
|
|
||||||
|
public UnreadIndicatorPopulator(StreamInteractor stream_interactor) {
|
||||||
|
this.stream_interactor = stream_interactor;
|
||||||
|
|
||||||
|
stream_interactor.get_module(ChatInteraction.IDENTITY).focused_out.connect(() => {
|
||||||
|
update_unread_indicator();
|
||||||
|
});
|
||||||
|
|
||||||
|
stream_interactor.get_module(ContentItemStore.IDENTITY).new_item.connect(() => {
|
||||||
|
if (!stream_interactor.get_module(ChatInteraction.IDENTITY).is_active_focus(current_conversation)) {
|
||||||
|
update_unread_indicator();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void update_unread_indicator() {
|
||||||
|
if (current_conversation == null) return;
|
||||||
|
|
||||||
|
ContentItem? read_up_to_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item_by_id(current_conversation, current_conversation.read_up_to_item);
|
||||||
|
int current_num_unread = stream_interactor.get_module(ChatInteraction.IDENTITY).get_num_unread(current_conversation);
|
||||||
|
if (current_num_unread == 0 && unread_indicator != null) {
|
||||||
|
item_collection.remove_item(unread_indicator);
|
||||||
|
unread_indicator = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (read_up_to_item != null && current_num_unread > 0) {
|
||||||
|
if (unread_indicator != null) {
|
||||||
|
item_collection.remove_item(unread_indicator);
|
||||||
|
}
|
||||||
|
|
||||||
|
unread_indicator = new UnreadIndicatorItem(read_up_to_item);
|
||||||
|
item_collection.insert_item(unread_indicator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(Conversation conversation, Plugins.ConversationItemCollection item_collection, Plugins.WidgetType type) {
|
||||||
|
current_conversation = conversation;
|
||||||
|
this.item_collection = item_collection;
|
||||||
|
update_unread_indicator();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close(Conversation conversation) { }
|
||||||
|
|
||||||
|
public void populate_timespan(Conversation conversation, DateTime after, DateTime before) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
private class UnreadIndicatorItem : Plugins.MetaConversationItem {
|
||||||
|
public UnreadIndicatorItem(ContentItem after_item) {
|
||||||
|
this.time = after_item.time;
|
||||||
|
this.secondary_sort_indicator = int.MAX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Object? get_widget(Plugins.ConversationItemWidgetInterface outer, Plugins.WidgetType type) {
|
||||||
|
Box box = new Box(Orientation.HORIZONTAL, 10) { hexpand=true };
|
||||||
|
box.get_style_context().add_class("dino-unread-line");
|
||||||
|
|
||||||
|
Separator sep = new Separator(Orientation.HORIZONTAL) { valign=Align.CENTER, hexpand=true };
|
||||||
|
box.append(sep);
|
||||||
|
|
||||||
|
Label label = new Label(_("New")) { halign=Align.END, hexpand=false };
|
||||||
|
label.attributes = new Pango.AttrList();
|
||||||
|
label.attributes.insert(Pango.attr_weight_new(Pango.Weight.BOLD));
|
||||||
|
box.append(label);
|
||||||
|
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Gee.List<Plugins.MessageAction>? get_item_actions(Plugins.WidgetType type) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -90,7 +90,7 @@ public class ConversationTitlebarCsd : ConversationTitlebar, Object {
|
||||||
|
|
||||||
public Adw.HeaderBar header_bar = new Adw.HeaderBar();
|
public Adw.HeaderBar header_bar = new Adw.HeaderBar();
|
||||||
private Label title_label = new Label("") { ellipsize=EllipsizeMode.END };
|
private Label title_label = new Label("") { ellipsize=EllipsizeMode.END };
|
||||||
private Label subtitle_label = new Label("") { ellipsize=EllipsizeMode.END, visible=false };
|
private Label subtitle_label = new Label("") { use_markup=true, ellipsize=EllipsizeMode.END, visible=false };
|
||||||
private Revealer back_revealer;
|
private Revealer back_revealer;
|
||||||
|
|
||||||
public ConversationTitlebarCsd() {
|
public ConversationTitlebarCsd() {
|
||||||
|
|
|
@ -177,11 +177,13 @@ public class ConversationViewController : Object {
|
||||||
|
|
||||||
private void update_conversation_topic(string? subtitle = null) {
|
private void update_conversation_topic(string? subtitle = null) {
|
||||||
if (subtitle != null) {
|
if (subtitle != null) {
|
||||||
conversation_topic = Util.summarize_whitespaces_to_space(subtitle);
|
string summarized_topic = Util.summarize_whitespaces_to_space(subtitle);
|
||||||
|
conversation_topic = Util.parse_add_markup(summarized_topic, null, true, true);
|
||||||
} else if (conversation.type_ == Conversation.Type.GROUPCHAT) {
|
} else if (conversation.type_ == Conversation.Type.GROUPCHAT) {
|
||||||
string? subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account);
|
string? subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account);
|
||||||
if (subject != null) {
|
if (subject != null) {
|
||||||
conversation_topic = Util.summarize_whitespaces_to_space(subject);
|
string summarized_topic = Util.summarize_whitespaces_to_space(subject);
|
||||||
|
conversation_topic = Util.parse_add_markup(summarized_topic, null, true, true);
|
||||||
} else {
|
} else {
|
||||||
conversation_topic = null;
|
conversation_topic = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,7 +260,8 @@ public class GlobalSearch {
|
||||||
for (; match_info.matches(); match_info.next()) {
|
for (; match_info.matches(); match_info.next()) {
|
||||||
int start, end;
|
int start, end;
|
||||||
match_info.fetch_pos(0, out start, out end);
|
match_info.fetch_pos(0, out start, out end);
|
||||||
markup_text += Markup.escape_text(text[last_end:start]) + "<span bgcolor=\"yellow\">" + Markup.escape_text(text[start:end]) + "</span>";
|
string themed_span = Util.is_dark_theme(label) ? "<span color=\"black\" bgcolor=\"yellow\">" : "<span bgcolor=\"yellow\">";
|
||||||
|
markup_text += Markup.escape_text(text[last_end:start]) + themed_span + Markup.escape_text(text[start:end]) + "</span>";
|
||||||
last_end = end;
|
last_end = end;
|
||||||
}
|
}
|
||||||
markup_text += Markup.escape_text(text[last_end:text.length]);
|
markup_text += Markup.escape_text(text[last_end:text.length]);
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace Dino.Ui.ConversationDetails {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update_blocked_button() {
|
private void update_blocked_button() {
|
||||||
block_button_content.icon_name = "action-unavailable-symbolic";
|
block_button_content.icon_name = "dino-block-symbolic";
|
||||||
block_button_content.label = model.blocked ? _("Blocked") : _("Block");
|
block_button_content.label = model.blocked ? _("Blocked") : _("Block");
|
||||||
if (model.blocked) {
|
if (model.blocked) {
|
||||||
block_button.add_css_class("error");
|
block_button.add_css_class("error");
|
||||||
|
@ -75,7 +75,7 @@ namespace Dino.Ui.ConversationDetails {
|
||||||
|
|
||||||
private void update_notification_button() {
|
private void update_notification_button() {
|
||||||
string icon_name = model.notification == OFF ?
|
string icon_name = model.notification == OFF ?
|
||||||
"notifications-disabled-symbolic" : "notification-symbolic";
|
"dino-bell-large-none-symbolic" : "dino-bell-large-symbolic";
|
||||||
notification_button_toggle_content.icon_name = icon_name;
|
notification_button_toggle_content.icon_name = icon_name;
|
||||||
notification_button_split_content.icon_name = icon_name;
|
notification_button_split_content.icon_name = icon_name;
|
||||||
notification_button_menu_content.icon_name = icon_name;
|
notification_button_menu_content.icon_name = icon_name;
|
||||||
|
|
10
meson.build
10
meson.build
|
@ -17,19 +17,11 @@ foreach plugin : ['plugin-ice', 'plugin-omemo', 'plugin-rtp']
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if get_option('plugin-ice').enabled() and not get_option('plugin-rtp').enabled()
|
|
||||||
dep_gnutls_required = get_option('plugin-ice')
|
|
||||||
elif get_option('plugin-ice').allowed() and not get_option('plugin-rtp').allowed()
|
|
||||||
dep_gnutls_required = get_option('plugin-ice')
|
|
||||||
else
|
|
||||||
dep_gnutls_required = get_option('plugin-rtp')
|
|
||||||
endif
|
|
||||||
|
|
||||||
dep_gdk_pixbuf = dependency('gdk-pixbuf-2.0')
|
dep_gdk_pixbuf = dependency('gdk-pixbuf-2.0')
|
||||||
dep_gee = dependency('gee-0.8')
|
dep_gee = dependency('gee-0.8')
|
||||||
dep_gio = dependency('gio-2.0')
|
dep_gio = dependency('gio-2.0')
|
||||||
dep_glib = dependency('glib-2.0')
|
dep_glib = dependency('glib-2.0')
|
||||||
dep_gnutls = dependency('gnutls', disabler: true, required: dep_gnutls_required)
|
dep_gnutls = dependency('gnutls', disabler: true, required: get_option('plugin-ice'))
|
||||||
dep_gmodule = dependency('gmodule-2.0')
|
dep_gmodule = dependency('gmodule-2.0')
|
||||||
dep_gpgme = dependency('gpgme', disabler: true, required: get_option('plugin-openpgp'))
|
dep_gpgme = dependency('gpgme', disabler: true, required: get_option('plugin-openpgp'))
|
||||||
dep_gstreamer = dependency('gstreamer-1.0', disabler: true, required: get_option('plugin-rtp'))
|
dep_gstreamer = dependency('gstreamer-1.0', disabler: true, required: get_option('plugin-rtp'))
|
||||||
|
|
|
@ -4,7 +4,6 @@ find_packages(RTP_PACKAGES REQUIRED
|
||||||
Gee
|
Gee
|
||||||
GLib
|
GLib
|
||||||
GModule
|
GModule
|
||||||
GnuTLS
|
|
||||||
GObject
|
GObject
|
||||||
GTK4
|
GTK4
|
||||||
Gst
|
Gst
|
||||||
|
|
|
@ -4,7 +4,6 @@ dependencies = [
|
||||||
dep_gee,
|
dep_gee,
|
||||||
dep_glib,
|
dep_glib,
|
||||||
dep_gmodule,
|
dep_gmodule,
|
||||||
dep_gnutls,
|
|
||||||
dep_gstreamer,
|
dep_gstreamer,
|
||||||
dep_gstreamer_app,
|
dep_gstreamer_app,
|
||||||
dep_gstreamer_audio,
|
dep_gstreamer_audio,
|
||||||
|
|
|
@ -12,7 +12,11 @@ public class Module : XmppStreamModule, Iq.Handler {
|
||||||
public signal void unblock_all_received(XmppStream stream);
|
public signal void unblock_all_received(XmppStream stream);
|
||||||
|
|
||||||
public bool is_blocked(XmppStream stream, string jid) {
|
public bool is_blocked(XmppStream stream, string jid) {
|
||||||
return stream.get_flag(Flag.IDENTITY).blocklist.contains(jid);
|
if (is_supported(stream)) {
|
||||||
|
return stream.get_flag(Flag.IDENTITY).blocklist.contains(jid);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool block(XmppStream stream, string[] jids) {
|
public bool block(XmppStream stream, string[] jids) {
|
||||||
|
|
|
@ -181,7 +181,9 @@ public class Module : XmppStreamModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (max_file_size_str != null) return long.parse(max_file_size_str);
|
if (max_file_size_str != null) return long.parse(max_file_size_str);
|
||||||
return -1;
|
|
||||||
|
// If there is no max-file-size node, there is no file size limit
|
||||||
|
return long.MAX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue