Bug 125875 - Incorrect name of contact in titlebar
Summary: Incorrect name of contact in titlebar
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: History Plugin (show other bugs)
Version: 0.11.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 12:42 UTC by Christopher Moore
Modified: 2006-04-19 15:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix (525 bytes, patch)
2006-04-19 14:54 UTC, Philip Rodrigues
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Moore 2006-04-19 12:42:12 UTC
Version:           0.11.1 (using KDE 3.5.2, Gentoo)
Compiler:          gcc version 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)
OS:                Linux (i686) release 2.6.15-gentoo-r1

When right clicking a contact from the contact list (say, Mr. X), and choosing History, a new window is presented with Mr. X's history and the titlebar reads "History for Mr. X - Kopete". However, if you use the drop-down menu at the top, beside "Contact:" and choose another contact (say, Mr. Y), his history is displayed, but the titlebar, however, still says "History for Mr. X - Kopete". Normally, one would expect this to change. Current loaded plugins are:
 - Connection Status
 - History
 - Now Listening
 - Statistics
 - Text Effect
This is easily reproduced, just by following the steps above.
Comment 1 Philip Rodrigues 2006-04-19 12:47:59 UTC
Confirmed on 0.12branch r522070.
Comment 2 Philip Rodrigues 2006-04-19 14:54:02 UTC
Created attachment 15689 [details]
Patch to fix

Here's a patch (against 0.12branch) with a fix. Apply in
kopete/kopete/plugins/history . Two notes:

1. It needs to display "History for All Contacts" when "All" is selected. This
breaks the string freeze, but you could work around it by using i18n("History
for %1").arg(i18n("All")) (!), since the strings "History for %1" and "All"
already appear.

2. I couldn't persuade emacs to obey the indenting, so my indenting doesn't
match the rest of the file. Sorry.
Comment 3 Philip Rodrigues 2006-04-19 15:55:35 UTC
SVN commit 531499 by philrod:

Update history dialog caption when contact is changed

BUG:125875


 M  +3 -1      historydialog.cpp  


--- branches/kopete/0.12/kopete/plugins/history/historydialog.cpp #531498:531499
@@ -576,12 +576,14 @@
 	mMainWidget->dateListView->clear();
 	if (index == 0)
 	{
-		mMetaContact = 0;
+        setCaption(i18n("History for All Contacts"));
+        mMetaContact = 0;
 		init();
 	}
 	else
 	{
 		mMetaContact = mMetaContactList.at(index-1);
+        setCaption(i18n("History for %1").arg(mMetaContact->displayName()));
 		init();
 	}
 }