changeset 7501:3e85281aef0b

[gaim-migrate @ 8114] Removal of two gtk2.2isms: 1) gdk_get_display_arg_name() is gtk2.2 only 2) g_str_has_suffix() is gtk2.2 only committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Thu, 13 Nov 2003 15:41:27 +0000
parents cedf025497c2
children beeb7c7d16b7
files src/log.c src/main.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/log.c	Thu Nov 13 15:14:14 2003 +0000
+++ b/src/log.c	Thu Nov 13 15:41:27 2003 +0000
@@ -207,7 +207,7 @@
 {
 	GDir *dir;
 	GList *list = NULL;
-	const char *filename;
+	const char *filename, *tmp;
 	char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account)));
 
 	const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO
@@ -221,7 +221,8 @@
 		return NULL;
 	}
 	while ((filename = g_dir_read_name(dir))) {
-		if (g_str_has_suffix(filename, ext)) {
+		tmp = filename + (strlen(filename) - strlen(ext));
+		if (tmp > filename && !strcmp(tmp, ext)) {
 			const char *l = filename;
 			struct tm time;
 			GaimLog *log;
--- a/src/main.c	Thu Nov 13 15:14:14 2003 +0000
+++ b/src/main.c	Thu Nov 13 15:41:27 2003 +0000
@@ -816,11 +816,13 @@
 		return 0;
 	}
 
+#if GTK_CHECK_VERSION(2,2,0)
 	if(! gui_check) {
 	    const char *display_name_arg = gdk_get_display_arg_name ();
 	    g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : " ");
 	    return 1;
 	}
+#endif
 
 	gaim_gtk_stock_init();