handle protocol errors from EDS.
2005-08-06 Diego Gonzalez <diego@pemas.net> * gnome-about-me.c (about_me_setup_dialog): handle protocol errors from EDS. This make the capplet not crash and fixes bug 312450, but the real problem is on EDS, not here.
This commit is contained in:
parent
2abc3de4e1
commit
c1446b213a
2 changed files with 23 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2005-08-06 Diego Gonzalez <diego@pemas.net>
|
||||
|
||||
* gnome-about-me.c (about_me_setup_dialog): handle protocol errors
|
||||
from EDS.
|
||||
|
||||
This make the capplet not crash and fixes bug 312450, but the real
|
||||
problem is on EDS, not here.
|
||||
|
||||
2005-08-06 Diego Gonzalez <diego@pemas.net>
|
||||
|
||||
* gnome-about-me-password.c (update_password): change signature and
|
||||
|
|
|
@ -652,7 +652,7 @@ about_me_passwd_clicked_cb (GtkWidget *button, GnomeAboutMe *me)
|
|||
gnome_about_me_password (GTK_WINDOW (WID ("about-me-dialog")));
|
||||
}
|
||||
|
||||
static void
|
||||
static gint
|
||||
about_me_setup_dialog (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
@ -702,6 +702,12 @@ about_me_setup_dialog (void)
|
|||
|
||||
/* Get the self contact */
|
||||
if (!e_book_get_self (&me->contact, &me->book, &error)) {
|
||||
if (error->code == E_BOOK_ERROR_PROTOCOL_NOT_SUPPORTED) {
|
||||
about_me_error (NULL, _("There was an error while trying to get the addressbook information\n" \
|
||||
"Evolution Data Server can't handle the protocol"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
me->create_self = TRUE;
|
||||
|
||||
me->contact = e_contact_new ();
|
||||
|
@ -731,7 +737,7 @@ about_me_setup_dialog (void)
|
|||
if (pwent == NULL) {
|
||||
about_me_error (GTK_WINDOW (WID ("about-me-dialog")),
|
||||
_("Unknown login ID, the user database might be corrupted"));
|
||||
return ;
|
||||
return -1;
|
||||
}
|
||||
gchar **tok;
|
||||
tok = g_strsplit (pwent->pw_gecos, ",", 0);
|
||||
|
@ -783,6 +789,8 @@ about_me_setup_dialog (void)
|
|||
about_me_load_info (me);
|
||||
|
||||
gtk_widget_show_all (main_dialog);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -797,8 +805,11 @@ main (int argc, char **argv)
|
|||
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
|
||||
NULL);
|
||||
|
||||
about_me_setup_dialog ();
|
||||
if (about_me_setup_dialog () == -1) {
|
||||
return -1;
|
||||
} else {
|
||||
gtk_main ();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue