philn / gnome-shell-gajim-extension

[UNMAINTAINED] Gajim IM integration in GNOME Shell
GNU General Public License v3.0
18 stars 2 forks source link

Open native gajim chat window after click on a Gnome notification #2

Closed szpak closed 10 years ago

szpak commented 11 years ago

Thanks to this extension I can see new messages sent to me without switching to Gajim (click on a notification area Gajim icon and open a chat window). Nevertheless when I want to reply to start chatting I usually use a native Gajim window (I like it and in addition messages sent from a chat in Gnome notification are not saved in a Gajim history (btw, could it be simply fixed?)).

It would be useful for people like me to be able open a native Gajim window just clicking on a gnome-shell-gajim-extension notification (except an edit component and closing X). I don't know if it should be a default behavior or be configured by an user in preferences.

philn commented 11 years ago

Ok I guess it can be a new setting. Which version of Gajim are you using? I vaguely recall the history issue, that bug should be taken care of :)

szpak commented 11 years ago

I checked it more deeply and in fact the history looks ok. The problem is that messages

Peer 1 - sending messaging via Gajim Peer 2 - via Gnome

1->2: d1
2->1: d2
2->1: d3
2->1: d4
2->1: d5

Open a native Gajim chat window (for Peer 2):

[10:57:01] Peer1: d1
[10:57:04] Peer2: d2
[10:57:06] Peer2: d3
[10:57:07] Peer2: d4 <<those four are smaller, looks like taken from a history>>

[10:57:01] Peer1: d1 <<this is "normal", but our of sync>>

There is missing the last - d5 message in a chat window for peer 2 (d5 is shown in a history of the conversation).

So generally if Gajim (0.15.2) remembers in its history sent commands this issue has much less impact (you just can't mix Gnome Shell dialog with native Gajim dialog in the same conversation flawlessly).

philn commented 11 years ago

Can you please test this? If it's ok I'll upload version 8 to the extensions website. If it's not ok feel free to reopen.

szpak commented 11 years ago

Unfortunately I have some problems. When I got a message there are two types of notifications shown: the standard one (like with notify-send) and the customized one with an edit component where it is possible to write a response message (they seems to be shown in a random order). When I click on the standard one a Gajim chat window is opened (ok), but clicking on the customized one just hides it (not ok). The same problem is with clicking on a notification icon.

It looks like gnome-shell-gajim-extension tries to open something - when the main Gajim window (with a roster) is open it switches to a workspace with that window (but a chat window is not shown). When I close a roster clicking on a notification icon doesn't nothing (even a notification area isn't hiden - there is also not error in .xsession-errors)

philn commented 11 years ago

I can't do anything about what you call the standard notification. So, when you click on the other notification you basically want the same behavior as when a first incoming message arrives and the author's icon change to some letter icon in the roster? Clicking that opens a new chat window, maybe I can do that.

And when a first message was received already and the Gajim chat window is opened somewhere already and you click on the notification, what should happen?

szpak commented 11 years ago

On 2013-02-18 23:11, Philippe Normand wrote:

I can't do anything about what you call the standard notification.

I was truly convinced that gnome-shell-gajim-extension generates it as well, but indeed it seems that Gajim generates them directly. Sorry for being querulous, but I that case maybe it would be easier to add another option which would disable showing the extended notifications - for people who don't plan to chat through notifications, but like the search provider feature?

So, when you click on the other notification you basically want the same behavior as when a first incoming message arrives and the author's icon change to some letter icon in the roster? Clicking that opens a new chat window, maybe I can do that.

Yes (your notification is shown also when the next messages arrives which can be useful).

And when a first message was received already and the Gajim chat window is opened somewhere already and you click on the notification, what should happen?

I think the extension should try to focus the Gajim chat window (when clicked on the notification - except the X button and the edit component).

philn commented 11 years ago

Check the Gajim use_notif_daemon option if you want to disable its notifications. I'll see what I can do for the rest!

philn commented 10 years ago

Not sure anymore what's left to do here. :)

szpak commented 10 years ago

You are not alone :). Closing (for now :) ).