pidgin/gtkplugin.c

changeset 20684
4daaf3284863
parent 20330
650a7af9c238
parent 19997
24bc4ea43075
child 20685
039aef89faf6
equal deleted inserted replaced
20665:b47c4fe72d16 20684:4daaf3284863
282 282
283 purple_request_action(plugin_dialog, NULL, 283 purple_request_action(plugin_dialog, NULL,
284 _("Multiple plugins will be unloaded."), 284 _("Multiple plugins will be unloaded."),
285 tmp->str, 0, 285 tmp->str, 0,
286 NULL, NULL, NULL, 286 NULL, NULL, NULL,
287 cb_data, 2, 287 "plugins", cb_data, 2,
288 _("Unload Plugins"), G_CALLBACK(plugin_unload_confirm_cb), 288 _("Unload Plugins"), G_CALLBACK(plugin_unload_confirm_cb),
289 _("Cancel"), g_free); 289 _("Cancel"), g_free);
290 g_string_free(tmp, TRUE); 290 g_string_free(tmp, TRUE);
291 } 291 }
292 else 292 else
512 512
513 /* Now show the pref-dialog for the plugin */ 513 /* Now show the pref-dialog for the plugin */
514 plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel); 514 plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel);
515 } 515 }
516 516
517 void pidgin_plugin_dialog_show() 517 void pidgin_plugin_dialog_show(GtkWindow *parent)
518 { 518 {
519 GtkWidget *sw; 519 GtkWidget *sw;
520 GtkWidget *event_view; 520 GtkWidget *event_view;
521 GtkListStore *ls; 521 GtkListStore *ls;
522 GtkCellRenderer *rend, *rendt; 522 GtkCellRenderer *rend, *rendt;
523 GtkTreeViewColumn *col; 523 GtkTreeViewColumn *col;
524 GtkTreeSelection *sel; 524 GtkTreeSelection *sel;
525 525
526 if (plugin_dialog != NULL) { 526 if (plugin_dialog != NULL) {
527 if (parent)
528 gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent);
527 gtk_window_present(GTK_WINDOW(plugin_dialog)); 529 gtk_window_present(GTK_WINDOW(plugin_dialog));
528 return; 530 return;
529 } 531 }
530 532
531 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), 533 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"),
532 NULL, 534 NULL,
533 GTK_DIALOG_NO_SEPARATOR, 535 GTK_DIALOG_NO_SEPARATOR,
534 NULL); 536 NULL);
537 if (parent)
538 gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent);
535 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), 539 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
536 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); 540 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE);
537 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), 541 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
538 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); 542 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
539 gtk_widget_set_sensitive(pref_button, FALSE); 543 gtk_widget_set_sensitive(pref_button, FALSE);

mercurial