kee

Offline IOU signer with QR as transport
git clone https://holbrook.no/src/kee
Info | Log | Files | Refs | README | LICENSE

commit a81d82240e90aacb97818b8b3f580102933b3bed
parent 84d47cf9ac064d8271b98afdb313550052869c66
Author: lash <dev@holbrook.no>
Date:   Sat, 27 Apr 2024 21:00:28 +0100

Remove warnings, unused vars

Diffstat:
Msrc/gtk/kee-entry-item.c | 2++
Msrc/gtk/kee-transport.c | 1-
Msrc/gtk/ui.c | 19++++++++++---------
3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/gtk/kee-entry-item.c b/src/gtk/kee-entry-item.c @@ -132,4 +132,6 @@ KeeEntryItem* kee_entry_item_import(const char *data, size_t data_len) { KeeEntryItem *item; item = g_object_new(KEE_TYPE_ENTRY_ITEM, "orientation", GTK_ORIENTATION_VERTICAL, NULL); + + return item; } diff --git a/src/gtk/kee-transport.c b/src/gtk/kee-transport.c @@ -72,7 +72,6 @@ static void kee_transport_render(KeeTransport *o) { /// \todo share buffer with image data? void kee_transport_handle_qr(GAction *Act, GVariant *v, KeeTransport *o) { - size_t c; char *p; char *pp; int i; diff --git a/src/gtk/ui.c b/src/gtk/ui.c @@ -17,6 +17,7 @@ #include "kee-menu.h" #include "kee-key.h" #include "kee-transport.h" +#include "transport.h" static void ui_handle_unlock(KeeKey *o, KeeMenu *menu) { @@ -32,18 +33,18 @@ static void ui_handle_unlock(KeeKey *o, KeeMenu *menu) { } static void ui_handle_import(KeeImport *import, GString *v, KeeMenu *menu) { - GtkWidget *widget; - kee_transport_t trans; + //GtkWidget *widget; + struct kee_transport_t trans; char *s; - s = (char*)v.str; + s = (char*)v->str; kee_transport_import(&trans, KEE_TRANSPORT_BASE64, s, strlen(s) + 1); - kee_transport_read(&trans); + //kee_transport_read(&trans); - switch(kee_transport_cmd(&trans)) { - case KEE_CMD_DELTA: - widget = kee_menu_next("item"); - } + //switch(kee_transport_cmd(&trans)) { + // case KEE_CMD_DELTA: + // widget = kee_menu_next("item"); + //} } @@ -100,7 +101,7 @@ void ui_build(GtkApplication *gapp, struct kee_context *ctx) { /// \todo make kee-entry action map/group act = g_simple_action_new("qr", G_VARIANT_TYPE_STRING); g_action_map_add_action(G_ACTION_MAP(gapp), G_ACTION(act)); - g_signal_connect(act, "activate", G_CALLBACK(kee_transport_handle_in), trans); + g_signal_connect(act, "activate", G_CALLBACK(kee_transport_handle_qr), trans); gtk_window_present(GTK_WINDOW (win)); }