From da1f014c19b4df01c4c7656f50073c88807ea663 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 8 Dec 2005 23:26:08 +0000 Subject: [PATCH] r1293@localhost: muntyan | 2005-12-08 11:25:51 -0600 --- moo/mooedit/mooeditor.c | 7 ++++++- moo/mooedit/mooeditprefs.c | 3 ++- moo/mooedit/mootextview.c | 6 +++++- moo/moopython/mooedit-pygtk.override | 14 ++++++++++++++ moo/moopython/mooeditor.defs | 12 ++++++++++++ 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/moo/mooedit/mooeditor.c b/moo/mooedit/mooeditor.c index d9056397..1f25978f 100644 --- a/moo/mooedit/mooeditor.c +++ b/moo/mooedit/mooeditor.c @@ -282,6 +282,7 @@ moo_editor_init (MooEditor *editor) g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) moo_edit_saver_unref); + /* XXX use regex */ editor->priv->prefs_notify = moo_prefs_notify_connect (MOO_EDIT_PREFS_PREFIX, MOO_PREFS_MATCH_PREFIX, @@ -333,7 +334,11 @@ moo_editor_set_property (GObject *object, case PROP_AUTOSAVE: editor->priv->autosave = g_value_get_boolean (value); g_object_notify (object, "autosave"); - g_message ("implement Editor::autosave"); + do { + static int c = 0; + if (!c++) + g_message ("implement Editor::autosave"); + } while (0); break; case PROP_AUTOSAVE_INTERVAL: diff --git a/moo/mooedit/mooeditprefs.c b/moo/mooedit/mooeditprefs.c index 1338442e..60d8a7f4 100644 --- a/moo/mooedit/mooeditprefs.c +++ b/moo/mooedit/mooeditprefs.c @@ -98,7 +98,8 @@ _moo_edit_init_settings (void) #define get_color(key) moo_prefs_get_color (MOO_EDIT_PREFS_PREFIX "/" key) #define get_enum(key) moo_prefs_get_enum (MOO_EDIT_PREFS_PREFIX "/" key) -void _moo_edit_apply_settings (MooEdit *edit) +void +_moo_edit_apply_settings (MooEdit *edit) { GtkTextView *text_view; MooTextView *moo_view; diff --git a/moo/mooedit/mootextview.c b/moo/mooedit/mootextview.c index 9523e108..9484c2f7 100644 --- a/moo/mooedit/mootextview.c +++ b/moo/mooedit/mootextview.c @@ -803,7 +803,11 @@ moo_text_view_set_property (GObject *object, break; case PROP_SHOW_LINE_NUMBERS: - g_message ("PROP_SHOW_LINE_NUMBERS: implement me"); + do { + static int c = 0; + if (!c++) + g_message ("PROP_SHOW_LINE_NUMBERS: implement me"); + } while (0); break; default: diff --git a/moo/moopython/mooedit-pygtk.override b/moo/moopython/mooedit-pygtk.override index 7ddd50bd..82e35983 100644 --- a/moo/moopython/mooedit-pygtk.override +++ b/moo/moopython/mooedit-pygtk.override @@ -120,6 +120,20 @@ _wrap_moo_editor_list_windows (PyObject *self) return result; } %% +override moo_editor_list_docs noargs +static PyObject * +_wrap_moo_editor_list_docs (PyObject *self) +{ + GSList *list; + PyObject *result; + + list = moo_editor_list_docs (MOO_EDITOR (pygobject_get (self))); + result = moo_object_slist_to_pyobject (list); + + g_slist_free (list); + return result; +} +%% override-attr MooLang.mime_types static PyObject * _wrap_moo_lang__get_mime_types (PyObject *self, G_GNUC_UNUSED void *closure) diff --git a/moo/moopython/mooeditor.defs b/moo/moopython/mooeditor.defs index 3108e370..1e788c84 100644 --- a/moo/moopython/mooeditor.defs +++ b/moo/moopython/mooeditor.defs @@ -106,6 +106,12 @@ (return-type "GSList*") ) +(define-method list_docs + (of-object "MooEditor") + (c-name "moo_editor_list_docs") + (return-type "GSList*") +) + (define-method close_window (of-object "MooEditor") (c-name "moo_editor_close_window") @@ -237,3 +243,9 @@ '("GError**" "error") ) ) + +(define-method prefs_page + (of-object "MooEditor") + (c-name "moo_edit_prefs_page_new") + (return-type "GtkWidget*") +)