| 60 static GtkWidget *pluglist; |
60 static GtkWidget *pluglist; |
| 61 static GtkWidget *plugtext; |
61 static GtkWidget *plugtext; |
| 62 static GtkWidget *plugwindow; |
62 static GtkWidget *plugwindow; |
| 63 |
63 |
| 64 static GtkWidget *config; |
64 static GtkWidget *config; |
| |
65 static guint confighandle = 0; |
| 65 |
66 |
| 66 /* --------------- Function Declarations --------------------- */ |
67 /* --------------- Function Declarations --------------------- */ |
| 67 |
68 |
| 68 void show_plugins (GtkWidget *, gpointer); |
69 void show_plugins (GtkWidget *, gpointer); |
| 69 void load_plugin (char *); |
70 void load_plugin (char *); |
| 421 gchar buffer[2048]; |
422 gchar buffer[2048]; |
| 422 guint text_len; |
423 guint text_len; |
| 423 void (*gaim_plugin_config)(); |
424 void (*gaim_plugin_config)(); |
| 424 char *error; |
425 char *error; |
| 425 |
426 |
| |
427 if (confighandle) |
| |
428 gtk_signal_disconnect(GTK_OBJECT(config), confighandle); |
| 426 text_len = gtk_text_get_length(GTK_TEXT(plugtext)); |
429 text_len = gtk_text_get_length(GTK_TEXT(plugtext)); |
| 427 gtk_text_set_point(GTK_TEXT(plugtext), 0); |
430 gtk_text_set_point(GTK_TEXT(plugtext), 0); |
| 428 gtk_text_forward_delete(GTK_TEXT(plugtext), text_len); |
431 gtk_text_forward_delete(GTK_TEXT(plugtext), text_len); |
| 429 |
432 |
| 430 g_snprintf(buffer, sizeof buffer, "%s\n%s", p->name, p->description); |
433 g_snprintf(buffer, sizeof buffer, "%s\n%s", p->name, p->description); |
| 431 gtk_text_insert(GTK_TEXT(plugtext), NULL, NULL, NULL, buffer, -1); |
434 gtk_text_insert(GTK_TEXT(plugtext), NULL, NULL, NULL, buffer, -1); |
| 432 |
435 |
| 433 gaim_plugin_config = dlsym(p->handle, "gaim_plugin_config"); |
436 gaim_plugin_config = dlsym(p->handle, "gaim_plugin_config"); |
| 434 if ((error = (char *)dlerror()) == NULL) { |
437 if ((error = (char *)dlerror()) == NULL) { |
| 435 gtk_signal_connect(GTK_OBJECT(config), "clicked", |
438 confighandle = gtk_signal_connect(GTK_OBJECT(config), "clicked", |
| 436 GTK_SIGNAL_FUNC(gaim_plugin_config), NULL); |
439 GTK_SIGNAL_FUNC(gaim_plugin_config), NULL); |
| 437 gtk_widget_set_sensitive(config, 1); |
440 gtk_widget_set_sensitive(config, 1); |
| 438 } else { |
441 } else { |
| |
442 confighandle = 0; |
| 439 gtk_widget_set_sensitive(config, 0); |
443 gtk_widget_set_sensitive(config, 0); |
| 440 } |
444 } |
| 441 } |
445 } |
| 442 |
446 |
| 443 void hide_plugins(GtkWidget *w, gpointer data) { |
447 void hide_plugins(GtkWidget *w, gpointer data) { |