Ticket #1041 (reopened enhancement)

Opened 3 years ago

Last modified 9 months ago

gajim misses usable single message mode

Reported by: goliath.mailinglist@… Owned by: asterix
Priority: normal Milestone:
Component: chat Version: svn
Severity: normal Keywords: single message mode
Cc: travis@… OS: All

Description

I'd like to see a mesaage-mode in gajim, like the mode available in psi.

Attachments

gajim-message-mode.patch (113.9 kB) - added by David Danier <goliath.mailinglist@…> 10 months ago.
gajim-message-mode.2.patch (148.6 kB) - added by David Danier <goliath.mailinglist@…> 10 months ago.
gajim-message-mode.3.patch (78.6 kB) - added by David Danier <goliath.mailinglist@…> 10 months ago.
Patch with most problems addressed
gajim-message-mode.4.patch (79.8 kB) - added by David Danier <goliath.mailinglist@…> 10 months ago.
Some fixes: "gpg_enabled" used when loading new windows, GPG-Button only shown if contact.keyID is set, Reply keeps encryption status
gajim-message-mode.5.patch (80.6 kB) - added by David Danier <goliath.mailinglist@…> 10 months ago.
Some bugfixes

Change History

  Changed 3 years ago by anonymous

please describe message-mode and what you would like to see. thanks

  Changed 3 years ago by goliath.mailinglist@…

Like this in psi: http://www.webmasterpro.de/~ddanier/message-mode.png

Every message received gets it own window, you can get the next message (if any) by clicking on "next". Answers are in single windows, too. Optional quoting of the text.

Of course this would require some additional changes: * somewhere in the config you must be able to choose which messagestyle you want (message or chat) * it would be nice to be able to overwrite this setting by right-clicking on a contact and choosing "send message" or "open chat" * perhaps more....

  Changed 3 years ago by nk

  • status changed from new to closed
  • resolution set to worksforme
  • milestone set to 0.9

right click on roster item --> send single message is enough as such messages are most of the times used in bots etc. Most users use chat so it's good that we default to that no matter what (aka robustness). About next message we don't handle those that way nor we want to do so. you can handle those events the Gajim way via systray or via roster, you can ask one event per click or all events with 2 clicks (right click and then select all eevents)

if you mean sth else reopen, but please try svn before

thanks

  Changed 10 months ago by David Danier <goliath.mailinglist@…>

  • status changed from closed to reopened
  • type changed from defect to enhancement
  • os set to All
  • summary changed from smart+question to gajim misses usable message mode
  • version changed from 0.8.2 to svn
  • milestone 0.9 deleted
  • keywords message mode added
  • resolution worksforme deleted

I created a little patch which provides basic message-mode. I don't think the patch is perfect and many things are still missing, but perhaps this illustrates, what I meant.

Patch follows.

Changed 10 months ago by David Danier <goliath.mailinglist@…>

follow-up: ↓ 8   Changed 10 months ago by asterix

I've quickly read your patch, not tested it, and here are somme comments:

good points:

  1. single message acn receive a resource
  2. next button in single chat window (we plan to remove this widget to integrate single message windows in tabs ... but until we do that, it's not bad to have that)
  3. quote button, why not. Can be usefull to not quote.

bad points:

  1. I don't understand why it's usefull to have a send_outgoing_messages option. if you get a normal messsage you reply with normal, if you get a chat, you reply with a chat message, why would you want to do another way?

  Changed 10 months ago by asterix

btw see #1525 for our plans about this window

  Changed 10 months ago by asterix

  • reporter changed from goliath.mailinglist@… to goliath.mailinglist@…

in reply to: ↑ 5   Changed 10 months ago by David Danier <goliath.mailinglist@…>

  • keywords single added
  • summary changed from gajim misses usable message mode to gajim misses usable single message mode

Replying to asterix:

bad points: 1. I don't understand why it's usefull to have a send_outgoing_messages option. if you get a normal messsage you reply with normal, if you get a chat, you reply with a chat message, why would you want to do another way?

Not everyone uses the normal chat-windows for chatting nor is used to do so. Old ICQ-versions (I mean _really_ old) for example provided only a single message mode (ok, there was a chat mode, but this was similar to multi user chat in jabber). Now I always used a client which provided this, first for ICQ itself and later for jabber (-> psi). But after switching from KDE to XFCE I really like to have a GTK-client with this functionality, as loading QT really sucks, at least on my laptop with limited RAM.

psi itself is also a good example of a working and usable single message mode, and of course a good example that there are other users, that don't think chat-mode is the only way to handle instant messaging (psi has both modes, you can set your default-mode in config, like I have done in this patch). And no, I don't want to switch back to psi, I really like gajim. It is just the program I used before... And hey, gajim is open source, why not patch it, so it fits my (and some other users) needs? ;-)

