From: Sean E. <sea...@us...> - 2002-08-11 06:42:19
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv5184/src Modified Files: Makefile.am aim.c buddy.c gaim.h gaimrc.c multi.c prefs.c ui.h Log Message: Pluginzed the ticker. the ticker will load itself if the old ticker option was set. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/Makefile.am,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Makefile.am 2 Aug 2002 04:48:04 -0000 1.45 +++ Makefile.am 11 Aug 2002 06:42:16 -0000 1.46 @@ -15,7 +15,6 @@ gaimrc.c \ gtkimhtml.c \ gtkspell.c \ - gtkticker.c \ html.c \ idle.c \ list.c \ @@ -29,7 +28,6 @@ prpl.c \ server.c \ sound.c \ - ticker.c \ util.c gaim_applet_DEPENDENCIES = @LIBOBJS@ $(STATIC_LINK_LIBS) gaim_applet_LDFLAGS = -export-dynamic @@ -49,7 +47,6 @@ gaimrc.c \ gtkimhtml.c \ gtkspell.c \ - gtkticker.c \ html.c \ idle.c \ list.c \ @@ -63,7 +60,6 @@ prpl.c \ server.c \ sound.c \ - ticker.c \ util.c gaim_DEPENDENCIES = @LIBOBJS@ $(STATIC_LINK_LIBS) gaim_LDFLAGS = -export-dynamic @@ -84,7 +80,6 @@ getopt1.c \ gtkimhtml.h \ gtkspell.h \ - gtkticker.h \ md5.h \ multi.h \ prpl.h \ Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.182 retrieving revision 1.183 diff -u -d -r1.182 -r1.183 --- aim.c 2 Aug 2002 04:28:32 -0000 1.182 +++ aim.c 11 Aug 2002 06:42:16 -0000 1.183 @@ -57,7 +57,6 @@ #include <signal.h> #endif #include "locale.h" -#include "gtkticker.h" #include "gtkspell.h" #ifndef USE_APPLET #include <getopt.h> @@ -82,8 +81,6 @@ char *opt_away_arg = NULL; char *opt_rcfile_arg = NULL; int opt_debug = 0; - -void BuddyTickerCreateWindow(void); #if HAVE_SIGNAL_H /* Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.319 retrieving revision 1.320 diff -u -d -r1.319 -r1.320 --- buddy.c 5 Aug 2002 07:33:08 -0000 1.319 +++ buddy.c 11 Aug 2002 06:42:16 -0000 1.320 @@ -94,9 +94,6 @@ GtkWidget *bpmenu; GtkWidget *buddies; -void BuddyTickerLogonTimeout(gpointer data); -void BuddyTickerLogoutTimeout(gpointer data); - typedef struct _GtkTreePixmaps GtkTreePixmaps; @@ -303,8 +300,6 @@ } update_num_group(gs); } else { - if (misc_options & OPT_MISC_BUDDY_TICKER) - BuddyTickerSetAlias(b->name, b->show); gtk_label_set_text(GTK_LABEL(bs->label), b->show); update_idle_time(bs); } @@ -589,19 +584,6 @@ show_log(NULL); } -void pressed_ticker(char *buddy) -{ - struct conversation *c; - - c = find_conversation(buddy); - - if (c != NULL) { - gdk_window_show(c->window->window); - } else { - c = new_conversation(buddy); - } -} - void pressed_alias_bs(GtkWidget *widget, struct buddy_show *bs) { alias_dialog_bud(find_buddy(bs->connlist->data, bs->name)); @@ -2110,8 +2092,6 @@ gtk_widget_show(b->pix); if (!(blist_options & OPT_BLIST_SHOW_PIXMAPS)) gtk_widget_hide(b->pix); - if (misc_options & OPT_MISC_BUDDY_TICKER) - BuddyTickerSetPixmap(b->name, pm, bm); gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); gtk_timeout_remove(b->log_timer); @@ -2346,10 +2326,6 @@ gtk_widget_hide(bs->pix); gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); gtk_widget_show(bs->pix); - if (misc_options & OPT_MISC_BUDDY_TICKER) { - BuddyTickerAddUser(b->name, b->show, pm, bm); - gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogonTimeout, b->name); - } gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); b->present = 2; @@ -2385,8 +2361,6 @@ gtk_widget_show(bs->pix); if (!(blist_options & OPT_BLIST_SHOW_PIXMAPS)) gtk_widget_hide(bs->pix); - if (misc_options & OPT_MISC_BUDDY_TICKER) - BuddyTickerSetPixmap(b->name, pm, bm); gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); } @@ -2415,10 +2389,6 @@ gtk_widget_hide(bs->pix); gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); gtk_widget_show(bs->pix); - if (misc_options & OPT_MISC_BUDDY_TICKER) { - BuddyTickerSetPixmap(b->name, pm, bm); - gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogoutTimeout, b->name); - } gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); if ((bs->sound != 1) && (im_options & OPT_IM_LOGON)) { Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.329 retrieving revision 1.330 diff -u -d -r1.329 -r1.330 --- gaim.h 2 Aug 2002 05:19:52 -0000 1.329 +++ gaim.h 11 Aug 2002 06:42:16 -0000 1.330 @@ -179,7 +179,7 @@ extern guint misc_options; #define OPT_MISC_DEBUG 0x00000001 #define OPT_MISC_BROWSER_POPUP 0x00000002 -#define OPT_MISC_BUDDY_TICKER 0x00000004 +#define OPT_MISC_BUDDY_TICKER 0x00000004 #define OPT_MISC_COOL_LOOK 0x00000008 #define OPT_MISC_STEALTH_TYPING 0x00000010 Index: gaimrc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaimrc.c,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- gaimrc.c 2 Aug 2002 04:52:48 -0000 1.97 +++ gaimrc.c 11 Aug 2002 06:42:16 -0000 1.98 @@ -683,7 +683,6 @@ { /* OPT_DISP_IGNORE_COLOUR */ 0x00000020, &convo_options, OPT_CONVO_IGNORE_COLOUR }, { /* OPT_DISP_SHOW_LOGON */ 0x00000040, &im_options, OPT_IM_LOGON }, { /* OPT_DISP_SHOW_SMILEY */ 0x00000100, &convo_options, OPT_CONVO_SHOW_SMILEY }, -{ /* OPT_DISP_SHOW_BUDDYTICKER */ 0x00000200, &misc_options, OPT_MISC_BUDDY_TICKER }, { /* OPT_DISP_COOL_LOOK */ 0x00000400, &misc_options, OPT_MISC_COOL_LOOK }, { /* OPT_DISP_CHAT_LOGON */ 0x00000800, &chat_options, OPT_CHAT_LOGON }, { /* OPT_DISP_NO_BUTTONS */ 0x00002000, &blist_options, OPT_BLIST_NO_BUTTONS }, @@ -828,6 +827,13 @@ if (!away_resend) away_resend = 120; + + if (misc_options & OPT_MISC_BUDDY_TICKER) { + char *tickerplugin = g_build_filename(LIBDIR, "ticker.so", NULL); + load_plugin(tickerplugin); + g_free(tickerplugin); + misc_options &= ~OPT_MISC_BUDDY_TICKER; + } } static void gaimrc_write_options(FILE *f) Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- multi.c 7 Aug 2002 23:25:33 -0000 1.121 +++ multi.c 11 Aug 2002 06:42:16 -0000 1.122 @@ -1482,8 +1482,6 @@ #else show_login(); #endif /* USE_APPLET */ - if (misc_options & OPT_MISC_BUDDY_TICKER) - BuddyTickerSignoff(); } struct aim_user *new_user(const char *name, int proto, int opts) Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.233 retrieving revision 1.234 diff -u -d -r1.233 -r1.234 --- prefs.c 8 Aug 2002 16:12:05 -0000 1.233 +++ prefs.c 11 Aug 2002 06:42:16 -0000 1.234 @@ -151,8 +151,6 @@ static void set_sound_options(); static void set_away_options(); -extern void BuddyTickerShow(); - #define PROXYHOST 0 #define PROXYPORT 1 #define PROXYTYPE 2 @@ -276,7 +274,6 @@ /* These shouldn't have to wait for user to click OK or APPLY or whatnot */ /* They really shouldn't be in preferences at all */ - gaim_button(_("Show Buddy Ticker"), &misc_options, OPT_MISC_BUDDY_TICKER, vbox); debugbutton = gaim_button(_("Show Debug Window"), &misc_options, OPT_MISC_DEBUG, vbox); gtk_widget_show (vbox); @@ -1967,9 +1964,6 @@ if (option == OPT_MISC_DEBUG) show_debug(); - if (option == OPT_MISC_BUDDY_TICKER) - BuddyTickerShow(); - save_prefs(); } @@ -2119,9 +2113,9 @@ gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); gtk_object_set_user_data(GTK_OBJECT(button), options); - /* So that the ticker and debug window happen immediately - * I don't think they should be "preferences," anyway. */ - if (options == &misc_options && (option == OPT_MISC_DEBUG || option == OPT_MISC_BUDDY_TICKER)) + /* So that the debug window happens immediately + * I don't think it should be "preferences," anyway. */ + if (options == &misc_options && option == OPT_MISC_DEBUG) gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option), (int *)option); else Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- ui.h 6 Aug 2002 03:02:18 -0000 1.45 +++ ui.h 11 Aug 2002 06:42:17 -0000 1.46 @@ -517,13 +517,4 @@ 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_ */ |