[gimp] app: add binding signals for changing the text size (still unused)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add binding signals for changing the text size (still unused)
- Date: Sat, 20 Mar 2010 22:18:44 +0000 (UTC)
commit 900a99ecb345b1b39e043dd2448ef794c2a80847
Author: Michael Natterer <mitch gimp org>
Date: Sat Mar 20 23:18:14 2010 +0100
app: add binding signals for changing the text size (still unused)
app/widgets/gimptextproxy.c | 18 ++++++++++++++++++
app/widgets/gimptextproxy.h | 2 ++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimptextproxy.c b/app/widgets/gimptextproxy.c
index f6b132b..6f0f2b7 100644
--- a/app/widgets/gimptextproxy.c
+++ b/app/widgets/gimptextproxy.c
@@ -30,6 +30,7 @@
enum
{
+ CHANGE_SIZE,
CHANGE_BASELINE,
CHANGE_KERNING,
LAST_SIGNAL
@@ -72,6 +73,16 @@ gimp_text_proxy_class_init (GimpTextProxyClass *klass)
tv_class->paste_clipboard = gimp_text_proxy_paste_clipboard;
tv_class->toggle_overwrite = gimp_text_proxy_toggle_overwrite;
+ proxy_signals[CHANGE_SIZE] =
+ g_signal_new ("change-size",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (GimpTextProxyClass, change_size),
+ NULL, NULL,
+ gimp_marshal_VOID__DOUBLE,
+ G_TYPE_NONE, 1,
+ G_TYPE_DOUBLE);
+
proxy_signals[CHANGE_BASELINE] =
g_signal_new ("change-baseline",
G_TYPE_FROM_CLASS (klass),
@@ -94,6 +105,13 @@ gimp_text_proxy_class_init (GimpTextProxyClass *klass)
binding_set = gtk_binding_set_by_class (klass);
+ gtk_binding_entry_add_signal (binding_set, GDK_plus, GDK_MOD1_MASK,
+ "change-size", 1,
+ G_TYPE_DOUBLE, 1.0);
+ gtk_binding_entry_add_signal (binding_set, GDK_minus, GDK_MOD1_MASK,
+ "change-size", 1,
+ G_TYPE_DOUBLE, -1.0);
+
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_MOD1_MASK,
"change-baseline", 1,
G_TYPE_DOUBLE, 1.0);
diff --git a/app/widgets/gimptextproxy.h b/app/widgets/gimptextproxy.h
index 937bc4a..4d67b20 100644
--- a/app/widgets/gimptextproxy.h
+++ b/app/widgets/gimptextproxy.h
@@ -41,6 +41,8 @@ struct _GimpTextProxyClass
{
GtkTextViewClass parent_class;
+ void (* change_size) (GimpTextProxy *proxy,
+ gdouble amount);
void (* change_baseline) (GimpTextProxy *proxy,
gdouble amount);
void (* change_kerning) (GimpTextProxy *proxy,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]