# HG changeset patch # User Luke Schierer # Date 1084132801 0 # Node ID 35b68d76cb4cf8fdccac7035bdf40a80c603f448 # Parent 26c9b8761707d560be50bb3d3d331b7842d8dc14 [gaim-migrate @ 9681] you can now view logs of offline people without showing offline buddies (coreDumped) committer: Tailor Script diff -r 26c9b8761707 -r 35b68d76cb4c COPYRIGHT --- a/COPYRIGHT Sun May 09 04:06:58 2004 +0000 +++ b/COPYRIGHT Sun May 09 20:00:01 2004 +0000 @@ -108,6 +108,7 @@ Tim Ringenbach Luciano Miguel Ferreira Rocha Andrew Rodland +Tom Samstag Neil Sanchala Carsten Schaar Luke Schierer diff -r 26c9b8761707 -r 35b68d76cb4c ChangeLog --- a/ChangeLog Sun May 09 04:06:58 2004 +0000 +++ b/ChangeLog Sun May 09 20:00:01 2004 +0000 @@ -10,6 +10,7 @@ Add Buddy Pounce dialog. * Pounce notification now includes time (Mike Lundy) * The history plugin now shows history for chats in addition to IMs + * Menu item to view log (Tom Samstag) Bug Fixes: * Compiles again with gcc 2.96 (Ignacio J. Elia) diff -r 26c9b8761707 -r 35b68d76cb4c src/dialogs.c --- a/src/dialogs.c Sun May 09 04:06:58 2004 +0000 +++ b/src/dialogs.c Sun May 09 20:00:01 2004 +0000 @@ -37,6 +37,7 @@ #include "gtkimhtmltoolbar.h" #include "gtkprefs.h" #include "gtkutils.h" +#include "gtklog.h" #include "stock.h" #include "ui.h" @@ -529,6 +530,58 @@ NULL); } +static void +get_log_cb(gpointer data, GaimRequestFields *fields) +{ + char *username; + GaimAccount *account; + + account = gaim_request_fields_get_account(fields, "account"); + + username = g_strdup(gaim_normalize(account, + gaim_request_fields_get_string(fields, "screenname"))); + + if( username != NULL && *username != '\0' && account != NULL ) + gaim_gtk_log_show( username, account ); + + g_free(username); +} + +void +show_log_dialog(void) +{ + GaimRequestFields *fields; + GaimRequestFieldGroup *group; + GaimRequestField *field; + + fields = gaim_request_fields_new(); + + group = gaim_request_field_group_new(NULL); + gaim_request_fields_add_group(fields, group); + + field = gaim_request_field_string_new("screenname", _("_Screen name"), + NULL, FALSE); + gaim_request_field_set_type_hint(field, "screenname"); + gaim_request_field_set_required(field, TRUE); + gaim_request_field_group_add_field(group, field); + + field = gaim_request_field_account_new("account", _("_Account"), NULL); + gaim_request_field_set_visible(field, + (gaim_connections_get_all() != NULL && + gaim_connections_get_all()->next != NULL)); + gaim_request_field_set_required(field, TRUE); + gaim_request_field_group_add_field(group, field); + + gaim_request_fields(gaim_get_blist(), _("Get User Log"), + NULL, + _("Please enter the screen name of the person whose " + "log you would like to view."), + fields, + _("OK"), G_CALLBACK(get_log_cb), + _("Cancel"), NULL, + NULL); +} + /*------------------------------------------------------*/ /* Color Selection Dialog */ /*------------------------------------------------------*/ diff -r 26c9b8761707 -r 35b68d76cb4c src/gtkblist.c --- a/src/gtkblist.c Sun May 09 04:06:58 2004 +0000 +++ b/src/gtkblist.c Sun May 09 20:00:01 2004 +0000 @@ -2313,6 +2313,7 @@ { N_("/Buddies/New Instant _Message..."), "M", show_im_dialog, 0, "", GAIM_STOCK_IM }, { N_("/Buddies/Join a _Chat..."), "C", gaim_gtk_blist_show_join_chat, 0, "", GAIM_STOCK_CHAT }, { N_("/Buddies/Get User _Info..."), "I", show_info_dialog, 0, "", GAIM_STOCK_INFO }, + { N_("/Buddies/View User _Log..."), "L", show_log_dialog, 0, "" }, { "/Buddies/sep1", NULL, NULL, 0, "" }, { N_("/Buddies/Show _Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, ""}, { N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, ""}, diff -r 26c9b8761707 -r 35b68d76cb4c src/ui.h --- a/src/ui.h Sun May 09 04:06:58 2004 +0000 +++ b/src/ui.h Sun May 09 20:00:01 2004 +0000 @@ -129,6 +129,7 @@ extern void show_warn_dialog(GaimConnection *, const char *); extern void show_im_dialog(); extern void show_info_dialog(); +extern void show_log_dialog(); extern void destroy_all_dialogs(); extern void show_fgcolor_dialog(GaimConversation *c, GtkWidget *color); extern void show_bgcolor_dialog(GaimConversation *c, GtkWidget *color);