src/moonshot \
src/moonshot-webp
-AM_CFLAGS =
+AM_CFLAGS = -g -O0
-AM_CPPFLAGS = \
+AM_CPPFLAGS = -g -O0 \
-include config.h \
-DLOCALEDIR=\""$(localedir)"\" \
-I$(top_srcdir)/libmoonshot \
-I$(top_builddir)/libmoonshot
-AM_VALAFLAGS = \
+AM_VALAFLAGS = -g \
config.vapi \
--vapidir=$(top_srcdir)/vapi \
--pkg gio-2.0
src_moonshot_VALAFLAGS = --pkg gdk-2.0 --pkg gtk+-2.0 --pkg gee-1.0 $(AM_VALAFLAGS)
src_moonshot_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
src_moonshot_LDADD = $(moonshot_LIBS)
+src_moonshot_LDFLAGS = -g -O0
src_moonshot_webp_VALAFLAGS = --vapidir=$(top_srcdir)/libmoonshot --pkg gtk+-2.0 --pkg gdk-2.0 --pkg libmoonshot $(AM_VALAFLAGS)
src_moonshot_webp_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
private MoonshotServer ipc_server;
#if OS_MACOS
public OSXApplication osxApp;
+ public bool on_osx_open_files (string file_name ) {
+ print ("on_osx_open_files() file_name = %s\n", file_name);
+ return ipc_server.install_from_file(file_name);
+ }
#endif
private const int WINDOW_WIDTH = 400;
private const int WINDOW_HEIGHT = 500;
// This wont work with Vala 0.12
// osxApp.ns_application_open_file.connect(ipc_server.install_from_file);
// so we have to use this old way
- Signal.connect(osxApp, "NSApplicationOpenFile", (GLib.Callback)(ipc_server.install_from_file), null);
+ Signal.connect(osxApp, "NSApplicationOpenFile", (GLib.Callback)(on_osx_open_files), ipc_server);
+// Signal.connect_data(osxApp, "NSApplicationOpenFile", (GLib.Callback)(ipc_server.install_from_file), ipc_server, null, 0);
#endif
view.show();
[DBus (name = "org.janet.Moonshot")]
public class MoonshotServer : Object {
- private IdentityManagerView main_window;
+ private static IdentityManagerView main_window;
public MoonshotServer (Gtk.Window window)
{
public bool install_id_card (string display_name,
string user_name,
- string password,
- string realm,
- string[] rules_patterns,
- string[] rules_always_confirm,
- string[] services,
- string ca_cert,
- string subject,
- string subject_alt,
- string server_cert)
+ string ?password,
+ string ?realm,
+ string[] ?rules_patterns,
+ string[] ?rules_always_confirm,
+ string[] ?services,
+ string ?ca_cert,
+ string ?subject,
+ string ?subject_alt,
+ string ?server_cert)
{
IdCard idcard = new IdCard ();
}
}
- return this.main_window.add_identity (idcard);
+ return main_window.add_identity (idcard);
}
public bool install_from_file (string file_name)
{
var webp = new WebProvisioning.Parser (file_name);
+ print ("install_from_file() file_name = %s", file_name);
webp.parse();
bool result = false;
card.trust_anchor.server_cert);
}
- return true;
+print ("install_from_file() result %s\n", result.to_string());
+ return result;
}
}
public bool use_quartz_accelerators();
/* Signals */
-
+/*
[CCode(cname="NSApplicationOpenFile")]
public signal bool ns_application_open_file(string file_name);
+*/
+
+ [CCode(cname="nsapplicationopenfile")]
+
+ public signal bool nsapplicationopenfile(string file_name);
+
}