Mercurial > pidgin
comparison src/plugins.c @ 139:c009c4f4ad02
[gaim-migrate @ 149]
Decided I wasn't going to implement a generic unload_plugin, and decided I
liked the plugin box interface, and decided to make that the only interface.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 19 Apr 2000 20:28:02 +0000 |
parents | e8ea1e2fdf0c |
children | fbabd28795d2 |
comparison
equal
deleted
inserted
replaced
138:e8ea1e2fdf0c | 139:c009c4f4ad02 |
---|---|
59 | 59 |
60 static GtkWidget *config; | 60 static GtkWidget *config; |
61 | 61 |
62 /* --------------- Function Declarations --------------------- */ | 62 /* --------------- Function Declarations --------------------- */ |
63 | 63 |
64 void load_plugin (GtkWidget *, gpointer); | |
65 void unload_plugin(GtkWidget *, gpointer); | |
66 void show_plugins (GtkWidget *, gpointer); | 64 void show_plugins (GtkWidget *, gpointer); |
67 | 65 |
68 void gaim_signal_connect (void *, enum gaim_event, void *, void *); | 66 void gaim_signal_connect (void *, enum gaim_event, void *, void *); |
69 void gaim_signal_disconnect(void *, enum gaim_event, void *); | 67 void gaim_signal_disconnect(void *, enum gaim_event, void *); |
70 | 68 |
71 static void destroy_plugins (GtkWidget *, gpointer); | 69 static void destroy_plugins (GtkWidget *, gpointer); |
70 static void load_plugin (GtkWidget *, gpointer); | |
72 static void load_which_plugin(GtkWidget *, gpointer); | 71 static void load_which_plugin(GtkWidget *, gpointer); |
73 static void unload (GtkWidget *, gpointer); | 72 static void unload (GtkWidget *, gpointer); |
74 static void list_clicked (GtkWidget *, struct gaim_plugin *); | 73 static void list_clicked (GtkWidget *, struct gaim_plugin *); |
75 static void update_show_plugins(); | 74 static void update_show_plugins(); |
76 static void hide_plugins (GtkWidget *, gpointer); | 75 static void hide_plugins (GtkWidget *, gpointer); |
81 if (plugin_dialog) | 80 if (plugin_dialog) |
82 gtk_widget_destroy(plugin_dialog); | 81 gtk_widget_destroy(plugin_dialog); |
83 plugin_dialog = NULL; | 82 plugin_dialog = NULL; |
84 } | 83 } |
85 | 84 |
86 void load_plugin(GtkWidget *w, gpointer data) | 85 static void load_plugin(GtkWidget *w, gpointer data) |
87 { | 86 { |
88 char *buf = g_malloc(BUF_LEN); | 87 char *buf = g_malloc(BUF_LEN); |
89 | 88 |
90 if (plugin_dialog) { | 89 if (plugin_dialog) { |
91 g_free(buf); | 90 g_free(buf); |
118 g_free(buf); | 117 g_free(buf); |
119 gtk_widget_show(plugin_dialog); | 118 gtk_widget_show(plugin_dialog); |
120 gdk_window_raise(plugin_dialog->window); | 119 gdk_window_raise(plugin_dialog->window); |
121 } | 120 } |
122 | 121 |
123 void load_which_plugin(GtkWidget *w, gpointer data) { | 122 static void load_which_plugin(GtkWidget *w, gpointer data) { |
124 struct gaim_plugin *plug; | 123 struct gaim_plugin *plug; |
125 void (*gaim_plugin_init)(); | 124 void (*gaim_plugin_init)(); |
126 char *(*cfunc)(); | 125 char *(*cfunc)(); |
127 char *error; | 126 char *error; |
128 | 127 |
166 plug->description = (*cfunc)(); | 165 plug->description = (*cfunc)(); |
167 else | 166 else |
168 plug->description = NULL; | 167 plug->description = NULL; |
169 | 168 |
170 update_show_plugins(); | 169 update_show_plugins(); |
171 } | |
172 | |
173 void unload_plugin(GtkWidget *w, gpointer data) { | |
174 /* FIXME */ | |
175 } | 170 } |
176 | 171 |
177 void show_plugins(GtkWidget *w, gpointer data) { | 172 void show_plugins(GtkWidget *w, gpointer data) { |
178 /* most of this code was shamelessly stolen from prefs.c */ | 173 /* most of this code was shamelessly stolen from prefs.c */ |
179 GtkWidget *page; | 174 GtkWidget *page; |