Commit bc035915 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.

Tue Nov 19 17:05:51 2002 Manish Singh  <yosh@gimp.org>

	* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
	top of gtktypebuiltins.c.

	* gtk/gtkclist.c
	* gtk/gtkcombo.c
	* gtk/gtkctree.c
	* gtk/gtklist.c
	* gtk/gtklistitem.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpixmap.c
	* gtk/gtkpreview.c
	* gtk/gtksignal.c
	* gtk/gtktext.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c
	* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
	and compat code.

	* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
	to set_color_internal, and use that. The deprecated function now
	merely wraps it.

	* gtk/gtkfontsel.c: same as above, except with
	gtk_font_selection_get_font.

	* gtk/gtknotebook.c: same as above, except with
	gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
	hborder,vborder}.

	* gtk/gtkprogressbar.c: same as above, except with
	gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
	activity_blocks}.

	* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.

	* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.

	* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
	GtkMenuFactory stuff if GTK_COMPILATION, since they are used
	internally by the compat code.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
	use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
	now).

	* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.

	* gtk/gtkobject.c: replaced various deprecated functions. In set and
	get_property, use g_object_{set,get}_data with "user_data" instead
	of gtk_object_{set,get}_user_data.

	* gtk/gtkprogress.h: API declared if GTK_COMPILATION

	* gtk/gtkprogress.c: port get_type to GObject API.

	* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
	if GTK_COMPILATION.

	* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
	gtk_widget_queue_draw instead of the other way around.

	* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED

	* tests/testgtk.c
	* tests/testselection.c
	* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
	deprecated stuff.
