[gcalctool] Support entering super/subscript with numeric keypad (Bug #634904)
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcalctool] Support entering super/subscript with numeric keypad (Bug #634904)
- Date: Fri, 18 Mar 2011 04:33:45 +0000 (UTC)
commit 0c2340ff74a39cf37106573f4867a162a0f3b184
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Mar 18 15:33:38 2011 +1100
Support entering super/subscript with numeric keypad (Bug #634904)
NEWS | 1 +
src/math-display.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 6b5c427..8031fa0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Overview of changes in gcalctool 5.91.91
* Don't use automatic exponential format when not in base 10
* Only use thousands separators in base 10
* Set currency on first start (Bug #640818)
+ * Support entering super/subscript with numeric keypad (Bug #634904)
Overview of changes in gcalctool 5.91.90
diff --git a/src/math-display.c b/src/math-display.c
index b4d87af..d466831 100644
--- a/src/math-display.c
+++ b/src/math-display.c
@@ -203,33 +203,43 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
switch(event->keyval)
{
case GDK_KEY_0:
+ case GDK_KEY_KP_0:
math_equation_insert(display->priv->equation, "â?°");
return TRUE;
case GDK_KEY_1:
+ case GDK_KEY_KP_1:
math_equation_insert(display->priv->equation, "¹");
return TRUE;
case GDK_KEY_2:
+ case GDK_KEY_KP_2:
math_equation_insert(display->priv->equation, "²");
return TRUE;
case GDK_KEY_3:
+ case GDK_KEY_KP_3:
math_equation_insert(display->priv->equation, "³");
return TRUE;
case GDK_KEY_4:
+ case GDK_KEY_KP_4:
math_equation_insert(display->priv->equation, "â?´");
return TRUE;
case GDK_KEY_5:
+ case GDK_KEY_KP_5:
math_equation_insert(display->priv->equation, "â?µ");
return TRUE;
case GDK_KEY_6:
+ case GDK_KEY_KP_6:
math_equation_insert(display->priv->equation, "â?¶");
return TRUE;
case GDK_KEY_7:
+ case GDK_KEY_KP_7:
math_equation_insert(display->priv->equation, "â?·");
return TRUE;
case GDK_KEY_8:
+ case GDK_KEY_KP_8:
math_equation_insert(display->priv->equation, "â?¸");
return TRUE;
case GDK_KEY_9:
+ case GDK_KEY_KP_9:
math_equation_insert(display->priv->equation, "â?¹");
return TRUE;
}
@@ -238,33 +248,43 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
switch(event->keyval)
{
case GDK_KEY_0:
+ case GDK_KEY_KP_0:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_1:
+ case GDK_KEY_KP_1:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_2:
+ case GDK_KEY_KP_2:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_3:
+ case GDK_KEY_KP_3:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_4:
+ case GDK_KEY_KP_4:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_5:
+ case GDK_KEY_KP_5:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_6:
+ case GDK_KEY_KP_6:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_7:
+ case GDK_KEY_KP_7:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_8:
+ case GDK_KEY_KP_8:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
case GDK_KEY_9:
+ case GDK_KEY_KP_9:
math_equation_insert(display->priv->equation, "â??");
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]