gcalctool r2315 - in branches/gnome-2-24: . gcalctool



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

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

Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/NEWS
   branches/gnome-2-24/gcalctool/functions.c
   branches/gnome-2-24/gcalctool/functions.h
   branches/gnome-2-24/gcalctool/gtk.c

Modified: branches/gnome-2-24/NEWS
==============================================================================
--- branches/gnome-2-24/NEWS	(original)
+++ branches/gnome-2-24/NEWS	Mon Nov 24 22:38:22 2008
@@ -6,6 +6,8 @@
  
 Overview of changes in gcalctool 5.24.2
 
+    * Re-enable trigonometric types which have been disabled since 2.24.0 (Robert Ancell, Bug #559575)
+
     * Remember setting to ignore change mode warning between instances (Robert Ancell, Bug #556407)
 
     * Always read configuration from /apps/gcalctool not /apps/(appname) as

Modified: branches/gnome-2-24/gcalctool/functions.c
==============================================================================
--- branches/gnome-2-24/gcalctool/functions.c	(original)
+++ branches/gnome-2-24/gcalctool/functions.c	Mon Nov 24 22:38:22 2008
@@ -44,6 +44,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: branches/gnome-2-24/gcalctool/functions.h
==============================================================================
--- branches/gnome-2-24/gcalctool/functions.h	(original)
+++ branches/gnome-2-24/gcalctool/functions.h	Mon Nov 24 22:38:22 2008
@@ -23,6 +23,9 @@
 #ifndef FUNCTIONS_H
 #define FUNCTIONS_H
 
+#include "calctool.h"
+void do_trigtype(enum trig_type t);
+
 void do_expression(int function, int arg, int cursor);
 
 #endif /*FUNCTIONS_H*/

Modified: branches/gnome-2-24/gcalctool/gtk.c
==============================================================================
--- branches/gnome-2-24/gcalctool/gtk.c	(original)
+++ branches/gnome-2-24/gcalctool/gtk.c	Mon Nov 24 22:38:22 2008
@@ -1783,6 +1783,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_trig_mode();
@@ -2376,6 +2386,7 @@
     CONNECT_SIGNAL(menu_item_select_cb);
     CONNECT_SIGNAL(menu_item_deselect_cb);
     CONNECT_SIGNAL(mode_radio_cb);
+    CONNECT_SIGNAL(trig_cb);
     CONNECT_SIGNAL(inv_cb);
     CONNECT_SIGNAL(hyp_cb);
     CONNECT_SIGNAL(base_cb);



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