Cleanups for e-d-s/libedataserverui

Kjartan Maraas <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1155742070.29241.1.camel@rivendell>
Hi.

This patch does the following:

- removes some unused code
- fixes compiler warnings

Cheers
Kjartan

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
libedataserverui-cleanups.patch (text/x-patch, 6 KB)
? .e-name-selector-list.c.swp
? test-contact-store
? test-name-selector
Index: e-destination-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-destination-store.c,v
retrieving revision 1.11
diff -u -p -r1.11 e-destination-store.c
--- e-destination-store.c	7 Aug 2006 10:57:45 -0000	1.11
+++ e-destination-store.c	16 Aug 2006 15:26:46 -0000
@@ -262,11 +262,11 @@ static gint
 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;
Index: e-name-selector-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-dialog.c,v
retrieving revision 1.34
diff -u -p -r1.34 e-name-selector-dialog.c
--- e-name-selector-dialog.c	7 Aug 2006 10:57:45 -0000	1.34
+++ e-name-selector-dialog.c	16 Aug 2006 15:26:46 -0000
@@ -127,7 +127,7 @@ e_name_selector_dialog_populate_categori
 
 	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;
@@ -155,6 +155,8 @@ e_name_selector_dialog_init (ENameSelect
 	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;
@@ -237,9 +239,6 @@ e_name_selector_dialog_init (ENameSelect
 
 	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);
Index: e-name-selector-entry.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-entry.c,v
retrieving revision 1.40
diff -u -p -r1.40 e-name-selector-entry.c
--- e-name-selector-entry.c	7 Aug 2006 08:44:34 -0000	1.40
+++ e-name-selector-entry.c	16 Aug 2006 15:26:46 -0000
@@ -535,12 +535,6 @@ utf8_casefold_collate_len (const gchar *
 	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)
 {
@@ -942,22 +936,6 @@ modify_destination_at_position (ENameSel
 }
 
 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;
@@ -1160,7 +1138,7 @@ user_delete_text (ENameSelectorEntry *na
 	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;
Index: e-name-selector-list.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-list.c,v
retrieving revision 1.2
diff -u -p -r1.2 e-name-selector-list.c
--- e-name-selector-list.c	24 Apr 2006 06:46:54 -0000	1.2
+++ e-name-selector-list.c	16 Aug 2006 15:26:46 -0000
@@ -366,12 +366,12 @@ enl_tree_button_press_event (GtkWidget *
 	GtkTreePath  *path;
 	PopupDeleteRowInfo *row_info;
 	GtkTreeIter   iter;
+	GtkTreeViewDropPosition pos;
 
   	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, &pos);
 	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;
@@ -655,7 +655,7 @@ e_name_selector_list_init (ENameSelector
 }
 
 ENameSelectorList *
-e_name_selector_list_new ()
+e_name_selector_list_new (void)
 {
 	return g_object_new (e_name_selector_list_get_type (), NULL);
 }
Index: e-passwords.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-passwords.c,v
retrieving revision 1.34
diff -u -p -r1.34 e-passwords.c
--- e-passwords.c	3 Aug 2006 06:23:01 -0000	1.34
+++ e-passwords.c	16 Aug 2006 15:26:46 -0000
@@ -97,8 +97,8 @@ struct _EPassMsg {
 	/* 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 */
 };
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.