+2006-08-17 Kjartan Maraas <kmaraas@gnome.org>
+
+ * e-destination-store.c: (find_destination_by_email):
+ e_destination_get_email() returns const char*
+ * e-name-selector-dialog.c:
+ (e_name_selector_dialog_populate_categories),
+ (e_name_selector_dialog_init): Fix warning about unused result
+ and mixing declarations and code.
+ * e-name-selector-entry.c: (user_delete_text),
+ (e_name_selector_entry_init): Remove some unused code and fix
+ compiler warnings
+ * e-name-selector-list.c: (enl_tree_button_press_event),
+ (e_name_selector_list_new): Fix more compiler warnings
+ * e-passwords.c: (ep_remember_password), (ep_ask_password),
+ (decode_base64): Fix compiler warnings.
+
2006-08-07 Hans Petter Jansson <hpj@novell.com>
* e-contact-store.c (e_contact_store_finalize): Fix memory leaks.
find_destination_by_email (EDestinationStore *destination_store, EDestination *destination)
{
gint i;
- char *e_mail = e_destination_get_email (destination);
+ const char *e_mail = e_destination_get_email (destination);
for (i = 0; i < destination_store->destinations->len; i++) {
EDestination *destination_here = g_ptr_array_index (destination_store->destinations, i);
- char *mail = e_destination_get_email (destination_here);
+ const char *mail = e_destination_get_email (destination_here);
if (g_str_equal (e_mail, mail))
return i;
category_list = e_categories_get_list () ;
category_list = g_list_prepend (category_list, "Any Category");
- g_list_sort (category_list, compare_func);
+ category_list = g_list_sort (category_list, compare_func);
category_menu = gtk_menu_new ();
l = category_list;
GtkTreeSelection *selection;
ESourceList *source_list;
char *gladefile;
+ GConfClient *gconf_client;
+ char *uid;
ENameSelectorDialogPrivate *priv = E_NAME_SELECTOR_DIALOG_GET_PRIVATE (name_selector_dialog);
priv->destination_index = 0;
widget = e_source_option_menu_new (name_selector_dialog->source_list);
- GConfClient *gconf_client;
- char *uid;
-
gconf_client = gconf_client_get_default();
uid = gconf_client_get_string (gconf_client, "/apps/evolution/addressbook/display/primary_addressbook",
NULL);
return rv;
}
-static gint
-utf8_casefold_collate (const gchar *str1, const gchar *str2)
-{
- return utf8_casefold_collate_len (str1, str2, -1);
-}
-
static gchar *
build_textrep_for_contact (EContact *contact, EContactField cue_field)
{
}
static void
-remove_destination_at_position (ENameSelectorEntry *name_selector_entry, gint pos)
-{
- EDestination *destination;
-
- destination = find_destination_at_position (name_selector_entry, pos);
- if (destination) {
- g_signal_handlers_block_by_func (name_selector_entry->destination_store,
- destination_row_deleted, name_selector_entry);
- e_destination_store_remove_destination (name_selector_entry->destination_store,
- destination);
- g_signal_handlers_unblock_by_func (name_selector_entry->destination_store,
- destination_row_deleted, name_selector_entry);
- }
-}
-
-static void
sync_destination_at_position (ENameSelectorEntry *name_selector_entry, gint range_pos, gint *cursor_pos)
{
EDestination *destination;
const gchar *text;
gint index_start, index_end;
gint selection_start, selection_end;
- gunichar str_context [2], str_b_context [2];;
+ gunichar str_context [2], str_b_context [2];
gint len;
gint i;
gboolean already_selected = FALSE;
&selection_start,
&selection_end))
if ((g_utf8_get_char (g_utf8_offset_to_pointer (text, selection_end)) == 0) ||
- (g_utf8_get_char (g_utf8_offset_to_pointer (text, selection_end)) == ","))
+ (g_utf8_get_char (g_utf8_offset_to_pointer (text, selection_end)) == ','))
already_selected = TRUE;
get_utf8_string_context (text, start_pos, str_context, 2);
name_selector_entry->type_ahead_complete_cb_id = 0;
}
-end_of_user_delete_text:
g_signal_handlers_unblock_by_func (name_selector_entry, user_delete_text, name_selector_entry);
}
GConfClient *gconf;
gconf = gconf_client_get_default();
if (COMPLETION_CUE_MIN_LEN == 0) {
- if (COMPLETION_CUE_MIN_LEN = gconf_client_get_int (gconf, MINIMUM_QUERY_LENGTH, NULL));
+ if ((COMPLETION_CUE_MIN_LEN = gconf_client_get_int (gconf, MINIMUM_QUERY_LENGTH, NULL)))
+ ;
else COMPLETION_CUE_MIN_LEN = 3;
}
g_object_unref (G_OBJECT (gconf));
if ( !GTK_WIDGET_HAS_GRAB (list->popup))
enl_popup_grab (list);
-
- gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW (list->tree_view), event->x, event->y, &path, GTK_TREE_VIEW_DROP_BEFORE);
+ gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW (list->tree_view), event->x, event->y, &path, NULL);
selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (list->tree_view));
if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (E_NAME_SELECTOR_ENTRY (list)->destination_store), &iter, path))
return FALSE;
}
ENameSelectorList *
-e_name_selector_list_new ()
+e_name_selector_list_new (void)
{
return g_object_new (e_name_selector_list_get_type (), NULL);
}
/* work variables */
GtkWidget *entry;
GtkWidget *check;
- int ismain:1;
- int noreply:1; /* supress replies; when calling
+ guint ismain:1;
+ guint noreply:1; /* supress replies; when calling
* dispatch functions from others */
};
len = strlen (value);
pass64 = g_malloc0 ((len + 2) * 4 / 3 + 1);
state = save = 0;
- base64_encode_close (value, len, FALSE, pass64, &state, &save);
+ base64_encode_close (value, len, FALSE, (guchar *)pass64, &state, &save);
gnome_config_private_set_string (path, pass64);
g_free (path);
{
GtkWidget *vbox;
int type = msg->flags & E_PASSWORDS_REMEMBER_MASK;
- int noreply = msg->noreply;
+ guint noreply = msg->noreply;
AtkObject *a11y;
msg->noreply = 1;
static char *
decode_base64 (char *base64)
{
- char *plain, *pad = "==";
- int len, out, state, save;
+ guchar *plain;
+ char *pad = "==";
+ int len, out, state;
+ unsigned int save;
len = strlen (base64);
plain = g_malloc0 (len);
state = save = 0;
- out = base64_decode_step (base64, len, plain, &state, &save);
+ out = base64_decode_step ((guchar *)base64, len, plain, &state, &save);
if (len % 4) {
- base64_decode_step (pad, 4 - len % 4, plain + out,
+ base64_decode_step ((guchar *)pad, 4 - len % 4, plain + out,
&state, &save);
}
- return plain;
+ return (char *)plain;
}