changeset 10924:7a82d86ab44a

[gaim-migrate @ 12695] Don't try to use a NULL value in printf. Also eliminate an outdated win32 GTK+ bug workaround hack. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 16 May 2005 18:24:30 +0000
parents accfd1f1f80d
children 993db24dae16
files src/gtkblist.c
diffstat 1 files changed, 3 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Mon May 16 00:47:41 2005 +0000
+++ b/src/gtkblist.c	Mon May 16 18:24:30 2005 +0000
@@ -218,30 +218,6 @@
 	gint original_width = width;
 	gint original_height = height;
 
-#ifdef _WIN32
-#if !GTK_CHECK_VERSION(2,4,8)
-	/* XXX: Kill this entire block someday.
-	 *
-	 * 2004-08-22: This bug fix should land in GTK+ version 2.4.8:
-	 *   http://bugzilla.gnome.org/show_bug.cgi?id=149013
-	 *
-	 * In Win32, GDK gets the workarea that isn't occupied by toolbars
-	 * (including the taskbar) and uses that region as the screen size.
-	 * GTK+ returns positions based on a screen size that ignores these
-	 * toolbars.  Since we want a pixmap with real X,Y coordinates, we
-	 * need to find out the offset from GTK's screen to GDK's screen,
-	 * and adjust the pixmaps we grab accordingly.  GDK will not deal
-	 * with toolbar position updates, so we're stuck restarting Gaim
-	 * if that happens. - SimGuy
-	 */
-	RECT *workarea = g_malloc(sizeof(RECT));
-	SystemParametersInfo(SPI_GETWORKAREA, 0, (void *)workarea, 0);
-	x += (workarea->left);
-	y += (workarea->top);
-	g_free(workarea);
-#endif
-#endif
-
 	if (x < 0) {
 		width += x;
 		x = 0;
@@ -2701,7 +2677,9 @@
 				g_free(tmp);
 				value = g_markup_escape_text(g_hash_table_lookup(
 										chat->components, pce->identifier), -1);
-				g_string_append_printf(str, "\n<b>%s</b> %s", name, value);
+				g_string_append_printf(str, "\n<b>%s</b> %s",
+							name ? name : "",
+							value ? value : "");
 				g_free(name);
 				g_free(value);
 			}