From 07d9553dd247331c9c46696b45a309983473f493 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 20 Aug 2002 22:41:57 +0000 Subject: not sure what i was thinking here... the EBook isn't valid if we couldn't 2002-08-20 Chris Toshok * gui/component/addressbook.c (book_open_cb): not sure what i was thinking here... the EBook isn't valid if we couldn't open it, so we can't turn around and query it for its capabilities. svn path=/trunk/; revision=17827 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/component/addressbook.c | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index de8d85bf2a..dbe3b717fc 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2002-08-20 Chris Toshok + + * gui/component/addressbook.c (book_open_cb): not sure what i was + thinking here... the EBook isn't valid if we couldn't open it, so + we can't turn around and query it for its capabilities. + 2002-08-19 Chris Toshok * gui/component/select-names/e-select-names-manager.h: add the diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 025ac334db..084d85d324 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -460,9 +460,9 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) gtk_object_set(GTK_OBJECT(view->view), "book", book, NULL); - } else { + } + else { GtkWidget *warning_dialog, *label; - char *capabilities; AddressbookSource *source = NULL; warning_dialog = gnome_dialog_new ( @@ -470,9 +470,7 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) GNOME_STOCK_BUTTON_CLOSE, NULL); - capabilities = e_book_get_static_capabilities (book); - - if (capabilities && strstr (capabilities, "local")) { + 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.")); @@ -504,8 +502,6 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) } } - g_free (capabilities); - gtk_misc_set_alignment(GTK_MISC(label), 0, .5); gtk_label_set_justify(GTK_LABEL(label), -- cgit v1.2.3