commit-gnue
[Top][All Lists]
Advanced

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

gnue/forms/src/uidrivers/gtk2 UIdriver.py


From: Jan Ischebeck
Subject: gnue/forms/src/uidrivers/gtk2 UIdriver.py
Date: Sun, 08 Sep 2002 11:41:36 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jan Ischebeck <address@hidden>  02/09/08 11:41:36

Modified files:
        forms/src/uidrivers/gtk2: UIdriver.py 

Log message:
        fix "1. Does not ask to save on exit after making changes." issue of 
gtk2 uidriver.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/gtk2/UIdriver.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: gnue/forms/src/uidrivers/gtk2/UIdriver.py
diff -c gnue/forms/src/uidrivers/gtk2/UIdriver.py:1.7 
gnue/forms/src/uidrivers/gtk2/UIdriver.py:1.8
*** gnue/forms/src/uidrivers/gtk2/UIdriver.py:1.7       Sun Sep  8 06:57:52 2002
--- gnue/forms/src/uidrivers/gtk2/UIdriver.py   Sun Sep  8 11:41:36 2002
***************
*** 30,36 ****
  
  ################## GP ISSUES ################
  #$ Pending issues as on 8 June 2002
! #$ 1. Does not ask to save on exit after making changes.
  #$ 2. Tabbed notebook overlays all fields on one frame and needs to be 
switched
  #$    in reverse order to show the frames correctly. (activate form?)
  #$ 3. Placement of windows should be in the center
--- 30,36 ----
  
  ################## GP ISSUES ################
  #$ Pending issues as on 8 June 2002
! #$ 1. Does not ask to save on exit after making changes. (fixed on 2002-9-8)
  #$ 2. Tabbed notebook overlays all fields on one frame and needs to be 
switched
  #$    in reverse order to show the frames correctly. (activate form?)
  #$ 3. Placement of windows should be in the center
***************
*** 158,166 ****
      # Create the main window
      #
      self.mainWindow = gtk.Window()
!     self.mainWindow.connect('destroy', lambda win: gtk.main_quit())
  
-     #$self.mainWindow.connect('destroy', self._exit)
      self.mainWindow.set_resizable(gtk.FALSE)
      self.mainWindow.set_title("|| SHRI HARIH ||")
      table = gtk.Table(4, 1, gtk.FALSE)
--- 158,165 ----
      # Create the main window
      #
      self.mainWindow = gtk.Window()
!     self.mainWindow.connect('delete_event', self.windowExitEvent)
  
      self.mainWindow.set_resizable(gtk.FALSE)
      self.mainWindow.set_title("|| SHRI HARIH ||")
      table = gtk.Table(4, 1, gtk.FALSE)
***************
*** 549,559 ****
    # Tells the application to close it's main window
    #
    def _exit(self):
-     #$print "entering ....thare ko maana karo hato..ki exit main mati jayeeyo"
-     GDebug.printMesg(1,"entering ..._exit")
      self.mainWindow.destroy()
!     #$print "leaving.._exit"
!     GDebug.printMesg(1,"leaving ..._exit")
  
    #
    # _setStatusBar
--- 548,555 ----
    # Tells the application to close it's main window
    #
    def _exit(self):
      self.mainWindow.destroy()
!     gtk.main_quit()
  
    #
    # _setStatusBar
***************
*** 743,760 ****
    #
  
    #
    # menuExitEvent
    #
    # Catches the Exit event from the menu and make sure it closes in such a 
way to
    # trigger the closeTrap method
    #
    def menuExitEvent(self):
!    #$self.dispatchEvent(GFEvent('requestEXIT')) 
!    #$print "entering menuExit"
!    GDebug.printMesg(1, "entering menuExit")
!    self.mainWindow.destroy()
!    #$print "leaving menuExitEvent"
!    GDebug.printMesg(1, "leaving menuExit")
   
    #
    # promptForRecordNumber
--- 739,762 ----
    #
  
    #
+   # windowExitEvent
+   #
+   # Catches the Exit event from the menu and make sure it closes in such a 
way to
+   # trigger the closeTrap method
+   #
+   def windowExitEvent(self,*args):
+    self.dispatchEvent(GFEvent('requestEXIT'))
+    return gtk.TRUE
+ 
+   #
    # menuExitEvent
    #
    # Catches the Exit event from the menu and make sure it closes in such a 
way to
    # trigger the closeTrap method
    #
    def menuExitEvent(self):
!    self.dispatchEvent(GFEvent('requestEXIT'))
! 
   
    #
    # promptForRecordNumber
***************
*** 786,809 ****
  
  
  
-   #
-   # closeTrap
-   #
-   # intercepts the applications closure and generates an event to the form 
requesting
-   # closure.  Allows the form to control closure.  If the form approves it'll 
send
-   # back an event closing the application
-   #`
-   def closeTrap(self,event):
-     #$print "entering close trap"
-     GDebug.printMesg(1, "entering close trap")
-     self.dispatchEvent(GFEvent('requestEXIT'))
-     #$print "leaving close trap"
-     GDebug.printMesg(1, "leaving close trap")
- 
- 
- 
- 
- 
  
  #############################################################################
  #############################################################################
--- 788,793 ----
***************
*** 1159,1166 ****
        newWidget.show_all()
        _SINGLEPAGE=newWidget
  
!     if event.initialize:
!       event.interface.mainWindow.connect('destroy', event.interface.closeTrap)
  
      return newWidget
  
--- 1143,1150 ----
        newWidget.show_all()
        _SINGLEPAGE=newWidget
  
! #    if event.initialize:
! #      event.interface.mainWindow.connect('destroy', 
event.interface.closeTrap)
  
      return newWidget
  




reply via email to

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