gcalctool r2322 - trunk/gcalctool
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gcalctool r2322 - trunk/gcalctool
- Date: Mon, 1 Dec 2008 09:33:52 +0000 (UTC)
Author: rancell
Date: Mon Dec 1 09:33:52 2008
New Revision: 2322
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2322&view=rev
Log:
Fixed up patch for bug #379476
Modified:
trunk/gcalctool/gtk.c
Modified: trunk/gcalctool/gtk.c
==============================================================================
--- trunk/gcalctool/gtk.c (original)
+++ trunk/gcalctool/gtk.c Mon Dec 1 09:33:52 2008
@@ -342,50 +342,6 @@
{ 0, 0 },
{ GDK_braceleft, 0 }},
- {FN_FINC_CTRM, "finc_compounding_term",
- { 0, 0 },
- { GDK_m, 0 }},
-
- {FN_FINC_DDB, "finc_double_declining_depreciation",
- { 0, 0 },
- { GDK_D, 0 }},
-
- {FN_FINC_FV, "finc_future_value",
- { 0, 0 },
- { GDK_v, 0 }},
-
- {FN_FINC_GPM, "finc_gross_profit_margin",
- { 0, 0 },
- { GDK_I, 0 }},
-
- {FN_FINC_PMT, "finc_periodic_payment",
- { 0, 0 },
- { GDK_P, 0 }},
-
- {FN_FINC_PV, "finc_present_value",
- { 0, 0 },
- { GDK_p, 0 }},
-
- {FN_FINC_RATE, "finc_periodic_interest_rate",
- { 0, 0 },
- { GDK_T, 0 }},
-
- {FN_FINC_SLN, "finc_straight_line_depreciation",
- { 0, 0 },
- { GDK_l, 0 }},
-
- {FN_FINC_SYD, "finc_sum_of_the_years_digits_depreciation",
- { 0, 0 },
- { GDK_Y, 0 }},
-
- {FN_FINC_TERM, "finc_term",
- { 0, 0 },
- { GDK_t, 0 }},
-};
-#define NBUTTONS (sizeof(button_widgets) / sizeof(struct button_widget))
-
-/* All functions that share widget with other functions. */
-static struct button_widget widgetless_buttons[] = {
{FN_SIN, "sine",
{ 0, 0 },
{ GDK_k, 0 }},
@@ -394,7 +350,7 @@
{ 0, 0 },
{ GDK_K, 0 }},
- {FN_COS, "cosine",
+ {FN_COS, "cosine",
{ 0, 0 },
{ GDK_j, 0 }},
@@ -402,7 +358,7 @@
{ 0, 0 },
{ GDK_J, 0 }},
- {FN_TAN, "tangent",
+ {FN_TAN, "tangent",
{ 0, 0 },
{ GDK_w, 0 }},
@@ -414,7 +370,7 @@
{ 0, 0 },
{ GDK_n, 0 }},
- {FN_E_POW_X, "pow_e",
+ {FN_E_POW_X, "natural_logarithm",
{ 0, 0 },
{ GDK_N, 0 }},
@@ -422,7 +378,7 @@
{ 0, 0 },
{ GDK_g, 0 }},
- {FN_10_POW_X, "pow_10",
+ {FN_10_POW_X, "logarithm",
{ 0, 0 },
{ GDK_G, 0 }},
@@ -441,9 +397,48 @@
{FN_X_POW_Y_INV, "x_pow_y",
{ 0, 0 },
{ GDK_O, 0 }},
-};
+
+ {FN_FINC_CTRM, "finc_compounding_term",
+ { 0, 0 },
+ { GDK_m, 0 }},
+
+ {FN_FINC_DDB, "finc_double_declining_depreciation",
+ { 0, 0 },
+ { GDK_D, 0 }},
+
+ {FN_FINC_FV, "finc_future_value",
+ { 0, 0 },
+ { GDK_v, 0 }},
+
+ {FN_FINC_GPM, "finc_gross_profit_margin",
+ { 0, 0 },
+ { GDK_I, 0 }},
+
+ {FN_FINC_PMT, "finc_periodic_payment",
+ { 0, 0 },
+ { GDK_P, 0 }},
+
+ {FN_FINC_PV, "finc_present_value",
+ { 0, 0 },
+ { GDK_p, 0 }},
+
+ {FN_FINC_RATE, "finc_periodic_interest_rate",
+ { 0, 0 },
+ { GDK_T, 0 }},
+
+ {FN_FINC_SLN, "finc_straight_line_depreciation",
+ { 0, 0 },
+ { GDK_l, 0 }},
+
+ {FN_FINC_SYD, "finc_sum_of_the_years_digits_depreciation",
+ { 0, 0 },
+ { GDK_Y, 0 }},
-#define NVARBUTTONS (sizeof(widgetless_buttons) / sizeof(struct button_widget))
+ {FN_FINC_TERM, "finc_term",
+ { 0, 0 },
+ { GDK_t, 0 }}
+};
+#define NBUTTONS (sizeof(button_widgets) / sizeof(struct button_widget))
#define UI_FILE PACKAGE_GLADE_DIR "/gcalctool.glade"
@@ -2072,20 +2067,6 @@
}
}
- /* There should be no variable buttons in basic mode */
- if (v->modetype == BASIC) {
- return (FALSE);
- }
- for (i = 0; i < NVARBUTTONS; i++) {
- for (j = 0; widgetless_buttons[i].accelerator_keys[j] != 0; j++) {
- if (widgetless_buttons[i].accelerator_keys[j] == event->keyval &&
- widgetless_buttons[i].accelerator_mods[j] == state) {
- do_button(widgetless_buttons[i].key, 0);
- return (TRUE);
- }
- }
- }
-
return (FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]