Mercurial > pidgin.yaz
comparison pidgin/gtkplugin.c @ 19798:13a779fe3f1e
Making dialogs properly transient.
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Tue, 24 Jul 2007 18:08:23 +0000 |
parents | 08db93bbd798 |
children | d5e2a4897bbc |
comparison
equal
deleted
inserted
replaced
18628:1b032e320dbf | 19798:13a779fe3f1e |
---|---|
28 #include "gtkpluginpref.h" | 28 #include "gtkpluginpref.h" |
29 #include "gtkutils.h" | 29 #include "gtkutils.h" |
30 #include "debug.h" | 30 #include "debug.h" |
31 #include "prefs.h" | 31 #include "prefs.h" |
32 #include "request.h" | 32 #include "request.h" |
33 #include "gtkblist.h" | |
33 | 34 |
34 #include <string.h> | 35 #include <string.h> |
35 | 36 |
36 #define PIDGIN_RESPONSE_CONFIGURE 98121 | 37 #define PIDGIN_RESPONSE_CONFIGURE 98121 |
37 | 38 |
519 GtkWidget *event_view; | 520 GtkWidget *event_view; |
520 GtkListStore *ls; | 521 GtkListStore *ls; |
521 GtkCellRenderer *rend, *rendt; | 522 GtkCellRenderer *rend, *rendt; |
522 GtkTreeViewColumn *col; | 523 GtkTreeViewColumn *col; |
523 GtkTreeSelection *sel; | 524 GtkTreeSelection *sel; |
525 PidginBuddyList *blist; | |
524 | 526 |
525 if (plugin_dialog != NULL) { | 527 if (plugin_dialog != NULL) { |
526 gtk_window_present(GTK_WINDOW(plugin_dialog)); | 528 gtk_window_present(GTK_WINDOW(plugin_dialog)); |
527 return; | 529 return; |
528 } | 530 } |
529 | 531 |
532 blist = pidgin_blist_get_default_gtk_blist(); | |
533 | |
530 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), | 534 plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"), |
531 NULL, | 535 NULL == blist ? NULL : NULL == blist->window ? NULL : blist->window, |
532 GTK_DIALOG_NO_SEPARATOR, | 536 GTK_DIALOG_NO_SEPARATOR, |
533 NULL); | 537 NULL); |
538 | |
534 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), | 539 pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), |
535 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); | 540 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); |
536 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), | 541 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), |
537 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); | 542 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); |
538 gtk_widget_set_sensitive(pref_button, FALSE); | 543 gtk_widget_set_sensitive(pref_button, FALSE); |