Indentation fixes
This commit is contained in:
parent
eb43c4a35d
commit
b5d5a05a1e
|
@ -15,14 +15,14 @@ public class OwnNotifications {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.account = account;
|
this.account = account;
|
||||||
stream_interactor.module_manager.get_module(account, StreamModule.IDENTITY).bundle_fetched.connect_after((jid, device_id, bundle) => {
|
stream_interactor.module_manager.get_module(account, StreamModule.IDENTITY).bundle_fetched.connect_after((jid, device_id, bundle) => {
|
||||||
if (jid.equals(account.bare_jid) && has_new_devices(account.bare_jid)) {
|
if (jid.equals(account.bare_jid) && has_new_devices(account.bare_jid)) {
|
||||||
display_notification();
|
display_notification();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (has_new_devices(account.bare_jid)) {
|
if (has_new_devices(account.bare_jid)) {
|
||||||
display_notification();
|
display_notification();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool has_new_devices(Jid jid) {
|
public bool has_new_devices(Jid jid) {
|
||||||
|
|
|
@ -3,38 +3,38 @@ using Gdk;
|
||||||
[CCode (cheader_filename = "qrencode.h")]
|
[CCode (cheader_filename = "qrencode.h")]
|
||||||
namespace Qrencode {
|
namespace Qrencode {
|
||||||
|
|
||||||
[CCode (cname = "QRecLevel", cprefix = "QR_ECLEVEL_")]
|
[CCode (cname = "QRecLevel", cprefix = "QR_ECLEVEL_")]
|
||||||
public enum ECLevel {
|
public enum ECLevel {
|
||||||
L,
|
L,
|
||||||
M,
|
M,
|
||||||
Q,
|
Q,
|
||||||
H
|
H
|
||||||
}
|
}
|
||||||
|
|
||||||
[CCode (cname = "QRencodeMode", cprefix = "QR_MODE_")]
|
[CCode (cname = "QRencodeMode", cprefix = "QR_MODE_")]
|
||||||
public enum EncodeMode {
|
public enum EncodeMode {
|
||||||
NUL,
|
NUL,
|
||||||
NUM,
|
NUM,
|
||||||
AN,
|
AN,
|
||||||
[CCode (cname = "QR_MODE_8")]
|
[CCode (cname = "QR_MODE_8")]
|
||||||
EIGHT_BIT,
|
EIGHT_BIT,
|
||||||
KANJI,
|
KANJI,
|
||||||
STRUCTURE,
|
STRUCTURE,
|
||||||
ECI,
|
ECI,
|
||||||
FNC1FIRST,
|
FNC1FIRST,
|
||||||
FNC1SECOND
|
FNC1SECOND
|
||||||
}
|
}
|
||||||
|
|
||||||
[CCode (cname = "QRcode", free_function = "QRcode_free", has_type_id = false)]
|
[CCode (cname = "QRcode", free_function = "QRcode_free", has_type_id = false)]
|
||||||
[Compact]
|
[Compact]
|
||||||
public class QRcode {
|
public class QRcode {
|
||||||
private int version;
|
private int version;
|
||||||
private int width;
|
private int width;
|
||||||
[CCode (array_length = false)]
|
[CCode (array_length = false)]
|
||||||
private uint8[] data;
|
private uint8[] data;
|
||||||
|
|
||||||
[CCode (cname = "QRcode_encodeString")]
|
[CCode (cname = "QRcode_encodeString")]
|
||||||
public QRcode (string str, int version = 0, ECLevel level = ECLevel.L, EncodeMode hint = EncodeMode.EIGHT_BIT, bool casesensitive = true);
|
public QRcode (string str, int version = 0, ECLevel level = ECLevel.L, EncodeMode hint = EncodeMode.EIGHT_BIT, bool casesensitive = true);
|
||||||
|
|
||||||
public Pixbuf to_pixbuf() {
|
public Pixbuf to_pixbuf() {
|
||||||
uint8[] bitmap = new uint8[3*width*width];
|
uint8[] bitmap = new uint8[3*width*width];
|
||||||
|
@ -46,5 +46,5 @@ namespace Qrencode {
|
||||||
}
|
}
|
||||||
return new Pixbuf.from_data(bitmap, Colorspace.RGB, false, 8, width, width, width*3);
|
return new Pixbuf.from_data(bitmap, Colorspace.RGB, false, 8, width, width, width*3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue