Don't build e-util-marshal, as we can use the glib marshallers. Use
2005-07-16 Diego Gonzalez <diego@pemas.net> * Makefile.am: Don't build e-util-marshal, as we can use the glib marshallers. * e-image-chooser.c: (e_image_chooser_class_init): Use standard glib marshallers. * gnome-about-me.c: (about_me_focus_out), (about_me_get_address_field), (about_me_setup_dialog): Add some error checking. Patch by James Bowes.
This commit is contained in:
parent
e1723021da
commit
542dfba26c
4 changed files with 34 additions and 24 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2005-07-16 Diego Gonzalez <diego@pemas.net>
|
||||||
|
|
||||||
|
* Makefile.am: Don't build e-util-marshal, as we can use
|
||||||
|
the glib marshallers.
|
||||||
|
* e-image-chooser.c: (e_image_chooser_class_init): Use standard
|
||||||
|
glib marshallers.
|
||||||
|
* gnome-about-me.c: (about_me_focus_out),
|
||||||
|
(about_me_get_address_field), (about_me_setup_dialog): Add some
|
||||||
|
error checking.
|
||||||
|
|
||||||
|
Patch by James Bowes.
|
||||||
|
|
||||||
2005-07-13 Sebastien Bacher <seb128@debian.org>
|
2005-07-13 Sebastien Bacher <seb128@debian.org>
|
||||||
|
|
||||||
* .cvsignore: new file.
|
* .cvsignore: new file.
|
||||||
|
|
|
@ -11,26 +11,12 @@ gnome_about_me_SOURCES = \
|
||||||
eel-alert-dialog.c \
|
eel-alert-dialog.c \
|
||||||
eel-alert-dialog.h \
|
eel-alert-dialog.h \
|
||||||
eel-gtk-macros.h \
|
eel-gtk-macros.h \
|
||||||
e-util-marshal.c \
|
|
||||||
e-util-marshal.h \
|
|
||||||
gnome-about-me-password.c \
|
gnome-about-me-password.c \
|
||||||
gnome-about-me-password.h \
|
gnome-about-me-password.h \
|
||||||
e-image-chooser.c \
|
e-image-chooser.c \
|
||||||
e-image-chooser.h \
|
e-image-chooser.h \
|
||||||
gnome-about-me.c
|
gnome-about-me.c
|
||||||
|
|
||||||
e-util-marshal.h: e-util-marshal.list
|
|
||||||
( @GLIB_GENMARSHAL@ --prefix=e_util_marshal $(srcdir)/e-util-marshal.list \
|
|
||||||
--header > util-marshal.tmp \
|
|
||||||
&& mv util-marshal.tmp e-util-marshal.h ) \
|
|
||||||
|| ( rm -f util-marshal.tmp && exit 1 )
|
|
||||||
|
|
||||||
e-util-marshal.c: e-util-marshal.h
|
|
||||||
( @GLIB_GENMARSHAL@ --prefix=e_util_marshal $(srcdir)/e-util-marshal.list \
|
|
||||||
--body > util-marshal.tmp \
|
|
||||||
&& mv util-marshal.tmp e-util-marshal.c ) \
|
|
||||||
|| ( rm -f util-marshal.tmp && exit 1 )
|
|
||||||
|
|
||||||
@INTLTOOL_DESKTOP_RULE@
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
|
|
||||||
desktopdir = $(datadir)/applications
|
desktopdir = $(datadir)/applications
|
||||||
|
@ -42,4 +28,4 @@ Glade_DATA = gnome-about-me.glade
|
||||||
|
|
||||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(LIBEBOOK_CFLAGS)
|
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(LIBEBOOK_CFLAGS)
|
||||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
|
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
|
||||||
EXTRA_DIST = e-util-marshal.list $(Glade_DATA) $(pixmap_DATA)
|
EXTRA_DIST = $(Glade_DATA) $(pixmap_DATA)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <gtk/gtkalignment.h>
|
#include <gtk/gtkalignment.h>
|
||||||
#include <gtk/gtkframe.h>
|
#include <gtk/gtkframe.h>
|
||||||
|
@ -32,7 +33,6 @@
|
||||||
#include <libgnomevfs/gnome-vfs-ops.h>
|
#include <libgnomevfs/gnome-vfs-ops.h>
|
||||||
|
|
||||||
#include "e-image-chooser.h"
|
#include "e-image-chooser.h"
|
||||||
#include "e-util-marshal.h"
|
|
||||||
|
|
||||||
struct _EImageChooserPrivate {
|
struct _EImageChooserPrivate {
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ e_image_chooser_class_init (EImageChooserClass *klass)
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (EImageChooserClass, changed),
|
G_STRUCT_OFFSET (EImageChooserClass, changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
e_util_marshal_NONE__NONE,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
GTK_TYPE_NONE, 0);
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -229,10 +229,10 @@ about_me_focus_out (GtkWidget *widget, GdkEventFocus *event, GnomeAboutMe *me)
|
||||||
iter_end = iter_start;
|
iter_end = iter_start;
|
||||||
gtk_text_iter_forward_to_end (&iter_end);
|
gtk_text_iter_forward_to_end (&iter_end);
|
||||||
str = gtk_text_iter_get_text (&iter_start, &iter_end);
|
str = gtk_text_iter_get_text (&iter_start, &iter_end);
|
||||||
|
} else {
|
||||||
|
str = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
str = str ? str : "";
|
|
||||||
|
|
||||||
/* FIXME: i'm getting an empty address field in evolution */
|
/* FIXME: i'm getting an empty address field in evolution */
|
||||||
if (i >= ADDRESS_HOME && i < ADDRESS_WORK) {
|
if (i >= ADDRESS_HOME && i < ADDRESS_WORK) {
|
||||||
about_me_set_address_field (me->addr1, ids[i].cid, str);
|
about_me_set_address_field (me->addr1, ids[i].cid, str);
|
||||||
|
@ -273,10 +273,11 @@ get_user_login (void)
|
||||||
static gchar *
|
static gchar *
|
||||||
about_me_get_address_field (EContactAddress *addr, guint cid)
|
about_me_get_address_field (EContactAddress *addr, guint cid)
|
||||||
{
|
{
|
||||||
gchar *str = NULL;
|
gchar *str;
|
||||||
|
|
||||||
if (addr == NULL)
|
if (addr == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
switch (cid) {
|
switch (cid) {
|
||||||
case ADDRESS_STREET:
|
case ADDRESS_STREET:
|
||||||
|
@ -297,6 +298,9 @@ about_me_get_address_field (EContactAddress *addr, guint cid)
|
||||||
case ADDRESS_COUNTRY:
|
case ADDRESS_COUNTRY:
|
||||||
str = addr->country;
|
str = addr->country;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
str = NULL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
@ -666,6 +670,11 @@ about_me_setup_dialog (void)
|
||||||
dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-about-me.glade",
|
dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-about-me.glade",
|
||||||
"about-me-dialog", NULL);
|
"about-me-dialog", NULL);
|
||||||
|
|
||||||
|
if (dialog == NULL) {
|
||||||
|
g_error ("Unable to load glade file.");
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
me->dialog = dialog;
|
me->dialog = dialog;
|
||||||
|
|
||||||
/* Connect the close button signal */
|
/* Connect the close button signal */
|
||||||
|
@ -696,18 +705,21 @@ about_me_setup_dialog (void)
|
||||||
me->create_self = TRUE;
|
me->create_self = TRUE;
|
||||||
|
|
||||||
me->contact = e_contact_new ();
|
me->contact = e_contact_new ();
|
||||||
g_print ("%s\n", error->message);
|
|
||||||
|
|
||||||
|
g_warning ("%s\n", error->message);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
|
|
||||||
if (me->book == NULL) {
|
if (me->book == NULL) {
|
||||||
me->book = e_book_new_system_addressbook (&error);
|
me->book = e_book_new_system_addressbook (&error);
|
||||||
if (me->book == NULL)
|
if (me->book == NULL || error != NULL) {
|
||||||
g_print ("error message: %s\n", error->message);
|
g_error ("%s\n", error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
|
||||||
if (e_book_open (me->book, FALSE, NULL) == FALSE) {
|
if (e_book_open (me->book, FALSE, NULL) == FALSE) {
|
||||||
about_me_error (GTK_WINDOW (main_dialog),
|
about_me_error (GTK_WINDOW (main_dialog),
|
||||||
_("Unable to open address book"));
|
_("Unable to open address book"));
|
||||||
|
g_clear_error (&error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue