otrv4 / pidgin-otrng

Fork of https://bugs.otr.im/plugins/pidgin-otr. This is a mirror of https://bugs.otr.im/otrv4/pidgin-otrng
GNU General Public License v2.0
16 stars 5 forks source link

Can we respect "Hide New IM conversation" better #60

Closed olabini closed 5 years ago

olabini commented 6 years ago

See https://bugs.otr.im/plugins/pidgin-otr/issues/142

MauroVelasco commented 5 years ago

I reproduced this issue in the following way:

After configure the "Hide new IM conversations as: Always" in the recipient

issue_60_message2

The messages are still shown at the top of window as shows:

issue_60_message1

In the tests, the main window with the conversation is not shown. Also notice the states: Never and When Away, don't provide any action.

claucece commented 5 years ago

Mmm.. very interesting.. Let's discuss this week.

MauroVelasco commented 5 years ago

Hi @claucece, just to add more information:

With @Cris2760 we observed the following behavior:

Linux Mint

Linux Ubuntu

claucece commented 5 years ago

Hey!

I understand now the issue ;) So, the problem is not the notification; but rather the window itself. Usually what happens is:

Alice has configured 'Hide new IM conversations' to 'Always'. If Bob starts a conversation with her (not OTR), the conversation window does not show up unless it is clicked.

In the case of OTR:

Alice has configured 'Hide new IM conversations' to 'Always'. If Bob starts a conversation with her (OTR), the conversation window does show up.

Let's check this tomorrow.

MauroVelasco commented 5 years ago

Hey @claucece, @peterpalau regarding this, the function used to recover a property from prefs.xml is purple_prefs_get_string and the property can be loaded using the path of element like /pidgin/conversations/im/hide_new

Example: purple_prefs_get_string("/pidgin/conversations/im/hide_new") can return the value always or the property configured.

claucece commented 5 years ago

Hi, @MauroVelasco

Hey @claucece, @peterpalau regarding this, the function used to recover a property from prefs.xml is purple_prefs_get_string and the property can be loaded using the path of element like /pidgin/conversations/im/hide_new

Oh, awesome! Do we know if this is an exposed function? It does not seem so... but I can be wrong ;)

I looked at the code, and it seems what you might want to look at is the otrng_gtk_dialog_new_purple_conv function on the gtk-dialog file...

MauroVelasco commented 5 years ago

Hi, @claucece,

Hi, @MauroVelasco

Hey @claucece, @peterpalau regarding this, the function used to recover a property from prefs.xml is purple_prefs_get_string and the property can be loaded using the path of element like /pidgin/conversations/im/hide_new

Oh, awesome! Do we know if this is an exposed function? It does not seem so... but I can be wrong ;)

I think so, I did a test using this function to get a preference from prefs.xml and worked well. The API can be found on:

https://developer.pidgin.im/doxygen/2.5.0/html/prefs_8h.html

I looked at the code, and it seems what you might want to look at is the otrng_gtk_dialog_new_purple_conv function on the gtk-dialog file...

Great, thank you, I'll check this function.

claucece commented 5 years ago

I think this is now done.. closing this ;)