gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gzz client/Fallback.java view/FallbackBinde...


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/gzz client/Fallback.java view/FallbackBinde...
Date: Wed, 25 Sep 2002 09:08:20 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/09/25 09:08:19

Modified files:
        gzz/client     : Fallback.java 
        gzz/view       : FallbackBinder.java 

Log message:
        Handle windowClosed() events sensibly in fallback

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/Fallback.java.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/FallbackBinder.java.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: gzz/gzz/client/Fallback.java
diff -c gzz/gzz/client/Fallback.java:1.35 gzz/gzz/client/Fallback.java:1.36
*** gzz/gzz/client/Fallback.java:1.35   Wed Sep 25 06:56:54 2002
--- gzz/gzz/client/Fallback.java        Wed Sep 25 09:08:19 2002
***************
*** 72,78 ****
   * It implements a subset of the 0.6.0 bindings.
   */
  public class Fallback {
! public static final String rcsid = "$Id: Fallback.java,v 1.35 2002/09/25 
10:56:54 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
--- 72,78 ----
   * It implements a subset of the 0.6.0 bindings.
   */
  public class Fallback {
! public static final String rcsid = "$Id: Fallback.java,v 1.36 2002/09/25 
13:08:19 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
***************
*** 86,92 ****
      /** The current mode.
       */
      public int mode = NORMAL;
!     
      // Arrowsets
      public static final int LEFT = 0;
      public static final int RIGHT = 1;
--- 86,92 ----
      /** The current mode.
       */
      public int mode = NORMAL;
! 
      // Arrowsets
      public static final int LEFT = 0;
      public static final int RIGHT = 1;
***************
*** 94,100 ****
      /** Windows, by arrowset (LEFT or RIGHT)
       */
      public Win[] windows = new Win[2];
!     
      /** The list of *all* windows, regardless of arrowset
       */
      public List windowList = new ArrayList();
--- 94,100 ----
      /** Windows, by arrowset (LEFT or RIGHT)
       */
      public Win[] windows = new Win[2];
! 
      /** The list of *all* windows, regardless of arrowset
       */
      public List windowList = new ArrayList();
***************
*** 148,164 ****
            return (Win)windowList.get(i);
        }
  
!       public void close() {
            Win next = getNext();
            if(next == this) {
                // this is last window... XXX
!               return;
            }
              if(windows[LEFT] == this) windows[LEFT] = next;
            if(windows[RIGHT] == this) windows[RIGHT] = next;
            windowList.remove(this);
  
!           throw new UnsupportedOperationException("Closing not implemented in 
GraphicsAPI.Window");
        }
  
          public Cell getAccursed() { return cursor; }
--- 148,167 ----
            return (Win)windowList.get(i);
        }
  
!       /**
!        *  @returns true if this was the last window.
!        */
!       public boolean close() {
            Win next = getNext();
            if(next == this) {
                // this is last window... XXX
!               return true;
            }
              if(windows[LEFT] == this) windows[LEFT] = next;
            if(windows[RIGHT] == this) windows[RIGHT] = next;
            windowList.remove(this);
  
!             return false;
        }
  
          public Cell getAccursed() { return cursor; }
Index: gzz/gzz/view/FallbackBinder.java
diff -c gzz/gzz/view/FallbackBinder.java:1.12 
gzz/gzz/view/FallbackBinder.java:1.13
*** gzz/gzz/view/FallbackBinder.java:1.12       Wed Sep 25 07:36:23 2002
--- gzz/gzz/view/FallbackBinder.java    Wed Sep 25 09:08:19 2002
***************
*** 40,46 ****
  /** Keybindings for the Fallback client.
   */
  public class FallbackBinder extends AbstractBinder {
! public static final String rcsid = "$Id: FallbackBinder.java,v 1.12 
2002/09/25 11:36:23 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
--- 40,46 ----
  /** Keybindings for the Fallback client.
   */
  public class FallbackBinder extends AbstractBinder {
! public static final String rcsid = "$Id: FallbackBinder.java,v 1.13 
2002/09/25 13:08:19 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
***************
*** 465,470 ****
--- 465,479 ----
      }
  
      public void timeout(Object o) {
+     }
+ 
+     public void windowClosed(Object window0) {
+         Fallback.Win window = (Fallback.Win)window0;
+       if(window.close())
+             if(save())
+               System.exit(0);
+               
+         AbstractUpdateManager.chg();
      }
  }
  




reply via email to

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