From ab44fe3e1d962e7876693929c940121e2954379d Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 8 Nov 2002 06:24:55 +0000 Subject: add lots of libs back in since they're building now. 2002-11-07 Chris Toshok * gui/component/Makefile.am (evolution_addressbook_LDADD): add lots of libs back in since they're building now. * gui/component/addressbook-config.c: more porting work. * gui/component/addressbook.c: more porting work. * gui/component/e-address-popup.[ch]: more porting work. * gui/component/e-address-widget.[ch]: more porting work. * gui/component/e-cardlist-model.[ch]: more porting work. svn path=/trunk/; revision=18658 --- addressbook/gui/component/addressbook.c | 82 ++++++++++++++++----------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'addressbook/gui/component/addressbook.c') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 2bb49521b0..fb37952fe9 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -14,10 +14,12 @@ #include #include #include +#include +#include #include #include +#include #include -#include #include #include #include @@ -476,18 +478,15 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) NULL); } else { - GtkWidget *warning_dialog, *label; + char *label_string; + GtkWidget *warning_dialog; + GtkWidget *href = NULL; AddressbookSource *source = NULL; - warning_dialog = gnome_dialog_new ( - _("Unable to open addressbook"), - GNOME_STOCK_BUTTON_CLOSE, - NULL); - if (!strncmp (view->uri, "file:", 5)) { - label = gtk_label_new ( - _("We were unable to open this addressbook. Please check that the\n" - "path exists and that you have permission to access it.")); + label_string = + _("We were unable to open this addressbook. Please check that the\n" + "path exists and that you have permission to access it."); } else { source = addressbook_storage_get_source_by_uri (view->uri); @@ -495,48 +494,49 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) if (source) { /* special case for ldap: contact folders so we can tell the user about openldap */ #if HAVE_LDAP - label = gtk_label_new ( - _("We were unable to open this addressbook. This either\n" - "means you have entered an incorrect URI, or the LDAP server\n" - "is unreachable.")); + label_string = + _("We were unable to open this addressbook. This either\n" + "means you have entered an incorrect URI, or the LDAP server\n" + "is unreachable."); #else - label = gtk_label_new ( - _("This version of Evolution does not have LDAP support\n" - "compiled in to it. If you want to use LDAP in Evolution\n" - "you must compile the program from the CVS sources after\n" - "retrieving OpenLDAP from the link below.\n")); + label_string = + _("This version of Evolution does not have LDAP support\n" + "compiled in to it. If you want to use LDAP in Evolution\n" + "you must compile the program from the CVS sources after\n" + "retrieving OpenLDAP from the link below.\n"); + href = gnome_href_new ("http://www.openldap.org/", "OpenLDAP at http://www.openldap.org/"); #endif } else { /* other network folders */ - label = gtk_label_new ( - _("We were unable to open this addressbook. This either\n" - "means you have entered an incorrect URI, or the server\n" - "is unreachable.")); + label_string = + _("We were unable to open this addressbook. This either\n" + "means you have entered an incorrect URI, or the server\n" + "is unreachable."); } } - gtk_misc_set_alignment(GTK_MISC(label), - 0, .5); - gtk_label_set_justify(GTK_LABEL(label), - GTK_JUSTIFY_LEFT); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 0); - gtk_widget_show (label); + warning_dialog = gtk_message_dialog_new ( + NULL /* XXX */, + 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + label_string, + NULL); + + g_signal_connect_swapped (warning_dialog, + "response", + G_CALLBACK (gtk_widget_destroy), + warning_dialog); -#ifndef HAVE_LDAP - if (source) { - GtkWidget *href; - href = gnome_href_new ("http://www.openldap.org/", "OpenLDAP at http://www.openldap.org/"); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), + gtk_window_set_title (GTK_WINDOW (warning_dialog), _("Unable to open addressbook")); + + if (href) + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (warning_dialog)->vbox), href, FALSE, FALSE, 0); - gtk_widget_show (href); - } -#endif - gnome_dialog_run (GNOME_DIALOG (warning_dialog)); - - gtk_object_destroy (GTK_OBJECT (warning_dialog)); + + gtk_widget_show_all (warning_dialog); } } -- cgit v1.2.3