Tue, 25 Oct 2005 07:02:50 +0000
[gaim-migrate @ 14104]
patch from Kevin Stange to make the preferences button insensitive when the plugins window is initially created.
committer: Gary Kramlich <grim@reaperworld.com>
| 5205 | 1 | /** |
|
6927
528988ef2781
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
2 | * @file gtkplugin.c GTK+ Plugins support |
|
528988ef2781
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
3 | * @ingroup gtkui |
| 5205 | 4 | * |
| 5 | * gaim | |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
|
6927
528988ef2781
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
10 | * |
| 5205 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 11740 | 25 | #include "internal.h" |
| 9791 | 26 | #include "gtkgaim.h" |
| 5205 | 27 | #include "gtkplugin.h" |
|
5981
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
28 | #include "debug.h" |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
29 | #include "prefs.h" |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
30 | |
| 5205 | 31 | #include <string.h> |
| 32 | ||
| 11740 | 33 | static GtkWidget *plugin_dialog = NULL; |
| 34 | static GtkWidget *plugin_details = NULL; | |
| 35 | static GtkWidget *pref_button = NULL; | |
| 11781 | 36 | static GHashTable *plugin_pref_dialogs = NULL; |
| 11747 | 37 | |
| 5205 | 38 | GtkWidget * |
| 39 | gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin) | |
| 40 | { | |
| 41 | GaimGtkPluginUiInfo *ui_info; | |
| 42 | ||
| 43 | g_return_val_if_fail(plugin != NULL, NULL); | |
| 44 | g_return_val_if_fail(GAIM_IS_GTK_PLUGIN(plugin), NULL); | |
| 45 | ||
| 46 | if (plugin->info->ui_info == NULL) | |
| 47 | return NULL; | |
| 48 | ||
| 49 | ui_info = GAIM_GTK_PLUGIN_UI_INFO(plugin); | |
| 50 | ||
| 51 | if (ui_info->get_config_frame == NULL) | |
| 52 | return NULL; | |
| 53 | ||
| 54 | return ui_info->get_config_frame(plugin); | |
| 55 | } | |
|
5981
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
56 | |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
57 | void |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
58 | gaim_gtk_plugins_save(void) |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
59 | { |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
60 | GList *pl; |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
61 | GList *files = NULL; |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
62 | GaimPlugin *p; |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
63 | |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
64 | for (pl = gaim_plugins_get_loaded(); pl != NULL; pl = pl->next) { |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
65 | p = pl->data; |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
66 | |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
67 | if (p->info->type != GAIM_PLUGIN_PROTOCOL && |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
68 | p->info->type != GAIM_PLUGIN_LOADER) { |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
69 | |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
70 | files = g_list_append(files, p->path); |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
71 | } |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
72 | } |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
73 | |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
74 | gaim_prefs_set_string_list("/gaim/gtk/plugins/loaded", files); |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
75 | g_list_free(files); |
|
c91ece01ad12
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
76 | } |
| 11740 | 77 | |
| 78 | static void | |
| 79 | update_plugin_list(void *data) | |
| 80 | { | |
| 81 | GtkListStore *ls = GTK_LIST_STORE(data); | |
| 82 | GtkTreeIter iter; | |
| 83 | GList *probes; | |
| 84 | GaimPlugin *plug; | |
| 85 | ||
| 86 | gtk_list_store_clear(ls); | |
| 87 | gaim_plugins_probe(GAIM_PLUGIN_EXT); | |
| 88 | ||
| 89 | for (probes = gaim_plugins_get_all(); | |
| 90 | probes != NULL; | |
| 91 | probes = probes->next) | |
| 92 | { | |
| 93 | char *desc; | |
| 94 | plug = probes->data; | |
| 95 | ||
| 96 | if (plug->info->type != GAIM_PLUGIN_STANDARD || | |
| 97 | (plug->info->flags & GAIM_PLUGIN_FLAG_INVISIBLE)) | |
| 98 | { | |
| 99 | continue; | |
| 100 | } | |
| 101 | ||
| 102 | gtk_list_store_append (ls, &iter); | |
| 103 | desc = g_strdup_printf("<b>%s</b> %s\n%s", plug->info->name ? _(plug->info->name) : g_basename(plug->path), | |
| 104 | plug->info->version, | |
| 105 | plug->info->summary); | |
| 106 | gtk_list_store_set(ls, &iter, | |
| 107 | 0, gaim_plugin_is_loaded(plug), | |
| 108 | 1, desc, | |
| 109 | 2, plug, -1); | |
| 110 | g_free(desc); | |
| 111 | } | |
| 112 | } | |
| 113 | ||
| 11781 | 114 | static void pref_dialog_response_cb(GtkWidget *d, int response, GaimPlugin *plug) |
| 115 | { | |
| 116 | switch (response) { | |
| 117 | case GTK_RESPONSE_CLOSE: | |
| 118 | case GTK_RESPONSE_DELETE_EVENT: | |
| 119 | g_hash_table_remove(plugin_pref_dialogs, plug); | |
| 120 | if (g_hash_table_size(plugin_pref_dialogs) == 0) { | |
| 121 | g_hash_table_destroy(plugin_pref_dialogs); | |
| 122 | plugin_pref_dialogs = NULL; | |
| 123 | } | |
| 124 | gtk_widget_destroy(d); | |
| 125 | break; | |
| 126 | } | |
| 127 | } | |
| 128 | ||
| 11740 | 129 | static void plugin_load (GtkCellRendererToggle *cell, gchar *pth, gpointer data) |
| 130 | { | |
| 131 | GtkTreeModel *model = (GtkTreeModel *)data; | |
| 132 | GtkTreeIter iter; | |
| 133 | GtkTreePath *path = gtk_tree_path_new_from_string(pth); | |
| 134 | GaimPlugin *plug; | |
| 135 | gchar buf[1024]; | |
| 136 | gchar *name = NULL, *description = NULL; | |
| 11781 | 137 | GtkWidget *dialog = NULL; |
| 11740 | 138 | |
| 139 | GdkCursor *wait = gdk_cursor_new (GDK_WATCH); | |
| 11742 | 140 | gdk_window_set_cursor(plugin_dialog->window, wait); |
| 11740 | 141 | gdk_cursor_unref(wait); |
| 142 | ||
| 143 | gtk_tree_model_get_iter (model, &iter, path); | |
| 144 | gtk_tree_model_get (model, &iter, 2, &plug, -1); | |
| 145 | ||
| 146 | if (!gaim_plugin_is_loaded(plug)) | |
| 147 | gaim_plugin_load(plug); | |
| 11781 | 148 | else { |
| 149 | if (plugin_pref_dialogs != NULL && | |
| 150 | (dialog = g_hash_table_lookup(plugin_pref_dialogs, plug))) | |
| 151 | pref_dialog_response_cb(dialog, GTK_RESPONSE_DELETE_EVENT, plug); | |
| 11740 | 152 | gaim_plugin_unload(plug); |
| 11781 | 153 | } |
| 11740 | 154 | |
| 11781 | 155 | gtk_widget_set_sensitive(pref_button, |
| 156 | plug->info->ui_info != NULL && | |
| 157 | GAIM_GTK_PLUGIN_UI_INFO(plug)->get_config_frame != NULL && | |
| 158 | gaim_plugin_is_loaded(plug)); | |
| 11740 | 159 | |
| 11742 | 160 | gdk_window_set_cursor(plugin_dialog->window, NULL); |
| 11740 | 161 | |
| 162 | name = g_markup_escape_text(_(plug->info->name), -1); | |
| 163 | description = g_markup_escape_text(_(plug->info->description), -1); | |
| 11781 | 164 | |
| 11740 | 165 | if (plug->error != NULL) { |
| 166 | gchar *error = g_markup_escape_text(plug->error, -1); | |
| 167 | gchar *desc; | |
| 168 | g_snprintf(buf, sizeof(buf), | |
| 169 | "<span size=\"larger\">%s %s</span>\n\n" | |
| 170 | "<span weight=\"bold\" color=\"red\">%s</span>\n\n" | |
| 171 | "%s", | |
| 172 | name, plug->info->version, error, description); | |
| 173 | desc = g_strdup_printf("<b>%s</b> %s\n<span weight=\"bold\" color=\"red\"%s</span>", | |
| 174 | plug->info->name, plug->info->version, error); | |
| 11781 | 175 | gtk_list_store_set (GTK_LIST_STORE (model), &iter, |
| 11740 | 176 | 1, desc, |
| 177 | -1); | |
| 178 | g_free(desc); | |
| 179 | g_free(error); | |
| 180 | } else { | |
| 181 | g_snprintf(buf, sizeof(buf), | |
| 182 | "<span size=\"larger\">%s %s</span>\n\n%s", | |
| 183 | name, plug->info->version, description); | |
| 184 | } | |
| 185 | g_free(name); | |
| 186 | g_free(description); | |
| 187 | ||
| 188 | ||
| 189 | gtk_list_store_set (GTK_LIST_STORE (model), &iter, | |
| 190 | 0, gaim_plugin_is_loaded(plug), | |
| 191 | -1); | |
| 192 | ||
| 193 | gtk_label_set_markup(GTK_LABEL(plugin_details), buf); | |
| 194 | gtk_tree_path_free(path); | |
| 195 | gaim_gtk_plugins_save(); | |
| 196 | } | |
| 197 | ||
| 198 | static void prefs_plugin_sel (GtkTreeSelection *sel, GtkTreeModel *model) | |
| 199 | { | |
| 11741 | 200 | gchar *buf, *pname, *pdesc, *pauth, *pweb; |
| 11740 | 201 | GtkTreeIter iter; |
| 202 | GValue val = { 0, }; | |
| 203 | GaimPlugin *plug; | |
| 204 | ||
| 205 | if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 206 | return; | |
| 207 | gtk_tree_model_get_value (model, &iter, 2, &val); | |
| 208 | plug = g_value_get_pointer(&val); | |
| 209 | ||
| 210 | pname = g_markup_escape_text(_(plug->info->name), -1); | |
| 211 | pdesc = (plug->info->description) ? | |
| 212 | g_markup_escape_text(_(plug->info->description), -1) : NULL; | |
| 213 | pauth = (plug->info->author) ? | |
| 214 | g_markup_escape_text(_(plug->info->author), -1) : NULL; | |
| 215 | pweb = (plug->info->homepage) ? | |
| 216 | g_markup_escape_text(_(plug->info->homepage), -1) : NULL; | |
| 217 | buf = g_strdup_printf( | |
|
11771
7e16b808a6ee
[gaim-migrate @ 14062]
Richard Laager <rlaager@pidgin.im>
parents:
11770
diff
changeset
|
218 | _("%s%s" |
| 11740 | 219 | "<span weight=\"bold\">Written by:</span>\t%s\n" |
|
11777
ed650b58abb6
[gaim-migrate @ 14068]
Richard Laager <rlaager@pidgin.im>
parents:
11775
diff
changeset
|
220 | "<span weight=\"bold\">Web site:</span>\t\t%s\n" |
| 11740 | 221 | "<span weight=\"bold\">File name:</span>\t%s"), |
|
11771
7e16b808a6ee
[gaim-migrate @ 14062]
Richard Laager <rlaager@pidgin.im>
parents:
11770
diff
changeset
|
222 | pdesc ? pdesc : "", pdesc ? "\n\n" : "", |
| 11740 | 223 | pauth ? pauth : "", pweb ? pweb : "", plug->path); |
| 224 | ||
| 225 | gtk_widget_set_sensitive(pref_button, | |
| 226 | plug->info->ui_info != NULL && | |
| 11781 | 227 | GAIM_GTK_PLUGIN_UI_INFO(plug)->get_config_frame != NULL && |
| 228 | gaim_plugin_is_loaded(plug)); | |
| 11740 | 229 | gtk_label_set_markup(GTK_LABEL(plugin_details), buf); |
| 230 | g_value_unset(&val); | |
| 231 | g_free(buf); | |
| 232 | g_free(pname); | |
| 233 | g_free(pdesc); | |
| 234 | g_free(pauth); | |
| 235 | g_free(pweb); | |
| 236 | } | |
| 237 | ||
| 11741 | 238 | static void plugin_dialog_response_cb(GtkWidget *d, int response, GtkTreeSelection *sel) |
| 11740 | 239 | { |
| 240 | GaimPlugin *plug; | |
| 241 | GtkWidget *dialog, *box; | |
| 242 | GtkTreeModel *model; | |
| 11743 | 243 | GValue val = { 0, }; |
| 11740 | 244 | GtkTreeIter iter; |
| 245 | ||
| 246 | switch (response) { | |
| 247 | case GTK_RESPONSE_CLOSE: | |
| 248 | case GTK_RESPONSE_DELETE_EVENT: | |
| 249 | gtk_widget_destroy(d); | |
| 250 | plugin_dialog = NULL; | |
| 251 | break; | |
| 252 | case 98121: | |
| 253 | if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 254 | return; | |
| 255 | gtk_tree_model_get_value (model, &iter, 2, &val); | |
| 256 | plug = g_value_get_pointer(&val); | |
| 257 | if (plug == NULL) | |
| 258 | break; | |
| 11781 | 259 | if (plugin_pref_dialogs != NULL && |
| 260 | g_hash_table_lookup(plugin_pref_dialogs, plug)) | |
| 11770 | 261 | break; |
| 11740 | 262 | box = gaim_gtk_plugin_get_config_frame(plug); |
| 263 | if (box == NULL) | |
| 264 | break; | |
| 265 | ||
| 11741 | 266 | dialog = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, GTK_WINDOW(d), |
| 11744 | 267 | GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT, |
| 11740 | 268 | GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, |
| 269 | NULL); | |
| 11781 | 270 | if (plugin_pref_dialogs == NULL) |
| 271 | plugin_pref_dialogs = g_hash_table_new(NULL, NULL); | |
| 272 | ||
| 273 | g_hash_table_insert(plugin_pref_dialogs, plug, dialog); | |
| 274 | ||
| 11770 | 275 | g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(pref_dialog_response_cb), plug); |
| 11740 | 276 | gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), box); |
| 11747 | 277 | gtk_window_set_role(GTK_WINDOW(dialog), "plugin_config"); |
|
11775
073bf82c3751
[gaim-migrate @ 14066]
Gary Kramlich <grim@reaperworld.com>
parents:
11771
diff
changeset
|
278 | gtk_window_set_title(GTK_WINDOW(dialog), gaim_plugin_get_name(plug)); |
| 11740 | 279 | gtk_widget_show_all(dialog); |
| 11770 | 280 | g_value_unset(&val); |
| 11740 | 281 | break; |
| 282 | } | |
| 283 | } | |
| 284 | ||
| 285 | void gaim_gtk_plugin_dialog_show() | |
| 286 | { | |
| 11741 | 287 | GtkWidget *sw; |
| 11740 | 288 | GtkWidget *event_view; |
| 289 | GtkListStore *ls; | |
| 290 | GtkCellRenderer *rend, *rendt; | |
| 291 | GtkTreeViewColumn *col; | |
| 292 | GtkTreeSelection *sel; | |
| 293 | GtkWidget *expander; | |
| 294 | ||
| 295 | if (plugin_dialog != NULL) { | |
| 296 | gtk_window_present(GTK_WINDOW(plugin_dialog)); | |
| 297 | return; | |
| 298 | } | |
| 299 | ||
| 300 | plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), | |
| 301 | NULL, | |
| 302 | GTK_DIALOG_NO_SEPARATOR, | |
| 303 | NULL); | |
| 304 | pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), GTK_STOCK_PREFERENCES, 98121); | |
| 305 | gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); | |
| 11813 | 306 | gtk_widget_set_sensitive(pref_button, FALSE); |
| 11747 | 307 | gtk_window_set_role(GTK_WINDOW(plugin_dialog), "plugins"); |
| 11740 | 308 | |
| 309 | sw = gtk_scrolled_window_new(NULL,NULL); | |
| 310 | gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | |
| 311 | gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
| 312 | ||
| 313 | gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox), sw, TRUE, TRUE, 0); | |
| 314 | ||
| 315 | ls = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); | |
| 316 | gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls), | |
| 317 | 1, GTK_SORT_ASCENDING); | |
| 318 | ||
| 319 | update_plugin_list(ls); | |
| 11813 | 320 | |
| 11740 | 321 | event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(ls)); |
| 322 | ||
| 323 | rend = gtk_cell_renderer_toggle_new(); | |
| 324 | sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | |
| 325 | ||
| 326 | col = gtk_tree_view_column_new_with_attributes (_("Enabled"), | |
| 327 | rend, | |
| 328 | "active", 0, | |
| 329 | NULL); | |
| 330 | gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
|
11794
6c39942d27a9
[gaim-migrate @ 14085]
Gary Kramlich <grim@reaperworld.com>
parents:
11783
diff
changeset
|
331 | gtk_tree_view_column_set_sort_column_id(col, 0); |
| 11740 | 332 | g_signal_connect (G_OBJECT(rend), "toggled", |
| 333 | G_CALLBACK(plugin_load), ls); | |
| 334 | ||
| 335 | rendt = gtk_cell_renderer_text_new(); | |
| 336 | col = gtk_tree_view_column_new_with_attributes (_("Name"), | |
| 337 | rendt, | |
| 338 | "markup", 1, | |
| 339 | NULL); | |
| 340 | #if GTK_CHECK_VERSION(2,6,0) | |
| 341 | gtk_tree_view_column_set_expand (col, TRUE); | |
| 342 | g_object_set(rendt, "ellipsize", PANGO_ELLIPSIZE_END, NULL); | |
| 343 | #endif | |
| 344 | gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
|
11794
6c39942d27a9
[gaim-migrate @ 14085]
Gary Kramlich <grim@reaperworld.com>
parents:
11783
diff
changeset
|
345 | gtk_tree_view_column_set_sort_column_id(col, 1); |
| 11740 | 346 | g_object_unref(G_OBJECT(ls)); |
| 347 | gtk_container_add(GTK_CONTAINER(sw), event_view); | |
| 348 | ||
| 349 | expander = gtk_expander_new(_("<b>Plugin Details</b>")); | |
| 350 | gtk_expander_set_use_markup(GTK_EXPANDER(expander), TRUE); | |
| 351 | plugin_details = gtk_label_new(NULL); | |
| 352 | gtk_label_set_line_wrap(GTK_LABEL(plugin_details), TRUE); | |
| 353 | gtk_container_add(GTK_CONTAINER(expander), plugin_details); | |
| 354 | gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox), expander, FALSE, FALSE, 0); | |
| 355 | ||
| 356 | g_signal_connect (G_OBJECT (sel), "changed", G_CALLBACK (prefs_plugin_sel), NULL); | |
| 357 | g_signal_connect(G_OBJECT(plugin_dialog), "response", G_CALLBACK(plugin_dialog_response_cb), sel); | |
| 358 | gtk_window_set_default_size(GTK_WINDOW(plugin_dialog), 430, 430); | |
| 359 | gtk_widget_show_all(plugin_dialog); | |
| 360 | } |