From: Sean E. <sea...@us...> - 2002-08-07 23:25:37
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20115/src Modified Files: conversation.c gtkimhtml.c multi.c prpl.c Log Message: No longer do we build libicq.so -- run make in src/protocols/icq if you feel you need it for some reason (you don't--use OSCAR) TOC is no longer compiled statically by default. If you need it for some reason, you can load the libtoc.so plugin. Ari Pollak fixed up some #ifdefs to get IM images to work in gtk2, and he fixed a few gtk font warnings elsewhere. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.362 retrieving revision 1.363 diff -u -d -r1.362 -r1.363 --- conversation.c 7 Aug 2002 19:52:31 -0000 1.362 +++ conversation.c 7 Aug 2002 23:25:33 -0000 1.363 @@ -2628,7 +2628,9 @@ style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) gtk_widget_realize(label); +#if !GTK_CHECK_VERSION(1,3,0) gdk_font_unref(gtk_style_get_font(style)); +#endif gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); style->fg[0].red = 0x0000; style->fg[0].green = 0x9999; @@ -2688,7 +2690,9 @@ style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) gtk_widget_realize(label); +#if !GTK_CHECK_VERSION(1,3,0) gdk_font_unref(gtk_style_get_font(style)); +#endif gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); c->unseen = 0; gtk_widget_set_style(label, style); Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- gtkimhtml.c 5 Aug 2002 07:33:09 -0000 1.109 +++ gtkimhtml.c 7 Aug 2002 23:25:33 -0000 1.110 @@ -36,7 +36,7 @@ #include <locale.h> #endif -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) #include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf-loader.h> #else @@ -274,7 +274,7 @@ gint width,height; GtkIMHtml *imhtml; GtkIMHtmlBit *bit; -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) GdkPixbuf *pb; #endif }; @@ -2673,7 +2673,7 @@ g_free (copy); } else if ((bit->type == TYPE_SMILEY) || (bit->type == TYPE_IMG)) { -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (bit->img) { GdkPixbuf *imagepb = bit->img->pb; GdkPixbuf *tmp = NULL; @@ -3405,9 +3405,12 @@ char *tmp, *imagedata, *e; const gchar *alltext; struct im_image *img; -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) GdkPixbufLoader *load; GdkPixbuf *imagepb = NULL; +#if GTK_CHECK_VERSION(1,3,0) + GError *err; +#endif #endif NEW_BIT (NEW_TEXT_BIT); if (!id || !datasize) @@ -3447,16 +3450,22 @@ if (img->len) { img->data = g_malloc(img->len); memcpy(img->data, imagedata, img->len); -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) load = gdk_pixbuf_loader_new(); + +#if GTK_CHECK_VERSION(1,3,0) + if (!gdk_pixbuf_loader_write(load, imagedata, + img->len, &err)) +#else if (!gdk_pixbuf_loader_write(load, imagedata, img->len)) +#endif g_print("IM Image corrupt or unreadable.\n"); else imagepb = gdk_pixbuf_loader_get_pixbuf(load); img->pb = imagepb; #endif } -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (imagepb) { bit = g_new0 (GtkIMHtmlBit, 1); bit->type = TYPE_IMG; @@ -3677,7 +3686,7 @@ gdk_pixmap_unref (bit->pm); if (bit->bm) gdk_bitmap_unref (bit->bm); -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (bit->img) { g_free(bit->img->filename); g_free(bit->img->data); @@ -3701,7 +3710,7 @@ imhtml->click = g_list_remove (imhtml->click, imhtml->click->data); } -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) while (imhtml->im_images) { imhtml->im_images = g_list_remove(imhtml->im_images, imhtml->im_images->data); } @@ -3733,7 +3742,7 @@ imhtml->scroll_timer = 0; } -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) g_list_free(imhtml->im_images); imhtml->im_images = NULL; #endif Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- multi.c 5 Aug 2002 08:47:52 -0000 1.120 +++ multi.c 7 Aug 2002 23:25:33 -0000 1.121 @@ -944,9 +944,16 @@ u->gc->wants_to_die = TRUE; signoff(u->gc); } else { - do_error_dialog(_("You cannot log this account in; you do not have " - "the protocol it uses loaded, or the protocol does " - "not have a login function."), _("Login Error")); + if (u->protocol == PROTO_TOC) + do_error_dialog(_("You have attempted to login an IM account using the " + "TOC protocol. Because this protocol is inferior to " + "OSCAR, it is now compiled as a plugin by default. " + "To login, edit this account to use OSCAR or load the " + "TOC plugin."), _("Login Error")); + else + do_error_dialog(_("You cannot log this account in; you do not have " + "the protocol it uses loaded, or the protocol does " + "not have a login function."), _("Login Error")); } l = l->next; } Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- prpl.c 30 May 2002 17:49:03 -0000 1.54 +++ prpl.c 7 Aug 2002 23:25:33 -0000 1.55 @@ -74,6 +74,14 @@ " successfully loaded."), _("Protocol Error")); return; } + + if (p->protocol == PROTO_ICQ) + do_error_dialog(_("Gaim has loaded the ICQ plugin. This plugin has been deprecated. " + "As such, it was probably not compiled from the same version of the " + "source as this application was, and cannot be guaranteed to work. " + "It is reccomended that you use the AIM/ICQ protocol to connect to ICQ"), + _("Protocol Warning")); + p = g_new0(struct prpl, 1); pi(p); if ((old = find_prpl(p->protocol)) != NULL) |