You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sean E. <sea...@us...> - 2002-08-07 23:25:35
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv20115 Modified Files: ChangeLog configure.ac configure.in 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: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.518 retrieving revision 1.519 diff -u -d -r1.518 -r1.519 --- ChangeLog 7 Aug 2002 19:52:31 -0000 1.518 +++ ChangeLog 7 Aug 2002 23:25:33 -0000 1.519 @@ -27,8 +27,11 @@ - Plugins dialog (Ari Pollak) - GtkIMHtml, sorta (Ari Pollak, Christian Hammond) - Buddy Icons + - IM Images * Notify.c plugin rewritten; check its configure dialog (Thanks, Etan Reisner) + * TOC no longer compiles statically by default--use OSCAR + * ICQ plugin no longer gets built--use OSCAR version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan) Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- configure.ac 2 Aug 2002 04:39:23 -0000 1.72 +++ configure.ac 7 Aug 2002 23:25:33 -0000 1.73 @@ -68,7 +68,7 @@ AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="oscar toc") if test "x$STATIC_PRPLS" = "xall" ; then - STATIC_PRPLS="gg icq irc jabber msn napster oscar toc yahoo zephyr" + STATIC_PRPLS="gg irc jabber msn napster oscar toc yahoo zephyr" fi AC_SUBST(STATIC_PRPLS) STATIC_LINK_LIBS= @@ -80,7 +80,6 @@ load_proto="$load_proto load_protocol(${i}_init, sizeof(struct prpl));" case $i in gg) static_gg=yes ;; - icq) static_icq=yes ;; irc) static_irc=yes ;; jabber) static_jabber=yes ;; msn) static_msn=yes ;; @@ -93,7 +92,6 @@ esac done AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes") -AM_CONDITIONAL(STATIC_ICQ, test "x$static_icq" = "xyes") AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes") AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes") AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") Index: configure.in =================================================================== RCS file: /cvsroot/gaim/gaim/configure.in,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- configure.in 9 Jul 2002 14:26:42 -0000 1.119 +++ configure.in 7 Aug 2002 23:25:33 -0000 1.120 @@ -67,7 +67,7 @@ AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="oscar toc") if test "x$STATIC_PRPLS" = "xall" ; then - STATIC_PRPLS="gg icq irc jabber msn napster oscar toc yahoo zephyr" + STATIC_PRPLS="gg irc jabber msn napster oscar toc yahoo zephyr" fi AC_SUBST(STATIC_PRPLS) STATIC_LINK_LIBS= @@ -79,7 +79,6 @@ load_proto="$load_proto load_protocol(${i}_init, sizeof(struct prpl));" case $i in gg) static_gg=yes ;; - icq) static_icq=yes ;; irc) static_irc=yes ;; jabber) static_jabber=yes ;; msn) static_msn=yes ;; @@ -92,7 +91,6 @@ esac done AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes") -AM_CONDITIONAL(STATIC_ICQ, test "x$static_icq" = "xyes") AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes") AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes") AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") |
From: Sean E. <sea...@us...> - 2002-08-07 22:38:02
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv32331/pixmaps Modified Files: block_small.xpm Log Message: icon fix from faceprint. Index: block_small.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/block_small.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- block_small.xpm 2 Aug 2002 05:01:07 -0000 1.1 +++ block_small.xpm 7 Aug 2002 22:37:58 -0000 1.2 @@ -108,17 +108,17 @@ " ", " ", " ", -" . + @ # $ ", -" % & * = - ; > , ' ", -" ) ! ~ { ] ^ / ( _ ", -" : < [ } | 1 2 3 4 5 6 ", -" 7 8 9 0 a b c d e f g ", -" h i j k l m n o p q r ", -" s t u v w x y z A B C ", -" D E F G H I J K L M N ", -" O P Q R S T U V W ", -" X Y Z ` . ..+.@.#. ", -" $.%.&.*. =.-.;. ", +" . + @ # $ ", +" % & * = - ; > , ' ", +" ) ! ~ { ] ^ / ( _ ", +" : < [ } | 1 2 3 4 5 6 ", +" 7 8 9 0 a b c d e f g ", +" h i j k l m n o p q r ", +" s t u v w x y z A B C ", +" D E F G H I J K L M N ", +" O P Q R S T U V W ", +" X Y Z ` ...+.@.#. ", +" $.%.&.*.=.-.;. ", " ", " ", " ", |
From: Sean E. <sea...@us...> - 2002-08-07 19:52:34
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv2895/src Modified Files: conversation.c Log Message: Buddy icons don't blow up anymore. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.361 retrieving revision 1.362 diff -u -d -r1.361 -r1.362 --- conversation.c 5 Aug 2002 07:33:08 -0000 1.361 +++ conversation.c 7 Aug 2002 19:52:31 -0000 1.362 @@ -3351,9 +3351,10 @@ gdk_pixbuf_unref(scale); gtk_pixmap_set(GTK_PIXMAP(c->icon), pm, bm); gdk_pixmap_unref(pm); + gtk_widget_queue_draw(c->icon); if (bm) gdk_bitmap_unref(bm); - delay = MAX(gdk_pixbuf_animation_iter_get_delay_time(c->iter), 13); + delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter) / 10; #else frames = gdk_pixbuf_animation_get_frames(c->anim); frame = g_list_nth_data(frames, c->frame); @@ -3441,7 +3442,7 @@ GdkPixbufFrame *frame; int delay; #if GTK_CHECK_VERSION(1,3,0) - delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter); + delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter) / 10; #else frames = gdk_pixbuf_animation_get_frames(c->anim); frame = g_list_nth_data(frames, c->frame); @@ -3616,7 +3617,7 @@ char filename[256]; FILE *file; #if GTK_CHECK_VERSION(1,3,0) - GError *err; + GError *err = NULL; #endif void *data; int len, delay; @@ -3657,6 +3658,10 @@ #if GTK_CHECK_VERSION(1,3,0) c->anim = gdk_pixbuf_animation_new_from_file(filename, &err); + if (err) { + debug_printf("Buddy icon error: %s\n", err->message); + g_error_free(err); + } #else c->anim = gdk_pixbuf_animation_new_from_file(filename); #endif @@ -3667,15 +3672,24 @@ return; #if GTK_CHECK_VERSION(1,3,0) + if (gdk_pixbuf_animation_is_static_image(c->anim)) { + c->iter = NULL; + delay = 0; + buf = gdk_pixbuf_animation_get_static_image(c->anim); + } else { c->iter = gdk_pixbuf_animation_get_iter(c->anim, NULL); buf = gdk_pixbuf_animation_iter_get_pixbuf(c->iter); + delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter); + delay = delay / 10; + } + sf = SCALE(c->anim); scale = gdk_pixbuf_scale_simple(buf, MAX(gdk_pixbuf_get_width(buf) * sf / gdk_pixbuf_animation_get_width(c->anim), 1), MAX(gdk_pixbuf_get_height(buf) * sf / gdk_pixbuf_animation_get_height(c->anim), 1), GDK_INTERP_NEAREST); - delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter); + #else c->frame = 1; frames = gdk_pixbuf_animation_get_frames(c->anim); @@ -3693,8 +3707,8 @@ delay = 0; } #endif - if (delay) - c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); + if (delay) + c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); |
From: Sean E. <sea...@us...> - 2002-08-07 19:52:34
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv2895 Modified Files: ChangeLog Log Message: Buddy icons don't blow up anymore. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.517 retrieving revision 1.518 diff -u -d -r1.517 -r1.518 --- ChangeLog 5 Aug 2002 07:33:08 -0000 1.517 +++ ChangeLog 7 Aug 2002 19:52:31 -0000 1.518 @@ -26,6 +26,7 @@ - Preferences dialog - Plugins dialog (Ari Pollak) - GtkIMHtml, sorta (Ari Pollak, Christian Hammond) + - Buddy Icons * Notify.c plugin rewritten; check its configure dialog (Thanks, Etan Reisner) |
From: Sean E. <sea...@us...> - 2002-08-06 03:02:22
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv28850/src Modified Files: prefs.c ui.h Log Message: A clean-up patch from Ari Pollak. Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.231 retrieving revision 1.232 diff -u -d -r1.231 -r1.232 --- prefs.c 5 Aug 2002 08:04:39 -0000 1.231 +++ prefs.c 6 Aug 2002 03:02:18 -0000 1.232 @@ -32,6 +32,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> +#include <ctype.h> #include <gtk/gtk.h> #include "gtkimhtml.h" #include "gaim.h" @@ -89,7 +90,7 @@ GtkWidget *fontseld = NULL; #if GTK_CHECK_VERSION(1,3,0) -GtkTreeStore *prefs_away_store = NULL; +GtkListStore *prefs_away_store = NULL; #endif static int sound_row_sel = 0; @@ -108,7 +109,6 @@ static GtkWidget *show_color_pref(GtkWidget *, gboolean); static void delete_prefs(GtkWidget *, void *); void set_default_away(GtkWidget *, gpointer); -static void set_font_option(GtkWidget *w, int option); struct debug_window *dw = NULL; static GtkWidget *prefs = NULL; @@ -126,7 +126,8 @@ sound_entry = NULL; browser_entry = NULL; debugbutton=NULL; - gtk_widget_destroy(sounddialog); + if(sounddialog) + gtk_widget_destroy(sounddialog); #if GTK_CHECK_VERSION(1,3,0) g_object_unref(G_OBJECT(prefs_away_store)); #endif @@ -1359,7 +1360,6 @@ { GtkTreeIter iter; GValue val = { 0, }; - gchar *message; gchar buffer[BUF_LONG]; char *tmp; struct away_message *am; @@ -1386,16 +1386,17 @@ GtkTreePath *path; GtkTreeStore *ts = GTK_TREE_STORE(gtk_tree_view_get_model(tv)); GtkTreeSelection *sel = gtk_tree_view_get_selection(tv); + GtkTreeModel *model = GTK_TREE_MODEL(prefs_away_store); GValue val = { 0, }; - if (! gtk_tree_selection_get_selected (sel, &prefs_away_store, &iter)) + if (! gtk_tree_selection_get_selected (sel, &model, &iter)) return; - gtk_tree_model_get_value (prefs_away_store, &iter, 1, &val); + gtk_tree_model_get_value (GTK_TREE_MODEL(prefs_away_store), &iter, 1, &val); am = g_value_get_pointer (&val); gtk_imhtml_clear(GTK_IMHTML(away_text)); rem_away_mess(NULL, am); - gtk_list_store_remove(ts, &iter); - path = gtk_tree_path_new_first(); + gtk_list_store_remove(GTK_LIST_STORE(ts), &iter); + path = gtk_tree_path_new_first(); gtk_tree_selection_select_path(sel, path); } @@ -1440,8 +1441,8 @@ GtkWidget *away_message_page() { GtkWidget *ret; GtkWidget *frame; - GtkWidget *vbox, *hbox, *bbox; - GtkWidget *button, *image, *label; + GtkWidget *vbox, *hbox; + GtkWidget *button; GtkWidget *sw; #if GTK_CHECK_VERSION(1,3,0) @@ -1467,6 +1468,10 @@ sw = gtk_scrolled_window_new(NULL,NULL); away_text = gtk_imhtml_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); +#if GTK_CHECK_VERSION(1,3,0) + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), + GTK_SHADOW_IN); +#endif gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); #if GTK_CHECK_VERSION(1,3,0) @@ -2172,13 +2177,14 @@ void apply_color_dlg(GtkWidget *w, gpointer d) { - gdouble color[3]; - if ((int)d == 1) { #if GTK_CHECK_VERSION(1,3,0) + if ((int)d == 1) { gtk_color_selection_get_current_color(GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), &fgcolor_new); #else + gdouble color[3]; + if ((int)d == 1) { gtk_color_selection_get_color(GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), color); @@ -2306,7 +2312,7 @@ gtk_widget_set_sensitive(browser_entry, TRUE); else gtk_widget_set_sensitive(browser_entry, FALSE); - } else if (option == &sound_options_new) { + } else if (*option == sound_options_new) { if (opt == OPT_SOUND_CMD) gtk_widget_set_sensitive(sndcmd, TRUE); else Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- ui.h 5 Aug 2002 07:56:37 -0000 1.44 +++ ui.h 6 Aug 2002 03:02:18 -0000 1.45 @@ -477,6 +477,7 @@ extern void show_privacy_options(); extern void build_allow_list(); extern void build_block_list(); +extern void destroy_fontsel(GtkWidget *w, gpointer d); /* Functions in multi.c */ extern void account_editor(GtkWidget *, GtkWidget *); |
From: Sean E. <sea...@us...> - 2002-08-06 03:02:22
|
Update of /cvsroot/gaim/gaim/doc In directory usw-pr-cvs1:/tmp/cvs-serv28850/doc Modified Files: CREDITS Log Message: A clean-up patch from Ari Pollak. Index: CREDITS =================================================================== RCS file: /cvsroot/gaim/gaim/doc/CREDITS,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- CREDITS 30 Mar 2002 10:22:29 -0000 1.36 +++ CREDITS 6 Aug 2002 03:02:18 -0000 1.37 @@ -74,5 +74,7 @@ license X-Chat under the GPL so that I could learn to be as cool as them. -EW +OctaneZ is so cool. + Thanks to Jeroen van der Vegt for the initial smiley plugin and images. |
From: Sean E. <sea...@us...> - 2002-08-05 08:47:55
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7309/src Modified Files: multi.c Log Message: I changed my mind on deryni's patch for now. Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- multi.c 5 Aug 2002 07:44:11 -0000 1.119 +++ multi.c 5 Aug 2002 08:47:52 -0000 1.120 @@ -1075,7 +1075,6 @@ struct signon_meter { struct gaim_connection *gc; - GtkWidget *label; GtkWidget *button; GtkWidget *progress; GtkWidget *status; @@ -1112,12 +1111,6 @@ gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), 1); gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, "Done."); - - gtk_widget_hide(meter->label); - gtk_widget_hide(meter->button); - gtk_widget_hide(meter->progress); - gtk_widget_hide(meter->status); - meter_win->active_count--; if (meter_win->active_count == 0) { gtk_widget_destroy(meter_win->window); @@ -1241,6 +1234,7 @@ static struct signon_meter *register_meter(struct gaim_connection *gc, GtkWidget *widget, GtkTable *table, gint *rows) { GtkWidget *graphic; + GtkWidget *label; GtkWidget *nest_vbox; GString *name_to_print; struct signon_meter *meter; @@ -1257,8 +1251,8 @@ nest_vbox = gtk_vbox_new (FALSE, 0); name_to_print = g_string_prepend(name_to_print, "Signon: "); - meter->label = gtk_label_new (name_to_print->str); - gtk_misc_set_alignment (GTK_MISC (meter->label), 0, 0.5); + label = gtk_label_new (name_to_print->str); + gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); meter->status = gtk_statusbar_new(); gtk_widget_set_usize(meter->status, 250, 0); @@ -1270,7 +1264,7 @@ gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->label), FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (label), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0); gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); |
From: Sean E. <sea...@us...> - 2002-08-05 08:04:47
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26262/src Modified Files: prefs.c Log Message: This button ordering is better. Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.230 retrieving revision 1.231 diff -u -d -r1.230 -r1.231 --- prefs.c 5 Aug 2002 07:33:09 -0000 1.230 +++ prefs.c 5 Aug 2002 08:04:39 -0000 1.231 @@ -1818,16 +1818,18 @@ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); gtk_container_add (GTK_CONTAINER(vbox), hbox); gtk_widget_show (hbox); + #if GTK_CHECK_VERSION(1,3,0) - button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + button = gtk_button_new_from_stock (GTK_STOCK_OK); #else - button = picture_button(prefs, _("Close"), cancel_xpm); + button = picture_button(prefs, _("OK"), join_xpm); #endif - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); if (misc_options & OPT_MISC_COOL_LOOK) gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); gtk_widget_show(button); + #if GTK_CHECK_VERSION(1,3,0) button = gtk_button_new_from_stock (GTK_STOCK_APPLY); #else @@ -1839,12 +1841,13 @@ gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); gtk_widget_show(button); + #if GTK_CHECK_VERSION(1,3,0) - button = gtk_button_new_from_stock (GTK_STOCK_OK); + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); #else - button = picture_button(prefs, _("OK"), join_xpm); + button = picture_button(prefs, _("Close"), cancel_xpm); #endif - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); + gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); if (misc_options & OPT_MISC_COOL_LOOK) gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
From: Sean E. <sea...@us...> - 2002-08-05 07:56:40
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23563/src Modified Files: proxy.c ui.h Log Message: A small patch by Ethan Blanton to fix proxy problems. We conform! Index: proxy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/proxy.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- proxy.c 31 May 2002 02:00:41 -0000 1.42 +++ proxy.c 5 Aug 2002 07:56:37 -0000 1.43 @@ -222,8 +222,8 @@ return fd; } -#define HTTP_GOODSTRING "HTTP/1.0 200 Connection established" -#define HTTP_GOODSTRING2 "HTTP/1.1 200 Connection established" +#define HTTP_GOODSTRING "HTTP/1.0 200" +#define HTTP_GOODSTRING2 "HTTP/1.1 200" static void http_canread(gpointer data, gint source, GaimInputCondition cond) { Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- ui.h 2 Aug 2002 04:52:48 -0000 1.43 +++ ui.h 5 Aug 2002 07:56:37 -0000 1.44 @@ -81,6 +81,11 @@ #define FACE_YELL 15 #define FACE_TOTAL 16 +#define GAIM_PIXMAP_ICON 0 +#define GAIM_PIXMAP_ERROR 1 +#define GAIM_PIXMAP_WARNING 2 +#define GAIM_PIXMAP_ + struct debug_window { GtkWidget *window; GtkWidget *entry; |
From: Sean E. <sea...@us...> - 2002-08-05 07:56:40
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv23563/pixmaps Modified Files: Makefile.am Log Message: A small patch by Ethan Blanton to fix proxy problems. We conform! Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/Makefile.am,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- Makefile.am 2 Aug 2002 05:36:37 -0000 1.72 +++ Makefile.am 5 Aug 2002 07:56:37 -0000 1.73 @@ -137,21 +137,21 @@ else - if GNOMEAPPLET +if GNOMEAPPLET - gnomedata = `@GNOME_CONFIG@ --datadir` +gnomedata = `@GNOME_CONFIG@ --datadir` - gaimdistpmdir = $(gnomedata)/pixmaps/gaim - gaimdistpm_DATA = away.png connect.png msgpend.png offline.png online.png +gaimdistpmdir = $(gnomedata)/pixmaps/gaim +gaimdistpm_DATA = away.png connect.png msgpend.png offline.png online.png - gaimpixmapdir = $(gnomedata)/pixmaps - gaimpixmap_DATA = gaim.png +gaimpixmapdir = $(gnomedata)/pixmaps +gaimpixmap_DATA = gaim.png - else +else - pixmapdir = $(datadir)/pixmaps - pixmap_DATA = gaim.png +pixmapdir = $(datadir)/pixmaps +pixmap_DATA = gaim.png - endif +endif endif |
From: Sean E. <sea...@us...> - 2002-08-05 07:44:14
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv20937/src/protocols/msn Modified Files: msn.c Log Message: A patch by Etan. A patch by Ben. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- msn.c 17 Jun 2002 02:47:49 -0000 1.87 +++ msn.c 5 Aug 2002 07:44:11 -0000 1.88 @@ -587,7 +587,9 @@ { char *cur; GString *ret = g_string_new(NULL); - char colors[3]; + guint colorbuf; + char *colors = (char *)(&colorbuf); + cur = strstr(mime, "FN="); if (cur && (*(cur = cur + 3) != ';')) { @@ -611,7 +613,7 @@ cur = strstr(mime, "CO="); if (cur && (*(cur = cur + 3) != ';')) { - if (sscanf (cur, "%x;", (int*)(&colors)) == 1) { + if (sscanf (cur, "%x;", &colorbuf) == 1) { char tag[MSN_BUF_LEN]; g_snprintf(tag, sizeof(tag), "<FONT COLOR=\"#%02hhx%02hhx%02hhx\">", colors[0], colors[1], colors[2]); ret = g_string_append(ret, tag); |
From: Sean E. <sea...@us...> - 2002-08-05 07:44:14
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20937/src Modified Files: multi.c Log Message: A patch by Etan. A patch by Ben. Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- multi.c 2 Aug 2002 04:52:48 -0000 1.118 +++ multi.c 5 Aug 2002 07:44:11 -0000 1.119 @@ -1075,6 +1075,7 @@ struct signon_meter { struct gaim_connection *gc; + GtkWidget *label; GtkWidget *button; GtkWidget *progress; GtkWidget *status; @@ -1111,6 +1112,12 @@ gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), 1); gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, "Done."); + + gtk_widget_hide(meter->label); + gtk_widget_hide(meter->button); + gtk_widget_hide(meter->progress); + gtk_widget_hide(meter->status); + meter_win->active_count--; if (meter_win->active_count == 0) { gtk_widget_destroy(meter_win->window); @@ -1234,7 +1241,6 @@ static struct signon_meter *register_meter(struct gaim_connection *gc, GtkWidget *widget, GtkTable *table, gint *rows) { GtkWidget *graphic; - GtkWidget *label; GtkWidget *nest_vbox; GString *name_to_print; struct signon_meter *meter; @@ -1251,8 +1257,8 @@ nest_vbox = gtk_vbox_new (FALSE, 0); name_to_print = g_string_prepend(name_to_print, "Signon: "); - label = gtk_label_new (name_to_print->str); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); + meter->label = gtk_label_new (name_to_print->str); + gtk_misc_set_alignment (GTK_MISC (meter->label), 0, 0.5); meter->status = gtk_statusbar_new(); gtk_widget_set_usize(meter->status, 250, 0); @@ -1264,7 +1270,7 @@ gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (label), FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->label), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0); gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); |
From: Sean E. <sea...@us...> - 2002-08-05 07:33:12
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv18277 Modified Files: ChangeLog Log Message: I had terrible days today and yesterday--a really terrible weekend. No cool stuff from me--the prefs away message page works a bit better. Ari and Chip both sent some patches to make things work a bit better in GTK 2, and Etan rewrote the notify plugin so it's really cool now! Thanks, guys! Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.516 retrieving revision 1.517 diff -u -d -r1.516 -r1.517 --- ChangeLog 2 Aug 2002 04:53:42 -0000 1.516 +++ ChangeLog 5 Aug 2002 07:33:08 -0000 1.517 @@ -22,6 +22,12 @@ * Optionally uniquely colorize nicks in chats * Changed some default options * Updated desktop icon. + * GTK2 Goodness: + - Preferences dialog + - Plugins dialog (Ari Pollak) + - GtkIMHtml, sorta (Ari Pollak, Christian Hammond) + * Notify.c plugin rewritten; check its configure dialog (Thanks, + Etan Reisner) version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan) |
From: Sean E. <sea...@us...> - 2002-08-05 07:33:12
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv18277/src Modified Files: buddy.c conversation.c dialogs.c gtkimhtml.c plugins.c prefs.c Log Message: I had terrible days today and yesterday--a really terrible weekend. No cool stuff from me--the prefs away message page works a bit better. Ari and Chip both sent some patches to make things work a bit better in GTK 2, and Etan rewrote the notify plugin so it's really cool now! Thanks, guys! Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.318 retrieving revision 1.319 diff -u -d -r1.318 -r1.319 --- buddy.c 2 Aug 2002 04:52:42 -0000 1.318 +++ buddy.c 5 Aug 2002 07:33:08 -0000 1.319 @@ -2233,7 +2233,9 @@ gtk_widget_show(bs->idle); style = gtk_style_new(); +#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(bs->label->style))); for (i = 0; i < 5; i++) style->fg[i] = bs->idle->style->fg[i]; Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.360 retrieving revision 1.361 diff -u -d -r1.360 -r1.361 --- conversation.c 2 Aug 2002 04:52:47 -0000 1.360 +++ conversation.c 5 Aug 2002 07:33:08 -0000 1.361 @@ -2601,7 +2601,9 @@ return; if (c->unseen == -1) return; style = gtk_style_new(); +#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))); gtk_widget_set_style(label, style); gtk_style_unref(style); @@ -3574,7 +3576,8 @@ gtk_timeout_remove(c->icon_timer); c->icon_timer = 0; #if GTK_CHECK_VERSION(1,3,0) - g_object_unref(c->iter); + if(c->iter) + g_object_unref(c->iter); #else c->frame = 0; #endif Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.327 retrieving revision 1.328 diff -u -d -r1.327 -r1.328 --- dialogs.c 2 Aug 2002 04:52:48 -0000 1.327 +++ dialogs.c 5 Aug 2002 07:33:09 -0000 1.328 @@ -556,7 +556,30 @@ GtkWidget *d; GtkWidget *label; GtkWidget *close; - + GtkWidget *img = NULL; + /* +#if GTK_CHECK_VERSION(1,3,0) + char *filename; + switch (type){ + case GAIM_LOGO: + filename = g_build_filename(DATADIR, "pixmaps", "gaim", "gaim.png", NULL); + break; + case GAIM_INFO: + filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_info.png", NULL); + break; + case GAIM_WARNING: + filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_warning.png", NULL); + break; + case GAIM_ERROR: + filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_error.png", NULL); + break; + case GAIM_QUESTION: + filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL); + break; + } + img = gtk_image_new_from_file(filename); +#endif + */ d = gtk_dialog_new(); gtk_window_set_policy(GTK_WINDOW(d), FALSE, FALSE, TRUE); @@ -3524,7 +3547,27 @@ gtk_container_add(GTK_CONTAINER(sw), ca->text); gtk_widget_show(ca->text); - if (dummy && GTK_LIST(prefs_away_list)->selection) { + +#if GTK_CHECK_VERSION(1,3,0) + if (dummy) { + struct away_message *amt; + GtkTreeIter iter; + int pos = 0; + GtkListStore *ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(dummy))); + GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(dummy)); + GValue val = { 0, }; + + if (! gtk_tree_selection_get_selected (sel, &ls, &iter)) + return; + gtk_tree_model_get_value (ls, &iter, 1, &val); + amt = g_value_get_pointer (&val); + gtk_entry_set_text(GTK_ENTRY(ca->entry), amt->name); + gtk_editable_insert_text(GTK_EDITABLE(ca->text), amt->message, + strlen(amt->message), &pos); + ca->mess = amt; + } +#else + if (dummy && GTK_LIST(prefs_away_list)->selection) { GtkWidget *item = GTK_LIST(prefs_away_list)->selection->data; struct away_message *amt = gtk_object_get_user_data(GTK_OBJECT(item)); int pos = 0; @@ -3533,6 +3576,8 @@ strlen(amt->message), &pos); ca->mess = amt; } +#endif + hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(tbox), hbox, FALSE, FALSE, 0); Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- gtkimhtml.c 15 May 2002 02:21:21 -0000 1.108 +++ gtkimhtml.c 5 Aug 2002 07:33:09 -0000 1.109 @@ -1660,7 +1660,7 @@ { struct imgsv *is = data; struct im_image *img = is->img; - gchar *filename; + const gchar *filename; FILE *f; filename = gtk_file_selection_get_filename(GTK_FILE_SELECTION(is->savedialog)); g_print("Saving %s\n", filename); @@ -2076,11 +2076,11 @@ #define RGSTRY 13 #define ENCDNG 14 -static gchar* +static const gchar* gtk_imhtml_get_font_name (GdkFont *font) { #if GTK_CHECK_VERSION(1,3,0) - return "--*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*"; + return gdk_x11_font_get_name(font); #else GdkFontPrivate *fontpriv = (GdkFontPrivate *) font; return fontpriv->names->data; @@ -2095,7 +2095,7 @@ gint fontsize) { GdkFont *default_font = imhtml->default_font; - gchar *default_name; + const gchar *default_name; gchar **xnames; gchar **pos; gchar *tmp = NULL; Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- plugins.c 9 Mar 2002 18:39:46 -0000 1.87 +++ plugins.c 5 Aug 2002 07:33:09 -0000 1.88 @@ -87,9 +87,16 @@ static void destroy_plugins(GtkWidget *, gpointer); static void load_file(GtkWidget *, gpointer); static void load_which_plugin(GtkWidget *, gpointer); -static void list_clicked(GtkWidget *, struct gaim_plugin *); void update_show_plugins(); static void hide_plugins(GtkWidget *, gpointer); +static void clear_plugin_display(); +#if GTK_CHECK_VERSION(1,3,0) +static struct gaim_plugin *get_selected_plugin(GtkWidget *); +static void select_plugin(GtkWidget *w, struct gaim_plugin *p); +static void list_clicked(GtkWidget *, gpointer); +#else +static void list_clicked(GtkWidget *, struct gaim_plugin *); +#endif /* ------------------ Code Below ---------------------------- */ @@ -138,20 +145,31 @@ static void load_which_plugin(GtkWidget *w, gpointer data) { char *file; - - file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(plugin_dialog)); + struct gaim_plugin *p; + + file = (char *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(plugin_dialog)); if (file_is_dir(file, plugin_dialog)) { return; } if (file) - load_plugin(file); + p = load_plugin(file); + else + p = NULL; if (plugin_dialog) gtk_widget_destroy(plugin_dialog); plugin_dialog = NULL; update_show_plugins(); + /* Select newly loaded plugin */ + if(p == NULL) + return; +#if GTK_CHECK_VERSION(1,3,0) + select_plugin(pluglist, p); +#else + gtk_list_select_item(GTK_LIST(pluglist), g_list_index(plugins, p)); +#endif } void show_plugins(GtkWidget *w, gpointer data) @@ -167,7 +185,16 @@ GtkWidget *label; GtkWidget *add; GtkWidget *close; - +#if GTK_CHECK_VERSION(1,3,0) + /* stuff needed for GtkTreeView *pluglist */ + GtkListStore *store; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkTreeSelection *selection; + /* needed for GtkTextView *plugtext */ + GtkTextBuffer *buffer; +#endif + if (plugwindow) return; @@ -176,7 +203,9 @@ gtk_widget_realize(plugwindow); aol_icon(plugwindow->window); gtk_window_set_title(GTK_WINDOW(plugwindow), _("Gaim - Plugins")); +#if !GTK_CHECK_VERSION(1,3,0) gtk_widget_set_usize(plugwindow, 515, 300); +#endif gtk_signal_connect(GTK_OBJECT(plugwindow), "destroy", GTK_SIGNAL_FUNC(hide_plugins), NULL); mainvbox = gtk_vbox_new(FALSE, 0); @@ -191,7 +220,9 @@ /* Left side: frame with list of plugin file names */ frame = gtk_frame_new(_("Loaded Plugins")); gtk_box_pack_start(GTK_BOX(tophbox), frame, FALSE, FALSE, 0); +#if !GTK_CHECK_VERSION(1,3,0) gtk_widget_set_usize(frame, 140, -1); +#endif gtk_container_set_border_width(GTK_CONTAINER(frame), 6); gtk_frame_set_label_align(GTK_FRAME(frame), 0.05, 0.5); gtk_widget_show(frame); @@ -201,14 +232,37 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_show(scrolledwindow); +#if GTK_CHECK_VERSION(1,3,0) + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow), + GTK_SHADOW_IN); + + /* Create & show plugin list */ + store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); + pluglist = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(pluglist), FALSE); + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes("text", + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(pluglist), column); + gtk_container_add(GTK_CONTAINER(scrolledwindow), pluglist); + g_object_unref(G_OBJECT(store)); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pluglist)); + g_signal_connect(G_OBJECT(selection), "changed", + G_CALLBACK(list_clicked), + NULL); +#else pluglist = gtk_list_new(); gtk_list_set_selection_mode(GTK_LIST(pluglist), GTK_SELECTION_BROWSE); - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), pluglist); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), + pluglist); +#endif /* GTK_CHECK_VERSION */ + gtk_widget_show(pluglist); /* Right side: frame with description and the filepath of plugin */ - frame = gtk_frame_new(_("Description")); + frame = gtk_frame_new(_("Selected Plugin")); gtk_box_pack_start(GTK_BOX(tophbox), frame, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); gtk_frame_set_label_align(GTK_FRAME(frame), 0.05, 0.5); @@ -223,11 +277,27 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_show(scrolledwindow); - +#if GTK_CHECK_VERSION(1,3,0) + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow), + GTK_SHADOW_IN); + + /* Create & show the plugin description widget */ + plugtext = gtk_text_view_new(); + gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(plugtext), GTK_WRAP_WORD); + gtk_text_view_set_editable(GTK_TEXT_VIEW(plugtext), FALSE); + gtk_container_add(GTK_CONTAINER(scrolledwindow), plugtext); + gtk_widget_set_size_request(GTK_WIDGET(plugtext), -1, 200); + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(plugtext)); + gtk_text_buffer_create_tag(buffer, "bold", "weight", + PANGO_WEIGHT_BOLD, NULL); +#else plugtext = gtk_text_new(NULL, NULL); - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), plugtext); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), + plugtext); gtk_text_set_word_wrap(GTK_TEXT(plugtext), TRUE); gtk_text_set_editable(GTK_TEXT(plugtext), FALSE); +#endif gtk_widget_show(plugtext); hbox = gtk_hbox_new(FALSE, 5); @@ -245,7 +315,7 @@ gtk_widget_show(plugentry); /* Build the bottom button bar */ - bothbox = gtk_hbox_new(TRUE, 10); + bothbox = gtk_hbox_new(TRUE, 3); gtk_box_pack_start(GTK_BOX(mainvbox), bothbox, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); gtk_widget_show(bothbox); @@ -255,28 +325,28 @@ add = picture_button(plugwindow, _("Load"), gnome_add_xpm); gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(load_file), NULL); - gtk_box_pack_start(GTK_BOX(bothbox), add, TRUE, TRUE, 0); + gtk_box_pack_start_defaults(GTK_BOX(bothbox), add); gtk_tooltips_set_tip(tooltips, add, _("Load a plugin from a file"), ""); config = picture_button(plugwindow, _("Configure"), gnome_preferences_xpm); gtk_widget_set_sensitive(config, FALSE); - gtk_box_pack_start(GTK_BOX(bothbox), config, TRUE, TRUE, 0); + gtk_box_pack_start_defaults(GTK_BOX(bothbox), config); gtk_tooltips_set_tip(tooltips, config, _("Configure settings of the selected plugin"), ""); reload = picture_button(plugwindow, _("Reload"), refresh_xpm); gtk_widget_set_sensitive(reload, FALSE); gtk_signal_connect(GTK_OBJECT(reload), "clicked", GTK_SIGNAL_FUNC(plugin_reload_cb), NULL); - gtk_box_pack_start(GTK_BOX(bothbox), reload, TRUE, TRUE, 0); + gtk_box_pack_start_defaults(GTK_BOX(bothbox), reload); gtk_tooltips_set_tip(tooltips, reload, _("Reload the selected plugin"), ""); unload = picture_button(plugwindow, _("Unload"), gnome_remove_xpm); gtk_signal_connect(GTK_OBJECT(unload), "clicked", GTK_SIGNAL_FUNC(unload_plugin_cb), pluglist); - gtk_box_pack_start(GTK_BOX(bothbox), unload, TRUE, TRUE, 0); + gtk_box_pack_start_defaults(GTK_BOX(bothbox), unload); gtk_tooltips_set_tip(tooltips, unload, _("Unload the selected plugin"), ""); close = picture_button(plugwindow, _("Close"), cancel_xpm); gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(hide_plugins), NULL); - gtk_box_pack_start(GTK_BOX(bothbox), close, TRUE, TRUE, 0); + gtk_box_pack_start_defaults(GTK_BOX(bothbox), close); gtk_tooltips_set_tip(tooltips, close, _("Close this window"), ""); update_show_plugins(); @@ -287,66 +357,84 @@ { GList *plugs = plugins; struct gaim_plugin *p; +#if GTK_CHECK_VERSION(1,3,0) + int pnum = 0; + GtkListStore *store; + GtkTreeIter iter; +#else GtkWidget *label; GtkWidget *list_item; GtkWidget *hbox; - +#endif + if (plugwindow == NULL) return; +#if GTK_CHECK_VERSION(1,3,0) + store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(pluglist))); + gtk_list_store_clear(store); +#else gtk_list_clear_items(GTK_LIST(pluglist), 0, -1); +#endif while (plugs) { p = (struct gaim_plugin *)plugs->data; +#if GTK_CHECK_VERSION(1,3,0) + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, plugin_makelistname(p->handle), -1); + gtk_list_store_set(store, &iter, 1, pnum++, -1); +#else label = gtk_label_new(plugin_makelistname(p->handle)); - hbox = gtk_hbox_new(FALSE, 0); /* for left justification */ + hbox = gtk_hbox_new(FALSE, 0); /* for left justification */ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); list_item = gtk_list_item_new(); gtk_container_add(GTK_CONTAINER(list_item), hbox); - gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(list_clicked), p); + gtk_signal_connect(GTK_OBJECT(list_item), "select", + GTK_SIGNAL_FUNC(list_clicked), p); gtk_object_set_user_data(GTK_OBJECT(list_item), p); - + gtk_widget_show(hbox); gtk_widget_show(label); gtk_container_add(GTK_CONTAINER(pluglist), list_item); gtk_widget_show(list_item); - +#endif plugs = g_list_next(plugs); } - /* Clear the display if nothing's selected */ - if (GTK_LIST(pluglist)->selection == NULL) { - guint text_len = gtk_text_get_length(GTK_TEXT(plugtext)); - gtk_text_set_point(GTK_TEXT(plugtext), 0); - gtk_text_forward_delete(GTK_TEXT(plugtext), text_len); - gtk_entry_set_text(GTK_ENTRY(plugentry), ""); - - gtk_widget_set_sensitive(config, FALSE); - gtk_widget_set_sensitive(reload, FALSE); - gtk_widget_set_sensitive(unload, FALSE); - } + clear_plugin_display(); } static void unload_plugin_cb(GtkWidget *w, gpointer data) { - GList *i; struct gaim_plugin *p; - +#if GTK_CHECK_VERSION(1,3,0) + p = get_selected_plugin(pluglist); + if(p == NULL) + return; +#else + GList *i; + i = GTK_LIST(pluglist)->selection; if (i == NULL) return; p = gtk_object_get_user_data(GTK_OBJECT(i->data)); - +#endif unload_plugin(p); update_show_plugins(); } static void plugin_reload_cb(GtkWidget *w, gpointer data) { - GList *i; struct gaim_plugin *p; +#if GTK_CHECK_VERSION(1,3,0) + p = get_selected_plugin(pluglist); + if(p == NULL) + return; + p = reload_plugin(p); +#else + GList *i; i = GTK_LIST(pluglist)->selection; if (i == NULL) @@ -354,35 +442,77 @@ /* Just pass off plugin to the actual function */ p = reload_plugin(gtk_object_get_user_data(GTK_OBJECT(i->data))); - +#endif update_show_plugins(); /* Try and reselect the plugin in list */ if (!pluglist) return; +#if GTK_CHECK_VERSION(1,3,0) + select_plugin(pluglist, p); +#else gtk_list_select_item(GTK_LIST(pluglist), g_list_index(plugins, p)); +#endif } + +#if GTK_CHECK_VERSION(1,3,0) +static void list_clicked(GtkWidget *w, gpointer data) +#else static void list_clicked(GtkWidget *w, struct gaim_plugin *p) +#endif { + void (*gaim_plugin_config)(); +#if GTK_CHECK_VERSION(1,3,0) + struct gaim_plugin *p; + GtkTextBuffer *buffer; + GtkTextIter iter; +#else gchar *temp; guint text_len; - void (*gaim_plugin_config)(); +#endif - if (confighandle != 0) + if (confighandle != 0) { gtk_signal_disconnect(GTK_OBJECT(config), confighandle); + confighandle = 0; + } + +#if GTK_CHECK_VERSION(1,3,0) + p = get_selected_plugin(pluglist); + if(p == NULL) { /* No selected plugin */ + clear_plugin_display(); + return; + } + + /* Set text and filepath widgets */ + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(plugtext)); + gtk_text_buffer_set_text(buffer, "", -1); + gtk_text_buffer_get_start_iter(buffer, &iter); + + gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, "Name:", -1, + "bold", NULL); + gtk_text_buffer_insert(buffer, &iter, " ", -1); + gtk_text_buffer_insert(buffer, &iter, (p->name != NULL) ? p->name : "", -1); + gtk_text_buffer_insert(buffer, &iter, "\n\n", -1); + gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, "Description:", -1, + "bold", NULL); + gtk_text_buffer_insert(buffer, &iter, "\n", -1); + gtk_text_buffer_insert(buffer, &iter, + (p->description != NULL) ? p->description : "", -1); + gtk_entry_set_text(GTK_ENTRY(plugentry), g_module_name(p->handle)); +#else text_len = gtk_text_get_length(GTK_TEXT(plugtext)); gtk_text_set_point(GTK_TEXT(plugtext), 0); gtk_text_forward_delete(GTK_TEXT(plugtext), text_len); temp = g_strdup_printf("Name: %s\n\nDescription:\n%s", - (p->name != NULL) ? p->name : "", - (p->description != NULL) ? p->description : ""); + (p->name != NULL) ? p->name : "", + (p->description != NULL) ? p->description : ""); gtk_text_insert(GTK_TEXT(plugtext), NULL, NULL, NULL, temp, -1); g_free(temp); gtk_entry_set_text(GTK_ENTRY(plugentry), g_module_name(p->handle)); - +#endif /* Find out if this plug-in has a configuration function */ if (g_module_symbol(p->handle, "gaim_plugin_config", (gpointer *)&gaim_plugin_config)) { confighandle = gtk_signal_connect(GTK_OBJECT(config), "clicked", @@ -409,7 +539,7 @@ static const gchar *plugin_makelistname(GModule *module) { static gchar filename[PATHSIZE]; - gchar *filepath = g_module_name(module); + gchar *filepath = (char *)g_module_name(module); char *cp; if (filepath == NULL || strlen(filepath) == 0) @@ -428,5 +558,79 @@ return filename; } + +#if GTK_CHECK_VERSION(1,3,0) +static struct gaim_plugin *get_selected_plugin(GtkWidget *w) { + /* Given the pluglist widget, this will return a pointer to the plugin + * currently selected in the list, and NULL if none is selected. */ + gint index; + GList *plugs = plugins; + GtkTreeSelection *sel; + GtkTreeIter iter; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); + + /* Get list index of selected plugin */ + sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); + if(!gtk_tree_selection_get_selected(sel, &model, &iter)) + return NULL; + gtk_tree_model_get(model, &iter, 1, &index, -1); + + /* Get plugin entry from index */ + plugs = g_list_nth(plugins, index); + if(plugs == NULL) + return NULL; + else + return (struct gaim_plugin *)plugs->data; +} + +static void select_plugin(GtkWidget *w, struct gaim_plugin *p) { + /* Given the pluglist widget and a plugin, this will try to select + * entry in the list which corresponds with the plugin. */ + GtkTreeSelection *sel; + GtkTreeIter iter; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); + gchar temp[10]; + + if(g_list_index(plugins, p) == -1) + return; + + snprintf(temp, 10, "%d", g_list_index(plugins, p)); + gtk_tree_model_get_iter_from_string(model, + &iter, temp); + sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); + gtk_tree_selection_select_iter(sel, &iter); +} +#endif /* GTK_CHECK_VERSION */ + +static void clear_plugin_display() { +#if GTK_CHECK_VERSION(1,3,0) + GtkTreeSelection *selection; + GtkTextBuffer *buffer; + + /* Clear the plugin display if nothing's selected */ + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pluglist)); + if(gtk_tree_selection_get_selected(selection, NULL, NULL) == FALSE) { + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(plugtext)); + gtk_text_buffer_set_text(buffer, "", -1); + gtk_entry_set_text(GTK_ENTRY(plugentry), ""); + + gtk_widget_set_sensitive(config, FALSE); + gtk_widget_set_sensitive(reload, FALSE); + gtk_widget_set_sensitive(unload, FALSE); + } +#else + /* Clear the display if nothing's selected */ + if (GTK_LIST(pluglist)->selection == NULL) { + guint text_len = gtk_text_get_length(GTK_TEXT(plugtext)); + gtk_text_set_point(GTK_TEXT(plugtext), 0); + gtk_text_forward_delete(GTK_TEXT(plugtext), text_len); + gtk_entry_set_text(GTK_ENTRY(plugentry), ""); + + gtk_widget_set_sensitive(config, FALSE); + gtk_widget_set_sensitive(reload, FALSE); + gtk_widget_set_sensitive(unload, FALSE); + } +#endif +} #endif Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.229 retrieving revision 1.230 diff -u -d -r1.229 -r1.230 --- prefs.c 2 Aug 2002 21:25:33 -0000 1.229 +++ prefs.c 5 Aug 2002 07:33:09 -0000 1.230 @@ -843,7 +843,7 @@ gtk_widget_show (frame); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); - gaim_dropdown(vbox, "Broswer", &web_browser_new, -1, + gaim_dropdown(vbox, "Browser", &web_browser_new, -1, "Netscape", BROWSER_NETSCAPE, "Konqueror", BROWSER_KONQ, "Mozilla", BROWSER_MOZILLA, @@ -1035,7 +1035,6 @@ gaim_button(_("Sending messages removes away status"), &away_options_new, OPT_AWAY_BACK_ON_IM, vbox); gaim_button(_("Queue new messages when away"), &away_options_new, OPT_AWAY_QUEUE, vbox); gaim_button(_("Ignore new conversations when away"), &away_options_new, OPT_AWAY_DISCARD, vbox); - gaim_button(_("Sounds while away"), &sound_options_new, OPT_SOUND_WHEN_AWAY, vbox); gtk_widget_show (vbox); @@ -1221,7 +1220,7 @@ gtk_tree_model_get_value (model, &iter, 2, &val); sound_row_sel = g_value_get_uint(&val); if (sound_entry) - gtk_entry_set_text(sound_entry, sound_file_new[sound_row_sel] ? sound_file_new[sound_row_sel] : "(default)"); + gtk_entry_set_text(GTK_ENTRY(sound_entry), sound_file_new[sound_row_sel] ? sound_file_new[sound_row_sel] : "(default)"); g_value_unset (&val); if (sounddialog) gtk_widget_destroy(sounddialog); @@ -1363,13 +1362,14 @@ gchar *message; gchar buffer[BUF_LONG]; char *tmp; + struct away_message *am; if (! gtk_tree_selection_get_selected (sel, &model, &iter)) return; gtk_tree_model_get_value (model, &iter, 1, &val); - message = g_value_get_string(&val); + am = g_value_get_pointer(&val); gtk_imhtml_clear(GTK_IMHTML(away_text)); - strcpy(buffer, message); + strncpy(buffer, am->message, BUF_LONG); tmp = stylize(buffer, BUF_LONG); gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); @@ -1390,7 +1390,7 @@ if (! gtk_tree_selection_get_selected (sel, &prefs_away_store, &iter)) return; - gtk_tree_model_get_value (prefs_away_store, &iter, 2, &val); + gtk_tree_model_get_value (prefs_away_store, &iter, 1, &val); am = g_value_get_pointer (&val); gtk_imhtml_clear(GTK_IMHTML(away_text)); rem_away_mess(NULL, am); @@ -1400,8 +1400,41 @@ } #else -void away_message_sel(GtkWidget *w, GtkWidget *list) {} -void remove_away_message(GtkWidget *widget, GtkWidget *list) {} +static struct away_message *cur_message; +void away_message_sel(GtkWidget *w, struct away_message *a) { + gchar buffer[BUF_LONG]; + char *tmp; + + cur_message = a; + + /* Clear the Box */ + gtk_imhtml_clear(GTK_IMHTML(away_text)); + + /* Fill the text box with new message */ + strncpy(buffer, a->message, BUF_LONG); + tmp = stylize(buffer, BUF_LONG); + + debug_printf("FSD: %s\n", tmp); + gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | + GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); + gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", -1, GTK_IMHTML_NO_TITLE | + GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); + g_free(tmp); +} +void remove_away_message(GtkWidget *widget, GtkWidget *list) { + GList *i; + struct away_message *a; + + i = GTK_LIST(prefs_away_list)->selection; + + if (!i) + return; + if (!i->next) { + gtk_imhtml_clear(GTK_IMHTML(away_text)); + } + a = gtk_object_get_user_data(GTK_OBJECT(i->data)); + rem_away_mess(NULL, a); +} #endif GtkWidget *away_message_page() { @@ -1418,8 +1451,6 @@ GtkTreeViewColumn *col; GtkTreeSelection *sel; GtkTreePath *path; -#else - GtkWidget *list; #endif GSList *awy = away_messages; struct away_message *a; @@ -1439,14 +1470,13 @@ gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); #if GTK_CHECK_VERSION(1,3,0) - prefs_away_store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); + prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); while (awy) { a = (struct away_message *)awy->data; gtk_list_store_append (prefs_away_store, &iter); gtk_list_store_set(prefs_away_store, &iter, - 0, a->name, - 1, a->message, - 2, a, -1); + 0, a->name, + 1, a, -1); awy = awy->next; } event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(prefs_away_store)); @@ -1462,16 +1492,32 @@ gtk_widget_show(event_view); gtk_container_add(GTK_CONTAINER(sw), event_view); #else - list = gtk_clist_new(1); + prefs_away_list = gtk_list_new(); while (awy) { - char *msg; + GtkWidget *ambox = gtk_hbox_new(FALSE, 5); + GtkWidget *list_item =gtk_list_item_new(); + GtkWidget *label; a = (struct away_message *)awy->data; - msg = a->name; - gtk_clist_append(GTK_CLIST(list), &msg); + gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); + gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_message_sel), + a); + gtk_object_set_user_data(GTK_OBJECT(list_item), a); + + gtk_widget_show(list_item); + + ambox = gtk_hbox_new(FALSE, 5); + gtk_container_add(GTK_CONTAINER(list_item), ambox); + gtk_widget_show(ambox); + + label = gtk_label_new(a->name); + gtk_box_pack_start(GTK_BOX(ambox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + awy = awy->next; + } - gtk_widget_show(list); - gtk_container_add(GTK_CONTAINER(sw), list); + gtk_widget_show(prefs_away_list); + gtk_container_add(GTK_CONTAINER(sw), prefs_away_list); #endif gtk_widget_show (vbox); @@ -1504,8 +1550,6 @@ g_signal_connect (G_OBJECT (sel), "changed", G_CALLBACK (away_message_sel), NULL); -#else - gtk_signal_connect(GTK_OBJECT(list), "changed", GTK_SIGNAL_FUNC(away_message_sel), NULL); #endif hbox = gtk_hbox_new(TRUE, 5); gtk_widget_show(hbox); @@ -1526,7 +1570,7 @@ gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), event_view); #else button = picture_button(prefs, _("Remove"), gnome_remove_xpm); - //gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), event_view); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), prefs_away_list); #endif gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); if (misc_options & OPT_MISC_COOL_LOOK) @@ -1535,6 +1579,7 @@ #if GTK_CHECK_VERSION (1,3,0) button = pixbuf_button(_("_Edit"), "edit.png"); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), event_view); #else button = picture_button(prefs, _("Edit"), save_xpm); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button); |
From: Sean E. <sea...@us...> - 2002-08-05 07:33:12
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv18277/plugins Modified Files: notify.c Log Message: I had terrible days today and yesterday--a really terrible weekend. No cool stuff from me--the prefs away message page works a bit better. Ari and Chip both sent some patches to make things work a bit better in GTK 2, and Etan rewrote the notify plugin so it's really cool now! Thanks, guys! Index: notify.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/notify.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- notify.c 20 Sep 2001 01:20:29 -0000 1.8 +++ notify.c 5 Aug 2002 07:33:08 -0000 1.9 @@ -1,57 +1,295 @@ +/* Reworked by Etan Reisner + * + * Added config dialog + * Added control over notification method + * Added control over when to release notification + */ + #define GAIM_PLUGINS #include "gaim.h" #include <gtk/gtk.h> #include <string.h> +#include <X11/Xutil.h> +#include <X11/Xatom.h> +#include <gdk/gdkx.h> + +guint choice; +#define REMOVE_FOCUS 0x00000001 +#define REMOVE_TYPE 0x00000002 + +guint method; +#define METHOD_STRING 0x00000001 +#define METHOD_QUOTE 0x00000002 +#define METHOD_URGENT 0x00000004 void *handle; +GtkWidget *Dialog = NULL; +GtkWidget *Click, *Focus, *Type; +GtkWidget *String, *Quote, *Urgent, *Entry; +gchar *title_string; -void received_im(struct gaim_connection *gc, char **who, char **what, void *m) { +/* predefine some functions, less warnings */ +void options(GtkWidget *widget, gpointer data); +void un_star(GtkWidget *widget, gpointer data); +void un_star_window(GtkWidget *widget, gpointer data); +void string_remove(GtkWidget *widget); +void quote_remove(GtkWidget *widget); +void urgent_remove(struct conversation *c); + +int received_im(struct gaim_connection *gc, char **who, char **what, void *m) { char buf[256]; struct conversation *cnv = find_conversation(*who); GtkWindow *win; char *me = g_strdup(normalize(gc->username)); + int revert_to_return; + Window focus_return; if (!strcmp(me, normalize(*who))) { g_free(me); - return; + return 0; } g_free(me); if (cnv == NULL) - { - if (away_options & OPT_AWAY_QUEUE) - return; + { + if (away_options & OPT_AWAY_QUEUE) + return 0; - cnv = new_conversation(*who); - } + cnv = new_conversation(*who); + } win = (GtkWindow *)cnv->window; + XGetInputFocus(GDK_WINDOW_XDISPLAY(cnv->window->window), &focus_return, &revert_to_return); + + if (focus_return != GDK_WINDOW_XWINDOW(cnv->window->window)) { + if (method & METHOD_STRING) { + g_snprintf(buf, sizeof(buf), "%s", win->title); + if (!strstr(buf, title_string)) { + g_snprintf(buf, sizeof(buf), "%s %s", title_string, win->title); + gtk_window_set_title(win, buf); + } + } + if (method & METHOD_QUOTE) { + g_snprintf(buf, sizeof(buf), "%s", win->title); + if (g_strncasecmp(buf, "\"", 1)) { + g_snprintf(buf, sizeof(buf), "\"%s\"", win->title); + gtk_window_set_title(win, buf); + } + } + if (method & METHOD_URGENT) { + /* do it the gdk way for windows compatibility(?) if I can figure it out */ +/* gdk_property_change(win->window, WM_HINTS, WM_HINTS, 32, GDK_PROP_MODE_REPLACE, XUrgencyHint, 1); */ + XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(cnv->window->window), GDK_WINDOW_XWINDOW(cnv->window->window)); + hints->flags |= XUrgencyHint; + XSetWMHints(GDK_WINDOW_XDISPLAY(cnv->window->window), GDK_WINDOW_XWINDOW(cnv->window->window), hints); + } + } + + return 0; +} + +int sent_im(struct gaim_connection *gc, char *who, char **what, void *m) { + char buf[256]; + struct conversation *c = find_conversation(who); + + if (method & METHOD_QUOTE) + string_remove(c->window); + if (method & METHOD_STRING) + quote_remove(c->window); + if (method & METHOD_URGENT) + urgent_remove(c); + return 0; +} + +int new_conv(char *who) { + struct conversation *c = find_conversation(who); + + if (choice & REMOVE_FOCUS) { + gtk_signal_connect(GTK_OBJECT(c->window), "focus-in-event", GTK_SIGNAL_FUNC(un_star), NULL); + gtk_object_set_user_data(GTK_OBJECT(c->window), c); + } + else { + gtk_signal_connect(GTK_OBJECT(c->window), "button_press_event", GTK_SIGNAL_FUNC(un_star), NULL); + gtk_object_set_user_data(GTK_OBJECT(c->window), c); + gtk_signal_connect(GTK_OBJECT(c->text), "button_press_event", GTK_SIGNAL_FUNC(un_star_window), NULL); + gtk_object_set_user_data(GTK_OBJECT(c->text), c); + gtk_signal_connect(GTK_OBJECT(c->entry), "button_press_event", GTK_SIGNAL_FUNC(un_star_window), NULL); + gtk_object_set_user_data(GTK_OBJECT(c->entry), c); +/* gtk_signal_connect(GTK_OBJECT(c->text), "button_press_event", GTK_SIGNAL_FUNC(un_star_window), c); */ +/* gtk_signal_connect(GTK_OBJECT(c->entry), "button_press_event", GTK_SIGNAL_FUNC(un_star_window), c); */ + } + + if (choice & REMOVE_TYPE) { + gtk_signal_connect(GTK_OBJECT(c->entry), "key-press-event", GTK_SIGNAL_FUNC(un_star_window), NULL); + gtk_object_set_user_data(GTK_OBJECT(c->entry), (gpointer) c); +/* gtk_signal_connect(GTK_OBJECT(c->entry), "key-press-event", GTK_SIGNAL_FUNC(un_star_window), c); */ + } +} + +void un_star(GtkWidget *widget, gpointer data) { + struct conversation *c = gtk_object_get_user_data(GTK_OBJECT(widget)); +/* struct conversation *c = data; */ + + if (method & METHOD_QUOTE) + quote_remove(widget); + if (method & METHOD_STRING) + string_remove(widget); + if (method & METHOD_URGENT) + urgent_remove(c); + return; +} + +void un_star_window(GtkWidget *widget, gpointer data) { + GtkWidget *parent = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW); + gtk_object_set_user_data(GTK_OBJECT(parent), gtk_object_get_user_data(GTK_OBJECT(widget))); + un_star(parent, data); +} + +void string_remove(GtkWidget *widget) { + char buf[256]; + GtkWindow *win = GTK_WINDOW(widget); + g_snprintf(buf, sizeof(buf), "%s", win->title); - if (!strstr(buf, "(*) ")) { - g_snprintf(buf, sizeof(buf), "(*) %s", win->title); + if (strstr(buf, title_string)) { + g_snprintf(buf, sizeof(buf), "%s", &win->title[strlen(title_string)]); gtk_window_set_title(win, buf); } + return; } -void sent_im(struct gaim_connection *gc, char *who, char **what, void *m) { +void quote_remove(GtkWidget *widget) { char buf[256]; - struct conversation *c = find_conversation(who); - GtkWindow *win = (GtkWindow *)c->window; + GtkWindow *win = GTK_WINDOW(widget); g_snprintf(buf, sizeof(buf), "%s", win->title); - if (strstr(buf, "(*) ")) { - g_snprintf(buf, sizeof(buf), "%s", &win->title[4]); + if (!g_strncasecmp(buf, "\"", 1)) { + g_snprintf(buf, strlen(buf) - 1, "%s", &win->title[1]); gtk_window_set_title(win, buf); } + return; +} + +void urgent_remove(struct conversation *c) { + char buf[256]; + GdkWindow *win = c->window->window; + + XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window)); + hints->flags &= ~XUrgencyHint; + XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints); + return; +} + +void save_notify_prefs() { + char *buf; + FILE *fp; + + buf = malloc(1000); + snprintf(buf, 1000, "%s/.gaim/.notify", getenv("HOME")); + if (!(fp = fopen(buf, "w"))) { + do_error_dialog(_("Unable to write to config file"), _("Notify plugin")); + return; + } + free(buf); + + fprintf(fp, "CHOICE=%d\n", choice); + fprintf(fp, "METHOD=%d\n", method); + fprintf(fp, "STRING=%s\n", title_string); + fclose(fp); +} + +void load_notify_prefs() { + gchar buf[1000]; + gchar **parsed; + FILE *fp; + + g_snprintf(buf, sizeof(buf), "%s/.gaim/.notify", getenv("HOME")); + if (!(fp = fopen(buf, "r"))) + return; + + while (fgets(buf, 1000, fp) != NULL) { + parsed = g_strsplit(g_strchomp(buf), "=", 2); + if (parsed[0] && parsed[1]) { + if (!strcmp(parsed[0], "CHOICE")) + choice = atoi(parsed[1]); + if (!strcmp(parsed[0], "METHOD")) + method = atoi(parsed[1]); + if (!strcmp(parsed[0], "STRING")) + title_string = parsed[1]; + } + } + fclose(fp); + return; +} + +void options(GtkWidget *widget, gpointer data) { + gint option = GPOINTER_TO_INT(data); + + if (option == 0) + choice ^= REMOVE_FOCUS; + else if (option == 1) + choice ^= REMOVE_TYPE; + else if (option == 2) { + method ^= METHOD_STRING; + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) + gtk_widget_set_sensitive(Entry, TRUE); + else + gtk_widget_set_sensitive(Entry, FALSE); + } + else if (option == 3) + method ^= METHOD_QUOTE; + else if (option == 4) + method ^= METHOD_URGENT; +} + +void setup_buttons() { + if (choice & REMOVE_FOCUS) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Focus), TRUE); + else + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Click), TRUE); + if (choice & REMOVE_TYPE) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Type), TRUE); + else + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Type), FALSE); + + if (method & METHOD_STRING) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(String), TRUE); + else + gtk_widget_set_sensitive(Entry, FALSE); + + if (method & METHOD_QUOTE) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Quote), TRUE); + + if (method & METHOD_URGENT) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Urgent), TRUE); + + return; +} + +void close_dialog(GtkWidget *widget, gpointer data) { + gint option = GPOINTER_TO_INT(data); + + if (option > 0) { + title_string = g_strdup(gtk_entry_get_text(GTK_ENTRY(Entry))); + save_notify_prefs(); + } + else if (option < 0) + load_notify_prefs(); + + if (Dialog) + gtk_widget_destroy(Dialog); + Dialog = NULL; } char *gaim_plugin_init(GModule *hndl) { handle = hndl; + load_notify_prefs(); + gaim_signal_connect(handle, event_im_recv, received_im, NULL); gaim_signal_connect(handle, event_im_send, sent_im, NULL); + gaim_signal_connect(handle, event_new_conversation, new_conv, NULL); return NULL; } @@ -63,4 +301,93 @@ char *description() { return "Puts an asterisk in the title bar of all conversations" " where you have not responded to a message yet."; +} + +void gaim_plugin_config() { + GtkWidget *dialog_vbox; + GtkWidget *button, *label; + GtkWidget *box, *box2, *box3, *frame; + + if (Dialog) + return; + + /* main config dialog */ + Dialog = gtk_dialog_new(); +/* gtk_widget_set_usize(Dialog, 275, -1); */ + gtk_window_set_title(GTK_WINDOW(Dialog), "Notify plugin configuration"); + gtk_window_set_policy(GTK_WINDOW(Dialog), FALSE, FALSE, TRUE); + gtk_signal_connect(GTK_OBJECT(Dialog), "destroy", GTK_SIGNAL_FUNC(close_dialog), GINT_TO_POINTER(-1)); + + dialog_vbox = GTK_DIALOG(Dialog)->vbox; + + /* Ok and Cancel buttons */ + box = gtk_hbox_new(FALSE, 8); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Dialog)->action_area), box); + + button = gtk_button_new_with_label(_("Cancel")); + gtk_box_pack_end(GTK_BOX(box), button, FALSE, FALSE, 0); + gtk_widget_set_usize(button, 80, -2); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(close_dialog), GINT_TO_POINTER(0)); + + button = gtk_button_new_with_label(_("Ok")); + gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0); + gtk_widget_set_usize(button, 80, -2); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(close_dialog), GINT_TO_POINTER(1)); + + /* main hbox */ + box = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(dialog_vbox), box, FALSE, FALSE, 0); + + /* un-notify choices */ + frame = gtk_frame_new(_("Remove notification when:")); + gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 0); + + box2 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(frame), box2); + + Focus = gtk_radio_button_new_with_label(NULL, _("Conversation window gains focus.")); + gtk_box_pack_start(GTK_BOX(box2), Focus, FALSE, FALSE, 2); + + Click = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(Focus), _("Conversation window gets clicked.")); + gtk_box_pack_start(GTK_BOX(box2), Click, FALSE, FALSE, 2); + + Type = gtk_check_button_new_with_label(_("Type in conversation window")); + gtk_box_pack_start(GTK_BOX(box2), Type, FALSE, FALSE, 2); + + /* notification method choices */ + /* do I need/want any other notification methods? */ + frame = gtk_frame_new(_("Notification method:")); + gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 0); + + box2 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(frame), box2); + + box3 = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(box2), box3, FALSE, FALSE, 0); + + String = gtk_check_button_new_with_label(_("Insert string into window title:")); + gtk_box_pack_start(GTK_BOX(box3), String, FALSE, FALSE, 0); + + Entry = gtk_entry_new_with_max_length(7); + gtk_box_pack_start(GTK_BOX(box3), Entry, FALSE, FALSE, 0); + if (!title_string) + gtk_entry_set_text(GTK_ENTRY(Entry), "(*) "); + else + gtk_entry_set_text(GTK_ENTRY(Entry), title_string); + + Quote = gtk_check_button_new_with_label(_("Quote window title.")); + gtk_box_pack_start(GTK_BOX(box2), Quote, FALSE, FALSE, 0); + + Urgent = gtk_check_button_new_with_label(_("Send URGENT to window manager.")); + gtk_box_pack_start(GTK_BOX(box2), Urgent, FALSE, FALSE, 0); + + /* setup buttons, then attach signals */ + setup_buttons(); + gtk_signal_connect(GTK_OBJECT(Focus), "toggled", GTK_SIGNAL_FUNC(options), GINT_TO_POINTER(0)); + gtk_signal_connect(GTK_OBJECT(Type), "toggled", GTK_SIGNAL_FUNC(options), GINT_TO_POINTER(1)); + gtk_signal_connect(GTK_OBJECT(String), "toggled", GTK_SIGNAL_FUNC(options), GINT_TO_POINTER(2)); + gtk_signal_connect(GTK_OBJECT(Quote), "toggled", GTK_SIGNAL_FUNC(options), GINT_TO_POINTER(3)); + gtk_signal_connect(GTK_OBJECT(Urgent), "toggled", GTK_SIGNAL_FUNC(options), GINT_TO_POINTER(4)); + + gtk_widget_show_all(Dialog); } |
From: Sean E. <sea...@us...> - 2002-08-02 21:25:36
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv16916/src Modified Files: prefs.c util.c Log Message: Thanks, faceprint, deryni, and sourceo. Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.228 retrieving revision 1.229 diff -u -d -r1.228 -r1.229 --- prefs.c 2 Aug 2002 04:49:23 -0000 1.228 +++ prefs.c 2 Aug 2002 21:25:33 -0000 1.229 @@ -1602,22 +1602,22 @@ GtkCTreeNode *p = NULL; GtkCTreeNode *c = NULL; #endif - prefs_notebook_add_page("Interface", NULL, interface_page(), &p, NULL, a++); - prefs_notebook_add_page("Fonts", NULL, font_page(), &c, &p, a++); - prefs_notebook_add_page("Messages", NULL, messages_page(), &c, &p, a++); - prefs_notebook_add_page("Shortcuts", NULL, hotkeys_page(), &c, &p, a++); - prefs_notebook_add_page("Buddy List", NULL, list_page(), &c, &p, a++); - prefs_notebook_add_page("IM", NULL, im_page(), &c, &p, a++); - prefs_notebook_add_page("Chat", NULL, chat_page(), &c, &p, a++); - prefs_notebook_add_page("Tabs", NULL, tab_page(), &c, &p, a++); - prefs_notebook_add_page("Proxy", NULL, proxy_page(), &p, NULL, a++); - prefs_notebook_add_page("Browser", NULL, browser_page(), &p, NULL, a++); + prefs_notebook_add_page(_("Interface"), NULL, interface_page(), &p, NULL, a++); + prefs_notebook_add_page(_("Fonts"), NULL, font_page(), &c, &p, a++); + prefs_notebook_add_page(_("Message Text"), NULL, messages_page(), &c, &p, a++); + prefs_notebook_add_page(_("Shortcuts"), NULL, hotkeys_page(), &c, &p, a++); + prefs_notebook_add_page(_("Buddy List"), NULL, list_page(), &c, &p, a++); + prefs_notebook_add_page(_("IM Window"), NULL, im_page(), &c, &p, a++); + prefs_notebook_add_page(_("Chat Window"), NULL, chat_page(), &c, &p, a++); + prefs_notebook_add_page(_("Tabs"), NULL, tab_page(), &c, &p, a++); + prefs_notebook_add_page(_("Proxy"), NULL, proxy_page(), &p, NULL, a++); + prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, a++); - prefs_notebook_add_page("Logging", NULL, logging_page(), &p, NULL, a++); - prefs_notebook_add_page("Sounds", NULL, sound_page(), &p, NULL, a++); - prefs_notebook_add_page("Sound Events", NULL, sound_events_page(), &c, &p, a++); - prefs_notebook_add_page("Away / Idle", NULL, away_page(), &p, NULL, a++); - prefs_notebook_add_page("Away Messages", NULL, away_message_page(), &c, &p, a++); + prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, a++); + prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &p, NULL, a++); + prefs_notebook_add_page(_("Sound Events"), NULL, sound_events_page(), &c, &p, a++); + prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, a++); + prefs_notebook_add_page(_("Away Messages"), NULL, away_message_page(), &c, &p, a++); } void show_prefs() Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- util.c 2 Aug 2002 05:23:01 -0000 1.126 +++ util.c 2 Aug 2002 21:25:34 -0000 1.127 @@ -1132,7 +1132,7 @@ char *ret; if (!str) - return g_strdup(""); + return NULL; buf = g_malloc(strlen(str)*4); insize = strlen(str); inptr = str; |
From: Sean E. <sea...@us...> - 2002-08-02 05:36:40
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv27167/pixmaps Modified Files: Makefile.am Log Message: I'm tired. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/Makefile.am,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- Makefile.am 2 Aug 2002 04:46:13 -0000 1.71 +++ Makefile.am 2 Aug 2002 05:36:37 -0000 1.72 @@ -44,6 +44,7 @@ fontface.xpm \ fontface2.xpm \ free_icon.xpm \ + gaim.png \ gaim.xpm \ gg_suncloud.xpm \ gg_sunred.xpm \ |
From: Sean E. <sea...@us...> - 2002-08-02 05:23:04
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv21818/src Modified Files: util.c Log Message: I'm so careless. Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- util.c 2 Aug 2002 05:19:52 -0000 1.125 +++ util.c 2 Aug 2002 05:23:01 -0000 1.126 @@ -1161,6 +1161,7 @@ return ret; #else return g_strdup(str); +#endif } void strip_linefeed(gchar *text) |
From: Sean E. <sea...@us...> - 2002-08-02 05:19:55
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20353/src Modified Files: core.h gaim.h util.c Log Message: Is ISO-8859 a good default charset to use if one doesn't have nl_langinfo? Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- core.h 2 Aug 2002 04:52:48 -0000 1.19 +++ core.h 2 Aug 2002 05:19:52 -0000 1.20 @@ -26,8 +26,14 @@ #include <config.h> #endif +#ifdef HAVE_ICONV #include <iconv.h> +#endif + +#ifdef HAVE_LANGINFO_CODESET #include <langinfo.h> +#endif + #include <stdio.h> #include <time.h> #include <glib.h> Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.328 retrieving revision 1.329 diff -u -d -r1.328 -r1.329 --- gaim.h 2 Aug 2002 04:52:48 -0000 1.328 +++ gaim.h 2 Aug 2002 05:19:52 -0000 1.329 @@ -433,8 +433,14 @@ extern time_t get_time(int, int, int, int, int, int); extern FILE *gaim_mkstemp(gchar **); extern char *convert_string(char *, const char *, const char *); + +#ifdef HAVE_LANGINFO_CODESET #define utf8_to_str(in) convert_string(in, nl_langinfo(CODESET), "UTF-8"); #define str_to_utf8(in) convert_string(in, "UTF-8", nl_langinfo(CODESET)); +#else +#define utf8_to_str(in) convert_string(in, "ISO-8859-1", "UTF-8"); +#define str_to_utf8(in) convert_string(in, "UTF-8", "ISO-8859-1"); +#endif /*------------------------------------------------------------------------*/ /* Multi-Entry dialog and vCard dialog support */ Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- util.c 2 Aug 2002 04:33:50 -0000 1.124 +++ util.c 2 Aug 2002 05:19:52 -0000 1.125 @@ -1121,6 +1121,7 @@ char *convert_string(char *str, const char *destset, const char *srcset) { +#ifdef HAVE_ICONV char *buf; iconv_t cd; size_t insize = 0; @@ -1158,6 +1159,8 @@ g_free(buf); return ret; +#else + return g_strdup(str); } void strip_linefeed(gchar *text) |
From: Sean E. <sea...@us...> - 2002-08-02 05:19:55
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv20353 Modified Files: gaim.spec.in Log Message: Is ISO-8859 a good default charset to use if one doesn't have nl_langinfo? Index: gaim.spec.in =================================================================== RCS file: /cvsroot/gaim/gaim/gaim.spec.in,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- gaim.spec.in 25 Jun 2002 01:25:44 -0000 1.52 +++ gaim.spec.in 2 Aug 2002 05:19:52 -0000 1.53 @@ -74,7 +74,7 @@ %{prefix}/man/man1/gaim.1.gz %attr(755,root,root) %{prefix}/lib/gaim/* %{prefix}/share/locale/*/*/* -%{prefix}/share/pixmaps/gaim.xpm +%{prefix}/share/pixmaps/gaim.png %{prefix}/share/gnome/apps/Internet/gaim.desktop @@ -85,7 +85,7 @@ %{prefix}/man/man1/gaim.1.gz %{prefix}/lib/gaim/* %{prefix}/share/locale/*/*/* -%{prefix}/share/pixmaps/gaim.xpm +%{prefix}/share/pixmaps/gaim.png %{prefix}/share/pixmaps/gaim/* %{prefix}/share/gnome/apps/Internet/gaim.desktop %{sysconfdir}/CORBA/servers/* |
From: Sean E. <sea...@us...> - 2002-08-02 05:01:10
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv14454/pixmaps Added Files: block_small.xpm Log Message: Blockhead --- NEW FILE: block_small.xpm --- /* XPM */ static char * block_small_xpm[] = { "18 18 104 2", " c None", ". c #302B2B", "+ c #3E3233", "@ c #433537", "# c #402D2E", "$ c #321D1F", "% c #373333", "& c #696161", "* c #D5C7C7", "= c #E1D1D2", "- c #E4D4D4", "; c #D3BEBF", "> c #B79B9C", ", c #5E3B3B", "' c #3E1D1D", ") c #6A6162", "! c #E7DCDC", "~ c #F0E4E4", "{ c #E9DDDD", "] c #E6DBDB", "^ c #E4D6D6", "/ c #DFC7C8", "( c #C09596", "_ c #613838", ": c #2F2728", "< c #CFC3C4", "[ c #EFE5E5", "} c #8D8282", "| c #605757", "1 c #D7CECD", "2 c #5F5656", "3 c #796768", "4 c #CDACAE", "5 c #986F70", "6 c #3A1B1B", "7 c #3A3031", "8 c #DCCFCF", "9 c #EBDFDF", "0 c #635959", "a c #0F0707", "b c #5E5555", "c c #0E0404", "d c #504242", "e c #CFB4B4", "f c #BC9496", "g c #4B282A", "h c #413232", "i c #DDCECE", "j c #E7DDDC", "k c #D8CFCF", "l c #5D5656", "m c #0C0404", "n c #5C5151", "o c #CBBAB9", "p c #D0B3B3", "q c #BF9799", "r c #4D292B", "s c #452E2F", "t c #D4BFBF", "u c #E5DADA", "v c #887F7F", "w c #0E0405", "x c #362A2B", "y c #110506", "z c #81686A", "A c #C6A1A3", "B c #AD7F81", "C c #462324", "D c #3B2324", "E c #B89899", "F c #DAC0C1", "G c #5C4C4D", "H c #433535", "I c #C5B2B3", "J c #473232", "K c #5B3A3C", "L c #BC8C8E", "M c #976466", "N c #3D1B1D", "O c #7B5A5B", "P c #C8A1A2", "Q c #CBADAE", "R c #BCA1A3", "S c #D8BBBD", "T c #B48F90", "U c #B68687", "V c #9F6B6C", "W c #623839", "X c #573637", "Y c #946C6E", "Z c #BE9494", "` c #C39697", " . c #C19293", ".. c #AE7A7B", "+. c #9F696A", "@. c #6D4243", "#. c #422223", "$. c #240909", "%. c #623F3F", "&. c #6F4A4A", "*. c #704547", "=. c #603334", "-. c #4F2627", ";. c #240809", " ", " ", " ", " . + @ # $ ", " % & * = - ; > , ' ", " ) ! ~ { ] ^ / ( _ ", " : < [ } | 1 2 3 4 5 6 ", " 7 8 9 0 a b c d e f g ", " h i j k l m n o p q r ", " s t u v w x y z A B C ", " D E F G H I J K L M N ", " O P Q R S T U V W ", " X Y Z ` . ..+.@.#. ", " $.%.&.*. =.-.;. ", " ", " ", " ", " "}; |
From: Sean E. <sea...@us...> - 2002-08-02 04:53:45
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv11243 Modified Files: ChangeLog Log Message: This is all anyone reads anyway. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.515 retrieving revision 1.516 diff -u -d -r1.515 -r1.516 --- ChangeLog 13 Jul 2002 01:31:45 -0000 1.515 +++ ChangeLog 2 Aug 2002 04:53:42 -0000 1.516 @@ -14,6 +14,14 @@ synchronization for moving individual AIM buddy to new group improved. (Thanks, Mark Doliner) * Jabber roster updated on group renames. + * -n, --loginwin option to disable autologins. + * All new preferences dialog (best used in gtk2) + * Moved "privacy preferences" to Tools menu + * Now using libiconv for better i18n support (Thanks Junichi + Uekawa) + * Optionally uniquely colorize nicks in chats + * Changed some default options + * Updated desktop icon. version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan) |
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv10784/src Modified Files: buddy.c buddy_chat.c conversation.c core.h dialogs.c gaim.h gaimrc.c multi.c sound.c ui.h Log Message: There'll be more tommorow! Thanks for coming to the party. Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.317 retrieving revision 1.318 diff -u -d -r1.317 -r1.318 --- buddy.c 15 Jun 2002 20:21:01 -0000 1.317 +++ buddy.c 2 Aug 2002 04:52:42 -0000 1.318 @@ -51,6 +51,8 @@ #include "pixmaps/away_small.xpm" #include "pixmaps/away_big.xpm" +#include "pixmaps/block_small.xpm" + #include "pixmaps/add_small.xpm" #include "pixmaps/import_small.xpm" /*#include "pixmaps/export_small.xpm"*/ @@ -2746,6 +2748,8 @@ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), protomenu); do_proto_menu(); + gaim_new_item_with_pixmap(menu, _("Privacy"), block_small_xpm, + GTK_SIGNAL_FUNC(show_privacy_options), NULL, 0, 0, 0); gaim_new_item_with_pixmap(menu, _("Preferences"), prefs_small_xpm, GTK_SIGNAL_FUNC(show_prefs), NULL, 'p', GDK_CONTROL_MASK, "Ctl+P"); gaim_new_item_with_pixmap(menu, _("View System Log"), prefs_small_xpm, Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.153 retrieving revision 1.154 diff -u -d -r1.153 -r1.154 --- buddy_chat.c 15 Jun 2002 17:26:58 -0000 1.153 +++ buddy_chat.c 2 Aug 2002 04:52:45 -0000 1.154 @@ -728,7 +728,10 @@ play_sound(SND_CHAT_SAY); } } - write_to_conv(b, message, flag, who, mtime, -1); + + if (chat_options & OPT_CHAT_COLORIZE) + flag |= WFLAG_COLORIZE; + write_to_conv(b, message, flag, who, mtime, -1); } Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.359 retrieving revision 1.360 diff -u -d -r1.359 -r1.360 --- conversation.c 27 Jun 2002 23:47:28 -0000 1.359 +++ conversation.c 2 Aug 2002 04:52:47 -0000 1.360 @@ -271,7 +271,7 @@ gtk_widget_destroy(c->link_dialog); if (c->log_dialog) gtk_widget_destroy(c->log_dialog); -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (c->save_icon) gtk_widget_destroy(c->save_icon); #endif @@ -1751,6 +1751,10 @@ /* Takin care of the window.. */ /*------------------------------------------------------------------------*/ +static char* nick_colors[] = {"#ff0000", "#ff00ff", "#00ffff", "#04a241", + "#ffae00", "#bd008a", "#4c9f9c", "#7f0000", + "#6477a2"}; +#define NUM_NICK_COLORS 9 /* this is going to be interesting since the conversation could either be a * normal IM conversation or a chat window. but hopefully it won't matter */ @@ -1897,7 +1901,20 @@ g_snprintf(str, 1024, "%s:", who); if (flags & WFLAG_NICK) strcpy(colour, "#af7f00"); - else if (flags & WFLAG_RECV) + else if (flags & WFLAG_RECV) { + if (flags & WFLAG_COLORIZE) { + char *u = who; + int m = 0; + while (*u) { + m = m + *u; + u++; + } + m = m % NUM_NICK_COLORS; + strcpy(colour, nick_colors[m]); + } else { + strcpy(colour, "#ff0000"); + } + } else if (flags & WFLAG_RECV) strcpy(colour, "#ff0000"); else if (flags & WFLAG_SEND) strcpy(colour, "#0000ff"); @@ -3291,7 +3308,7 @@ } } -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) #include <gdk-pixbuf/gdk-pixbuf.h> #define SCALE(x) ((gdk_pixbuf_animation_get_width(x) <= 48 && gdk_pixbuf_animation_get_height(x) <= 48) \ @@ -3308,6 +3325,9 @@ GdkPixmap *src; GdkPixmap *pm; GdkBitmap *bm; +#if GTK_CHECK_VERSION(1,3,0) + GdkPixbufAnimationIter *iter; +#endif GdkGC *gc; gint delay; @@ -3316,6 +3336,23 @@ return FALSE; } +#if GTK_CHECK_VERSION(1,3,0) + gdk_pixbuf_animation_iter_advance(c->iter, NULL); + buf = gdk_pixbuf_animation_iter_get_pixbuf(c->iter); + scale = gdk_pixbuf_scale_simple(buf, + MAX(gdk_pixbuf_get_width(buf) * SCALE(c->anim) / + gdk_pixbuf_animation_get_width(c->anim), 1), + MAX(gdk_pixbuf_get_height(buf) * SCALE(c->anim) / + gdk_pixbuf_animation_get_height(c->anim), 1), + GDK_INTERP_NEAREST); + gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); + gdk_pixbuf_unref(scale); + gtk_pixmap_set(GTK_PIXMAP(c->icon), pm, bm); + gdk_pixmap_unref(pm); + if (bm) + gdk_bitmap_unref(bm); + delay = MAX(gdk_pixbuf_animation_iter_get_delay_time(c->iter), 13); +#else frames = gdk_pixbuf_animation_get_frames(c->anim); frame = g_list_nth_data(frames, c->frame); switch (gdk_pixbuf_frame_get_action(frame)) { @@ -3383,8 +3420,9 @@ c->frame = (c->frame + 1) % g_list_length(frames); delay = MAX(gdk_pixbuf_frame_get_delay_time(frame), 13); - c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); +#endif + c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); return FALSE; } @@ -3400,10 +3438,13 @@ GList *frames; GdkPixbufFrame *frame; int delay; - +#if GTK_CHECK_VERSION(1,3,0) + delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter); +#else frames = gdk_pixbuf_animation_get_frames(c->anim); frame = g_list_nth_data(frames, c->frame); delay = MAX(gdk_pixbuf_frame_get_delay_time(frame), 13); +#endif if (c->anim) c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); } @@ -3490,7 +3531,13 @@ gtk_signal_connect(GTK_OBJECT(button), "activate", GTK_SIGNAL_FUNC(stop_anim), c); gtk_menu_append(GTK_MENU(menu), button); gtk_widget_show(button); - } else if (c->anim && (gdk_pixbuf_animation_get_num_frames(c->anim) > 1)) { + } +#if GTK_CHECK_VERSION(1,3,0) + else if (c->anim && !(gdk_pixbuf_animation_is_static_image(c->anim))) +#else + else if (c->anim && (gdk_pixbuf_animation_get_num_frames(c->anim) > 1)) +#endif + { button = gtk_menu_item_new_with_label(_("Enable Animation")); gtk_signal_connect(GTK_OBJECT(button), "activate", GTK_SIGNAL_FUNC(start_anim), c); gtk_menu_append(GTK_MENU(menu), button); @@ -3516,7 +3563,7 @@ void remove_icon(struct conversation *c) { -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (c->icon) gtk_container_remove(GTK_CONTAINER(c->bbox), c->icon->parent->parent); c->icon = NULL; @@ -3526,8 +3573,12 @@ if (c->icon_timer) gtk_timeout_remove(c->icon_timer); c->icon_timer = 0; +#if GTK_CHECK_VERSION(1,3,0) + g_object_unref(c->iter); +#else c->frame = 0; #endif +#endif } void update_smilies(struct conversation *c) @@ -3558,12 +3609,14 @@ void update_icon(struct conversation *c) { -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) char filename[256]; FILE *file; - +#if GTK_CHECK_VERSION(1,3,0) + GError *err; +#endif void *data; - int len; + int len, delay; GList *frames; GdkPixbuf *buf; @@ -3599,28 +3652,47 @@ fwrite(data, 1, len, file); fclose(file); +#if GTK_CHECK_VERSION(1,3,0) + c->anim = gdk_pixbuf_animation_new_from_file(filename, &err); +#else c->anim = gdk_pixbuf_animation_new_from_file(filename); +#endif /* make sure we remove the file as soon as possible */ unlink(filename); if (!c->anim) return; - frames = gdk_pixbuf_animation_get_frames(c->anim); - buf = gdk_pixbuf_frame_get_pixbuf(frames->data); - sf = SCALE(c->anim); - scale = gdk_pixbuf_scale_simple(buf, - MAX(gdk_pixbuf_get_width(buf) * sf / - gdk_pixbuf_animation_get_width(c->anim), 1), - MAX(gdk_pixbuf_get_height(buf) * sf / - gdk_pixbuf_animation_get_height(c->anim), 1), - GDK_INTERP_NEAREST); - - if (gdk_pixbuf_animation_get_num_frames(c->anim) > 1) { - int delay = MAX(gdk_pixbuf_frame_get_delay_time(frames->data), 13); +#if GTK_CHECK_VERSION(1,3,0) + c->iter = gdk_pixbuf_animation_get_iter(c->anim, NULL); + buf = gdk_pixbuf_animation_iter_get_pixbuf(c->iter); + scale = gdk_pixbuf_scale_simple(buf, + MAX(gdk_pixbuf_get_width(buf) * sf / + gdk_pixbuf_animation_get_width(c->anim), 1), + MAX(gdk_pixbuf_get_height(buf) * sf / + gdk_pixbuf_animation_get_height(c->anim), 1), + GDK_INTERP_NEAREST); + delay = gdk_pixbuf_animation_iter_get_delay_time(c->iter); +#else c->frame = 1; - c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); - } + frames = gdk_pixbuf_animation_get_frames(c->anim); + buf = gdk_pixbuf_frame_get_pixbuf(frames->data); + sf = SCALE(c->anim); + scale = gdk_pixbuf_scale_simple(buf, + MAX(gdk_pixbuf_get_width(buf) * sf / + gdk_pixbuf_animation_get_width(c->anim), 1), + MAX(gdk_pixbuf_get_height(buf) * sf / + gdk_pixbuf_animation_get_height(c->anim), 1), + GDK_INTERP_NEAREST); + if (gdk_pixbuf_animation_get_num_frames(c->anim) > 1) { + delay = MAX(gdk_pixbuf_frame_get_delay_time(frames->data), 13); + } else { + delay = 0; + } +#endif + if (delay) + c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); + gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); gdk_pixbuf_unref(scale); @@ -3645,6 +3717,7 @@ if (bm) gdk_bitmap_unref(bm); #endif + } void got_new_icon(struct gaim_connection *gc, char *who) @@ -3665,7 +3738,7 @@ void set_anim() { -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) GList *c = conversations; if (im_options & OPT_IM_HIDE_ICONS) return; Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- core.h 4 May 2002 08:21:31 -0000 1.18 +++ core.h 2 Aug 2002 04:52:48 -0000 1.19 @@ -26,6 +26,8 @@ #include <config.h> #endif +#include <iconv.h> +#include <langinfo.h> #include <stdio.h> #include <time.h> #include <glib.h> Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.326 retrieving revision 1.327 diff -u -d -r1.326 -r1.327 --- dialogs.c 7 Jul 2002 14:31:56 -0000 1.326 +++ dialogs.c 2 Aug 2002 04:52:48 -0000 1.327 @@ -54,6 +54,8 @@ #include "pixmaps/add.xpm" #include "pixmaps/warn.xpm" #include "pixmaps/close.xpm" +#include "pixmaps/gnome_add.xpm" +#include "pixmaps/gnome_remove.xpm" #include "pixmaps/angel.xpm" #include "pixmaps/bigsmile.xpm" @@ -1121,6 +1123,393 @@ } +/*------------------------------------------------------------------------* + * Privacy Settings * + *------------------------------------------------------------------------*/ +static GtkWidget *deny_type = NULL; +static GtkWidget *deny_conn_hbox = NULL; +static GtkWidget *deny_opt_menu = NULL; +static struct gaim_connection *current_deny_gc = NULL; +static gboolean current_is_deny = FALSE; +static GtkWidget *allow_list = NULL; +static GtkWidget *block_list = NULL; + +static void set_deny_mode(GtkWidget *w, int data) +{ + if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) + return; + debug_printf("setting deny mode %d\n", data); + current_deny_gc->permdeny = data; + serv_set_permit_deny(current_deny_gc); + do_export(current_deny_gc); +} + +static GtkWidget *deny_opt(char *label, int which, GtkWidget *box, GtkWidget *set) +{ + GtkWidget *opt; + + if (!set) + opt = gtk_radio_button_new_with_label(NULL, label); + else + opt = + gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), + label); + gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(opt), "toggled", GTK_SIGNAL_FUNC(set_deny_mode), (void *)which); + gtk_widget_show(opt); + if (current_deny_gc->permdeny == which) + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); + + return opt; +} + +static void des_deny_opt(GtkWidget *d, gpointer e) +{ + gtk_widget_destroy(d); + current_deny_gc = NULL; + deny_conn_hbox = NULL; + deny_type = NULL; + deny_opt_menu = NULL; + current_is_deny = FALSE; + allow_list = NULL; + block_list = NULL; +} + +static void set_deny_type() +{ + GSList *bg = gtk_radio_button_group(GTK_RADIO_BUTTON(deny_type)); + + switch (current_deny_gc->permdeny) { + case 4: + break; + case 3: + bg = bg->next->next; + break; + case 2: + bg = bg->next; + break; + case 1: + bg = bg->next->next->next; + break; + } + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(bg->data), TRUE); +} + +void build_allow_list() +{ + GtkWidget *label; + GtkWidget *list_item; + GSList *p; + + if (!current_is_deny) + return; + + p = current_deny_gc->permit; + + gtk_list_remove_items(GTK_LIST(allow_list), GTK_LIST(allow_list)->children); + + while (p) { + label = gtk_label_new(p->data); + list_item = gtk_list_item_new(); + gtk_container_add(GTK_CONTAINER(list_item), label); + gtk_object_set_user_data(GTK_OBJECT(list_item), p->data); + gtk_widget_show(label); + gtk_container_add(GTK_CONTAINER(allow_list), list_item); + gtk_widget_show(list_item); + p = p->next; + } +} + +void build_block_list() +{ + GtkWidget *label; + GtkWidget *list_item; + GSList *d; + + if (!current_is_deny) + return; + + d = current_deny_gc->deny; + + gtk_list_remove_items(GTK_LIST(block_list), GTK_LIST(block_list)->children); + + while (d) { + label = gtk_label_new(d->data); + list_item = gtk_list_item_new(); + gtk_container_add(GTK_CONTAINER(list_item), label); + gtk_object_set_user_data(GTK_OBJECT(list_item), d->data); + gtk_widget_show(label); + gtk_container_add(GTK_CONTAINER(block_list), list_item); + gtk_widget_show(list_item); + d = d->next; + } +} + +static void deny_gc_opt(GtkWidget *opt, struct gaim_connection *gc) +{ + current_deny_gc = gc; + set_deny_type(); + build_allow_list(); + build_block_list(); +} + +static void build_deny_menu() +{ + GtkWidget *menu; + GtkWidget *opt; + GSList *c = connections; + struct gaim_connection *gc; + int count = 0; + gboolean found = FALSE; + char buf[2048]; + + if (g_slist_length(connections) == 1) { + gtk_widget_hide(deny_conn_hbox); + return; + } else + gtk_widget_show(deny_conn_hbox); + + menu = gtk_menu_new(); + + while (c) { + gc = (struct gaim_connection *)c->data; + c = c->next; + if (!gc->prpl->set_permit_deny) + continue; + g_snprintf(buf, sizeof buf, "%s (%s)", gc->username, gc->prpl->name()); + opt = gtk_menu_item_new_with_label(buf); + gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(deny_gc_opt), gc); + gtk_widget_show(opt); + gtk_menu_append(GTK_MENU(menu), opt); + if (gc == current_deny_gc) + found = TRUE; + else if (!found) + count++; + } + + if (!found) { + current_deny_gc = connections->data; + count = 0; + } + + gtk_option_menu_remove_menu(GTK_OPTION_MENU(deny_opt_menu)); + gtk_option_menu_set_menu(GTK_OPTION_MENU(deny_opt_menu), menu); + gtk_option_menu_set_history(GTK_OPTION_MENU(deny_opt_menu), count); + + gtk_widget_show(menu); + gtk_widget_show(deny_opt_menu); +} + +static void pref_deny_add(GtkWidget *button, gboolean permit) +{ + show_add_perm(current_deny_gc, NULL, permit); +} + +static void pref_deny_rem(GtkWidget *button, gboolean permit) +{ + GList *i; + char *who; + + if (permit && !allow_list) + return; + if (!permit && !block_list) + return; + + if (permit) + i = GTK_LIST(allow_list)->selection; + else + i = GTK_LIST(block_list)->selection; + + if (!i) + return; + who = gtk_object_get_user_data(GTK_OBJECT(i->data)); + if (permit) { + current_deny_gc->permit = g_slist_remove(current_deny_gc->permit, who); + serv_rem_permit(current_deny_gc, who); + build_allow_list(); + } else { + current_deny_gc->deny = g_slist_remove(current_deny_gc->deny, who); + serv_rem_deny(current_deny_gc, who); + build_block_list(); + } + + do_export(current_deny_gc); +} + +GtkWidget *privacy_win; +void update_privacy_connections() { /* This is a slightly better name */ + gboolean needdeny = FALSE; + GSList *c = connections; + struct gaim_connection *gc = NULL; + + if (!privacy_win) + return; + + while (c) { + gc = c->data; + if (gc->prpl->set_permit_deny) + break; + gc = NULL; + c = c->next; + } + needdeny = (gc != NULL); + + + if (needdeny) { + gtk_widget_set_sensitive(privacy_win, TRUE); + build_deny_menu(); + build_allow_list(); + build_block_list(); + } else { + gtk_widget_set_sensitive(privacy_win, FALSE); + } +} +static void destroy_privacy() { + current_deny_gc = NULL; + privacy_win = NULL; +} + +void show_privacy_options() +{ + GtkWidget *pwin; + GtkWidget *box; + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *vbox; + GtkWidget *sw; + GtkWidget *bbox; + GtkWidget *button; + GtkWidget *sep; + GtkWidget *close_button; + + current_deny_gc = connections->data; /* this is safe because this screen will only be + available when there are connections */ + current_is_deny = TRUE; + + + privacy_win = pwin = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_policy(GTK_WINDOW(pwin), FALSE, TRUE, TRUE); + gtk_window_set_wmclass(GTK_WINDOW(pwin), "privacy", "Gaim"); + gtk_window_set_title(GTK_WINDOW(pwin), _("Gaim - Privacy")); + gtk_signal_connect(GTK_OBJECT(pwin), "destroy", GTK_SIGNAL_FUNC(destroy_privacy), NULL); + gtk_widget_realize(pwin); + aol_icon(pwin->window); + + gtk_widget_set_usize(pwin, 0, 400); + + box = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(box), 5); + gtk_container_add(GTK_CONTAINER(pwin), box); + gtk_widget_show(box); + + label = gtk_label_new(_("Privacy settings are affected immediately.")); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + deny_conn_hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(box), deny_conn_hbox, FALSE, FALSE, 0); + gtk_widget_show(deny_conn_hbox); + + label = gtk_label_new(_("Set privacy for:")); + gtk_box_pack_start(GTK_BOX(deny_conn_hbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + deny_opt_menu = gtk_option_menu_new(); + gtk_box_pack_start(GTK_BOX(deny_conn_hbox), deny_opt_menu, FALSE, FALSE, 5); + gtk_signal_connect(GTK_OBJECT(deny_opt_menu), "destroy", GTK_SIGNAL_FUNC(des_deny_opt), NULL); + gtk_widget_show(deny_opt_menu); + + build_deny_menu(); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 5); + gtk_widget_show(hbox); + + vbox = gtk_vbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); + gtk_widget_show(vbox); + + deny_type = deny_opt(_("Allow all users to contact me"), 1, vbox, NULL); + deny_type = deny_opt(_("Allow only the users below"), 3, vbox, deny_type); + + label = gtk_label_new(_("Allow List")); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5); + gtk_widget_show(sw); + + allow_list = gtk_list_new(); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), allow_list); + gtk_widget_show(allow_list); + + build_allow_list(); + + bbox = gtk_hbox_new(TRUE, 5); + gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); + gtk_widget_show(bbox); + + button = picture_button(pwin, _("Add"), gnome_add_xpm); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_add), (void *)TRUE); + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + + button = picture_button(pwin, _("Remove"), gnome_remove_xpm); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_rem), (void *)TRUE); + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + + vbox = gtk_vbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); + gtk_widget_show(vbox); + + deny_type = deny_opt(_("Deny all users"), 2, vbox, deny_type); + deny_type = deny_opt(_("Block the users below"), 4, vbox, deny_type); + + label = gtk_label_new(_("Block List")); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5); + gtk_widget_show(sw); + + block_list = gtk_list_new(); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), block_list); + gtk_widget_show(block_list); + + build_block_list(); + + bbox = gtk_hbox_new(TRUE, 5); + gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); + gtk_widget_show(bbox); + + button = picture_button(pwin, _("Add"), gnome_add_xpm); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_add), FALSE); + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + + button = picture_button(pwin, _("Remove"), gnome_remove_xpm); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_rem), FALSE); + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + + sep = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); + gtk_widget_show(sep); + + hbox = gtk_hbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + close_button = picture_button(pwin, _("Close"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(hbox), close_button, FALSE, FALSE, 5); + gtk_signal_connect_object(GTK_OBJECT(close_button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), pwin); + + gtk_widget_show(pwin); +} + + + /*------------------------------------------------------------------------*/ /* The dialog for new buddy pounces */ /*------------------------------------------------------------------------*/ @@ -2573,8 +2962,8 @@ /* Color Selection Dialog */ /*------------------------------------------------------*/ -static GtkWidget *fgcseld = NULL; -static GtkWidget *bgcseld = NULL; +GtkWidget *fgcseld = NULL; +GtkWidget *bgcseld = NULL; void cancel_fgcolor(GtkWidget *widget, struct conversation *c) { @@ -2656,43 +3045,6 @@ cancel_bgcolor(NULL, c); } -static void destroy_colorsel(GtkWidget *w, gpointer d) -{ - if (d) { - gtk_widget_destroy(fgcseld); - fgcseld = NULL; - } else { - gtk_widget_destroy(bgcseld); - bgcseld = NULL; - } -} - -static void apply_color_dlg(GtkWidget *w, gpointer d) -{ - gdouble color[3]; - if ((int)d == 1) { - gtk_color_selection_get_color(GTK_COLOR_SELECTION - (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), color); - destroy_colorsel(NULL, (void *)1); - - fgcolor.red = ((guint16)(color[0] * 65535)) >> 8; - fgcolor.green = ((guint16)(color[1] * 65535)) >> 8; - fgcolor.blue = ((guint16)(color[2] * 65535)) >> 8; - update_color(NULL, pref_fg_picture); - update_convo_color(TRUE); - } else { - gtk_color_selection_get_color(GTK_COLOR_SELECTION - (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), color); - destroy_colorsel(NULL, (void *)0); - - bgcolor.red = ((guint16)(color[0] * 65535)) >> 8; - bgcolor.green = ((guint16)(color[1] * 65535)) >> 8; - bgcolor.blue = ((guint16)(color[2] * 65535)) >> 8; - update_color(NULL, pref_bg_picture); - update_convo_color(FALSE); - } -} - void show_fgcolor_dialog(struct conversation *c, GtkWidget *color) { GtkWidget *colorsel; @@ -2855,25 +3207,6 @@ fontseld = NULL; } -void apply_font_dlg(GtkWidget *w, GtkWidget *f) -{ - int i, j = 0, k = 0; - char *fontname; - - fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontseld)); - destroy_fontsel(0, 0); - for (i = 0; i < strlen(fontname); i++) { - if (fontname[i] == '-') { - if (++j > 2) - break; - } else if (j == 2) - fontface[k++] = fontname[i]; - } - fontface[k] = '\0'; - g_snprintf(fontxfld, sizeof(fontxfld), "%s", fontname); - update_convo_font(); -} - void show_font_dialog(struct conversation *c, GtkWidget *font) { @@ -4225,6 +4558,32 @@ gdk_window_set_group(w, mainwindow->window); #endif } + +#if GTK_CHECK_VERSION(1,3,0) +GtkWidget *pixbuf_button(char *text, char *iconfile) +{ + GtkWidget *button, *image, *label, *bbox; + button = gtk_button_new(); + bbox = gtk_hbox_new(FALSE, 5); + gtk_container_add (GTK_CONTAINER(button), bbox); + if (iconfile) { + char *filename; + filename = g_build_filename (DATADIR, "pixmaps", "gaim", "buttons", iconfile, NULL); + debug_printf("Loading: %s\n", filename); + image = gtk_image_new_from_file(filename); + gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 0); + g_free(filename); + } + if (text) { + label = gtk_label_new(NULL); + gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text); + gtk_label_set_mnemonic_widget(GTK_LABEL(label), button); + gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0); + } + gtk_widget_show_all(bbox); + return button; +} +#endif GtkWidget *picture_button(GtkWidget *window, char *text, char **xpm) { Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.327 retrieving revision 1.328 diff -u -d -r1.327 -r1.328 --- gaim.h 7 Jul 2002 14:31:57 -0000 1.327 +++ gaim.h 2 Aug 2002 04:52:48 -0000 1.328 @@ -84,13 +84,6 @@ #define CUI_CHAT_SEND 5 #define CUI_CHAT_RECV 6 - -#define BROWSER_NETSCAPE 0 -#define BROWSER_KFM 1 -#define BROWSER_MANUAL 2 -/*#define BROWSER_INTERNAL 3*/ -#define BROWSER_GNOME 4 - #define IM_FLAG_AWAY 0x01 #define IM_FLAG_CHECKBOX 0x02 #define IM_FLAG_GAIMUSER 0x04 @@ -112,6 +105,7 @@ #define WFLAG_SYSTEM 0x20 #define WFLAG_NICK 0x40 #define WFLAG_NOLOG 0x80 +#define WFLAG_COLORIZE 0x100 #define AUTO_RESPONSE "<AUTO-REPLY> : " @@ -253,6 +247,7 @@ #define OPT_CHAT_BR_TAB 0x00000040 #define OPT_CHAT_TAB_COMPLETE 0x00000080 #define OPT_CHAT_OLD_STYLE_TAB 0x00000100 +#define OPT_CHAT_COLORIZE 0x00000200 extern guint font_options; #define OPT_FONT_BOLD 0x00000001 @@ -285,6 +280,7 @@ #define OPT_SOUND_CMD 0x00020000 #define OPT_SOUND_CHAT_NICK 0x00040000 /* remember to also change the struct in sound.c */ + #define SND_BUDDY_ARRIVE 0 #define SND_BUDDY_LEAVE 1 #define SND_RECEIVE 2 @@ -297,10 +293,9 @@ #define SND_POUNCE_DEFAULT 9 #define SND_CHAT_NICK 10 #define NUM_SOUNDS 11 -/* these two for the sound_order list in prefs.c */ -#define SND_SEPARATOR -1 -#define SND_END -2 + extern char *sound_file[NUM_SOUNDS]; +extern int sound_order[]; /* global sound struct */ struct sound_struct { @@ -433,12 +428,13 @@ extern gchar *strdup_withhtml(const gchar *); extern void away_on_login(char *); extern void system_log(enum log_event, struct gaim_connection *, struct buddy *, int); -extern unsigned char *utf8_to_str(unsigned char *); -extern char *str_to_utf8(unsigned char *); extern char *add_cr(char *); extern void strip_linefeed(char *); extern time_t get_time(int, int, int, int, int, int); extern FILE *gaim_mkstemp(gchar **); +extern char *convert_string(char *, const char *, const char *); +#define utf8_to_str(in) convert_string(in, nl_langinfo(CODESET), "UTF-8"); +#define str_to_utf8(in) convert_string(in, "UTF-8", nl_langinfo(CODESET)); /*------------------------------------------------------------------------*/ /* Multi-Entry dialog and vCard dialog support */ Index: gaimrc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaimrc.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- gaimrc.c 15 Jun 2002 15:43:03 -0000 1.96 +++ gaimrc.c 2 Aug 2002 04:52:48 -0000 1.97 @@ -993,9 +993,7 @@ int i; struct away_message *a; - misc_options = - OPT_MISC_BUDDY_TICKER | - OPT_MISC_COOL_LOOK; + misc_options = OPT_MISC_COOL_LOOK; logging_options = 0; @@ -1006,6 +1004,7 @@ OPT_BLIST_SHOW_GRPNUM | OPT_BLIST_SHOW_PIXMAPS | OPT_BLIST_SHOW_IDLETIME | + OPT_BLIST_GREY_IDLERS | OPT_BLIST_SHOW_BUTTON_XPM; convo_options = @@ -1019,13 +1018,15 @@ im_options = OPT_IM_POPUP | OPT_IM_LOGON | - OPT_IM_BUTTON_XPM; + OPT_IM_BUTTON_XPM | + OPT_IM_ONE_WINDOW ; chat_options = OPT_CHAT_LOGON | OPT_CHAT_POPUP | OPT_CHAT_BUTTON_XPM | - OPT_CHAT_TAB_COMPLETE; + OPT_CHAT_TAB_COMPLETE | + OPT_CHAT_ONE_WINDOW; font_options = 0; Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- multi.c 31 May 2002 02:58:07 -0000 1.117 +++ multi.c 2 Aug 2002 04:52:48 -0000 1.118 @@ -1155,7 +1155,7 @@ refresh_buddy_window(); #endif - update_connection_dependent_prefs(); + update_privacy_connections(); do_away_menu(); do_proto_menu(); redo_convo_menus(); @@ -1454,7 +1454,7 @@ if (connections) set_user_state(online); #endif - update_connection_dependent_prefs(); + update_privacy_connections(); if (connections) return; Index: sound.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/sound.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- sound.c 18 Jun 2002 00:49:55 -0000 1.61 +++ sound.c 2 Aug 2002 04:52:48 -0000 1.62 @@ -73,6 +73,12 @@ {NULL, 0, RedAlert, sizeof(RedAlert)}, {N_("Someone says your name in chat"), OPT_SOUND_CHAT_NICK, Receive, sizeof(Receive)} }; +int sound_order[] = { + SND_BUDDY_ARRIVE, SND_BUDDY_LEAVE, + SND_FIRST_RECEIVE, SND_RECEIVE, SND_SEND, + SND_CHAT_JOIN, SND_CHAT_LEAVE, + SND_CHAT_YOU_SAY, SND_CHAT_SAY, SND_CHAT_NICK, 0 +}; static int check_dev(char *dev) { Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- ui.h 17 Jun 2002 00:10:34 -0000 1.42 +++ ui.h 2 Aug 2002 04:52:48 -0000 1.43 @@ -33,7 +33,7 @@ #ifdef USE_GNOME #include <gnome.h> #endif -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) #include <gdk-pixbuf/gdk-pixbuf.h> #endif @@ -180,12 +180,16 @@ /* something to distinguish */ gboolean is_chat; -#if USE_PIXBUF +#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) /* buddy icon stuff. sigh. */ GtkWidget *icon; GdkPixbufAnimation *anim; guint32 icon_timer; + #if GTK_CHECK_VERSION(1,3,0) + GdkPixbufAnimationIter *iter; + #else int frame; + #endif GtkWidget *save_icon; #endif }; @@ -303,6 +307,8 @@ extern GdkColor bgcolor; extern GdkColor fgcolor; extern int smiley_array[FACE_TOTAL]; +extern GtkWidget *fgcseld; +extern GtkWidget *bgcseld; /* Globals in prefs.c */ extern struct debug_window *dw; @@ -458,7 +464,14 @@ extern void aol_icon(GdkWindow *); extern GtkWidget *picture_button(GtkWidget *, char *, char **); extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short); +#if GTK_CHECK_VERSION(1,3,0) || GTK_CHECK_VERSION(1,3,0) +extern GtkWidget *pixbuf_button(char *, char *); +#endif extern int file_is_dir(const char *, GtkWidget *); +extern void update_privacy_connections(); +extern void show_privacy_options(); +extern void build_allow_list(); +extern void build_block_list(); /* Functions in multi.c */ extern void account_editor(GtkWidget *, GtkWidget *); @@ -476,13 +489,16 @@ 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; +extern void apply_font_dlg(GtkWidget *, GtkWidget *); +extern void apply_color_dlg(GtkWidget *, gpointer); +extern void destroy_colorsel(GtkWidget *, gpointer); + /* Functions in prpl.c */ extern void register_dialog(); |
From: Sean E. <sea...@us...> - 2002-08-02 04:49:26
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv9967/src Modified Files: prefs.c Log Message: this actually isn't finished yet--don't complain about it. Reccomended for use with gtk2. Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.227 retrieving revision 1.228 diff -u -d -r1.227 -r1.228 --- prefs.c 18 Jun 2002 00:49:55 -0000 1.227 +++ prefs.c 2 Aug 2002 04:49:23 -0000 1.228 @@ -1,7 +1,7 @@ /* * gaim * - * Copyright (C) 1998-1999, Mark Spencer <mar...@ma...> + * Copyright (C) 1998-2002, Mark Spencer <mar...@ma...> * * 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 @@ -36,6 +36,10 @@ #include "gtkimhtml.h" #include "gaim.h" [...4450 lines suppressed...] + +#if !GTK_CHECK_VERSION(1,3,0) + for (i = 0; i < strlen(fontname); i++) { + if (fontname[i] == '-') { + if (++j > 2) + break; + } else if (j == 2) + fontface_new[k++] = fontname[i]; } + fontface_new[k] = '\0'; + g_snprintf(fontxfld_new, sizeof(fontxfld_new), "%s", fontname); +#else + while(fontname[i] && !isdigit(fontname[i]) && i < sizeof(fontface_new)) { + fontface_new[i] = fontname[i]; + i++; + } + +#endif + g_free(fontname); } |
From: Sean E. <sea...@us...> - 2002-08-02 04:48:06
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv9863/src Modified Files: Makefile.am Log Message: needed for the icons. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/Makefile.am,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Makefile.am 5 Dec 2001 10:38:39 -0000 1.44 +++ Makefile.am 2 Aug 2002 04:48:04 -0000 1.45 @@ -71,7 +71,7 @@ endif CFLAGS += $(PERL_CFLAGS) -CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\" -DLIBDIR=\"$(libdir)/gaim/\" $(DEBUG_CFLAGS) +CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\" -DLIBDIR=\"$(libdir)/gaim/\" $(DEBUG_CFLAGS) -DDATADIR=\"$(datadir)\" LIBS = @LIBS@ $(UI_LIBS) $(SOUND_LIBS) $(STATIC_LINK_LIBS) $(PERL_LIBS) $(XSS_LIBS) $(INTLLIBS) $(DEBUG_LIBS) |