From 4b7704155ec1b6d4cfe355122ec4d48bf03629fe Mon Sep 17 00:00:00 2001 From: Simon Zheng Date: Wed, 30 Nov 2005 08:09:56 +0000 Subject: Fix for 322733. 2005-11-30 Simon Zheng Fix for 322733. * copy-tool.c: (ct_selection_get): Removed printf() statement in order to avoid printing NULL point. (org_gnome_copy_tool_copy_address): Removed printf() statement. (ct_selection_clear_event): Removed printf() statement. svn path=/trunk/; revision=30709 --- plugins/copy-tool/ChangeLog | 8 +++++--- plugins/copy-tool/copy-tool.c | 12 +----------- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'plugins/copy-tool') diff --git a/plugins/copy-tool/ChangeLog b/plugins/copy-tool/ChangeLog index fc391e095a..f29bcf4662 100644 --- a/plugins/copy-tool/ChangeLog +++ b/plugins/copy-tool/ChangeLog @@ -1,9 +1,11 @@ -2005-11-29 Simon Zheng +2005-11-30 Simon Zheng Fix for 322733. - * copy-tool.c: (ct_selection_get): Move printf() statement after - NULL checking. + * copy-tool.c: (ct_selection_get): Removed printf() statement + in order to avoid printing NULL point. + (org_gnome_copy_tool_copy_address): Removed printf() statement. + (ct_selection_clear_event): Removed printf() statement. 2005-05-11 Not Zed diff --git a/plugins/copy-tool/copy-tool.c b/plugins/copy-tool/copy-tool.c index ad28dfde1a..b14d762346 100644 --- a/plugins/copy-tool/copy-tool.c +++ b/plugins/copy-tool/copy-tool.c @@ -35,8 +35,6 @@ org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t) g_free(address_uri); address_uri = g_strdup(t->uri); - printf("copying address '%s'\n", address_uri); - gtk_selection_owner_set(invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time()); gtk_selection_owner_set(invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time()); } @@ -44,12 +42,7 @@ org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t) static void ct_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, void *dummy) { - if (address_uri == NULL) - return; - - printf("get selection, address is '%s'\n", address_uri); - - if (strncmp (address_uri, "mailto:", 7) == 0) { + if (address_uri && (strncmp (address_uri, "mailto:", 7) == 0)) { CamelInternetAddress *cia = camel_internet_address_new(); CamelURL *curl; char *addr; @@ -60,7 +53,6 @@ ct_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint ti /* should it perhaps use address format? */ addr = camel_address_encode((CamelAddress *)cia); tmp = addr && addr[0] ? addr : address_uri + 7; - printf("get selection, setting to' %s'\n", tmp); gtk_selection_data_set(data, data->target, 8, tmp, strlen(tmp)); g_free(addr); @@ -72,8 +64,6 @@ ct_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint ti static void ct_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, void *dummy) { - printf("selection clear event\n"); - g_free(address_uri); address_uri = NULL; } -- cgit v1.2.3