Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ed24cd2c
Kaydet (Commit)
ed24cd2c
authored
Şub 14, 2001
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DialogWindows now have a self.dlg in addition to self.wid.
üst
3ff82a3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
dnslookup-2.py
Mac/Demo/example2/dnslookup-2.py
+2
-2
FrameWork.py
Mac/Lib/FrameWork.py
+5
-3
MkDistr_ui.py
Mac/scripts/MkDistr_ui.py
+10
-10
No files found.
Mac/Demo/example2/dnslookup-2.py
Dosyayı görüntüle @
ed24cd2c
...
...
@@ -65,10 +65,10 @@ class MyDialog(FrameWork.DialogWindow):
def
dolookup
(
self
):
"""Get text entered in the lookup entry area. Place result of the
call to dnslookup in the result entry area."""
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
ITEM_LOOKUP_ENTRY
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
ITEM_LOOKUP_ENTRY
)
txt
=
Dlg
.
GetDialogItemText
(
h
)
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
ITEM_RESULT
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
ITEM_RESULT
)
Dlg
.
SetDialogItemText
(
h
,
self
.
dnslookup
(
txt
))
def
dnslookup
(
self
,
str
):
...
...
Mac/Lib/FrameWork.py
Dosyayı görüntüle @
ed24cd2c
...
...
@@ -222,8 +222,9 @@ class Application:
return
old
def
do_dialogevent
(
self
,
event
):
gotone
,
window
,
item
=
DialogSelect
(
event
)
gotone
,
dlg
,
item
=
DialogSelect
(
event
)
if
gotone
:
window
=
dlg
.
GetDialogWindow
()
if
self
.
_windows
.
has_key
(
window
):
self
.
_windows
[
window
]
.
do_itemhit
(
item
,
event
)
else
:
...
...
@@ -995,14 +996,15 @@ class DialogWindow(Window):
"""A modeless dialog window"""
def
open
(
self
,
resid
):
self
.
wid
=
GetNewDialog
(
resid
,
-
1
)
self
.
dlg
=
GetNewDialog
(
resid
,
-
1
)
self
.
wid
=
self
.
dlg
.
GetDialogWindow
()
self
.
do_postopen
()
def
close
(
self
):
self
.
do_postclose
()
def
do_itemhit
(
self
,
item
,
event
):
print
'Dialog
%
s, item
%
d hit'
%
(
self
.
wid
,
item
)
print
'Dialog
%
s, item
%
d hit'
%
(
self
.
dlg
,
item
)
def
do_rawupdate
(
self
,
window
,
event
):
pass
...
...
Mac/scripts/MkDistr_ui.py
Dosyayı görüntüle @
ed24cd2c
...
...
@@ -59,16 +59,16 @@ class EditDialogWindow(DialogWindow):
self
.
callback
=
callback
self
.
cancelrv
=
cancelrv
DialogWindow
.
open
(
self
,
id
)
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
DLG_SRCPATH
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
DLG_SRCPATH
)
Dlg
.
SetDialogItemText
(
h
,
src
)
self
.
wid
.
SetDialogDefaultItem
(
DLG_OK
)
self
.
wid
.
SetDialogCancelItem
(
DLG_CANCEL
)
self
.
dlg
.
SetDialogDefaultItem
(
DLG_OK
)
self
.
dlg
.
SetDialogCancelItem
(
DLG_CANCEL
)
if
id
==
ID_INCLUDE
:
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
DLG_DSTPATH
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
DLG_DSTPATH
)
if
dst
==
None
:
dst
=
''
Dlg
.
SetDialogItemText
(
h
,
dst
)
self
.
wid
.
DrawDialog
()
self
.
dlg
.
DrawDialog
()
def
do_itemhit
(
self
,
item
,
event
):
if
item
in
(
DLG_OK
,
DLG_CANCEL
,
DLG_EXCLUDE
):
...
...
@@ -76,11 +76,11 @@ class EditDialogWindow(DialogWindow):
# else it is not interesting
def
done
(
self
,
item
):
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
DLG_SRCPATH
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
DLG_SRCPATH
)
src
=
Dlg
.
GetDialogItemText
(
h
)
if
item
==
DLG_OK
:
if
self
.
id
==
ID_INCLUDE
:
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
DLG_DSTPATH
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
DLG_DSTPATH
)
dst
=
Dlg
.
GetDialogItemText
(
h
)
rv
=
(
src
,
dst
)
else
:
...
...
@@ -99,7 +99,7 @@ class ListWindow(DialogWindow):
self
.
id
=
id
DialogWindow
.
open
(
self
,
id
)
Qd
.
SetPort
(
self
.
wid
)
tp
,
h
,
rect
=
self
.
wid
.
GetDialogItem
(
MAIN_LIST
)
tp
,
h
,
rect
=
self
.
dlg
.
GetDialogItem
(
MAIN_LIST
)
self
.
listrect
=
rect
rect2
=
rect
[
0
]
+
1
,
rect
[
1
]
+
1
,
rect
[
2
]
-
16
,
rect
[
3
]
-
16
# Scroll bar space
self
.
list
=
List
.
LNew
(
rect2
,
(
0
,
0
,
1
,
len
(
contents
)),
(
0
,
0
),
0
,
self
.
wid
,
...
...
@@ -170,7 +170,7 @@ class MainListWindow(ListWindow):
def
open
(
self
,
id
,
cb_check
,
cb_run
,
cb_add
):
ListWindow
.
open
(
self
,
id
,
[])
self
.
wid
.
SetDialogDefaultItem
(
MAIN_INCLUDE
)
self
.
dlg
.
SetDialogDefaultItem
(
MAIN_INCLUDE
)
self
.
cb_run
=
cb_run
self
.
cb_check
=
cb_check
self
.
cb_add
=
cb_add
...
...
@@ -212,7 +212,7 @@ class IncListWindow(ListWindow):
"""An include/exclude window"""
def
open
(
self
,
id
,
editid
,
contents
,
cb_add
,
cb_del
,
cb_get
):
ListWindow
.
open
(
self
,
id
,
contents
)
self
.
wid
.
SetDialogDefaultItem
(
INCEXC_CHANGE
)
self
.
dlg
.
SetDialogDefaultItem
(
INCEXC_CHANGE
)
self
.
editid
=
editid
self
.
cb_add
=
cb_add
self
.
cb_del
=
cb_del
...
...
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