Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
035ed036
Commit
035ed036
authored
Mar 25, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Rename custombuttonbuttons to custombuttons"
This reverts commit
2a90d5b3
.
parent
bf87d6fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pronterface.py
printrun/pronterface.py
+6
-6
No files found.
printrun/pronterface.py
View file @
035ed036
...
@@ -948,11 +948,11 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -948,11 +948,11 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
pass
pass
def
cbuttons_reload
(
self
):
def
cbuttons_reload
(
self
):
allcbs
=
getattr
(
self
,
"custombuttons"
,
[])
allcbs
=
getattr
(
self
,
"custombutton
button
s"
,
[])
for
button
in
allcbs
:
for
button
in
allcbs
:
self
.
centersizer
.
Detach
(
button
)
self
.
centersizer
.
Detach
(
button
)
button
.
Destroy
()
button
.
Destroy
()
self
.
custombuttons
=
[]
self
.
custombutton
button
s
=
[]
custombuttons
=
self
.
custombuttons
[:]
+
[
None
]
custombuttons
=
self
.
custombuttons
[:]
+
[
None
]
for
i
,
btndef
in
enumerate
(
custombuttons
):
for
i
,
btndef
in
enumerate
(
custombuttons
):
if
btndef
is
None
:
if
btndef
is
None
:
...
@@ -977,7 +977,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -977,7 +977,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
if
btndef
is
not
None
:
if
btndef
is
not
None
:
b
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
procbutton
)
b
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
procbutton
)
b
.
Bind
(
wx
.
EVT_MOUSE_EVENTS
,
self
.
editbutton
)
b
.
Bind
(
wx
.
EVT_MOUSE_EVENTS
,
self
.
editbutton
)
self
.
custombuttons
.
append
(
b
)
self
.
custombutton
button
s
.
append
(
b
)
if
type
(
self
.
centersizer
)
==
wx
.
GridBagSizer
:
if
type
(
self
.
centersizer
)
==
wx
.
GridBagSizer
:
self
.
centersizer
.
Add
(
b
,
pos
=
(
i
//
4
,
i
%
4
),
flag
=
wx
.
EXPAND
)
self
.
centersizer
.
Add
(
b
,
pos
=
(
i
//
4
,
i
%
4
),
flag
=
wx
.
EXPAND
)
else
:
else
:
...
@@ -1135,7 +1135,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -1135,7 +1135,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
#if self.uppersizer.GetItem(self.newbuttonbutton) is not None:
#if self.uppersizer.GetItem(self.newbuttonbutton) is not None:
# self.uppersizer.SetItemMinSize(self.newbuttonbutton, obj.GetSize())
# self.uppersizer.SetItemMinSize(self.newbuttonbutton, obj.GetSize())
# self.mainsizer.Layout()
# self.mainsizer.Layout()
for
b
in
self
.
custombuttons
:
for
b
in
self
.
custombutton
button
s
:
#if b.IsFrozen(): b.Thaw()
#if b.IsFrozen(): b.Thaw()
if
b
.
properties
is
None
:
if
b
.
properties
is
None
:
b
.
Enable
()
b
.
Enable
()
...
@@ -1165,7 +1165,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -1165,7 +1165,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
dst
=
None
dst
=
None
src
=
self
.
dragging
.
sourcebutton
src
=
self
.
dragging
.
sourcebutton
drg
=
self
.
dragging
drg
=
self
.
dragging
for
b
in
self
.
custombuttons
:
for
b
in
self
.
custombutton
button
s
:
if
b
.
GetScreenRect
()
.
Contains
(
scrpos
):
if
b
.
GetScreenRect
()
.
Contains
(
scrpos
):
dst
=
b
dst
=
b
break
break
...
@@ -1212,7 +1212,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -1212,7 +1212,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
dst
=
None
dst
=
None
src
=
self
.
dragging
.
sourcebutton
src
=
self
.
dragging
.
sourcebutton
drg
=
self
.
dragging
drg
=
self
.
dragging
for
b
in
self
.
custombuttons
:
for
b
in
self
.
custombutton
button
s
:
if
b
.
GetScreenRect
()
.
Contains
(
scrpos
):
if
b
.
GetScreenRect
()
.
Contains
(
scrpos
):
dst
=
b
dst
=
b
break
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment