From 4a18fab6443faad22c63029247306a17f950e9ce Mon Sep 17 00:00:00 2001 From: naba Date: Sun, 24 Jun 2007 15:45:25 +0000 Subject: [PATCH] * configure.in: Bumped version to 2.1.4 (RC1 for 2.2.0). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * libanjuta/interfaces/libanjuta.idl: * plugins/document-manager/action-callbacks.c: (on_editor_command_complete_word_activate): * plugins/document-manager/plugin.c: (update_editor_ui_interface_items): * plugins/editor/text_editor.c: (iautocomplete_activate), (iautocomplete_iface_init): * plugins/sourceview/sourceview.c: (iassist_iface_init): Moved autocomplete() method away from IAnjutaEditorAssist into a new deprecated IAnjutaEditorAutocomplete. This restores scintilla autocomplete and does not crash with sourceview. Fixes Bug #449620 ?\027%G–?\027%@ The auto completion functionality not work. Also sets menuitem insensitive when hiding them. * plugins/debug-manager/disassemble.c: (dma_disassembly_iter_refresh): Fixed compiler warnings for incorrect printf types. git-svn-id: http://svn.gnome.org/svn/anjuta/trunk@3024 1dbfb86a-d425-0410-a06b-cb591aac69f6 --- ChangeLog | 23 ++++++ configure.in | 2 +- libanjuta/interfaces/libanjuta.idl | 37 ++++++--- plugins/debug-manager/disassemble.c | 6 +- plugins/document-manager/action-callbacks.c | 4 +- plugins/document-manager/plugin.c | 116 ++++++++++++++-------------- plugins/editor/text_editor.c | 17 ++-- plugins/sourceview/sourceview.c | 9 --- 8 files changed, 127 insertions(+), 87 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e4a17e1..844e1535 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2007-06-24 Naba Kumar + + * configure.in: Bumped version to 2.1.4 (RC1 for 2.2.0). + + * libanjuta/interfaces/libanjuta.idl: + * plugins/document-manager/action-callbacks.c: + (on_editor_command_complete_word_activate): + * plugins/document-manager/plugin.c: + (update_editor_ui_interface_items): + * plugins/editor/text_editor.c: (iautocomplete_activate), + (iautocomplete_iface_init): + * plugins/sourceview/sourceview.c: (iassist_iface_init): + + Moved autocomplete() method away from IAnjutaEditorAssist into + a new deprecated IAnjutaEditorAutocomplete. This restores scintilla + autocomplete and does not crash with sourceview. Fixes Bug #449620 + – The auto completion functionality not work. Also sets menuitem + insensitive when hiding them. + + * plugins/debug-manager/disassemble.c: + (dma_disassembly_iter_refresh): Fixed compiler warnings for incorrect + printf types. + 2007-06-22 Naba Kumar * pixmaps/anjuta_splash.png: Updated. diff --git a/configure.in b/configure.in index 6a919eab..b8bdf6de 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ AC_PREREQ(2.59) m4_define(anjuta_major_version, 2) m4_define(anjuta_minor_version, 1) -m4_define(anjuta_micro_version, 3) +m4_define(anjuta_micro_version, 4) m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version) AC_INIT(anjuta, anjuta_version, http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta) diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl index f5b2313e..8c2adba3 100644 --- a/libanjuta/interfaces/libanjuta.idl +++ b/libanjuta/interfaces/libanjuta.idl @@ -1382,6 +1382,32 @@ interface IAnjutaEditor } /** + * SECTION:ianjuta-editor-autocomplete + * @title: IAnjutaEditorAutocomplete + * @short_description: Editor autocomplete framework + * @see_also: + * @stability: Unstable + * @include: libanjuta/interfaces/ianjuta-editor-autocomplete.h + * + * This interface is deprecated in favour of IAnjutaEditorAssist and + * is only here for backwards compatibility. + */ + interface IAnjutaEditorAutocomplete + { + + /** + * ianjuta_editor_autocomplete_activate: + * @obj: Self + * @err: Error propagation and reporting + * + * Auto complete current word. This is a left over of old api for + * backward compatibility. It will be removed once we move to + * the new api using IAnjutaEditorAssist. + */ + void activate (); + } + + /** * SECTION:ianjuta-editor-assist * @title: IAnjutaEditorAssist * @short_description: Editor assistance framework @@ -1550,17 +1576,6 @@ interface IAnjutaEditor * list, including the the strings should be freed when done. */ List get_suggestions (const gchar *context); - - /** - * ianjuta_editor_edit_autocomplete: - * @obj: Self - * @err: Error propagation and reporting - * - * Auto complete current word. This is a left over of old api for - * backward compatibility. It will be removed once we move to - * the new api. - */ - void autocomplete (); } /** diff --git a/plugins/debug-manager/disassemble.c b/plugins/debug-manager/disassemble.c index 7f43c730..ce39c7c1 100644 --- a/plugins/debug-manager/disassemble.c +++ b/plugins/debug-manager/disassemble.c @@ -150,7 +150,7 @@ dma_disassembly_iter_refresh (DmaSparseIter *iter) gint line = -1; DmaDisassemblyBufferNode *node = (DmaDisassemblyBufferNode *)iter->node; - DEBUG_PRINT("iter_refresh iter->node %p (%x, %d), base %x offset %d", iter->node, iter->node != NULL ? iter->node->lower : 0, iter->node != NULL ? ((DmaDisassemblyBufferNode *)iter->node)->size : 0, iter->base, iter->offset); + DEBUG_PRINT("iter_refresh iter->node %p (%x, %d), base %lx offset %ld", iter->node, iter->node != NULL ? iter->node->lower : 0, iter->node != NULL ? ((DmaDisassemblyBufferNode *)iter->node)->size : 0, iter->base, iter->offset); if (iter->node != NULL) { /* Find line corresponding to base */ @@ -219,7 +219,7 @@ dma_disassembly_iter_refresh (DmaSparseIter *iter) } /* Try to reduce offset */ - DEBUG_PRINT("iter_refresh offset iter->node %p, base %x offset %d line %d line %d", iter->node, iter->base, iter->offset, iter->line, line); + DEBUG_PRINT("iter_refresh offset iter->node %p, base %lx offset %ld line %d line %d", iter->node, iter->base, iter->offset, iter->line, line); if (line != -1) { if (iter->offset > 0) @@ -329,7 +329,7 @@ dma_disassembly_iter_refresh (DmaSparseIter *iter) } /* Round offset */ - DEBUG_PRINT("iter_refresh round iter->node %p, base %x offset %d line %d line %d", iter->node, iter->base, iter->offset, iter->line, line); + DEBUG_PRINT("iter_refresh round iter->node %p, base %lx offset %ld line %d line %d", iter->node, iter->base, iter->offset, iter->line, line); if (iter->offset < 0) { gulong address; diff --git a/plugins/document-manager/action-callbacks.c b/plugins/document-manager/action-callbacks.c index 094bf7cc..0d7391a8 100644 --- a/plugins/document-manager/action-callbacks.c +++ b/plugins/document-manager/action-callbacks.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -520,7 +520,7 @@ on_editor_command_clear_activate (GtkAction * action, gpointer data) void on_editor_command_complete_word_activate (GtkAction * action, gpointer data) { - ianjuta_editor_assist_autocomplete (IANJUTA_EDITOR_ASSIST (get_current_editor(data)), NULL); + ianjuta_editor_autocomplete_activate (IANJUTA_EDITOR_AUTOCOMPLETE (get_current_editor(data)), NULL); } void on_editor_command_close_folds_all_activate (GtkAction * action, gpointer data) diff --git a/plugins/document-manager/plugin.c b/plugins/document-manager/plugin.c index 2fc7b25b..bcb9161c 100644 --- a/plugins/document-manager/plugin.c +++ b/plugins/document-manager/plugin.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -605,123 +605,127 @@ update_editor_ui_interface_items (AnjutaPlugin *plugin, IAnjutaEditor *editor) action = anjuta_ui_get_action (ui, "ActionGroupEditorStyle", "ActionMenuFormatStyle"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorSelection */ flag = IANJUTA_IS_EDITOR_SELECTION (editor); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionEditCut"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionEditCopy"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionEditPaste"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionEditClear"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorSelect", "ActionEditSelectAll"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorSelect", "ActionEditSelectToBrace"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorSelect", "ActionEditSelectBlock"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorConvert */ flag = IANJUTA_IS_EDITOR_CONVERT (editor); action = anjuta_ui_get_action (ui, "ActionGroupEditorTransform", "ActionEditMakeSelectionUppercase"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorTransform", "ActionEditMakeSelectionLowercase"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorLineMode */ flag = IANJUTA_IS_EDITOR_LINE_MODE (editor); action = anjuta_ui_get_action (ui, "ActionGroupEditorTransform", "ActionEditConvertCRLF"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorTransform", "ActionEditConvertLF"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorTransform", "ActionEditConvertCR"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorTransform", "ActionEditConvertEOL"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorView */ flag = IANJUTA_IS_EDITOR_VIEW (editor); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionViewEditorAddView"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionViewEditorRemoveView"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); - /* IAnjutaEditorAssist */ - flag = IANJUTA_IS_EDITOR_ASSIST (editor); + /* IAnjutaEditorAutocomplete */ + flag = IANJUTA_IS_EDITOR_AUTOCOMPLETE (editor); action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit", "ActionEditAutocomplete"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorFolds */ - flag = IANJUTA_IS_EDITOR_FOLDS(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorFormat", - "ActionFormatFoldCloseAll"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); - - flag = IANJUTA_IS_EDITOR_FOLDS(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorFormat", - "ActionFormatFoldOpenAll"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); - - flag = IANJUTA_IS_EDITOR_FOLDS(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorFormat", - "ActionFormatFoldToggle"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); - - flag = IANJUTA_IS_EDITOR_FOLDS(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorView", - "ActionViewEditorFolds"); - g_object_set (G_OBJECT (action), "visible", flag, NULL); + flag = IANJUTA_IS_EDITOR_FOLDS (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorFormat", + "ActionFormatFoldCloseAll"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); + + flag = IANJUTA_IS_EDITOR_FOLDS (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorFormat", + "ActionFormatFoldOpenAll"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); + + flag = IANJUTA_IS_EDITOR_FOLDS (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorFormat", + "ActionFormatFoldToggle"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); + + flag = IANJUTA_IS_EDITOR_FOLDS (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorView", + "ActionViewEditorFolds"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorComment */ - - flag = IANJUTA_IS_EDITOR_COMMENT(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorComment", "ActionMenuEditComment"); - g_object_set(G_OBJECT (action), "visible", flag, NULL); + flag = IANJUTA_IS_EDITOR_COMMENT (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorComment", + "ActionMenuEditComment"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorZoom */ - - flag = IANJUTA_IS_EDITOR_ZOOM(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorZoom", "ActionViewEditorZoomIn"); - g_object_set(G_OBJECT (action), "visible", flag, NULL); - action = anjuta_ui_get_action(ui, "ActionGroupEditorZoom", "ActionViewEditorZoomOut"); - g_object_set(G_OBJECT (action), "visible", flag, NULL); + flag = IANJUTA_IS_EDITOR_ZOOM (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorZoom", + "ActionViewEditorZoomIn"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); + action = anjuta_ui_get_action (ui, "ActionGroupEditorZoom", + "ActionViewEditorZoomOut"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); /* IAnjutaEditorGoto */ - flag = IANJUTA_IS_EDITOR_GOTO(editor); - action = anjuta_ui_get_action(ui, "ActionGroupEditorNavigate", "ActionEditGotoBlockStart"); - g_object_set(G_OBJECT (action), "visible", flag, NULL); - action = anjuta_ui_get_action(ui, "ActionGroupEditorNavigate", "ActionEditGotoBlockEnd"); - g_object_set(G_OBJECT (action), "visible", flag, NULL); - action = anjuta_ui_get_action(ui, "ActionGroupEditorNavigate", "ActionEditGotoMatchingBrace"); - g_object_set(G_OBJECT (action), "visible", flag, NULL); + flag = IANJUTA_IS_EDITOR_GOTO (editor); + action = anjuta_ui_get_action (ui, "ActionGroupEditorNavigate", + "ActionEditGotoBlockStart"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); + action = anjuta_ui_get_action (ui, "ActionGroupEditorNavigate", + "ActionEditGotoBlockEnd"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); + action = anjuta_ui_get_action (ui, "ActionGroupEditorNavigate", + "ActionEditGotoMatchingBrace"); + g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL); } static void diff --git a/plugins/editor/text_editor.c b/plugins/editor/text_editor.c index e6d8ab1a..e353ce10 100644 --- a/plugins/editor/text_editor.c +++ b/plugins/editor/text_editor.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -2875,15 +2875,22 @@ ilinemode_iface_init (IAnjutaEditorLineModeIface *iface) iface->fix = ilinemode_fix; } -/* IAnjutaEditorAssist implementation */ -#if 0 +/* IAnjutaEditorAutocomplete implementation */ static void -iassist_autocomplete(IAnjutaEditorAssist* te, GError** ee) +iautocomplete_activate (IAnjutaEditorAutocomplete* te, GError** ee) { text_editor_command(TEXT_EDITOR(te), ANE_COMPLETEWORD, 0, 0); } static void +iautocomplete_iface_init(IAnjutaEditorAutocompleteIface* iface) +{ + iface->activate = iautocomplete_activate; +} + +/* IAnjutaEditorAssist implementation */ +#if 0 +static void iassist_add_trigger (IAnjutaEditorAssist* iassist, const gchar* trigger, IAnjutaEditorAssistContextParser context_parser, GError **err) { @@ -3386,7 +3393,7 @@ ANJUTA_TYPE_ADD_INTERFACE(itext_editor, IANJUTA_TYPE_EDITOR); ANJUTA_TYPE_ADD_INTERFACE(ilinemode, IANJUTA_TYPE_EDITOR_LINE_MODE); ANJUTA_TYPE_ADD_INTERFACE(iselection, IANJUTA_TYPE_EDITOR_SELECTION); ANJUTA_TYPE_ADD_INTERFACE(iconvert, IANJUTA_TYPE_EDITOR_CONVERT); -//ANJUTA_TYPE_ADD_INTERFACE(iassist, IANJUTA_TYPE_EDITOR_ASSIST); +ANJUTA_TYPE_ADD_INTERFACE(iautocomplete, IANJUTA_TYPE_EDITOR_AUTOCOMPLETE); ANJUTA_TYPE_ADD_INTERFACE(ilanguage, IANJUTA_TYPE_EDITOR_LANGUAGE); ANJUTA_TYPE_ADD_INTERFACE(iview, IANJUTA_TYPE_EDITOR_VIEW); ANJUTA_TYPE_ADD_INTERFACE(ifolds, IANJUTA_TYPE_EDITOR_FOLDS); diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c index f97655fa..c96ea5a1 100644 --- a/plugins/sourceview/sourceview.c +++ b/plugins/sourceview/sourceview.c @@ -1852,14 +1852,6 @@ iassist_remove_trigger (IAnjutaEditorAssist* iassist, const gchar* trigger, GErr } } -/* Deprecated... */ -static void -iassist_autocomplete (IAnjutaEditorAssist* iassist, GError **err) -{ - Sourceview* sv = ANJUTA_SOURCEVIEW(iassist); - DEBUG_PRINT("Called Assist->Autocomplete which is deprecated"); -} - static GList* iassist_get_suggestions (IAnjutaEditorAssist *iassist, const gchar *context, GError **err) { @@ -1916,7 +1908,6 @@ iassist_react (IAnjutaEditorAssist *iassist, gint selection, static void iassist_iface_init(IAnjutaEditorAssistIface* iface) { - iface->autocomplete = iassist_autocomplete; iface->add_trigger = iassist_add_trigger; iface->remove_trigger = iassist_remove_trigger; iface->suggest = iassist_suggest; -- 2.11.4.GIT