[gcalctool] Merge advanced and scientific mode



commit 6a2897ea1b6f899922a0d4acaa112cada99a7f89
Author: Robert Ancell <robert ancell gmail com>
Date:   Mon Mar 29 09:35:59 2010 +1100

    Merge advanced and scientific mode

 NEWS              |    2 ++
 data/gcalctool.ui |    9 ---------
 src/gtk.c         |   12 ++----------
 3 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/NEWS b/NEWS
index 0a18cd5..e195e16 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@
 Overview of changes in gcalctool 5.31.1
 
     * Rename View menu to Mode
+    
+    * Merge advanced and scientific mode
  
 Overview of changes in gcalctool 5.30.0
 
diff --git a/data/gcalctool.ui b/data/gcalctool.ui
index e0eb7d3..ecf7060 100644
--- a/data/gcalctool.ui
+++ b/data/gcalctool.ui
@@ -116,15 +116,6 @@
                       </object>
                     </child>
                     <child>
-                      <object class="GtkRadioMenuItem" id="view_scientific_menu">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="View|Scientific menu item">_Scientific</property>
-                        <property name="use_underline">True</property>
-                        <property name="group">view_basic_menu</property>
-                        <signal name="activate" handler="mode_radio_cb"/>
-                      </object>
-                    </child>
-                    <child>
                       <object class="GtkRadioMenuItem" id="view_programming_menu">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes" comments="View|Programming menu item">_Programming</property>
diff --git a/src/gtk.c b/src/gtk.c
index b140526..b16a670 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -42,7 +42,7 @@
 #include "register.h"
 
 static const char *mode_names[] = { "BASIC", "ADVANCED", "FINANCIAL",
-                                    "SCIENTIFIC", "PROGRAMMING", NULL };
+                                    "PROGRAMMING", NULL };
 
 typedef struct {
     const char *widget_name;
@@ -98,8 +98,6 @@ static char *titles[] = {
     N_("Calculator â?? Advanced"),
     /* Translators: The window title when in financial mode */
     N_("Calculator â?? Financial"),
-    /* Translators: The window title when in scientific mode */
-    N_("Calculator â?? Scientific"),
     /* Translators: The window title when in programming mode */
     N_("Calculator â?? Programming")
 };
@@ -136,7 +134,6 @@ typedef enum {
     BASIC,
     ADVANCED,
     FINANCIAL,
-    SCIENTIFIC,
     PROGRAMMING
 } ModeType;
 
@@ -441,7 +438,7 @@ ui_set_mode(ModeType mode)
     /* Show/enable the widgets used in this mode */
     g_object_set(G_OBJECT(X.adv_panel), "visible", mode != BASIC, NULL);
     g_object_set(G_OBJECT(X.fin_panel), "visible", mode == FINANCIAL, NULL);
-    g_object_set(G_OBJECT(X.sci_panel), "visible", mode == SCIENTIFIC, NULL);
+    g_object_set(G_OBJECT(X.sci_panel), "visible", mode == ADVANCED, NULL);
     g_object_set(G_OBJECT(X.prog_panel), "visible", mode == PROGRAMMING, NULL);
     g_object_set(G_OBJECT(X.bit_panel), "visible", mode == PROGRAMMING, NULL);
 
@@ -461,10 +458,6 @@ ui_set_mode(ModeType mode)
             menu = GET_WIDGET("view_financial_menu");
             break;
 
-        case SCIENTIFIC:
-            menu = GET_WIDGET("view_scientific_menu");
-            break;
-
         case PROGRAMMING:
             menu = GET_WIDGET("view_programming_menu");
             break;
@@ -1736,7 +1729,6 @@ create_main_window()
     set_int_data(X.ui, "view_basic_menu", "calcmode", BASIC);
     set_int_data(X.ui, "view_advanced_menu", "calcmode", ADVANCED);
     set_int_data(X.ui, "view_financial_menu", "calcmode", FINANCIAL);
-    set_int_data(X.ui, "view_scientific_menu", "calcmode", SCIENTIFIC);
     set_int_data(X.ui, "view_programming_menu", "calcmode", PROGRAMMING);
 
     /* Setup financial functions */



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