Gajim - 2017-12-14

  1. marc What is the best way to pass nickname and group parameter to AddNewContactDialog via activate_action() ?
  2. bot Klement Sekera created an issue in _gajim_ <>: #8799: <A programming error has been detected>
  3. bot Klement Sekera modified an issue in _gajim_ <>: #8799: <A programming error has been detected>
  4. bot Vivia Nikolaidou created an issue in _gajim_ <>: #8800: <AttributeError: 'module' object has no attribute 'load_file'>
  5. bot Vivia Nikolaidou closed an issue in _gajim_ <>: #8800: <AttributeError: 'module' object has no attribute 'load_file'>
  6. lovetox marc, why would pass a nickname?
  7. lovetox marc, why would you pass a nickname?
  8. lovetox you can use the action, but it supports right now only one argument the jid, to make it accept more you have to change the passed var type from string to a dict
  9. lovetox its probably easier for now you just call dialogs.AddNewContactWindow() and pass the nickname
  10. marc lovetox, I'm working on proper URI handling
  11. lovetox yeah but why would you pass a nick
  12. lovetox we have xeps that publish a nick to pubsub
  13. lovetox no need to pass it via uri
  14. lovetox
  15. lovetox and also in the presence
  16. marc lovetox, ?roster;name=Nickname;group=Groupname
  17. marc nickname is roster name
  18. lovetox whats the use case
  19. lovetox i guess there is one somewhere :)
  20. lovetox either way, roster uri is handled, and action is called, you just have to adapt the action to take a string dicts
  21. lovetox you can see how this is done in the bookmark action
  22. marc lovetox, just using the roster and group name if they're provided ;)
  23. concerto lovetox: did that xmpp: URI MR get through? (or is that what is being discussed right now? ._.)
  24. lovetox yes thats merged
  25. concerto lovetox: yay! So can one test it in tomorrow's nightly?
  26. marc lovetox, okay, will change it to a dict
  27. lovetox you can also test it in todays,
  28. concerto cool!
  29. lovetox marc you cant pass None in the dict just for info
  30. lovetox if you decide the dict has 3 keys, all 3 need to be strings
  31. marc oh, that's ugly
  32. marc lovetox, it is possible to use multiple parameters?
  33. lovetox no
  34. marc uff, too bad
  35. lovetox GLib.VariantType
  36. lovetox
  37. lovetox the passed arg has to be of that type
  38. lovetox its pretty complicated stuff sadly for just passing stuff
  39. lovetox there is a maybe type, which indicates that a arg is maybe not passed, but its not supported by the glib bindings
  40. lovetox *python glib bindings
  41. lovetox also the change exist that i did not fully understand all that :)
  42. lovetox i think you can pass multiple args, but every arg has to be supplied and can not be None
  43. concerto lovetox: running v20171214-1, clicking doesn't seem to do anything (after I select Gajim from the link handler)
  44. concerto lovetox: running v20171214-1, clicking in the browser (e.g. ) doesn't seem to do anything (after I select Gajim from the link handler)
  45. bot Daniel proposed a new merge request for _gajim-plugins/master_ <>: [OMEMO] Make some strings translatable
  46. concerto It works if I click it in Gajim itself.
  47. marc lovetox, thanks, will test it later!
  48. concerto I'm running Cinnamon on Debian Stable FWIW
  49. concerto Browser is Firefox v52.5
  50. marc concerto, it doesn't work with Firefox?
  51. concerto marc: yeah, it seems
  52. concerto Let me try another browser.
  53. marc concerto, probably because it need to configured properly. Most distros use gajim-remote to handle URIs
  54. marc this needs to be changed
  55. ThibG hm, gajim is doing something extremely weird
  56. ThibG If I'm in a specific MUC tab, whenever the window gets the focus, some full-width black bar appears under the last message, varies in size before disappearing, making the whole textarea “bounce”
  57. marc lovetox, hehe, it seems that's not possible to pass other types then string :>
  58. marc +it
  59. marc Oh no, seems to work
  60. cippaciong lovetox, hi :)
  61. cippaciong Hi think you forgot to tag the latest releases of omemo
  62. cippaciong In the gtk3 branch I mean
  63. marc lovetox, atm you access widgets of a dialog directly (e.g. dialog.widget.set_text()). Is this just a quick hack or is this intended?
  64. concerto marc: I don't understand...what's gajim-remote?
  65. concerto And what needs to be configured?
  66. marc concerto, gajim-remote is a small tool to control gajim via DBus
  67. marc concerto, usually your system handles URIs
  68. marc you need to configure how to handle URIs with the scheme "xmpp", for example
  69. concerto marc: I get a window asking me how to handle xmpp links, and it lists Gajim, but when I select that, nothing happens. OTOH when I click the link in Gajim, I get a dialog to join a conference.
  70. concerto So maybe there's some other problem? o.o
  71. marc concerto, hard to debug without debug output ;) just can test it manually by executing gajim "xmpp:..." from the shell
  72. concerto marc: okay, I'll try one of those tomorrow - must sleep now, thanks for the help!
  73. marc concerto, welcome
  74. lovetox hm i look into a few testcases for the uri handler
  75. lovetox marc you dont need gajim-remote anymore for that in current master
  76. lovetox also not dbus, gajim just handles this itself now
  77. marc lovetox, I know :)
  78. marc lovetox, so what's the way to access widgets or variables of a dialog... getter/setter or direct access?
  79. lovetox depends :D
  80. lovetox widget is GTK Code
  81. lovetox GTK is C
  82. lovetox you have getter and setter for everything
  83. lovetox so use them
  84. lovetox variables are python, you should access them directly
  85. lovetox for widget methods see
  86. marc lovetox, for example, I want to change the value of a textedit widget in a Gajim Dialog
  87. marc lovetox, I'm familar with Python, Gtk etc. ;)
  88. lovetox whats a textedit?
  89. marc text entry widget
  90. lovetox then you use the methods that gtk provides through bindings
  91. lovetox
  92. marc lovetox, yes, of course. simple question: how do you access variables of your dialogs? directly via dialog.variable = value or dialog.set_variable(value)?
  93. marc It seems you don't use getter/setter declarations for variables, right?
  94. lovetox no because thats not pythonic
  95. lovetox you can just do dialog.variable
  96. marc @varable.setter and @propery are pythonic :)
  97. lovetox so what do we gain with that?
  98. marc handling of invalid values (setter)
  99. lovetox are you talking about validating user input?
  100. marc yes, for example
  101. marc however, I'll just access dialog variables as you do :)
  102. marc btw, the start chat dialog is nice
  103. lovetox marc, dont get me wrong, im not an experienced python developer, i do this maybe a year
  104. marc but disabled accounts shouldn't be displayed since they can not be used anyway :D
  105. lovetox if you think there is a better way to do something, just show it and we discuss it
  106. lovetox validating user input has to happen of course, but validating non user input is not really necessary as Gajim is not some library that other people will use
  107. lovetox startchat: it doesnt show disabled accounts for me
  108. lovetox are you sure?!
  109. marc well, not connected accounts
  110. marc sorry
  111. lovetox yes thats intentional
  112. lovetox although i forgot the reason let me look
  113. lovetox if the discussion is still about handling uris
  114. lovetox the input should be validated before we call the dialog
  115. lovetox in my opinion
  116. lovetox and show a error dialog instead
  117. lovetox the reason for showing offline accounts was, although the window is called start chat, its more like a jump too window
  118. lovetox its a easy way to open the conversation with a contact
  119. lovetox for example you want to see what your friend wrote last
  120. lovetox then you also want to have offline contacts in there
  121. lovetox ThibG, yes i have that problem too, i have to look why it does that, pretty annoying
  122. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ <>: *4009625e* <> Catch invalid URIs
  123. lovetox concerto, hm try with tomorrows nightly, i added debug output, start with "-l gajim.uri_handler=INFO"
  124. lovetox so we can see if the uris reach gajim
  125. debacle Wishlist: "Server Info" (Accounts -> account -> Advanced -> Server Info) should be possible to copy as text. I like to inform a server admin about what Gajim tells me and I have to type it all or - shudder - make a screenshot.
  126. lovetox how about a button that puts it into your clipboard?
  127. Tschaeggaer hey. can i somehow configure, how many missed messages in a MUC (via MAM) are retrieved when i go online? because i wanna have _all_ the the messages in some channels, even when there are quite a lot.
  128. Tschaeggaer nvm, i found "restore_lines". that's probably it. correct if i am wrong.
  129. lovetox you are wrong
  130. Tschaeggaer damn. :D
  131. lovetox if you first join a muc with MAM
  132. lovetox only 1 day is requested back
  133. lovetox but from that moment on, everything is requested back to the first day you joined, if you join again
  134. Tschaeggaer that's okay. for me, only after joining is relevant.
  135. lovetox at least thats how i planned it, maybe there are still bugs with that
  136. Tschaeggaer ah ok thanks. i'll test it.
  137. lovetox so once you joined a muc, you should never miss a message from that point on
  138. debacle lovetox, a button for clipboard would be perfect!
  139. lovetox but how would the format look like?
  140. lovetox found MAM mam:2
  141. lovetox not found httpupload
  142. lovetox or something like that
  143. debacle lovetox, pure UTF-8 text, newline-separated lines, very simple
  144. lovetox yeah i mean what data do you want in there
  145. lovetox because for example "Not found MAM"
  146. lovetox does not mean the server does not have mam
  147. lovetox it just means maybe not a version supported by current gajim
  148. debacle well, at least is should be the same info as in the box
  149. debacle if there is more detailed information, the better
  150. Tschaeggaer print_status_in_muc should be "none" by default
  151. Tschaeggaer it's really annoying, especially in MUCs and i don't think the average user needs it.
  152. lovetox yes its noted, with redesign of the chatcontrol, we can make a button to show and hide fast :)
  153. therob ThibG: the jumping space under the last message I also see frequently - but i think not only in mucs...
  154. Tschaeggaer cool. (Y)