aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog31
-rw-r--r--addressbook/gui/component/addressbook.c6
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c25
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c4
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c1
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c1
-rw-r--r--addressbook/gui/widgets/e-minicard.c4
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c2
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c13
-rw-r--r--addressbook/gui/widgets/eab-popup-control.c2
10 files changed, 64 insertions, 25 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index b9d9f42bfc..9a07aee2ff 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,34 @@
+2005-08-23 Not Zed <NotZed@Ximian.com>
+
+ * gui/component/addressbook.c (addressbook_authenticate):
+ de-constify uri, and fix its creation logic.
+ (load_source_cb): cast for warning.
+
+ * gui/widgets/e-addressbook-view.c: more missing a11y include.
+
+ * gui/widgets/e-minicard-view.c: another missing a11y include.
+
+ * gui/widgets/e-minicard.c: include missing a11y include.
+ (e_minicard_activate_editor): fix cast.
+
+ * gui/widgets/eab-popup-control.c (eab_popup_control_display_contact): remove unused.
+
+ * gui/widgets/eab-gui-util.c (eab_contact_save): fix conditional build.
+ (eab_send_to_contact_and_email_num_list): fix boolean conversion.
+
+ * gui/widgets/eab-contact-display.c (eab_contact_display_init): cast.
+
+ * gui/contact-list-editor/e-contact-list-editor.c (fill_in_info): constify file_as.
+
+ * gui/contact-editor/e-contact-editor.c (init_im_record_location):
+ fix warnings for conditional building.
+ (fill_in_simple_field): do proper boolean conversion.
+ (extract_simple_field): do proper boolean conversion.
+ (response): constify categories, and dont bother initialising it.
+ (image_clicked): remove warnings for conditional build.
+ (e_contact_editor_is_valid): constify text.
+ (e_contact_editor_create_web): cast.
+
2005-08-22 Sushma Rai <rsushma@novell.com>
* gui/widgets/eab-contact-display.c
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index aa70808942..fad0efa48c 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -161,13 +161,11 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
char *pass_dup = NULL;
const gchar *auth;
const gchar *user;
- const gchar *uri = e_book_get_uri (book);
- gchar *stripped_uri = remove_parameters_from_uri (uri);
+ gchar *uri = remove_parameters_from_uri(e_book_get_uri (book));
const gchar *auth_domain = e_source_get_property (source, "auth-domain");
const gchar *component_name;
component_name = auth_domain ? auth_domain : "Addressbook";
- uri = stripped_uri;
password = e_passwords_get_password (component_name, uri);
@@ -257,7 +255,7 @@ load_source_cb (EBook *book, EBookStatus status, gpointer closure)
auth = e_source_get_property (load_source_data->source, "auth");
if (auth && strcmp (auth, "none")) {
- g_signal_connect (book, "auth_required", auth_required_cb, NULL);
+ g_signal_connect (book, "auth_required", G_CALLBACK(auth_required_cb), NULL);
if (e_book_is_online (book)) {
addressbook_authenticate (book, FALSE, load_source_data->source,
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 50aef51334..2993e4c403 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1317,11 +1317,13 @@ sensitize_phone (EContactEditor *editor)
static void
init_im_record_location (EContactEditor *editor, gint record)
{
+#ifdef ENABLE_IM_LOCATION
GtkWidget *location_option_menu;
GtkWidget *location_menu;
+ gint i;
+#endif
GtkWidget *name_entry;
gchar *widget_name;
- gint i;
widget_name = g_strdup_printf ("entry-im-name-%d", record);
name_entry = glade_xml_get_widget (editor->gui, widget_name);
@@ -2146,7 +2148,8 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
e_contact_photo_free (photo);
}
else if (GTK_IS_TOGGLE_BUTTON (widget)) {
- gboolean val = (gboolean) e_contact_get (contact, field_id);
+ gboolean val = e_contact_get (contact, field_id) != NULL;
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), val);
}
else {
@@ -2249,7 +2252,8 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
}
else if (GTK_IS_TOGGLE_BUTTON (widget)) {
gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- e_contact_set (contact, field_id, (gpointer) val);
+
+ e_contact_set (contact, field_id, val?(void *)1:NULL);
}
else {
g_warning (G_STRLOC ": Unhandled widget class in mappings!");
@@ -2546,7 +2550,7 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor)
static void
response (GtkDialog *dialog, int response, EContactEditor *editor)
{
- char *categories = NULL;
+ const char *categories;
GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
if (response == GTK_RESPONSE_OK) {
@@ -2554,7 +2558,7 @@ response (GtkDialog *dialog, int response, EContactEditor *editor)
if (entry && GTK_IS_ENTRY(entry))
gtk_entry_set_text (GTK_ENTRY (entry), categories);
else
- e_contact_set (editor->contact, E_CONTACT_CATEGORIES, categories);
+ e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (char *)categories);
}
gtk_widget_destroy(GTK_WIDGET(dialog));
}
@@ -2654,8 +2658,6 @@ file_selector_deleted (GtkWidget *widget)
static void
image_clicked (GtkWidget *button, EContactEditor *editor)
{
- GtkWidget *clear_button;
- GtkWidget *dialog;
const gchar *title = _("Please select an image for this contact");
const gchar *no_image = _("No image");
@@ -2675,6 +2677,9 @@ image_clicked (GtkWidget *button, EContactEditor *editor)
g_signal_connect (editor->file_selector, "response",
G_CALLBACK (file_chooser_response), editor);
#else
+ GtkWidget *clear_button;
+ GtkWidget *dialog;
+
/* Create the selector */
editor->file_selector = gtk_file_selection_new (title);
@@ -2967,8 +2972,8 @@ e_contact_editor_is_valid (EABEditor *editor)
}
} else {
-
- char *text = e_contact_get_const (ce->contact, field_id);
+ const char *text = e_contact_get_const (ce->contact, field_id);
+
if (STRING_IS_EMPTY (text)) {
g_string_append_printf (errmsg, "%s'%s' is empty",
validation_error ? ",\n" : "",
@@ -3599,7 +3604,7 @@ e_contact_editor_create_web(gchar *name,
gint int1, gint int2)
{
GtkWidget *widget = e_url_entry_new ();
- AtkObject *a11y = gtk_widget_get_accessible (e_url_entry_get_entry (widget));
+ AtkObject *a11y = gtk_widget_get_accessible (e_url_entry_get_entry ((EUrlEntry *)widget));
if (a11y != NULL) {
atk_object_set_name (a11y, string1);
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index a8424814e0..040dbb6b9a 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -1053,7 +1053,7 @@ fill_in_info(EContactListEditor *editor)
{
if (editor->contact) {
EContactPhoto *photo;
- char *file_as;
+ const char *file_as;
gboolean show_addresses = FALSE;
gboolean is_evolution_list = FALSE;
GList *email_list;
@@ -1067,8 +1067,8 @@ fill_in_info(EContactListEditor *editor)
gtk_editable_delete_text (GTK_EDITABLE (editor->list_name_entry), 0, -1);
if (file_as) {
int position = 0;
+
gtk_editable_insert_text (GTK_EDITABLE (editor->list_name_entry), file_as, strlen (file_as), &position);
- g_free (file_as);
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(editor->visible_addrs_checkbutton), !show_addresses);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 91f16b25c2..d1d2a6cb04 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -45,6 +45,7 @@
#include "addressbook/gui/search/e-addressbook-search-dialog.h"
#include "addressbook/gui/widgets/eab-popup.h"
#include "addressbook/gui/widgets/eab-menu.h"
+#include "a11y/addressbook/ea-addressbook.h"
#include "e-util/e-print.h"
#include "libedataserver/e-sexp.h"
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index b362cb1294..eeb1daea11 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -33,6 +33,7 @@
#include <misc/e-canvas.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
+#include "a11y/addressbook/ea-addressbook.h"
static void e_minicard_view_drag_data_get(GtkWidget *widget,
GdkDragContext *context,
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index a1f84c4423..b5b941be1d 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -41,6 +41,7 @@
#include "e-contact-editor.h"
#include <e-util/e-icon-factory.h>
#include <libebook/e-destination.h>
+#include "a11y/addressbook/ea-addressbook.h"
static void e_minicard_init (EMinicard *card);
static void e_minicard_class_init (EMinicardClass *klass);
@@ -534,8 +535,7 @@ editor_closed_cb (GtkObject *editor, gpointer data)
gboolean
e_minicard_activate_editor(EMinicard *minicard)
{
- GnomeCanvasItem *item = NULL;
- item = minicard;
+ GnomeCanvasItem *item = (GnomeCanvasItem *)minicard;
if (minicard->editor) {
eab_editor_raise (minicard->editor);
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index d96c1a323d..a925ce72d6 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -663,7 +663,7 @@ eab_contact_display_new (void)
static void
eab_contact_display_init (GObject *object)
{
- gtk_html_construct (object);
+ gtk_html_construct ((GtkHTML *)object);
}
static void
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 85a4e8d0f8..dd09c7620c 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -497,8 +497,11 @@ void
eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window)
{
GtkWidget *filesel;
- char *file, *full_filename;
+ char *file;
char *name;
+#ifndef USE_GTKFILECHOOSER
+ char *full_filename;
+#endif
SaveAsInfo *info = g_new(SaveAsInfo, 1);
name = e_contact_get (contact, E_CONTACT_FILE_AS);
@@ -556,7 +559,10 @@ eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window)
{
GtkWidget *filesel;
SaveAsInfo *info = g_new(SaveAsInfo, 1);
- char *file, *full_filename;
+ char *file;
+#ifndef USE_GTKFILECHOOSER
+ char *full_filename;
+#endif
#ifdef USE_GTKFILECHOOSER
filesel = gtk_file_chooser_dialog_new (title,
@@ -861,8 +867,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
GList *iterator;
if (emails != NULL) {
-
- is_list = (gboolean)e_contact_get (contact, E_CONTACT_IS_LIST);
+ is_list = e_contact_get (contact, E_CONTACT_IS_LIST) != NULL;
is_hidden = is_list && !e_contact_get (contact, E_CONTACT_LIST_SHOW_ADDRESSES);
if (is_list) {
diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c
index 6b114a9950..6433b91d29 100644
--- a/addressbook/gui/widgets/eab-popup-control.c
+++ b/addressbook/gui/widgets/eab-popup-control.c
@@ -926,8 +926,6 @@ contact_editor_cb (EBook *book, EBookStatus status, gpointer closure)
static void
eab_popup_control_display_contact (EABPopupControl *pop, EContact *contact)
{
- GtkWidget *b;
-
g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
g_return_if_fail (contact && E_IS_CONTACT (contact));
g_return_if_fail (pop->contact == NULL);