[Konversation-devel] [Bug 213370] Channel Settings dialog fails to refresh topic information upon subsequent openings
Eike Hein
hein at kde.org
Sat Nov 7 02:51:35 CET 2009
https://bugs.kde.org/show_bug.cgi?id=213370
Eike Hein <hein at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hein at kde.org
--- Comment #1 from Eike Hein <hein kde org> 2009-11-07 02:51:34 ---
Ok, here's some background on this:
1. Whenever the client receives channel topic data (i.e. on channel join or
when someone changes the channel topic), the topic history list in the dialog
is updated. The same code is apparently also run whenever the dialog is
constructed.
2. When someone changes the channel topic and a new item is added to the list,
the selection changes to that new item. The upper text widget in the dialog
always shows the topic currently selected in the list, and thus changes
accordingly.
3. When the text in the lower text widget in the dialog is changed, a bool
m_editingTopic is set to true.
4. During #1, the lower text widget in the dialog is set to the first item in
the topic history list only if the history is not empty (duh) and
m_editingTopic is not true.
5. m_editingTopic is set to false only when the dialog is cancelled.
IOW, the reason for this problem is that code was written to avoid topic
changes interfering with the user editing the topic himself in the lower text
widget, but there are two problems:
- The protection is overzealous: It appears that #4 alone causes #3, not just
user-originated changes to the widget's contents. This means that when someone
changes the topic while the dialog is open, the topic in the lower text widget
will not be updated, even when the user hasn't actually touched the widget (the
list and upper text widgets update correctly, however).
- m_editingTopic isn't reset to false when the dialog is closed with "Ok". So
when the user 1. edits the topic in the dialog (or some mode), 2. then OK's it,
3. then someone else changes the topic and 4. the user subsequently reopens the
dialog, the lower text widget will still show the contents from when it was
opened and OK'd previously.
The bottom line here is probably that the behavior should be changed so that
the two text widgets update in sync with the selection in the list unless the
user has actually modified the contents of the lower text widget, and that
closing the dialog in any way (i.e. both OK and Cancel, where Cancel includes
closing the window) should make it forget that the user has modified the lower
text widget.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list