Skip to content

Commit 333579a

Browse files
committed
gladevcp -switch to common/hal_glib
also actual use core subclass of hal_glib
1 parent 020373e commit 333579a

13 files changed

Lines changed: 15 additions & 21 deletions

lib/python/gladevcp/combi_dro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import sys
3030
import math
3131
import linuxcnc
32-
from hal_glib import GStat
32+
from gladevcp.core import Status as GStat
3333
import re
3434

3535
# constants

lib/python/gladevcp/core.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import hal
1010
import traceback
1111

12-
from hal_glib import GStat
12+
from common.hal_glib import GStat
1313
from common.iniinfo import _IStat as IStatParent
1414

1515
# Set up logging
@@ -41,7 +41,6 @@ class Status(GStat):
4141
'toolfile-stale': (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE, (GObject.TYPE_PYOBJECT,)),
4242
}
4343
TEMPARARY_MESSAGE = 255 # remove in the future
44-
TEMPORARY_MESSAGE = 255
4544
OPERATOR_ERROR = linuxcnc.OPERATOR_ERROR
4645
OPERATOR_TEXT = linuxcnc.OPERATOR_TEXT
4746
NML_ERROR = linuxcnc.NML_ERROR
@@ -58,11 +57,8 @@ def __init__(self):
5857
# only initialize once for all instances
5958
if self.__class__._instanceNum >= 1:
6059
return
61-
GObject.Object.__init__(self)
6260
self.__class__._instanceNum += 1
63-
super(GStat, self).__init__()
64-
#self.current_jog_rate = INI.DEFAULT_LINEAR_JOG_VEL
65-
#self.angular_jog_velocity = INI.DEFAULT_ANGULAR_JOG_VEL
61+
super(Status, self).__init__()
6662

6763
################################################################
6864
# Lcnc_Action class

lib/python/gladevcp/drowidget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from gi.repository import GLib
2929

3030
import linuxcnc
31-
from hal_glib import GStat
31+
from gladevcp.core import Status as GStat
3232

3333
# Set up logging
3434
from common import logger

lib/python/gladevcp/hal_actions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from .hal_widgets import _HalWidgetBase
2727
import linuxcnc
28-
from hal_glib import GStat
28+
from gladevcp.core import Status as GStat
2929
import hal
3030

3131
from gladevcp.core import Info, Action
@@ -180,8 +180,7 @@ def on_toggled(self, w):
180180
class EMC_Stat(GStat, _EMC_ActionBase):
181181
__gtype_name__ = 'EMC_Stat'
182182
def __init__(self):
183-
stat = self.linuxcnc_static.get()[1]
184-
GStat.__init__(self, stat)
183+
super(GStat, self).__init__()
185184

186185
def _hal_init(self):
187186
pass

lib/python/gladevcp/hal_filechooser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from .hal_widgets import _HalWidgetBase
2727
import linuxcnc
28-
from hal_glib import GStat
28+
from gladevcp.core import Status as GStat
2929

3030
_ = lambda x: x
3131

lib/python/gladevcp/hal_gremlin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from hal_actions import _EMC_ActionBase
4242
else:
4343
from .hal_actions import _EMC_ActionBase
44-
from hal_glib import GStat
44+
from gladevcp.core import Status as GStat
4545

4646
def get_linuxcnc_ini_file():
4747
"""find LinuxCNC INI file with pgrep"""

lib/python/gladevcp/hal_mdihistory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from .hal_actions import _EMC_ActionBase, ensure_mode
3232

3333
import linuxcnc
34-
from hal_glib import GStat
34+
from gladevcp.core import Status as GStat
3535
from gladevcp.core import Info
3636

3737
GSTAT = GStat()

lib/python/gladevcp/hal_sourceview.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Norberts comments
1919
# self.gstat ist nirgends festgelegt, auch wenn GStat importiert wurde
20-
20+
# self.gstat comes from _EMC_ActionBase
2121

2222

2323
import os, time
@@ -34,7 +34,6 @@
3434

3535
from .hal_widgets import _HalWidgetBase
3636
import linuxcnc
37-
from hal_glib import GStat
3837
from .hal_actions import _EMC_ActionBase, _EMC_Action
3938
from .hal_filechooser import _EMC_FileChooser
4039

lib/python/gladevcp/macro_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from gi.repository import GObject
2525

2626
import linuxcnc
27-
from hal_glib import GStat
27+
from gladevcp.core import Status as GStat
2828

2929
if __name__ == "__main__":
3030
from hal_actions import _EMC_ActionBase, ensure_mode

lib/python/gladevcp/makepins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
from .hal_widgets import _HalWidgetBase
3030
from .led import HAL_LED
31-
from hal_glib import GComponent
31+
from common.hal_glib import GComponent
3232

3333
from gladevcp.gladebuilder import widget_name
3434

0 commit comments

Comments
 (0)