Commit 5b024cf3 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

remove GTK+ version check and related evilness because we depend on a

2009-03-22  Michael Natterer  <mitch@gimp.org>

	* modules/color-selector-wheel.c: remove GTK+ version check and
	related evilness because we depend on a proper GKT+ version now.


svn path=/trunk/; revision=28195
parent 9ae1fa88
2009-03-22 Michael Natterer <mitch@gimp.org>
* modules/color-selector-wheel.c: remove GTK+ version check and
related evilness because we depend on a proper GKT+ version now.
2009-03-22 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
......
......@@ -30,34 +30,6 @@
#include "libgimp/libgimp-intl.h"
#ifdef __GNUC__
#warning FIXME: remove hacks here as soon as we depend on GTK 2.14
#endif
#ifndef __GTK_HSV_H__
#define GTK_TYPE_HSV (gtk_hsv_get_type ())
#define GTK_HSV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSV, GtkHSV))
typedef struct _GtkHSV GtkHSV;
GType gtk_hsv_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_hsv_new (void);
void gtk_hsv_set_color (GtkHSV *hsv,
double h,
double s,
double v);
void gtk_hsv_get_color (GtkHSV *hsv,
gdouble *h,
gdouble *s,
gdouble *v);
void gtk_hsv_set_metrics (GtkHSV *hsv,
gint size,
gint ring_width);
#endif /* __GTK_HSV_H__ */
#define COLORSEL_TYPE_WHEEL (colorsel_wheel_get_type ())
#define COLORSEL_WHEEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COLORSEL_TYPE_WHEEL, ColorselWheel))
#define COLORSEL_WHEEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), COLORSEL_TYPE_WHEEL, ColorselWheelClass))
......@@ -155,39 +127,13 @@ colorsel_wheel_init (ColorselWheel *wheel)
G_CALLBACK (colorsel_wheel_size_allocate),
wheel);
if (gtk_check_version (2, 13, 7))
{
/* for old versions of GtkHSV, we pack the thing into an alignment
* and force the alignment to have a small requisition, because
* it will be smart enough to deal with a larger allocation
*/
GtkWidget *alignment;
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (frame), alignment);
gtk_widget_show (alignment);
g_signal_connect (alignment, "size-request",
G_CALLBACK (colorsel_wheel_size_request),
wheel);
frame = alignment;
}
wheel->hsv = gtk_hsv_new ();
gtk_container_add (GTK_CONTAINER (frame), wheel->hsv);
gtk_widget_show (wheel->hsv);
if (! gtk_check_version (2, 13, 7))
{
/* for new versions of GtkHSV we don't need above alignment hack,
* because it is smart enough by itself to cope with a larger
* allocation than it requested
*/
g_signal_connect (wheel->hsv, "size-request",
G_CALLBACK (colorsel_wheel_size_request),
wheel);
}
g_signal_connect (wheel->hsv, "size-request",
G_CALLBACK (colorsel_wheel_size_request),
wheel);
g_signal_connect (wheel->hsv, "changed",
G_CALLBACK (colorsel_wheel_changed),
......
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