gimp r25549 - in trunk: . app/display
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25549 - in trunk: . app/display
- Date: Tue, 29 Apr 2008 10:08:53 +0100 (BST)
Author: neo
Date: Tue Apr 29 09:08:53 2008
New Revision: 25549
URL: http://svn.gnome.org/viewvc/gimp?rev=25549&view=rev
Log:
2008-04-29 Sven Neumann <sven gimp org>
* app/display/gimpscalecombobox.[ch]: added signal
"entry-activated".
* app/display/gimpstatusbar.c (gimp_statusbar_new): connect to
the
new signal and move the focus to the canvas.
* app/display/gimpdisplayshell.c (gimp_display_shell_new):
comment.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell.c
trunk/app/display/gimpscalecombobox.c
trunk/app/display/gimpscalecombobox.h
trunk/app/display/gimpstatusbar.c
Modified: trunk/app/display/gimpdisplayshell.c
==============================================================================
--- trunk/app/display/gimpdisplayshell.c (original)
+++ trunk/app/display/gimpdisplayshell.c Tue Apr 29 09:08:53 2008
@@ -1184,6 +1184,8 @@
gtk_widget_show (main_vbox);
+ /* add display filter for color management */
+
filter = gimp_display_shell_filter_new (shell,
display->gimp->config->color_management);
Modified: trunk/app/display/gimpscalecombobox.c
==============================================================================
--- trunk/app/display/gimpscalecombobox.c (original)
+++ trunk/app/display/gimpscalecombobox.c Tue Apr 29 09:08:53 2008
@@ -30,6 +30,8 @@
#include "display-types.h"
+#include "core/gimpmarshal.h"
+
#include "gimpscalecombobox.h"
@@ -43,6 +45,12 @@
NUM_COLUMNS
};
+enum
+{
+ ENTRY_ACTIVATED,
+ LAST_SIGNAL
+};
+
static void gimp_scale_combo_box_finalize (GObject *object);
@@ -64,6 +72,8 @@
#define parent_class gimp_scale_combo_box_parent_class
+static guint scale_combo_box_signals[LAST_SIGNAL] = { 0 };
+
static void
gimp_scale_combo_box_class_init (GimpScaleComboBoxClass *klass)
@@ -71,10 +81,21 @@
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->finalize = gimp_scale_combo_box_finalize;
+ scale_combo_box_signals[ENTRY_ACTIVATED] =
+ g_signal_new ("entry-activated",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GimpScaleComboBoxClass, entry_activated),
+ NULL, NULL,
+ gimp_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ object_class->finalize = gimp_scale_combo_box_finalize;
widget_class->style_set = gimp_scale_combo_box_style_set;
+ klass->entry_activated = NULL;
+
gtk_widget_class_install_style_property (widget_class,
g_param_spec_double ("label-scale",
NULL, NULL,
@@ -295,10 +316,12 @@
}
else
{
- gtk_widget_error_bell (GTK_WIDGET (combo_box));
+ gtk_widget_error_bell (GTK_WIDGET (entry));
gimp_scale_combo_box_set_scale (combo_box, combo_box->scale);
}
+
+ g_signal_emit (combo_box, scale_combo_box_signals[ENTRY_ACTIVATED], 0);
}
static void
Modified: trunk/app/display/gimpscalecombobox.h
==============================================================================
--- trunk/app/display/gimpscalecombobox.h (original)
+++ trunk/app/display/gimpscalecombobox.h Tue Apr 29 09:08:53 2008
@@ -38,6 +38,8 @@
struct _GimpScaleComboBoxClass
{
GtkComboBoxEntryClass parent_instance;
+
+ void (* entry_activated) (GimpScaleComboBox *combo_box);
};
struct _GimpScaleComboBox
Modified: trunk/app/display/gimpstatusbar.c
==============================================================================
--- trunk/app/display/gimpstatusbar.c (original)
+++ trunk/app/display/gimpstatusbar.c Tue Apr 29 09:08:53 2008
@@ -651,6 +651,10 @@
G_CALLBACK (gimp_statusbar_shell_scaled),
statusbar, 0);
+ g_signal_connect_object (statusbar->scale_combo, "entry-activated",
+ G_CALLBACK (gtk_widget_grab_focus),
+ shell->canvas, G_CONNECT_SWAPPED);
+
return GTK_WIDGET (statusbar);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]