commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/designer/src ToolSupport.py forms/LayoutEd...


From: Jason Cater
Subject: gnue/designer/src ToolSupport.py forms/LayoutEd...
Date: Wed, 30 Jan 2002 11:34:52 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/01/30 11:34:52

Modified files:
        designer/src   : ToolSupport.py 
        designer/src/forms: LayoutEditor.py 
Added files:
        designer/src/forms/LayoutEditor: __init__.py 

Log message:
        misc changes wrt win98 crashes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/ToolSupport.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor/__init__.py?rev=1.1

Patches:
Index: gnue/designer/src/ToolSupport.py
diff -c gnue/designer/src/ToolSupport.py:1.4 
gnue/designer/src/ToolSupport.py:1.5
*** gnue/designer/src/ToolSupport.py:1.4        Tue Jan 22 14:19:15 2002
--- gnue/designer/src/ToolSupport.py    Wed Jan 30 11:34:52 2002
***************
*** 38,44 ****
  
  for tool in Tools:
    try:
!     SupportedTools.append(dyn_import("gnue/designer/%s" % tool))
      _GDebug.printMesg(1,'Loaded Designer support for %s' % tool)
    except ImportError, mesg:
      UnsupportedTools.append(tool)
--- 38,44 ----
  
  for tool in Tools:
    try:
!     SupportedTools.append(dyn_import("gnue.designer.%s" % tool))
      _GDebug.printMesg(1,'Loaded Designer support for %s' % tool)
    except ImportError, mesg:
      UnsupportedTools.append(tool)
Index: gnue/designer/src/forms/LayoutEditor.py
diff -c gnue/designer/src/forms/LayoutEditor.py:1.11 
gnue/designer/src/forms/LayoutEditor.py:1.12
*** gnue/designer/src/forms/LayoutEditor.py:1.11        Mon Jan 28 00:44:12 2002
--- gnue/designer/src/forms/LayoutEditor.py     Wed Jan 30 11:34:52 2002
***************
*** 1,5 ****
  #
! # Copyright 2001 Free Software Foundation
  #
  # This file is part of GNU Enterprise.
  #
--- 1,5 ----
  #
! # Copyright 2001-2002 Free Software Foundation
  #
  # This file is part of GNU Enterprise.
  #
***************
*** 46,52 ****
      self.widgets = {}
      self.widgets.update(UIwxpython.WIDGETS)
      self.toolbar = LayoutEditorTools.LayoutEditorTools(self, self.frame)
-     self.frame.SetToolBar(self.toolbar)
      del self.widgets['GFPage']
  
      self.notebook = wxNotebook(self, -1, pos=wxPoint(4, 4), 
size=wxSize(32,32))
--- 46,51 ----
***************
*** 75,80 ****
--- 74,80 ----
      except KeyError:
        pass
  
+     self.frame.SetToolBar(self.toolbar)
  
    def inventoryObject(self, object):
      if object._type == 'GFPage':
***************
*** 523,529 ****
      self.highlightBox = WidgetHighlighter(self.instance.panel)
      self._iMoved = 0
      self._alreadySelected = 0
! 
    def initialize(self, widget):
      self.widget = widget.widgets[0]
      self.mainWidget = widget
--- 523,530 ----
      self.highlightBox = WidgetHighlighter(self.instance.panel)
      self._iMoved = 0
      self._alreadySelected = 0
!     self._popup_editor = None
!     
    def initialize(self, widget):
      self.widget = widget.widgets[0]
      self.mainWidget = widget
***************
*** 708,722 ****
          width = self.widget.GetSize().width + self.instance.gridWidth
  
        self.instance.clearSelections()
!       self.__editor = PopupEditor(self.instance.workspace,
            x + self.instance.panel.GetPosition().x,
            self.widget.GetPosition().y + self.instance.panel.GetPosition().y,
            width,
            self.instance.gridHeight,
!           self._endPopupEditor,
!           self.object.__dict__[self.__popupAttr],
!           wxColour(255,239,176))
!       self.__editor.SetFocus()
  
      else:
        # Signal the Properties dialog
--- 709,725 ----
          width = self.widget.GetSize().width + self.instance.gridWidth
  
        self.instance.clearSelections()
!       if self._popup_editor:
!         self._popup_editor.Destroy()
!       self._popup_editor = PopupEditor(self.instance.workspace,
!           self._endPopupEditor,
            x + self.instance.panel.GetPosition().x,
            self.widget.GetPosition().y + self.instance.panel.GetPosition().y,
            width,
            self.instance.gridHeight,
!           self.object.__dict__[self.__popupAttr]).SetFocus()
! 
!       self._popup_editor.SetFocus()
  
      else:
        # Signal the Properties dialog
***************
*** 1316,1345 ****
  # (if success = 1)
  #
  class PopupEditor(wxTextCtrl):
!   def __init__(self, panel, x, y, width, height, complete, value, color):
!     wxTextCtrl.__init__(self, panel, -1, pos=wxPoint(x,y),
!          size=wxSize(width, height),
           style=wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxSIMPLE_BORDER)
      self.SetBackgroundColour(color)
      self.__complete = complete
      self.SetValue(value)
      EVT_CHAR(self, self.OnChar)
      EVT_KILL_FOCUS(self, self.OnFocusOut)
  
    def OnChar(self, event):
      if event.GetKeyCode() in (WXK_RETURN, WXK_TAB):
!       self.__complete(1, self.GetValue())
!       self.Destroy()
  
      elif event.GetKeyCode() == WXK_ESCAPE:
!       self.__complete(0)
!       self.Destroy()
      else:
        event.Skip()
  
    def OnFocusOut(self, event):
!     self.__complete(1, self.GetValue())
!     self.Destroy()
  
  
  
--- 1319,1366 ----
  # (if success = 1)
  #
  class PopupEditor(wxTextCtrl):
!   def __init__(self, panel, complete, x, y, width, height, value):
!     wxTextCtrl.__init__(self, panel, -1, pos=wxPoint(0,0),
!          size=wxSize(10,10),
           style=wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxSIMPLE_BORDER)
      self.SetBackgroundColour(color)
+     self.__complete = None
+     self.Show(0)
+ 
+     self.SetDimensions(x,y,width, height)
      self.__complete = complete
      self.SetValue(value)
+     self.Show(1)
+     self.Raise()
+     self.Enable(1)
      EVT_CHAR(self, self.OnChar)
      EVT_KILL_FOCUS(self, self.OnFocusOut)
+     self.SetFocus()
+ 
+ 
+   def done(self, success):
+     if self.__complete:
+       self.Show(0)
+ 
+       if success:
+         self.__complete(1, self.GetValue())
+       else:
+         self.__complete(0)
+ 
+       self.__complete = None
+ 
  
    def OnChar(self, event):
      if event.GetKeyCode() in (WXK_RETURN, WXK_TAB):
!       self.done(1)
  
      elif event.GetKeyCode() == WXK_ESCAPE:
!       self.done(0)
      else:
        event.Skip()
  
    def OnFocusOut(self, event):
!       self.done(1)
  
  
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]