removing future imports

not more needed since guake only supports Python 2

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
Gaetan Semet 2018-01-14 16:35:18 +01:00
parent b70c439f7c
commit 39b21bf6af
16 changed files with 16 additions and 113 deletions

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import pbr.version

View File

@ -18,7 +18,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
import gi
gi.require_version('Gtk', '3.0')

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import gettext
import os
@ -39,11 +35,11 @@ _ = gettext.gettext
__all__ = [
'_',
'ShowableError',
'pixmapfile',
'get_binaries_from_path',
'gladefile',
'hexify_color',
'get_binaries_from_path',
'pixmapfile',
'ShowableError',
]

View File

@ -17,7 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
import dbus
import dbus.glib

View File

@ -17,7 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
import inspect
import os
@ -25,8 +24,8 @@ import os
import guake
__all__ = [
'NAME', 'VERSION', 'IMAGE_DIR', 'GLADE_DIR', 'SCHEMA_DIR', 'LOCALE_DIR', 'GCONF_PATH', 'KEY',
'ALIGN_CENTER', 'ALIGN_RIGHT', 'ALIGN_LEFT', 'ALIGN_TOP', 'ALIGN_BOTTOM', 'ALWAYS_ON_PRIMARY'
'NAME', 'VERSION', 'IMAGE_DIR', 'GLADE_DIR', 'SCHEMA_DIR', 'LOCALE_DIR', 'ALIGN_CENTER',
'ALIGN_RIGHT', 'ALIGN_LEFT', 'ALIGN_TOP', 'ALIGN_BOTTOM', 'ALWAYS_ON_PRIMARY'
]
@ -45,27 +44,6 @@ GLADE_DIR = os.path.join(SRC_DIR, 'data')
SCHEMA_DIR = os.path.join(SRC_DIR, 'data')
LOCALE_DIR = "/usr/share/locale"
# TODO port dead!?
# Gconf stuff. Yep, it is hardcoded =)
GCONF_PATH = '/apps/guake'
def KEY(x):
return (GCONF_PATH + x)
# Stuff used to build the treeview that will allow the user to change
# keybindings in the preferences window.
def LKEY(x):
return GCONF_PATH + '/keybindings/local/' + x
def GKEY(x):
return GCONF_PATH + '/keybindings/global/' + x
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT = range(3)
ALIGN_TOP, ALIGN_BOTTOM = range(2)
ALWAYS_ON_PRIMARY = -1

View File

@ -17,19 +17,15 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Vte', '2.91') # vte-0.38
from gi.repository import Vte
from gi.repository import Gdk
from gi.repository import Gtk
from gi.repository import Pango
from gi.repository import Vte
import logging
import subprocess
@ -40,10 +36,6 @@ import guake.notifier
from guake.common import _
from guake.common import pixmapfile
from guake.globals import GCONF_PATH
from guake.globals import GKEY
from guake.globals import KEY
from guake.globals import LKEY
GCONF_MONOSPACE_FONT_PATH = '/desktop/gnome/interface/monospace_font_name'
DCONF_MONOSPACE_FONT_PATH = 'org.gnome.desktop.interface'
@ -65,18 +57,6 @@ class GSettingHandler(object):
self.guake = guake_inst
self.settings = guake_inst.settings
settings = self.settings
# TODO PORT do we need this to be ported?
# client.add_dir(GCONF_PATH, gconf.CLIENT_PRELOAD_RECURSIVE)
# these keys does not need to be watched.
# notify_add(KEY('/general/default_shell'), self.shell_changed)
# notify_add(KEY('/general/use_login_shell'), self.login_shell_toggled)
# notify_add(KEY('/general/use_popup'), self.popup_toggled)
# notify_add(KEY('/general/window_losefocus'), self.losefocus_toggled)
# notify_add(KEY('/general/use_vte_titles'), self.use_vte_titles_changed)
# notify_add(KEY('/general/quick_open_enable'), self.on_quick_open_enable_changed)
# notify_add(KEY('/general/quick_open_in_current_terminal'),
# self.on_quick_open_in_current_terminal_changed)
# Notification is not required for mouse_display/display_n because
# set_final_window_rect polls gconf and is called whenever Guake is

View File

@ -18,9 +18,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gi
gi.require_version('Gtk', '3.0')
@ -36,27 +33,17 @@ from gi.repository import Gtk
from gi.repository import Keybinder
from gi.repository import Vte
# import gconf
import json
import logging
import os
import platform
# import pygtk
# needed for execute_hook
import subprocess
# needed for sys.stderr.write(...)
import sys
# needed for execute_hook
import traceback
# import uuid
# import xdg.Exceptions
import cairo
from urllib.parse import quote_plus
# from urllib import url2pathname
# from urlparse import urlsplit
# from xdg.DesktopEntry import DesktopEntry
from xml.sax.saxutils import escape as xml_escape
from guake import notifier
@ -64,19 +51,14 @@ from guake.about import AboutDialog
from guake.common import _
from guake.common import gladefile
from guake.common import pixmapfile
# from guake.common import shell_quote
# from guake.gconfhandler import GConfHandler
# from guake.gconfhandler import GConfKeyHandler
from guake.globals import ALIGN_BOTTOM
from guake.globals import ALIGN_CENTER
from guake.globals import ALIGN_LEFT
from guake.globals import ALIGN_RIGHT
from guake.globals import ALWAYS_ON_PRIMARY
from guake.globals import SCHEMA_DIR
# from guake.globals import GKEY
# from guake.globals import KEY
from guake.globals import LOCALE_DIR
from guake.globals import NAME
from guake.globals import SCHEMA_DIR
from guake.gsettings import GSettingHandler
from guake.guake_logging import setupLogging
from guake.guake_notebook import GuakeNotebook
@ -87,8 +69,6 @@ from guake.simplegladeapp import SimpleGladeApp
from guake.simplegladeapp import bindtextdomain
from guake.terminal import GuakeTerminalBox
log = logging.getLogger(__name__)
libutempter = None
try:
# this allow to run some commands that requires libuterm to
@ -105,6 +85,8 @@ except Exception as e:
sys.stderr.write("[WARN] The <wall> command will not work in guake !\n")
sys.stderr.write("[WARN] " + str(e) + '\n')
log = logging.getLogger(__name__)
instance = None
RESPONSE_FORWARD = 0
RESPONSE_BACKWARD = 1

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import logging.config

View File

@ -17,9 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import posix

View File

@ -17,6 +17,7 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
import gi
gi.require_version('Gtk', '3.0')

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import gi
gi.require_version('Gtk', '3.0')
@ -38,7 +34,6 @@ from optparse import OptionParser
from guake.common import _
from guake.globals import KEY
from guake.globals import VERSION
from guake.dbusiface import DBUS_NAME

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import gi
gi.require_version('Notify', '0.7')

View File

@ -17,9 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gi
gi.require_version('Gtk', '3.0')

View File

@ -18,9 +18,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gi
gi.require_version('Gtk', '3.0')

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import gi
gi.require_version('Gtk', '3.0')

View File

@ -17,10 +17,6 @@ License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import gi
gi.require_version('Gtk', '3.0')
@ -38,21 +34,23 @@ from guake.common import clamp
from time import sleep
import code
import logging
import os
import re
import uuid
import signal
import subprocess
import threading
log = logging.getLogger(__name__)
import code
def halt(loc):
code.interact(local=loc)
import signal
import subprocess
import threading
# TODO PORT
# __all__ = ['Terminal', 'TerminalBox']