aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-01-23 19:00:05 +0100
committerfiaxh <git@lightrise.org>2022-01-23 19:50:01 +0100
commitb123800f26e78df5b4e01857bc5c2ac6a954ba5b (patch)
tree57c6e9aed7b585b5c288f2a527cc63bcd469f0e4
parent19a3fa5e02984f186b5291b24954e1a5140d379e (diff)
downloaddino-b123800f26e78df5b4e01857bc5c2ac6a954ba5b.tar.gz
dino-b123800f26e78df5b4e01857bc5c2ac6a954ba5b.zip
Small cleanup
-rw-r--r--libdino/src/service/call_state.vala2
-rw-r--r--libdino/src/service/calls.vala4
-rw-r--r--libdino/src/service/jingle_file_transfers.vala2
-rw-r--r--main/src/ui/global_search.vala2
-rw-r--r--plugins/rtp/src/video_widget.vala4
-rw-r--r--xmpp-vala/src/module/xep/0272_muji.vala2
-rw-r--r--xmpp-vala/src/module/xep/0402_bookmarks2.vala1
7 files changed, 9 insertions, 8 deletions
diff --git a/libdino/src/service/call_state.vala b/libdino/src/service/call_state.vala
index 188a8321..7d205f7f 100644
--- a/libdino/src/service/call_state.vala
+++ b/libdino/src/service/call_state.vala
@@ -191,7 +191,7 @@ public class Dino.CallState : Object {
}
internal void rename_peer(Jid from_jid, Jid to_jid) {
- debug("[%s] Renaming %s to %s exists %b", call.account.bare_jid.to_string(), from_jid.to_string(), to_jid.to_string(), peers.has_key(from_jid));
+ debug("[%s] Renaming %s to %s exists %s", call.account.bare_jid.to_string(), from_jid.to_string(), to_jid.to_string(), peers.has_key(from_jid).to_string());
PeerState? peer_state = peers[from_jid];
if (peer_state == null) return;
diff --git a/libdino/src/service/calls.vala b/libdino/src/service/calls.vala
index b30c2755..741aa673 100644
--- a/libdino/src/service/calls.vala
+++ b/libdino/src/service/calls.vala
@@ -172,7 +172,7 @@ namespace Dino {
if (call_state.group_call != null && call_state.group_call.muc_jid.equals(muji_muc)) {
if (call_state.peers.keys.contains(session.peer_full_jid)) {
PeerState peer_state = call_state.peers[session.peer_full_jid];
- debug("[%s] Incoming call, we know the peer. Expected %b", account.bare_jid.to_string(), peer_state.waiting_for_inbound_muji_connection);
+ debug("[%s] Incoming call, we know the peer. Expected %s", account.bare_jid.to_string(), peer_state.waiting_for_inbound_muji_connection.to_string());
if (!peer_state.waiting_for_inbound_muji_connection) return;
peer_state.set_session(session);
@@ -434,7 +434,7 @@ namespace Dino {
});
muji_meta_module.call_rejected.connect((from_jid, to_jid, muc_jid, message_type) => {
if (from_jid.equals_bare(account.bare_jid)) return;
- debug(@"[%s] rejected our MUJI invite to %s", account.bare_jid.to_string(), from_jid.to_string(), muc_jid.to_string());
+ debug(@"[%s] %s rejected our MUJI invite to %s", account.bare_jid.to_string(), from_jid.to_string(), muc_jid.to_string());
});
stream_interactor.module_manager.get_module(account, Xep.Coin.Module.IDENTITY).coin_info_received.connect((jid, info) => {
diff --git a/libdino/src/service/jingle_file_transfers.vala b/libdino/src/service/jingle_file_transfers.vala
index e86f923c..c607b6c6 100644
--- a/libdino/src/service/jingle_file_transfers.vala
+++ b/libdino/src/service/jingle_file_transfers.vala
@@ -85,8 +85,8 @@ public class JingleFileProvider : FileProvider, Object {
public Encryption get_encryption(FileTransfer file_transfer, FileReceiveData receive_data, FileMeta file_meta) {
Xmpp.Xep.JingleFileTransfer.FileTransfer? jingle_file_transfer = file_transfers[file_transfer.info];
if (jingle_file_transfer == null) {
- return Encryption.NONE;
warning("Could not determine jingle encryption - transfer data not available anymore");
+ return Encryption.NONE;
}
foreach (JingleFileEncryptionHelper helper in JingleFileHelperRegistry.instance.encryption_helpers.values) {
var encryption = helper.get_encryption(jingle_file_transfer);
diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala
index e79ac083..289dd072 100644
--- a/main/src/ui/global_search.vala
+++ b/main/src/ui/global_search.vala
@@ -102,7 +102,7 @@ public class GlobalSearch : Overlay {
avatar.set_conversation(stream_interactor, suggestion.conversation);
}
if (display_name != suggestion.jid.to_string()) {
- label.set_markup("%s <span font_weight='light' fgalpha='80%'>%s</span>".printf(Markup.escape_text(display_name), Markup.escape_text(suggestion.jid.to_string())));
+ label.set_markup("%s <span font_weight='light' fgalpha='80%%'>%s</span>".printf(Markup.escape_text(display_name), Markup.escape_text(suggestion.jid.to_string())));
} else {
label.label = display_name;
}
diff --git a/plugins/rtp/src/video_widget.vala b/plugins/rtp/src/video_widget.vala
index 76e4dcca..a9ca7504 100644
--- a/plugins/rtp/src/video_widget.vala
+++ b/plugins/rtp/src/video_widget.vala
@@ -41,7 +41,7 @@ public class Dino.Plugins.Rtp.VideoWidget : Gtk.Bin, Dino.Plugins.VideoCallWidge
}
public void input_caps_changed(GLib.Object pad, ParamSpec spec) {
- Gst.Caps? caps = (pad as Gst.Pad).caps;
+ Gst.Caps? caps = ((Gst.Pad)pad).caps;
if (caps == null) return;
int width, height;
@@ -54,7 +54,7 @@ public class Dino.Plugins.Rtp.VideoWidget : Gtk.Bin, Dino.Plugins.VideoCallWidge
if (prepare != null) {
Gst.Element crop = ((Gst.Bin)prepare).get_by_name(@"video_widget_$(id)_crop");
if (crop != null) {
- Value ratio = new Value(typeof(Gst.Fraction));
+ Value ratio = Value(typeof(Gst.Fraction));
#if VALA_0_52
Gst.Value.set_fraction(ref ratio, allocation.width, allocation.height);
#else
diff --git a/xmpp-vala/src/module/xep/0272_muji.vala b/xmpp-vala/src/module/xep/0272_muji.vala
index 2bdc068e..b602d94c 100644
--- a/xmpp-vala/src/module/xep/0272_muji.vala
+++ b/xmpp-vala/src/module/xep/0272_muji.vala
@@ -197,7 +197,7 @@ namespace Xmpp.Xep.Muji {
if (group_call.real_jids.has_key(presence.from)) {
group_call.peer_left(group_call.real_jids[presence.from]);
}
- group_call.real_jids.remove(presence.from);
+ group_call.real_jids.unset(presence.from);
}
private void on_jid_finished_preparing(XmppStream stream, Jid jid, GroupCall group_call) {
diff --git a/xmpp-vala/src/module/xep/0402_bookmarks2.vala b/xmpp-vala/src/module/xep/0402_bookmarks2.vala
index cafe1435..3b100534 100644
--- a/xmpp-vala/src/module/xep/0402_bookmarks2.vala
+++ b/xmpp-vala/src/module/xep/0402_bookmarks2.vala
@@ -16,6 +16,7 @@ public class Module : BookmarksProvider, XmppStreamModule {
hm = flag.conferences;
} else {
Gee.List<StanzaNode>? items = yield stream.get_module(Pubsub.Module.IDENTITY).request_all(stream, stream.get_flag(Bind.Flag.IDENTITY).my_jid.bare_jid, NS_URI);
+ if (items == null) return null;
hm = new HashMap<Jid, Conference>(Jid.hash_func, Jid.equals_func);
foreach (StanzaNode item_node in items) {