gcalctool r2171 - trunk/gcalctool



Author: rancell
Date: Mon Aug 18 22:59:28 2008
New Revision: 2171
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2171&view=rev

Log:
Fix regression in undo behaviour (Bug #548190)

Modified:
   trunk/gcalctool/display.c
   trunk/gcalctool/functions.c

Modified: trunk/gcalctool/display.c
==============================================================================
--- trunk/gcalctool/display.c	(original)
+++ trunk/gcalctool/display.c	Mon Aug 18 22:59:28 2008
@@ -292,7 +292,7 @@
 void display_push(GCDisplay *display)
 {
     int c;
-
+    
     if (display->h.current != display->h.end) {
         int i = display->h.current;
 

Modified: trunk/gcalctool/functions.c
==============================================================================
--- trunk/gcalctool/functions.c	(original)
+++ trunk/gcalctool/functions.c	Mon Aug 18 22:59:28 2008
@@ -189,6 +189,19 @@
     char buf[MAXLINE];
     int *ans;
     
+    switch (buttons[function].id) {
+        case KEY_UNDO:
+            display_pop(&v->display);
+            return;
+
+        case KEY_REDO:
+            display_unpop(&v->display);
+            return;
+
+        default:
+            break;
+    }
+    
     display_push(&v->display);
 
     display_set_cursor(&v->display, cursor);
@@ -227,14 +240,6 @@
             do_numtype(arg);
             return;        
         
-        case KEY_UNDO:
-            display_pop(&v->display);
-            return;
-
-        case KEY_REDO:
-            display_unpop(&v->display);
-            return;
-
         case KEY_FUNCTION:
             do_function(arg);
             return;



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