[gcalctool/gcalctool-newui2] ...
- From: Robert Ancell <rancell src gnome org>
- To: svn-commits-list gnome org
- Subject: [gcalctool/gcalctool-newui2] ...
- Date: Mon, 6 Jul 2009 13:36:33 +0000 (UTC)
commit a38945d831f626872f04ab82b4a66f79b6a25892
Author: Robert Ancell <robert ancell gmail com>
Date: Mon Jul 6 23:35:59 2009 +1000
...
data/gcalctool.ui | 40 ++++++++++++++++++++--------------------
src/gtk.c | 10 +++++++---
src/mp-convert.c | 2 --
3 files changed, 27 insertions(+), 25 deletions(-)
---
diff --git a/data/gcalctool.ui b/data/gcalctool.ui
index 6754fbe..789cd2f 100644
--- a/data/gcalctool.ui
+++ b/data/gcalctool.ui
@@ -2544,7 +2544,7 @@
</child>
<child>
<object class="GtkButton" id="calc_start_group_button">
- <property name="label" translatable="yes" comments="Start calculation group button">(</property>
+ <property name="label">(</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -2567,7 +2567,7 @@
</child>
<child>
<object class="GtkButton" id="calc_end_group_button">
- <property name="label" translatable="yes" comments="Right bracket">)</property>
+ <property name="label">)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -2748,7 +2748,7 @@
<child>
<object class="GtkLabel" id="pi_label">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="Variable label button - text set inside gtk.c">π</property>
+ <property name="label">π</property>
<property name="use_markup">True</property>
</object>
</child>
@@ -2909,7 +2909,7 @@
<child>
<object class="GtkLabel" id="eulers_number_label">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="Variable label button - text set inside gtk.c"><i>e</i></property>
+ <property name="label"><i>e</i></property>
<property name="use_markup">True</property>
</object>
</child>
@@ -3068,7 +3068,7 @@
<child>
<object class="GtkLabel" id="imaginary_label">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="Variable label button - text set inside gtk.c"><i>i</i></property>
+ <property name="label"><i>i</i></property>
<property name="use_markup">True</property>
</object>
</child>
@@ -3609,7 +3609,7 @@
<property name="n_columns">10</property>
<child>
<object class="GtkButton" id="calc_si_kilo_button">
- <property name="label" translatable="yes">k</property>
+ <property name="label">k</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3625,7 +3625,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_milli_button">
- <property name="label" translatable="yes">m</property>
+ <property name="label">m</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3641,7 +3641,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_micro_button">
- <property name="label" translatable="yes">µ</property>
+ <property name="label">µ</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3657,7 +3657,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_mega_button">
- <property name="label" translatable="yes">M</property>
+ <property name="label">M</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3673,7 +3673,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_giga_button">
- <property name="label" translatable="yes">G</property>
+ <property name="label">G</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3689,7 +3689,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_peta_button">
- <property name="label" translatable="yes">P</property>
+ <property name="label">P</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3705,7 +3705,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_femto_button">
- <property name="label" translatable="yes">f</property>
+ <property name="label">f</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3719,7 +3719,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_pico_button">
- <property name="label" translatable="yes">p</property>
+ <property name="label">p</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3735,7 +3735,7 @@
</child>
<child>
<object class="GtkButton" id="calc_si_nano_button">
- <property name="label" translatable="yes">n</property>
+ <property name="label">n</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3767,7 +3767,7 @@
<property name="n_columns">10</property>
<child>
<object class="GtkButton" id="calc_tangent_button">
- <property name="label" translatable="yes">tan</property>
+ <property name="label">tan</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3784,7 +3784,7 @@
</child>
<child>
<object class="GtkButton" id="calc_sine_button">
- <property name="label" translatable="yes">sin</property>
+ <property name="label">sin</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3801,7 +3801,7 @@
</child>
<child>
<object class="GtkButton" id="calc_cosine_button">
- <property name="label" translatable="yes">cos</property>
+ <property name="label">cos</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3818,7 +3818,7 @@
</child>
<child>
<object class="GtkButton" id="calc_hyperbolic_cosine_button">
- <property name="label" translatable="yes">cosh</property>
+ <property name="label">cosh</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3835,7 +3835,7 @@
</child>
<child>
<object class="GtkButton" id="calc_hyperbolic_sine_button">
- <property name="label" translatable="yes">sinh</property>
+ <property name="label">sinh</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3852,7 +3852,7 @@
</child>
<child>
<object class="GtkButton" id="calc_hyperbolic_tangent_button">
- <property name="label" translatable="yes">tanh</property>
+ <property name="label">tanh</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
diff --git a/src/gtk.c b/src/gtk.c
index 81bd1c3..f69133d 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -1482,16 +1482,20 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
if (state != 0)
return FALSE;
+
+ // FIXME: event->string deprecated
for (i = 0; conversions[i]; i++) {
- // FIXME: event->string deprecated
- if (strncmp(event->string, conversions[i], strlen(conversions[i])) == 0) {
+ if (strcmp(event->string, conversions[i]) == 0) {
do_text(conversion_values[i]);
return TRUE;
}
}
+ if (strcmp(event->string, ".") == 0) {
+ do_text(v->radix);
+ return TRUE;
+ }
- // FIXME: event->string deprecated
switch(*event->string)
{
case '<':
diff --git a/src/mp-convert.c b/src/mp-convert.c
index d29553d..0dea37f 100644
--- a/src/mp-convert.c
+++ b/src/mp-convert.c
@@ -655,8 +655,6 @@ mp_set_from_string(const char *str, MPNumber *z)
const char *si_suffixes[] = {"T", "G", "M", "k", "d", "c", "m", "u", "µ", "n", "p", "f", NULL};
int si_multipliers[] = { 12, 9, 6, 3, -1, -2, -3, -6, -6, -9, -12, -15};
- printf("'%s'\n", str);
-
/* Find the base */
end = str;
while (*end != '\0')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]