Mercurial > pidgin
changeset 3484:5d1dff030d8b
[gaim-migrate @ 3538]
Another nice patch from Etan Reisner.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 31 Aug 2002 02:40:51 +0000 |
parents | abaee81fdea2 |
children | 6187c93da61a |
files | ChangeLog src/conversation.c src/core.h src/dialogs.c src/ui.h |
diffstat | 5 files changed, 29 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Aug 30 21:37:09 2002 +0000 +++ b/ChangeLog Sat Aug 31 02:40:51 2002 +0000 @@ -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)
--- a/src/conversation.c Fri Aug 30 21:37:09 2002 +0000 +++ b/src/conversation.c Sat Aug 31 02:40:51 2002 +0000 @@ -53,6 +53,7 @@ #include "pixmaps/link.xpm" #include "pixmaps/smile_icon.xpm" #include "pixmaps/wood.xpm" +#include "pixmaps/search_small.xpm" #include "pixmaps/save_small.xpm" #include "pixmaps/speaker.xpm" #include "pixmaps/speaker_mute.xpm" @@ -390,8 +391,9 @@ { if (state_lock) return; + if (find_log_info(c->name)) - rm_log(find_log_info(c->name)); + rm_log(find_log_info(c->name)); else if (GTK_TOGGLE_BUTTON(loggle)->active) show_log_dialog(c); else @@ -2112,10 +2114,10 @@ GtkWidget *build_conv_toolbar(struct conversation *c) { GdkPixmap *strike_i, *small_i, *normal_i, *big_i, *bold_i, *italic_i, *underline_i, *speaker_i, - *wood_i, *fgcolor_i, *bgcolor_i, *link_i, *font_i, *smiley_i, *save_i, *image_i; + *wood_i, *viewer_i, *fgcolor_i, *bgcolor_i, *link_i, *font_i, *smiley_i, *save_i, *image_i; GtkWidget *strike_p, *small_p, *normal_p, *big_p, *bold_p, *italic_p, *underline_p, *speaker_p, - *wood_p, *fgcolor_p, *bgcolor_p, *link_p, *font_p, *smiley_p, *save_p, *image_p; - GtkWidget *strike, *small, *normal, *big, *bold, *italic, *underline, *speaker, *wood, + *wood_p, *viewer_p, *fgcolor_p, *bgcolor_p, *link_p, *font_p, *smiley_p, *save_p, *image_p; + GtkWidget *strike, *small, *normal, *big, *bold, *italic, *underline, *speaker, *wood, *viewer, *fgcolorbtn, *bgcolorbtn, *link, *font, *smiley, *save, *image; GdkBitmap *mask; GtkWidget *toolbar; @@ -2197,6 +2199,11 @@ gtk_widget_show(wood_p); gdk_bitmap_unref(mask); + viewer_i = gdk_pixmap_create_from_xpm_d(win->window, &mask, &win->style->white, search_small_xpm); + viewer_p = gtk_pixmap_new(viewer_i, mask); + gtk_widget_show(viewer_p); + gdk_bitmap_unref(mask); + save_i = gdk_pixmap_create_from_xpm_d(win->window, &mask, &win->style->white, save_small_xpm); save_p = gtk_pixmap_new(save_i, mask); gtk_widget_show(save_p); @@ -2281,6 +2288,10 @@ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(wood), FALSE); state_lock = 0; + viewer = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), + NULL, _("Show Log Viewer"), _("Viewer"), + viewer_p, GTK_SIGNAL_FUNC(conv_show_log), GINT_TO_POINTER(c->name)); + save = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Save Conversation"), _("Save"), save_p, GTK_SIGNAL_FUNC(save_convo), c); @@ -2307,6 +2318,7 @@ gtk_button_set_relief(GTK_BUTTON(smiley), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(image), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(wood), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(viewer), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(save), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(speaker), GTK_RELIEF_NONE); } @@ -2326,6 +2338,7 @@ gdk_pixmap_unref(link_i); gdk_pixmap_unref(smiley_i); gdk_pixmap_unref(wood_i); + gdk_pixmap_unref(viewer_i); gdk_pixmap_unref(save_i); gdk_pixmap_unref(speaker_i); gdk_pixmap_unref(image_i); @@ -2336,6 +2349,7 @@ c->italic = italic; c->underline = underline; c->log_button = wood; + c->viewer_button = viewer; c->fgcolorbtn = fgcolorbtn; c->bgcolorbtn = bgcolorbtn; c->link = link;
--- a/src/core.h Fri Aug 30 21:37:09 2002 +0000 +++ b/src/core.h Sat Aug 31 02:40:51 2002 +0000 @@ -148,7 +148,7 @@ /* Globals in core.c */ extern GSList *uis; -extern gaim_session; +extern int gaim_session; /* Globals in plugins.c */ extern GList *plugins;
--- a/src/dialogs.c Fri Aug 30 21:37:09 2002 +0000 +++ b/src/dialogs.c Sat Aug 31 02:40:51 2002 +0000 @@ -4080,6 +4080,13 @@ g_free(x); } +void conv_show_log(GtkWidget *w, gpointer data) +{ + char *name = g_strdup(data); + show_log(name); + g_free(name); +} + void show_log(char *nm) { gchar filename[256];
--- a/src/ui.h Fri Aug 30 21:37:09 2002 +0000 +++ b/src/ui.h Sat Aug 31 02:40:51 2002 +0000 @@ -109,6 +109,7 @@ GtkWidget *bgcolorbtn; GtkWidget *link; GtkWidget *wood; + GtkWidget *viewer_button; GtkWidget *log_button; GtkWidget *strike; GtkWidget *font; @@ -426,6 +427,7 @@ extern void show_import_dialog(); extern void show_export_dialog(); extern void show_new_bp(char *, struct gaim_connection *, int, int, struct buddy_pounce *); +extern void conv_show_log(GtkWidget *, gpointer); extern void show_log(char *); extern void show_log_dialog(struct conversation *); extern void show_fgcolor_dialog(struct conversation *c, GtkWidget *color);