Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '1.6-stable'

  • Loading branch information...
commit 6c85fc1533b45441985a69a2e57572c5046dcfb9 2 parents 7e7dbba + 1badf05
@flynd flynd authored
View
1  licq/doc/CHANGELOG
@@ -14,6 +14,7 @@ o ICQ: Fix packets not being sent for sequence numbers above 0x7fff
o Qt4-Gui: Handle meta key in global hotkeys
o Qt4-Gui: Fix global hotkeys to work with Caps-/Numlock active
o Qt4-Gui: Fix crash on message right click without spell checking
+o Qt4-Gui: Update title of user dialogs when alias/name changes
New in 1.6.0
View
7 qt4-gui/src/contactlist/contactuserdata.cpp
@@ -31,6 +31,7 @@
#include <licq/contactlist/user.h>
#include <licq/icq/icq.h>
#include <licq/icq/user.h>
+#include <licq/plugin/pluginmanager.h>
#include <licq/pluginsignal.h>
#include <licq/socket.h>
#include <licq/userevents.h>
@@ -499,12 +500,10 @@ bool ContactUserData::setData(const QVariant& value, int role)
u->SetKeepAliasOnUpdate(true);
u->setAlias(myAlias.toUtf8().data());
- // Daemon doesn't send signal when alias is changed so trigger update from here
- updateText(*u);
- updateSorting();
+ Licq::gPluginManager.pushPluginSignal(new Licq::PluginSignal(
+ Licq::PluginSignal::SignalUser, Licq::PluginSignal::UserBasic, myUserId));
}
- emit dataChanged(this);
return true;
}
View
3  qt4-gui/src/core/licqgui.cpp
@@ -53,6 +53,7 @@
extern "C"
{
#include <X11/X.h>
+#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -504,7 +505,7 @@ bool LicqGui::x11EventFilter(XEvent* event)
{
Display* dsp = QX11Info::display();
unsigned int mod = event->xkey.state & (ControlMask | ShiftMask | Mod1Mask | Mod4Mask);
- unsigned int keysym = XKeycodeToKeysym(dsp, event->xkey.keycode, 0);
+ unsigned int keysym = XkbKeycodeToKeysym(dsp, event->xkey.keycode, 0, 0);
if (keysym == Support::keyToXSym(myPopupMessageKey) &&
mod == Support::keyToXMod(myPopupMessageKey))
View
36 qt4-gui/src/dialogs/historydlg.cpp
@@ -1,6 +1,6 @@
/*
* This file is part of Licq, an instant messaging client for UNIX.
- * Copyright (C) 2007-2011 Licq developers
+ * Copyright (C) 2007-2012 Licq developers <licq-dev@googlegroups.com>
*
* Licq is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -162,16 +162,7 @@ HistoryDlg::HistoryDlg(const Licq::UserId& userId, QWidget* parent)
{
Licq::UserReadGuard u(myUserId);
- QString name = tr("INVALID USER");
-
- if (u.isLocked())
- {
- name = QString::fromUtf8(u->getFullName().c_str());
- if (!name.isEmpty())
- name = " (" + name + ")";
- name.prepend(QString::fromUtf8(u->getAlias().c_str()));
- }
- setWindowTitle(tr("Licq - History ") + name);
+ setTitle(*u);
bool validHistory = false;
@@ -281,6 +272,29 @@ void HistoryDlg::updatedUser(const Licq::UserId& userId, unsigned long subSignal
if (event != NULL && argument > 0 && argument > (*(--myHistoryList.end()))->Id())
addMsg(event);
}
+ else if (subSignal == Licq::PluginSignal::UserBasic)
+ {
+ Licq::UserReadGuard u(myUserId);
+ setTitle(*u);
+ }
+}
+
+void HistoryDlg::setTitle(const Licq::User* user)
+{
+ QString name;
+ if (user == NULL)
+ {
+ name = tr("INVALID USER");
+ }
+ else
+ {
+ name = QString::fromUtf8(user->getFullName().c_str());
+ if (!name.isEmpty())
+ name = " (" + name + ")";
+ name.prepend(QString::fromUtf8(user->getAlias().c_str()));
+ }
+
+ setWindowTitle(tr("Licq - History ") + name);
}
void HistoryDlg::eventSent(const Licq::Event* event)
View
9 qt4-gui/src/dialogs/historydlg.h
@@ -1,6 +1,6 @@
/*
* This file is part of Licq, an instant messaging client for UNIX.
- * Copyright (C) 2007-2011 Licq developers <licq-dev@googlegroups.com>
+ * Copyright (C) 2007-2012 Licq developers <licq-dev@googlegroups.com>
*
* Licq is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -147,6 +147,13 @@ private slots:
*/
void showHistory();
+ /**
+ * Update window title
+ *
+ * @param @user The user object
+ */
+ void setTitle(const Licq::User* user);
+
Licq::UserId myUserId;
bool myIsOwner;
QString myContactName;
View
37 qt4-gui/src/userdlg/userdlg.cpp
@@ -1,6 +1,6 @@
/*
* This file is part of Licq, an instant messaging client for UNIX.
- * Copyright (C) 2008-2011 Licq developers
+ * Copyright (C) 2008-2012 Licq developers <licq-dev@googlegroups.com>
*
* Licq is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -102,18 +102,10 @@ UserDlg::UserDlg(const Licq::UserId& userId, QWidget* parent)
Licq::UserReadGuard user(myUserId);
if (user.isLocked())
{
- QString name = QString::fromUtf8(user->getFullName().c_str());
- if (!name.isEmpty())
- name = " (" + name + ")";
- myBasicTitle = tr("Licq - Info ") + QString::fromUtf8(user->getAlias().c_str()) + name;
-
myUserInfo->load(*user);
myUserSettings->load(*user);
}
- else
- {
- myBasicTitle = tr("Licq - Info ") + tr("INVALID USER");
- }
+ setBasicTitle(*user);
}
resetCaption();
@@ -232,10 +224,35 @@ void UserDlg::userUpdated(const Licq::UserId& userId, unsigned long subSignal)
if (!user.isLocked())
return;
+ if (subSignal == Licq::PluginSignal::UserBasic)
+ setBasicTitle(*user);
+
myUserInfo->userUpdated(*user, subSignal);
myUserSettings->userUpdated(*user, subSignal);
}
+void UserDlg::setBasicTitle(const Licq::User* user)
+{
+ bool wasBasicTitle = (windowTitle() == myBasicTitle);
+
+ QString name;
+ if (user == NULL)
+ {
+ name = tr("INVALID USER");
+ }
+ else
+ {
+ name = QString::fromUtf8(user->getFullName().c_str());
+ if (!name.isEmpty())
+ name = " (" + name + ")";
+ name.prepend(QString::fromUtf8(user->getAlias().c_str()));
+ }
+
+ myBasicTitle = tr("Licq - Info ") + name;
+ if (wasBasicTitle)
+ resetCaption();
+}
+
void UserDlg::doneFunction(const Licq::Event* event)
{
if (!event->Equals(myIcqEventTag))
View
10 qt4-gui/src/userdlg/userdlg.h
@@ -1,6 +1,6 @@
/*
* This file is part of Licq, an instant messaging client for UNIX.
- * Copyright (C) 2008-2010 Licq developers
+ * Copyright (C) 2008-2012 Licq developers <licq-dev@googlegroups.com>
*
* Licq is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@
namespace Licq
{
class Event;
+class User;
}
namespace LicqQtGui
@@ -176,6 +177,13 @@ private slots:
void resetCaption();
private:
+ /**
+ * Update base part of window title
+ *
+ * @param @user The user object
+ */
+ void setBasicTitle(const Licq::User* user);
+
Licq::UserId myUserId;
bool myIsOwner;
unsigned long myIcqEventTag;
Please sign in to comment.
Something went wrong with that request. Please try again.