parent 3e8866a4
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
Tue Nov 19 17:01:40 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
......
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
Tue Nov 19 17:01:40 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
......
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
Tue Nov 19 17:01:40 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
......
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
Tue Nov 19 17:01:40 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
......
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
Tue Nov 19 17:01:40 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
......
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
Tue Nov 19 17:01:40 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
......
......@@ -19,6 +19,7 @@ INCLUDES = @STRIP_BEGIN@ \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
@GTK_DEBUG_FLAGS@ \
@GTK_DEP_CFLAGS@ \
@STRIP_END@
......@@ -534,7 +535,7 @@ stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
&& echo timestamp > $(@F)
$(srcdir)/gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"" \
--fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
......
......@@ -26,6 +26,7 @@
*/
#undef GDK_DISABLE_DEPRECATED
#undef GTK_DISABLE_DEPRECATED
#include <stdlib.h>
#include <string.h>
......
......@@ -211,6 +211,35 @@ static const guchar dropper_mask[] = {
static void color_sample_draw_sample (GtkColorSelection *colorsel, int which);
static void color_sample_draw_samples (GtkColorSelection *colorsel);
static void
set_color_internal (GtkColorSelection *colorsel,
gdouble *color)
{
ColorSelectionPrivate *priv;
gint i;
priv = colorsel->private_data;
priv->changing = TRUE;
priv->color[COLORSEL_RED] = color[0];
priv->color[COLORSEL_GREEN] = color[1];
priv->color[COLORSEL_BLUE] = color[2];
priv->color[COLORSEL_OPACITY] = color[3];
gtk_rgb_to_hsv (priv->color[COLORSEL_RED],
priv->color[COLORSEL_GREEN],
priv->color[COLORSEL_BLUE],
&priv->color[COLORSEL_HUE],
&priv->color[COLORSEL_SATURATION],
&priv->color[COLORSEL_VALUE]);
if (priv->default_set == FALSE)
{
for (i = 0; i < COLORSEL_NUM_CHANNELS; i++)
priv->old_color[i] = priv->color[i];
}
priv->default_set = TRUE;
priv->default_alpha_set = TRUE;
update_color (colorsel);
}
static void
set_color_icon (GdkDragContext *context,
gdouble *colors)
......@@ -300,7 +329,7 @@ color_sample_drop_handle (GtkWidget *widget,
color[2] = (gdouble)vals[2] / 0xffff;
color[3] = (gdouble)vals[3] / 0xffff;
gtk_color_selection_set_color (colorsel, color);
set_color_internal (colorsel, color);
}
}
......@@ -970,23 +999,13 @@ palette_release (GtkWidget *drawing_area,
{
gdouble color[4];
palette_get_color (drawing_area, color);
gtk_color_selection_set_color (colorsel, color);
set_color_internal (colorsel, color);
}
}
return FALSE;
}
static void
palette_unset_color (GtkWidget *drawing_area)
{
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (drawing_area), "color_set")) == 0)
return;
gtk_widget_reset_rc_styles (drawing_area);
g_object_set_data (G_OBJECT (drawing_area), "color_set", GINT_TO_POINTER (0));
}
static void
palette_drop_handle (GtkWidget *widget,
GdkDragContext *context,
......@@ -997,6 +1016,7 @@ palette_drop_handle (GtkWidget *widget,
guint time,
gpointer data)
{
GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data);
guint16 *vals;
gdouble color[4];
......@@ -1016,8 +1036,8 @@ palette_drop_handle (GtkWidget *widget,
color[1] = (gdouble)vals[1] / 0xffff;
color[2] = (gdouble)vals[2] / 0xffff;
color[3] = (gdouble)vals[3] / 0xffff;
palette_change_color (widget, GTK_COLOR_SELECTION (data), color);
gtk_color_selection_set_color (GTK_COLOR_SELECTION (data), color);
palette_change_color (widget, colorsel, color);
set_color_internal (colorsel, color);
}
static gint
......@@ -1035,7 +1055,7 @@ palette_activate (GtkWidget *widget,
{
gdouble color[4];
palette_get_color (widget, color);
gtk_color_selection_set_color (GTK_COLOR_SELECTION (data), color);
set_color_internal (GTK_COLOR_SELECTION (data), color);
}
return TRUE;
}
......@@ -2025,7 +2045,7 @@ gtk_color_selection_new (void)
colorsel = g_object_new (GTK_TYPE_COLOR_SELECTION, NULL);
priv = colorsel->private_data;
gtk_color_selection_set_color (colorsel, color);
set_color_internal (colorsel, color);
gtk_color_selection_set_has_opacity_control (colorsel, TRUE);
/* We want to make sure that default_set is FALSE */
......@@ -2237,31 +2257,9 @@ void
gtk_color_selection_set_color (GtkColorSelection *colorsel,
gdouble *color)
{
ColorSelectionPrivate *priv;
gint i;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
priv = colorsel->private_data;
priv->changing = TRUE;
priv->color[COLORSEL_RED] = color[0];
priv->color[COLORSEL_GREEN] = color[1];
priv->color[COLORSEL_BLUE] = color[2];
priv->color[COLORSEL_OPACITY] = color[3];
gtk_rgb_to_hsv (priv->color[COLORSEL_RED],
priv->color[COLORSEL_GREEN],
priv->color[COLORSEL_BLUE],
&priv->color[COLORSEL_HUE],
&priv->color[COLORSEL_SATURATION],
&priv->color[COLORSEL_VALUE]);
if (priv->default_set == FALSE)
{
for (i = 0; i < COLORSEL_NUM_CHANNELS; i++)
priv->old_color[i] = priv->color[i];
}
priv->default_set = TRUE;
priv->default_alpha_set = TRUE;
update_color (colorsel);
set_color_internal (colorsel, color);
}
/**
......
......@@ -28,6 +28,8 @@
* The code here relies on all sorts of internal details of GTK+
*/
#undef GTK_DISABLE_DEPRECATED
#include <string.h>
#include "gtkarrow.h"
......
......@@ -29,6 +29,7 @@
*/
#undef GDK_DISABLE_DEPRECATED
#undef GTK_DISABLE_DEPRECATED
#include <stdlib.h>
#include "gtkctree.h"
......
......@@ -153,6 +153,8 @@ static void gtk_font_selection_preview_changed (GtkWidget *entr
static void gtk_font_selection_load_font (GtkFontSelection *fs);
static void gtk_font_selection_update_preview (GtkFontSelection *fs);
static GdkFont* gtk_font_selection_get_font_internal (GtkFontSelection *fontsel);
/* FontSelectionDialog */
static void gtk_font_selection_dialog_class_init (GtkFontSelectionDialogClass *klass);
static void gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag);
......@@ -265,7 +267,7 @@ static void gtk_font_selection_get_property (GObject *object,
g_value_set_string (value, gtk_font_selection_get_font_name (fontsel));
break;
case PROP_FONT:
g_value_set_object (value, gtk_font_selection_get_font (fontsel));
g_value_set_object (value, gtk_font_selection_get_font_internal (fontsel));
break;
case PROP_PREVIEW_TEXT:
g_value_set_string (value, gtk_font_selection_get_preview_text (fontsel));
......@@ -1051,12 +1053,8 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel)
gtk_editable_set_position (GTK_EDITABLE (preview_entry), 0);
}
/*****************************************************************************
* These functions are the main public interface for getting/setting the font.
*****************************************************************************/
GdkFont*
gtk_font_selection_get_font (GtkFontSelection *fontsel)
gtk_font_selection_get_font_internal (GtkFontSelection *fontsel)
{
if (!fontsel->font)
{
......@@ -1069,6 +1067,16 @@ gtk_font_selection_get_font (GtkFontSelection *fontsel)
}
/*****************************************************************************
* These functions are the main public interface for getting/setting the font.
*****************************************************************************/
GdkFont*
gtk_font_selection_get_font (GtkFontSelection *fontsel)
{
return gtk_font_selection_get_font_internal (fontsel);
}
gchar *
gtk_font_selection_get_font_name (GtkFontSelection *fontsel)
{
......
......@@ -1072,8 +1072,6 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
if (GTK_IS_RADIO_MENU_ITEM (widget))
gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (widget), radio_group);
if (GTK_IS_CHECK_MENU_ITEM (widget))
gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (widget), TRUE);
if (type_id == quark_type_image_item)
{
GError *error = NULL;
......
......@@ -200,9 +200,11 @@ void gtk_item_factory_set_translate_func (GtkItemFactory *ifactory,
gpointer data,
GtkDestroyNotify notify);
#ifndef GTK_DISABLE_DEPRECATED
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
/* Compatibility functions for deprecated GtkMenuFactory code
*/
/* Used by gtk_item_factory_create_menu_entries () */
typedef void (*GtkMenuCallback) (GtkWidget *widget,
gpointer user_data);
typedef struct {
......@@ -212,19 +214,26 @@ typedef struct {
gpointer callback_data;
GtkWidget *widget;
} GtkMenuEntry;
GtkItemFactory* gtk_item_factory_from_path (const gchar *path);
void gtk_item_factory_create_menu_entries (guint n_entries,
GtkMenuEntry *entries);
void gtk_item_factories_path_delete (const gchar *ifactory_path,
const gchar *path);
/* Used by gtk_item_factory_callback_marshal () */
typedef void (*GtkItemFactoryCallback2) (GtkWidget *widget,
gpointer callback_data,
guint callback_action);
/* Used by gtk_item_factory_create_items () */
void gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
guint n_entries,
GtkItemFactoryEntry *entries,
gpointer callback_data,
guint callback_type);
#endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */
#ifndef GTK_DISABLE_DEPRECATED
GtkItemFactory* gtk_item_factory_from_path (const gchar *path);
void gtk_item_factory_create_menu_entries (guint n_entries,
GtkMenuEntry *entries);
void gtk_item_factories_path_delete (const gchar *ifactory_path,
const gchar *path);
#endif /* GTK_DISABLE_DEPRECATED */
......
......@@ -24,6 +24,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#undef GTK_DISABLE_DEPRECATED
#include <string.h> /* memset */
#include "gtklist.h"
......
......@@ -24,6 +24,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#undef GTK_DISABLE_DEPRECATED
#include "gtkbindings.h"
#include "gtklabel.h"
#include "gtklistitem.h"
......
......@@ -2037,7 +2037,7 @@ gtk_invoke_idle_timeout (gpointer data)
GtkArg args[1];
gint ret_val = FALSE;
args[0].name = NULL;
args[0].type = GTK_TYPE_BOOL;