gaim/gaim

1e22d08dd6d6
Parents 2858beb8ee92
Children 8b899c32d4bd
I am sick of people ignoring the "broken" label on the compile option to use
gtk2 in 0.59.x. secondly, there is no good reason to, cvs at its worse is
better gtk2 support than 0.59.x has now. third, 0.59.x will never have better
gtk2 support, its a bug fix series, not a development branch, and gtk2 support
is certainly a development act. for all of the above reasons i am treating the
gtk2 "support" in gtk1-stable as a bug, and removing it via a patch from faceprint
--- a/ChangeLog Sun Dec 29 02:29:03 2002 -0500
+++ b/ChangeLog Thu Jan 02 14:53:05 2003 -0500
@@ -1,5 +1,8 @@
Gaim: The Pimpin' Penguin IM Clone thats good for the soul!
+version 0.59.8:
+ * Ripped out all gtk2 support (Thanks Nathan Walp).
+
version 0.59.7 (12/21/2002):
* Yahoo i18n fix (Thanks Ethan Blanton).
* Fixed a bug in escaping saved passwords (Thanks
--- a/configure.ac Sun Dec 29 02:29:03 2002 -0500
+++ b/configure.ac Thu Jan 02 14:53:05 2003 -0500
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/aim.c)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([gaim], [0.59.7])
+AM_INIT_AUTOMAKE([gaim], [0.59.8])
AC_PREREQ([2.50])
@@ -107,7 +107,6 @@
AC_SUBST(STATIC_LINK_LIBS)
AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto })
-AC_ARG_ENABLE(gtk2, [ --enable-gtk2 compile using GTK 2 (BROKEN)],,enable_gtk2=no)
AC_ARG_ENABLE(gnome, [ --disable-gnome compile without Gnome bits],,enable_gnome=yes)
AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf],,enable_pixbuf=yes)
AC_ARG_ENABLE(panel, [ --enable-panel compile as a GNOME applet],,enable_panel=$enable_distrib)
@@ -129,32 +128,6 @@
AC_DEFINE(DEBUG)
fi
-if test "x$enable_gtk2" = "xyes" ; then
- dnl AM_PATH_GTK_2_0(1.3.10,[
- dnl enable_gnome=no
- dnl enable_pixbuf=no
- dnl CFLAGS="$CFLAGS -DGTK_ENABLE_BROKEN"
- dnl UI_LIBS="$UI_LIBS $GTK_LIBS"
- dnl ],enable_gtk2=no)
-
- AC_PATH_PROG(pkgcfg, pkg-config)
- if test "x$pkgcfg" = "x" ; then
- enable_gtk2=no
- else
- GTK_VER=`$pkgcfg gtk+-2.0 --modversion 2>/dev/null`
- if test "x$GTK_VER" = "x" ; then
- enable_gtk2=no
- else
- GTK_CFLAGS=`$pkgcfg gtk+-2.0 --cflags`
- CFLAGS="$CFLAGS -DGTK_ENABLE_BROKEN"
- GTK_LIBS=`$pkgcfg gtk+-2.0 --libs`
- UI_LIBS="$UI_LIBS $GTK_LIBS"
- enable_gnome=no
- enable_pixbuf=no
- fi
- fi
-fi
-
if test "x$enable_gnome" = "xyes" ; then
if test "x$enable_panel" = "xyes" ; then
GNOME_INIT(applets)
@@ -190,7 +163,7 @@
fi
fi
-if test "x$enable_gnome" != "xyes" -a "x$enable_gtk2" != "xyes" ; then
+if test "x$enable_gnome" != "xyes" ; then
AM_PATH_GLIB(1.2.5,,AC_MSG_ERROR([
*** GLib is required to build Gaim; please make sure you have the GLib
*** development headers installed. The latest version of GLib is
@@ -465,16 +438,10 @@
echo UI Library.................... : GNOME Panel
elif test "x$enable_gnome" = "xyes" ; then
echo UI Library.................... : GNOME App
-elif test "x$enable_gtk2" = "xyes" ; then
- echo UI Library.................... : GTK+ 2.0
else
echo UI Library.................... : GTK+ 1.2
fi
-if test "x$enable_gtk2" = "xyes" ; then
- echo Use GdkPixbuf................. : yes
-else
- echo Use GdkPixbuf................. : $use_pixbuf
-fi
+echo Use GdkPixbuf................. : $use_pixbuf
echo
echo Build with Plugin support..... : $enable_plugins
echo Build with Perl support....... : $enable_perl
--- a/configure.in Sun Dec 29 02:29:03 2002 -0500
+++ b/configure.in Thu Jan 02 14:53:05 2003 -0500
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/aim.c)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([gaim], [0.59.7])
+AM_INIT_AUTOMAKE([gaim], [0.59.8])
@@ -105,7 +105,6 @@
AC_SUBST(STATIC_LINK_LIBS)
AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto })
-AC_ARG_ENABLE(gtk2, [ --enable-gtk2 compile using GTK 2 (BROKEN)],,enable_gtk2=no)
AC_ARG_ENABLE(gnome, [ --disable-gnome compile without Gnome bits],,enable_gnome=yes)
AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf],,enable_pixbuf=yes)
AC_ARG_ENABLE(panel, [ --enable-panel compile as a GNOME applet],,enable_panel=$enable_distrib)
@@ -127,32 +126,6 @@
AC_DEFINE(DEBUG)
fi
-if test "x$enable_gtk2" = "xyes" ; then
- dnl AM_PATH_GTK_2_0(1.3.10,[
- dnl enable_gnome=no
- dnl enable_pixbuf=no
- dnl CFLAGS="$CFLAGS -DGTK_ENABLE_BROKEN"
- dnl UI_LIBS="$UI_LIBS $GTK_LIBS"
- dnl ],enable_gtk2=no)
-
- AC_PATH_PROG(pkgcfg, pkg-config)
- if test "x$pkgcfg" = "x" ; then
- enable_gtk2=no
- else
- GTK_VER=`$pkgcfg gtk+-2.0 --modversion 2>/dev/null`
- if test "x$GTK_VER" = "x" ; then
- enable_gtk2=no
- else
- GTK_CFLAGS=`$pkgcfg gtk+-2.0 --cflags`
- CFLAGS="$CFLAGS -DGTK_ENABLE_BROKEN"
- GTK_LIBS=`$pkgcfg gtk+-2.0 --libs`
- UI_LIBS="$UI_LIBS $GTK_LIBS"
- enable_gnome=no
- enable_pixbuf=no
- fi
- fi
-fi
-
if test "x$enable_gnome" = "xyes" ; then
if test "x$enable_panel" = "xyes" ; then
GNOME_INIT(applets)
@@ -188,7 +161,7 @@
fi
fi
-if test "x$enable_gnome" != "xyes" -a "x$enable_gtk2" != "xyes" ; then
+if test "x$enable_gnome" != "xyes" ; then
AM_PATH_GLIB(1.2.5,,AC_MSG_ERROR([
*** GLib is required to build Gaim; please make sure you have the GLib
*** development headers installed. The latest version of GLib is
@@ -461,16 +434,10 @@
echo UI Library.................... : GNOME Panel
elif test "x$enable_gnome" = "xyes" ; then
echo UI Library.................... : GNOME App
-elif test "x$enable_gtk2" = "xyes" ; then
- echo UI Library.................... : GTK+ 2.0
else
echo UI Library.................... : GTK+ 1.2
fi
-if test "x$enable_gtk2" = "xyes" ; then
- echo Use GdkPixbuf................. : yes
-else
- echo Use GdkPixbuf................. : $use_pixbuf
-fi
+echo Use GdkPixbuf................. : $use_pixbuf
echo
echo Build with Plugin support..... : $enable_plugins
echo Build with Perl support....... : $enable_perl
--- a/src/conversation.c Sun Dec 29 02:29:03 2002 -0500
+++ b/src/conversation.c Thu Jan 02 14:53:05 2003 -0500
@@ -2843,14 +2843,12 @@
gtk_text_set_editable(GTK_TEXT(entry), TRUE);
gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE);
-#if !GTK_CHECK_VERSION(1,3,0) /* This gtk bug should be fixed in gtk2 */
/* I hate hackish workarounds. According to Ari Pollak, a gtk bug causes Gaim to loop
* infinitely if the entry is smaller than the text height. This is a hackish workaround */
gtk_widget_set_usize(entry, conv_size.width - 20,
MAX(conv_size.entry_height,
gdk_char_height(gtk_widget_get_default_style()->font, '0') +
gtk_widget_get_default_style()->font->ascent + 1));
-#endif
gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback), c);
gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c);
--- a/src/gtkimhtml.c Sun Dec 29 02:29:03 2002 -0500
+++ b/src/gtkimhtml.c Thu Jan 02 14:53:05 2003 -0500
@@ -43,12 +43,8 @@
#include "pixmaps/broken.xpm"
#endif
-#if GTK_CHECK_VERSION(1,3,0)
-# define GTK_IMHTML_GET_STYLE_FONT(style) gtk_style_get_font (style)
-#else
-# define GTK_IMHTML_GET_STYLE_FONT(style) (style)->font
-# define GTK_CLASS_TYPE(class) (class)->type
-#endif
+#define GTK_IMHTML_GET_STYLE_FONT(style) (style)->font
+#define GTK_CLASS_TYPE(class) (class)->type
#include "pixmaps/angel.xpm"
#include "pixmaps/bigsmile.xpm"
@@ -351,11 +347,7 @@
static gint gtk_imhtml_motion_notify_event (GtkWidget *, GdkEventMotion *);
static void
-#if GTK_CHECK_VERSION(1,3,0)
-gtk_imhtml_finalize (GObject *object)
-#else
gtk_imhtml_destroy (GtkObject *object)
-#endif
{
GtkIMHtml *imhtml;
@@ -382,12 +374,8 @@
gtk_smiley_tree_destroy (imhtml->smiley_data);
-#if GTK_CHECK_VERSION(1,3,0)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-#else
if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-#endif
}
static void
@@ -419,13 +407,8 @@
&attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
-#if GTK_CHECK_VERSION(1,3,0)
- attributes.x = widget->style->xthickness + BORDER_SIZE;
- attributes.y = widget->style->xthickness + BORDER_SIZE;
-#else
attributes.x = widget->style->klass->xthickness + BORDER_SIZE;
attributes.y = widget->style->klass->xthickness + BORDER_SIZE;
-#endif
attributes.width = MAX (1, (gint) widget->allocation.width - (gint) attributes.x * 2);
attributes.height = MAX (1, (gint) widget->allocation.height - (gint) attributes.y * 2);
attributes.event_mask = gtk_widget_get_events (widget)
@@ -745,13 +728,8 @@
return;
if (GTK_WIDGET_HAS_FOCUS (widget)) {
-#if GTK_CHECK_VERSION(1,3,0)
- gtk_paint_focus (widget->style, widget->window, GTK_STATE_NORMAL, NULL, widget, "text",
- 0, 0, widget->allocation.width - 1, widget->allocation.height - 1);
-#else
gtk_paint_focus (widget->style, widget->window, NULL, widget, "text", 0, 0,
widget->allocation.width - 1, widget->allocation.height - 1);
-#endif
x = 1; y = 1; w = 2; h = 2;
}
@@ -768,11 +746,7 @@
GList *chunks;
struct line_info *line;
gfloat x, y;
-#if GTK_CHECK_VERSION(1,3,0)
- guint32 width, height;
-#else
gint width, height;
-#endif
x = GTK_LAYOUT (imhtml)->hadjustment->value;
y = GTK_LAYOUT (imhtml)->vadjustment->value;
@@ -825,7 +799,6 @@
gtk_imhtml_draw_focus (GTK_WIDGET (imhtml));
}
-#if !GTK_CHECK_VERSION(1,3,0)
static void
gtk_imhtml_draw (GtkWidget *widget,
GdkRectangle *area)
@@ -835,7 +808,6 @@
imhtml = GTK_IMHTML (widget);
gtk_imhtml_draw_exposed (imhtml);
}
-#endif
static void
gtk_imhtml_style_set (GtkWidget *widget,
@@ -982,22 +954,6 @@
widget->allocation = *allocation;
-#if GTK_CHECK_VERSION(1,3,0)
- new_xsize = MAX (1, (gint) allocation->width -
- (gint) (widget->style->xthickness + BORDER_SIZE) * 2);
- new_ysize = MAX (1, (gint) allocation->height -
- (gint) (widget->style->ythickness + BORDER_SIZE) * 2);
-
- if (GTK_WIDGET_REALIZED (widget)) {
- gint x = widget->style->xthickness + BORDER_SIZE;
- gint y = widget->style->ythickness + BORDER_SIZE;
- gdk_window_move_resize (widget->window,
- allocation->x, allocation->y,
- allocation->width, allocation->height);
- gdk_window_move_resize (layout->bin_window,
- x, y, new_xsize, new_ysize);
- }
-#else
new_xsize = MAX (1, (gint) allocation->width -
(gint) (widget->style->klass->xthickness + BORDER_SIZE) * 2);
new_ysize = MAX (1, (gint) allocation->height -
@@ -1012,7 +968,6 @@
gdk_window_move_resize (layout->bin_window,
x, y, new_xsize, new_ysize);
}
-#endif
layout->hadjustment->page_size = new_xsize;
layout->hadjustment->page_increment = new_xsize / 2;
@@ -2009,16 +1964,10 @@
static void
gtk_imhtml_class_init (GtkIMHtmlClass *class)
{
-#if GTK_CHECK_VERSION(1,3,0)
- GObjectClass *gobject_class;
-#endif
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkLayoutClass *layout_class;
-#if GTK_CHECK_VERSION(1,3,0)
- gobject_class = (GObjectClass*) class;
-#endif
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
layout_class = (GtkLayoutClass*) class;
@@ -2034,19 +1983,13 @@
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
-#if GTK_CHECK_VERSION(1,3,0)
- gobject_class->finalize = gtk_imhtml_finalize;
-#else
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
object_class->destroy = gtk_imhtml_destroy;
-#endif
widget_class->realize = gtk_imhtml_realize;
-#if !GTK_CHECK_VERSION(1,3,0)
widget_class->draw = gtk_imhtml_draw;
widget_class->draw_focus = gtk_imhtml_draw_focus;
-#endif
widget_class->style_set = gtk_imhtml_style_set;
widget_class->expose_event = gtk_imhtml_expose_event;
widget_class->size_allocate = gtk_imhtml_size_allocate;
@@ -2082,12 +2025,8 @@
static gchar*
gtk_imhtml_get_font_name (GdkFont *font)
{
-#if GTK_CHECK_VERSION(1,3,0)
- return "--*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*";
-#else
GdkFontPrivate *fontpriv = (GdkFontPrivate *) font;
return fontpriv->names->data;
-#endif
}
static GdkFont*
@@ -3567,17 +3506,6 @@
gtk_widget_set_usize (GTK_WIDGET (imhtml), -1, imhtml->y);
-#if GTK_CHECK_VERSION(1,3,0)
- if (!(options & GTK_IMHTML_NO_SCROLL) &&
- scrolldown &&
- (imhtml->y >= MAX (1,
- (GTK_WIDGET (imhtml)->allocation.height -
- (GTK_WIDGET (imhtml)->style->ythickness + BORDER_SIZE) * 2))))
- gtk_adjustment_set_value (vadj, imhtml->y -
- MAX (1, (GTK_WIDGET (imhtml)->allocation.height -
- (GTK_WIDGET (imhtml)->style->ythickness +
- BORDER_SIZE) * 2)));
-#else
if (!(options & GTK_IMHTML_NO_SCROLL) &&
scrolldown &&
(imhtml->y >= MAX (1,
@@ -3587,7 +3515,6 @@
MAX (1, (GTK_WIDGET (imhtml)->allocation.height -
(GTK_WIDGET (imhtml)->style->klass->ythickness +
BORDER_SIZE) * 2)));
-#endif
if (url) {
g_free (url);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gtkticker.c Thu Jan 02 14:53:05 2003 -0500
@@ -0,0 +1,612 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * GtkTicker Copyright 2000 Syd Logan
+ */
+
+#include "gtkticker.h"
+#include <gtk/gtk.h>
+
+static void gtk_ticker_compute_offsets (GtkTicker *ticker);
+static void gtk_ticker_class_init (GtkTickerClass *klass);
+static void gtk_ticker_init (GtkTicker *ticker);
+static void gtk_ticker_map (GtkWidget *widget);
+static void gtk_ticker_realize (GtkWidget *widget);
+static void gtk_ticker_size_request (GtkWidget *widget,
+ GtkRequisition *requisition);
+static void gtk_ticker_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+static void gtk_ticker_paint (GtkWidget *widget,
+ GdkRectangle *area);
+static void gtk_ticker_draw (GtkWidget *widget,
+ GdkRectangle *area);
+static gint gtk_ticker_expose (GtkWidget *widget,
+ GdkEventExpose *event);
+static void gtk_ticker_add_real (GtkContainer *container,
+ GtkWidget *widget);
+static void gtk_ticker_remove_real (GtkContainer *container,
+ GtkWidget *widget);
+static void gtk_ticker_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer callback_data);
+static GtkType gtk_ticker_child_type (GtkContainer *container);
+
+
+static GtkContainerClass *parent_class = NULL;
+
+
+GtkType
+gtk_ticker_get_type (void)
+{
+ static GtkType ticker_type = 0;
+
+ if (!ticker_type)
+ {
+ static const GtkTypeInfo ticker_info =
+ {
+ "GtkTicker",
+ sizeof (GtkTicker),
+ sizeof (GtkTickerClass),
+ (GtkClassInitFunc) gtk_ticker_class_init,
+ (GtkObjectInitFunc) gtk_ticker_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
+
+ ticker_type = gtk_type_unique (GTK_TYPE_CONTAINER, &ticker_info);
+ }
+
+ return ticker_type;
+}
+
+static void
+gtk_ticker_class_init (GtkTickerClass *class)
+{
+ GtkObjectClass *object_class;
+ GtkWidgetClass *widget_class;
+ GtkContainerClass *container_class;
+
+ object_class = (GtkObjectClass*) class;
+ widget_class = (GtkWidgetClass*) class;
+ container_class = (GtkContainerClass*) class;
+
+ parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
+
+ widget_class->map = gtk_ticker_map;
+ widget_class->realize = gtk_ticker_realize;
+ widget_class->size_request = gtk_ticker_size_request;
+ widget_class->size_allocate = gtk_ticker_size_allocate;
+ widget_class->draw = gtk_ticker_draw;
+ widget_class->expose_event = gtk_ticker_expose;
+
+ container_class->add = gtk_ticker_add_real;
+ container_class->remove = gtk_ticker_remove_real;
+ container_class->forall = gtk_ticker_forall;
+ container_class->child_type = gtk_ticker_child_type;
+}
+
+static GtkType
+gtk_ticker_child_type (GtkContainer *container)
+{
+ return GTK_TYPE_WIDGET;
+}
+
+static void
+gtk_ticker_init (GtkTicker *ticker)
+{
+ GTK_WIDGET_UNSET_FLAGS (ticker, GTK_NO_WINDOW);
+
+ ticker->interval = (guint) 200;
+ ticker->scootch = (guint) 2;
+ ticker->children = NULL;
+ ticker->timer = 0;
+ ticker->dirty = TRUE;
+}
+
+GtkWidget*
+gtk_ticker_new (void)
+{
+ GtkTicker *ticker;
+
+ ticker = gtk_type_new (GTK_TYPE_TICKER);
+ return GTK_WIDGET (ticker);
+}
+
+static void
+gtk_ticker_put (GtkTicker *ticker,
+ GtkWidget *widget)
+{
+ GtkTickerChild *child_info;
+
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER (ticker));
+ g_return_if_fail (widget != NULL);
+
+ child_info = g_new(GtkTickerChild, 1);
+ child_info->widget = widget;
+ child_info->x = 0;
+
+ gtk_widget_set_parent(widget, GTK_WIDGET (ticker));
+
+ ticker->children = g_list_append (ticker->children, child_info);
+
+ if (GTK_WIDGET_REALIZED (ticker))
+ gtk_widget_realize (widget);
+
+ if (GTK_WIDGET_VISIBLE (ticker) && GTK_WIDGET_VISIBLE (widget))
+ {
+ if (GTK_WIDGET_MAPPED (ticker))
+ gtk_widget_map (widget);
+
+ gtk_widget_queue_resize (GTK_WIDGET (ticker));
+ }
+}
+
+void
+gtk_ticker_set_interval (GtkTicker *ticker, gint interval )
+{
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER (ticker));
+
+ if ( interval < 0 )
+ interval = 200;
+ ticker->interval = interval;
+
+}
+
+guint
+gtk_ticker_get_interval (GtkTicker *ticker )
+{
+ g_return_val_if_fail (ticker != NULL, -1);
+ g_return_val_if_fail (GTK_IS_TICKER (ticker), -1);
+
+ return ticker->interval;
+}
+
+void
+gtk_ticker_set_scootch (GtkTicker *ticker, gint scootch )
+{
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER (ticker));
+
+ if ( scootch <= 0 )
+ scootch = 2;
+ ticker->scootch = scootch;
+ ticker->dirty = TRUE;
+}
+
+guint
+gtk_ticker_get_scootch (GtkTicker *ticker )
+{
+ g_return_val_if_fail (ticker != NULL, -1);
+ g_return_val_if_fail (GTK_IS_TICKER (ticker), -1);
+
+ return ticker->scootch;
+}
+
+void
+gtk_ticker_set_spacing (GtkTicker *ticker, gint spacing )
+{
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER (ticker));
+
+ if ( spacing < 0 )
+ spacing = 0;
+ ticker->spacing = spacing;
+ ticker->dirty = TRUE;
+
+}
+
+static int
+ticker_timeout( gpointer data )
+{
+ GtkTicker *ticker = (GtkTicker *) data;
+
+ if (GTK_WIDGET_VISIBLE (ticker))
+ gtk_widget_queue_resize (GTK_WIDGET (ticker));
+
+ return( TRUE );
+}
+
+void
+gtk_ticker_start_scroll(GtkTicker *ticker)
+{
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER (ticker));
+ if ( ticker->timer != 0 )
+ return;
+ ticker->timer = gtk_timeout_add(ticker->interval,
+ ticker_timeout, ticker);
+}
+
+void
+gtk_ticker_stop_scroll(GtkTicker *ticker)
+{
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER (ticker));
+ if ( ticker->timer == 0 )
+ return;
+ gtk_timeout_remove( ticker->timer );
+ ticker->timer = 0;
+
+}
+
+guint
+gtk_ticker_get_spacing (GtkTicker *ticker )
+{
+ g_return_val_if_fail (ticker != NULL, -1);
+ g_return_val_if_fail (GTK_IS_TICKER (ticker), -1);
+
+ return ticker->spacing;
+}
+
+static void
+gtk_ticker_map (GtkWidget *widget)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GList *children;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_TICKER (widget));
+
+ GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
+ ticker = GTK_TICKER (widget);
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ if (GTK_WIDGET_VISIBLE (child->widget) &&
+ !GTK_WIDGET_MAPPED (child->widget))
+ gtk_widget_map (child->widget);
+ }
+
+ gdk_window_show (widget->window);
+}
+
+static void
+gtk_ticker_realize (GtkWidget *widget)
+{
+ GdkWindowAttr attributes;
+ gint attributes_mask;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_TICKER (widget));
+
+ GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+
+ attributes.window_type = GDK_WINDOW_CHILD;
+ attributes.x = widget->allocation.x;
+ attributes.y = widget->allocation.y;
+ attributes.width = widget->allocation.width;
+ attributes.height = widget->allocation.height;
+ attributes.wclass = GDK_INPUT_OUTPUT;
+ attributes.visual = gtk_widget_get_visual (widget);
+ attributes.colormap = gtk_widget_get_colormap (widget);
+ attributes.event_mask = gtk_widget_get_events (widget);
+ attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK;
+
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+
+ widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
+ &attributes, attributes_mask);
+ gdk_window_set_user_data (widget->window, widget);
+
+ widget->style = gtk_style_attach (widget->style, widget->window);
+ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
+}
+
+static void
+gtk_ticker_size_request (GtkWidget *widget,
+ GtkRequisition *requisition)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GList *children;
+ GtkRequisition child_requisition;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_TICKER (widget));
+ g_return_if_fail (requisition != NULL);
+
+ ticker = GTK_TICKER (widget);
+ requisition->width = 0;
+ requisition->height = 0;
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ if (GTK_WIDGET_VISIBLE (child->widget))
+ {
+ gtk_widget_size_request (child->widget, &child_requisition);
+
+ requisition->height = MAX (requisition->height,
+ child_requisition.height);
+ requisition->width += child_requisition.width + ticker->spacing;
+ }
+ }
+ if ( requisition->width > ticker->spacing )
+ requisition->width -= ticker->spacing;
+
+ requisition->height += GTK_CONTAINER (ticker)->border_width * 2;
+ requisition->width += GTK_CONTAINER (ticker)->border_width * 2;
+}
+
+static void
+gtk_ticker_compute_offsets (GtkTicker *ticker)
+{
+ GtkTickerChild *child;
+ GtkRequisition child_requisition;
+ GList *children;
+ guint16 border_width;
+
+ g_return_if_fail (ticker != NULL);
+ g_return_if_fail (GTK_IS_TICKER(ticker));
+
+ border_width = GTK_CONTAINER (ticker)->border_width;
+
+ ticker->width = GTK_WIDGET(ticker)->allocation.width;
+ ticker->total = 0;
+ children = ticker->children;
+ while (children) {
+ child = children->data;
+
+ child->x = 0;
+ if (GTK_WIDGET_VISIBLE (child->widget)) {
+ gtk_widget_get_child_requisition (child->widget, &child_requisition);
+ child->offset = ticker->total;
+ ticker->total +=
+ child_requisition.width + border_width + ticker->spacing;
+ }
+ children = children->next;
+ }
+ ticker->dirty = FALSE;
+}
+
+static void
+gtk_ticker_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GtkAllocation child_allocation;
+ GtkRequisition child_requisition;
+ GList *children;
+ guint16 border_width;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_TICKER(widget));
+ g_return_if_fail (allocation != NULL);
+
+ ticker = GTK_TICKER (widget);
+
+ if ( GTK_WIDGET(ticker)->allocation.width != ticker->width )
+ ticker->dirty = TRUE;
+
+ if ( ticker->dirty == TRUE ) {
+ gtk_ticker_compute_offsets( ticker );
+ }
+
+ widget->allocation = *allocation;
+ if (GTK_WIDGET_REALIZED (widget))
+ gdk_window_move_resize (widget->window,
+ allocation->x,
+ allocation->y,
+ allocation->width,
+ allocation->height);
+
+ border_width = GTK_CONTAINER (ticker)->border_width;
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+ child->x -= ticker->scootch;
+
+ if (GTK_WIDGET_VISIBLE (child->widget)) {
+ gtk_widget_get_child_requisition (child->widget, &child_requisition);
+ child_allocation.width = child_requisition.width;
+ child_allocation.x = child->offset + border_width + child->x;
+ if ( ( child_allocation.x + child_allocation.width ) < GTK_WIDGET(ticker)->allocation.x ) {
+ if ( ticker->total >= GTK_WIDGET(ticker)->allocation.width ) {
+ child->x += GTK_WIDGET(ticker)->allocation.x + GTK_WIDGET(ticker)->allocation.width + ( ticker->total - ( GTK_WIDGET(ticker)->allocation.x + GTK_WIDGET(ticker)->allocation.width ) );
+ }
+ else {
+ child->x += GTK_WIDGET(ticker)->allocation.x + GTK_WIDGET(ticker)->allocation.width;
+ }
+ }
+ child_allocation.y = border_width;
+ child_allocation.height = child_requisition.height;
+ gtk_widget_size_allocate (child->widget, &child_allocation);
+ }
+ children = children->next;
+ }
+}
+
+static void
+gtk_ticker_paint (GtkWidget *widget,
+ GdkRectangle *area)
+{
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_TICKER (widget));
+ g_return_if_fail (area != NULL);
+
+ if (GTK_WIDGET_DRAWABLE (widget))
+ gdk_window_clear_area (widget->window, 0, 0, widget->allocation.width,
+ widget->allocation.height);
+}
+
+static void
+gtk_ticker_draw (GtkWidget *widget,
+ GdkRectangle *area)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GList *children;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_TICKER (widget));
+
+ if (GTK_WIDGET_DRAWABLE (widget))
+ {
+ ticker = GTK_TICKER (widget);
+ gtk_ticker_paint (widget, area);
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+ gtk_widget_draw (child->widget, NULL);
+ }
+ }
+}
+
+static gint
+gtk_ticker_expose (GtkWidget *widget, GdkEventExpose *event)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GdkEventExpose child_event;
+ GList *children;
+
+ g_return_val_if_fail (widget != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_TICKER (widget), FALSE);
+ g_return_val_if_fail (event != NULL, FALSE);
+
+ if (GTK_WIDGET_DRAWABLE (widget))
+ {
+ ticker = GTK_TICKER (widget);
+
+ child_event = *event;
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ if (GTK_WIDGET_NO_WINDOW (child->widget) &&
+ gtk_widget_intersect (child->widget, &event->area,
+ &child_event.area))
+ gtk_widget_event (child->widget, (GdkEvent*) &child_event);
+ }
+ }
+
+ return FALSE;
+}
+
+void
+gtk_ticker_add(GtkTicker *ticker, GtkWidget *widget)
+{
+ gtk_ticker_add_real( GTK_CONTAINER( ticker ), widget );
+ ticker->dirty = TRUE;
+}
+
+void
+gtk_ticker_remove(GtkTicker *ticker, GtkWidget *widget)
+{
+ gtk_ticker_remove_real( GTK_CONTAINER( ticker ), widget );
+ ticker->dirty = TRUE;
+}
+
+static void
+gtk_ticker_add_real(GtkContainer *container,
+ GtkWidget *widget)
+{
+ g_return_if_fail (container != NULL);
+ g_return_if_fail (GTK_IS_TICKER (container));
+ g_return_if_fail (widget != NULL);
+
+ gtk_ticker_put(GTK_TICKER (container), widget);
+}
+
+static void
+gtk_ticker_remove_real(GtkContainer *container,
+ GtkWidget *widget)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GList *children;
+
+ g_return_if_fail (container != NULL);
+ g_return_if_fail (GTK_IS_TICKER (container));
+ g_return_if_fail (widget != NULL);
+
+ ticker = GTK_TICKER (container);
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+
+ if (child->widget == widget)
+ {
+ gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+
+ gtk_widget_unparent (widget);
+
+ ticker->children = g_list_remove_link (ticker->children, children);
+ g_list_free (children);
+ g_free (child);
+
+ if (was_visible && GTK_WIDGET_VISIBLE (container))
+ gtk_widget_queue_resize (GTK_WIDGET (container));
+
+ break;
+ }
+
+ children = children->next;
+ }
+}
+
+static void
+gtk_ticker_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer callback_data)
+{
+ GtkTicker *ticker;
+ GtkTickerChild *child;
+ GList *children;
+
+ g_return_if_fail (container != NULL);
+ g_return_if_fail (GTK_IS_TICKER (container));
+ g_return_if_fail (callback != NULL);
+
+ ticker = GTK_TICKER (container);
+
+ children = ticker->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ (* callback) (child->widget, callback_data);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ui.h Thu Jan 02 14:53:05 2003 -0500
@@ -0,0 +1,498 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#ifdef USE_APPLET
+#include <applet-widget.h>
+#endif /* USE_APPLET */
+#ifdef USE_GNOME
+#include <gnome.h>
+#endif
+#if USE_PIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+#define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_DIALOG)
+#define GTK_OLD_EDITABLE(x) GTK_EDITABLE(x)
+#define gtk_style_get_font(style) (style)->font
+#define gtk_style_set_font(s, f) (s)->font = f
+
+#define DEFAULT_FONT_XFLD "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1"
+#define DEFAULT_FONT_FACE "helvetica"
+
+#define BROWSER_NETSCAPE 0
+#define BROWSER_KONQ 1
+#define BROWSER_MANUAL 2
+/*#define BROWSER_INTERNAL 3*/
+#define BROWSER_GNOME 4
+#define BROWSER_OPERA 5
+#define BROWSER_GALEON 6
+#define BROWSER_MOZILLA 7
+
+#define FACE_ANGEL 0
+#define FACE_BIGSMILE 1
+#define FACE_BURP 2
+#define FACE_CROSSEDLIPS 3
+#define FACE_CRY 4
+#define FACE_EMBARRASSED 5
+#define FACE_KISS 6
+#define FACE_MONEYMOUTH 7
+#define FACE_SAD 8
+#define FACE_SCREAM 9
+#define FACE_SMILE 10
+#define FACE_SMILE8 11
+#define FACE_THINK 12
+#define FACE_TONGUE 13
+#define FACE_WINK 14
+#define FACE_YELL 15
+#define FACE_TOTAL 16
+
+struct debug_window {
+ GtkWidget *window;
+ GtkWidget *entry;
+};
+
+/* XXX CUI: save_pos and window_size are used by gaimrc.c which is core.
+ * Need to figure out options saving. Same goes for several global variables as well. */
+struct save_pos {
+ int x;
+ int y;
+ int width;
+ int height;
+ int xoff;
+ int yoff;
+};
+
+struct window_size {
+ int width;
+ int height;
+ int entry_height;
+};
+
+/* struct buddy_chat went away and got merged with this. */
+struct conversation {
+ struct gaim_connection *gc;
+
+ /* stuff used for both IM and chat */
+ GtkWidget *window;
+ char name[80];
+ GtkWidget *toolbar;
+ GtkWidget *text;
+ GtkWidget *entry;
+ GtkWidget *italic;
+ GtkWidget *bold;
+ GtkWidget *underline;
+ GtkWidget *fgcolorbtn;
+ GtkWidget *bgcolorbtn;
+ GtkWidget *link;
+ GtkWidget *wood;
+ GtkWidget *log_button;
+ GtkWidget *strike;
+ GtkWidget *font;
+ GtkWidget *smiley;
+ GtkWidget *imagebtn;
+ GtkWidget *speaker;
+ GtkWidget *speaker_p;
+ GtkWidget *fg_color_dialog;
+ GtkWidget *bg_color_dialog;
+ GtkWidget *font_dialog;
+ GtkWidget *smiley_dialog;
+ GtkWidget *link_dialog;
+ GtkWidget *log_dialog;
+ int makesound;
+ char fontface[128];
+ char fontxfld[256];
+ int hasfont;
+ GdkColor bgcol;
+ int hasbg;
+ GdkColor fgcol;
+ int hasfg;
+
+ GList *send_history;
+ GString *history;
+
+ GtkWidget *send;
+
+ /* stuff used just for IM */
+ GtkWidget *lbox;
+ GtkWidget *bbox;
+ GtkWidget *sw;
+ GtkWidget *info;
+ GtkWidget *warn;
+ GtkWidget *block;
+ GtkWidget *add;
+ GtkWidget *sep1;
+ GtkWidget *sep2;
+ GtkWidget *menu;
+ GtkWidget *check;
+ GtkWidget *progress;
+ GSList *images; /* A list of filenames to embed */
+ gint unseen;
+ guint typing_timeout;
+ time_t type_again;
+
+ /* stuff used just for chat */
+ GList *in_room;
+ GList *ignored;
+ char *topic;
+ int id;
+ GtkWidget *count;
+ GtkWidget *list;
+ GtkWidget *whisper;
+ GtkWidget *invite;
+ GtkWidget *close;
+ GtkWidget *topic_text;
+
+ /* something to distinguish */
+ gboolean is_chat;
+
+#if USE_PIXBUF
+ /* buddy icon stuff. sigh. */
+ GtkWidget *icon;
+ GdkPixbufAnimation *anim;
+ guint32 icon_timer;
+ int frame;
+ GtkWidget *save_icon;
+#endif
+};
+
+struct log_conversation {
+ char name[80];
+ char filename[512];
+ struct log_conversation *next;
+};
+
+/* XXX CUI: away messages aren't really anything more than char* but we need two char*'s
+ * for the UI so that people can name their away messages when they save them. So these
+ * are really a UI function and struct away_message should be removed from the core. */
+struct away_message {
+ char name[80];
+ char message[2048];
+};
+
+/****************************
+ * I thought I'd place these here by the same reasoning used above (for away_message)
+ * This helps aleviate warnings from dialogs.c where the show_new_bp function references
+ * buddy_pounce in the parameter list when ui.h doesn't know about buddy_pounce
+ * **************************
+ */
+struct buddy_pounce {
+ char name[80];
+ char message[2048];
+ char command[2048];
+ char sound[2048];
+
+ char pouncer[80];
+ int protocol;
+
+ int options;
+};
+
+
+/* this is used for queuing messages received while away. This is really a UI function
+ * which is why the struct is here. */
+struct queued_message {
+ char name[80];
+ char *message;
+ time_t tm;
+ struct gaim_connection *gc;
+ int flags;
+ int len;
+};
+
+struct mod_user {
+ struct aim_user *user;
+
+ /* these are temporary */
+ int options;
+ int protocol;
+ char proto_opt[7][256];
+
+ /* stuff for modify window */
+ GtkWidget *mod;
+ GtkWidget *main;
+ GtkWidget *name;
+ GtkWidget *alias;
+ GtkWidget *pwdbox;
+ GtkWidget *pass;
+ GtkWidget *rempass;
+ GtkWidget *user_frame;
+ GtkWidget *proto_frame;
+ GList *opt_entries;
+
+ /* stuff for icon selection */
+ char iconfile[256];
+ GtkWidget *iconsel;
+ GtkWidget *iconentry;
+ GtkWidget *icondlg;
+
+ /* stuff for mail check prompt */
+ GtkWidget *checkmail;
+
+ /* stuff for register with server */
+ GtkWidget *register_user;
+};
+
+#define EDIT_GC 0
+#define EDIT_GROUP 1
+#define EDIT_BUDDY 2
+
+/* Globals in aim.c */
+extern GList *log_conversations; /* this should be moved to conversations.c */
+extern GSList *away_messages; /* this should be moved to away.c */
+extern GtkWidget *mainwindow;
+
+/* Globals in away.c */
+extern struct away_message *awaymessage;
+extern struct away_message *default_away;
+extern int auto_away;
+extern GtkWidget *awaymenu;
+extern GtkWidget *clistqueue;
+
+/* Globals in buddy.c */
+extern GtkWidget *buddies;
+extern GtkWidget *bpmenu;
+extern GtkWidget *blist;
+
+/* Globals in buddy_chat.c */
+extern GList *chats; /* list of all chats (only use for tabbing!) */
+extern GtkWidget *all_chats;
+extern GtkWidget *joinchat;
+
+/* Globals in conversation.c */
+extern GtkWidget *all_convos;
+
+/* Globals in dialog.c */
+extern char fontface[128];
+extern char fontxfld[256];
+extern int fontsize;
+extern GdkColor bgcolor;
+extern GdkColor fgcolor;
+extern int smiley_array[FACE_TOTAL];
+
+/* Globals in prefs.c */
+extern struct debug_window *dw;
+
+/* Globals in prpl.c */
+extern GtkWidget *protomenu;
+
+/* Globals in sound.c */
+extern gboolean mute_sounds;
+
+/* Functions in about.c */
+extern void show_about(GtkWidget *, void *);
+extern void gaim_help(GtkWidget *, void *);
+
+/* Functions in aim.c */
+extern void show_login();
+extern void gaim_setup(struct gaim_connection *gc);
+
+/* Functions in away.c */
+extern void rem_away_mess(GtkWidget *, struct away_message *);
+extern void do_away_message(GtkWidget *, struct away_message *);
+extern void do_away_menu();
+extern void away_list_unclicked(GtkWidget *, struct away_message *);
+extern void away_list_clicked(GtkWidget *, struct away_message *);
+extern void toggle_away_queue();
+extern void purge_away_queue();
+
+/* Functions in browser.c */
+extern void open_url(GtkWidget *, char *);
+extern void add_bookmark(GtkWidget *, char *);
+
+/* Functions in buddy.c */
+extern void handle_group_rename(struct group *, char *);
+extern void handle_buddy_rename(struct buddy *, char *);
+extern void destroy_buddy();
+extern void update_button_pix();
+extern void toggle_show_empty_groups();
+extern void update_all_buddies();
+extern void update_num_groups(void);
+extern void show_buddy_list();
+extern void refresh_buddy_window();
+extern void signoff_all();
+extern void do_im_back();
+extern void set_buddy(struct gaim_connection *, struct buddy *);
+extern void build_edit_tree();
+extern void do_bp_menu();
+extern void ui_add_buddy(struct gaim_connection *, struct group *, struct buddy *);
+extern void ui_remove_buddy(struct gaim_connection *, struct group *, struct buddy *);
+extern void ui_add_group(struct gaim_connection *, struct group *);
+extern void ui_remove_group(struct gaim_connection *, struct group *);
+extern void toggle_buddy_pixmaps();
+extern void gaim_separator(GtkWidget *);
+extern void redo_buddy_list(); /* you really shouldn't call this function */
+extern void set_blist_tab();
+extern void hide_buddy_list();
+
+/* Functions in buddy_chat.c */
+extern void join_chat();
+extern void chat_write(struct conversation *, char *, int, char *, time_t);
+extern void delete_chat(struct conversation *);
+extern void build_imchat_box(gboolean);
+extern void update_chat_button_pix();
+extern void update_im_button_pix();
+extern void update_chat_tabs();
+extern void update_im_tabs();
+extern void update_idle_times();
+extern void do_join_chat();
+
+/* Functions in conversation.c */
+extern void gaim_setup_imhtml(GtkWidget *);
+extern void update_convo_add_button(struct conversation *);
+extern void raise_convo_tab(struct conversation *);
+extern void set_convo_title(struct conversation *);
+extern void show_conv(struct conversation *);
+void set_convo_name(struct conversation *c, const char *nname);
+extern struct conversation *new_conversation(char *);
+extern void delete_conversation(struct conversation *);
+extern void surround(GtkWidget *, char *, char *);
+extern int is_logging(char *);
+extern void set_state_lock(int);
+extern void rm_log(struct log_conversation *);
+extern struct log_conversation *find_log_info(char *);
+extern void remove_tags(GtkWidget *, char *);
+extern void update_log_convs();
+extern void update_transparency();
+extern void update_font_buttons();
+extern void toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle);
+extern void do_bold(GtkWidget *, GtkWidget *);
+extern void do_italic(GtkWidget *, GtkWidget *);
+extern void do_underline(GtkWidget *, GtkWidget *);
+extern void do_strike(GtkWidget *, GtkWidget *);
+extern void do_small(GtkWidget *, GtkWidget *);
+extern void do_normal(GtkWidget *, GtkWidget *);
+extern void do_big(GtkWidget *, GtkWidget *);
+extern void set_font_face(char *, struct conversation *);
+extern void redo_convo_menus();
+extern void convo_menu_remove(struct gaim_connection *);
+extern void remove_icon_data(struct gaim_connection *);
+extern void got_new_icon(struct gaim_connection *, char *);
+extern void toggle_spellchk();
+extern void set_convo_gc(struct conversation *, struct gaim_connection *);
+extern void update_buttons_by_protocol(struct conversation *);
+extern void toggle_fg_color(GtkWidget *, struct conversation *);
+extern void toggle_smileys();
+extern void toggle_timestamps();
+extern void update_pixmaps();
+extern void im_tabize();
+extern void chat_tabize();
+extern void convo_tabize();
+extern void update_convo_color();
+extern void update_convo_font();
+extern void set_hide_icons();
+extern void set_convo_titles();
+extern void update_progress(struct conversation *, float);
+extern void show_typing(struct conversation *);
+extern gboolean reset_typing(char *);
+extern void set_anim();
+
+/* Functions in dialogs.c */
+extern void alias_dialog_bud(struct buddy *);
+extern void show_warn_dialog(struct gaim_connection *, char *);
+extern void show_im_dialog();
+extern void show_info_dialog();
+extern void show_add_buddy(struct gaim_connection *, char *, char *, char *);
+extern void show_add_group(struct gaim_connection *);
+extern void show_add_perm(struct gaim_connection *, char *, gboolean);
+extern void destroy_all_dialogs();
+extern void show_import_dialog();
+extern void show_export_dialog();
+extern void show_new_bp(char *, struct gaim_connection *, int, int, struct buddy_pounce *);
+extern void show_log(char *);
+extern void show_log_dialog(struct conversation *);
+extern void show_fgcolor_dialog(struct conversation *c, GtkWidget *color);
+extern void show_bgcolor_dialog(struct conversation *c, GtkWidget *color);
+extern void cancel_fgcolor(GtkWidget *widget, struct conversation *c);
+extern void cancel_bgcolor(GtkWidget *widget, struct conversation *c);
+extern void create_away_mess(GtkWidget *, void *);
+extern void show_ee_dialog(int);
+extern void show_add_link(GtkWidget *,struct conversation *);
+extern void show_smiley_dialog(struct conversation *, GtkWidget *);
+extern void close_smiley_dialog(GtkWidget *widget, struct conversation *c);
+extern void set_smiley_array(GtkWidget *widget, int smiley_type);
+extern void insert_smiley_text(GtkWidget *widget, struct conversation *c);
+extern void cancel_log(GtkWidget *, struct conversation *);
+extern void cancel_link(GtkWidget *, struct conversation *);
+extern void show_font_dialog(struct conversation *c, GtkWidget *font);
+extern void cancel_font(GtkWidget *widget, struct conversation *c);
+extern void apply_font(GtkWidget *widget, GtkFontSelection *fontsel);
+extern void set_color_selection(GtkWidget *selection, GdkColor color);
+extern void show_rename_group(GtkWidget *, struct group *);
+extern void show_rename_buddy(GtkWidget *, struct buddy *);
+extern void load_perl_script();
+extern void aol_icon(GdkWindow *);
+extern GtkWidget *picture_button(GtkWidget *, char *, char **);
+extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short);
+extern int file_is_dir(const char *, GtkWidget *);
+
+/* Functions in multi.c */
+extern void account_editor(GtkWidget *, GtkWidget *);
+
+/* Functions in plugins.c */
+#ifdef GAIM_PLUGINS
+extern void show_plugins(GtkWidget *, gpointer);
+extern void update_show_plugins(); /* this is a hack and will be removed */
+#endif
+
+/* Functions in prefs.c */
+extern void set_option(GtkWidget *, int *);
+extern void show_prefs();
+extern void show_debug();
+extern void update_color(GtkWidget *, GtkWidget *);
+extern void set_default_away(GtkWidget *, gpointer);
+extern void default_away_menu_init(GtkWidget *);
+extern void update_connection_dependent_prefs();
+extern void build_allow_list();
+extern void build_block_list();
+extern GtkWidget *prefs_away_list;
+extern GtkWidget *prefs_away_menu;
+extern GtkWidget *pref_fg_picture;
+extern GtkWidget *pref_bg_picture;
+
+/* Functions in prpl.c */
+extern void register_dialog();
+
+/* Functions in server.c */
+/* server.c is in desperate need need of a split */
+extern int find_queue_total_by_name(char *);
+
+/* Functions in sound.c */
+extern void play_sound(int);
+extern void play_file(char *);
+
+/* Fucntions in ticker.c */
+void SetTickerPrefs();
+void BuddyTickerSignOff();
+void BuddyTickerAddUser(char *, char *, GdkPixmap *, GdkBitmap *);
+void BuddyTickerSetPixmap(char *, GdkPixmap *, GdkBitmap *);
+void BuddyTickerSetAlias(char *, char *);
+void BuddyTickerSetNames();
+void BuddyTickerSignoff();
+
+#endif /* _UI_H_ */