And of course, there is this thing: Being able to set the type of incoming messages makes absolutely no sense if I can't do similar for outgoing messages. Or at least its very user-unfriendly, as you can't just click on the user to send another message, if you closed one before, no you must to the right-click-dance. Seeing this new option is what made me start the patch in the first place, it looked half-ready for someone who wants to receive one single messages, because it's not that useful after all.

Anyway, I found some drawbacks in the current implementation I did (some mentioned in #1525, too):

  • messages are not storen if you close gajim I think
  • If you have chat-messages waiting you are not able to simply access them, because clicking on the contact will open an new "send" single message. The only way to access them is right click -> "start chat". (perhaps it works through the trayicon, haven't tested this yet)
  • trayicon it not patched (but _should_ work, because of default-type for incoming messages)
  • I'm not sure if creating a new SingleMessageWindow? with the normal chatwindow as a base would be easier. There are things that I have no idea how to implement, which are working with chat-windows (for example reusing an open window when receiving another message, with message-mode they should stay in the roster, but the window should be raised when clicking....or encryption). And I think chat-messages are handles in a total different way, so perhaps this should/could be unified. And perhaps having another GUI for the chat is what fits users best, instead of sending two diffent message types (but thats something the jabber-people must decide).
  • Things mentioned in the TODO (see patch), most notable: History and other things provided through "actions"-button. Perhaps some kind of history could even be integrated into the window (optional chatlog above the text-field, opens by click...or something like that).

Replying to asterix:

btw see #1525 for our plans about this window

There are some things, that could be changed and would be very useful:

  • "Switch to chat" in SingleMessageWindow?
  • Adding "Next" (already done)
  • Remove "Send" (but sometimes this might be useful, perhaps it could stay, don't uses much space)

As for the "integration into chat window": I think thats a bad idea, as some users don't want chat windows at all. But as long as this stays optional...why not? :)

The big advantage of single message windows is that I get them on my current desktop using the trayicon. If I reply or close the window nothing remains on the desktop. So I don't have gajim-windows scattered over all desktops. I just receive one message, perhaps read more in the queue, reply to it/close it and nothing disturbs me any more. (Currently I have one desktop where I put the chat window(s), but that means more clicks/time to read/reply)

follow-up: ↓ 10   Changed 10 months ago by asterix

First I appreciate your patch, I'm not at all against it. I was just wondering why you would reply with a normal message when your contact initiate a chat conversation.

Moreover with your patch all outgoing messages will have the same type. So you can't have a chat with a contact and send a normal message to a bot for example.

What do you think of that proposition: have an option named 'default_message_type' that will just change the behaviour of dubble click on a contact in roster (open chat window or single message window). The corresponding menuitem will be bold.


Now about the integration of single message in tabs, it's better to talk about that in #1525, but the general idea was, IIRC, to have a list of last X messages on the left, and about the current single message window on the right. This way you can easily switch to previous messages, new one can be bold ...

in reply to: ↑ 9   Changed 10 months ago by David Danier <goliath.mailinglist@…>

Replying to asterix:

First I appreciate your patch, I'm not at all against it. I was just wondering why you would reply with a normal message when your contact initiate a chat conversation.

I don't want to have a chat, thats all. And receiving chat messages as normal messages is already possible with current gajim. So you already would reply with a normal message, if this option is set.

Moreover with your patch all outgoing messages will have the same type. So you can't have a chat with a contact and send a normal message to a bot for example.

That's because its unfinished. It should use an existing chat-window, if one exists. (Say: "Normal Message (Chat if chatting)")

Not that I would open a chat window, but just to be feature-complete.

What do you think of that proposition: have an option named 'default_message_type' that will just change the behaviour of dubble click on a contact in roster (open chat window or single message window). The corresponding menuitem will be bold.

If you skip the design-part (menuitem is bold) thats exactly what I'm trying to do. Perhaps the option-name is misleading.

Additionaly the SingleMessageWindow? must become more useful ("Next", GPG-Support, ...), thats what the rest of this patch is about.

Anyway, I have a new patch, that enhances the functionality of SingleMessageWindow?:

  • It displays the roster-name in the window (using SingleMessageWindow? for ICQ-contacts sucks without it)
  • "Actions"-Menu stolen from chat window (History, ContactInfos?, ...)
  • GPG-Support, but this is untested, as currently nobody with GPG is online (and the icon is still broken)
  • "Next" is disabled when no messages are waiting

Missing stuff/bugs:

  • Roster-Icon is not displayed
  • Receiving chat messages still doesn't work, as doubleclicking opens an new SingleMessageWindows?, where new chat messages cannot be accessed
  • stuff listed above and in TODO.message-mode

Changed 10 months ago by David Danier <goliath.mailinglist@…>

follow-up: ↓ 12   Changed 10 months ago by asterix

as you seem to be on a very good way, here is what you can do:

  • use a banner to show name and avatar of the contact, the same as in chat and groupchat window. This way this window will be consisten with others. This will be nicer, particulary when we'll integrate that in tabs.
  • Add a list on the left to show all messages, including new messages. This way the next button is not needed, just select the new message in the list and that's it (a key shortcut can be used too)

If you need help, don't hesitate to come in our room: gajim@…

Changed 10 months ago by David Danier <goliath.mailinglist@…>

Patch with most problems addressed

Changed 10 months ago by David Danier <goliath.mailinglist@…>

Some fixes: "gpg_enabled" used when loading new windows, GPG-Button only shown if contact.keyID is set, Reply keeps encryption status

in reply to: ↑ 11 ; follow-up: ↓ 13   Changed 10 months ago by David Danier <goliath.mailinglist@…>

Replying to asterix:

as you seem to be on a very good way, here is what you can do:

Thanks

I think some things can be done nicer/cleaner, but I started patching gajim yesterday (and with it using PyGTK and Glade for the first time), so I don't know the internals very well.

* use a banner to show name and avatar of the contact, the same as in chat and groupchat window. This way this window will be consisten with others. This will be nicer, particulary when we'll integrate that in tabs.

I added a statusicon and username, but not in the banner-format you propose. But I will look into the banner-code of the message,window, to see how complicated this will be.

* Add a list on the left to show all messages, including new messages. This way the next button is not needed, just select the new message in the list and that's it (a key shortcut can be used too)

Hmmm....I'm not sure if I like this idea. The list should at least be optional (triggered by some button). Anyway I would prefer adding the history to the top of the message window (triggered by some button) and keep the "Next"-button. Otherwise it would get to similar to the chat window I think...and these two are clearly different.

If you need help, don't hesitate to come in our room: gajim@…

Currently I got it into a state I like and will try for at least one day now. Sure, design can be enhanced a lot (Username in the top left corner looks ugly, but works). But I'll idle some time for now.

For the time I work on the code: I restart gajim every few minutes, so this might be _very_ annoying. :D

in reply to: ↑ 12   Changed 10 months ago by asterix

Replying to David Danier <goliath.mailinglist@gmx.de>:

Hmmm....I'm not sure if I like this idea. The list should at least be optional (triggered by some button). Anyway I would prefer adding the history to the top of the message window (triggered by some button) and keep the "Next"-button. Otherwise it would get to similar to the chat window I think...and these two are clearly different.

Yep, this can go in an expander on top. In fact it's usefull to see previous messages for example. The same window is used when receiving messages from RSS bots for example, and it can be cool to see previous messages. Next button can be kept, that doesn't hurt.

Changed 10 months ago by David Danier <goliath.mailinglist@…>

Some bugfixes

  Changed 10 months ago by David Danier <goliath.mailinglist@…>

Found a rather annoying bug:
If I receive messages as normal messages, click through them with "Next", close gajim and reopen it...all messages are "received" again as chat-messages. Not sure if this has something to do with my patch or is a bug with the existing 'treat_incoming_messages'-code (I do the same things RosterWindow?.open_event() does inside "Next").

  Changed 10 months ago by asterix

I can't look deeply now, but gajim a this system:

a messages is saved in a database until it's read. So if gajim crashes before you read it, you still have it as unread next time you run gajim.

Maybe with your patch it's not removed from db when it's read?

  Changed 10 months ago by David Danier <goliath.mailinglist@…>

I use this code (borrowed from RosterWindow?.open_event):

gajim.interface.remove_first_event(self.account, self.from_whom, next_event.type_)

So I thought this is enough. Does the database need any additional notice about the message being read/removed from the queue? I didn't find any additional code when reading the normal message hanlding so far...and sadly I did not find how chat windows get the messages to compare the code.

  Changed 9 months ago by nicfit

  • cc travis@… added

Add/Change #1041 (gajim misses usable single message mode)

Author



Change Properties
<Author field>
Action
as reopened
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
 
Note: See TracTickets for help on using tickets.