changeset 10335:20e750dd21a0

[gaim-migrate @ 11542] Whitespace and Windows warning removal from Kevin. Thanks mon ami! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 09 Dec 2004 02:55:18 +0000
parents 5aa8ed1ec91e
children 114d3ac8ff5a
files src/gtkutils.c src/win32/win32dep.c
diffstat 2 files changed, 32 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutils.c	Thu Dec 09 02:24:01 2004 +0000
+++ b/src/gtkutils.c	Thu Dec 09 02:55:18 2004 +0000
@@ -1400,13 +1400,13 @@
 			gaim_notify_error(NULL, NULL,
 					  _("Failed to load image"),
 					  str);
-				
+
 			g_error_free(err);
 			g_free(str);
 
 			return;
 		}
-		
+
 		gaim_buddy_icons_set_for_user(data->account, data->who, filedata, size);
 		g_free(filedata);
 		break;
@@ -1420,25 +1420,25 @@
 		if (!g_file_get_contents(data->filename, &filedata, &size,
 					 &err)) {
 			char *str;
-			
+
 			str = g_strdup_printf(_("The following error has occurred loading %s: %s"), data->filename, err->message);
 			gaim_notify_error(NULL, NULL,
 					  _("Failed to load image"),
 					  str);
-				
+
 			g_error_free(err);
 			g_free(str);
-			
+
 			return;
 		}
 		id = gaim_imgstore_add(filedata, size, data->filename);
 		g_free(filedata);
-		
+
 		gtk_text_buffer_get_iter_at_mark(GTK_IMHTML(gtkconv->entry)->text_buffer, &iter,
 						 gtk_text_buffer_get_insert(GTK_IMHTML(gtkconv->entry)->text_buffer));
 		gtk_imhtml_insert_image_at_iter(GTK_IMHTML(gtkconv->entry), id, &iter);
 		gaim_imgstore_unref(id);
-		
+
 		break;
 	}
 	free(data->filename);
@@ -1461,16 +1461,18 @@
 	GList *files = gaim_uri_list_extract_filenames(sd->data);
 	GaimConnection *gc = gaim_account_get_connection(account);
 	GaimPluginProtocolInfo *prpl_info = NULL;
+	gboolean file_send_ok = FALSE;
+#ifndef _WIN32
 	GaimDesktopItem *item;
-	gboolean file_send_ok = FALSE;
+#endif
 
 	g_return_if_fail(account != NULL);
 	g_return_if_fail(who != NULL);
-	
+
 	for(tmp = files; tmp != NULL ; tmp = g_list_next(tmp)) {
 		gchar *filename = tmp->data;
 		gchar *basename = g_path_get_basename(filename);
-			
+
 		/* Set the default action: don't send anything */
 		file_send_ok = FALSE;
 
@@ -1487,10 +1489,10 @@
 			str = g_strdup_printf(_("Cannot send folder %s."), basename);
 			gaim_notify_error(NULL, NULL,
 					  str,_("Gaim cannot transfer a folder. You will need to send the files within individually"));
-				
+
 			g_free(str);
-			
-		        continue;
+
+			continue;
 		}
 
 		/* Are we dealing with an image? */
@@ -1498,7 +1500,7 @@
 		if (pb) {
 			_DndData *data = g_malloc(sizeof(_DndData));
 			gboolean ft = FALSE, im = FALSE;
-			
+
 			data->who = g_strdup(who);
 			data->filename = g_strdup(filename);
 			data->account = account;
@@ -1507,34 +1509,34 @@
 				prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
 			if (prpl_info && prpl_info->options & OPT_PROTO_IM_IMAGE)
 				im = TRUE;
-						
+
 			if (prpl_info && prpl_info->send_file)
 				ft = prpl_info->can_receive_file(gc, who);
-						
+
 			if (im && ft)
 				gaim_request_choice(NULL, NULL,
 						    _("You have dragged an image"),
 						    _("You can send this image as a file transfer,"
 						      " embed it into this message, or use it as the buddy icon for this user."),
 						    DND_BUDDY_ICON, "OK", (GCallback)dnd_image_ok_callback,
-						    "Cancel", (GCallback)dnd_image_cancel_callback, data, 
+						    "Cancel", (GCallback)dnd_image_cancel_callback, data,
 						    _("Set as buddy icon"), DND_BUDDY_ICON,
-						    _("Send image file"), DND_FILE_TRANSFER, 
-						    _("Insert in message"), DND_IM_IMAGE, NULL);	
+						    _("Send image file"), DND_FILE_TRANSFER,
+						    _("Insert in message"), DND_IM_IMAGE, NULL);
 			else if (!(im || ft))
