| 511 |
511 |
| 512 /* Now show the pref-dialog for the plugin */ |
512 /* Now show the pref-dialog for the plugin */ |
| 513 plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel); |
513 plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel); |
| 514 } |
514 } |
| 515 |
515 |
| 516 void pidgin_plugin_dialog_show() |
516 void pidgin_plugin_dialog_show(GtkWindow *parent) |
| 517 { |
517 { |
| 518 GtkWidget *sw; |
518 GtkWidget *sw; |
| 519 GtkWidget *event_view; |
519 GtkWidget *event_view; |
| 520 GtkListStore *ls; |
520 GtkListStore *ls; |
| 521 GtkCellRenderer *rend, *rendt; |
521 GtkCellRenderer *rend, *rendt; |
| 522 GtkTreeViewColumn *col; |
522 GtkTreeViewColumn *col; |
| 523 GtkTreeSelection *sel; |
523 GtkTreeSelection *sel; |
| 524 |
524 |
| 525 if (plugin_dialog != NULL) { |
525 if (plugin_dialog != NULL) { |
| |
526 if (parent) |
| |
527 gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent); |
| 526 gtk_window_present(GTK_WINDOW(plugin_dialog)); |
528 gtk_window_present(GTK_WINDOW(plugin_dialog)); |
| 527 return; |
529 return; |
| 528 } |
530 } |
| 529 |
531 |
| 530 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), |
532 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), |
| 531 NULL, |
533 NULL, |
| 532 GTK_DIALOG_NO_SEPARATOR, |
534 GTK_DIALOG_NO_SEPARATOR, |
| 533 NULL); |
535 NULL); |
| |
536 if (parent) |
| |
537 gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent); |
| 534 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), |
538 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), |
| 535 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); |
539 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); |
| 536 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), |
540 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), |
| 537 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); |
541 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); |
| 538 gtk_widget_set_sensitive(pref_button, FALSE); |
542 gtk_widget_set_sensitive(pref_button, FALSE); |