From 693e822b3779d695677d5bdc55a6b87e359285a9 Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 1 Feb 2017 17:01:47 +0200 Subject: added tests for capture few tweaks Signed-off-by: imarom --- .../trex_control_plane/stl/console/trex_console.py | 27 +--------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'scripts/automation/trex_control_plane/stl/console/trex_console.py') diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py index d36ce7b0..5e68cdf0 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -39,7 +39,7 @@ except: from trex_stl_lib.api import * from trex_stl_lib.utils.text_opts import * -from trex_stl_lib.utils.common import user_input, get_current_user +from trex_stl_lib.utils.common import user_input, get_current_user, set_window_always_on_top from trex_stl_lib.utils import parsing_opts from .trex_capture import CaptureManager @@ -74,31 +74,6 @@ class ConsoleLogger(LoggerApi): self.flush() -def set_window_always_on_top (title): - # we need the GDK module, if not available - ignroe this command - try: - if sys.version_info < (3,0): - from gtk import gdk - else: - #from gi.repository import Gdk as gdk - return - - except ImportError: - return - - # search the window and set it as above - root = gdk.get_default_root_window() - - for id in root.property_get('_NET_CLIENT_LIST')[2]: - w = gdk.window_foreign_new(id) - if w: - name = w.property_get('WM_NAME')[2] - if name == title: - w.set_keep_above(True) - gdk.window_process_all_updates() - break - - class TRexGeneralCmd(cmd.Cmd): def __init__(self): cmd.Cmd.__init__(self) -- cgit 1.2.3-korg