Daniel Brötzmann pushed to branch mainwindow at gajim / gajim


Commits:
0375c447 by wurstsalat at 2021-09-11T18:38:22+02:00
Interface: Replace 'show_or_join_groupchat'

- - - - -
5fe98de6 by wurstsalat at 2021-09-11T19:19:38+02:00
AddContact: Make jid public for window management

- - - - -
1f5d3999 by wurstsalat at 2021-09-11T19:45:30+02:00
ChatList: Update unread count when removing row

- - - - -


5 changed files:

- gajim/gtk/add_contact.py
- gajim/gtk/chat_list.py
- gajim/gtk/discovery.py
- gajim/gui_interface.py
- gajim/remote_control.py


Changes:

=====================================
gajim/gtk/add_contact.py
=====================================
@@ -41,7 +41,7 @@ class AddContact(Assistant):
     def __init__(self, account=None, jid=None, nick=None):
         Assistant.__init__(self)
         self.account = account
-        self._jid = jid
+        self.jid = jid
         self._nick = nick
 
         self._result = None


=====================================
gajim/gtk/chat_list.py
=====================================
@@ -248,6 +248,7 @@ def remove_chat(self, account, jid):
         row = self._chats.pop((account, jid))
         self.remove(row)
         row.destroy()
+        self.emit_unread_changed()
 
     def remove_chats_for_account(self, account):
         for row_account, jid in list(self._chats.keys()):


=====================================
gajim/gtk/discovery.py
=====================================
@@ -1357,7 +1357,7 @@ def _on_join_button_clicked(self, widget):
         if not iter_:
             return
         service = model[iter_][0]
-        app.interface.show_or_join_groupchat(self.account, service)
+        app.interface.show_add_join_groupchat(self.account, service)
 
     def update_actions(self):
         if self.execute_button:
@@ -1723,7 +1723,7 @@ def _on_join_button_clicked(self, *args):
         if not iter_:
             return
         service = model[iter_][0]
-        app.interface.show_or_join_groupchat(self.account, service)
+        app.interface.show_add_join_groupchat(self.account, service)
 
     def update_actions(self):
         sens = \


=====================================
gajim/gui_interface.py
=====================================
@@ -1078,10 +1078,12 @@ def create_groupchat(self, account, room_jid, config):
         client = app.get_client(account)
         client.get_module('MUC').create(room_jid, config)
 
-    def show_add_join_groupchat(self, account, jid, nickname=None):
+    def show_add_join_groupchat(self, account, jid, nickname=None,
+                                password=None):
         if not app.window.chat_exists(account, jid):
             client = app.get_client(account)
-            client.get_module('MUC').join(jid, nick=nickname)
+            client.get_module('MUC').join(
+                jid, nick=nickname, password=password)
 
         app.window.add_group_chat(account, str(jid), select=True)
 


=====================================
gajim/remote_control.py
=====================================
@@ -858,9 +858,9 @@ def join_room(self, room_jid, password, account):
             # zeroconf not support groupchats
             return
 
-        app.interface.show_or_join_groupchat(account,
-                                             room_jid,
-                                             password=password)
+        app.interface.show_add_join_groupchat(account,
+                                              room_jid,
+                                              password=password)
 
     def Introspect(self):
         return self.__doc__



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/c8b638ddca8366ef2a93f6fd3f600210547404c9...1f5d3999c6ed4628dd8497ba4e5b154259159f36

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/c8b638ddca8366ef2a93f6fd3f600210547404c9...1f5d3999c6ed4628dd8497ba4e5b154259159f36
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to