pidgin/gtkplugin.c

changeset 21214
db28e29a4990
parent 21213
61d8c5197526
child 21342
6d1d2ebd9277
equal deleted inserted replaced
21213:61d8c5197526 21214:db28e29a4990
531 plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel); 531 plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel);
532 } 532 }
533 533
534 void pidgin_plugin_dialog_show() 534 void pidgin_plugin_dialog_show()
535 { 535 {
536 pidgin_plugin_dialog_show_with_parent(NULL);
537 }
538
539 void pidgin_plugin_dialog_show_with_parent(GtkWindow *parent)
540 {
541 GtkWidget *sw; 536 GtkWidget *sw;
542 GtkWidget *event_view; 537 GtkWidget *event_view;
543 GtkListStore *ls; 538 GtkListStore *ls;
544 GtkCellRenderer *rend, *rendt; 539 GtkCellRenderer *rend, *rendt;
545 GtkTreeViewColumn *col; 540 GtkTreeViewColumn *col;
546 GtkTreeSelection *sel; 541 GtkTreeSelection *sel;
547 542
548 if (plugin_dialog != NULL) { 543 if (plugin_dialog != NULL) {
549 if (parent)
550 gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent);
551 gtk_window_present(GTK_WINDOW(plugin_dialog)); 544 gtk_window_present(GTK_WINDOW(plugin_dialog));
552 return; 545 return;
553 } 546 }
554 547
555 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), 548 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"),
556 NULL, 549 NULL,
557 GTK_DIALOG_NO_SEPARATOR, 550 GTK_DIALOG_NO_SEPARATOR,
558 NULL); 551 NULL);
559 if (parent)
560 gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent);
561 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), 552 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
562 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); 553 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE);
563 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), 554 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
564 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); 555 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
565 gtk_widget_set_sensitive(pref_button, FALSE); 556 gtk_widget_set_sensitive(pref_button, FALSE);

mercurial