|
From: Gustavo J. A. M. C. <gu...@us...> - 2002-04-23 10:29:47
|
Update of /cvsroot/numexp/gnumexp/src/console
In directory usw-pr-cvs1:/tmp/cvs-serv24855
Modified Files:
console-completion.c console-document.c console-entry.c
console-entry.h console-view.c cst-numexp.c numexp-console.c
test-console.c
Log Message:
console-entry.[ch]:
- Rename ConsoleHistory to ConsoleEntryHistory;
- Add a method to set the console syntax table;
- Apply the syntax table to the text view when it changes, after a timeout.
console-view.c:
- use the supplied syntax table to highlight the entered text and result in the display text view, and also to be set as the console entry's systax table.
console-view.c console-document.c test-console.c:
- Fixed some CORBA and local reference count bugs.
cst-numexp.c:
- Removed setting new font size in the default style.
Index: console-completion.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/console-completion.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -U4 -r1.5 -r1.6
--- console-completion.c 10 Jan 2002 10:31:59 -0000 1.5
+++ console-completion.c 23 Apr 2002 10:29:42 -0000 1.6
@@ -41,19 +41,21 @@
*cc = console_completion_full_complete(self, last, &ns_prefix, &prefix);
/* FIXME: MAKE THIS CODE CLEANER!!! AND MAYBE QUICKER*/
if (ns_prefix && prefix) {
- asprintf(&full_prefix, "%s%s", ns_prefix, prefix);
+ full_prefix = g_strdup_printf("%s%s", ns_prefix, prefix);
g_free(ns_prefix);
g_free(prefix);
} else {
if (prefix) {
- asprintf(&full_prefix, "%s", prefix);
- g_free(prefix);
+/* asprintf(&full_prefix, "%s", prefix); */
+/* g_free(prefix); */
+ full_prefix = prefix; prefix = NULL;
}
if (ns_prefix) {
- asprintf(&full_prefix, "%s", ns_prefix);
- g_free(ns_prefix);
+/* asprintf(&full_prefix, "%s", ns_prefix); */
+/* g_free(ns_prefix); */
+ full_prefix = ns_prefix; ns_prefix = NULL;
}
}
if (full_prefix) {
Index: console-document.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/console-document.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -U4 -r1.3 -r1.4
--- console-document.c 16 Dec 2001 21:21:07 -0000 1.3
+++ console-document.c 23 Apr 2002 10:29:43 -0000 1.4
@@ -48,17 +48,13 @@
ConsoleDocument *console_document_new(Numexp_Kernel kernel)
{
- CORBA_Environment ev;
ConsoleDocument *self;
GTypeInstance *instance =
g_type_create_instance(console_document_get_type());
self = CONSOLE_DOCUMENT(instance);
- CORBA_exception_init(&ev);
- Numexp_Kernel_ref(kernel, &ev);
- CORBA_exception_free(&ev);
- self->kernel = kernel;
+ self->kernel = bonobo_object_dup_ref(kernel, NULL);
return self;
}
@@ -86,18 +82,16 @@
static void console_document_shutdown(GObject *object)
{
- CORBA_Environment ev;
ConsoleDocument *self = CONSOLE_DOCUMENT(object);
g_message(__FUNCTION__);
- if (self->kernel != CORBA_OBJECT_NIL) {
- CORBA_exception_init(&ev);
- Numexp_Kernel_unref(self->kernel, &ev);
- CORBA_exception_free(&ev);
- }
- self->kernel = CORBA_OBJECT_NIL;
+
+ if (self->kernel != CORBA_OBJECT_NIL)
+ self->kernel = bonobo_object_release_unref(self->kernel, NULL);
+
g_object_unref(self->var_tree_model);
+
if (G_OBJECT_CLASS(parent_class)->finalize)
G_OBJECT_CLASS(parent_class)->finalize(object);
}
Index: console-entry.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/console-entry.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -U4 -r1.12 -r1.13
--- console-entry.c 13 Jan 2002 14:24:54 -0000 1.12
+++ console-entry.c 23 Apr 2002 10:29:43 -0000 1.13
@@ -5,12 +5,14 @@
#include <gdk/gdkkeysyms.h>
#define HISTORY_SIZE 100
#define HISTORY_FILE "/tmp/gnumexp.history" /* FIXME: this should be ~/.gnumexp_history */
+#define CST_TIMEOUT 500 /* time to wait after the text buffer
+ * changes before applying the cst
+ * engine */
-
-struct _ConsoleHistory
+struct _ConsoleEntryHistory
{
gboolean keep_dups;
guint max_size, cur_size;
GList *data;
@@ -18,8 +20,18 @@
gboolean last_op_was_an_add;
};
+typedef struct _ConsoleEntryBinding ConsoleEntryBinding;
+
+struct _ConsoleEntryBinding {
+ guint keyval, state;
+ gpointer user_data;
+ ConsoleEntryBindingFunc func;
+};
+
+
+
/** some tunable parameters that control the size of the 'Enter' button **/
gboolean console_entry_enable_icon_scaling = 1;
GdkInterpType console_entry_icon_scaling_mode = GDK_INTERP_HYPER;
@@ -42,42 +54,46 @@
static guint signals[LAST_SIGNAL] = { 0 };
static gpointer parent_class = NULL;
-static void console_entry_init (ConsoleEntry *instance,
- gpointer g_class);
-static void console_entry_class_base_init (ConsoleEntryClass *class);
-static void console_entry_class_init (ConsoleEntryClass *class,
- gpointer data);
-static gint console_entry_text_entered (ConsoleEntry *self,
- gchar *text);
-static void text_view_activate (GtkWidget *wid,
- ConsoleEntry *self);
-static gint entry_activate (GtkWidget *wid,
- ConsoleEntry *self);
-static void console_entry_shutdown (GObject *object);
-static gint text_view_key_press (GtkWidget *wid,
- GdkEventKey *event,
- ConsoleEntry *self);
-static void console_entry_toggle_expanded (gpointer foo,
- ConsoleEntry *self);
+static void console_entry_init (ConsoleEntry *instance,
+ gpointer g_class);
+static void console_entry_class_base_init (ConsoleEntryClass *class);
+static void console_entry_class_init (ConsoleEntryClass *class,
+ gpointer data);
+static gint console_entry_text_entered (ConsoleEntry *self,
+ gchar *text);
+static void text_view_activate (GtkWidget *wid,
+ ConsoleEntry *self);
+static gint entry_activate (GtkWidget *wid,
+ ConsoleEntry *self);
+static void console_entry_shutdown (GObject *object);
+static gint text_view_key_press (GtkWidget *wid,
+ GdkEventKey *event,
+ ConsoleEntry *self);
+static void console_entry_toggle_expanded (gpointer foo,
+ ConsoleEntry *self);
+
/* History */
-static ConsoleHistory* console_entry_history_new (guint size,
- gboolean keep_dups);
-static void console_entry_history_destroy (ConsoleHistory *self);
-static ConsoleHistory* console_entry_history_add (ConsoleHistory *self,
- const char *line);
-static ConsoleHistory* console_entry_history_resize (ConsoleHistory *self,
- guint new_size);
-static const char* console_entry_history_previous (ConsoleHistory *self);
-static const char* console_entry_history_next (ConsoleHistory *self);
+static ConsoleEntryHistory* console_entry_history_new (guint size,
+ gboolean keep_dups);
+static void console_entry_history_destroy (ConsoleEntryHistory *self);
+static ConsoleEntryHistory* console_entry_history_add (ConsoleEntryHistory *self,
+ const char *line);
+static ConsoleEntryHistory* console_entry_history_resize (ConsoleEntryHistory *self,
+ guint new_size);
+static const char* console_entry_history_previous (ConsoleEntryHistory *self);
+static const char* console_entry_history_next (ConsoleEntryHistory *self);
+
/* NOTE: this will overwrite the file! */
-static gboolean console_entry_history_save (ConsoleHistory *self,
- const char *filename);
-static ConsoleHistory* console_entry_history_load (const char *filename);
+static gboolean console_entry_history_save (ConsoleEntryHistory *self,
+ const char *filename);
+static ConsoleEntryHistory* console_entry_history_load (const char *filename);
+static void text_view_changed (GtkTextView *text_view,
+ ConsoleEntry *entry);
@@ -149,13 +165,10 @@
instance = g_type_create_instance(console_entry_get_type());
self = CONSOLE_ENTRY(instance);
- if (syntax_table) {
- cst_syntax_table_ref(syntax_table);
- self->syntax_table = syntax_table;
- cst_install_tags(syntax_table, gtk_text_view_get_buffer(GTK_TEXT_VIEW(self->text_view)));
- }
+ console_entry_set_syntax_table(self, syntax_table);
+
return GTK_WIDGET(self);
}
@@ -226,8 +239,10 @@
GtkIconSet *icon_set;
GtkSizeGroup *size_group;
/* GtkObject *adjustment; */
+ self->syntax_table = NULL;
+ self->cst_timeout_id = 0;
/* console history */
self->history = console_entry_history_load(HISTORY_FILE);
if (!self->history)
self->history = console_entry_history_new(HISTORY_SIZE, FALSE);
@@ -241,8 +256,10 @@
/* Text view */
self->text_view = gtk_text_view_new();
gtk_signal_connect(GTK_OBJECT(self->text_view), "key-press-event",
GTK_SIGNAL_FUNC(text_view_key_press), self);
+ g_signal_connect(gtk_text_view_get_buffer(GTK_TEXT_VIEW(self->text_view)), "changed",
+ G_CALLBACK(text_view_changed), self);
/* adjustment = gtk_adjustment_new(0, 0, 1, .1, .1, .1); */
/* self->scrollbar = gtk_vscrollbar_new(GTK_ADJUSTMENT(adjustment)); */
/* sw = gtk_scrolled_window_new(NULL, GTK_ADJUSTMENT(adjustment)); */
sw = gtk_scrolled_window_new(NULL, NULL);
@@ -358,9 +375,8 @@
g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1, expand_toggled_types);
gtk_rc_parse_string(
"style \"console_entry\" {\n"
-/* " text[NORMAL] = \"#6ba5e7\"\n" /\* testing *\/ */
" font_name = \"monospace\"\n"
"}\n"
"widget_class \"*.ConsoleEntry.*.GtkEntry\" style \"console_entry\"\n"
"widget_class \"*.ConsoleEntry.*.GtkTextView\" style \"console_entry\"\n"
@@ -483,8 +499,14 @@
if (!console_entry_history_save(self->history, HISTORY_FILE)) {
g_warning("error saving history file");
}
+ if (self->cst_timeout_id)
+ gtk_timeout_remove(self->cst_timeout_id);
+
+ if (self->syntax_table)
+ cst_syntax_table_unref(self->syntax_table);
+
if (G_OBJECT_CLASS(parent_class)->finalize)
G_OBJECT_CLASS(parent_class)->finalize(object);
}
@@ -597,18 +619,18 @@
}
}
/* NOT TESTED YET */
-static void console_entry_history_destroy(ConsoleHistory *self)
+static void console_entry_history_destroy(ConsoleEntryHistory *self)
{
GList *list;
for(list = self->data; list; list = g_list_next(list))
g_free(list->data);
g_list_free(list);
}
/* NOT TESTED YET */
-static ConsoleHistory* console_entry_history_resize(ConsoleHistory *self, guint new_size)
+static ConsoleEntryHistory* console_entry_history_resize(ConsoleEntryHistory *self, guint new_size)
{
if (self->max_size <= new_size)
{
self->max_size = new_size;
@@ -646,15 +668,15 @@
g_string_free(str, FALSE);
return s;
}
-static ConsoleHistory* console_entry_history_load(const char* filename)
+static ConsoleEntryHistory* console_entry_history_load(const char* filename)
{
FILE *fname;
char *buffer, *expanded;
int keep_dups, max_size, log;
- ConsoleHistory* chistory;
+ ConsoleEntryHistory* chistory;
fname = fopen(filename, "rt");
if (!fname) return NULL;
@@ -672,9 +694,9 @@
return chistory;
}
-static gboolean console_entry_history_save(ConsoleHistory* self, const char* filename)
+static gboolean console_entry_history_save(ConsoleEntryHistory* self, const char* filename)
{
FILE* fname;
char* tmp;
GList* l;
@@ -692,9 +714,9 @@
fclose(fname);
return TRUE;
}
-static const char* console_entry_history_next(ConsoleHistory* self)
+static const char* console_entry_history_next(ConsoleEntryHistory* self)
{
const char* line;
if (self->current) {
self->current = g_list_next(self->current)?g_list_next(self->current):self->current;
@@ -704,9 +726,9 @@
return NULL;
}
}
-static const char* console_entry_history_previous(ConsoleHistory* self)
+static const char* console_entry_history_previous(ConsoleEntryHistory* self)
{
const char* line;
if (self->current) {
@@ -722,9 +744,9 @@
return NULL;
}
}
-static ConsoleHistory* console_entry_history_add(ConsoleHistory* self, const char* line)
+static ConsoleEntryHistory* console_entry_history_add(ConsoleEntryHistory* self, const char* line)
{
if (self->cur_size == self->max_size) {
self->data = g_list_remove(self->data, g_list_first(self->data)->data);
self->cur_size--;
@@ -749,12 +771,12 @@
return self;
}
-static ConsoleHistory* console_entry_history_new(guint size, gboolean keep_dups)
+static ConsoleEntryHistory* console_entry_history_new(guint size, gboolean keep_dups)
{
- ConsoleHistory* self;
- self = g_new0(ConsoleHistory, 1);
+ ConsoleEntryHistory* self;
+ self = g_new0(ConsoleEntryHistory, 1);
self->last_op_was_an_add = FALSE;
self->keep_dups = keep_dups;
self->max_size = size;
@@ -763,4 +785,54 @@
self->cur_size = 0;
return self;
}
+
+
+
+/**
+ * console_entry_set_syntax_table:
+ * @entry: a #ConsoleEntry instance
+ * @syntax_table: a pointer to a #CSTSyntaxTable; ownership is not
+ * taken by this function, only a reference is kept
+ *
+ * Sets a syntax highlighting engine to be used in the expanded mode.
+ **/
+void console_entry_set_syntax_table(ConsoleEntry *entry, CSTSyntaxTable *syntax_table)
+{
+ if (entry->syntax_table)
+ cst_syntax_table_unref(entry->syntax_table);
+ entry->syntax_table = syntax_table;
+ if (syntax_table) {
+ cst_syntax_table_ref(syntax_table);
+ cst_install_tags(syntax_table, gtk_text_view_get_buffer(GTK_TEXT_VIEW(entry->text_view)));
+ }
+}
+
+
+static gboolean text_view_changed_timeout(gpointer data)
+{
+ ConsoleEntry *self = CONSOLE_ENTRY(data);
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(self->text_view));
+ GtkTextIter start, end;
+ g_message(__FUNCTION__);
+ /* this function will return FALSE in any case and the timeout
+ * will be removed, so we should set cst_timeout_id to zero */
+ self->cst_timeout_id = 0;
+ if (!self->syntax_table)
+ return FALSE;
+ gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(buffer), &start, &end);
+ cst_fontify_region(self->syntax_table, &start, &end, 0);
+ return FALSE;
+}
+
+
+
+static void text_view_changed(GtkTextView *text_view, ConsoleEntry *self)
+{
+ if (self->cst_timeout_id)
+ gtk_timeout_remove(self->cst_timeout_id);
+ self->cst_timeout_id =
+ gtk_timeout_add(CST_TIMEOUT, text_view_changed_timeout, self);
+}
+
+
Index: console-entry.h
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/console-entry.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -U4 -r1.11 -r1.12
--- console-entry.h 13 Jan 2002 14:24:54 -0000 1.11
+++ console-entry.h 23 Apr 2002 10:29:43 -0000 1.12
@@ -21,25 +21,25 @@
#define CONSOLE_ENTRY_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
#define CONSOLE_ENTRY_CLASS_NAME(class) (g_type_name (CONSOLE_ENTRY_CLASS_TYPE (class)))
-typedef struct _ConsoleHistory ConsoleHistory;
-typedef struct _ConsoleEntry ConsoleEntry;
-typedef struct _ConsoleEntryClass ConsoleEntryClass;
+typedef struct _ConsoleEntryHistory ConsoleEntryHistory;
+typedef struct _ConsoleEntry ConsoleEntry;
+typedef struct _ConsoleEntryClass ConsoleEntryClass;
struct _ConsoleEntry
{
- GtkHBox base;
- GtkWidget *text_view, *text_view_frame;
- GtkWidget *entry;
- GtkWidget *arrow;
- GtkWidget *enter_button;
- CSTSyntaxTable *syntax_table;
- gboolean expanded:1;
- ConsoleHistory *history;
-
- GList* bindings;
+ GtkHBox base;
+ GtkWidget *text_view, *text_view_frame;
+ GtkWidget *entry;
+ GtkWidget *arrow;
+ GtkWidget *enter_button;
+ CSTSyntaxTable *syntax_table;
+ gboolean expanded:1;
+ ConsoleEntryHistory *history;
+ GList* bindings; /* list of key bindings */
+ guint cst_timeout_id;
};
struct _ConsoleEntryClass
@@ -56,17 +56,8 @@
typedef gboolean (*ConsoleEntryBindingFunc) (ConsoleEntry *entry, guint keyval,
guint state, gpointer user_data);
-typedef struct _ConsoleEntryBinding ConsoleEntryBinding;
-
-struct _ConsoleEntryBinding {
- guint keyval, state;
- gpointer user_data;
- ConsoleEntryBindingFunc func;
-};
-
-
char* console_entry_get_text (ConsoleEntry *self);
guint console_entry_get_cursor_position (ConsoleEntry *self);
@@ -82,8 +73,10 @@
guint keyval,
guint state,
ConsoleEntryBindingFunc func,
gpointer user_data);
+void console_entry_set_syntax_table (ConsoleEntry *entry,
+ CSTSyntaxTable *syntax_table);
G_END_DECLS
Index: console-view.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/console-view.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -U4 -r1.15 -r1.16
--- console-view.c 25 Mar 2002 09:00:26 -0000 1.15
+++ console-view.c 23 Apr 2002 10:29:43 -0000 1.16
@@ -51,8 +51,11 @@
static gboolean console_tab_handler (ConsoleEntry *entry,
guint keyval,
guint state,
gpointer user_data);
+static gint console_view_get_width (ConsoleView *self,
+ GtkTextTag *tag);
+
static GTypeInfo typeinfo =
@@ -107,14 +110,19 @@
/* create text_view */
self->text_view = gtk_text_view_new_with_buffer(doc->textbuf);
gtk_widget_show(self->text_view);
-
+ if (syntax_table) {
+ cst_syntax_table_ref(syntax_table);
+ self->syntax_table = syntax_table;
+ cst_install_tags(syntax_table, gtk_text_view_get_buffer(GTK_TEXT_VIEW(self->text_view)));
+ }
/* create the editor */
self->editor = console_entry_new(NULL);
console_entry_bind_key(CONSOLE_ENTRY(self->editor),
GDK_Tab, 0, console_tab_handler,
self);
+ console_entry_set_syntax_table(CONSOLE_ENTRY(self->editor), syntax_table);
gtk_signal_connect(GTK_OBJECT(self->editor),
"text_entered",
GTK_SIGNAL_FUNC(console_entry_text_entered),
self);
@@ -297,41 +305,8 @@
}
-static gint editor_changed(GtkWidget *wid, ConsoleView *self)
-{
- GtkTextIter start, end;
- if (!self->syntax_table)
- return FALSE;
- gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(wid), &start, &end);
- cst_fontify_region(self->syntax_table, &start, &end, 0);
- return FALSE;
-}
-
-
-#if 0
-static gint key_press(GtkWidget *wid, GdkEventKey *event, ConsoleView *self)
-{
- g_return_val_if_fail(IS_CONSOLE_VIEW(self), FALSE);
- if (event->keyval == GDK_Return && event->state&GDK_CONTROL_MASK)
- {
- GtkTextBuffer *textbuf;
- GtkTextIter start, end;
- gchar *text;
- //g_message("activate!");
- textbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(self->editor));
- gtk_text_buffer_get_bounds(textbuf, &start, &end);
- text = gtk_text_buffer_get_text(textbuf, &start, &end, TRUE);
- gtk_text_buffer_delete(textbuf, &start, &end);
- console_view_text_entered(self, text);
- return TRUE;
- }
- return FALSE;
-}
-#endif
-
-
static void console_view_init2(ConsoleView *self)
{
GtkWidget *wid, *sw;
@@ -478,11 +453,19 @@
static void console_view_shutdown(GObject *object)
{
ConsoleView *self = CONSOLE_VIEW(object);
+ CORBA_Environment ev;
+
+ if (self->syntax_table)
+ cst_syntax_table_unref(self->syntax_table);
+
+ CORBA_exception_init(&ev);
+ Numexp_Kernel_setClient(self->client->kernel, CORBA_OBJECT_NIL, &ev);
+ CORBA_exception_free(&ev);
+ bonobo_object_unref(self->client);
g_object_unref(self->doc);
- g_object_unref(self->client);
if (G_OBJECT_CLASS(parent_class)->finalize)
G_OBJECT_CLASS(parent_class)->finalize(object);
}
@@ -584,15 +567,14 @@
return TRUE;
}
-gint console_view_get_width(ConsoleView *self, GtkTextTag *tag)
+static gint console_view_get_width(ConsoleView *self, GtkTextTag *tag)
{
PangoFontDescription *fdesc;
PangoFontMetrics *metrics;
PangoContext *context;
GtkWidget *widget;
- GValue *value;
int char_width;
int width_in_chars;
return 0;
Index: cst-numexp.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/cst-numexp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -U4 -r1.2 -r1.3
--- cst-numexp.c 19 Dec 2001 08:28:49 -0000 1.2
+++ cst-numexp.c 23 Apr 2002 10:29:43 -0000 1.3
@@ -18,9 +18,9 @@
CSTSyntaxElement *elem;
/* default style */
table = cst_syntax_table_new("NumExp");
- g_object_set(table->default_style, "family", "monospace", "size", 16, NULL);
+ g_object_set(table->default_style, "family", "monospace", /*"size", 16,*/ NULL);
/* name */
elem = cst_syntax_table_add_element(table, "name");
g_object_set(elem->tag, "foreground", "#808020", NULL);
Index: numexp-console.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/numexp-console.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -U4 -r1.4 -r1.5
--- numexp-console.c 15 Dec 2001 16:30:10 -0000 1.4
+++ numexp-console.c 23 Apr 2002 10:29:43 -0000 1.5
@@ -1,5 +1,5 @@
-/* -*- Mode: C; c-file-style: "bsd"; -*- */
+/* -*- Mode: C; c-file-style: "stroustrup"; -*- */
#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
Index: test-console.c
===================================================================
RCS file: /cvsroot/numexp/gnumexp/src/console/test-console.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -U4 -r1.8 -r1.9
--- test-console.c 10 Jan 2002 10:31:59 -0000 1.8
+++ test-console.c 23 Apr 2002 10:29:43 -0000 1.9
@@ -199,13 +199,9 @@
void exit_func(void)
{
- CORBA_Environment ev;
- CORBA_exception_init(&ev);
- Numexp_Kernel_unref(kernel, &ev);
- CORBA_exception_free(&ev);
- kernel = CORBA_OBJECT_NIL;
+ kernel = bonobo_object_release_unref(kernel, NULL);
}
static gboolean delayed_init(gpointer data)
|