pidgin/plugins/sendbutton.c

branch
soc.2013.gobjectification.plugins
changeset 36758
deee438dc431
parent 34655
6a939719ea98
equal deleted inserted replaced
36757:2e04586cf6e8 36758:deee438dc431
112 if (send_button == NULL) { 112 if (send_button == NULL) {
113 create_send_button_pidgin(gtkconv); 113 create_send_button_pidgin(gtkconv);
114 } 114 }
115 } 115 }
116 116
117 static PidginPluginInfo *
118 plugin_query(GError **error)
119 {
120 const gchar * const authors[] = {
121 "Etan Reisner <deryni@pidgin.im>",
122 NULL
123 };
124
125 return pidgin_plugin_info_new(
126 "id", "gtksendbutton",
127 "name", N_("Send Button"),
128 "version", DISPLAY_VERSION,
129 "category", N_("User interface"),
130 "summary", N_("Conversation Window Send Button."),
131 "description", N_("Adds a Send button to the entry area of the "
132 "conversation window. Intended for use when no "
133 "physical keyboard is present."),
134 "authors", authors,
135 "website", PURPLE_WEBSITE,
136 "abi-version", PURPLE_ABI_VERSION,
137 NULL
138 );
139 }
140
117 static gboolean 141 static gboolean
118 plugin_load(PurplePlugin *plugin) 142 plugin_load(PurplePlugin *plugin, GError **error)
119 { 143 {
120 GList *convs = purple_conversations_get_all(); 144 GList *convs = purple_conversations_get_all();
121 void *gtk_conv_handle = pidgin_conversations_get_handle(); 145 void *gtk_conv_handle = pidgin_conversations_get_handle();
122 146
123 purple_signal_connect(gtk_conv_handle, "conversation-displayed", plugin, 147 purple_signal_connect(gtk_conv_handle, "conversation-displayed", plugin,
141 165
142 return TRUE; 166 return TRUE;
143 } 167 }
144 168
145 static gboolean 169 static gboolean
146 plugin_unload(PurplePlugin *plugin) 170 plugin_unload(PurplePlugin *plugin, GError **error)
147 { 171 {
148 GList *convs = purple_conversations_get_all(); 172 GList *convs = purple_conversations_get_all();
149 173
150 while (convs) { 174 while (convs) {
151 PurpleConversation *conv = (PurpleConversation *)convs->data; 175 PurpleConversation *conv = (PurpleConversation *)convs->data;
159 } 183 }
160 184
161 return TRUE; 185 return TRUE;
162 } 186 }
163 187
164 static PurplePluginInfo info = 188 PURPLE_PLUGIN_INIT(sendbutton, plugin_query, plugin_load, plugin_unload);
165 {
166 PURPLE_PLUGIN_MAGIC,
167 PURPLE_MAJOR_VERSION, /**< major version */
168 PURPLE_MINOR_VERSION, /**< minor version */
169 PURPLE_PLUGIN_STANDARD, /**< type */
170 PIDGIN_PLUGIN_TYPE, /**< ui_requirement */
171 0, /**< flags */
172 NULL, /**< dependencies */
173 PURPLE_PRIORITY_DEFAULT, /**< priority */
174
175 "gtksendbutton", /**< id */
176 N_("Send Button"), /**< name */
177 DISPLAY_VERSION, /**< version */
178 N_("Conversation Window Send Button."), /**< summary */
179 N_("Adds a Send button to the entry area of "
180 "the conversation window. Intended for use "
181 "when no physical keyboard is present."), /**< description */
182 "Etan Reisner <deryni@pidgin.im>", /**< author */
183 PURPLE_WEBSITE, /**< homepage */
184 plugin_load, /**< load */
185 plugin_unload, /**< unload */
186 NULL, /**< destroy */
187 NULL, /**< ui_info */
188 NULL, /**< extra_info */
189 NULL, /**< prefs_info */
190 NULL, /**< actions */
191
192 /* padding */
193 NULL,
194 NULL,
195 NULL,
196 NULL
197 };
198
199 static void
200 init_plugin(PurplePlugin *plugin)
201 {
202 }
203
204 PURPLE_INIT_PLUGIN(sendbutton, init_plugin, info)

mercurial