From: Sean E. <sea...@us...> - 2002-04-20 08:10:16
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv10148/src Modified Files: buddy.c conversation.c dialogs.c gtkimhtml.c gtkimhtml.h ui.h Log Message: new shortcuts: Ctrl-- Decrease Font Size Ctrl-= Increase Font Size Ctrl-0 Normal Font Size Ctrl-F Select Font Ctrl-C Text Color Ctrl-W Close IM/Chat Window (or Tab, if using tabbed conversations) Ctrl-N New IM/Chat Tab (if using tabbed conversations) Ctrl-Z Minimize (Iconify) IM/Chat Window -As suggested by Shreedeep K Bhachech Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.305 retrieving revision 1.306 diff -u -d -r1.305 -r1.306 --- buddy.c 16 Apr 2002 15:24:59 -0000 1.305 +++ buddy.c 20 Apr 2002 08:10:12 -0000 1.306 @@ -33,6 +33,7 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> +#include <ctype.h> #include <math.h> #include <time.h> #include <unistd.h> @@ -1194,7 +1195,7 @@ style = gtk_widget_get_style( widget ); - if (gc->prpl->list_icon) + if (gc->prpl->list_icon) { if (gc->prpl->protocol == PROTO_OSCAR) { if (isdigit(*gc->username)) { xpm = gc->prpl->list_icon(0); @@ -1204,6 +1205,7 @@ } else { xpm = gc->prpl->list_icon (0); } + } if (xpm == NULL) xpm = (char **)no_icon_xpm; @@ -1826,7 +1828,6 @@ GdkBitmap *bm; GtkStyle *style; GtkStyle *style2; - int j; g->name = g_strdup(group); Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.348 retrieving revision 1.349 diff -u -d -r1.348 -r1.349 --- conversation.c 4 Apr 2002 20:11:25 -0000 1.348 +++ conversation.c 20 Apr 2002 08:10:12 -0000 1.349 @@ -31,6 +31,8 @@ #include <stdlib.h> #include <errno.h> #include <ctype.h> +#include <gdk/gdkx.h> +#include <X11/Xlib.h> #include <gtk/gtk.h> #include "gtkimhtml.h" #include <gdk/gdkkeysyms.h> @@ -852,18 +854,14 @@ int pos = 0; switch (event->keyval) { case GDK_Up: - debug_printf("YOU HIT UP!\n"); if (!c->send_history) break; - debug_printf("history exists\n"); if (!c->send_history->prev) { - debug_printf("at curent\n"); if (c->send_history->data) g_free(c->send_history->data); c->send_history->data = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); } if (c->send_history->next && c->send_history->next->data) { - debug_printf("going to ->next\n"); c->send_history = c->send_history->next; gtk_editable_delete_text (GTK_EDITABLE(entry),0,-1); gtk_editable_insert_text(GTK_EDITABLE(entry), @@ -918,6 +916,34 @@ do_strike(c->strike, c->entry); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); break; + + case '-': + do_small(NULL, c->entry); + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + break; + case '=': + case '+': + do_big(NULL, c->entry); + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + break; + case '0': + do_normal(NULL, c->entry); + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + break; + case 'f': + case 'F': + quiet_set(c->font, + !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(c->font))); + toggle_font(c->font, c); + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + break; + case 'c': + case 'C': + quiet_set(c->fgcolorbtn, + !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(c->fgcolorbtn))); + toggle_fg_color(c->fgcolorbtn, c); + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + break; } } if (convo_options & OPT_CONVO_CTL_SMILEYS) { @@ -990,7 +1016,22 @@ gtk_imhtml_clear(GTK_IMHTML(c->text)); g_string_free(c->history, TRUE); c->history = g_string_new(""); + } else if (event->keyval == 'w') { + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + close_callback(c->close, c); + c = NULL; + return TRUE; + } else if (event->keyval == 'n') { + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + show_im_dialog(); + } else if (event->keyval == 'z') { + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + XIconifyWindow(GDK_DISPLAY(), + GDK_WINDOW_XWINDOW(c->window->window), + ((_XPrivDisplay)GDK_DISPLAY())->default_screen); } + + if ((!c->is_chat && (im_options & OPT_IM_ONE_WINDOW)) || (c->is_chat && (chat_options & OPT_CHAT_ONE_WINDOW))) { GtkWidget *notebook = (c->is_chat ? chat_notebook : convo_notebook); @@ -1164,8 +1205,8 @@ imflags = IM_FLAG_CHECKBOX; if (c->images) { - int id, offset; - char *bigbuf; + int id = 0, offset = 0; + char *bigbuf = NULL; GSList *tmplist = c->images; id = 1; Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.317 retrieving revision 1.318 diff -u -d -r1.317 -r1.318 --- dialogs.c 16 Apr 2002 02:12:16 -0000 1.317 +++ dialogs.c 20 Apr 2002 08:10:12 -0000 1.318 @@ -3218,7 +3218,6 @@ void insert_smiley_text(GtkWidget *widget, struct conversation *c) { char *smiley_text; - int i; smiley_text = strdup(current_smiley); Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- gtkimhtml.c 17 Mar 2002 06:43:54 -0000 1.104 +++ gtkimhtml.c 20 Apr 2002 08:10:13 -0000 1.105 @@ -2263,7 +2263,7 @@ return imhtml_type; } -static void +void gtk_imhtml_init_smileys (GtkIMHtml *imhtml) { g_return_if_fail (imhtml != NULL); Index: gtkimhtml.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- gtkimhtml.h 15 Mar 2002 02:34:10 -0000 1.13 +++ gtkimhtml.h 20 Apr 2002 08:10:13 -0000 1.14 @@ -121,7 +121,7 @@ gchar *text, gchar **xpm); -static void gtk_imhtml_init_smileys (GtkIMHtml *imhtml); +void gtk_imhtml_init_smileys (GtkIMHtml *imhtml); void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml); Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- ui.h 3 Apr 2002 03:02:02 -0000 1.34 +++ ui.h 20 Apr 2002 08:10:13 -0000 1.35 @@ -348,6 +348,7 @@ extern void toggle_buddy_pixmaps(); extern void gaim_separator(GtkWidget *); extern void redo_buddy_list(); /* you really shouldn't call this function */ +extern void set_blist_tab(); /* Functions in buddy_chat.c */ extern void join_chat(); @@ -395,6 +396,7 @@ extern void toggle_spellchk(); extern void set_convo_gc(struct conversation *, struct gaim_connection *); extern void update_buttons_by_protocol(struct conversation *); +extern void toggle_fg_color(GtkWidget *, struct conversation *); extern void toggle_smileys(); extern void toggle_timestamps(); extern void update_pixmaps(); @@ -408,6 +410,7 @@ extern void update_progress(struct conversation *, float); extern void show_typing(struct conversation *); extern gboolean reset_typing(char *); +extern void set_anim(); /* Functions in dialogs.c */ extern void alias_dialog_bud(struct buddy *); |