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


Commits:
ba2f930b by wurstsalat at 2022-08-15T17:00:53+02:00
imprv: AccountPage: Add button for Ad-Hoc commands

- - - - -


2 changed files:

- gajim/data/gui/account_page.ui
- gajim/gtk/account_page.py


Changes:

=====================================
gajim/data/gui/account_page.ui
=====================================
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface>
   <requires lib="gtk+" version="3.24"/>
   <object class="GtkPaned" id="paned">
@@ -207,7 +207,7 @@
                     <property name="halign">center</property>
                     <property name="spacing">12</property>
                     <child>
-                      <object class="GtkButton" id="account_settings">
+                      <object class="GtkButton">
                         <property name="visible">True</property>
                         <property name="can-focus">True</property>
                         <property name="receives-default">True</property>
@@ -228,6 +228,27 @@
                         <property name="position">0</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkButton">
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">True</property>
+                        <property name="tooltip-text" 
translatable="yes">Ad-Hoc Commands…</property>
+                        <signal name="clicked" handler="_on_adhoc_commands" 
swapped="no"/>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
+                            <property 
name="icon-name">utilities-terminal-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                     <child>
                       <placeholder/>
                     </child>


=====================================
gajim/gtk/account_page.py
=====================================
@@ -18,6 +18,8 @@
 from gi.repository import Gio
 from gi.repository import Gtk
 
+from nbxmpp.protocol import JID
+
 from gajim.common import app
 from gajim.common import ged
 from gajim.common.const import AvatarSize
@@ -103,6 +105,10 @@ def _on_account_settings(self, _button: Gtk.Button) -> 
None:
         window = open_window('AccountsWindow')
         window.select_account(self._account)
 
+    def _on_adhoc_commands(self, _button: Gtk.Button) -> None:
+        server_jid = JID.from_string(self._jid).domain
+        open_window('AdHocCommands', account=self._account, jid=server_jid)
+
     def _on_search_changed(self, widget: Gtk.SearchEntry) -> None:
         text = widget.get_text().lower()
         self._roster.set_search_string(text)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ba2f930b9c241b265fb24bc68ad692e04eb2c61c

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ba2f930b9c241b265fb24bc68ad692e04eb2c61c
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