Gajim - 2017-04-14


  1. jplitza Good evening. One quick question if I may, what is the difference between the gajim-nightly and the gajim-default-nightly?
  2. lovetox one is gtk2 the other gtk3
  3. lovetox jplitza
  4. Link Mauve lovetox, about #11, where would you make the difference between MUC and 1to1 chat?
  5. Link Mauve With motion-notify-event.
  6. lovetox Link Mauve, about your question
  7. lovetox the thing is, its seems like a small change to not create the control
  8. Link Mauve Yeah, like for one to one chats.
  9. lovetox but in reallity gajim cant load history into a muc window on creation
  10. lovetox that means all messages go to history
  11. lovetox the thing how this works is definitly not a good way
  12. lovetox but if you want to change that, one thing leads to another
  13. lovetox and its not really needed for your MR, we can still implement it
  14. lovetox let me read it again to remember how we can solve the problem
  15. lovetox yeah basically do it like i did with set_tooltip
  16. lovetox because the tooltip has also connect to the window
  17. lovetox in groupchat.py i have a method called set_tooltip
  18. lovetox you need a method like that there that connects you to to the event
  19. lovetox and you call this metod from
  20. lovetox roster_window.py - on_groupchat_maximized
  21. Link Mauve Why is it from the roster window?!
  22. lovetox because the groupchat is only a roster item
  23. lovetox on autojoin minimized
  24. lovetox then you click on it, and on_groupchat_maximized gets called
  25. lovetox there the window gets created, and after its created you connect the event
  26. lovetox the only difference to how you do it now is just that you dont connect the event in the init
  27. lovetox you connect it when the window gets created
  28. lovetox in gajim a chatcontrol != window thats the thing
  29. lovetox you have to still try to connect it in the chatcontrol init though, but only if a parent window is set
  30. lovetox actually you can do it exactly like i connect the tooltip
  31. lovetox ich have this also in the init
  32. lovetox if parent_win: self.set_tooltip()
  33. Link Mauve lovetox, does that sound correct to you? diff --git a/src/chat_control_base.py b/src/chat_control_base.py index 1d35a6333..1b461caaf 100644 --- a/src/chat_control_base.py +++ b/src/chat_control_base.py @@ -386,13 +386,14 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): # chatstate timers and state self.reset_kbd_mouse_timeout_vars() self._schedule_activity_timers() - id_ = parent_win.window.connect('motion-notify-event', - self._on_window_motion_notify) - self.handlers[id_] = parent_win.window message_tv_buffer = self.msg_textview.get_buffer() id_ = message_tv_buffer.connect('changed', self._on_message_tv_buffer_changed) self.handlers[id_] = message_tv_buffer + if parent_win is not None: + id_ = parent_win.window.connect('motion-notify-event', + self._on_window_motion_notify) + self.handlers[id_] = parent_win.window # PluginSystem: adding GUI extension point for ChatControlBase # instance object (also subclasses, eg. ChatControl or GroupchatControl) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index cd62bb54a..facef7ece 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -343,7 +343,7 @@ class GroupchatControl(ChatControlBase): img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) self.current_tooltip = None - if parent_win: + if parent_win is not None: # On AutoJoin with minimize Groupchats are created without parent # Tooltip Window has to be created with parent self.set_tooltip() diff --git a/src/roster_window.py b/src/roster_window.py index c9c871bdb..0ab8e6ac3 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3217,6 +3217,9 @@ class RosterWindow: ctrl.account, ctrl.type_id) ctrl.parent_win = mw ctrl.set_tooltip() + id_ = mw.window.connect('motion-notify-event', + self._on_window_motion_notify) + self.handlers[id_] = mw.window mw.new_tab(ctrl) mw.set_active_tab(ctrl) mw.window.get_window().focus(Gtk.get_current_event_time())
  34. colby hello. i'm using the latest gajim release on windows, and was curious if anyone could help me with something. i am trying to create a little bit of space between each message sent and received so that in the chat window, it doesn't appear so close together. i'm not sure if this feature already exists and i am just unable to locate it or if a plugin would have to be made, etc. appreciate any assistance anyone could offer.
  35. Link Mauve colby, I think once the move to CSS is complete, it should become easy to do so.
  36. colby oh ok, that would be cool. i really like gajim and have been looking for a replacement to pidgin for some time now.
  37. lovetox colby of course it can be done, but gajim has no easy accesable interface for something like that
  38. lovetox you could make the font bigger?
  39. lovetox maybe then it doesnt look so thight
  40. colby lovetox, tried making font larger and smaller, but haven't really hit the desired effect yet.
  41. lovetox Link Mauve, the only thing i wonder
  42. lovetox when we add it to self.handlers in the roster window
  43. Link Mauve Maybe we should also remove it on minimize?
  44. lovetox no you dont have to
  45. lovetox the window is not destroyed on minimize
  46. lovetox and there will be no events
  47. Link Mauve lovetox, but when it gets maximised again, it will get twice as many events?
  48. lovetox you should only connect to event when there is parent win not set
  49. Link Mauve Ah, so before setting it.
  50. Link Mauve Hmm, no, that won’t fix it.
  51. Link Mauve Or will it?
  52. Link Mauve Is parent_win None whenever the groupchat is minimised?
  53. Link Mauve If so, it will indeed add a new event handler everytime.
  54. lovetox no, a chatcontrol without a window is only created
  55. lovetox when we start gajim and the groupchat is on autojoin+minimized
  56. lovetox once you click it
  57. Link Mauve It creates the parent_win.
  58. lovetox a window is created and connected to the chatcontrol
  59. lovetox and its stays as long as the groupchat is joined
  60. Link Mauve But then if we minimise it again, and maximise it again, it will use the same window right?
  61. Link Mauve It does?
  62. lovetox it doest matter if you mimimize again
  63. Link Mauve Ok.
  64. Link Mauve So here is my new diff: diff --git a/src/chat_control_base.py b/src/chat_control_base.py index 1d35a6333..1b461caaf 100644 --- a/src/chat_control_base.py +++ b/src/chat_control_base.py @@ -386,13 +386,14 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): # chatstate timers and state self.reset_kbd_mouse_timeout_vars() self._schedule_activity_timers() - id_ = parent_win.window.connect('motion-notify-event', - self._on_window_motion_notify) - self.handlers[id_] = parent_win.window message_tv_buffer = self.msg_textview.get_buffer() id_ = message_tv_buffer.connect('changed', self._on_message_tv_buffer_changed) self.handlers[id_] = message_tv_buffer + if parent_win is not None: + id_ = parent_win.window.connect('motion-notify-event', + self._on_window_motion_notify) + self.handlers[id_] = parent_win.window # PluginSystem: adding GUI extension point for ChatControlBase # instance object (also subclasses, eg. ChatControl or GroupchatControl) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index cd62bb54a..facef7ece 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -343,7 +343,7 @@ class GroupchatControl(ChatControlBase): img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) self.current_tooltip = None - if parent_win: + if parent_win is not None: # On AutoJoin with minimize Groupchats are created without parent # Tooltip Window has to be created with parent self.set_tooltip() diff --git a/src/roster_window.py b/src/roster_window.py index c9c871bdb..a32cc7c54 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3215,6 +3215,10 @@ class RosterWindow: if not mw: mw = gajim.interface.msg_win_mgr.create_window(ctrl.contact, ctrl.account, ctrl.type_id) + if ctrl.parent_win is None: + id_ = mw.window.connect('motion-notify-event', + self._on_window_motion_notify) + self.handlers[id_] = mw.window ctrl.parent_win = mw ctrl.set_tooltip() mw.new_tab(ctrl)
  65. lovetox the window is not destroyed on minimize
  66. Link Mauve Ok, perfect. :)
  67. Link Mauve If you agree I’ll squash that in the previous patch.
  68. lovetox i dont think adding something to self.handlers in roster_window does something
  69. lovetox self.handlers only exists in chatcontrol
  70. Link Mauve Oh woops.
  71. Link Mauve diff --git a/src/chat_control_base.py b/src/chat_control_base.py index 1d35a6333..1b461caaf 100644 --- a/src/chat_control_base.py +++ b/src/chat_control_base.py @@ -386,13 +386,14 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): # chatstate timers and state self.reset_kbd_mouse_timeout_vars() self._schedule_activity_timers() - id_ = parent_win.window.connect('motion-notify-event', - self._on_window_motion_notify) - self.handlers[id_] = parent_win.window message_tv_buffer = self.msg_textview.get_buffer() id_ = message_tv_buffer.connect('changed', self._on_message_tv_buffer_changed) self.handlers[id_] = message_tv_buffer + if parent_win is not None: + id_ = parent_win.window.connect('motion-notify-event', + self._on_window_motion_notify) + self.handlers[id_] = parent_win.window # PluginSystem: adding GUI extension point for ChatControlBase # instance object (also subclasses, eg. ChatControl or GroupchatControl) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index cd62bb54a..facef7ece 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -343,7 +343,7 @@ class GroupchatControl(ChatControlBase): img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) self.current_tooltip = None - if parent_win: + if parent_win is not None: # On AutoJoin with minimize Groupchats are created without parent # Tooltip Window has to be created with parent self.set_tooltip() diff --git a/src/roster_window.py b/src/roster_window.py index c9c871bdb..622ee9aa1 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3215,6 +3215,10 @@ class RosterWindow: if not mw: mw = gajim.interface.msg_win_mgr.create_window(ctrl.contact, ctrl.account, ctrl.type_id) + if ctrl.parent_win is None: + id_ = mw.window.connect('motion-notify-event', + ctrl._on_window_motion_notify) + ctrl.handlers[id_] = mw.window ctrl.parent_win = mw ctrl.set_tooltip() mw.new_tab(ctrl)
  72. lovetox ok give me a moment
  73. lovetox hm yes should work like that
  74. Link Mauve I tested, and couldn’t reproduce Asterix’ issue. :)
  75. Link Mauve There, force-pushed.
  76. lovetox damn its even more complicated
  77. lovetox the window gets destroyed when we are not in single window mode ..
  78. lovetox Link Mauve, but solutions i easy i think
  79. lovetox just move your code into the "if not mw:" block
  80. lovetox so when there is no window, we connect after creation
  81. lovetox if there is, we do nothing
  82. Link Mauve Yeah, that’s what I was asking about minimise.
  83. lovetox yeah i didnt think gajim would handle it differently for single window mode, but it makes sense, as it is a single window
  84. lovetox so it does never get destroyed
  85. Link Mauve lovetox, wouldn’t that always crash, btw?
  86. Link Mauve There is a “if not mw:”, followed by mw.new_tab(ctrl).
  87. Link Mauve Is it even possible for bool(mw) to evaluate to False there?
  88. lovetox of course, we get the mw, with the get_window(jid) method
  89. lovetox it returns none probably
  90. lovetox if there is none
  91. Link Mauve But then it crashes three lines later.
  92. Link Mauve At 3224.
  93. lovetox no because if not mw, it is folled by create window
  94. lovetox at least for me?
  95. Link Mauve Oh, right.
  96. Link Mauve Oh, I see now.
  97. Link Mauve Should I also remove the “if ctrl.parent_win is None:” from there?
  98. lovetox yeah you dont need that anymore
  99. lovetox because now we only connect after creating,
  100. lovetox so its always necessary to connect
  101. lovetox because its definitly a new window
  102. Link Mauve Ok.
  103. Link Mauve There, force-pushed again.
  104. lovetox ok i will test now :)
  105. lovetox i really have to add a way to hide streammanagement stanzas from the xml console
  106. lovetox probably by default
  107. lovetox Link Mauve, ok looks good your MR
  108. lovetox the only thing i ask myself is, should we send "gone" at some point
  109. lovetox cause now we dont
  110. lovetox atleast in mUC
  111. Link Mauve lovetox, no, it’s illegal as per the XEP.
  112. lovetox ah good to know
  113. Link Mauve You are only gone when you send an unavailable presence.
  114. lovetox k then i merge this now
  115. lovetox thanks
  116. Link Mauve Great!
  117. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim_ <https://dev.gajim.org/gajim/gajim>: *f6739730* <https://dev.gajim.org/gajim/gajim/commit/f6739730afa1ba7396837169053abc292caab14b> Implement chatstate in MUC, as defined in XEP-0085 §5.5. *a1565040* <https://dev.gajim.org/gajim/gajim/commit/a1565040bd8ac910453492295f8703def9b82095> Merge branch 'muc-chatstate' into 'master' Implement chatstate in MUC, as defined in XEP-0085 §5.5 See merge request !11
  118. librejoker Hi folks, I just updated to latest ubuntu 17.04 and now in Gajim with omemo I don't get to view img anymore. Instead I get the link starting with aesgcm:// I'm pretty shure this worked pre- updating. I've "url image preview" and "httpUpload" installed. Can't figure out what the problem is :S
  119. lovetox has nothing to do with gajim
  120. lovetox thats the new way conversations sends it links
  121. lovetox if you use the newest plugin version
  122. lovetox you can just click the link and it will download
  123. lovetox or at least it should i never tried it
  124. lovetox if you want inline preview, you have to wait for the next pluginversion of url image preview that supports the new way
  125. lovetox librejoker,
  126. librejoker oh okay, thanks i really thought this was working properly the day before might investigate it further
  127. lovetox it might, it depends what version of conversations you have installed
  128. lovetox its a recent change
  129. librejoker Right, I updated Conversatons recently. Hmm well, I guess I have to be patient then.
  130. lovetox but can you download and decrypt the picture when clicking on the link?
  131. librejoker no the link is not clickable
  132. lovetox what version of the gajim-omemo plugin are you using
  133. lovetox ah i know why
  134. lovetox go to the advanced config editor in gajim
  135. lovetox and look for "ur_schemes"
  136. lovetox add "aesgcm://"
  137. lovetox restart gajim
  138. lovetox afterwards it should work
  139. lovetox to click the link