Some GUI patches

2 views
Skip to first unread message

Jörg Mensmann

unread,
Nov 13, 2011, 1:31:53 PM11/13/11
to licq...@googlegroups.com
Hi,

here is bunch of patches for the Qt4-GUI that fix session handling and
global shortcuts on KDE and make the display of remote user time less
intrusive.

ciao
Jörg

licq-kde4-gui-Fix-command-line-handling-for-plugin.patch
licq-kde4-gui-Use-KDE-mechanism-for-global-shortcuts.patch
licq-qt4-gui-Show-remote-user-time-only-when-it-differs.patch

Anders Olofsson

unread,
Nov 14, 2011, 12:26:37 PM11/14/11
to Jörg Mensmann, licq...@googlegroups.com
> J�rg
>

Hi,
thanks for the patches. I have some comments though.

Session handling:
According to [1], the -session parameter is mandatory. Is there any KDE
documentation indicating that this should be different for KDE
applications? Otherwise I would prefer to keep -session but fix the arg
parsing instead to handle both "-session" and "-s".
Also, now that I look at the current session handling, it will not
preserve any parameters for other plugins or licq (for example basedir)
so I think this needs a bigger makeover... I'll have to give all of this
some more thought...

Global shortcuts:
The global shortcut works fine with both qt4-gui and kde4-gui here.
Is there any specific key(s) that only works when doing it the KDE way?
Are you having problems when building without KDE support or only with?

Remote time:
I'm not against hiding the remote user's time (when unknown or as a user
setting) but then we loose the typing notification indicator. I'm open
to suggestions on how to show typing notifications instead.
I'll drop the seconds from the display though, I agree that those aren't
needed.

/Anders


[1] http://doc.trolltech.com/4.7/qsessionmanager.html#setRestartCommand

Jörg Mensmann

unread,
Nov 14, 2011, 3:45:32 PM11/14/11
to Anders Olofsson, licq...@googlegroups.com
Hi!

Anders Olofsson <fl...@licq.org> wrote:
> According to [1], the -session parameter is mandatory. Is there any
> KDE documentation indicating that this should be different for KDE
> applications?

I couldn't find anything in the KApplication docs. However, all KDE
applications only list "--session" as a supported option when called
with "--help-qt".

> Also, now that I look at the current session handling, it will not
> preserve any parameters for other plugins or licq (for example
> basedir) so I think this needs a bigger makeover...

Yes, it looks quite incomplete to me, too. The patch is mainly a
workaround for the two issues.

> The global shortcut works fine with both qt4-gui and kde4-gui here.

Without the patch global shortcuts didn't work at all for me, neither
with kde4-gui nor with pure qt4-gui. I tried several types of key combos
(Meta+I, Ctrl+I, etc.), but they would always go to the window in focus,
not Licq. I'm running Fedora 15 with KDE 4.6.5.

> I'm not against hiding the remote user's time (when unknown or as a
> user setting) but then we loose the typing notification indicator. I'm
> open to suggestions on how to show typing notifications instead.

Well, there is still the contact's name in the tabbar which changes
color in this case (if tabs are enabled), but I get the point. Other
clients often show a temporary "user is typing" at the end of the chat
history. We could also use the pen icon that appears in the contact list
as a notification, placing it where the user time display used to be
(with a flashy background color).

ciao
Jörg

Anders Olofsson

unread,
Nov 15, 2011, 2:52:37 PM11/15/11
to Jörg Mensmann, licq...@googlegroups.com
On 2011-11-14 21:45, J�rg Mensmann wrote:
> Anders Olofsson<fl...@licq.org> wrote:
>> According to [1], the -session parameter is mandatory. Is there any
>> KDE documentation indicating that this should be different for KDE
>> applications?
>
> I couldn't find anything in the KApplication docs. However, all KDE
> applications only list "--session" as a supported option when called
> with "--help-qt".
>
>> Also, now that I look at the current session handling, it will not
>> preserve any parameters for other plugins or licq (for example
>> basedir) so I think this needs a bigger makeover...
>
> Yes, it looks quite incomplete to me, too. The patch is mainly a
> workaround for the two issues.

I'm not very familiar with session management but the purpose should be
to restore the state of an application as much as possible after a
restart. As Licq doesn't have any state handling other than normal
configuration I'm not sure it worth pretending anything by having
support for the parameter at all.
Do you know if the window manager does anything useful for us when the
session parameter is present? Otherwise I think it could just as well be
removed until someone wants to implement proper session support for Licq.


>> The global shortcut works fine with both qt4-gui and kde4-gui here.
>
> Without the patch global shortcuts didn't work at all for me, neither
> with kde4-gui nor with pure qt4-gui. I tried several types of key combos
> (Meta+I, Ctrl+I, etc.), but they would always go to the window in focus,
> not Licq. I'm running Fedora 15 with KDE 4.6.5.

Do you by any chance have Num Lock active? I did some testing and found
that the current event grabbing with X only worked if Caps Lock and Num
Lock were off. I just committed a fix for this, please check if it works
better for you now.


>> I'm not against hiding the remote user's time (when unknown or as a
>> user setting) but then we loose the typing notification indicator. I'm
>> open to suggestions on how to show typing notifications instead.
>
> Well, there is still the contact's name in the tabbar which changes
> color in this case (if tabs are enabled), but I get the point. Other
> clients often show a temporary "user is typing" at the end of the chat
> history. We could also use the pen icon that appears in the contact list
> as a notification, placing it where the user time display used to be
> (with a flashy background color).

Something temporary in the history area sounds complicated (that code is
complicated enough as it is). I think I prefer having something in the
window rather than messing with the window title or the window icon, so
having a pen icon or similar when he remote time isn't displayed might
be the way to go. I'll try it out and see how it looks.

/Anders

Jörg Mensmann

unread,
Nov 17, 2011, 3:59:40 PM11/17/11
to Anders Olofsson, licq...@googlegroups.com
Anders Olofsson <fl...@licq.org> wrote:
> As Licq doesn't have any state handling other than normal
> configuration I'm not sure it worth pretending anything by having
> support for the parameter at all.

We at least need to provide a command line to the session manager with
which it restart the client with the same configuration (which is
implemented right now). Besides that, I agree that Licq does not need to
store more session state.

> Do you know if the window manager does anything useful for us when the
> session parameter is present?

AFAIK the session id is just passed to the client so that it can restore
any state it previously stored under that id. Licq doesn't use this
mechanism at all right now, and therefore the parameter could be removed
in LicqGui::commitData(). Actually, this would also fix the problem that
an additional "-session" parameter is added to the command line on each
session restore, i.e. Licq's command line grows longer and longer.

> I did some testing and found that the current event grabbing with X
> only worked if Caps Lock and Num Lock were off. I just committed a fix
> for this, please check if it works better for you now.

Right, that was the problem, it works now.

Fiddling with this a bit, I noticed a related issue, which does not
appear with the KDE-style shortcut handling: When setting the show/hide
shortcut to Alt+I or Meta+I, pressing this shortcut in the Licq main
window will switch to the "Ignore" group. Looks like the key event is
not consumed completely.

ciao
Jörg

Reply all
Reply to author
Forward
0 new messages