| 40 g_free(esc); |
40 g_free(esc); |
| 41 } |
41 } |
| 42 } |
42 } |
| 43 } |
43 } |
| 44 |
44 |
| 45 static gboolean |
45 #if 0 |
| 46 plugin_load(PurplePlugin *plugin) |
|
| 47 { |
|
| 48 purple_signal_connect(pidgin_blist_get_handle(), "drawing-tooltip", |
|
| 49 plugin, PURPLE_CALLBACK(append_to_tooltip), NULL); |
|
| 50 return TRUE; |
|
| 51 } |
|
| 52 |
|
| 53 static gboolean |
|
| 54 plugin_unload(PurplePlugin *plugin) |
|
| 55 { |
|
| 56 PurplePlugin *buddynote = NULL; |
|
| 57 |
|
| 58 buddynote = purple_plugins_find_with_id("core-plugin_pack-buddynote"); |
|
| 59 |
|
| 60 purple_plugin_unload(buddynote); |
|
| 61 |
|
| 62 return TRUE; |
|
| 63 } |
|
| 64 |
|
| 65 static PurplePluginInfo info = |
|
| 66 { |
|
| 67 PURPLE_PLUGIN_MAGIC, |
|
| 68 PURPLE_MAJOR_VERSION, /**< major version */ |
|
| 69 PURPLE_MINOR_VERSION, /**< minor version */ |
|
| 70 PURPLE_PLUGIN_STANDARD, /**< type */ |
|
| 71 PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ |
|
| 72 0, /**< flags */ |
|
| 73 NULL, /**< dependencies */ |
|
| 74 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
|
| 75 "gtkbuddynote", /**< id */ |
|
| 76 N_("Buddy Notes"), /**< name */ |
|
| 77 DISPLAY_VERSION, /**< version */ |
|
| 78 N_("Store notes on particular buddies."), /**< summary */ |
|
| 79 N_("Adds the option to store notes for buddies " |
|
| 80 "on your buddy list."), /**< description */ |
|
| 81 "Etan Reisner <deryni@pidgin.im>", /**< author */ |
|
| 82 PURPLE_WEBSITE, /**< homepage */ |
|
| 83 plugin_load, /**< load */ |
|
| 84 plugin_unload, /**< unload */ |
|
| 85 NULL, /**< destroy */ |
|
| 86 NULL, /**< ui_info */ |
|
| 87 NULL, /**< extra_info */ |
|
| 88 NULL, /**< prefs_info */ |
|
| 89 NULL, /**< actions */ |
|
| 90 |
|
| 91 /* padding */ |
|
| 92 NULL, |
|
| 93 NULL, |
|
| 94 NULL, |
|
| 95 NULL |
|
| 96 }; |
|
| 97 |
|
| 98 static gboolean |
46 static gboolean |
| 99 check_for_buddynote(gpointer data) |
47 check_for_buddynote(gpointer data) |
| 100 { |
48 { |
| 101 PurplePlugin *buddynote = NULL; |
49 PurplePlugin *buddynote = NULL; |
| 102 PurplePlugin *plugin = (PurplePlugin *)data; |
50 PurplePlugin *plugin = (PurplePlugin *)data; |
| 128 info.flags = PURPLE_PLUGIN_FLAG_INVISIBLE; |
76 info.flags = PURPLE_PLUGIN_FLAG_INVISIBLE; |
| 129 } |
77 } |
| 130 |
78 |
| 131 return FALSE; |
79 return FALSE; |
| 132 } |
80 } |
| |
81 #endif |
| 133 |
82 |
| 134 static void |
83 static PidginPluginInfo * |
| 135 init_plugin(PurplePlugin *plugin) |
84 plugin_query(GError **error) |
| 136 { |
85 { |
| 137 /* Use g_idle_add so that the rest of the plugins can get loaded |
86 const gchar * const authors[] = { |
| 138 * before we do our check. */ |
87 "Etan Reisner <deryni@pidgin.im>", |
| 139 g_idle_add(check_for_buddynote, plugin); |
88 NULL |
| |
89 }; |
| 140 |
90 |
| 141 info.dependencies = g_list_append(info.dependencies, |
91 const gchar * const dependencies[] = { |
| 142 "core-plugin_pack-buddynote"); |
92 "core-plugin_pack-buddynote", |
| |
93 NULL |
| |
94 }; |
| |
95 |
| |
96 return pidgin_plugin_info_new( |
| |
97 "id", "gtkbuddynote", |
| |
98 "name", N_("Buddy Note Tooltips"), |
| |
99 "version", DISPLAY_VERSION, |
| |
100 "category", N_("User interface"), |
| |
101 "summary", N_("Shows stored buddy notes on the buddy's tooltip."), |
| |
102 "description", N_("Shows stored buddy notes on the buddy's tooltip."), |
| |
103 "authors", authors, |
| |
104 "website", PURPLE_WEBSITE, |
| |
105 "abi-version", PURPLE_ABI_VERSION, |
| |
106 "dependencies", dependencies, |
| |
107 NULL |
| |
108 ); |
| 143 } |
109 } |
| 144 |
110 |
| 145 PURPLE_INIT_PLUGIN(gtkbuddynote, init_plugin, info) |
111 static gboolean |
| |
112 plugin_load(PurplePlugin *plugin, GError **error) |
| |
113 { |
| |
114 purple_signal_connect(pidgin_blist_get_handle(), "drawing-tooltip", |
| |
115 plugin, PURPLE_CALLBACK(append_to_tooltip), NULL); |
| |
116 return TRUE; |
| |
117 } |
| |
118 |
| |
119 static gboolean |
| |
120 plugin_unload(PurplePlugin *plugin, GError **error) |
| |
121 { |
| |
122 #if 0 |
| |
123 PurplePlugin *buddynote = NULL; |
| |
124 |
| |
125 buddynote = purple_plugins_find_with_id("core-plugin_pack-buddynote"); |
| |
126 purple_plugin_unload(buddynote); |
| |
127 #endif |
| |
128 |
| |
129 return TRUE; |
| |
130 } |
| |
131 |
| |
132 PURPLE_PLUGIN_INIT(gtkbuddynote, plugin_query, plugin_load, plugin_unload); |