Kaydet (Commit) 52e8b9f2 authored tarafından Nick Treleaven's avatar Nick Treleaven

Apply patch from blackdog to add "document-activate" plugin signal,

which is sent when switching notebook pages (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1816 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst ef1399e0
......@@ -25,6 +25,10 @@
Make utils_isbrace() and utils_is_opening_brace() take an
'include_angles' argument (to separate from editor_prefs).
Make 'Goto matching brace' keybinding include <> angle brackets.
* src/geanyobject.c, src/plugindata.h, src/geanyobject.h,
src/callbacks.c:
Apply patch from blackdog to add "document-activate" plugin signal,
which is sent when switching notebook pages (thanks).
2007-08-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -62,6 +62,8 @@
#include "project.h"
#include "navqueue.h"
#include "geanyobject.h"
#ifdef HAVE_VTE
# include "vte.h"
#endif
......@@ -781,6 +783,11 @@ on_notebook1_switch_page_after (GtkNotebook *notebook,
#ifdef HAVE_VTE
vte_cwd(doc_list[idx].file_name, FALSE);
#endif
if (geany_object)
{
g_signal_emit_by_name(geany_object, "document-activate", idx);
}
}
}
......
......@@ -107,6 +107,15 @@ static void create_signals(GObjectClass *g_object_class)
gtk_marshal_NONE__INT,
G_TYPE_NONE, 1,
G_TYPE_INT);
geany_object_signals[GCB_DOCUMENT_ACTIVATE] = g_signal_new (
"document-activate",
G_OBJECT_CLASS_TYPE (g_object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GeanyObjectClass, document_activate),
NULL, NULL,
gtk_marshal_NONE__INT,
G_TYPE_NONE, 1,
G_TYPE_INT);
}
......
......@@ -37,6 +37,7 @@ typedef enum
GCB_DOCUMENT_NEW,
GCB_DOCUMENT_OPEN,
GCB_DOCUMENT_SAVE,
GCB_DOCUMENT_ACTIVATE,
GCB_MAX
} GeanyCallbackId;
......@@ -69,6 +70,7 @@ struct _GeanyObjectClass
void (*document_new)(gint idx);
void (*document_open)(gint idx);
void (*document_save)(gint idx);
void (*document_activate)(gint idx);
};
GType geany_object_get_type (void);
......
......@@ -63,12 +63,15 @@
*
* "document-save"
* Sent when a file is saved.
*
* "document-activate"
* Sent when switching notebook pages.
*/
/* The API version should be incremented whenever any plugin data types below are
* modified. */
static const gint api_version = 13;
static const gint api_version = 14;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment