Used TkGlobal instead of Tkinter and Pmw

This commit is contained in:
Mark Mine 2003-07-03 20:04:42 +00:00
parent f12cb81d9d
commit ca6a48e55b
21 changed files with 25 additions and 42 deletions

View File

@ -7,10 +7,8 @@ from DirectSelection import *
from DirectGrid import *
from DirectGeometry import *
from DirectLights import *
from DirectSessionPanel import *
from ClusterClient import *
from ClusterServer import *
from tkSimpleDialog import askstring
import Placer
import Slider
import SceneGraphExplorer
@ -169,8 +167,8 @@ class DirectSession(PandaObject):
if base.wantTk:
import TkGlobal
self.panel = DirectSessionPanel(parent = tkroot)
import DirectSessionPanel
self.panel = DirectSessionPanel.DirectSessionPanel(parent = tkroot)
try:
# Has the clusterMode been set externally (i.e. via the
# bootstrap application?
@ -646,6 +644,7 @@ class DirectSession(PandaObject):
def getAndSetName(self, nodePath):
""" Prompt user for new node path name """
from tkSimpleDialog import askstring
newName = askstring('Node Path: ' + nodePath.getName(),
'Enter new name:')
if newName:

View File

@ -2,14 +2,13 @@ from ShowBaseGlobal import *
from PandaObject import *
from PieMenu import *
from DirectGuiGlobals import *
from Tkinter import *
from TkGlobal import *
from DirectUtil import *
from DirectGeometry import *
from SceneGraphExplorer import *
from tkMessageBox import showinfo
from tkFileDialog import *
from whrandom import *
import Pmw
import Floater
import VectorWidgets
import string

View File

@ -1193,6 +1193,7 @@ class ShowBase(DirectObject.DirectObject):
self.wantTk = fWantTk
if self.wantTk:
import TkGlobal
TkGlobal.spawnTkLoop()
def startDirect(self, fWantDirect = 1):
self.wantDirect = fWantDirect

View File

@ -1,7 +1,6 @@
from Tkinter import *
import sys
import Pmw
import sys
# This is required by the ihooks.py module used by Squeeze (used by
# pandaSqueezer.py) so that Pmw initializes properly
sys.modules['_Pmw'].__name__ = '_Pmw'
@ -21,7 +20,8 @@ def tkloop(self):
# Get the taskMgr
from TaskManagerGlobal import *
# Spawn this task
taskMgr.add(tkloop, "tkloop")
def spawnTkLoop():
# Spawn this task
taskMgr.add(tkloop, "tkloop")

View File

@ -4,9 +4,8 @@
# Import Tkinter, Pmw, and the floater code from this directory tree.
from AppShell import *
from Tkinter import *
from TkGlobal import *
from tkSimpleDialog import askfloat
import Pmw
import string
import math
import types

View File

@ -3,9 +3,8 @@
# Import Tkinter, Pmw, and the dial code
from PandaObject import *
from AppShell import *
from Tkinter import *
from TkGlobal import *
import string
import Pmw
import Dial
import Floater
import Slider

View File

@ -1,9 +1,8 @@
""" Finite State Machine Inspector module """
from PandaObject import *
from AppShell import *
from Tkinter import *
from TkGlobal import *
from tkSimpleDialog import askstring
import Pmw
import math
import operator

View File

@ -4,9 +4,7 @@
### so that I can just type: inspect(anObject) any time.
import string
from Tkinter import *
from TkGlobal import *
import Pmw
### public API

View File

@ -2,7 +2,7 @@
# Import Tkinter, Pmw, and the dial code from this directory tree.
from PandaObject import *
from Tkinter import *
from TkGlobal import *
from AppShell import *
from DirectGlobals import *
from DirectUtil import *
@ -11,7 +11,6 @@ from DirectSelection import *
from tkFileDialog import *
import os
import string
import Pmw
import Dial
import Floater
import Slider

View File

@ -2,11 +2,10 @@
# Import Tkinter, Pmw, and the floater code from this directory tree.
from AppShell import *
from Tkinter import *
from TkGlobal import *
from tkFileDialog import *
from tkSimpleDialog import askstring
import os
import Pmw
import Dial
import Floater
import Slider

View File

@ -2,9 +2,8 @@
# Import Tkinter, Pmw, and the dial code from this directory tree.
from PandaObject import *
from Tkinter import *
from TkGlobal import *
from AppShell import *
import Pmw
import Dial
import Floater

View File

@ -2,9 +2,8 @@
Dial Class: Velocity style controller for floating point values with
a label, entry (validated), and scale
"""
from Tkinter import *
from TkGlobal import *
from Valuator import *
import Pmw
import Task
import math
import string

View File

@ -2,8 +2,7 @@
EntryScale Class: Scale with a label, and a linked and validated entry
"""
from PandaObject import *
from Tkinter import *
import Pmw
from TkGlobal import *
import string
import tkColorChooser
from tkSimpleDialog import *

View File

@ -3,9 +3,8 @@ Floater Class: Velocity style controller for floating point values with
a label, entry (validated), and scale
"""
from PandaObject import *
from Tkinter import *
from TkGlobal import *
from Valuator import *
import Pmw
import Task
import math
import string

View File

@ -1,7 +1,7 @@
"""
A basic widget for showing the progress being made in a task.
"""
from Tkinter import *
from TkGlobal import *
class ProgressBar:
def __init__(self, master=None, orientation="horizontal",

View File

@ -1,7 +1,6 @@
from PandaObject import *
from Tkinter import *
from TkGlobal import *
from Tree import *
import Pmw
# changing these strings requires changing DirectSession.py SGE_ strs too!
DEFAULT_MENU_ITEMS = [

View File

@ -2,9 +2,8 @@
Slider Class: Velocity style controller for floating point values with
a label, entry (validated), and min/max slider
"""
from Tkinter import *
from TkGlobal import *
from Valuator import *
import Pmw
import Task
import math
import string

View File

@ -18,7 +18,7 @@
import os
import sys
import string
from Tkinter import *
from TkGlobal import *
from PandaObject import *
# Initialize icon directory

View File

@ -1,6 +1,5 @@
from PandaObject import *
from Tkinter import *
import Pmw
from TkGlobal import *
import tkColorChooser
import WidgetPropertiesDialog
import string

View File

@ -1,5 +1,4 @@
from Tkinter import *
import Pmw
from TkGlobal import *
import Valuator
import Floater
import Slider

View File

@ -1,5 +1,4 @@
from Tkinter import *
import Pmw
from TkGlobal import *
import types
import string