gimp r26851 - in branches/soc-2008-text: . app/display app/pdb app/plug-in app/widgets libgimp libgimpwidgets modules plug-ins plug-ins/pygimp po
- From: danedde svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26851 - in branches/soc-2008-text: . app/display app/pdb app/plug-in app/widgets libgimp libgimpwidgets modules plug-ins plug-ins/pygimp po
- Date: Wed, 3 Sep 2008 21:54:40 +0000 (UTC)
Author: danedde
Date: Wed Sep 3 21:54:39 2008
New Revision: 26851
URL: http://svn.gnome.org/viewvc/gimp?rev=26851&view=rev
Log:
2008-09-03 Daniel Eddeland <danedde svn gnome org>
Merged 26837:26849 from trunk, and tried
to fix oddities, and fix make error
Added:
branches/soc-2008-text/plug-ins/
- copied from r26849, /trunk/plug-ins/
branches/soc-2008-text/plug-ins/pygimp/
- copied from r26850, /trunk/plug-ins/pygimp/
Modified:
branches/soc-2008-text/ChangeLog
branches/soc-2008-text/README.i18n
branches/soc-2008-text/app/display/gimpdisplayshell-callbacks.c
branches/soc-2008-text/app/pdb/gimpprocedure.c
branches/soc-2008-text/app/pdb/gimpprocedure.h
branches/soc-2008-text/app/plug-in/gimppluginshm.c
branches/soc-2008-text/app/widgets/gimpcontrollerkeyboard.c
branches/soc-2008-text/app/widgets/gimpcontrollerwheel.c
branches/soc-2008-text/app/widgets/gimpnavigationview.c
branches/soc-2008-text/configure.in
branches/soc-2008-text/libgimp/gimpzoompreview.c
branches/soc-2008-text/libgimpwidgets/gimpbutton.c
branches/soc-2008-text/libgimpwidgets/gimpcolorselect.c
branches/soc-2008-text/modules/color-selector-water.c
branches/soc-2008-text/po/ChangeLog
branches/soc-2008-text/po/sv.po
Modified: branches/soc-2008-text/README.i18n
==============================================================================
--- branches/soc-2008-text/README.i18n (original)
+++ branches/soc-2008-text/README.i18n Wed Sep 3 21:54:39 2008
@@ -1,170 +1,28 @@
-This document exists to document the important things to care
-for because of locale support. It is aimed at developers and
-translators. If you are a translator, you can skip the first
-sections, but you definitely want to read sections 5 - 9.
-
- Table of Contents
-
- 1. Why localisation?
- 2. How
- 3. Deep inside ...
- 4. Some magic ...
- 5. Tools and how to use them
- 6. Gimp is different
- 7. Adding additional textdomains
- 8. Tip of the Day messages
- 9. How to contribute
- 10. And more ?
-
-
-1. Why localisation?
-
- Many persons from many countries start to get used to Linux.
- Unfortunately not everyone is able to understand English. But
- even those people sometimes like to use good and free software
- without using a dictionary to get the unknown words.
- So why not simply localise the software to make it available to
- the mass which isn't wholly English native? Of course this also
- eases the migration from PhotoX to GIMP. :))
-
-2. How?
-
- GNU provides a very nice package called gettext. This one offers
- the possibility to translate chosen messages from the native language
- of the program into that one of the users if a necessary catalog is
- provided. Gettext therefore provides some easy tools to create and
- maintain such catalogs and a few functions which can be called by the
- program to enable automatic translation at runtime. The program gets
- linked to the gettext library or glibc2 which already provides that
- functionality and everything is fine.
-
-3. Deep inside...
-
- GIMP provides header files called gimpintl.h and stdplugins-intl.h in
- the libgimp directory which check whether gettext is available on the
- system which GIMP is compiled on and will deactivate language support
- if it's not.
-
- If the gettext system is there it will declare 3 functions which will be
- described below.
-
-3.1 _() [more correctly: char * _( char * )]
-
- This one is a macro for the function gettext(). You can wrap any text
- with it that is allowed to be a return value of a function. If you
- use it then libintl will try to translate it into the native language
- of the user according to his/her environmental settings.
- The gettext() function will do a lookup in the hashed catalog which
- contains all the translated texts.
-
- - If it is found a pointer to the string will be returned to the caller.
- - If not, the caller will receive a pointer to the original string.
-
- This way it is ensured that there isn't any harm caused to the program
- if no useful catalog is installed.
-
- Please note that it is important to use _() directly (and not gettext())
- for simple messages because of reasons that will be mentioned below.
-
- NOTE: I know some of the developer like short functions like _() but
- for a better source understanding I suggest to use it consistently only
- for text (like _("That's text!")) and not for variables (like _(text)).
- Use gettext(text) instead.
-
-
-3.2 N_() [more correctly: const char * ( const char * ) ]
-
- This one is a macro for the function gettext_noop(). As you can see
- and guess it doesn't really do anything in the programm i.e. it is a
- dummy macro but nevertheless important. As it isn't possible to call
- functions in a structure as seen here:
-
- struct blurb
- {
- _("This won't work\n");
- }
-
- you have to do it in some other way. In GIMP such structures are
- often used to create menus or similar things very simply. Here you
- have to use the dummy to allow the generation of the template catalog
- which will be described below. This one doesn't do anything but it
- marks the text as important to the xgettext extractor.
-
- The text has to be translated manually with the next function.
-
-3.3 gettext()
-
- This function is the same as that macro in 3.1. But there is one big
- difference: The _()'s and N_()'s are the only expressions which get
- parsed by the template generator.
- If you have strings that should be translated but are unfortunately
- in a structure you have to do that on your own which means that you
- have to parse the fields with the messages in a loop and translate
- the texts with this gettext() function.
-
- Please note that it may be necessary to free or allocate memory in
- this case!
-
-4. Some magic...
-
- As you have seen we only did the programming part until now but this
- isn't all by far. To use catalogs we'll have to create them. Now
- there are 3 different files which are importart:
-
- gimp.pot:
-
- This one is the so called template. It contains the messages which
- are extracted from the sources and empty fields which have to get
- filled by the author. It is used to start a new catalog or to update
- the an already available one.
-
- The Makefile will automatically call the program gettext which will
- extract all messages that are wrapped by a _() or a N_() (but NOT
- gettext()) and concat them to this template.
-
- [language].po:
-
- This file has to be an edited gimp.pot and contains the original
- messages plus the translated ones. This file will be delivered
- together with GIMP and is the base for the final catalog.
-
- [language].mo:
-
- This file is a compiled version of [language.po] which will be
- automatically compiled by the Makefile system and installed in the
- locale directory of the system. It contains everything that the .po
- file contains except not translated messages, comments and other
- overhead. For maximum speed it is also hashed to allow gettext a
- faster search.
-
-5. Tools and how to use them
-
- As mentioned the to be translated strings are extracted directly from
- the source and written to the template.
-
- I guess many of you will now ask if it is necessary to add new
- strings directly to the template or if there's a tool to achieve
- that. I think I can calm down those of you who fear lots of had work
- just to update the language files. There's a program called msgmerge
- which will add all strings that are in the template but not in the
- uncompiled catalog to it. Msgmerge does this job very nicely and also
- tries to use some kind of fuzzy logic method for already translated
- strings for possible reduction of translators work: If an original
- string seems similar to a new one and it already has a translation,
- it will be taken over to the new catalog together with a remark that
-this one may not necessarily fit.
+This file contains some important hints for translators.
-6. Gimp is different
- Gimp is a complex application which has a bunch of scripts and
+The current status of the GIMP translation can be checked at
+
+ http://l10n.gnome.org/module/gimp
+
+
+Translation of the GNU Image Manipulation Program is handled by the
+GNOME Translation Project (see http://l10n.gnome.org/). If you want to
+help, we suggest that you get in touch with the translation team of
+your language (see http://l10n.gnome.org/teams/).
+
+
+GIMP is different
+
+ GIMP is a complex application which has a bunch of scripts and
plug-ins that all want to be internationalized. Therefore there is
- not one catalog but many. For a full translation of GIMP's UI,
- you will have to add translations for the following catalogs:
+ not one catalog but many. For a full translation of GIMP's UI, you
+ will have to add translations for the following catalogs:
po/gimp20.po -- the core
po-libgimp/gimp20-libgimp.pot -- the libgimp library
- po-python/gimp20-python.pot -- the pygimp plug-ins
po-plugins/gimp20-std-plugins.pot -- the C plug-ins
+ po-python/gimp20-python.pot -- the pygimp plug-ins
po-script-fu/gimp20-script-fu.pot -- the script-fu scripts
po-tips/gimp20-tips.pot -- the startup tips
@@ -172,32 +30,12 @@
gimp-perl has been moved into it's own Subversion module called
gimp-perl.
- The version of GIMP you are holding in your hand uses GTK+-2.0.
- GTK+-2.0 requires that all strings are UTF-8 encoded. Therefore to
- make internationalisation work, po files need to be UTF-8 encoded. If
- your editor doesn't support UTF-8, you need to convert it to an
- encoding your editor can handle and convert it back to UTF-8 before
- commiting your changes back. The gnome-i18n module in Subversion has
- some scripts that help with this task, but it can also easily done
- using iconv.
-
-7. Adding additional textdomains
-
- Third-party plug-ins (plug-ins that are not distributed with The
- GIMP) can't have their messages in the gimp-std-plugins textdomain.
- We have therefore provided a mechanism that allows plug-ins to
- install their own message catalogs and tell GIMP to bind to that
- textdomain. This is necessary so that GIMP can correctly translate
- the menu paths the plug-in registers. Basically the plug-in has to
- call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
- before it registers any functions. Have a look at the script-fu
- plug-in to see how this is done in detail.
-8. Tip of the Day messages
+GIMP Tips dialog
- In addition to message catalogs Gimp provides a file with tips that
- are displayed in a Tip of The Day window. This file is in XML format
- and can be found in the tips directory. The english tips messages are
+ In addition to message catalogs GIMP provides a file with tips that
+ are displayed in the Tips dialog. This file is in XML format and can
+ be found in the tips directory. The english tips messages are
extracted from gimp-tips.xml.in so translators can use the usual
tools to create a <lang>.po file that holds the translations. All
translations are then merged into gimp-tips.xml with language
@@ -208,27 +46,19 @@
message catalog that needs to be translated correctly. For a german
translation of the tips this would look like this:
- #: app/gui/tips-parser.c:158
+ #: ../app/dialogs/tips-parser.c:188
msgid "tips-locale:C"
msgstr "tips-locale:de"
-9. How to contribute
-
- Any help with translations is appreciated. If you want to help,
- please get in contact with the people from the GNOME Translation
- Project who coordinate all translation efforts in the GNOME
- Subversion tree. They have a nice web-page at
- http://developer.gnome.org/projects/gtp/.
-
-10. And more?
-
- We hope we mentioned everything that is worth it and hope that this
- document will clarify some things. If it doesn't please write us a
- mail. This text of course contains errors, so if you find one tell
- us...
-
-Happy Gimping.
- Daniel Egger
- Sven Neumann
+Localization of third-party plug-ins
+ Third-party plug-ins (plug-ins that are not distributed with GIMP)
+ can't have their messages in the gimp-std-plugins textdomain. We
+ have therefore provided a mechanism that allows plug-ins to install
+ their own message catalogs and tell GIMP to bind to that
+ textdomain. This is necessary so that GIMP can correctly translate
+ the menu paths the plug-in registers. Basically the plug-in has to
+ call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
+ before it registers any functions. Have a look at the script-fu
+ plug-in to see how this is done in detail.
Modified: branches/soc-2008-text/app/display/gimpdisplayshell-callbacks.c
==============================================================================
--- branches/soc-2008-text/app/display/gimpdisplayshell-callbacks.c (original)
+++ branches/soc-2008-text/app/display/gimpdisplayshell-callbacks.c Wed Sep 3 21:54:39 2008
@@ -1144,15 +1144,8 @@
}
}
- /* Ask for the pointer position, but ignore it except for cursor
- * handling, so motion events sync with the button press/release events
- */
- if (mevent->is_hint)
- {
- gimp_display_shell_get_device_coords (shell,
- mevent->device,
- &display_coords);
- }
+ /* Ask for more motion events in case the event was a hint */
+ gdk_event_request_motions (mevent);
update_sw_cursor = TRUE;
Modified: branches/soc-2008-text/app/pdb/gimpprocedure.c
==============================================================================
--- branches/soc-2008-text/app/pdb/gimpprocedure.c (original)
+++ branches/soc-2008-text/app/pdb/gimpprocedure.c Wed Sep 3 21:54:39 2008
@@ -247,25 +247,25 @@
void
gimp_procedure_set_static_strings (GimpProcedure *procedure,
- gchar *original_name,
- gchar *blurb,
- gchar *help,
- gchar *author,
- gchar *copyright,
- gchar *date,
- gchar *deprecated)
+ const gchar *original_name,
+ const gchar *blurb,
+ const gchar *help,
+ const gchar *author,
+ const gchar *copyright,
+ const gchar *date,
+ const gchar *deprecated)
{
g_return_if_fail (GIMP_IS_PROCEDURE (procedure));
gimp_procedure_free_strings (procedure);
- procedure->original_name = original_name;
- procedure->blurb = blurb;
- procedure->help = help;
- procedure->author = author;
- procedure->copyright = copyright;
- procedure->date = date;
- procedure->deprecated = deprecated;
+ procedure->original_name = (gchar *) original_name;
+ procedure->blurb = (gchar *) blurb;
+ procedure->help = (gchar *) help;
+ procedure->author = (gchar *) author;
+ procedure->copyright = (gchar *) copyright;
+ procedure->date = (gchar *) date;
+ procedure->deprecated = (gchar *) deprecated;
procedure->static_strings = TRUE;
}
Modified: branches/soc-2008-text/app/pdb/gimpprocedure.h
==============================================================================
--- branches/soc-2008-text/app/pdb/gimpprocedure.h (original)
+++ branches/soc-2008-text/app/pdb/gimpprocedure.h Wed Sep 3 21:54:39 2008
@@ -98,13 +98,13 @@
const gchar *date,
const gchar *deprecated);
void gimp_procedure_set_static_strings (GimpProcedure *procedure,
- gchar *original_name,
- gchar *blurb,
- gchar *help,
- gchar *author,
- gchar *copyright,
- gchar *date,
- gchar *deprecated);
+ const gchar *original_name,
+ const gchar *blurb,
+ const gchar *help,
+ const gchar *author,
+ const gchar *copyright,
+ const gchar *date,
+ const gchar *deprecated);
void gimp_procedure_take_strings (GimpProcedure *procedure,
gchar *original_name,
gchar *blurb,
Modified: branches/soc-2008-text/app/plug-in/gimppluginshm.c
==============================================================================
--- branches/soc-2008-text/app/plug-in/gimppluginshm.c (original)
+++ branches/soc-2008-text/app/plug-in/gimppluginshm.c Wed Sep 3 21:54:39 2008
@@ -60,6 +60,10 @@
#define USE_WIN32_SHM 1
+#ifndef INVALID_FILE_HANDLE
+#define INVALID_FILE_HANDLE ((HANDLE) 0xFFFFFFFF)
+#endif
+
#endif /* G_OS_WIN32 || G_WITH_CYGWIN */
#include "plug-in-types.h"
Modified: branches/soc-2008-text/app/widgets/gimpcontrollerkeyboard.c
==============================================================================
--- branches/soc-2008-text/app/widgets/gimpcontrollerkeyboard.c (original)
+++ branches/soc-2008-text/app/widgets/gimpcontrollerkeyboard.c Wed Sep 3 21:54:39 2008
@@ -42,7 +42,7 @@
const guint keyval;
const GdkModifierType modifiers;
const gchar *name;
- gchar *blurb;
+ const gchar *blurb;
};
Modified: branches/soc-2008-text/app/widgets/gimpcontrollerwheel.c
==============================================================================
--- branches/soc-2008-text/app/widgets/gimpcontrollerwheel.c (original)
+++ branches/soc-2008-text/app/widgets/gimpcontrollerwheel.c Wed Sep 3 21:54:39 2008
@@ -44,7 +44,7 @@
const GdkScrollDirection direction;
const GdkModifierType modifiers;
const gchar *name;
- gchar *blurb;
+ const gchar *blurb;
};
Modified: branches/soc-2008-text/app/widgets/gimpnavigationview.c
==============================================================================
--- branches/soc-2008-text/app/widgets/gimpnavigationview.c (original)
+++ branches/soc-2008-text/app/widgets/gimpnavigationview.c Wed Sep 3 21:54:39 2008
@@ -255,7 +255,7 @@
window = GIMP_VIEW (nav_view)->event_window;
- gdk_pointer_grab (window, TRUE,
+ gdk_pointer_grab (window, FALSE,
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK |
@@ -383,7 +383,6 @@
{
GimpNavigationView *nav_view = GIMP_NAVIGATION_VIEW (widget);
GimpView *view = GIMP_VIEW (widget);
- gint x, y;
if (! nav_view->has_grab)
{
@@ -416,11 +415,9 @@
return FALSE;
}
- gdk_window_get_pointer (view->event_window, &x, &y, NULL);
-
gimp_navigation_view_move_to (nav_view,
- x - nav_view->motion_offset_x,
- y - nav_view->motion_offset_y);
+ mevent->x - nav_view->motion_offset_x,
+ mevent->y - nav_view->motion_offset_y);
gdk_event_request_motions (mevent);
Modified: branches/soc-2008-text/configure.in
==============================================================================
--- branches/soc-2008-text/configure.in (original)
+++ branches/soc-2008-text/configure.in Wed Sep 3 21:54:39 2008
@@ -1646,8 +1646,8 @@
if test "x$enable_python" != xno; then
enable_python="yes"
# check for Python
- AM_PATH_PYTHON(2.3.5,,
- [AC_MSG_ERROR([pycheck_error([Python 2.3.5 or newer], [it])])])
+ AM_PATH_PYTHON(2.5.0,,
+ [AC_MSG_ERROR([pycheck_error([Python 2.5.0 or newer], [it])])])
AM_CHECK_PYTHON_HEADERS(,
[AC_MSG_ERROR([pycheck_error([Python headers], [them])])])
Modified: branches/soc-2008-text/libgimp/gimpzoompreview.c
==============================================================================
--- branches/soc-2008-text/libgimp/gimpzoompreview.c (original)
+++ branches/soc-2008-text/libgimp/gimpzoompreview.c Wed Sep 3 21:54:39 2008
@@ -518,6 +518,8 @@
gint src_y;
gint src_width;
gint src_height;
+ gint offsx = 0;
+ gint offsy = 0;
selection_id = gimp_image_get_selection (image_id);
@@ -532,8 +534,9 @@
src_x, src_y,
src_width, src_height,
&width, &height, &bpp);
+ gimp_drawable_offsets (drawable->drawable_id, &offsx, &offsy);
sel = gimp_drawable_get_sub_thumbnail_data (selection_id,
- src_x, src_y,
+ src_x + offsx, src_y + offsy,
src_width, src_height,
&width, &height, &bpp);
@@ -632,10 +635,10 @@
priv->drawable = drawable;
- if (_gimp_drawable_preview_get_bounds (drawable, &x1, &y1, &x2, &y2))
+ if (gimp_drawable_mask_intersect (drawable->drawable_id, &x1, &y1, &width, &height))
{
- width = x2 - x1;
- height = y2 - y1;
+ x2 = x1 + width;
+ y2 = y1 + height;
priv->extents.x = x1;
priv->extents.y = y1;
Modified: branches/soc-2008-text/libgimpwidgets/gimpbutton.c
==============================================================================
--- branches/soc-2008-text/libgimpwidgets/gimpbutton.c (original)
+++ branches/soc-2008-text/libgimpwidgets/gimpbutton.c Wed Sep 3 21:54:39 2008
@@ -2,7 +2,7 @@
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpbutton.c
- * Copyright (C) 2000 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2000-2008 Michael Natterer <mitch gimp org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -36,10 +36,9 @@
};
-static gboolean gimp_button_button_press (GtkWidget *widget,
- GdkEventButton *event);
-static gboolean gimp_button_button_release (GtkWidget *widget,
- GdkEventButton *event);
+static gboolean gimp_button_button_press (GtkWidget *widget,
+ GdkEventButton *event);
+static void gimp_button_clicked (GtkButton *button);
G_DEFINE_TYPE (GimpButton, gimp_button, GTK_TYPE_BUTTON)
@@ -53,6 +52,7 @@
gimp_button_class_init (GimpButtonClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass);
button_signals[EXTENDED_CLICKED] =
g_signal_new ("extended-clicked",
@@ -64,8 +64,9 @@
G_TYPE_NONE, 1,
GDK_TYPE_MODIFIER_TYPE);
- widget_class->button_press_event = gimp_button_button_press;
- widget_class->button_release_event = gimp_button_button_release;
+ widget_class->button_press_event = gimp_button_button_press;
+
+ button_class->clicked = gimp_button_clicked;
}
static void
@@ -118,52 +119,18 @@
button->press_state = 0;
}
- if (GTK_WIDGET_CLASS (parent_class)->button_press_event)
- return GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, bevent);
-
- return TRUE;
+ return GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, bevent);
}
-static gboolean
-gimp_button_button_release (GtkWidget *widget,
- GdkEventButton *bevent)
+static void
+gimp_button_clicked (GtkButton *button)
{
- GtkButton *button = GTK_BUTTON (widget);
- gboolean extended_clicked = FALSE;
-
- if (bevent->button == 1)
+ if (GIMP_BUTTON (button)->press_state &
+ (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK))
{
- if (button->in_button &&
- (GIMP_BUTTON (button)->press_state &
- (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)))
- {
- gimp_button_extended_clicked (GIMP_BUTTON (button),
- GIMP_BUTTON (button)->press_state);
-
- extended_clicked = TRUE;
-
- /* HACK: don't let GtkButton emit "clicked" by telling it that
- * the mouse pointer is outside the widget
- */
- button->in_button = FALSE;
- }
- }
-
- if (GTK_WIDGET_CLASS (parent_class)->button_release_event)
- GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, bevent);
+ g_signal_stop_emission_by_name (button, "clicked");
- if (extended_clicked)
- {
- /* revert the above HACK and let the button draw itself in the
- * correct state, because upchaining with "in_button" == FALSE
- * messed it up
- */
- button->in_button = TRUE;
-
- gtk_widget_set_state (widget, GTK_STATE_PRELIGHT);
- gtk_widget_queue_draw (widget);
- gdk_window_process_updates (widget->window, TRUE);
- }
-
- return TRUE;
+ gimp_button_extended_clicked (GIMP_BUTTON (button),
+ GIMP_BUTTON (button)->press_state);
+ }
}
Modified: branches/soc-2008-text/libgimpwidgets/gimpcolorselect.c
==============================================================================
--- branches/soc-2008-text/libgimpwidgets/gimpcolorselect.c (original)
+++ branches/soc-2008-text/libgimpwidgets/gimpcolorselect.c Wed Sep 3 21:54:39 2008
@@ -667,15 +667,8 @@
case GDK_MOTION_NOTIFY:
mevent = (GdkEventMotion *) event;
- if (mevent->is_hint)
- {
- gdk_window_get_pointer (widget->window, &x, &y, NULL);
- }
- else
- {
- x = mevent->x;
- y = mevent->y;
- }
+ x = mevent->x;
+ y = mevent->y;
break;
default:
@@ -700,8 +693,8 @@
gimp_color_select_update (select, UPDATE_VALUES | UPDATE_CALLER);
- if (event->type == GDK_MOTION_NOTIFY)
- gdk_event_request_motions ((GdkEventMotion *) event);
+ /* Ask for more motion events in case the event was a hint */
+ gdk_event_request_motions ((GdkEventMotion *) event);
return TRUE;
}
@@ -760,14 +753,7 @@
case GDK_MOTION_NOTIFY:
mevent = (GdkEventMotion *) event;
- if (mevent->is_hint)
- {
- gdk_window_get_pointer (widget->window, NULL, &z, NULL);
- }
- else
- {
- z = mevent->y;
- }
+ z = mevent->y;
break;
default:
@@ -787,6 +773,9 @@
gimp_color_select_update (select,
UPDATE_VALUES | UPDATE_XY_COLOR | UPDATE_CALLER);
+ /* Ask for more motion events in case the event was a hint */
+ gdk_event_request_motions ((GdkEventMotion *) event);
+
return TRUE;
}
Modified: branches/soc-2008-text/modules/color-selector-water.c
==============================================================================
--- branches/soc-2008-text/modules/color-selector-water.c (original)
+++ branches/soc-2008-text/modules/color-selector-water.c Wed Sep 3 21:54:39 2008
@@ -395,8 +395,8 @@
}
}
- if (event->is_hint)
- gdk_device_get_state (event->device, event->window, NULL, NULL);
+ /* Ask for more motion events in case the event was a hint */
+ gdk_event_request_motions (event);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]