[Pidgin] #4732: IM Convo window titlebar change and Timestamp formatting change

Pidgin trac at pidgin.im
Sat Jan 26 19:45:38 EST 2008


#4732: IM Convo window titlebar change and Timestamp formatting change
--------------------------+-------------------------------------------------
Reporter:  iamdegenatron  |       Owner:  sadrul                         
    Type:  patch          |      Status:  new                            
Priority:  minor          |   Component:  finch (gnt/ncurses)            
 Version:  2.3.1          |    Keywords:  timestamp conversation titlebar
 Pending:  0              |  
--------------------------+-------------------------------------------------
 I was frustrated by information provided in the title bar of every instant
 message conversation window in finch. It didn't seem very useful to me.
 Many people I know (on MSN) have very large ambiguous nicks and it is
 impossible to know who you're talking to by looking at the title bar of
 any conversation. I decided to edit that so it includes the Buddy's
 information in the following format:
 Network_Buddy_belongs_to: [Buddy's_email_address --
 Buddy's_network_status] Buddy's_nick

 There could be more optimal and efficient ways of formatting this and
 more/less information depending on needs.

 Beyond the title bar, the timestamps in finch were also not very
 descriptive. Most people would use finch in screen and probably leave it
 running for days on end. In the time that finch would be left on, many
 people might try to message you and you would have no idea which day they
 might have contacted as the default timestamp only shows you
 Hours:Minutes:Seconds. I decided to make it excessively descriptive
 instead by changing the format to Year-Month-Day Hours:Minutes:Seconds.

 Below is a diff -u output for the file pidgin-2.3.1\finch\gntconv.c where
 I made a couple of lines worth of changes.

 Thanks,

 Martin Jessen
 iamdegenatron at yahoo.com


 {{{
 --- gntconv.c   2007-12-07 09:36:59.000000000 -0500
 +++ gntconv2.c  2008-01-26 18:45:50.000000000 -0500
 @@ -242,8 +242,8 @@
  static char *
  get_conversation_title(PurpleConversation *conv, PurpleAccount *account)
  {
 -       return g_strdup_printf(_("%s (%s -- %s)"),
 purple_conversation_get_title(conv),
 -               purple_account_get_username(account),
 purple_account_get_protocol_name(account));
 +       return g_strdup_printf(_("%s: [%s -- %s] %s"),
 purple_account_get_protocol_name(account),
 +               purple_buddy_get_name(purple_find_buddy(conv->account,
 conv->name)),
 purple_status_get_name(purple_presence_get_active_status(purple_buddy_get_presence(purple_find_buddy(conv->account,
 conv->name)))), purple_conversation_get_title(conv));
  }

  static void
 @@ -753,7 +753,7 @@
         /* Unnecessary to print the timestamp for delayed message */
         if (purple_prefs_get_bool("/finch/conversations/timestamps"))
 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv),
 -                                       purple_utf8_strftime("(%H:%M:%S)
 ", localtime(&mtime)), GNT_TEXT_FLAG_DIM);
 +                                       purple_utf8_strftime("(%Y-%m-%d
 %H:%M:%S) ", localtime(&mtime)), GNT_TEXT_FLAG_DIM);

         if (flags & PURPLE_MESSAGE_AUTO_RESP)
 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv),

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4732>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list