Small cleanup

This commit is contained in:
fiaxh 2022-01-23 19:00:05 +01:00
parent 19a3fa5e02
commit b123800f26
7 changed files with 9 additions and 8 deletions

View file

@ -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;

View file

@ -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) => {

View file

@ -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);

View file

@ -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;
}

View file

@ -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

View file

@ -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) {

View file

@ -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) {