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-31 02:40:54
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv10324 Modified Files: ChangeLog Log Message: Another nice patch from Etan Reisner. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.538 retrieving revision 1.539 diff -u -d -r1.538 -r1.539 --- ChangeLog 30 Aug 2002 21:37:09 -0000 1.538 +++ ChangeLog 31 Aug 2002 02:40:51 -0000 1.539 @@ -63,6 +63,7 @@ running. * Login all auto-login accounts from login window (Thanks Etan Reisner) + * View log button in conversation toolbar (Thanks Etan Reisner) version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan) |
From: Sean E. <sea...@us...> - 2002-08-30 21:37:12
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv6161/src Modified Files: aim.c Log Message: Thanks, deryni Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.190 retrieving revision 1.191 diff -u -d -r1.190 -r1.191 --- aim.c 30 Aug 2002 20:41:01 -0000 1.190 +++ aim.c 30 Aug 2002 21:37:09 -0000 1.191 @@ -153,6 +153,18 @@ serv_login(u); } +static void dologin_all(GtkWidget *widget, GtkWidget *w) +{ + struct aim_user *u; + GSList *users = aim_users; + + while (users) { + u = users->data; + if (u->options & OPT_USR_AUTO) + serv_login(u); + users = users->next; + } +} static void doenter(GtkWidget *widget, GtkWidget *w) { @@ -202,6 +214,7 @@ void show_login() { + GtkWidget *signon_all; GtkWidget *options; #ifdef GAIM_PLUGINS GtkWidget *plugs; @@ -326,7 +339,7 @@ gtk_box_pack_start(GTK_BOX(sbox), hbox, TRUE, TRUE, 0); gtk_widget_show(hbox); - reg = gtk_button_new_with_label(_("About")); + reg = gtk_button_new_with_label(_("Auto-login")); options = gtk_button_new_with_label(_("Options")); #ifdef GAIM_PLUGINS plugs = gtk_button_new_with_label(_("Plugins")); @@ -339,16 +352,16 @@ #endif } - gtk_signal_connect(GTK_OBJECT(reg), "clicked", GTK_SIGNAL_FUNC(show_about), NULL); + gtk_signal_connect(GTK_OBJECT(reg), "clicked", GTK_SIGNAL_FUNC(dologin_all), NULL); gtk_signal_connect(GTK_OBJECT(options), "clicked", GTK_SIGNAL_FUNC(show_prefs), NULL); #ifdef GAIM_PLUGINS gtk_signal_connect(GTK_OBJECT(plugs), "clicked", GTK_SIGNAL_FUNC(show_plugins), NULL); #endif - gtk_box_pack_start(GTK_BOX(hbox), reg, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(hbox), plugs, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), options, TRUE, TRUE, 0); #ifdef GAIM_PLUGINS - gtk_box_pack_start(GTK_BOX(hbox), plugs, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(hbox), reg, TRUE, TRUE, 0); #endif gtk_widget_show(reg); |
From: Sean E. <sea...@us...> - 2002-08-30 21:37:12
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv6161 Modified Files: ChangeLog Log Message: Thanks, deryni Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.537 retrieving revision 1.538 diff -u -d -r1.537 -r1.538 --- ChangeLog 30 Aug 2002 16:09:20 -0000 1.537 +++ ChangeLog 30 Aug 2002 21:37:09 -0000 1.538 @@ -61,6 +61,8 @@ * aim:// URI's supported with gaim-remote command * Don't auto-login if an existing Gaim session is already running. + * Login all auto-login accounts from login window (Thanks + Etan Reisner) version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan) |
From: Sean E. <sea...@us...> - 2002-08-30 20:57:25
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv24844/src Modified Files: Makefile.am Log Message: include gaim-socket.h in the tarball. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/Makefile.am,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- Makefile.am 30 Aug 2002 16:09:21 -0000 1.50 +++ Makefile.am 30 Aug 2002 20:57:22 -0000 1.51 @@ -42,6 +42,7 @@ EXTRA_DIST = convo.h \ core.h \ gaim.h \ + gaim-socket.h \ getopt.c \ getopt.h \ getopt1.c \ |
From: Sean E. <sea...@us...> - 2002-08-30 20:41:04
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv19882/src Modified Files: aim.c Log Message: prompt for backtrace when segfault when DEBUG is defined. Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.189 retrieving revision 1.190 diff -u -d -r1.189 -r1.190 --- aim.c 30 Aug 2002 16:09:22 -0000 1.189 +++ aim.c 30 Aug 2002 20:41:01 -0000 1.190 @@ -399,6 +399,10 @@ WEBSITE "gdb.php. If you need further\n" "assistance, please IM either RobFlynn or SeanEgn and\n" "they can help you.\n"); +#else + fprintf(stderr, "Oh no! Segmentation fault!\n"); + g_on_error_query (NULL); + #endif abort(); break; |
From: Sean E. <sea...@us...> - 2002-08-30 16:28:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv1361/src Added Files: gaim-remote.c Log Message: You'll probably want this too, then. --- NEW FILE: gaim-remote.c --- /* * gaim-remote * * Copyright (C) 2002, Sean Egan <bj...@bi...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "gaim.h" #include "getopt.h" #include "gaim-socket.h" void show_remote_usage(char *name) { printf(_("Usage: %s command [OPTIONS] [URI]\n\n" " COMMANDS:\n" " uri Handle AIM:// URI\n" " info Show information about connected accounts\n" " list Print buddy list\n" " ison Show presence state of your buddy\n" " convo Open a new conversation window\n" " send Send message\n" " add Add buddy to buddy list\n" " remove Remove buddy from list\n\n" " OPTIONS:\n" " -m, --message=MESG Message to send or show in conversation window\n" " -t, --to=SCREENNAME Select a target for command\n" " -p, --protocol=PROTO Specify protocol to use\n" " -f, --from=SCREENNAME Specify screenname to use\n" " -q, --quiet Send message without showing a conversation\n" " window\n" " -h, --help Show help for command\n"), name); return; } static struct option longopts[] = { {"message", required_argument, NULL, 'm'}, {"to", required_argument, NULL, 't'}, {"protocol",required_argument, NULL, 'p'}, {"from", required_argument, NULL, 'f'}, {"quiet", no_argument, NULL, 'q'}, {"help", no_argument, NULL, 'h'}, {0,0,0,0} }; struct remoteopts { char *command; char *uri; gboolean help, quiet; char *message, *to, *from; int protocol; }; struct remoteopts opts; int get_options(int argc, char *argv[]) { int i; memset(&opts, 0, sizeof(opts)); opts.protocol = -1; while ((i=getopt_long(argc, argv, "m:t:p:f:qh", longopts, NULL)) != -1) { switch (i) { case 'm': opts.message = optarg; break; case 't': opts.to = optarg; break; case 'p': /* Do stuff here. */ break; case 'f': opts.from = optarg; break; case 'q': opts.quiet = TRUE; break; case 'h': opts.help = TRUE; break; } } /* We must have non getopt'ed argument-- the command */ if (optind < argc) opts.command = g_strdup(argv[optind++]); else return 1; /* And we can have another argument--the URI. */ if (optind < argc) { /* but only if we're using the uri command. */ if (!strcmp(opts.command, "uri")) opts.uri = g_strdup(argv[optind++]); else return 1; /* and we can't have any others. */ if (optind < argc) return 1; } return 0; } int command_uri() { int fd = 0; struct gaim_cui_packet *p = NULL; fd = gaim_connect_to_session(0); if (!fd) { fprintf(stderr, "Gaim not running (on session 0)\n"); return 1; } p = cui_packet_new(CUI_TYPE_REMOTE, CUI_REMOTE_URI); cui_packet_append_string(p, opts.uri); cui_send_packet (fd, p); close(fd); cui_packet_free(p); return 0; } int command_info(){} int main (int argc, char *argv[]) { if (get_options(argc, argv)) { show_remote_usage(argv[0]); return 0; } if (!strcmp(opts.command, "uri")) { return command_uri(); } else if (!strcmp(opts.command, "info")) { return command_info(); } else { show_remote_usage(argv[0]); return 1; } return 0; } |
From: Sean E. <sea...@us...> - 2002-08-30 16:20:43
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv31214/src Modified Files: util.c Log Message: Robot101 points out that AIM uri's don't have // in them. aim:goim?screenname=bzubhipheron&message=thanks+for+the+fix+robot101 Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- util.c 30 Aug 2002 16:09:22 -0000 1.132 +++ util.c 30 Aug 2002 16:20:40 -0000 1.133 @@ -1287,11 +1287,11 @@ if (gc == NULL) return "Not connected to AIM"; - /* aim://goim?screenname=screenname&message=message */ - if (!g_strncasecmp(uri, "aim://goim?", strlen("aim://goim?"))) { + /* aim:goim?screenname=screenname&message=message */ + if (!g_strncasecmp(uri, "aim:goim?", strlen("aim:goim?"))) { char *who, *what; struct conversation *c; - uri = uri + strlen("aim://goim?"); + uri = uri + strlen("aim:goim?"); if (!(who = strstr(uri, "screenname="))) { return "No screenname given."; @@ -1326,9 +1326,9 @@ what, strlen(what), &finish); g_free(what); } - } else if (!g_strncasecmp(uri, "aim://addbuddy?", strlen("aim://addbuddy?"))) { + } else if (!g_strncasecmp(uri, "aim:addbuddy?", strlen("aim:addbuddy?"))) { char *who, *group; - uri = uri + strlen("aim://addbuddy?"); + uri = uri + strlen("aim:addbuddy?"); /* spaces are encoded as +'s */ if (!(who = strstr(uri, "screenname="))) { @@ -1359,12 +1359,12 @@ g_free(who); if (group) g_free(group); - } else if (!g_strncasecmp(uri, "aim://gochat?", strlen("aim://gochat?"))) { + } else if (!g_strncasecmp(uri, "aim:gochat?", strlen("aim:gochat?"))) { char *room; GList *chat=NULL; int exch = 5; - uri = uri + strlen("aim://gochat?"); + uri = uri + strlen("aim:gochat?"); /* spaces are encoded as +'s */ if (!(room = strstr(uri, "roomname="))) { |
From: Sean E. <sea...@us...> - 2002-08-30 16:09:25
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26153/src Modified Files: Makefile.am aim.c core.c core.h gaim.h util.c Added Files: gaim-socket.h socket.c Log Message: This isn't complete--but it's cool. gaim-remote is now built and installed. Eventually it will do lots of cool stuff--right now it just handles aim:// URI's. Try it out... when connected to OSCAR run: gaim-remote uri "aim://goim?screenname=seanegn&message=Good+job+Sean" Also, I made it so that if you're already running a Gaim session, and start a new one, it won't auto-login and disconnect all your accounts from the first instance. Useful if you accidentally hit the wrong button or something. --- NEW FILE: gaim-socket.h --- /* * gaim-remote * * Copyright (C) 2002, Sean Egan <bj...@bi...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef _GAIM_SOCKET_H_ #define _GAIM_SOCKET_H_ struct gaim_cui_packet { guchar type; guchar subtype; guint32 length; char *data; }; void cui_send_packet (int fd, struct gaim_cui_packet *p); gint gaim_connect_to_session(gint session); gboolean gaim_session_exists(int sess); struct gaim_cui_packet *cui_packet_new(guchar type, guchar subtype); void cui_packet_free(struct gaim_cui_packet *p); void cui_packet_append_string(struct gaim_cui_packet *p, char *str); void cui_packet_append_char(struct gaim_cui_packet *p, char c); void cui_packet_append_raw(struct gaim_cui_packet *p, char *str, int len); #endif /* _GAIM_SOCKET_H_ */ --- NEW FILE: socket.c --- /* * gaim-remote * * Copyright (C) 2002, Sean Egan <bj...@bi...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* Somewhat inspired by XMMS: * Copyright (C) 1998-2002 Peter Alm, Mikael Alm, Olle Hallnas, * Thomas Nilsson and 4Front Technologies * Copyright (C) 1999-2002 Haavard Kvaalen */ /* This provides code for connecting to a Gaim socket and communicating with * it. It will eventually be made a library once the core and ui are split. */ #include <sys/socket.h> #include <sys/un.h> #include "gaim.h" #include "gaim-socket.h" void cui_send_packet (int fd, struct gaim_cui_packet *p) { int len = sizeof(p->type) + sizeof(p->subtype) + sizeof(p->length) + p->length; char *pack = g_malloc(len); char *a = pack; memcpy (a, &(p->type), sizeof(p->type)); a = a + sizeof(p->type); memcpy (a, &(p->subtype), sizeof(p->subtype)); a = a + sizeof(p->subtype); memcpy (a, &(p->length), sizeof(p->length)); a = a + sizeof(p->length); memcpy (a, p->data, p->length); write(fd, pack, len); g_free(pack); } void cui_packet_append_string(struct gaim_cui_packet *p, char *str) { int len = p->length + strlen(str); char *k = g_malloc(len); memcpy(k, p->data, p->length); memcpy(k + p->length, str, strlen(str)); if (p->data) g_free(p->data); p->data = k; p->length = len; } void cui_packet_append_char(struct gaim_cui_packet *p, char c) { int len = p->length + sizeof(char); char *k = g_malloc(len); memcpy(k, p->data, p->length); k[p->length] = c; if (p->data) g_free(p->data); p->data = k; p->length = len; } void cui_packet_append_raw(struct gaim_cui_packet *p, char *str, int len) { int lent = p->length + len; char *k = g_malloc(lent); memcpy(k, p->data, p->length); memcpy(k + p->length, str, len); if (p->data) g_free(p->data); p->data = k; p->length = lent; } struct gaim_cui_packet *cui_packet_new(guchar type, guchar subtype) { struct gaim_cui_packet *p = g_new0(struct gaim_cui_packet, 1); p->type = type; p->subtype = subtype; p->length = 0; p->data = NULL; return p; } void cui_packet_free(struct gaim_cui_packet *p) { if (p->data) g_free(p->data); g_free(p); } struct gaim_cui_packet *cui_read_packet(int fd) { struct gaim_cui_packet *p = g_new0(struct gaim_cui_packet, 1); char *data = NULL; if (!(read(fd, p->type, sizeof(p->type)))) { g_free(p); return NULL; } if (!(read(fd, p->subtype, sizeof(p->subtype)))) { g_free(p); return NULL; } if (!(read(fd, p->length, sizeof(p->length)))) { g_free(p); return NULL; } if (p->length) { data = g_malloc(p->length); if (!(read(fd, data, p->length))) { g_free(p); return NULL; } } p->data = data; } /* copied directly from xmms_connect_to_session */ gint gaim_connect_to_session(gint session) { gint fd; uid_t stored_uid, euid; struct sockaddr_un saddr; if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) { saddr.sun_family = AF_UNIX; stored_uid = getuid(); euid = geteuid(); setuid(euid); sprintf(saddr.sun_path, "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), session); setreuid(stored_uid, euid); if (connect(fd, (struct sockaddr *) &saddr, sizeof (saddr)) != -1) return fd; } close(fd); return -1; } gboolean gaim_session_exists(int sess) { struct gaim_cui_packet *pack = NULL; int fd = gaim_connect_to_session(sess); if (fd > 0) { pack = cui_packet_new(CUI_TYPE_META, CUI_META_PING); cui_send_packet(fd, pack); cui_packet_free(pack); close(fd); } else { return FALSE; } return TRUE; } Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/Makefile.am,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- Makefile.am 26 Aug 2002 03:49:28 -0000 1.49 +++ Makefile.am 30 Aug 2002 16:09:21 -0000 1.50 @@ -1,6 +1,6 @@ SUBDIRS = protocols -bin_PROGRAMS = gaim +bin_PROGRAMS = gaim gaim-remote gaim_SOURCES = about.c \ aim.c \ away.c \ @@ -25,11 +25,14 @@ proxy.c \ prpl.c \ server.c \ + socket.c \ sound.c \ util.c gaim_DEPENDENCIES = @LIBOBJS@ $(STATIC_LINK_LIBS) gaim_LDFLAGS = -export-dynamic gaim_LDADD = @LDADD@ @LIBOBJS@ + +gaim_remote_SOURCES = gaim-remote.c socket.c CFLAGS += $(PERL_CFLAGS) CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\" -DLIBDIR=\"$(libdir)/gaim/\" $(DEBUG_CFLAGS) -DDATADIR=\"$(datadir)\" Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.188 retrieving revision 1.189 diff -u -d -r1.188 -r1.189 --- aim.c 30 Aug 2002 03:39:00 -0000 1.188 +++ aim.c 30 Aug 2002 16:09:22 -0000 1.189 @@ -504,7 +504,7 @@ debug_printf("Failed to load icon from %s/pixmaps/gaim.png\n",DATADIR); } - g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); + g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session); UI_fd = open_socket(name); if (UI_fd < 0) @@ -770,7 +770,7 @@ } } - if (!opt_acct && !opt_nologin) + if (!opt_acct && !opt_nologin && gaim_session == 0) auto_login(); if (opt_acct) { Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- core.c 20 Mar 2002 17:21:29 -0000 1.20 +++ core.c 30 Aug 2002 16:09:22 -0000 1.21 @@ -38,8 +38,10 @@ #include <string.h> #include "gaim.h" +#include "gaim-socket.h" static gint UI_fd = -1; +int gaim_session = 0; GSList *uis = NULL; static guchar *UI_build(guint32 *len, guchar type, guchar subtype, va_list args) @@ -132,6 +134,7 @@ static void meta_handler(struct UI *ui, guchar subtype, guchar *data) { + struct gaim_cui_packet *p; switch (subtype) { case CUI_META_LIST: break; @@ -151,6 +154,11 @@ g_source_remove(ui->inpa); g_free(ui); break; + case CUI_META_PING: + p = cui_packet_new(CUI_TYPE_META, CUI_META_ACK); + cui_send_packet(g_io_channel_unix_get_fd(ui->channel), p); + cui_packet_free(p); + break; default: debug_printf("unhandled meta subtype %d\n", subtype); break; @@ -289,6 +297,27 @@ return total; } +static void remote_handler(struct UI *ui, guchar subtype, guchar *data, int len) +{ + const char *resp; + char *send; + switch (subtype) { + case CUI_REMOTE_CONNECTIONS: + break; + case CUI_REMOTE_URI: + send = g_malloc(len + 1); + memcpy(send, data, len); + send[len] = 0; + resp = handle_uri(send); + g_free(send); + /* report error */ + break; + default: + debug_printf("Unhandled remote subtype %d\n", subtype); + break; + } +} + static gboolean UI_readable(GIOChannel *source, GIOCondition cond, gpointer data) { struct UI *ui = data; @@ -365,8 +394,11 @@ case CUI_TYPE_CHAT: chat_handler(ui, subtype, in); break; - */ - default: + */ + case CUI_TYPE_REMOTE: + remote_handler(ui, subtype, in, len); + break; + default: debug_printf("unhandled type %d\n", type); break; } @@ -402,18 +434,23 @@ { struct sockaddr_un saddr; gint fd; - + + while (gaim_session_exists(gaim_session)) + gaim_session++; + + debug_printf("session: %d\n", gaim_session); + if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) { mode_t m = umask(0177); saddr.sun_family = AF_UNIX; g_snprintf(saddr.sun_path, 108, "%s/gaim_%s.%d", - g_get_tmp_dir(), g_get_user_name(), getpid()); + g_get_tmp_dir(), g_get_user_name(), gaim_session); if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1) listen(fd, 100); else { g_log(NULL, G_LOG_LEVEL_CRITICAL, - "Failed to assign %s to a socket (Error: %s)", - saddr.sun_path, strerror(errno)); + "Failed to assign %s to a socket (Error: %s)", + saddr.sun_path, strerror(errno)); return -1; } umask(m); @@ -450,7 +487,7 @@ { char buf[1024]; close(UI_fd); - sprintf(buf, "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); + sprintf(buf, "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session); unlink(buf); debug_printf("Removed core\n"); } Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- core.h 29 Aug 2002 01:47:13 -0000 1.22 +++ core.h 30 Aug 2002 16:09:22 -0000 1.23 @@ -148,6 +148,7 @@ /* Globals in core.c */ extern GSList *uis; +extern gaim_session; /* Globals in plugins.c */ extern GList *plugins; Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.334 retrieving revision 1.335 diff -u -d -r1.334 -r1.335 --- gaim.h 29 Aug 2002 21:40:07 -0000 1.334 +++ gaim.h 30 Aug 2002 16:09:22 -0000 1.335 @@ -43,12 +43,19 @@ #define CUI_TYPE_BUDDY 5 /* BUDDY_LIST, i.e., both groups and buddies */ #define CUI_TYPE_MESSAGE 6 #define CUI_TYPE_CHAT 7 +#define CUI_TYPE_REMOTE 8 /* This is used to send commands to other UI's, + * like "Open new conversation" or "send IM". + * Even though there's much redundancy with the + * other CUI_TYPES, we're better keeping this stuff + * seperate because it's intended use is so different */ #define CUI_META_LIST 1 /* 1 is always list; this is ignored by the core. If we move to TCP this can be a keepalive */ #define CUI_META_QUIT 2 #define CUI_META_DETACH 3 /* you don't need to send this, you can just close the socket. the core will understand. */ +#define CUI_META_PING 4 +#define CUI_META_ACK 5 #define CUI_PLUGIN_LIST 1 #define CUI_PLUGIN_LOAD 2 @@ -84,6 +91,19 @@ #define CUI_CHAT_SEND 5 #define CUI_CHAT_RECV 6 +#define CUI_REMOTE_CONNECTIONS 2 /* Get a list of gaim_connections */ +#define CUI_REMOTE_URI 3 /* Have the core handle aim:// URI's */ +#define CUI_REMOTE_BLIST 4 /* Return a copy of the buddy list */ +#define CUI_REMOTE_STATE 5 /* Given a buddy, return his presence. */ +#define CUI_REMOTE_NEW_CONVO 6 /* Must give a user, can give an optional message */ +#define CUI_REMOTE_SEND 7 /* Sends a message, a 'quiet' flag determines whether + * a convo window is displayed or not. */ +#define CUI_REMOTE_ADD_BUDDY 8 /* Adds buddy to list */ +#define CUI_REMOTE_REMOVE_BUDDY 9 /* Removes buddy from list */ +#define CUI_REMOTE_JOIN_CHAT 10 /* Joins a chat. */ + /* What else?? */ + + #define IM_FLAG_AWAY 0x01 #define IM_FLAG_CHECKBOX 0x02 #define IM_FLAG_GAIMUSER 0x04 @@ -432,6 +452,7 @@ 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 *); +extern const char *handle_uri(char *); #ifdef HAVE_LANGINFO_CODESET #define utf8_to_str(in) convert_string(in, nl_langinfo(CODESET), "UTF-8"); Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- util.c 30 Aug 2002 03:14:05 -0000 1.131 +++ util.c 30 Aug 2002 16:09:22 -0000 1.132 @@ -32,7 +32,9 @@ #include <string.h> #include <sys/wait.h> #include <ctype.h> +#ifdef HAVE_ICONV #include <iconv.h> +#endif #include <math.h> #include "gaim.h" #include "prpl.h" @@ -1263,4 +1265,128 @@ } return fp; +} + +/* AIM URI's ARE FUN :-D */ +const char *handle_uri(char *uri) { + GString *str; + GSList *conn = connections; + struct gaim_connection *gc; + + debug_printf("Handling URI: %s\n", uri); + + /* Well, we'd better check to make sure we have at least one + AIM account connected. */ + while (gc = conn->data) { + if (gc->protocol == PROTO_TOC) { + break; + } + conn = conn->next; + } + + if (gc == NULL) + return "Not connected to AIM"; + + /* aim://goim?screenname=screenname&message=message */ + if (!g_strncasecmp(uri, "aim://goim?", strlen("aim://goim?"))) { + char *who, *what; + struct conversation *c; + uri = uri + strlen("aim://goim?"); + + if (!(who = strstr(uri, "screenname="))) { + return "No screenname given."; + } + /* spaces are encoded as +'s */ + who = who + strlen("screenname="); + str = g_string_new(NULL); + while (*who && (*who != '&')) { + g_string_append_c(str, *who == '+' ? ' ' : *who); + who++; + } + who = g_strdup(str->str); + g_string_free(str, TRUE); + + what = strstr(uri, "message="); + if (what) { + what = what + strlen("message="); + str = g_string_new(NULL); + while (*what && (*what != '&' || !g_strncasecmp(what, "&", 5))) { + g_string_append_c(str, *what == '+' ? ' ' : *what); + what++; + } + what = g_strdup(str->str); + g_string_free(str, TRUE); + } + + c = new_conversation(who); + g_free(who); + if (what) { + int finish; + gtk_editable_insert_text(GTK_EDITABLE(c->entry), + what, strlen(what), &finish); + g_free(what); + } + } else if (!g_strncasecmp(uri, "aim://addbuddy?", strlen("aim://addbuddy?"))) { + char *who, *group; + uri = uri + strlen("aim://addbuddy?"); + /* spaces are encoded as +'s */ + + if (!(who = strstr(uri, "screenname="))) { + return "No screenname given."; + } + who = who + strlen("screenname="); + str = g_string_new(NULL); + while (*who && (*who != '&')) { + g_string_append_c(str, *who == '+' ? ' ' : *who); + who++; + } + who = g_strdup(str->str); + g_string_free(str, TRUE); + + group = strstr(uri, "group="); + if (group) { + group = group + strlen("group="); + str = g_string_new(NULL); + while (*group && (*group != '&' || !g_strncasecmp(group, "&", 5))) { + g_string_append_c(str, *group == '+' ? ' ' : *group); + group++; + } + group = g_strdup(str->str); + g_string_free(str, TRUE); + } + debug_printf("who: %s\n", who); + show_add_buddy(gc, who, group, NULL); + g_free(who); + if (group) + g_free(group); + } else if (!g_strncasecmp(uri, "aim://gochat?", strlen("aim://gochat?"))) { + char *room; + GList *chat=NULL; + int exch = 5; + + uri = uri + strlen("aim://gochat?"); + /* spaces are encoded as +'s */ + + if (!(room = strstr(uri, "roomname="))) { + return "No roomname given."; + } + room = room + strlen("roomname="); + str = g_string_new(NULL); + while (*room && (*room != '&')) { + g_string_append_c(str, *room == '+' ? ' ' : *room); + room++; + } + room = g_strdup(str->str); + g_string_free(str, TRUE); + chat = g_list_append(NULL, room); + chat = g_list_append(chat, &exch); + serv_join_chat(gc, chat); + g_free(room); + g_list_free(chat); + } else { + return "Invalid AIM URI"; + } + + + return NULL; } |
From: Sean E. <sea...@us...> - 2002-08-30 16:09:24
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv26153 Modified Files: ChangeLog Log Message: This isn't complete--but it's cool. gaim-remote is now built and installed. Eventually it will do lots of cool stuff--right now it just handles aim:// URI's. Try it out... when connected to OSCAR run: gaim-remote uri "aim://goim?screenname=seanegn&message=Good+job+Sean" Also, I made it so that if you're already running a Gaim session, and start a new one, it won't auto-login and disconnect all your accounts from the first instance. Useful if you accidentally hit the wrong button or something. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.536 retrieving revision 1.537 diff -u -d -r1.536 -r1.537 --- ChangeLog 29 Aug 2002 06:30:52 -0000 1.536 +++ ChangeLog 30 Aug 2002 16:09:20 -0000 1.537 @@ -58,6 +58,9 @@ * Nice Oscar changes--mostly internal (Thanks Mark Doliner) * event_del_conversation for plugins (Thanks Bill Tompkins) * Code cleanups and fixes (Thanks Federico Mena Quintero) + * aim:// URI's supported with gaim-remote command + * Don't auto-login if an existing Gaim session is already + running. version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan) |
From: Sean E. <sea...@us...> - 2002-08-30 11:55:00
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv32499 Modified Files: Tag: gtk1-stable ChangeLog Log Message: Thanks javabsp Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.509.2.18 retrieving revision 1.509.2.19 diff -u -d -r1.509.2.18 -r1.509.2.19 --- ChangeLog 30 Aug 2002 07:11:26 -0000 1.509.2.18 +++ ChangeLog 30 Aug 2002 11:54:53 -0000 1.509.2.19 @@ -16,6 +16,9 @@ * Prevent a possible crash in unhide_buddy_list() (Thanks Ari Pollak) * Fixed a compilation problem on systems without iconv. + * GtkIMHtml can be set to render font sizes as point size + or AIMish relative sizes -- no more huge Yahoo fonts. (Thanks + Ka-Hing Cheung) version 0.59.1 (08/25/2002) * Created a gtk1-stable branch for GTK+ 1.2 bugfix releases. |
From: Sean E. <sea...@us...> - 2002-08-30 11:55:00
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv32499/src Modified Files: Tag: gtk1-stable conversation.c gtkimhtml.c gtkimhtml.h prpl.h Log Message: Thanks javabsp Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.358.2.1 retrieving revision 1.358.2.2 diff -u -d -r1.358.2.1 -r1.358.2.2 --- conversation.c 25 Aug 2002 21:29:03 -0000 1.358.2.1 +++ conversation.c 30 Aug 2002 11:54:53 -0000 1.358.2.2 @@ -92,7 +92,7 @@ static void remove_checkbox(struct conversation *); static void update_smilies(struct conversation *c); - +static void update_fontmode(struct conversation *c); /*------------------------------------------------------------------------*/ /* Helpers */ @@ -193,6 +193,7 @@ update_icon(c); update_checkbox(c); update_smilies(c); + update_fontmode(c); plugin_event(event_new_conversation, name, 0, 0, 0); return c; } @@ -1766,6 +1767,12 @@ char buf2[BUF_LONG]; char mdate[64]; int unhighlight = 0; + int timesize; + + if (c->gc && c->gc->prpl->options & OPT_PROTO_USE_POINT_SIZE) + timesize = 10; + else + timesize = 2; if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c))) return; @@ -1819,11 +1826,11 @@ if (flags & WFLAG_SYSTEM) { if (convo_options & OPT_CONVO_SHOW_TIME) - g_snprintf(buf, BUF_LONG, "<FONT SIZE=\"2\">(%s) </FONT><B>%s</B>", mdate, what); + g_snprintf(buf, BUF_LONG, "<FONT SIZE=\"%d\">(%s) </FONT><B>%s</B>", timesize, mdate, what); else g_snprintf(buf, BUF_LONG, "<B>%s</B>", what); - g_snprintf(buf2, sizeof(buf2), "<FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B><BR>", - mdate, what); + g_snprintf(buf2, sizeof(buf2), "<FONT SIZE=\"%d\"><!--(%s) --></FONT><B>%s</B><BR>", + timesize, mdate, what); gtk_imhtml_append_text(GTK_IMHTML(c->text), buf2, -1, 0); @@ -1905,12 +1912,12 @@ } if (convo_options & OPT_CONVO_SHOW_TIME) - g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><FONT SIZE=\"2\">(%s) </FONT>" - "<B>%s</B></FONT> ", colour, mdate, str); + g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><FONT SIZE=\"%d\">(%s) </FONT>" + "<B>%s</B></FONT> ", colour, timesize, mdate, str); else g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><B>%s</B></FONT> ", colour, str); - g_snprintf(buf2, BUF_LONG, "<FONT COLOR=\"%s\"><FONT SIZE=\"2\"><!--(%s) --></FONT>" - "<B>%s</B></FONT> ", colour, mdate, str); + g_snprintf(buf2, BUF_LONG, "<FONT COLOR=\"%s\"><FONT SIZE=\"%d\"><!--(%s) --></FONT>" + "<B>%s</B></FONT> ", colour, timesize, mdate, str); g_free(str); @@ -2328,6 +2335,7 @@ update_icon(cnv); update_checkbox(cnv); update_smilies(cnv); + update_fontmode(cnv); gaim_setup_imhtml_smileys(cnv->text); } @@ -2487,6 +2495,7 @@ update_icon(c); update_checkbox(c); update_smilies(c); + update_fontmode(c); gaim_setup_imhtml_smileys(c->text); } @@ -3526,6 +3535,15 @@ c->icon_timer = 0; c->frame = 0; #endif +} + +void update_fontmode(struct conversation *c) +{ + if (!c || !c->gc) + return; + + gtk_imhtml_set_use_pointsize(GTK_IMHTML(c->text), + c->gc->prpl->options & OPT_PROTO_USE_POINT_SIZE); } void update_smilies(struct conversation *c) Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.108.2.2 retrieving revision 1.108.2.3 diff -u -d -r1.108.2.2 -r1.108.2.3 --- gtkimhtml.c 29 Aug 2002 00:32:22 -0000 1.108.2.2 +++ gtkimhtml.c 30 Aug 2002 11:54:54 -0000 1.108.2.3 @@ -69,7 +69,8 @@ #define MAX_FONT_SIZE 7 -#define POINT_SIZE(x) (_point_sizes [MIN ((x), MAX_FONT_SIZE) - 1]) +#define POINT_SIZE(x) (imhtml->use_pointsize ? x * 10 : \ + _point_sizes [MIN ((x), MAX_FONT_SIZE) - 1]) static gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; #define DEFAULT_PRE_FACE "courier" @@ -260,6 +261,11 @@ gtk_imhtml_init_smileys (imhtml); } +void +gtk_imhtml_set_use_pointsize (GtkIMHtml *imhtml, gboolean point) +{ + imhtml->use_pointsize = point; +} struct im_image { gchar *filename; Index: gtkimhtml.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.h,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -d -r1.14 -r1.14.2.1 --- gtkimhtml.h 20 Apr 2002 08:10:13 -0000 1.14 +++ gtkimhtml.h 30 Aug 2002 11:54:54 -0000 1.14.2.1 @@ -79,7 +79,8 @@ gboolean smileys; gboolean comments; - + gboolean use_pointsize; + GtkSmileyTree *smiley_data; }; @@ -132,6 +133,9 @@ void gtk_imhtml_show_comments (GtkIMHtml *imhtml, gboolean show); + +void gtk_imhtml_set_use_pointsize(GtkIMHtml *imhtml, + gboolean point); GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, const gchar *text, Index: prpl.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.h,v retrieving revision 1.66 retrieving revision 1.66.2.1 diff -u -d -r1.66 -r1.66.2.1 --- prpl.h 15 Jun 2002 20:21:01 -0000 1.66 +++ prpl.h 30 Aug 2002 11:54:54 -0000 1.66.2.1 @@ -72,6 +72,8 @@ #define OPT_PROTO_BUDDY_ICON 0x00000040 /* Oscar lets you send images in direct IMs */ #define OPT_PROTO_IM_IMAGE 0x00000080 +/* Oscar doesn't use point size, Yahoo and Jabber do */ +#define OPT_PROTO_USE_POINT_SIZE 0x00000100 #define GAIM_AWAY_CUSTOM "Custom" |
From: Sean E. <sea...@us...> - 2002-08-30 11:55:00
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv32499/src/protocols/yahoo Modified Files: Tag: gtk1-stable yahoo.c Log Message: Thanks javabsp Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.43 retrieving revision 1.43.2.1 diff -u -d -r1.43 -r1.43.2.1 --- yahoo.c 1 May 2002 04:26:01 -0000 1.43 +++ yahoo.c 30 Aug 2002 11:54:54 -0000 1.43.2.1 @@ -1431,7 +1431,7 @@ void yahoo_init(struct prpl *ret) { ret->protocol = PROTO_YAHOO; - ret->options = OPT_PROTO_MAIL_CHECK; + ret->options = OPT_PROTO_MAIL_CHECK | OPT_PROTO_USE_POINT_SIZE; ret->name = yahoo_name; ret->user_opts = yahoo_user_opts; ret->login = yahoo_login; |
From: Sean E. <sea...@us...> - 2002-08-30 11:55:00
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv32499/src/protocols/jabber Modified Files: Tag: gtk1-stable jabber.c Log Message: Thanks javabsp Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.56 retrieving revision 1.56.2.1 diff -u -d -r1.56 -r1.56.2.1 --- jabber.c 19 Jun 2002 21:20:08 -0000 1.56 +++ jabber.c 30 Aug 2002 11:54:54 -0000 1.56.2.1 @@ -3769,7 +3769,9 @@ { /* the NULL's aren't required but they're nice to have */ ret->protocol = PROTO_JABBER; - ret->options = OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_CHAT_TOPIC; + ret->options = OPT_PROTO_UNIQUE_CHATNAME | + OPT_PROTO_CHAT_TOPIC | + OPT_PROTO_USE_POINT_SIZE; ret->name = jabber_name; ret->list_icon = jabber_list_icon; ret->away_states = jabber_away_states; |
From: Sean E. <sea...@us...> - 2002-08-30 07:11:31
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv23307 Modified Files: Tag: gtk1-stable ChangeLog Log Message: buggenklosen Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.509.2.17 retrieving revision 1.509.2.18 diff -u -d -r1.509.2.17 -r1.509.2.18 --- ChangeLog 30 Aug 2002 06:08:54 -0000 1.509.2.17 +++ ChangeLog 30 Aug 2002 07:11:26 -0000 1.509.2.18 @@ -15,6 +15,7 @@ Ari Pollak) * Prevent a possible crash in unhide_buddy_list() (Thanks Ari Pollak) + * Fixed a compilation problem on systems without iconv. version 0.59.1 (08/25/2002) * Created a gtk1-stable branch for GTK+ 1.2 bugfix releases. |
From: Sean E. <sea...@us...> - 2002-08-30 07:11:30
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23307/src Modified Files: Tag: gtk1-stable util.c Log Message: buggenklosen Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.123.2.1 retrieving revision 1.123.2.2 diff -u -d -r1.123.2.1 -r1.123.2.2 --- util.c 22 Aug 2002 03:25:00 -0000 1.123.2.1 +++ util.c 30 Aug 2002 07:11:27 -0000 1.123.2.2 @@ -32,7 +32,9 @@ #include <string.h> #include <sys/wait.h> #include <ctype.h> +#ifdef HAVE_ICONV #include <iconv.h> +#endif #include <math.h> #include "gaim.h" #include "prpl.h" |
From: Sean E. <sea...@us...> - 2002-08-30 06:08:58
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv8711 Modified Files: Tag: gtk1-stable ChangeLog Log Message: tpyo Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.509.2.16 retrieving revision 1.509.2.17 diff -u -d -r1.509.2.16 -r1.509.2.17 --- ChangeLog 29 Aug 2002 17:55:38 -0000 1.509.2.16 +++ ChangeLog 30 Aug 2002 06:08:54 -0000 1.509.2.17 @@ -4,7 +4,7 @@ * Japanese translation updated (Thanks, Junichi Uekawa) * Won't crash when you set your MSN Friendly name to an empty string. - * Default manual browser commandn changed to reflect the + * Default manual browser command changed to reflect the fix in 0.59.1 * Fixed the non-manual browser settings which were broke in 0.59.1 (Thanks, Chris Blizzard) |
From: Sean E. <sea...@us...> - 2002-08-30 03:39:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv5088/src Modified Files: aim.c Log Message: - gdk_pixbuf_unref(icon); Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.187 retrieving revision 1.188 diff -u -d -r1.187 -r1.188 --- aim.c 30 Aug 2002 03:27:26 -0000 1.187 +++ aim.c 30 Aug 2002 03:39:00 -0000 1.188 @@ -504,8 +504,6 @@ debug_printf("Failed to load icon from %s/pixmaps/gaim.png\n",DATADIR); } - gdk_pixbuf_unref(icon); - g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); UI_fd = open_socket(name); |
From: Sean E. <sea...@us...> - 2002-08-30 03:27:29
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv2305/src Modified Files: aim.c Log Message: + gdk_pixbuf_free(icon); Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.186 retrieving revision 1.187 diff -u -d -r1.186 -r1.187 --- aim.c 30 Aug 2002 03:13:59 -0000 1.186 +++ aim.c 30 Aug 2002 03:27:26 -0000 1.187 @@ -504,6 +504,8 @@ debug_printf("Failed to load icon from %s/pixmaps/gaim.png\n",DATADIR); } + gdk_pixbuf_unref(icon); + g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); UI_fd = open_socket(name); |
From: Sean E. <sea...@us...> - 2002-08-30 03:17:23
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv32437 Modified Files: chatlist.c Log Message: pretty pictures for the plugins. Index: chatlist.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/chatlist.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- chatlist.c 4 Mar 2002 03:04:48 -0000 1.12 +++ chatlist.c 30 Aug 2002 03:17:21 -0000 1.13 @@ -324,7 +324,6 @@ gtk_window_set_title(GTK_WINDOW(parent), "Chat Rooms"); gtk_window_set_wmclass(GTK_WINDOW(parent), "chatlist", "Gaim"); gtk_widget_realize(parent); - aol_icon(parent->window); gtk_signal_connect(GTK_OBJECT(parent), "destroy", GTK_SIGNAL_FUNC(parent_destroy), NULL); |
From: Sean E. <sea...@us...> - 2002-08-30 03:17:23
|
Update of /cvsroot/gaim/gaim/plugins/ticker In directory usw-pr-cvs1:/tmp/cvs-serv32437/ticker Modified Files: ticker.c Log Message: pretty pictures for the plugins. Index: ticker.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/ticker/ticker.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ticker.c 29 Aug 2002 01:47:13 -0000 1.2 +++ ticker.c 30 Aug 2002 03:17:21 -0000 1.3 @@ -87,7 +87,6 @@ gtk_window_set_wmclass (GTK_WINDOW(tickerwindow), "ticker", "Gaim"); gtk_widget_realize(tickerwindow); - aol_icon(tickerwindow->window); ticker = gtk_ticker_new(); if (!ticker) |
From: Sean E. <sea...@us...> - 2002-08-30 03:14:33
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv31458/pixmaps Modified Files: Makefile.am Log Message: Rob McQueen removed aol_icon() and made Gaim use the pretty png as our default icon. Thanks. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/Makefile.am,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- Makefile.am 25 Aug 2002 10:51:22 -0000 1.75 +++ Makefile.am 30 Aug 2002 03:13:59 -0000 1.76 @@ -4,7 +4,6 @@ add.xpm \ add_small.xpm \ admin_icon.xpm \ - aimicon.xpm \ angel.xpm \ arrow_down.xpm \ arrow_right.xpm \ @@ -45,7 +44,6 @@ fontface2.xpm \ free_icon.xpm \ gaim.png \ - gaim.xpm \ gaim_error.png \ gaim_info.png \ gaim_question.png \ |
From: Sean E. <sea...@us...> - 2002-08-30 03:14:09
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv31458/src Modified Files: about.c aim.c away.c buddy.c buddy_chat.c conversation.c dialogs.c multi.c plugins.c prefs.c prpl.c server.c ui.h util.c Log Message: Rob McQueen removed aol_icon() and made Gaim use the pretty png as our default icon. Thanks. Index: about.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/about.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- about.c 29 Aug 2002 21:40:06 -0000 1.71 +++ about.c 30 Aug 2002 03:13:59 -0000 1.72 @@ -95,7 +95,6 @@ gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim"); gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE); gtk_widget_realize(about); - aol_icon(about->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.185 retrieving revision 1.186 diff -u -d -r1.185 -r1.186 --- aim.c 29 Aug 2002 21:40:06 -0000 1.185 +++ aim.c 30 Aug 2002 03:13:59 -0000 1.186 @@ -226,7 +226,7 @@ GList *tmp; if (mainwindow) { - gtk_widget_show(mainwindow); + gtk_window_present(GTK_WINDOW(mainwindow)); return; } @@ -237,7 +237,6 @@ GTK_SIGNAL_FUNC(cancel_logon), mainwindow); gtk_window_set_title(GTK_WINDOW(mainwindow), _("Gaim - Login")); gtk_widget_realize(mainwindow); - aol_icon(mainwindow->window); gdk_window_set_group(mainwindow->window, mainwindow->window); table = gtk_table_new(8, 2, FALSE); @@ -492,6 +491,18 @@ GIOChannel *channel; int UI_fd; char name[256]; + GList *icons = NULL; + GdkPixbuf *icon = NULL; + + /* use the nice PNG icon for all the windows */ + icon = gdk_pixbuf_new_from_file(DATADIR "/pixmaps/gaim.png",NULL); + if (icon) { + icons = g_list_append(icons,icon); + gtk_window_set_default_icon_list(icons); + g_object_unref(G_OBJECT(icon)); + } else { + debug_printf("Failed to load icon from %s/pixmaps/gaim.png\n",DATADIR); + } g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); @@ -712,12 +723,9 @@ show_usage(0, argv[0]); return 0; } - /* show version window */ + /* show version message */ if (opt_version) { - gtk_init(&argc, &argv); - load_prefs(); - show_about(0, (void *)2); - gtk_main(); + printf("Gaim %s\n",VERSION); return 0; } Index: away.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/away.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- away.c 29 Aug 2002 21:40:06 -0000 1.71 +++ away.c 30 Aug 2002 03:13:59 -0000 1.72 @@ -188,7 +188,6 @@ gtk_window_set_title(GTK_WINDOW(imaway), _("Gaim - Away!")); gtk_signal_connect(GTK_OBJECT(imaway), "destroy", GTK_SIGNAL_FUNC(do_im_back), imaway); gtk_widget_realize(imaway); - aol_icon(imaway->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(imaway), vbox); Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.325 retrieving revision 1.326 diff -u -d -r1.325 -r1.326 --- buddy.c 29 Aug 2002 21:40:06 -0000 1.325 +++ buddy.c 30 Aug 2002 03:13:59 -0000 1.326 @@ -2661,7 +2661,6 @@ gtk_window_set_wmclass(GTK_WINDOW(blist), "buddy_list", "Gaim"); gtk_widget_realize(blist); - aol_icon(blist->window); gtk_window_set_policy(GTK_WINDOW(blist), TRUE, TRUE, TRUE); Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.157 retrieving revision 1.158 diff -u -d -r1.157 -r1.158 --- buddy_chat.c 29 Aug 2002 01:47:13 -0000 1.157 +++ buddy_chat.c 30 Aug 2002 03:14:00 -0000 1.158 @@ -263,7 +263,6 @@ gtk_signal_connect(GTK_OBJECT(joinchat), "delete_event", GTK_SIGNAL_FUNC(destroy_join_chat), joinchat); gtk_window_set_title(GTK_WINDOW(joinchat), _("Join Chat")); - aol_icon(joinchat->window); mainbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); @@ -455,7 +454,6 @@ gtk_window_set_focus(GTK_WINDOW(invite), GTK_WIDGET(GTK_COMBO(inviteentry)->entry)); gtk_container_add(GTK_CONTAINER(invite), vbox); - aol_icon(invite->window); } gtk_widget_show(invite); @@ -1184,7 +1182,6 @@ gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, FALSE); gtk_container_border_width(GTK_CONTAINER(win), 0); gtk_widget_realize(win); - aol_icon(win->window); gtk_window_set_title(GTK_WINDOW(win), _("Gaim - Group Chats")); gtk_signal_connect(GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(delete_all_convo), NULL); @@ -1230,7 +1227,6 @@ gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE); gtk_container_border_width(GTK_CONTAINER(win), 10); gtk_widget_realize(win); - aol_icon(win->window); g_snprintf(buf, sizeof(buf), "Gaim - %s (chat)", b->name); gtk_window_set_title(GTK_WINDOW(win), buf); gtk_signal_connect(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(close_callback), b); Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.373 retrieving revision 1.374 diff -u -d -r1.373 -r1.374 --- conversation.c 30 Aug 2002 03:04:11 -0000 1.373 +++ conversation.c 30 Aug 2002 03:14:01 -0000 1.374 @@ -2767,7 +2767,6 @@ gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, FALSE); gtk_container_border_width(GTK_CONTAINER(win), 0); gtk_widget_realize(win); - aol_icon(win->window); gtk_window_set_title(GTK_WINDOW(win), _("Gaim - Conversations")); gtk_signal_connect(GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(delete_all_convo), NULL); @@ -2815,7 +2814,6 @@ gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE); gtk_container_border_width(GTK_CONTAINER(win), 10); gtk_widget_realize(win); - aol_icon(win->window); gtk_signal_connect(GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(delete_event_convo), c); } Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.332 retrieving revision 1.333 diff -u -d -r1.332 -r1.333 --- dialogs.c 30 Aug 2002 03:04:11 -0000 1.332 +++ dialogs.c 30 Aug 2002 03:14:01 -0000 1.333 @@ -71,8 +71,6 @@ #include "pixmaps/wink.xpm" #include "pixmaps/yell.xpm" -#include "pixmaps/aimicon.xpm" - #include "pixmaps/aol_icon.xpm" #include "pixmaps/free_icon.xpm" #include "pixmaps/dt_icon.xpm" @@ -414,7 +412,6 @@ GTK_SIGNAL_FUNC(destroy_dialog), w->window); gtk_signal_connect(GTK_OBJECT(w->window), "delete_event", GTK_SIGNAL_FUNC(free_warn_data), w); gtk_widget_realize(w->window); - aol_icon(w->window->window); fbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(w->window), fbox); @@ -607,7 +604,6 @@ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_widget_show(hbox); - aol_icon(d->window); gtk_widget_show(d); return d; @@ -700,7 +696,6 @@ gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), eedialog); gtk_widget_realize(eedialog); - aol_icon(eedialog->window); gtk_widget_show(eedialog); } @@ -723,7 +718,6 @@ gtk_signal_connect(GTK_OBJECT(imdialog), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), imdialog); gtk_widget_realize(imdialog); - aol_icon(imdialog->window); mainbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); @@ -861,7 +855,6 @@ gtk_window_set_title(GTK_WINDOW(info->window), _("Gaim - Get User Info")); gtk_widget_grab_focus(info->entry); - aol_icon(info->window->window); gtk_widget_show_all(info->window); } @@ -1003,7 +996,6 @@ gtk_container_add(GTK_CONTAINER(a->window), frame); gtk_container_set_border_width(GTK_CONTAINER(a->window), 5); gtk_widget_realize(a->window); - aol_icon(a->window->window); gtk_widget_show(a->window); } @@ -1084,7 +1076,6 @@ gtk_window_set_title(GTK_WINDOW(a->window), _("Gaim - Add Buddy")); gtk_widget_realize(a->window); - aol_icon(a->window->window); gtk_signal_connect(GTK_OBJECT(a->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), a->window); gtk_signal_connect(GTK_OBJECT(a->window), "destroy", GTK_SIGNAL_FUNC(free_dialog), a); dialogwindows = g_list_prepend(dialogwindows, a->window); @@ -1427,7 +1418,6 @@ 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); @@ -1692,7 +1682,6 @@ gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - New Buddy Pounce")); gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); gtk_widget_realize(b->window); - aol_icon(b->window->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); @@ -1967,7 +1956,6 @@ gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Set Dir Info")); gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); gtk_widget_realize(b->window); - aol_icon(b->window->window); fbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(b->window), fbox); @@ -2152,7 +2140,6 @@ gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Password Change")); gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); gtk_widget_realize(b->window); - aol_icon(b->window->window); dialogwindows = g_list_prepend(dialogwindows, b->window); fbox = gtk_vbox_new(FALSE, 5); @@ -2251,7 +2238,6 @@ gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Set User Info")); gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); gtk_widget_realize(b->window); - aol_icon(b->window->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); @@ -2355,7 +2341,6 @@ gtk_container_border_width(GTK_CONTAINER(b->window), 5); gtk_widget_realize(GTK_WIDGET(b->window)); gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(info_dlg_free), b); - aol_icon(b->window->window); bbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(b->window), bbox); @@ -2545,7 +2530,6 @@ gtk_window_set_focus(GTK_WINDOW(p->window), p->entry); gtk_container_add(GTK_CONTAINER(p->window), frame); gtk_widget_realize(p->window); - aol_icon(p->window->window); gtk_widget_show(p->window); } @@ -2812,7 +2796,6 @@ gtk_container_add(GTK_CONTAINER(b->window), fbox); gtk_container_border_width(GTK_CONTAINER(b->window), 5); gtk_widget_realize(b->window); - aol_icon(b->window->window); gtk_widget_show(b->window); } @@ -2833,7 +2816,6 @@ gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(b->window), "find_email", "Gaim"); gtk_widget_realize(b->window); - aol_icon(b->window->window); dialogwindows = g_list_prepend(dialogwindows, b->window); gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Find Buddy By Email")); @@ -2982,7 +2964,6 @@ b->toggle = linky; b->entry = c->entry; gtk_widget_realize(c->link_dialog); - aol_icon(c->link_dialog->window); } @@ -3100,7 +3081,6 @@ gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->ok_button), "clicked", GTK_SIGNAL_FUNC(apply_color_dlg), (void *)1); gtk_widget_realize(fgcseld); - aol_icon(fgcseld->window); gtk_widget_show(fgcseld); gdk_window_raise(fgcseld->window); return; @@ -3125,7 +3105,6 @@ "clicked", GTK_SIGNAL_FUNC(cancel_fgcolor), c); gtk_widget_realize(c->fg_color_dialog); - aol_icon(c->fg_color_dialog->window); } gtk_widget_show(c->fg_color_dialog); @@ -3154,7 +3133,6 @@ gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->ok_button), "clicked", GTK_SIGNAL_FUNC(apply_color_dlg), (void *)2); gtk_widget_realize(bgcseld); - aol_icon(bgcseld->window); gtk_widget_show(bgcseld); gdk_window_raise(bgcseld->window); return; @@ -3179,7 +3157,6 @@ "clicked", GTK_SIGNAL_FUNC(cancel_bgcolor), c); gtk_widget_realize(c->bg_color_dialog); - aol_icon(c->bg_color_dialog->window); } gtk_widget_show(c->bg_color_dialog); @@ -3259,7 +3236,6 @@ gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->ok_button), "clicked", GTK_SIGNAL_FUNC(apply_font_dlg), fontseld); gtk_widget_realize(fontseld); - aol_icon(fontseld->window); gtk_widget_show(fontseld); gdk_window_raise(fontseld->window); return; @@ -3291,7 +3267,6 @@ gtk_widget_realize(c->font_dialog); - aol_icon(c->font_dialog->window); } gtk_widget_show(c->font_dialog); gdk_window_raise(c->font_dialog->window); @@ -3510,7 +3485,6 @@ gtk_signal_connect(GTK_OBJECT(ca->window), "delete_event", GTK_SIGNAL_FUNC(destroy_dialog), ca->window); gtk_widget_realize(ca->window); - aol_icon(ca->window->window); tbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(ca->window), tbox); @@ -3870,7 +3844,6 @@ gtk_container_add(GTK_CONTAINER(aliasdlg), frame); gtk_container_set_border_width(GTK_CONTAINER(aliasdlg), 5); gtk_widget_realize(aliasdlg); - aol_icon(aliasdlg->window); gtk_widget_show(aliasdlg); } @@ -3949,7 +3922,6 @@ gtk_object_set_user_data(GTK_OBJECT(filesel), name); gtk_widget_realize(filesel); - aol_icon(filesel->window); gtk_widget_show(filesel); return; @@ -3991,7 +3963,6 @@ gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE); gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(destroy_dialog), window); gtk_widget_realize(window); - aol_icon(window->window); box = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(window), box); @@ -4159,7 +4130,6 @@ block = gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(dont_destroy), window); gtk_widget_realize(window); - aol_icon(window->window); layout = gtk_imhtml_new(NULL, NULL); bbox = gtk_hbox_new(FALSE, 0); @@ -4354,7 +4324,6 @@ gtk_signal_connect(GTK_OBJECT(rename_dialog), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), rename_dialog); gtk_widget_realize(rename_dialog); - aol_icon(rename_dialog->window); mainbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); @@ -4460,7 +4429,6 @@ gtk_signal_connect(GTK_OBJECT(rename_bud_dialog), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), rename_bud_dialog); gtk_widget_realize(rename_bud_dialog); - aol_icon(rename_bud_dialog->window); mainbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); @@ -4579,21 +4547,6 @@ #endif /* USE_PERL */ -static GdkPixmap *icon_pm = NULL; -static GdkBitmap *icon_bm = NULL; - -void aol_icon(GdkWindow *w) -{ -#ifndef _WIN32 - if (icon_pm == NULL) { - icon_pm = gdk_pixmap_create_from_xpm_d(w, &icon_bm, NULL, (gchar **)aimicon_xpm); - } - gdk_window_set_icon(w, NULL, icon_pm, icon_bm); - if (mainwindow) - gdk_window_set_group(w, mainwindow->window); -#endif -} - GtkWidget *pixbuf_button(char *text, char *iconfile) { GtkWidget *button, *image, *label, *bbox; @@ -5144,7 +5097,6 @@ /* Clean up if user dismisses window via window manager! */ gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(b->cancel), (gpointer) b); gtk_widget_realize(b->window); - aol_icon(b->window->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER (b->window), vbox); Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- multi.c 29 Aug 2002 21:40:07 -0000 1.126 +++ multi.c 30 Aug 2002 03:14:02 -0000 1.127 @@ -756,7 +756,6 @@ u->mod = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(u->mod), "account", "Gaim"); gtk_widget_realize(u->mod); - aol_icon(u->mod->window); gtk_window_set_title(GTK_WINDOW(u->mod), _("Gaim - Modify Account")); gtk_window_set_policy(GTK_WINDOW(u->mod), FALSE, TRUE, TRUE); /* nothing odd here :) */ gtk_signal_connect(GTK_OBJECT(u->mod), "destroy", GTK_SIGNAL_FUNC(delmod), u); @@ -871,7 +870,6 @@ gtk_container_border_width(GTK_CONTAINER(p->win), 5); gtk_signal_connect(GTK_OBJECT(p->win), "destroy", GTK_SIGNAL_FUNC(pass_des), p); gtk_widget_realize(p->win); - aol_icon(p->win->window); frame = gtk_frame_new(_("Enter Password")); gtk_container_add(GTK_CONTAINER(p->win), frame); @@ -1014,7 +1012,6 @@ gtk_window_set_title(GTK_WINDOW(acctedit), _("Gaim - Account Editor")); gtk_window_set_wmclass(GTK_WINDOW(acctedit), "accounteditor", "Gaim"); gtk_widget_realize(acctedit); - aol_icon(acctedit->window); gtk_widget_set_usize(acctedit, -1, 200); gtk_signal_connect(GTK_OBJECT(acctedit), "destroy", GTK_SIGNAL_FUNC(delete_acctedit), W); @@ -1314,7 +1311,6 @@ gtk_container_set_border_width(GTK_CONTAINER(meter_win->window), 5); gtk_window_set_title (GTK_WINDOW (meter_win->window), "Gaim Account Signon"); gtk_widget_realize(meter_win->window); - aol_icon(meter_win->window->window); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (meter_win->window), GTK_WIDGET (vbox)); Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- plugins.c 29 Aug 2002 21:40:07 -0000 1.90 +++ plugins.c 30 Aug 2002 03:14:03 -0000 1.91 @@ -193,7 +193,6 @@ GAIM_DIALOG(plugwindow); gtk_window_set_wmclass(GTK_WINDOW(plugwindow), "plugins", "Gaim"); gtk_widget_realize(plugwindow); - aol_icon(plugwindow->window); gtk_window_set_title(GTK_WINDOW(plugwindow), _("Gaim - Plugins")); gtk_signal_connect(GTK_OBJECT(plugwindow), "destroy", GTK_SIGNAL_FUNC(hide_plugins), NULL); Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.245 retrieving revision 1.246 diff -u -d -r1.245 -r1.246 --- prefs.c 30 Aug 2002 03:04:11 -0000 1.245 +++ prefs.c 30 Aug 2002 03:14:04 -0000 1.246 @@ -1276,7 +1276,6 @@ prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim"); gtk_widget_realize(prefs); - aol_icon(prefs->window); gtk_window_set_title(GTK_WINDOW(prefs), _("Gaim - Preferences")); gtk_window_set_policy (GTK_WINDOW(prefs), FALSE, FALSE, TRUE); gtk_signal_connect(GTK_OBJECT(prefs), "destroy", GTK_SIGNAL_FUNC(delete_prefs), NULL); @@ -1405,7 +1404,6 @@ gtk_window_set_wmclass(GTK_WINDOW(dw->window), "debug_out", "Gaim"); gtk_signal_connect(GTK_OBJECT(dw->window), "delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL); gtk_widget_realize(dw->window); - aol_icon(dw->window->window); box = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(dw->window), box); Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- prpl.c 29 Aug 2002 01:47:14 -0000 1.58 +++ prpl.c 30 Aug 2002 03:14:04 -0000 1.59 @@ -144,7 +144,6 @@ gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, TRUE); gtk_window_set_title(GTK_WINDOW(window), _("Accept?")); gtk_widget_realize(window); - aol_icon(window->window); if (dont) gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(dont), data); @@ -211,7 +210,6 @@ gtk_window_set_title(GTK_WINDOW(window), _("Gaim - Prompt")); gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(des_prompt), p); gtk_widget_realize(window); - aol_icon(window->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); @@ -431,7 +429,6 @@ gtk_window_set_title(GTK_WINDOW(mn->email_win), _("Gaim - New Mail")); gtk_signal_connect(GTK_OBJECT(mn->email_win), "destroy", GTK_SIGNAL_FUNC(des_email_win), mn); gtk_widget_realize(mn->email_win); - aol_icon(mn->email_win->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); @@ -670,7 +667,6 @@ gtk_window_set_title(GTK_WINDOW(regdlg), _("Gaim - Registration")); gtk_window_set_wmclass(GTK_WINDOW(regdlg), "register", "Gaim"); gtk_widget_realize(regdlg); - aol_icon(regdlg->window); gtk_signal_connect(GTK_OBJECT(regdlg), "destroy", GTK_SIGNAL_FUNC(delete_regdlg), NULL); vbox = gtk_vbox_new(FALSE, 5); Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.233 retrieving revision 1.234 diff -u -d -r1.233 -r1.234 --- server.c 29 Aug 2002 21:40:08 -0000 1.233 +++ server.c 30 Aug 2002 03:14:05 -0000 1.234 @@ -887,7 +887,6 @@ d = gtk_dialog_new(); gtk_widget_realize(d); - aol_icon(d->window); label = gtk_label_new(buf2); @@ -1069,7 +1068,6 @@ gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(des_popup), window); gtk_object_set_user_data(GTK_OBJECT(window), url); gtk_widget_realize(window); - aol_icon(window->window); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(window), vbox); Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- ui.h 30 Aug 2002 03:04:12 -0000 1.49 +++ ui.h 30 Aug 2002 03:14:05 -0000 1.50 @@ -448,7 +448,6 @@ extern void show_rename_group(GtkWidget *, struct group *); extern void show_rename_buddy(GtkWidget *, struct buddy *); extern void load_perl_script(); -extern void aol_icon(GdkWindow *); extern GtkWidget *picture_button(GtkWidget *, char *, char **); extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short); extern GtkWidget *pixbuf_button(char *, char *); Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- util.c 29 Aug 2002 01:47:14 -0000 1.130 +++ util.c 30 Aug 2002 03:14:05 -0000 1.131 @@ -770,7 +770,8 @@ { switch (mode) { case 0: /* full help text */ - printf("Usage: %s [OPTION]...\n\n" + printf("Gaim %s\n" + "Usage: %s [OPTION]...\n\n" " -a, --acct display account editor window\n" " -w, --away[=MESG] make away on signon (optional argument MESG specifies\n" " name of away message to use)\n" @@ -779,11 +780,11 @@ " -u, --user=NAME use account NAME\n" " -f, --file=FILE use FILE as config\n" " -d, --debug print debugging messages to stdout\n" - " -v, --version display version information window\n" - " -h, --help display this help and exit\n", name); + " -v, --version display the current version and exit\n" + " -h, --help display this help and exit\n", VERSION, name); break; case 1: /* short message */ - printf("Try `%s -h' for more information.\n", name); + printf("Gaim %s. Try `%s -h' for more information.\n", VERSION, name); break; } } |
From: Sean E. <sea...@us...> - 2002-08-30 03:04:15
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv29181/src Modified Files: conversation.c dialogs.c gaimrc.c prefs.c ui.h Log Message: Fixed font preferences, and removed the title from alert windows. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.372 retrieving revision 1.373 diff -u -d -r1.372 -r1.373 --- conversation.c 29 Aug 2002 21:40:06 -0000 1.372 +++ conversation.c 30 Aug 2002 03:04:11 -0000 1.373 @@ -77,7 +77,7 @@ GtkWidget *convo_notebook = NULL; char fontface[128] = { 0 }; -char fontxfld[256] = { 0 }; + int fontsize = 3; extern GdkColor bgcolor; extern GdkColor fgcolor; @@ -627,18 +627,8 @@ void set_font_face(char *newfont, struct conversation *c) { char *pre_fontface; - int i, j = 0, k = 0; - - - sprintf(c->fontxfld, "%s", newfont && *newfont ? newfont : DEFAULT_FONT_XFLD); - for (i = 0; i < strlen(c->fontxfld); i++) { - if (c->fontxfld[i] == '-') { - if (++j > 2) - break; - } else if (j == 2) - c->fontface[k++] = c->fontxfld[i]; - } - c->fontface[k] = '\0'; + + sprintf(c->fontface, "%s", newfont && *newfont ? newfont : DEFAULT_FONT_FACE); c->hasfont = 1; pre_fontface = g_strconcat("<FONT FACE=\"", c->fontface, "\">", NULL); @@ -2761,7 +2751,6 @@ c->smiley_dialog = NULL; c->link_dialog = NULL; c->log_dialog = NULL; - sprintf(c->fontxfld, "%s", fontxfld); sprintf(c->fontface, "%s", fontface); c->hasfont = 0; c->bgcol = bgcolor; @@ -3333,7 +3322,6 @@ if (b->hasfont) continue; sprintf(b->fontface, "%s", fontface); - sprintf(b->fontxfld, "%s", fontxfld); } } Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.331 retrieving revision 1.332 diff -u -d -r1.331 -r1.332 --- dialogs.c 29 Aug 2002 21:40:07 -0000 1.331 +++ dialogs.c 30 Aug 2002 03:04:11 -0000 1.332 @@ -581,7 +581,7 @@ img = gtk_image_new_from_file(filename); gtk_misc_set_alignment(GTK_MISC(img), 0, 0); } - d = gtk_dialog_new_with_buttons(NULL, NULL, GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); + d = gtk_dialog_new_with_buttons("", NULL, GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); g_signal_connect(d, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_container_set_border_width (GTK_CONTAINER(d), 6); @@ -3206,34 +3206,29 @@ { /* this could be expanded to include font size, weight, etc. but for now only works with font face */ - int i, j = 0, k = 0; + int i = 0; char *fontname; struct conversation *c = gtk_object_get_user_data(GTK_OBJECT(fontsel)); if (c) { fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontsel)); - + while(fontname[i] && !isdigit(fontname[i])) { + i++; + } + fontname[i] = 0; set_font_face(fontname, c); } else { fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontsel)); - - for (i = 0; i < strlen(fontname); i++) { - if (fontname[i] == '-') { - if (++j > 2) - break; - } else if (j == 2) - fontface[k++] = fontname[i]; + while(fontface[i] && !isdigit(fontname[i]) && i < sizeof(fontface)) { + fontface[i] = fontname[i]; + i++; } - fontface[k] = '\0'; - - g_snprintf(fontxfld, sizeof(fontxfld), "%s", fontname); + fontface[i] = 0; } cancel_font(NULL, c); } -static GtkWidget *fontseld; - void destroy_fontsel(GtkWidget *w, gpointer d) { gtk_widget_destroy(fontseld); @@ -3242,17 +3237,18 @@ void show_font_dialog(struct conversation *c, GtkWidget *font) { - + char fonttif[128]; if (!font) { /* we came from the prefs dialog */ if (fontseld) return; fontseld = gtk_font_selection_dialog_new(_("Select Font")); - if (fontxfld[0]) { + if (fontface[0]) { + g_snprintf(fonttif, sizeof(fonttif), "%s 12", fontface); gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), - fontxfld); + fonttif); } else { gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), - DEFAULT_FONT_XFLD); + DEFAULT_FONT_FACE " 12"); } gtk_object_set_user_data(GTK_OBJECT(fontseld), NULL); @@ -3261,7 +3257,7 @@ gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->cancel_button), "clicked", GTK_SIGNAL_FUNC(destroy_fontsel), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->ok_button), "clicked", - GTK_SIGNAL_FUNC(apply_font_dlg), NULL); + GTK_SIGNAL_FUNC(apply_font_dlg), fontseld); gtk_widget_realize(fontseld); aol_icon(fontseld->window); gtk_widget_show(fontseld); @@ -3277,12 +3273,13 @@ else gtk_object_set_user_data(GTK_OBJECT(c->font_dialog), NULL); - if (c->fontxfld[0]) { + if (c->fontface[0]) { + g_snprintf(fonttif, sizeof(fonttif), "%s 12", c->fontface); gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(c->font_dialog), - c->fontxfld); + fonttif); } else { gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(c->font_dialog), - DEFAULT_FONT_XFLD); + DEFAULT_FONT_FACE); } gtk_signal_connect(GTK_OBJECT(c->font_dialog), "delete_event", Index: gaimrc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaimrc.c,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- gaimrc.c 28 Aug 2002 05:55:48 -0000 1.104 +++ gaimrc.c 30 Aug 2002 03:04:11 -0000 1.105 @@ -748,8 +748,6 @@ } else if (!strcmp(p->option, "away_options")) { away_options = atoi(p->value[0]); away_resend = atoi(p->value[1]); - } else if (!strcmp(p->option, "font_xfld")) { - g_snprintf(fontxfld, sizeof(fontxfld), "%s", p->value[0]); } else if (!strcmp(p->option, "font_face")) { g_snprintf(fontface, sizeof(fontface), "%s", p->value[0]); } else if (!strcmp(p->option, "font_size")) { @@ -851,7 +849,6 @@ fprintf(f, "\tsound_options { %u }\n", sound_options); fprintf(f, "\taway_options { %u } { %u }\n", away_options, away_resend); - fprintf(f, "\tfont_xfld { %s }\n", fontxfld); fprintf(f, "\tfont_face { %s }\n", fontface); fprintf(f, "\tfont_size { %d }\n", fontsize); fprintf(f, "\tforeground { %d } { %d } { %d }\n", fgcolor.red, fgcolor.green, fgcolor.blue); Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.244 retrieving revision 1.245 diff -u -d -r1.244 -r1.245 --- prefs.c 29 Aug 2002 21:40:07 -0000 1.244 +++ prefs.c 30 Aug 2002 03:04:11 -0000 1.245 @@ -1919,13 +1919,14 @@ int i = 0; char *fontname; - fontname = g_strdup(gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontseld))); + fontname = g_strdup(gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(f))); destroy_fontsel(0, 0); while(fontname[i] && !isdigit(fontname[i]) && i < sizeof(fontface_new)) { fontface_new[i] = fontname[i]; i++; } - + fontface_new[i] = 0; + debug_printf("fontface_new: %s\n", fontface_new); g_free(fontname); } Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- ui.h 29 Aug 2002 21:40:08 -0000 1.48 +++ ui.h 30 Aug 2002 03:04:12 -0000 1.49 @@ -36,8 +36,7 @@ #define gtk_accel_group_attach(x, y) _gtk_accel_group_attach(x, y) #define gtk_widget_lock_accelerators(x) -#define DEFAULT_FONT_XFLD "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" -#define DEFAULT_FONT_FACE "helvetica" +#define DEFAULT_FONT_FACE "Helvetica" #define BROWSER_NETSCAPE 0 #define BROWSER_KONQ 1 @@ -125,7 +124,6 @@ GtkWidget *log_dialog; int makesound; char fontface[128]; - char fontxfld[256]; int hasfont; GdkColor bgcol; int hasbg; @@ -296,6 +294,7 @@ /* Globals in prefs.c */ extern struct debug_window *dw; +extern GtkWidget *fontseld; /* Globals in prpl.c */ extern GtkWidget *protomenu; |
From: Sean E. <sea...@us...> - 2002-08-29 21:40:11
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv16364/src Modified Files: about.c aim.c away.c browser.c buddy.c conversation.c dialogs.c gaim.h gtkimhtml.c multi.c plugins.c prefs.c server.c ui.h Log Message: Rob McQueen went and removed all the GTK version preprocessor statements. Thanks! Index: about.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/about.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- about.c 25 Aug 2002 04:54:47 -0000 1.70 +++ about.c 29 Aug 2002 21:40:06 -0000 1.71 @@ -69,15 +69,6 @@ return VERSION; } -gboolean is_applet() -{ -#ifdef USE_APPLET - return TRUE; -#else - return FALSE; -#endif -} - void show_about(GtkWidget *w, void *null) { GtkWidget *vbox; Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.184 retrieving revision 1.185 diff -u -d -r1.184 -r1.185 --- aim.c 25 Aug 2002 10:51:22 -0000 1.184 +++ aim.c 29 Aug 2002 21:40:06 -0000 1.185 @@ -22,14 +22,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#ifdef USE_APPLET -#include "applet.h" -#include <gnome.h> -#else -#ifdef USE_GNOME -#include <gnome.h> -#endif /* USE_GNOME */ -#endif /* USE_APPLET */ #ifdef GAIM_PLUGINS #include <dlfcn.h> #endif /* GAIM_PLUGINS */ @@ -58,9 +50,7 @@ #endif #include "locale.h" #include "gtkspell.h" -#ifndef USE_APPLET #include <getopt.h> -#endif static gchar *aspell_cmd[] = { "aspell", "--sug-mode=fast","-a", NULL }; static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; @@ -106,11 +96,6 @@ void cancel_logon(void) { -#ifdef USE_APPLET - applet_buddy_show = FALSE; - if (mainwindow) - gtk_widget_hide(mainwindow); -#else #ifdef GAIM_PLUGINS /* first we tell those who have requested it we're quitting */ plugin_event(event_quit, 0, 0, 0, 0); @@ -123,7 +108,6 @@ #endif gtk_main_quit(); -#endif /* USE_APPLET */ } static int snd_tmout; @@ -143,12 +127,6 @@ logins_not_muted = 0; snd_tmout = gtk_timeout_add(10000, (GtkFunction)sound_timeout, NULL); } -#ifdef USE_APPLET - set_user_state(online); - applet_widget_unregister_callback(APPLET_WIDGET(applet), "autologin"); - applet_widget_register_callback(APPLET_WIDGET(applet), - "signoff", _("Signoff"), (AppletCallbackFunc)signoff_all, NULL); -#endif /* USE_APPLET */ } @@ -311,11 +289,9 @@ gtk_box_pack_start(GTK_BOX(sbox), bbox, TRUE, TRUE, 0); gtk_widget_show(bbox); -#ifndef USE_APPLET cancel = gtk_button_new_with_label(_("Quit")); -#else - cancel = gtk_button_new_with_label(_("Close")); -#endif +/* fixme: docklet * + * cancel = gtk_button_new_with_label(_("Close")); */ #ifndef NO_MULTI accts = gtk_button_new_with_label(_("Accounts")); #endif @@ -556,30 +532,9 @@ sigset_t sigset; void (*prev_sig_disp)(); #endif -#ifndef USE_APPLET int opt, opt_user = 0; int i; -#ifdef USE_GNOME - struct poptOption popt_options[] = { - {"acct", 'a', POPT_ARG_NONE, &opt_acct, 'a', - "Display account editor window", NULL}, - {"away", 'w', POPT_ARG_STRING, NULL, 'w', - "Make away on signon (optional argument MESG specifies name of away message to use)", - "[MESG]"}, - {"login", 'l', POPT_ARG_STRING, NULL, 'l', - "Automatically login (optional argument NAME specifies account(s) to use)", "[NAME]"}, - {"loginwin", 'n', POPT_ARG_NONE, &opt_nologin, 'n', - "Don't automatically login; show login window", NULL}, - {"user", 'u', POPT_ARG_STRING, &opt_user_arg, 'u', - "Use account NAME", "NAME"}, - {"file", 'f', POPT_ARG_STRING, &opt_rcfile_arg, 'f', - "Use FILE as config", "FILE"}, - {"debug", 'd', POPT_ARG_NONE, &opt_debug, 'd', - "Print debugging messages to stdout", NULL}, - {0, 0, 0, 0, 0, 0, 0} - }; -#endif /* USE_GNOME */ struct option long_options[] = { {"acct", no_argument, NULL, 'a'}, /*{"away", optional_argument, NULL, 'w'}, */ @@ -592,7 +547,6 @@ {"version", no_argument, NULL, 'v'}, {0, 0, 0, 0} }; -#endif #ifdef DEBUG opt_debug = 1; @@ -644,10 +598,6 @@ } #endif - -#ifdef USE_APPLET - init_applet_mgr(argc, argv); -#else for (i = 0; i < argc; i++) { /* --login option */ if (strstr(argv[i], "--l") == argv[i]) { @@ -721,18 +671,10 @@ */ gtk_set_locale(); -#ifdef USE_GNOME - gnome_init_with_popt_table(PACKAGE, VERSION, argc, argv, popt_options, 0, NULL); -#else gtk_init(&argc, &argv); -#endif /* scan command-line options */ -#ifdef USE_GNOME - opterr = 0; -#else opterr = 1; -#endif while ((opt = getopt_long(argc, argv, "adhu:f:vn", long_options, NULL)) != -1) { switch (opt) { case 'u': /* set user */ @@ -757,18 +699,14 @@ case 'n': /* don't autologin */ opt_nologin = 1; break; -#ifndef USE_GNOME case '?': default: show_usage(1, argv[0]); return 0; break; -#endif } } -#endif /* USE_APPLET */ - /* show help message */ if (opt_help) { show_usage(0, argv[0]); @@ -783,7 +721,6 @@ return 0; } - load_prefs(); core_main(); @@ -792,10 +729,8 @@ /* set the default username */ if (opt_user_arg != NULL) { set_first_user(opt_user_arg); -#ifndef USE_GNOME g_free(opt_user_arg); opt_user_arg = NULL; -#endif /* USE_GNOME */ } if (misc_options & OPT_MISC_DEBUG) @@ -826,25 +761,6 @@ opt_login_arg = NULL; } } -#ifdef USE_APPLET - applet_widget_register_callback(APPLET_WIDGET(applet), - "prefs", _("Preferences"), show_prefs, NULL); - applet_widget_register_callback(APPLET_WIDGET(applet), - "accounts", - _("Accounts"), (AppletCallbackFunc)account_editor, (void *)1); -#ifdef GAIM_PLUGINS - applet_widget_register_callback(APPLET_WIDGET(applet), - "plugins", _("Plugins"), GTK_SIGNAL_FUNC(show_plugins), NULL); -#endif /* GAIM_PLUGINS */ - - applet_widget_register_callback(APPLET_WIDGET(applet), - "autologin", _("Auto-login"), (AppletCallbackFunc)auto_login, NULL); - - if (!opt_acct) - auto_login(); - - applet_widget_gtk_main(); -#else if (!opt_acct && !opt_nologin) auto_login(); @@ -855,8 +771,6 @@ show_login(); gtk_main(); - -#endif /* USE_APPLET */ if (convo_options & OPT_CONVO_CHECK_SPELLING) gtkspell_stop(); Index: away.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/away.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- away.c 23 Feb 2002 22:50:43 -0000 1.70 +++ away.c 29 Aug 2002 21:40:06 -0000 1.71 @@ -22,11 +22,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#ifdef USE_APPLET -#include <gnome.h> -#include <applet-widget.h> -#include "applet.h" -#endif /* USE_APPLET */ #include <string.h> #include <stdio.h> #include <stdlib.h> @@ -123,10 +118,6 @@ g_free(name); gtk_clist_remove(GTK_CLIST(clist), row); -#ifdef USE_APPLET - set_user_state(away); -#endif - } @@ -170,11 +161,6 @@ awaymessage = NULL; clistqueue = NULL; clistqueuesw = NULL; -#ifdef USE_APPLET - applet_widget_unregister_callback(APPLET_WIDGET(applet), "away"); - set_user_state(online); - insert_applet_away(); -#endif /* USE_APPLET */ } @@ -260,13 +246,6 @@ return; } -#ifdef USE_APPLET - remove_applet_away(); - applet_widget_register_callback(APPLET_WIDGET(applet), - "away", _("Back"), (AppletCallbackFunc)do_im_back, NULL); - set_user_state(away); -#endif - /* New away message... Clear out the old sent_aways */ while (away_time_queue) { struct queued_away_response *qar = away_time_queue->data; @@ -284,15 +263,6 @@ void rem_away_mess(GtkWidget *w, struct away_message *a) { int default_index; -#ifdef USE_APPLET - char *awayname; - awayname = g_malloc(sizeof(*awayname) * (6 + strlen(a->name))); - awayname[0] = '\0'; - strcat(awayname, "away/"); - strcat(awayname, a->name); - applet_widget_unregister_callback(APPLET_WIDGET(applet), awayname); - g_free(awayname); -#endif default_index = g_slist_index(away_messages, default_away); if (default_index == -1) { if (away_messages != NULL) @@ -338,15 +308,6 @@ GSList *con = connections; struct gaim_connection *gc = NULL; int count = 0; - -#ifdef USE_APPLET - remove_applet_away(); - if (imaway && applet) - applet_widget_register_callback(APPLET_WIDGET(applet), - "away", _("Back"), (AppletCallbackFunc)do_im_back, NULL); - else if (applet && !imaway) - insert_applet_away(); -#endif if (prefs_away_list != NULL) { GtkWidget *hbox; Index: browser.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/browser.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- browser.c 29 Aug 2002 01:47:13 -0000 1.29 +++ browser.c 29 Aug 2002 21:40:06 -0000 1.30 @@ -576,10 +576,9 @@ netscape_command(command); g_free(command); -#ifdef USE_GNOME - } else if (web_browser == BROWSER_GNOME) { - gnome_url_show(url); -#endif /* USE_GNOME */ +/* fixme: GNOME helper * + * } else if (web_browser == BROWSER_GNOME) { * + * gnome_url_show(url); */ } else { pid_t pid; Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.324 retrieving revision 1.325 diff -u -d -r1.324 -r1.325 --- buddy.c 29 Aug 2002 01:47:13 -0000 1.324 +++ buddy.c 29 Aug 2002 21:40:06 -0000 1.325 @@ -22,11 +22,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#ifdef USE_APPLET -#include <gnome.h> -#include <applet-widget.h> -#include "applet.h" -#endif /* USE_APPLET */ #ifdef GAIM_PLUGINS #include <dlfcn.h> #endif /* GAIM_PLUGINS */ @@ -41,7 +36,6 @@ #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> -#include <gdk/gdkx.h> #include "prpl.h" #include "gaim.h" #include "pixmaps/login_icon.xpm" @@ -61,11 +55,8 @@ #endif #include "pixmaps/prefs_small.xpm" #include "pixmaps/search_small.xpm" -#ifdef USE_APPLET #include "pixmaps/close_small.xpm" -#else #include "pixmaps/exit_small.xpm" -#endif #include "pixmaps/pounce_small.xpm" #include "pixmaps/about_small.xpm" @@ -96,7 +87,6 @@ typedef struct _GtkTreePixmaps GtkTreePixmaps; - struct buddy_show { GtkWidget *item; GtkWidget *pix; @@ -120,6 +110,9 @@ }; static GSList *shows = NULL; +static gboolean blist_hidden; +static int docklet_refcount = 0; + /* Predefine some functions */ static void new_bp_callback(GtkWidget *w, struct buddy *bs); static struct group_show *find_group_show(char *group); @@ -521,16 +514,6 @@ } -#ifdef USE_APPLET -gint applet_destroy_buddy(GtkWidget *widget, GdkEvent *event, gpointer *data) -{ - applet_buddy_show = FALSE; - gtk_widget_hide(blist); - return (TRUE); -} - -#endif - static int handle_click_group(GtkWidget *widget, GdkEventButton *event, struct group *g) { if (event->type == GDK_2BUTTON_PRESS) { @@ -1418,10 +1401,6 @@ void do_quit() { -#ifdef USE_APPLET - applet = NULL; -#endif - /* first we tell those who have requested it we're quitting */ plugin_event(event_quit, 0, 0, 0, 0); @@ -2016,16 +1995,71 @@ return g; } +/* used by this file, and by iconaway.so */ void hide_buddy_list() { - if (blist) - XIconifyWindow(GDK_DISPLAY(), - GDK_WINDOW_XWINDOW(blist->window), - ((_XPrivDisplay)GDK_DISPLAY())->default_screen); + if (!blist) return; + if (!connections || docklet_refcount) { + gtk_widget_hide(blist); + } else { + gtk_window_iconify(GTK_WINDOW(blist)); + } + blist_hidden = TRUE; } +/* shared code... not in lschiere/faceprint tree though. oh well */ +static void move_buddy_list() { + if (blist_options & OPT_BLIST_SAVED_WINDOWS) { + if (blist_pos.width != 0) { /* Sanity check! */ + gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, + blist_pos.y - blist_pos.yoff); + gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height); + } + } +} + +/* mostly used by code in this file */ void unhide_buddy_list() { - if (blist) - gdk_window_show(blist->window); + if (!blist) return; + gtk_window_present(GTK_WINDOW(blist)); + move_buddy_list(); + blist_hidden = FALSE; +} + +/* used by the docklet */ +void toggle_buddy_list() { + if (blist_hidden) { + unhide_buddy_list(); + } else { + hide_buddy_list(); + } +} + +/* for the delete_event handler */ +static void close_buddy_list() { + if (docklet_refcount) { + hide_buddy_list(); + } else { + do_quit(); + } +} + +void docklet_add() { + docklet_refcount++; + printf("docklet_refcount: %d\n",docklet_refcount); +} + +void docklet_remove() { + if (docklet_refcount) { + docklet_refcount--; + } + printf("docklet_refcount: %d\n",docklet_refcount); + if (!docklet_refcount) { + if (connections) { + unhide_buddy_list(); + } else { + gtk_window_present(GTK_WINDOW(mainwindow)); + } + } } static gint log_timeout(struct buddy_show *b) @@ -2205,9 +2239,6 @@ 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]; @@ -2413,9 +2444,8 @@ gdk_window_get_position(blist->window, &x, &y); gdk_window_get_size(blist->window, &width, &height); -#ifdef USE_APPLET - if (applet_buddy_show){ -#endif +/* fixme: docklet * + * if (applet_buddy_show){ */ if (e->send_event) { /* Is a position event */ if (blist_pos.x != x || blist_pos.y != y) @@ -2435,10 +2465,6 @@ if (save) save_prefs(); -#ifdef USE_APPLET - } -#endif - } @@ -2626,15 +2652,11 @@ GtkWidget *tbox; if (blist) { - gtk_widget_show(blist); + unhide_buddy_list; return; } -#ifdef USE_APPLET - GAIM_DIALOG(blist); -#else blist = gtk_window_new(GTK_WINDOW_TOPLEVEL); -#endif gtk_window_set_wmclass(GTK_WINDOW(blist), "buddy_list", "Gaim"); @@ -2675,13 +2697,11 @@ gaim_new_item_with_pixmap(menu, _("Signoff"), logout_menu_xpm, GTK_SIGNAL_FUNC(signoff_all), (void*)1, 'd', GDK_CONTROL_MASK, "Ctl+D"); -#ifndef USE_APPLET + gaim_new_item_with_pixmap(menu, _("Hide"), close_small_xpm, + GTK_SIGNAL_FUNC(hide_buddy_list), NULL, 'h', GDK_CONTROL_MASK, "Ctl+H"); + gaim_new_item_with_pixmap(menu, _("Quit"), exit_small_xpm, GTK_SIGNAL_FUNC(do_quit), NULL, 'q', GDK_CONTROL_MASK, "Ctl+Q"); -#else - gaim_new_item_with_pixmap(menu, _("Close"), close_small_xpm, - GTK_SIGNAL_FUNC(applet_destroy_buddy), NULL, 'x', GDK_CONTROL_MASK, "Ctl+X"); -#endif menu = gtk_menu_new(); @@ -2878,12 +2898,8 @@ gtk_container_add(GTK_CONTAINER(blist), vbox); -#ifndef USE_APPLET - gtk_signal_connect(GTK_OBJECT(blist), "delete_event", GTK_SIGNAL_FUNC(do_quit), blist); -#else - gtk_signal_connect(GTK_OBJECT(blist), "delete_event", GTK_SIGNAL_FUNC(applet_destroy_buddy), + gtk_signal_connect(GTK_OBJECT(blist), "delete_event", GTK_SIGNAL_FUNC(close_buddy_list), NULL); -#endif gtk_signal_connect(GTK_OBJECT(blist), "configure_event", GTK_SIGNAL_FUNC(move_blist_window), NULL); @@ -2897,14 +2913,8 @@ gtk_window_set_title(GTK_WINDOW(blist), _("Gaim - Buddy List")); - - if (blist_options & OPT_BLIST_SAVED_WINDOWS) { - if (blist_pos.width != 0) { /* Sanity check! */ - gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, - blist_pos.y - blist_pos.yoff); - gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height); - } - } + move_buddy_list(); + blist_hidden = FALSE; } void refresh_buddy_window() Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.371 retrieving revision 1.372 diff -u -d -r1.371 -r1.372 --- conversation.c 29 Aug 2002 18:18:40 -0000 1.371 +++ conversation.c 29 Aug 2002 21:40:06 -0000 1.372 @@ -272,10 +272,8 @@ gtk_widget_destroy(c->link_dialog); if (c->log_dialog) gtk_widget_destroy(c->log_dialog); -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (c->save_icon) gtk_widget_destroy(c->save_icon); -#endif c->send_history = g_list_first(c->send_history); while (c->send_history) { if (c->send_history->data) @@ -2642,9 +2640,6 @@ 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); @@ -2669,9 +2664,6 @@ style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) gtk_widget_realize(label); -#if !GTK_CHECK_VERSION(1,3,0) - gdk_font_unref(gtk_style_get_font(style)); -#endif gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); style->fg[0].red = 0x0000; style->fg[0].green = 0x9999; @@ -2731,9 +2723,6 @@ style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) gtk_widget_realize(label); -#if !GTK_CHECK_VERSION(1,3,0) - gdk_font_unref(gtk_style_get_font(style)); -#endif gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); c->unseen = 0; gtk_widget_set_style(label, style); @@ -2903,16 +2892,7 @@ gtk_text_set_editable(GTK_TEXT(entry), TRUE); gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE); -#if !GTK_CHECK_VERSION(1,3,0) /* This gtk bug should be fixed in gtk2 */ - /* I hate hackish workarounds. According to Ari Pollak, a gtk bug causes Gaim to loop - * infinitely if the entry is smaller than the text height. This is a hackish workaround */ - gtk_widget_set_usize(entry, conv_size.width - 20, - MAX(conv_size.entry_height, - gdk_char_height(gtk_widget_get_default_style()->font, '0') + - gtk_widget_get_default_style()->font->ascent + 1)); -#else gtk_widget_set_usize(entry, conv_size.width - 20, MAX(conv_size.entry_height, 25)); -#endif gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback), c); gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c); @@ -3357,7 +3337,6 @@ } } -#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) \ @@ -3497,11 +3476,7 @@ gtk_menu_append(GTK_MENU(menu), button); gtk_widget_show(button); } -#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); @@ -3524,11 +3499,9 @@ return TRUE; } -#endif void remove_icon(struct conversation *c) { -#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; @@ -3538,13 +3511,8 @@ if (c->icon_timer) gtk_timeout_remove(c->icon_timer); c->icon_timer = 0; -#if GTK_CHECK_VERSION(1,3,0) if(c->iter) g_object_unref(c->iter); -#else - c->frame = 0; -#endif -#endif } void update_smilies(struct conversation *c) @@ -3670,7 +3638,6 @@ gdk_pixmap_unref(pm); if (bm) gdk_bitmap_unref(bm); - } void got_new_icon(struct gaim_connection *gc, char *who) @@ -3691,7 +3658,6 @@ void set_anim() { -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) GList *c = conversations; if (im_options & OPT_IM_HIDE_ICONS) return; @@ -3702,7 +3668,6 @@ start_anim(NULL, c->data); c = c->next; } -#endif } static void remove_checkbox(struct conversation *c) Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.330 retrieving revision 1.331 diff -u -d -r1.330 -r1.331 --- dialogs.c 29 Aug 2002 01:47:13 -0000 1.330 +++ dialogs.c 29 Aug 2002 21:40:07 -0000 1.331 @@ -43,9 +43,6 @@ #include "gaim.h" #include "gtkimhtml.h" #include "prpl.h" -#ifdef USE_APPLET -#include "applet.h" -#endif #include "pixmaps/gnome_preferences.xpm" #include "pixmaps/cancel.xpm" @@ -3410,11 +3407,6 @@ if (!ca->mess) am = g_new0(struct away_message, 1); else { -#ifdef USE_APPLET - char *awayname = g_strdup_printf("away/%s", ca->mess->name); - applet_widget_unregister_callback(APPLET_WIDGET(applet), awayname); - g_free(awayname); -#endif am = ca->mess; } @@ -4604,7 +4596,7 @@ gdk_window_set_group(w, mainwindow->window); #endif } - + GtkWidget *pixbuf_button(char *text, char *iconfile) { GtkWidget *button, *image, *label, *bbox; @@ -4628,7 +4620,6 @@ gtk_widget_show_all(bbox); return button; } - GtkWidget *picture_button(GtkWidget *window, char *text, char **xpm) { Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.333 retrieving revision 1.334 diff -u -d -r1.333 -r1.334 --- gaim.h 29 Aug 2002 01:47:14 -0000 1.333 +++ gaim.h 29 Aug 2002 21:40:07 -0000 1.334 @@ -111,7 +111,6 @@ #define WEBSITE "http://gaim.sourceforge.net/" -#ifndef USE_GNOME #ifdef ENABLE_NLS # include <libintl.h> # define _(x) gettext(x) @@ -123,7 +122,6 @@ #else # define N_(String) (String) # define _(x) (x) -#endif #endif #define OPT_USR_AUTO 0x00000001 Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- gtkimhtml.c 29 Aug 2002 21:12:00 -0000 1.118 +++ gtkimhtml.c 29 Aug 2002 21:40:07 -0000 1.119 @@ -36,12 +36,8 @@ #include <locale.h> #endif -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) #include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf-loader.h> -#else -#include "pixmaps/broken.xpm" -#endif #include "pixmaps/angel.xpm" #include "pixmaps/bigsmile.xpm" @@ -266,9 +262,7 @@ gint width,height; GtkIMHtml *imhtml; GtkIMHtmlBit *bit; -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) GdkPixbuf *pb; -#endif }; struct _GtkIMHtmlBit { @@ -340,11 +334,7 @@ static gint gtk_imhtml_motion_notify_event (GtkWidget *, GdkEventMotion *); static void -#if GTK_CHECK_VERSION(1,3,0) gtk_imhtml_finalize (GObject *object) -#else -gtk_imhtml_destroy (GtkObject *object) -#endif { GtkIMHtml *imhtml; @@ -371,12 +361,7 @@ gtk_smiley_tree_destroy (imhtml->smiley_data); -#if GTK_CHECK_VERSION(1,3,0) G_OBJECT_CLASS (parent_class)->finalize (object); -#else - if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -#endif } static void @@ -408,13 +393,8 @@ &attributes, attributes_mask); gdk_window_set_user_data (widget->window, widget); -#if GTK_CHECK_VERSION(1,3,0) attributes.x = widget->style->xthickness + BORDER_SIZE; attributes.y = widget->style->xthickness + BORDER_SIZE; -#else - attributes.x = widget->style->klass->xthickness + BORDER_SIZE; - attributes.y = widget->style->klass->xthickness + BORDER_SIZE; -#endif attributes.width = MAX (1, (gint) widget->allocation.width - (gint) attributes.x * 2); attributes.height = MAX (1, (gint) widget->allocation.height - (gint) attributes.y * 2); attributes.event_mask = gtk_widget_get_events (widget) @@ -429,7 +409,7 @@ gdk_window_set_cursor (widget->window, imhtml->arrow_cursor); - imhtml->default_font = gdk_font_ref (GTK_IMHTML_GET_STYLE_FONT (widget->style)); + imhtml->default_font = gdk_font_ref (gtk_style_get_font (widget->style)); gdk_window_set_background (widget->window, &widget->style->base [GTK_STATE_NORMAL]); gdk_window_set_background (GTK_LAYOUT (imhtml)->bin_window, @@ -734,13 +714,8 @@ return; if (GTK_WIDGET_HAS_FOCUS (widget)) { -#if GTK_CHECK_VERSION(1,3,0) gtk_paint_focus (widget->style, widget->window, GTK_STATE_NORMAL, NULL, widget, "text", 0, 0, widget->allocation.width - 1, widget->allocation.height - 1); -#else - gtk_paint_focus (widget->style, widget->window, NULL, widget, "text", 0, 0, - widget->allocation.width - 1, widget->allocation.height - 1); -#endif x = 1; y = 1; w = 2; h = 2; } @@ -757,11 +732,7 @@ GList *chunks; struct line_info *line; gfloat x, y; -#if GTK_CHECK_VERSION(1,3,0) guint32 width, height; -#else - gint width, height; -#endif x = GTK_LAYOUT (imhtml)->hadjustment->value; y = GTK_LAYOUT (imhtml)->vadjustment->value; @@ -814,18 +785,6 @@ gtk_imhtml_draw_focus (GTK_WIDGET (imhtml)); } -#if !GTK_CHECK_VERSION(1,3,0) -static void -gtk_imhtml_draw (GtkWidget *widget, - GdkRectangle *area) -{ - GtkIMHtml *imhtml; - - imhtml = GTK_IMHTML (widget); - gtk_imhtml_draw_exposed (imhtml); -} -#endif - static void gtk_imhtml_style_set (GtkWidget *widget, GtkStyle *style) @@ -856,7 +815,7 @@ imhtml->default_hlfg_color=gdk_color_copy (>K_WIDGET (imhtml)->style->fg [GTK_STATE_SELECTED]); if (imhtml->default_font) gdk_font_unref (imhtml->default_font); - imhtml->default_font = gdk_font_ref (GTK_IMHTML_GET_STYLE_FONT (widget->style)); + imhtml->default_font = gdk_font_ref (gtk_style_get_font (widget->style)); gdk_window_set_background (widget->window, &widget->style->base [GTK_STATE_NORMAL]); gdk_window_set_background (GTK_LAYOUT (imhtml)->bin_window, &widget->style->base [GTK_STATE_NORMAL]); @@ -971,7 +930,6 @@ widget->allocation = *allocation; -#if GTK_CHECK_VERSION(1,3,0) new_xsize = MAX (1, (gint) allocation->width - (gint) (widget->style->xthickness + BORDER_SIZE) * 2); new_ysize = MAX (1, (gint) allocation->height - @@ -986,22 +944,6 @@ gdk_window_move_resize (layout->bin_window, x, y, new_xsize, new_ysize); } -#else - new_xsize = MAX (1, (gint) allocation->width - - (gint) (widget->style->klass->xthickness + BORDER_SIZE) * 2); - new_ysize = MAX (1, (gint) allocation->height - - (gint) (widget->style->klass->ythickness + BORDER_SIZE) * 2); - - if (GTK_WIDGET_REALIZED (widget)) { - gint x = widget->style->klass->xthickness + BORDER_SIZE; - gint y = widget->style->klass->ythickness + BORDER_SIZE; - gdk_window_move_resize (widget->window, - allocation->x, allocation->y, - allocation->width, allocation->height); - gdk_window_move_resize (layout->bin_window, - x, y, new_xsize, new_ysize); - } -#endif layout->hadjustment->page_size = new_xsize; layout->hadjustment->page_increment = new_xsize / 2; @@ -1989,16 +1931,12 @@ static void gtk_imhtml_class_init (GtkIMHtmlClass *class) { -#if GTK_CHECK_VERSION(1,3,0) GObjectClass *gobject_class; -#endif GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkLayoutClass *layout_class; -#if GTK_CHECK_VERSION(1,3,0) gobject_class = (GObjectClass*) class; -#endif object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; layout_class = (GtkLayoutClass*) class; @@ -2014,19 +1952,9 @@ GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); -#if GTK_CHECK_VERSION(1,3,0) gobject_class->finalize = gtk_imhtml_finalize; -#else - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - object_class->destroy = gtk_imhtml_destroy; -#endif widget_class->realize = gtk_imhtml_realize; -#if !GTK_CHECK_VERSION(1,3,0) - widget_class->draw = gtk_imhtml_draw; - widget_class->draw_focus = gtk_imhtml_draw_focus; -#endif widget_class->style_set = gtk_imhtml_style_set; widget_class->expose_event = gtk_imhtml_expose_event; widget_class->size_allocate = gtk_imhtml_size_allocate; @@ -2651,7 +2579,6 @@ g_free (copy); } else if ((bit->type == TYPE_SMILEY) || (bit->type == TYPE_IMG)) { -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (bit->img) { GdkPixbuf *imagepb = bit->img->pb; GdkPixbuf *tmp = NULL; @@ -2679,7 +2606,6 @@ gdk_pixbuf_render_pixmap_and_mask(imagepb, &(bit->pm), &(bit->bm), 100); } } -#endif gdk_window_get_size (bit->pm, &width, &height); @@ -2910,13 +2836,13 @@ *replace = ' '; *length = 6; } else if (!g_strncasecmp (string, "©", 6)) { - *replace = '©'; + *replace = '©'; *length = 6; } else if (!g_strncasecmp (string, """, 6)) { *replace = '\"'; *length = 6; } else if (!g_strncasecmp (string, "®", 5)) { - *replace = '®'; + *replace = '®'; *length = 5; } else if (*(string + 1) == '#') { guint pound = 0; @@ -3383,13 +3309,9 @@ char *tmp, *imagedata, *e; const gchar *alltext; struct im_image *img; -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) GdkPixbufLoader *load; GdkPixbuf *imagepb = NULL; -#if GTK_CHECK_VERSION(1,3,0) GError *err; -#endif -#endif NEW_BIT (NEW_TEXT_BIT); if (!id || !datasize) break; @@ -3428,22 +3350,15 @@ if (img->len) { img->data = g_malloc(img->len); memcpy(img->data, imagedata, img->len); -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) load = gdk_pixbuf_loader_new(); -#if GTK_CHECK_VERSION(1,3,0) if (!gdk_pixbuf_loader_write(load, imagedata, img->len, &err)) -#else - if (!gdk_pixbuf_loader_write(load, imagedata, img->len)) -#endif g_print("IM Image corrupt or unreadable.\n"); else imagepb = gdk_pixbuf_loader_get_pixbuf(load); img->pb = imagepb; -#endif } -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (imagepb) { bit = g_new0 (GtkIMHtmlBit, 1); bit->type = TYPE_IMG; @@ -3456,19 +3371,6 @@ g_free(img->filename); g_free(img->data); } -#else - bit = g_new0 (GtkIMHtmlBit, 1); - bit->type = TYPE_IMG; - bit->img = img; - if (url) - bit->url = g_strdup (url); - if (!fonts || ((clr = ((FontDetail *) fonts->data)->back) == NULL)) - clr = (bg != NULL) ? bg : imhtml->default_bg_color; - - bit->pm = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (imhtml)->window, - &bit->bm, clr, broken_xpm); - NEW_BIT (bit); -#endif g_free(imagedata); g_free(e); g_free(id); @@ -3554,7 +3456,6 @@ gtk_widget_set_usize (GTK_WIDGET (imhtml), -1, imhtml->y); -#if GTK_CHECK_VERSION(1,3,0) if (!(options & GTK_IMHTML_NO_SCROLL) && scrolldown && (imhtml->y >= MAX (1, @@ -3564,17 +3465,6 @@ MAX (1, (GTK_WIDGET (imhtml)->allocation.height - (GTK_WIDGET (imhtml)->style->ythickness + BORDER_SIZE) * 2))); -#else - if (!(options & GTK_IMHTML_NO_SCROLL) && - scrolldown && - (imhtml->y >= MAX (1, - (GTK_WIDGET (imhtml)->allocation.height - - (GTK_WIDGET (imhtml)->style->klass->ythickness + BORDER_SIZE) * 2)))) - gtk_adjustment_set_value (vadj, imhtml->y - - MAX (1, (GTK_WIDGET (imhtml)->allocation.height - - (GTK_WIDGET (imhtml)->style->klass->ythickness + - BORDER_SIZE) * 2))); -#endif if (url) { g_free (url); @@ -3664,14 +3554,12 @@ gdk_pixmap_unref (bit->pm); if (bit->bm) gdk_bitmap_unref (bit->bm); -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) if (bit->img) { g_free(bit->img->filename); g_free(bit->img->data); gdk_pixbuf_unref(bit->img->pb); g_free(bit->img); } -#endif while (bit->chunks) { struct line_info *li = bit->chunks->data; @@ -3688,11 +3576,9 @@ imhtml->click = g_list_remove (imhtml->click, imhtml->click->data); } -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) while (imhtml->im_images) { imhtml->im_images = g_list_remove(imhtml->im_images, imhtml->im_images->data); } -#endif if (imhtml->selected_text) { g_string_free (imhtml->selected_text, TRUE); @@ -3720,10 +3606,8 @@ imhtml->scroll_timer = 0; } -#if USE_PIXBUF || GTK_CHECK_VERSION(1,3,0) g_list_free(imhtml->im_images); imhtml->im_images = NULL; -#endif imhtml->x = 0; imhtml->y = TOP_BORDER; Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- multi.c 29 Aug 2002 01:47:14 -0000 1.125 +++ multi.c 29 Aug 2002 21:40:07 -0000 1.126 @@ -25,9 +25,6 @@ #include "prpl.h" #include "multi.h" #include "gaim.h" -#ifdef USE_APPLET -#include "applet.h" -#endif #include "pixmaps/gnome_add.xpm" #include "pixmaps/gnome_preferences.xpm" @@ -129,10 +126,9 @@ g = g_slist_remove(g, g->data); } g_free(gc); -#ifndef USE_APPLET +/* fixme: docklet */ if (!connections && mainwindow) gtk_widget_show(mainwindow); -#endif } static void delete_acctedit(GtkWidget *w, gpointer d) @@ -846,9 +842,6 @@ { const char *txt = gtk_entry_get_text(GTK_ENTRY(p->entry)); g_snprintf(p->u->password, sizeof(p->u->password), "%s", txt); -#ifdef USE_APPLET - set_user_state(signing_on); -#endif serv_login(p->u); gtk_widget_destroy(p->win); } @@ -935,9 +928,6 @@ do_pass_dlg(u); } else { serv_login(u); -#ifdef USE_APPLET - set_user_state(signing_on); -#endif /* USE_APPLET */ gtk_clist_set_text(GTK_CLIST(list), row, 1, "Attempting"); } } else if (u->gc) { @@ -1016,7 +1006,7 @@ GtkWidget *button; /* used for many things */ if (acctedit) { - gtk_widget_show(acctedit); + gtk_window_present(GTK_WINDOW(acctedit)); return; } @@ -1144,7 +1134,7 @@ if (mainwindow) gtk_widget_hide(mainwindow); -#ifdef USE_APPLET +/* fixme: docklet if (blist_options & OPT_BLIST_APP_BUDDY_SHOW) { show_buddy_list(); refresh_buddy_window(); @@ -1158,11 +1148,10 @@ } else { build_edit_tree(); } - set_user_state(online); -#else + set_user_state(online); */ + show_buddy_list(); refresh_buddy_window(); -#endif update_privacy_connections(); do_away_menu(); @@ -1220,9 +1209,6 @@ while (u) { a = (struct aim_user *)u->data; if ((a->options & OPT_USR_AUTO) && (a->options & OPT_USR_REM_PASS)) { -#ifdef USE_APPLET - set_user_state(signing_on); -#endif /* USE_APPLET */ serv_login(a); } u = u->next; @@ -1469,10 +1455,6 @@ do_away_menu(); do_proto_menu(); redo_convo_menus(); -#ifdef USE_APPLET - if (connections) - set_user_state(online); -#endif update_privacy_connections(); if (connections) @@ -1480,20 +1462,19 @@ destroy_all_dialogs(); destroy_buddy(); -#ifdef USE_APPLET +/* fixme: docklet set_user_state(offline); applet_buddy_show = FALSE; if (applet) { - /* These don't have any purpose if the applet is gone :-P */ + /* These don't have any purpose if the applet is gone :-P applet_widget_unregister_callback(APPLET_WIDGET(applet), "signoff"); applet_widget_register_callback(APPLET_WIDGET(applet), "autologin", _("Auto-login"), (AppletCallbackFunc)auto_login, NULL); remove_applet_away(); - } -#else + } */ + show_login(); -#endif /* USE_APPLET */ } struct aim_user *new_user(const char *name, int proto, int opts) Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- plugins.c 29 Aug 2002 01:47:14 -0000 1.89 +++ plugins.c 29 Aug 2002 21:40:07 -0000 1.90 @@ -90,13 +90,9 @@ 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 ---------------------------- */ @@ -165,11 +161,7 @@ /* 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) @@ -185,7 +177,6 @@ GtkWidget *label; GtkWidget *add; GtkWidget *close; -#if GTK_CHECK_VERSION(1,3,0) /* stuff needed for GtkTreeView *pluglist */ GtkListStore *store; GtkCellRenderer *renderer; @@ -193,19 +184,17 @@ GtkTreeSelection *selection; /* needed for GtkTextView *plugtext */ GtkTextBuffer *buffer; -#endif - if (plugwindow) + if (plugwindow) { + gtk_window_present(GTK_WINDOW(plugwindow)); return; + } GAIM_DIALOG(plugwindow); gtk_window_set_wmclass(GTK_WINDOW(plugwindow), "plugins", "Gaim"); 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); @@ -220,9 +209,6 @@ /* 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); @@ -232,7 +218,6 @@ 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); @@ -252,12 +237,6 @@ 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); -#endif /* GTK_CHECK_VERSION */ gtk_widget_show(pluglist); @@ -277,7 +256,6 @@ 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); @@ -291,13 +269,6 @@ 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_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); @@ -357,47 +328,20 @@ { 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 */ - 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_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); } @@ -407,20 +351,9 @@ static void unload_plugin_cb(GtkWidget *w, gpointer data) { 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(); } @@ -428,56 +361,31 @@ static void plugin_reload_cb(GtkWidget *w, gpointer data) { 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) - return; - - /* 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; -#endif 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(); @@ -501,18 +409,6 @@ (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 : ""); - 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", @@ -559,7 +455,6 @@ 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. */ @@ -600,10 +495,8 @@ 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; @@ -618,19 +511,6 @@ 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.243 retrieving revision 1.244 diff -u -d -r1.243 -r1.244 --- prefs.c 29 Aug 2002 01:47:14 -0000 1.243 +++ prefs.c 29 Aug 2002 21:40:07 -0000 1.244 @@ -39,21 +39,6 @@ #include "prpl.h" #include "proxy.h" -/* xpms for gtk1.2 */ -#if !GTK_CHECK_VERSION (1,3,0) -#include "pixmaps/cancel.xpm" -#include "pixmaps/fontface2.xpm" -#include "pixmaps/gnome_add.xpm" -#include "pixmaps/gnome_remove.xpm" -#include "pixmaps/gnome_preferences.xpm" -#include "pixmaps/bgcolor.xpm" -#include "pixmaps/fgcolor.xpm" -#include "pixmaps/save.xpm" -#include "pixmaps/ok.xpm" -#include "pixmaps/join.xpm" -#endif - - /* temporary preferences */ static guint misc_options_new; static guint logging_options_new; @@ -77,10 +62,6 @@ GdkColor fgcolor_new, bgcolor_new; static struct window_size conv_size_new, buddy_chat_size_new; char fontface_new[128]; -#if !GTK_CHECK_VERSION(1,3,0) -char fontxfld_new[256]; -char fontfacexfld[256]; -#endif char fontface[128]; GtkWidget *prefs_away_list = NULL; @@ -88,9 +69,7 @@ GtkWidget *preftree = NULL; GtkWidget *fontseld = NULL; -#if GTK_CHECK_VERSION(1,3,0) GtkListStore *prefs_away_store = NULL; -#endif static int sound_row_sel = 0; static char *last_sound_dir = NULL; @@ -127,18 +106,12 @@ debugbutton=NULL; if(sounddialog) gtk_widget_destroy(sounddialog); -#if GTK_CHECK_VERSION(1,3,0) g_object_unref(G_OBJECT(prefs_away_store)); -#endif } GtkWidget *preflabel; GtkWidget *prefsnotebook; -#if GTK_CHECK_VERSION(1,3,0) GtkTreeStore *prefstree; -#else -GtkWidget *prefstree; -#endif static void set_misc_options(); static void set_logging_options(); @@ -234,9 +207,6 @@ g_snprintf(fontface, sizeof(fontface), fontface_new); -#if !GTK_CHECK_VERSION(1,3,0) - g_snprintf(fontxfld, sizeof(fontxfld), fontxfld_new); -#endif update_convo_font(); update_convo_color(); save_prefs(); @@ -267,7 +237,6 @@ } - /* These are the pages in the preferences notebook */ GtkWidget *interface_page() { GtkWidget *ret; @@ -353,6 +322,7 @@ pref_bg_picture = show_color_pref(hbox, FALSE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), pref_bg_picture); + if (!(font_options_new & OPT_FONT_BGCOL)) gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); @@ -413,6 +383,11 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); +/* fixme: docklet + gaim_button(_("Automatically show buddy list on sign on"), &blist_options_new, + OPT_BLIST_APP_BUDDY_SHOW, vbox); + gaim_button(_("Display Buddy List near applet"), &blist_options_new, OPT_BLIST_NEAR_APPLET, vbox); */ + vbox = make_frame (ret, _("Buttons")); gaim_button(_("_Hide IM/Info/Chat buttons"), &blist_options_new, OPT_BLIST_NO_BUTTONS, vbox); gaim_button(_("Show _pictures on buttons"), &blist_options_new, OPT_BLIST_SHOW_BUTTON_XPM, vbox); @@ -672,6 +647,8 @@ "Konqueror", BROWSER_KONQ, "Mozilla", BROWSER_MOZILLA, "Manual", BROWSER_MANUAL, +/* fixme: GNOME binary helper + "GNOME URL Handler", BROWSER_GNOME, */ "Galeon", BROWSER_GALEON, "Opera", BROWSER_OPERA, NULL); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); @@ -862,7 +839,6 @@ return ret; } -#if GTK_CHECK_VERSION (1,3,0) static void event_toggled (GtkCellRendererToggle *cell, gchar *pth, gpointer data) { GtkTreeModel *model = (GtkTreeModel *)data; @@ -876,7 +852,6 @@ sound_options_new ^= sounds[soundnum].opt; gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, sound_options_new & sounds[soundnum].opt, -1); } -#endif static void test_sound(GtkWidget *button, gpointer i_am_NULL) { @@ -975,7 +950,6 @@ } -#if GTK_CHECK_VERSION (1,3,0) static void prefs_sound_sel (GtkTreeSelection *sel, GtkTreeModel *model) { GtkTreeIter iter; GValue val = { 0, }; @@ -990,7 +964,6 @@ if (sounddialog) gtk_widget_destroy(sounddialog); } -#endif GtkWidget *sound_events_page() { @@ -1076,7 +1049,6 @@ return ret; } -#if GTK_CHECK_VERSION (1,3,0) void away_message_sel(GtkTreeSelection *sel, GtkTreeModel *model) { GtkTreeIter iter; @@ -1121,44 +1093,6 @@ gtk_tree_selection_select_path(sel, path); } -#else -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() { GtkWidget *ret; GtkWidget *hbox; @@ -1230,12 +1164,13 @@ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_size_group_add_widget(sg, button); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL); - + button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); gtk_size_group_add_widget(sg, button); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), event_view); - + gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); + button = pixbuf_button(_("_Edit"), "edit.png"); gtk_size_group_add_widget(sg, button); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), event_view); @@ -1244,7 +1179,7 @@ gtk_widget_show_all(ret); return ret; } -#if GTK_CHECK_VERSION (1,3,0) + GtkTreeIter *prefs_notebook_add_page(char *text, GdkPixbuf *pixbuf, GtkWidget *page, @@ -1266,40 +1201,10 @@ gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); return iter; } -#else -GtkCTreeNode *prefs_notebook_add_page(char *text, - GdkPixmap *pixmap, - GtkWidget *page, - GtkCTreeNode **iter, - GtkCTreeNode **parent, - int ind) { - - GtkCTreeNode *itern; - char *texts[1]; - - texts[0] = text; - - *iter = gtk_ctree_insert_node (GTK_CTREE(prefstree), parent ? *parent : NULL, NULL, &text, - 0, NULL, NULL, NULL, NULL, 0, 1); - gtk_ctree_node_set_row_data(GTK_CTREE(prefstree), GTK_CTREE_NODE(*iter), (void *)ind); - if (pixmap) - gdk_pixmap_unref(pixmap); - - debug_printf("%s\n", texts[0]); - - gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); - return iter; -} -#endif void prefs_notebook_init() { int a = 0; -#if GTK_CHECK_VERSION(1,3,0) GtkTreeIter p, c; -#else - 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(_("Message Text"), NULL, messages_page(), &c, &p, a++); @@ -1323,12 +1228,10 @@ GtkWidget *vbox, *vbox2; GtkWidget *hbox; GtkWidget *frame; -#if GTK_CHECK_VERSION (1,3,0) GtkWidget *tree_v; GtkTreeViewColumn *column; GtkCellRenderer *cell; GtkTreeSelection *sel; -#endif GtkWidget *notebook; GtkWidget *sep; GtkWidget *button; @@ -1336,7 +1239,7 @@ int r; if (prefs) { - gtk_widget_show(prefs); + gtk_window_present(GTK_WINDOW(prefs)); return; } @@ -1364,9 +1267,6 @@ g_snprintf(web_command_new, sizeof(web_command_new), "%s", web_command ? web_command : "xterm -e lynx %%s"); g_snprintf(fontface_new, sizeof(fontface_new), fontface); -#if !GTK_CHECK_VERSION(1,3,0) - g_snprintf(fontxfld_new, sizeof(fontxfld_new), fontxfld); -#endif memcpy(&conv_size_new, &conv_size, sizeof(struct window_size)); memcpy(&buddy_chat_size_new, &buddy_chat_size, sizeof(struct window_size)); memcpy(&fgcolor_new, &fgcolor, sizeof(GdkColor)); @@ -1397,7 +1297,6 @@ gtk_widget_show (frame); /* The tree -- much inspired by the Gimp */ -#if GTK_CHECK_VERSION(1,3,0) prefstree = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); tree_v = gtk_tree_view_new_with_model (GTK_TREE_MODEL (prefstree)); gtk_container_add (GTK_CONTAINER (frame), tree_v); @@ -1414,84 +1313,70 @@ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_v), column); -#else - prefstree = gtk_ctree_new(1,0); - gtk_ctree_set_line_style(prefstree, GTK_CTREE_LINES_NONE); - gtk_ctree_set_expander_style(GTK_CTREE(prefstree), GTK_CTREE_EXPANDER_TRIANGLE); - gtk_container_add(GTK_CONTAINER (frame), prefstree); - gtk_widget_set_usize(prefstree, 150, -1); - gtk_widget_show(prefstree); -#endif /* GTK_CHECK_VERSION */ - - /* The right side */ - frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); - gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); - gtk_widget_show (frame); - - vbox2 = gtk_vbox_new (FALSE, 4); - gtk_container_add (GTK_CONTAINER (frame), vbox2); - gtk_widget_show (vbox2); - - frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); - gtk_box_pack_start (GTK_BOX (vbox2), frame, FALSE, TRUE, 0); - gtk_widget_show (frame); - - hbox = gtk_hbox_new (FALSE, 4); - gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); - gtk_container_add (GTK_CONTAINER (frame), hbox); - gtk_widget_show (hbox); - - preflabel = gtk_label_new(NULL); - gtk_box_pack_end (GTK_BOX (hbox), preflabel, FALSE, FALSE, 0); - gtk_widget_show (preflabel); - + /* The right side */ + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); + gtk_widget_show (frame); + + vbox2 = gtk_vbox_new (FALSE, 4); + gtk_container_add (GTK_CONTAINER (frame), vbox2); + gtk_widget_show (vbox2); + + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); + gtk_box_pack_start (GTK_BOX (vbox2), frame, FALSE, TRUE, 0); + gtk_widget_show (frame); + + hbox = gtk_hbox_new (FALSE, 4); + gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); + gtk_container_add (GTK_CONTAINER (frame), hbox); + gtk_widget_show (hbox); + + preflabel = gtk_label_new(NULL); + gtk_box_pack_end (GTK_BOX (hbox), preflabel, FALSE, FALSE, 0); + gtk_widget_show (preflabel); - /* The notebook */ - prefsnotebook = notebook = gtk_notebook_new (); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); - gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE); - gtk_box_pack_start (GTK_BOX (vbox2), notebook, FALSE, FALSE, 0); + /* The notebook */ + prefsnotebook = notebook = gtk_notebook_new (); + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); + gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE); + gtk_box_pack_start (GTK_BOX (vbox2), notebook, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION(1,3,0) - sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_v)); - g_signal_connect (G_OBJECT (sel), "changed", - G_CALLBACK (pref_nb_select), - notebook); -#else - gtk_signal_connect(GTK_OBJECT(prefstree), "tree-select-row", GTK_SIGNAL_FUNC(pref_nb_select), notebook); -#endif - gtk_widget_show(notebook); - sep = gtk_hseparator_new(); - gtk_widget_show(sep); - gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); - - /* The buttons to press! */ - hbox = gtk_hbox_new (FALSE, 6); - gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); - gtk_container_add (GTK_CONTAINER(vbox), hbox); - gtk_widget_show (hbox); + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_v)); + g_signal_connect (G_OBJECT (sel), "changed", + G_CALLBACK (pref_nb_select), + notebook); + gtk_widget_show(notebook); + sep = gtk_hseparator_new(); + gtk_widget_show(sep); + gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); + + /* The buttons to press! */ + hbox = gtk_hbox_new (FALSE, 6); + gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); + gtk_container_add (GTK_CONTAINER(vbox), hbox); + gtk_widget_show (hbox); - button = gtk_button_new_from_stock (GTK_STOCK_OK); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); - gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_widget_show(button); + button = gtk_button_new_from_stock (GTK_STOCK_OK); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); - button = gtk_button_new_from_stock (GTK_STOCK_APPLY); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(apply_cb), prefs); - gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_widget_show(button); - - button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); - 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); - gtk_widget_show(button); + button = gtk_button_new_from_stock (GTK_STOCK_APPLY); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(apply_cb), prefs); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + 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); + gtk_widget_show(button); - prefs_notebook_init(); + prefs_notebook_init(); - gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); - gtk_widget_show(prefs); + gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); + gtk_widget_show(prefs); } static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy) @@ -1803,36 +1688,16 @@ void apply_color_dlg(GtkWidget *w, gpointer d) { -#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); - - fgcolor_new.red = ((guint16)(color[0] * 65535)) >> 8; - fgcolor_new.green = ((guint16)(color[1] * 65535)) >> 8; - fgcolor_new.blue = ((guint16)(color[2] * 65535)) >> 8; -#endif destroy_colorsel(NULL, (void *)1); update_color(NULL, pref_fg_picture); } else { -#if GTK_CHECK_VERSION(1,3,0) gtk_color_selection_get_current_color(GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), &bgcolor_new); -#else - gtk_color_selection_get_color(GTK_COLOR_SELECTION - (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), color); - - bgcolor_new.red = ((guint16)(color[0] * 65535)) >> 8; - bgcolor_new.green = ((guint16)(color[1] * 65535)) >> 8; - bgcolor_new.blue = ((guint16)(color[2] * 65535)) >> 8; -#endif destroy_colorsel(NULL, (void *)0); update_color(NULL, pref_bg_picture); } @@ -2052,30 +1917,15 @@ void apply_font_dlg(GtkWidget *w, GtkWidget *f) { int i = 0; -#if !GTK_CHECK_VERSION(1,3,0) - int j = 0, k = 0; -#endif char *fontname; fontname = g_strdup(gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontseld))); destroy_fontsel(0, 0); -#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); } Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.232 retrieving revision 1.233 diff -u -d -r1.232 -r1.233 --- server.c 29 Aug 2002 01:47:14 -0000 1.232 +++ server.c 29 Aug 2002 21:40:08 -0000 1.233 @@ -35,9 +35,6 @@ #include "prpl.h" #include "multi.h" #include "gaim.h" -#ifdef USE_APPLE... [truncated message content] |
From: Sean E. <sea...@us...> - 2002-08-29 21:40:09
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv16364/plugins Modified Files: filectl.c iconaway.c Log Message: Rob McQueen went and removed all the GTK version preprocessor statements. Thanks! Index: filectl.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/filectl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- filectl.c 3 May 2002 19:49:24 -0000 1.10 +++ filectl.c 29 Aug 2002 21:40:06 -0000 1.11 @@ -1,6 +1,5 @@ #include "config.h" #include "gaim.h" -#include "applet.h" #include <gtk/gtk.h> #include <stdlib.h> Index: iconaway.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/iconaway.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- iconaway.c 27 Apr 2002 19:41:06 -0000 1.14 +++ iconaway.c 29 Aug 2002 21:40:06 -0000 1.15 @@ -1,8 +1,7 @@ #include "../config.h" #include "gaim.h" -#include <gdk/gdkx.h> -#include <X11/Xlib.h> +#include <gtk/gtk.h> void *handle; @@ -18,18 +17,12 @@ void iconify_windows(struct gaim_connection *gc, char *state, char *message, void *data) { if (!imaway || !gc->away) return; - XIconifyWindow(GDK_DISPLAY(), - GDK_WINDOW_XWINDOW(imaway->window), - ((_XPrivDisplay)GDK_DISPLAY())->default_screen); + gtk_window_iconify(GTK_WINDOW(imaway)); hide_buddy_list(); if (all_convos) - XIconifyWindow(GDK_DISPLAY(), - GDK_WINDOW_XWINDOW(all_convos->window), - ((_XPrivDisplay)GDK_DISPLAY())->default_screen); + gtk_window_iconify(GTK_WINDOW(all_convos)); if (all_chats) - XIconifyWindow(GDK_DISPLAY(), - GDK_WINDOW_XWINDOW(all_chats->window), - ((_XPrivDisplay)GDK_DISPLAY())->default_screen); + gtk_window_iconify(GTK_WINDOW(all_chats)); } char *gaim_plugin_init(GModule *h) { |