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
from gajim.gtk import shortcuts_window
from gajim import accounts_window
import gajim.plugins.gui
from gajim import history_window
from gajim import disco
from gajim.gtk.history_sync import HistorySyncAssistant
from gajim.gtk.server_info import ServerInfoDialog
......@@ -39,6 +38,7 @@ from gajim.gtk import PrivacyListsWindow
from gajim.gtk import ManageBookmarksWindow
from gajim.gtk import FeaturesDialog
from gajim.gtk import AccountCreationWizard
from gajim.gtk import HistoryWindow
# General Actions
......@@ -305,8 +305,7 @@ def on_history(action, param):
if 'logs' in interface.instances:
interface.instances['logs'].window.present()
else:
interface.instances['logs'] = history_window.\
HistoryWindow()
interface.instances['logs'] = HistoryWindow()
def on_open_event(action, param):
......
......@@ -38,7 +38,6 @@ from gi.repository import Gio
from gajim import gtkgui_helpers
from gajim import message_control
from gajim.gtk import NonModalConfirmationDialog
from gajim import history_window
from gajim import notify
import re
......@@ -432,8 +431,8 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
app.interface.instances['logs'].window.present()
app.interface.instances['logs'].open_history(jid, self.account)
else:
app.interface.instances['logs'] = \
history_window.HistoryWindow(jid, self.account)
from gajim.gtk import HistoryWindow
app.interface.instances['logs'] = HistoryWindow(jid, self.account)
def change_encryption(self, action, param):
encryption = param.get_string()
......@@ -1119,8 +1118,8 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
app.interface.instances['logs'].window.present()
app.interface.instances['logs'].open_history(jid, self.account)
else:
app.interface.instances['logs'] = \
history_window.HistoryWindow(jid, self.account)
from gajim.gtk import HistoryWindow
app.interface.instances['logs'] = HistoryWindow(jid, self.account)
def _on_send_file(self, action, param):
# get file transfer preference
......
......@@ -67,3 +67,4 @@ from gajim.gtk.profile import ProfileWindow
from gajim.gtk.features import FeaturesDialog
from gajim.gtk.account_wizard import AccountCreationWizard
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):
icon_name, Gtk.IconSize.MENU)
button.set_tooltip_text(tooltip)
return button
def python_month(month):
return month + 1
def gtk_month(month):
return month - 1
......@@ -27,7 +27,7 @@
## NOTE: some method names may match those of logger.py but that's it
## someday (TM) should have common class
## 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 sys
......
......@@ -47,7 +47,6 @@ import logging
from enum import IntEnum, unique
from gajim import history_window
from gajim import dialogs
from gajim import vcard
from gajim import config
......@@ -72,6 +71,7 @@ from gajim.gtk import ManagePEPServicesWindow
from gajim.gtk import ManageBookmarksWindow
from gajim.gtk import AccountCreationWizard
from gajim.gtk import ServiceRegistration
from gajim.gtk import HistoryWindow
from gajim.common.const import AvatarSize
......@@ -3047,8 +3047,7 @@ class RosterWindow:
app.interface.instances['logs'].window.present()
app.interface.instances['logs'].open_history(contact.jid, account)
else:
app.interface.instances['logs'] = history_window.\
HistoryWindow(contact.jid, account)
app.interface.instances['logs'] = HistoryWindow(contact.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