static GObject* gkm_roots_module_constructor (GType type, guint n_props, GObjectConstructParam *props) { GkmRootsModule *self = GKM_ROOTS_MODULE (G_OBJECT_CLASS (gkm_roots_module_parent_class)->constructor(type, n_props, props)); GkmManager *manager; g_return_val_if_fail (self, NULL); #ifdef ROOT_CERTIFICATES if (!self->directory) self->directory = g_strdup (ROOT_CERTIFICATES); #endif if (self->directory) { self->tracker = gkm_file_tracker_new (self->directory, "*", "*.0"); g_signal_connect (self->tracker, "file-added", G_CALLBACK (file_load), self); g_signal_connect (self->tracker, "file-changed", G_CALLBACK (file_load), self); g_signal_connect (self->tracker, "file-removed", G_CALLBACK (file_remove), self); } manager = gkm_module_get_manager (GKM_MODULE (self)); gkm_manager_add_property_index (manager, "unique", TRUE); gkm_manager_add_property_index (manager, "path", FALSE); return G_OBJECT (self); }
static GObject* gkm_ssh_module_constructor (GType type, guint n_props, GObjectConstructParam *props) { GkmSshModule *self = GKM_SSH_MODULE (G_OBJECT_CLASS (gkm_ssh_module_parent_class)->constructor(type, n_props, props)); g_return_val_if_fail (self, NULL); if (!self->directory) self->directory = g_strdup ("~/.ssh"); self->tracker = gkm_file_tracker_new (self->directory, "*.pub", NULL); g_signal_connect (self->tracker, "file-added", G_CALLBACK (file_load), self); g_signal_connect (self->tracker, "file-changed", G_CALLBACK (file_load), self); g_signal_connect (self->tracker, "file-removed", G_CALLBACK (file_remove), self); return G_OBJECT (self); }