-				gaim_request_yes_no(NULL, NULL, _("You have dragged an image"), 
+				gaim_request_yes_no(NULL, NULL, _("You have dragged an image"),
 						       _("Would you like to set it as the buddy icon for this user?"),
 						    0, data, (GCallback)dnd_set_icon_ok_cb, (GCallback)dnd_set_icon_cancel_cb);
-			else 
+			else
 				gaim_request_choice(NULL, NULL,
 						    _("You have dragged an image"),
 						    ft ? _("You can send this image as a file transfer or"
 							   "embed it into this message, or use it as the buddy icon for this user.") :
 						    _("You can insert this image into this message, or use it as the buddy icon for this user"),
 						    DND_BUDDY_ICON, "OK", (GCallback)dnd_image_ok_callback,
-						    "Cancel", (GCallback)dnd_image_cancel_callback, data, 
+						    "Cancel", (GCallback)dnd_image_cancel_callback, data,
 						    _("Set as buddy icon"), DND_BUDDY_ICON,
-						    ft ? _("Send image file") : _("Insert in message"), ft ? DND_FILE_TRANSFER : DND_IM_IMAGE, NULL);	
+						    ft ? _("Send image file") : _("Insert in message"), ft ? DND_FILE_TRANSFER : DND_IM_IMAGE, NULL);
 			return;
 		}
 
@@ -1545,7 +1547,7 @@
 			char key[64];
 			char *dot;
 			const char *itemname = NULL;
-		
+
 #if GTK_CHECK_VERSION(2,6,0)
 			char **langs;
 			int i;
@@ -1558,7 +1560,7 @@
 #else
 			const char *lang = g_getenv("LANG");
 			dot = strchr(lang, '.');
-			if (dot) 
+			if (dot)
 				*dot = '\0';
 			g_snprintf(key, sizeof(key), "Name[%s]", lang);
 			itemname = gaim_desktop_item_get_string(item, key);
@@ -1574,11 +1576,11 @@
 			case GAIM_DESKTOP_ITEM_TYPE_LINK:
 				conv = gaim_conversation_new(GAIM_CONV_IM, account, who);
 				gtkconv =  GAIM_GTK_CONVERSATION(conv);
-				gtk_imhtml_insert_link(GTK_IMHTML(gtkconv->entry), 
-						       gtk_text_buffer_get_insert(GTK_IMHTML(gtkconv->entry)->text_buffer), 
+				gtk_imhtml_insert_link(GTK_IMHTML(gtkconv->entry),
+						       gtk_text_buffer_get_insert(GTK_IMHTML(gtkconv->entry)->text_buffer),
 						       gaim_desktop_item_get_string(item, "URL"), itemname);
 				break;
-			default: 
+			default:
 				/* I don't know if we really want to do anything here.  Most of the desktop item types are crap like
 				 * "MIME Type" (I have no clue how that would be a desktop item) and "Comment"... nothing we can really
 				 * send.  The only logical one is "Application," but do we really want to send a binary and nothing else?
--- a/src/win32/win32dep.c	Thu Dec 09 02:24:01 2004 +0000
+++ b/src/win32/win32dep.c	Thu Dec 09 02:55:18 2004 +0000
@@ -142,6 +142,7 @@
 	MyFlashWindowEx = (LPFNFLASHWINDOWEX)wgaim_find_and_loadproc("user32.dll", "FlashWindowEx" );
 }
 
+#if 0
 static char* base_name(char* path) {
         char *tmp = path;
         char *prev = NULL;
@@ -155,6 +156,7 @@
         else
                 return NULL;
 }
+#endif
 
 BOOL folder_exists(char *folder) {
         BOOL ret = FALSE;