Commit 15374833 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added new public function gimp_dockable_blink_cancel() which stops title

2005-07-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: added new public function
	gimp_dockable_blink_cancel() which stops title blinking.

	* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked):
	cancel blinking when updating a picked color so the dockable
	doesn't flicker for each cursor movement.
parent 736c547b
2005-07-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockable.[ch]: added new public function
gimp_dockable_blink_cancel() which stops title blinking.
* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked):
cancel blinking when updating a picked color so the dockable
doesn't flicker for each cursor movement.
2005-07-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppaletteeditor.c (gimp_palette_editor_pick_color):
......
......@@ -33,6 +33,7 @@
#include "widgets/gimpcolorframe.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdockable.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimppaletteeditor.h"
#include "widgets/gimptooldialog.h"
......@@ -301,6 +302,10 @@ gimp_color_picker_tool_picked (GimpColorTool *color_tool,
"gimp-palette-editor",
-1);
/* don't blink like mad when updating */
if (pick_state == GIMP_COLOR_PICK_STATE_UPDATE)
gimp_dockable_blink_cancel (GIMP_DOCKABLE (dockable));
palette_editor = gtk_bin_get_child (GTK_BIN (dockable));
data = gimp_data_editor_get_data (GIMP_DATA_EDITOR (palette_editor));
......
......@@ -258,11 +258,7 @@ gimp_dockable_destroy (GtkObject *object)
}
if (dockable->blink_timeout_id)
{
g_source_remove (dockable->blink_timeout_id);
dockable->blink_timeout_id = 0;
dockable->blink_counter = 0;
}
gimp_dockable_blink_cancel (dockable);
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
......@@ -871,6 +867,18 @@ gimp_dockable_blink (GimpDockable *dockable)
gimp_dockable_blink_timeout (dockable);
}
void
gimp_dockable_blink_cancel (GimpDockable *dockable)
{
g_return_if_fail (GIMP_IS_DOCKABLE (dockable));
if (dockable->blink_timeout_id)
{
g_source_remove (dockable->blink_timeout_id);
dockable->blink_timeout_id = 0;
dockable->blink_counter = 0;
}
}
/* private functions */
......
......@@ -90,6 +90,7 @@ GimpUIManager * gimp_dockable_get_menu (GimpDockable *dockable,
void gimp_dockable_detach (GimpDockable *dockable);
void gimp_dockable_blink (GimpDockable *dockable);
void gimp_dockable_blink_cancel (GimpDockable *dockable);
#endif /* __GIMP_DOCKABLE_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment