gcalctool r2316 - trunk/gcalctool



Author: rancell
Date: Mon Nov 24 22:39:01 2008
New Revision: 2316
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2316&view=rev

Log:
Re-enable trigonometric types which have been disabled since 2.24.0 (Robert Ancell, Bug #559575)

Modified:
   trunk/gcalctool/functions.c
   trunk/gcalctool/functions.h
   trunk/gcalctool/gtk.c

Modified: trunk/gcalctool/functions.c
==============================================================================
--- trunk/gcalctool/functions.c	(original)
+++ trunk/gcalctool/functions.c	Mon Nov 24 22:39:01 2008
@@ -45,6 +45,14 @@
 }
 
 
+void
+do_trigtype(enum trig_type t)    /* Change the current trigonometric type. */
+{
+    v->ttype = t;
+    set_resource(R_TRIG, Rtstr[(int) v->ttype]);
+}
+
+
 static void
 do_accuracy(int value)     /* Set display accuracy. */
 {

Modified: trunk/gcalctool/functions.h
==============================================================================
--- trunk/gcalctool/functions.h	(original)
+++ trunk/gcalctool/functions.h	Mon Nov 24 22:39:01 2008
@@ -23,6 +23,10 @@
 #ifndef FUNCTIONS_H
 #define FUNCTIONS_H
 
+// FIXME: Merge into do_expression
+#include "calctool.h"
+void do_trigtype(enum trig_type t);
+
 void do_expression(int function, int arg, int cursor);
 
 #endif /*FUNCTIONS_H*/

Modified: trunk/gcalctool/gtk.c
==============================================================================
--- trunk/gcalctool/gtk.c	(original)
+++ trunk/gcalctool/gtk.c	Mon Nov 24 22:39:01 2008
@@ -1920,6 +1920,16 @@
 
 /*ARGSUSED*/
 void
+trig_cb(GtkWidget *widget)
+{
+    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
+        do_trigtype((enum trig_type) g_object_get_data(G_OBJECT(widget),
+                                                       "trig_mode"));
+}
+
+
+/*ARGSUSED*/
+void
 inv_cb(GtkWidget *widget)
 {
     ui_update_modifier_mode();



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