AdHocCommands: move to gtk module
This commit is contained in:
parent
cdeb902fda
commit
95e67ab7c1
|
@ -44,7 +44,6 @@ from gajim import gui_menu_builder
|
||||||
from gajim import message_control
|
from gajim import message_control
|
||||||
from gajim import vcard
|
from gajim import vcard
|
||||||
from gajim import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
from gajim import adhoc_commands
|
|
||||||
|
|
||||||
from gajim.common.const import AvatarSize
|
from gajim.common.const import AvatarSize
|
||||||
from gajim.common.caps_cache import muc_caps_cache
|
from gajim.common.caps_cache import muc_caps_cache
|
||||||
|
@ -76,6 +75,7 @@ from gajim.gtk.filechoosers import AvatarChooserDialog
|
||||||
from gajim.gtk.add_contact import AddNewContactWindow
|
from gajim.gtk.add_contact import AddNewContactWindow
|
||||||
from gajim.gtk.tooltips import GCTooltip
|
from gajim.gtk.tooltips import GCTooltip
|
||||||
from gajim.gtk.groupchat_config import GroupchatConfig
|
from gajim.gtk.groupchat_config import GroupchatConfig
|
||||||
|
from gajim.gtk.adhoc_commands import CommandWindow
|
||||||
from gajim.gtk.util import get_icon_name
|
from gajim.gtk.util import get_icon_name
|
||||||
from gajim.gtk.util import get_image_from_icon_name
|
from gajim.gtk.util import get_image_from_icon_name
|
||||||
|
|
||||||
|
@ -797,7 +797,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
"""
|
"""
|
||||||
Execute AdHoc commands on the current room
|
Execute AdHoc commands on the current room
|
||||||
"""
|
"""
|
||||||
adhoc_commands.CommandWindow(self.account, self.room_jid)
|
CommandWindow(self.account, self.room_jid)
|
||||||
|
|
||||||
def _on_upload_avatar(self, action, param):
|
def _on_upload_avatar(self, action, param):
|
||||||
def _on_accept(filename):
|
def _on_accept(filename):
|
||||||
|
@ -2783,7 +2783,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
def _on_execute_command_occupant(self, widget, nick):
|
def _on_execute_command_occupant(self, widget, nick):
|
||||||
jid = self.room_jid + '/' + nick
|
jid = self.room_jid + '/' + nick
|
||||||
adhoc_commands.CommandWindow(self.account, jid)
|
CommandWindow(self.account, jid)
|
||||||
|
|
||||||
def on_row_activated(self, widget, path):
|
def on_row_activated(self, widget, path):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -29,10 +29,10 @@ from gajim.common.i18n import _
|
||||||
from gajim.common.modules import dataforms
|
from gajim.common.modules import dataforms
|
||||||
from gajim.common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
from gajim import gtkgui_helpers
|
|
||||||
from gajim import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
|
|
||||||
from gajim.gtk.dialogs import HigDialog
|
from gajim.gtk.dialogs import HigDialog
|
||||||
|
from gajim.gtk.util import get_builder
|
||||||
|
|
||||||
|
|
||||||
class CommandWindow:
|
class CommandWindow:
|
||||||
|
@ -68,7 +68,7 @@ class CommandWindow:
|
||||||
self.stage_window_delete_cb = None
|
self.stage_window_delete_cb = None
|
||||||
|
|
||||||
# retrieving widgets from xml
|
# retrieving widgets from xml
|
||||||
self.xml = gtkgui_helpers.get_gtk_builder('adhoc_commands_window.ui')
|
self.xml = get_builder('adhoc_commands_window.ui')
|
||||||
self.window = self.xml.get_object('adhoc_commands_window')
|
self.window = self.xml.get_object('adhoc_commands_window')
|
||||||
self.window.connect('delete-event',
|
self.window.connect('delete-event',
|
||||||
self.on_adhoc_commands_window_delete_event)
|
self.on_adhoc_commands_window_delete_event)
|
|
@ -50,8 +50,6 @@ from gi.repository import Gtk
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
|
|
||||||
from gajim import adhoc_commands
|
|
||||||
|
|
||||||
from gajim.common import app
|
from gajim.common import app
|
||||||
from gajim.common.i18n import _
|
from gajim.common.i18n import _
|
||||||
from gajim.common import helpers
|
from gajim.common import helpers
|
||||||
|
@ -61,6 +59,7 @@ from gajim.gtk.dialogs import ErrorDialog
|
||||||
from gajim.gtk.dialogs import InformationDialog
|
from gajim.gtk.dialogs import InformationDialog
|
||||||
from gajim.gtk.service_registration import ServiceRegistration
|
from gajim.gtk.service_registration import ServiceRegistration
|
||||||
from gajim.gtk.discovery_search import SearchWindow
|
from gajim.gtk.discovery_search import SearchWindow
|
||||||
|
from gajim.gtk.adhoc_commands import CommandWindow
|
||||||
from gajim.gtk.util import icon_exists
|
from gajim.gtk.util import icon_exists
|
||||||
from gajim.gtk.util import get_builder
|
from gajim.gtk.util import get_builder
|
||||||
|
|
||||||
|
@ -1314,7 +1313,7 @@ class ToplevelAgentBrowser(AgentBrowser):
|
||||||
return
|
return
|
||||||
service = model[iter_][0]
|
service = model[iter_][0]
|
||||||
node = model[iter_][1]
|
node = model[iter_][1]
|
||||||
adhoc_commands.CommandWindow(self.account, service, commandnode=node)
|
CommandWindow(self.account, service, commandnode=node)
|
||||||
|
|
||||||
def on_register_button_clicked(self, widget=None):
|
def on_register_button_clicked(self, widget=None):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -50,7 +50,6 @@ from gajim import gtkgui_helpers
|
||||||
from gajim import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
from gajim import cell_renderer_image
|
from gajim import cell_renderer_image
|
||||||
from gajim import message_control
|
from gajim import message_control
|
||||||
from gajim import adhoc_commands
|
|
||||||
|
|
||||||
from gajim.common import app
|
from gajim.common import app
|
||||||
from gajim.common import helpers
|
from gajim.common import helpers
|
||||||
|
@ -82,6 +81,7 @@ from gajim.gtk.discovery import ServiceDiscoveryWindow
|
||||||
from gajim.gtk.history import HistoryWindow
|
from gajim.gtk.history import HistoryWindow
|
||||||
from gajim.gtk.accounts import AccountsWindow
|
from gajim.gtk.accounts import AccountsWindow
|
||||||
from gajim.gtk.tooltips import RosterTooltip
|
from gajim.gtk.tooltips import RosterTooltip
|
||||||
|
from gajim.gtk.adhoc_commands import CommandWindow
|
||||||
from gajim.gtk.util import get_icon_name
|
from gajim.gtk.util import get_icon_name
|
||||||
from gajim.gtk.util import resize_window
|
from gajim.gtk.util import resize_window
|
||||||
from gajim.gtk.util import move_window
|
from gajim.gtk.util import move_window
|
||||||
|
@ -3702,7 +3702,7 @@ class RosterWindow:
|
||||||
jid = contact.jid
|
jid = contact.jid
|
||||||
if resource is not None:
|
if resource is not None:
|
||||||
jid = jid + '/' + resource
|
jid = jid + '/' + resource
|
||||||
adhoc_commands.CommandWindow(account, jid)
|
CommandWindow(account, jid)
|
||||||
|
|
||||||
def on_roster_window_focus_in_event(self, widget, event):
|
def on_roster_window_focus_in_event(self, widget, event):
|
||||||
# roster received focus, so if we had urgency REMOVE IT
|
# roster received focus, so if we had urgency REMOVE IT
|
||||||
|
|
Loading…
Reference in New Issue