Commit 92af78f1 authored by Philipp Hörist's avatar Philipp Hörist

Move history window into gtk folder

- fix some pep8 warnings
parent 043e7648
...@@ -24,7 +24,6 @@ from gajim import dialogs ...@@ -24,7 +24,6 @@ from gajim import dialogs
from gajim.gtk import shortcuts_window from gajim.gtk import shortcuts_window
from gajim import accounts_window from gajim import accounts_window
import gajim.plugins.gui import gajim.plugins.gui
from gajim import history_window
from gajim import disco from gajim import disco
from gajim.gtk.history_sync import HistorySyncAssistant from gajim.gtk.history_sync import HistorySyncAssistant
from gajim.gtk.server_info import ServerInfoDialog from gajim.gtk.server_info import ServerInfoDialog
...@@ -39,6 +38,7 @@ from gajim.gtk import PrivacyListsWindow ...@@ -39,6 +38,7 @@ from gajim.gtk import PrivacyListsWindow
from gajim.gtk import ManageBookmarksWindow from gajim.gtk import ManageBookmarksWindow
from gajim.gtk import FeaturesDialog from gajim.gtk import FeaturesDialog
from gajim.gtk import AccountCreationWizard from gajim.gtk import AccountCreationWizard
from gajim.gtk import HistoryWindow
# General Actions # General Actions
...@@ -305,8 +305,7 @@ def on_history(action, param): ...@@ -305,8 +305,7 @@ def on_history(action, param):
if 'logs' in interface.instances: if 'logs' in interface.instances:
interface.instances['logs'].window.present() interface.instances['logs'].window.present()
else: else:
interface.instances['logs'] = history_window.\ interface.instances['logs'] = HistoryWindow()
HistoryWindow()
def on_open_event(action, param): def on_open_event(action, param):
......
...@@ -38,7 +38,6 @@ from gi.repository import Gio ...@@ -38,7 +38,6 @@ from gi.repository import Gio
from gajim import gtkgui_helpers from gajim import gtkgui_helpers
from gajim import message_control from gajim import message_control
from gajim.gtk import NonModalConfirmationDialog from gajim.gtk import NonModalConfirmationDialog
from gajim import history_window
from gajim import notify from gajim import notify
import re import re
...@@ -432,8 +431,8 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): ...@@ -432,8 +431,8 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
app.interface.instances['logs'].window.present() app.interface.instances['logs'].window.present()
app.interface.instances['logs'].open_history(jid, self.account) app.interface.instances['logs'].open_history(jid, self.account)
else: else:
app.interface.instances['logs'] = \ from gajim.gtk import HistoryWindow
history_window.HistoryWindow(jid, self.account) app.interface.instances['logs'] = HistoryWindow(jid, self.account)
def change_encryption(self, action, param): def change_encryption(self, action, param):
encryption = param.get_string() encryption = param.get_string()
...@@ -1119,8 +1118,8 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): ...@@ -1119,8 +1118,8 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
app.interface.instances['logs'].window.present() app.interface.instances['logs'].window.present()
app.interface.instances['logs'].open_history(jid, self.account) app.interface.instances['logs'].open_history(jid, self.account)
else: else:
app.interface.instances['logs'] = \ from gajim.gtk import HistoryWindow
history_window.HistoryWindow(jid, self.account) app.interface.instances['logs'] = HistoryWindow(jid, self.account)
def _on_send_file(self, action, param): def _on_send_file(self, action, param):
# get file transfer preference # get file transfer preference
......
...@@ -67,3 +67,4 @@ from gajim.gtk.profile import ProfileWindow ...@@ -67,3 +67,4 @@ from gajim.gtk.profile import ProfileWindow
from gajim.gtk.features import FeaturesDialog from gajim.gtk.features import FeaturesDialog
from gajim.gtk.account_wizard import AccountCreationWizard from gajim.gtk.account_wizard import AccountCreationWizard
from gajim.gtk.service_registration import ServiceRegistration from gajim.gtk.service_registration import ServiceRegistration
from gajim.gtk.history import HistoryWindow
...@@ -203,3 +203,11 @@ def get_image_button(icon_name, tooltip, toggle=False): ...@@ -203,3 +203,11 @@ def get_image_button(icon_name, tooltip, toggle=False):
icon_name, Gtk.IconSize.MENU) icon_name, Gtk.IconSize.MENU)
button.set_tooltip_text(tooltip) button.set_tooltip_text(tooltip)
return button return button
def python_month(month):
return month + 1
def gtk_month(month):
return month - 1
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
## NOTE: some method names may match those of logger.py but that's it ## NOTE: some method names may match those of logger.py but that's it
## someday (TM) should have common class ## someday (TM) should have common class
## that abstracts db connections and helpers on it ## that abstracts db connections and helpers on it
## the same can be said for history_window.py ## the same can be said for history.py
import os import os
import sys import sys
......
...@@ -47,7 +47,6 @@ import logging ...@@ -47,7 +47,6 @@ import logging
from enum import IntEnum, unique from enum import IntEnum, unique
from gajim import history_window
from gajim import dialogs from gajim import dialogs
from gajim import vcard from gajim import vcard
from gajim import config from gajim import config
...@@ -72,6 +71,7 @@ from gajim.gtk import ManagePEPServicesWindow ...@@ -72,6 +71,7 @@ from gajim.gtk import ManagePEPServicesWindow
from gajim.gtk import ManageBookmarksWindow from gajim.gtk import ManageBookmarksWindow
from gajim.gtk import AccountCreationWizard from gajim.gtk import AccountCreationWizard
from gajim.gtk import ServiceRegistration from gajim.gtk import ServiceRegistration
from gajim.gtk import HistoryWindow
from gajim.common.const import AvatarSize from gajim.common.const import AvatarSize
...@@ -3047,8 +3047,7 @@ class RosterWindow: ...@@ -3047,8 +3047,7 @@ class RosterWindow:
app.interface.instances['logs'].window.present() app.interface.instances['logs'].window.present()
app.interface.instances['logs'].open_history(contact.jid, account) app.interface.instances['logs'].open_history(contact.jid, account)
else: else:
app.interface.instances['logs'] = history_window.\ app.interface.instances['logs'] = HistoryWindow(contact.jid, account)
HistoryWindow(contact.jid, account)
def on_disconnect(self, widget, jid, account): def on_disconnect(self, widget, jid, account):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment