Skip to content

Commit

Permalink
Merge pull request pywinauto#727 from airelil/issue_635
Browse files Browse the repository at this point in the history
Issue pywinauto#635: remove unused controltypes from common_controls module
  • Loading branch information
vasily-v-ryabov authored May 6, 2019
2 parents d1b9628 + 6078f92 commit 4581d13
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions pywinauto/controls/common_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import locale
import six

from .. import sysinfo
from .. import win32functions
from .. import win32defines
from .. import win32structures
Expand All @@ -68,9 +67,6 @@
from ..sysinfo import is_x64_Python
from .. import deprecated

if sysinfo.UIA_support:
from ..uia_defines import IUIA


# Todo: I should return iterators from things like items() and texts()
# to save building full lists all the time
Expand Down Expand Up @@ -721,10 +717,6 @@ class ListViewWrapper(hwndwrapper.HwndWrapper):
"TSysListView",
"ListView.*WndClass",
]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_ListControlTypeId
controltypes = []

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -1460,8 +1452,6 @@ class TreeViewWrapper(hwndwrapper.HwndWrapper):
friendlyclassname = "TreeView"
windowclasses = [
"SysTreeView32", r"WindowsForms\d*\.SysTreeView32\..*", "TTreeView", "TreeList.TreeListCtrl"]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_TreeControlTypeId]

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -1751,8 +1741,6 @@ class HeaderWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "Header"
windowclasses = ["SysHeader32", "msvb_lib_header"]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_HeaderControlTypeId]

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -1894,8 +1882,6 @@ class StatusBarWrapper(hwndwrapper.HwndWrapper):
"msctls_statusbar32",
".*StatusBar",
r"WindowsForms\d*\.msctls_statusbar32\..*"]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_StatusBarControlTypeId]

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -2065,8 +2051,6 @@ class TabControlWrapper(hwndwrapper.HwndWrapper):
windowclasses = [
"SysTabControl32",
r"WindowsForms\d*\.SysTabControl32\..*"]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_TabControlTypeId]

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -2878,10 +2862,6 @@ class ReBarWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "ReBar"
windowclasses = ["ReBarWindow32", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -3086,8 +3066,6 @@ class UpDownWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "UpDown"
windowclasses = ["msctls_updown32", "msctls_updown", ]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_SpinnerControlTypeId]

#----------------------------------------------------------------
def __init__(self, hwnd):
Expand Down Expand Up @@ -3195,8 +3173,6 @@ class TrackbarWrapper(hwndwrapper.HwndWrapper):
friendlyclassname = "Trackbar"
windowclasses = ["msctls_trackbar", ]

if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_SliderControlTypeId]

def get_range_min(self):
"""Get min available trackbar value"""
Expand Down Expand Up @@ -3293,10 +3269,6 @@ class AnimationWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "Animation"
windowclasses = ["SysAnimate32", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []


#====================================================================
Expand All @@ -3306,10 +3278,6 @@ class ComboBoxExWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "ComboBoxEx"
windowclasses = ["ComboBoxEx32", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []
has_title = False


Expand All @@ -3321,10 +3289,6 @@ class DateTimePickerWrapper(hwndwrapper.HwndWrapper):
friendlyclassname = "DateTimePicker"
windowclasses = ["SysDateTimePick32",
r"WindowsForms\d*\.SysDateTimePick32\..*", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []
has_title = False

#----------------------------------------------------------------
Expand Down Expand Up @@ -3387,10 +3351,6 @@ class HotkeyWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "Hotkey"
windowclasses = ["msctls_hotkey32", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []
has_title = False


Expand All @@ -3401,10 +3361,6 @@ class IPAddressWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "IPAddress"
windowclasses = ["SysIPAddress32", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []
has_title = False


Expand All @@ -3415,8 +3371,6 @@ class CalendarWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "Calendar"
windowclasses = ["SysMonthCal32", ]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_CalendarControlTypeId]
has_title = False

place_in_calendar = {
Expand Down Expand Up @@ -3719,10 +3673,6 @@ class PagerWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "Pager"
windowclasses = ["SysPager", ]
if sysinfo.UIA_support:
#controltypes is empty to make wrapper search result unique
#possible control types: IUIA().UIA_dll.UIA_PaneControlTypeId
controltypes = []

#----------------------------------------------------------------
def get_position(self):
Expand All @@ -3748,8 +3698,6 @@ class ProgressWrapper(hwndwrapper.HwndWrapper):

friendlyclassname = "Progress"
windowclasses = ["msctls_progress", "msctls_progress32", ]
if sysinfo.UIA_support:
controltypes = [IUIA().UIA_dll.UIA_ProgressBarControlTypeId]
has_title = False

#----------------------------------------------------------------
Expand Down

0 comments on commit 4581d13

Please sign in to comment.