diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-12-17 22:29:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-12-17 22:30:50 +0800 |
commit | d17065a40d223194714e8c86b82e7adbabadb484 (patch) | |
tree | d9b39264814e28427b9861d42b4fb37eb9e71581 /addressbook/gui/widgets | |
parent | 14d333f14e71885e770683010fa0ee48f77a63a0 (diff) | |
download | gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.tar gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.tar.gz gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.tar.bz2 gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.tar.lz gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.tar.xz gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.tar.zst gsoc2013-evolution-d17065a40d223194714e8c86b82e7adbabadb484.zip |
Fix compiler warnings.
gtk_dialog_new_with_buttons() requires some buttons, otherwise use
gtk_dialog_new() and set title/transient-for/etc properties manually.
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index befc8836ca..e3b8537caa 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -305,23 +305,31 @@ eab_select_source (ESource *except_source, if (!e_book_client_get_sources (&source_list, NULL)) return NULL; - dialog = gtk_dialog_new_with_buttons (_("Select Address Book"), parent, - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - NULL); + dialog = gtk_dialog_new_with_buttons ( + _("Select Address Book"), parent, + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + NULL); gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 300); - gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); - gtk_widget_set_sensitive (ok_button, FALSE); + gtk_dialog_set_response_sensitive ( + GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT, FALSE); /* label = gtk_label_new (message); */ selector = e_source_selector_new (source_list); e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE); + + ok_button = gtk_dialog_get_widget_for_response ( + GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); + if (except_source) g_object_set_data ( G_OBJECT (ok_button), "except-source", - e_source_list_peek_source_by_uid (source_list, e_source_peek_uid (except_source))); + e_source_list_peek_source_by_uid ( + source_list, e_source_peek_uid (except_source))); + g_signal_connect ( selector, "primary_selection_changed", G_CALLBACK (source_selection_changed_cb), ok_button); |