Revision 2821
| src/sylpheed-marshal.list (revision 2821) | ||
|---|---|---|
| 1 | 1 |
VOID:POINTER |
| 2 | 2 |
VOID:INT,POINTER |
| 3 |
VOID:POINTER,POINTER,STRING,STRING |
|
| 3 |
VOID:POINTER,POINTER,STRING,STRING,POINTER |
|
| src/textview.c (revision 2821) | ||
|---|---|---|
| 2048 | 2048 |
|
| 2049 | 2049 |
finish: |
| 2050 | 2050 |
syl_plugin_signal_emit("textview-menu-popup", menu,
|
| 2051 |
GTK_TEXT_VIEW(widget), uri ? uri->uri : NULL, |
|
| 2052 |
selected_text); |
|
| 2051 |
GTK_TEXT_VIEW(widget), |
|
| 2052 |
uri ? uri->uri : NULL, |
|
| 2053 |
selected_text, |
|
| 2054 |
textview->messageview->msginfo); |
|
| 2053 | 2055 |
g_free(selected_text); |
| 2054 | 2056 |
} |
| 2055 | 2057 |
|
| src/plugin.c (revision 2821) | ||
|---|---|---|
| 164 | 164 |
G_STRUCT_OFFSET(SylPluginClass, |
| 165 | 165 |
textview_menu_popup), |
| 166 | 166 |
NULL, NULL, |
| 167 |
sylpheed_marshal_VOID__POINTER_POINTER_STRING_STRING, |
|
| 167 |
sylpheed_marshal_VOID__POINTER_POINTER_STRING_STRING_POINTER,
|
|
| 168 | 168 |
G_TYPE_NONE, |
| 169 |
4,
|
|
| 169 |
5,
|
|
| 170 | 170 |
G_TYPE_POINTER, |
| 171 | 171 |
G_TYPE_POINTER, |
| 172 | 172 |
G_TYPE_STRING, |
| 173 |
G_TYPE_STRING); |
|
| 173 |
G_TYPE_STRING, |
|
| 174 |
G_TYPE_POINTER); |
|
| 174 | 175 |
} |
| 175 | 176 |
|
| 176 | 177 |
void syl_plugin_signal_connect(const gchar *name, GCallback callback, |
| src/plugin.h (revision 2821) | ||
|---|---|---|
| 69 | 69 |
GtkMenu *menu, |
| 70 | 70 |
GtkTextView *textview, |
| 71 | 71 |
const gchar *uri, |
| 72 |
const gchar *selected_text); |
|
| 72 |
const gchar *selected_text, |
|
| 73 |
MsgInfo *msginfo); |
|
| 73 | 74 |
}; |
| 74 | 75 |
|
| 75 | 76 |
struct _SylPluginInfo |
| plugin/test/test.c (revision 2821) | ||
|---|---|---|
| 24 | 24 |
#include "plugin.h" |
| 25 | 25 |
#include "test.h" |
| 26 | 26 |
#include "folder.h" |
| 27 |
#include "procmsg.h" |
|
| 27 | 28 |
|
| 28 | 29 |
static SylPluginInfo info = {
|
| 29 | 30 |
"Test Plugin", |
| ... | ... | |
| 43 | 44 |
static void textview_menu_popup_cb(GObject *obj, GtkMenu *menu, |
| 44 | 45 |
GtkTextView *textview, |
| 45 | 46 |
const gchar *uri, |
| 46 |
const gchar *selected_text); |
|
| 47 |
const gchar *selected_text, |
|
| 48 |
MsgInfo *msginfo); |
|
| 47 | 49 |
|
| 48 | 50 |
static void menu_selected_cb(void); |
| 49 | 51 |
|
| ... | ... | |
| 162 | 164 |
static void textview_menu_popup_cb(GObject *obj, GtkMenu *menu, |
| 163 | 165 |
GtkTextView *textview, |
| 164 | 166 |
const gchar *uri, |
| 165 |
const gchar *selected_text) |
|
| 167 |
const gchar *selected_text, |
|
| 168 |
MsgInfo *msginfo) |
|
| 166 | 169 |
{
|
| 167 | 170 |
GtkWidget *separator, *menuitem; |
| 168 | 171 |
|
| 169 | 172 |
g_print("test: %p: textview menu popup\n", obj);
|
| 170 | 173 |
g_print("test: %p: uri: %s, text: %s\n", obj, uri ? uri : "(none)",
|
| 171 | 174 |
selected_text ? selected_text : "(none)"); |
| 175 |
g_print("test: %p: msg: %s\n", obj,
|
|
| 176 |
msginfo && msginfo->subject ? msginfo->subject : ""); |
|
| 172 | 177 |
|
| 173 | 178 |
separator = gtk_separator_menu_item_new(); |
| 174 | 179 |
gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator); |
| PLUGIN.txt (revision 2821) | ||
|---|---|---|
| 173 | 173 |
GtkMenu *menu, |
| 174 | 174 |
GtkTextView *textview, |
| 175 | 175 |
const gchar *uri, |
| 176 |
const gchar *selected_text); |
|
| 176 |
const gchar *selected_text, |
|
| 177 |
MsgInfo *msginfo); |
|
| 177 | 178 |
|
| 178 | 179 |
Emitted on popup of the context menu of TextView. |
| 179 | 180 |
You can add any menu items to the passed GtkMenu. |
| 180 |
The menu object will be destroyed when closed. |
|
| 181 |
The menu object will be created on open and destroyed on close, so menu items |
|
| 182 |
must be added each time. |
|
| 181 | 183 |
|
| 182 | 184 |
menu: context menu object |
| 183 | 185 |
textview: GtkTextView object |
| 184 | 186 |
uri: URI string if the menu popups on an URI |
| 185 | 187 |
selected_text: string if a string is selected on the text view |
| 188 |
msginfo: the MsgInfo message object displayed in the text view |
|
| 186 | 189 |
------------------------------------------------------------------------- |
| 187 | 190 |
|
| 188 | 191 |
* libsylph-0 |
| ChangeLog (revision 2821) | ||
|---|---|---|
| 1 | 1 |
2011-01-24 |
| 2 | 2 |
|
| 3 |
* version 3.1.0rc |
|
| 4 |
|
|
| 5 |
2011-01-24 |
|
| 6 |
|
|
| 7 |
* src/sylpheed-marshal.list |
|
| 8 |
src/textview.c |
|
| 9 |
src/plugin.[ch] |
|
| 10 |
plugin/test/test.c: added MsgInfo argument to "textview-menu-popup" |
|
| 11 |
signal. |
|
| 12 |
|
|
| 13 |
2011-01-24 |
|
| 14 |
|
|
| 3 | 15 |
* src/summaryview.c: fixed warnings about non-string literal format. |
| 4 | 16 |
|
| 5 | 17 |
2011-01-21 |
| PLUGIN.ja.txt (revision 2821) | ||
|---|---|---|
| 175 | 175 |
GtkMenu *menu, |
| 176 | 176 |
GtkTextView *textview, |
| 177 | 177 |
const gchar *uri, |
| 178 |
const gchar *selected_text); |
|
| 178 |
const gchar *selected_text, |
|
| 179 |
MsgInfo *msginfo); |
|
| 179 | 180 |
|
| 180 | 181 |
TextView でコンテキストメニューをポップアップするときに発行される |
| 181 | 182 |
シグナルです。ここで渡された GtkMenu に対して任意のメニュー項目を |
| 182 | 183 |
追加することができます。 |
| 183 |
メニューオブジェクトは閉じられると自動的に破棄されます。 |
|
| 184 |
メニューオブジェクトはメニューを開くたびに作成され、閉じられると自動的に |
|
| 185 |
破棄されるため、毎回メニュー項目を追加する必要があります。 |
|
| 184 | 186 |
|
| 185 | 187 |
menu: コンテキストメニューオブジェクト |
| 186 | 188 |
textview: GtkTextView オブジェクト |
| 187 | 189 |
uri: URI の上でメニューを表示した場合その URI 文字列 |
| 188 | 190 |
selected_text: テキストビューでテキストが選択されている場合、その文字列 |
| 191 |
msginfo: テキストビューで表示されているメッセージの MsgInfo オブジェクト |
|
| 189 | 192 |
------------------------------------------------------------------------- |
| 190 | 193 |
|
| 191 | 194 |
* libsylph-0 |
Also available in: Unified diff