[gimp/gtk3-port: 91/249] script-fu: port to GTK+ 3.0
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 91/249] script-fu: port to GTK+ 3.0
- Date: Mon, 21 Mar 2011 20:43:37 +0000 (UTC)
commit c4cb3b4074410d5c182bb672017e3d532f0e6ad5
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 20 14:10:33 2010 +0200
script-fu: port to GTK+ 3.0
plug-ins/script-fu/script-fu-console.c | 22 +++++++++++-----------
plug-ins/script-fu/script-fu-interface.c | 25 ++++++++-----------------
2 files changed, 19 insertions(+), 28 deletions(-)
---
diff --git a/plug-ins/script-fu/script-fu-console.c b/plug-ins/script-fu/script-fu-console.c
index 69f8df8..1055e13 100644
--- a/plug-ins/script-fu/script-fu-console.c
+++ b/plug-ins/script-fu/script-fu-console.c
@@ -573,9 +573,9 @@ script_fu_cc_key_function (GtkWidget *widget,
switch (event->keyval)
{
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
if (script_fu_cc_is_empty (console))
return TRUE;
@@ -648,24 +648,24 @@ script_fu_cc_key_function (GtkWidget *widget,
return TRUE;
break;
- case GDK_KP_Up:
- case GDK_Up:
+ case GDK_KEY_KP_Up:
+ case GDK_KEY_Up:
direction = -1;
break;
- case GDK_KP_Down:
- case GDK_Down:
+ case GDK_KEY_KP_Down:
+ case GDK_KEY_Down:
direction = 1;
break;
- case GDK_P:
- case GDK_p:
+ case GDK_KEY_P:
+ case GDK_KEY_p:
if (event->state & GDK_CONTROL_MASK)
direction = -1;
break;
- case GDK_N:
- case GDK_n:
+ case GDK_KEY_N:
+ case GDK_KEY_n:
if (event->state & GDK_CONTROL_MASK)
direction = 1;
break;
diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c
index 0d49142..8496f3c 100644
--- a/plug-ins/script-fu/script-fu-interface.c
+++ b/plug-ins/script-fu/script-fu-interface.c
@@ -270,14 +270,14 @@ script_fu_interface (SFScript *script,
for (i = start_arg; i < script->n_args; i++)
{
- GtkWidget *widget = NULL;
- GtkObject *adj;
- gchar *label_text;
- gfloat label_yalign = 0.5;
- gint *ID_ptr = NULL;
- gint row = i;
- gboolean left_align = FALSE;
- SFArg *arg = &script->args[i];
+ GtkWidget *widget = NULL;
+ GtkAdjustment *adj;
+ gchar *label_text;
+ gfloat label_yalign = 0.5;
+ gint *ID_ptr = NULL;
+ gint row = i;
+ gboolean left_align = FALSE;
+ SFArg *arg = &script->args[i];
row -= start_arg;
@@ -503,22 +503,13 @@ script_fu_interface (SFScript *script,
break;
case SF_OPTION:
-#if GTK_CHECK_VERSION (2, 24, 0)
widget = gtk_combo_box_text_new ();
-#else
- widget = gtk_combo_box_new_text ();
-#endif
for (list = arg->default_value.sfa_option.list;
list;
list = g_slist_next (list))
{
-#if GTK_CHECK_VERSION (2, 24, 0)
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget),
gettext (list->data));
-#else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget),
- gettext (list->data));
-#endif
}
gtk_combo_box_set_active (GTK_COMBO_BOX (widget),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]