Revision: 2225 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2225&view=re... Author: cesspit Date: 2011-10-03 20:04:36 +0000 (Mon, 03 Oct 2011) Log Message: ----------- debugger: calltip fixes
Modified Paths: -------------- trunk/geany-plugins/debugger/src/callbacks.c trunk/geany-plugins/debugger/src/callbacks.h trunk/geany-plugins/debugger/src/plugin.c
Modified: trunk/geany-plugins/debugger/src/callbacks.c =================================================================== --- trunk/geany-plugins/debugger/src/callbacks.c 2011-10-03 16:46:34 UTC (rev 2224) +++ trunk/geany-plugins/debugger/src/callbacks.c 2011-10-03 20:04:36 UTC (rev 2225) @@ -129,19 +129,11 @@ }
/* - * Occures on new document creating - */ -void on_document_new(GObject *obj, GeanyDocument *doc, gpointer user_data) -{ -} - -/* * Occures on document opening. * Used to set breaks markers */ void on_document_open(GObject *obj, GeanyDocument *doc, gpointer user_data) { - const gchar* file = DOC_FILENAME(doc); /*set markers*/ markers_set_for_document(doc->editor->sci);
@@ -152,7 +144,7 @@ scintilla_send_message(doc->editor->sci, SCI_CALLTIPUSESTYLE, 20, (long)NULL);
/* set breakpoint and frame markers */ - set_markers_for_file(file); + set_markers_for_file(DOC_FILENAME(doc));
/* if debug is active - tell the debug module that a file was opened */ if (DBS_IDLE != debug_get_state()) @@ -205,7 +197,7 @@
if (word->len) { - gchar *calltip = NULL;//debug_get_calltip_for_expression(word->str); + gchar *calltip = debug_get_calltip_for_expression(word->str); if (calltip) { scintilla_send_message (editor->sci, SCI_CALLTIPSHOW, nt->position, (long)calltip);
Modified: trunk/geany-plugins/debugger/src/callbacks.h =================================================================== --- trunk/geany-plugins/debugger/src/callbacks.h 2011-10-03 16:46:34 UTC (rev 2224) +++ trunk/geany-plugins/debugger/src/callbacks.h 2011-10-03 20:04:36 UTC (rev 2225) @@ -22,6 +22,5 @@ void on_document_open(GObject *obj, GeanyDocument *doc, gpointer user_data); void on_document_save(GObject *obj, GeanyDocument *doc, gpointer user_data); void on_document_before_save(GObject *obj, GeanyDocument *doc, gpointer user_data); -void on_document_new(GObject *obj, GeanyDocument *doc, gpointer user_data); gboolean on_editor_notify(GObject *object, GeanyEditor *editor, SCNotification *nt, gpointer data); gboolean keys_callback(guint key_id);
Modified: trunk/geany-plugins/debugger/src/plugin.c =================================================================== --- trunk/geany-plugins/debugger/src/plugin.c 2011-10-03 16:46:34 UTC (rev 2224) +++ trunk/geany-plugins/debugger/src/plugin.c 2011-10-03 20:04:36 UTC (rev 2225) @@ -70,7 +70,6 @@ { "document_open", (GCallback) &on_document_open, FALSE, NULL }, { "document_save", (GCallback) &on_document_save, FALSE, NULL }, { "document_before_save", (GCallback) &on_document_before_save, FALSE, NULL }, - { "document_new", (GCallback) &on_document_new, FALSE, NULL }, { "project_open", (GCallback) &config_on_project_open, FALSE, NULL }, { "project_close", (GCallback) &config_on_project_close, FALSE, NULL }, { "project_save", (GCallback) &config_on_project_save, FALSE, NULL }, @@ -138,6 +137,14 @@ config_set_debug_store( config_get_save_to_project() && geany_data->app->project ? DEBUG_STORE_PROJECT : DEBUG_STORE_PLUGIN ); + + /* set calltips for all currently opened documents */ + int i; + foreach_document(i) + { + scintilla_send_message(document_index(i)->editor->sci, SCI_SETMOUSEDWELLTIME, 500, 0); + scintilla_send_message(document_index(i)->editor->sci, SCI_CALLTIPUSESTYLE, 20, (long)NULL); + } }
/* Called by Geany to show the plugin's configure dialog. This function is always called after
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.