forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
3e8866a488
commit
bc035915e9
71
ChangeLog
71
ChangeLog
@ -1,3 +1,74 @@
|
||||
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):
|
||||
|
@ -1,3 +1,74 @@
|
||||
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):
|
||||
|
@ -1,3 +1,74 @@
|
||||
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):
|
||||
|
@ -1,3 +1,74 @@
|
||||
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):
|
||||
|
@ -1,3 +1,74 @@
|
||||
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):
|
||||
|
@ -1,3 +1,74 @@
|
||||
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;
|
||||
args[0].type = G_TYPE_BOOLEAN;
|
||||
args[0].d.pointer_data = &ret_val;
|
||||
closure->marshal (NULL, closure->data, 0, args);
|
||||
return ret_val;
|
||||
@ -2051,13 +2051,13 @@ gtk_invoke_input (gpointer data,
|
||||
GtkClosure *closure = data;
|
||||
|
||||
GtkArg args[3];
|
||||
args[0].type = GTK_TYPE_INT;
|
||||
args[0].type = G_TYPE_INT;
|
||||
args[0].name = NULL;
|
||||
GTK_VALUE_INT (args[0]) = source;
|
||||
args[1].type = GDK_TYPE_INPUT_CONDITION;
|
||||
args[1].name = NULL;
|
||||
GTK_VALUE_FLAGS (args[1]) = condition;
|
||||
args[2].type = GTK_TYPE_NONE;
|
||||
args[2].type = G_TYPE_NONE;
|
||||
args[2].name = NULL;
|
||||
|
||||
closure->marshal (NULL, closure->data, 2, args);
|
||||
@ -2157,7 +2157,7 @@ gtk_quit_invoke_function (GtkQuitFunction *quitf)
|
||||
gint ret_val = FALSE;
|
||||
|
||||
args[0].name = NULL;
|
||||
args[0].type = GTK_TYPE_BOOL;
|
||||
args[0].type = G_TYPE_BOOLEAN;
|
||||
args[0].d.pointer_data = &ret_val;
|
||||
((GtkCallbackMarshal) quitf->marshal) (NULL,
|
||||
quitf->data,
|
||||
|
@ -248,6 +248,16 @@ static void gtk_notebook_menu_label_unparent (GtkWidget *widget,
|
||||
static void gtk_notebook_menu_detacher (GtkWidget *widget,
|
||||
GtkMenu *menu);
|
||||
|
||||
/*** GtkNotebook Private Setters ***/
|
||||
static void gtk_notebook_set_homogeneous_tabs_internal (GtkNotebook *notebook,
|
||||
gboolean homogeneous);
|
||||
static void gtk_notebook_set_tab_border_internal (GtkNotebook *notebook,
|
||||
guint border_width);
|
||||
static void gtk_notebook_set_tab_hborder_internal (GtkNotebook *notebook,
|
||||
guint tab_hborder);
|
||||
static void gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
|
||||
guint tab_vborder);
|
||||
|
||||
static gboolean focus_tabs_in (GtkNotebook *notebook);
|
||||
static gboolean focus_child_in (GtkNotebook *notebook,
|
||||
GtkDirectionType direction);
|
||||
@ -773,7 +783,7 @@ gtk_notebook_set_property (GObject *object,
|
||||
gtk_notebook_popup_disable (notebook);
|
||||
break;
|
||||
case PROP_HOMOGENEOUS:
|
||||
gtk_notebook_set_homogeneous_tabs (notebook, g_value_get_boolean (value));
|
||||
gtk_notebook_set_homogeneous_tabs_internal (notebook, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_PAGE:
|
||||
gtk_notebook_set_current_page (notebook, g_value_get_int (value));
|
||||
@ -782,13 +792,13 @@ gtk_notebook_set_property (GObject *object,
|
||||
gtk_notebook_set_tab_pos (notebook, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_TAB_BORDER:
|
||||
gtk_notebook_set_tab_border (notebook, g_value_get_uint (value));
|
||||
gtk_notebook_set_tab_border_internal (notebook, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_TAB_HBORDER:
|
||||
gtk_notebook_set_tab_hborder (notebook, g_value_get_uint (value));
|
||||
gtk_notebook_set_tab_hborder_internal (notebook, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_TAB_VBORDER:
|
||||
gtk_notebook_set_tab_vborder (notebook, g_value_get_uint (value));
|
||||
gtk_notebook_set_tab_vborder_internal (notebook, g_value_get_uint (value));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -3723,6 +3733,80 @@ gtk_notebook_menu_detacher (GtkWidget *widget,
|
||||
notebook->menu = NULL;
|
||||
}
|
||||
|
||||
/* Private GtkNotebook Setter Functions:
|
||||
*
|
||||
* gtk_notebook_set_homogeneous_tabs_internal
|
||||
* gtk_notebook_set_tab_border_internal
|
||||
* gtk_notebook_set_tab_hborder_internal
|
||||
* gtk_notebook_set_tab_vborder_internal
|
||||
*/
|
||||
static void
|
||||
gtk_notebook_set_homogeneous_tabs_internal (GtkNotebook *notebook,
|
||||
gboolean homogeneous)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
if (homogeneous == notebook->homogeneous)
|
||||
return;
|
||||
|
||||
notebook->homogeneous = homogeneous;
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_notify (G_OBJECT (notebook), "homogeneous");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_set_tab_border_internal (GtkNotebook *notebook,
|
||||
guint border_width)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
notebook->tab_hborder = border_width;
|
||||
notebook->tab_vborder = border_width;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (notebook));
|
||||
g_object_notify (G_OBJECT (notebook), "tab_hborder");
|
||||
g_object_notify (G_OBJECT (notebook), "tab_vborder");
|
||||
g_object_thaw_notify (G_OBJECT (notebook));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_set_tab_hborder_internal (GtkNotebook *notebook,
|
||||
guint tab_hborder)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
if (notebook->tab_hborder == tab_hborder)
|
||||
return;
|
||||
|
||||
notebook->tab_hborder = tab_hborder;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_notify (G_OBJECT (notebook), "tab_hborder");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
|
||||
guint tab_vborder)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
if (notebook->tab_vborder == tab_vborder)
|
||||
return;
|
||||
|
||||
notebook->tab_vborder = tab_vborder;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_notify (G_OBJECT (notebook), "tab_vborder");
|
||||
}
|
||||
|
||||
/* Public GtkNotebook Page Insert/Remove Methods :
|
||||
*
|
||||
* gtk_notebook_append_page
|
||||
@ -4415,13 +4499,7 @@ gtk_notebook_set_homogeneous_tabs (GtkNotebook *notebook,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
if (homogeneous == notebook->homogeneous)
|
||||
return;
|
||||
|
||||
notebook->homogeneous = homogeneous;
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_notify (G_OBJECT (notebook), "homogeneous");
|
||||
gtk_notebook_set_homogeneous_tabs_internal (notebook, homogeneous);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4440,17 +4518,7 @@ gtk_notebook_set_tab_border (GtkNotebook *notebook,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
notebook->tab_hborder = border_width;
|
||||
notebook->tab_vborder = border_width;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (notebook));
|
||||
g_object_notify (G_OBJECT (notebook), "tab_hborder");
|
||||
g_object_notify (G_OBJECT (notebook), "tab_vborder");
|
||||
g_object_thaw_notify (G_OBJECT (notebook));
|
||||
|
||||
gtk_notebook_set_tab_border_internal (notebook, border_width);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4466,15 +4534,7 @@ gtk_notebook_set_tab_hborder (GtkNotebook *notebook,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
if (notebook->tab_hborder == tab_hborder)
|
||||
return;
|
||||
|
||||
notebook->tab_hborder = tab_hborder;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_notify (G_OBJECT (notebook), "tab_hborder");
|
||||
gtk_notebook_set_tab_hborder_internal (notebook, tab_hborder);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4490,15 +4550,7 @@ gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
if (notebook->tab_vborder == tab_vborder)
|
||||
return;
|
||||
|
||||
notebook->tab_vborder = tab_vborder;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
g_object_notify (G_OBJECT (notebook), "tab_vborder");
|
||||
gtk_notebook_set_tab_vborder_internal (notebook, tab_vborder);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -222,12 +222,12 @@ gtk_object_add_arg_type (const gchar *arg_name,
|
||||
g_return_if_fail (arg_name != NULL);
|
||||
g_return_if_fail (arg_type > G_TYPE_NONE);
|
||||
g_return_if_fail (arg_id > 0);
|
||||
g_return_if_fail (arg_flags & GTK_ARG_READWRITE);
|
||||
g_return_if_fail (arg_flags & G_PARAM_READWRITE);
|
||||
if (arg_flags & G_PARAM_CONSTRUCT)
|
||||
g_return_if_fail ((arg_flags & G_PARAM_CONSTRUCT_ONLY) == 0);
|
||||
if (arg_flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY))
|
||||
g_return_if_fail (arg_flags & G_PARAM_WRITABLE);
|
||||
g_return_if_fail ((arg_flags & ~(GTK_ARG_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)) == 0);
|
||||
g_return_if_fail ((arg_flags & ~(G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)) == 0);
|
||||
|
||||
pname = strchr (arg_name, ':');
|
||||
g_return_if_fail (pname && pname[1] == ':');
|
||||
@ -239,7 +239,7 @@ gtk_object_add_arg_type (const gchar *arg_name,
|
||||
g_return_if_fail (G_TYPE_IS_OBJECT (type));
|
||||
|
||||
oclass = gtk_type_class (type);
|
||||
if (arg_flags & GTK_ARG_READABLE)
|
||||
if (arg_flags & G_PARAM_READABLE)
|
||||
{
|
||||
if (oclass->get_property && oclass->get_property != gtk_arg_proxy_get_property)
|
||||
{
|
||||
@ -249,7 +249,7 @@ gtk_object_add_arg_type (const gchar *arg_name,
|
||||
}
|
||||
oclass->get_property = gtk_arg_proxy_get_property;
|
||||
}
|
||||
if (arg_flags & GTK_ARG_WRITABLE)
|
||||
if (arg_flags & G_PARAM_WRITABLE)
|
||||
{
|
||||
if (oclass->set_property && oclass->set_property != gtk_arg_proxy_set_property)
|
||||
{
|
||||
@ -331,12 +331,13 @@ gtk_object_class_init (GtkObjectClass *class)
|
||||
"Anonymous User Data Pointer",
|
||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
||||
object_signals[DESTROY] =
|
||||
gtk_signal_new ("destroy",
|
||||
G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | GTK_RUN_NO_HOOKS,
|
||||
GTK_CLASS_TYPE (class),
|
||||
GTK_SIGNAL_OFFSET (GtkObjectClass, destroy),
|
||||
_gtk_marshal_VOID__VOID,
|
||||
GTK_TYPE_NONE, 0);
|
||||
g_signal_new ("destroy",
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
|
||||
G_STRUCT_OFFSET (GtkObjectClass, destroy),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -372,7 +373,7 @@ gtk_object_dispose (GObject *gobject)
|
||||
{
|
||||
GTK_OBJECT_SET_FLAGS (object, GTK_IN_DESTRUCTION);
|
||||
|
||||
gtk_signal_emit (object, object_signals[DESTROY]);
|
||||
g_signal_emit (object, object_signals[DESTROY], 0);
|
||||
|
||||
GTK_OBJECT_UNSET_FLAGS (object, GTK_IN_DESTRUCTION);
|
||||
}
|
||||
@ -419,7 +420,7 @@ gtk_object_set_property (GObject *object,
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_USER_DATA:
|
||||
gtk_object_set_user_data (GTK_OBJECT (object), g_value_get_pointer (value));
|
||||
g_object_set_data (G_OBJECT (object), "user_data", g_value_get_pointer (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
@ -436,7 +437,7 @@ gtk_object_get_property (GObject *object,
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_USER_DATA:
|
||||
g_value_set_pointer (value, gtk_object_get_user_data (GTK_OBJECT (object)));
|
||||
g_value_set_pointer (value, g_object_get_data (G_OBJECT (object), "user_data"));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
@ -460,7 +461,7 @@ gtk_object_sink (GtkObject *object)
|
||||
if (GTK_OBJECT_FLOATING (object))
|
||||
{
|
||||
GTK_OBJECT_UNSET_FLAGS (object, GTK_FLOATING);
|
||||
gtk_object_unref (object);
|
||||
g_object_unref (object);
|
||||
}
|
||||
}
|
||||
|
||||
@ -506,10 +507,10 @@ gtk_object_weakref (GtkObject *object,
|
||||
quark_weakrefs = g_quark_from_static_string ("gtk-weakrefs");
|
||||
|
||||
weak = g_new (GtkWeakRef, 1);
|
||||
weak->next = gtk_object_get_data_by_id (object, quark_weakrefs);
|
||||
weak->next = g_object_get_qdata (G_OBJECT (object), quark_weakrefs);
|
||||
weak->notify = notify;
|
||||
weak->data = data;
|
||||
gtk_object_set_data_by_id (object, quark_weakrefs, weak);
|
||||
g_object_set_qdata (G_OBJECT (object), quark_weakrefs, weak);
|
||||
}
|
||||
|
||||
void
|
||||
@ -524,14 +525,14 @@ gtk_object_weakunref (GtkObject *object,
|
||||
if (!quark_weakrefs)
|
||||
return;
|
||||
|
||||
weaks = gtk_object_get_data_by_id (object, quark_weakrefs);
|
||||
weaks = g_object_get_qdata (G_OBJECT (object), quark_weakrefs);
|
||||
for (wp = &weaks; *wp; wp = &(*wp)->next)
|
||||
{
|
||||
w = *wp;
|
||||
if (w->notify == notify && w->data == data)
|
||||
{
|
||||
if (w == weaks)
|
||||
gtk_object_set_data_by_id (object, quark_weakrefs, w->next);
|
||||
g_object_set_qdata (G_OBJECT (object), quark_weakrefs, w->next);
|
||||
else
|
||||
*wp = w->next;
|
||||
g_free (w);
|
||||
@ -547,7 +548,7 @@ gtk_object_notify_weaks (GtkObject *object)
|
||||
{
|
||||
GtkWeakRef *w1, *w2;
|
||||
|
||||
w1 = gtk_object_get_data_by_id (object, quark_weakrefs);
|
||||
w1 = g_object_get_qdata (G_OBJECT (object), quark_weakrefs);
|
||||
|
||||
while (w1)
|
||||
{
|
||||
@ -567,7 +568,7 @@ gtk_object_new (GtkType object_type,
|
||||
GtkObject *object;
|
||||
va_list var_args;
|
||||
|
||||
g_return_val_if_fail (GTK_TYPE_IS_OBJECT (object_type), NULL);
|
||||
g_return_val_if_fail (G_TYPE_IS_OBJECT (object_type), NULL);
|
||||
|
||||
va_start (var_args, first_property_name);
|
||||
object = (GtkObject *)g_object_new_valist (object_type, first_property_name, var_args);
|
||||
|
@ -24,6 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include <string.h>
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gdk/gdki18n.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include <math.h>
|
||||
#include "gtkcontainer.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
@ -67,26 +67,28 @@ static void gtk_progress_value_changed (GtkAdjustment *adjustment,
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_progress_get_type (void)
|
||||
{
|
||||
static GtkType progress_type = 0;
|
||||
static GType progress_type = 0;
|
||||
|
||||
if (!progress_type)
|
||||
{
|
||||
static const GtkTypeInfo progress_info =
|
||||
static const GTypeInfo progress_info =
|
||||
{
|
||||
"GtkProgress",
|
||||
sizeof (GtkProgress),
|
||||
sizeof (GtkProgressClass),
|
||||
(GtkClassInitFunc) gtk_progress_class_init,
|
||||
(GtkObjectInitFunc) gtk_progress_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_progress_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkProgress),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_progress_init,
|
||||
};
|
||||
|
||||
progress_type = gtk_type_unique (GTK_TYPE_WIDGET, &progress_info);
|
||||
progress_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkProgress",
|
||||
&progress_info, 0);
|
||||
}
|
||||
|
||||
return progress_type;
|
||||
|
@ -37,7 +37,7 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
|
||||
|
||||
#define GTK_TYPE_PROGRESS (gtk_progress_get_type ())
|
||||
#define GTK_PROGRESS(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PROGRESS, GtkProgress))
|
||||
@ -46,7 +46,7 @@ extern "C" {
|
||||
#define GTK_IS_PROGRESS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PROGRESS))
|
||||
#define GTK_PROGRESS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_PROGRESS, GtkProgressClass))
|
||||
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
#endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */
|
||||
|
||||
typedef struct _GtkProgress GtkProgress;
|
||||
typedef struct _GtkProgressClass GtkProgressClass;
|
||||
@ -86,9 +86,9 @@ struct _GtkProgressClass
|
||||
* directly.
|
||||
*/
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
|
||||
|
||||
GtkType gtk_progress_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_progress_get_type (void) G_GNUC_CONST;
|
||||
void gtk_progress_set_show_text (GtkProgress *progress,
|
||||
gboolean show_text);
|
||||
void gtk_progress_set_text_alignment (GtkProgress *progress,
|
||||
@ -116,7 +116,7 @@ gdouble gtk_progress_get_current_percentage (GtkProgress *progress);
|
||||
gdouble gtk_progress_get_percentage_from_value (GtkProgress *progress,
|
||||
gdouble value);
|
||||
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
#endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -78,6 +78,15 @@ static void gtk_progress_bar_real_update (GtkProgress *progress);
|
||||
static void gtk_progress_bar_paint (GtkProgress *progress);
|
||||
static void gtk_progress_bar_act_mode_enter (GtkProgress *progress);
|
||||
|
||||
static void gtk_progress_bar_set_bar_style_internal (GtkProgressBar *pbar,
|
||||
GtkProgressBarStyle style);
|
||||
static void gtk_progress_bar_set_discrete_blocks_internal (GtkProgressBar *pbar,
|
||||
guint blocks);
|
||||
static void gtk_progress_bar_set_activity_step_internal (GtkProgressBar *pbar,
|
||||
guint step);
|
||||
static void gtk_progress_bar_set_activity_blocks_internal (GtkProgressBar *pbar,
|
||||
guint blocks);
|
||||
|
||||
|
||||
GType
|
||||
gtk_progress_bar_get_type (void)
|
||||
@ -247,16 +256,16 @@ gtk_progress_bar_set_property (GObject *object,
|
||||
gtk_progress_bar_set_orientation (pbar, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_BAR_STYLE:
|
||||
gtk_progress_bar_set_bar_style (pbar, g_value_get_enum (value));
|
||||
gtk_progress_bar_set_bar_style_internal (pbar, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_ACTIVITY_STEP:
|
||||
gtk_progress_bar_set_activity_step (pbar, g_value_get_uint (value));
|
||||
gtk_progress_bar_set_activity_step_internal (pbar, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_ACTIVITY_BLOCKS:
|
||||
gtk_progress_bar_set_activity_blocks (pbar, g_value_get_uint (value));
|
||||
gtk_progress_bar_set_activity_blocks_internal (pbar, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_DISCRETE_BLOCKS:
|
||||
gtk_progress_bar_set_discrete_blocks (pbar, g_value_get_uint (value));
|
||||
gtk_progress_bar_set_discrete_blocks_internal (pbar, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_FRACTION:
|
||||
gtk_progress_bar_set_fraction (pbar, g_value_get_double (value));
|
||||
@ -867,6 +876,68 @@ gtk_progress_bar_paint (GtkProgress *progress)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_progress_bar_set_bar_style_internal (GtkProgressBar *pbar,
|
||||
GtkProgressBarStyle bar_style)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
|
||||
if (pbar->bar_style != bar_style)
|
||||
{
|
||||
pbar->bar_style = bar_style;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (pbar));
|
||||
|
||||
g_object_notify (G_OBJECT (pbar), "bar_style");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_progress_bar_set_discrete_blocks_internal (GtkProgressBar *pbar,
|
||||
guint blocks)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
g_return_if_fail (blocks > 1);
|
||||
|
||||
if (pbar->blocks != blocks)
|
||||
{
|
||||
pbar->blocks = blocks;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (pbar));
|
||||
|
||||
g_object_notify (G_OBJECT (pbar), "discrete_blocks");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_progress_bar_set_activity_step_internal (GtkProgressBar *pbar,
|
||||
guint step)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
|
||||
if (pbar->activity_step != step)
|
||||
{
|
||||
pbar->activity_step = step;
|
||||
g_object_notify (G_OBJECT (pbar), "activity_step");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_progress_bar_set_activity_blocks_internal (GtkProgressBar *pbar,
|
||||
guint blocks)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
g_return_if_fail (blocks > 1);
|
||||
|
||||
if (pbar->activity_blocks != blocks)
|
||||
{
|
||||
pbar->activity_blocks = blocks;
|
||||
g_object_notify (G_OBJECT (pbar), "activity_blocks");
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************/
|
||||
|
||||
/**
|
||||
@ -1078,15 +1149,7 @@ gtk_progress_bar_set_bar_style (GtkProgressBar *pbar,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
|
||||
if (pbar->bar_style != bar_style)
|
||||
{
|
||||
pbar->bar_style = bar_style;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (pbar));
|
||||
|
||||
g_object_notify (G_OBJECT (pbar), "bar_style");
|
||||
}
|
||||
gtk_progress_bar_set_bar_style_internal (pbar, bar_style);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1096,15 +1159,7 @@ gtk_progress_bar_set_discrete_blocks (GtkProgressBar *pbar,
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
g_return_if_fail (blocks > 1);
|
||||
|
||||
if (pbar->blocks != blocks)
|
||||
{
|
||||
pbar->blocks = blocks;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (pbar));
|
||||
|
||||
g_object_notify (G_OBJECT (pbar), "discrete_blocks");
|
||||
}
|
||||
gtk_progress_bar_set_discrete_blocks_internal (pbar, blocks);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1113,11 +1168,7 @@ gtk_progress_bar_set_activity_step (GtkProgressBar *pbar,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
|
||||
if (pbar->activity_step != step)
|
||||
{
|
||||
pbar->activity_step = step;
|
||||
g_object_notify (G_OBJECT (pbar), "activity_step");
|
||||
}
|
||||
gtk_progress_bar_set_activity_step_internal (pbar, step);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1127,9 +1178,5 @@ gtk_progress_bar_set_activity_blocks (GtkProgressBar *pbar,
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
|
||||
g_return_if_fail (blocks > 1);
|
||||
|
||||
if (pbar->activity_blocks != blocks)
|
||||
{
|
||||
pbar->activity_blocks = blocks;
|
||||
g_object_notify (G_OBJECT (pbar), "activity_blocks");
|
||||
}
|
||||
gtk_progress_bar_set_activity_blocks_internal (pbar, blocks);
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtksignal.h"
|
||||
|
||||
/* the real parameter limit is of course given by GSignal, bu we need
|
||||
|
@ -313,6 +313,8 @@ static void hls_to_rgb (gdouble *h,
|
||||
|
||||
static void style_unrealize_cursor_gcs (GtkStyle *style);
|
||||
|
||||
static GdkFont *gtk_style_get_font_internal (GtkStyle *style);
|
||||
|
||||
/*
|
||||
* Data for default check and radio buttons
|
||||
*/
|
||||
@ -3190,11 +3192,11 @@ gtk_default_draw_string (GtkStyle *style,
|
||||
|
||||
if (state_type == GTK_STATE_INSENSITIVE)
|
||||
gdk_draw_string (window,
|
||||
gtk_style_get_font (style),
|
||||
gtk_style_get_font_internal (style),
|
||||
style->white_gc, x + 1, y + 1, string);
|
||||
|
||||
gdk_draw_string (window,
|
||||
gtk_style_get_font (style),
|
||||
gtk_style_get_font_internal (style),
|
||||
style->fg_gc[state_type], x, y, string);
|
||||
|
||||
if (area)
|
||||
@ -6037,21 +6039,8 @@ gtk_border_get_type (void)
|
||||
return our_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_get_font:
|
||||
* @style: a #GtkStyle
|
||||
*
|
||||
* Gets the #GdkFont to use for the given style. This is
|
||||
* meant only as a replacement for direct access to @style->font
|
||||
* and should not be used in new code. New code should
|
||||
* use @style->font_desc instead.
|
||||
*
|
||||
* Return value: the #GdkFont for the style. This font is owned
|
||||
* by the style; if you want to keep around a copy, you must
|
||||
* call gdk_font_ref().
|
||||
**/
|
||||
GdkFont *
|
||||
gtk_style_get_font (GtkStyle *style)
|
||||
static GdkFont *
|
||||
gtk_style_get_font_internal (GtkStyle *style)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_STYLE (style), NULL);
|
||||
|
||||
@ -6102,6 +6091,27 @@ gtk_style_get_font (GtkStyle *style)
|
||||
return style->private_font;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_get_font:
|
||||
* @style: a #GtkStyle
|
||||
*
|
||||
* Gets the #GdkFont to use for the given style. This is
|
||||
* meant only as a replacement for direct access to @style->font
|
||||
* and should not be used in new code. New code should
|
||||
* use @style->font_desc instead.
|
||||
*
|
||||
* Return value: the #GdkFont for the style. This font is owned
|
||||
* by the style; if you want to keep around a copy, you must
|
||||
* call gdk_font_ref().
|
||||
**/
|
||||
GdkFont *
|
||||
gtk_style_get_font (GtkStyle *style)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_STYLE (style), NULL);
|
||||
|
||||
return gtk_style_get_font_internal (style);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_set_font:
|
||||
* @style: a #GtkStyle.
|
||||
|
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
@ -27,6 +27,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtktipsquery.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gtktooltips.h"
|
||||
|
@ -24,6 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtkmain.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtksignal.h"
|
||||
|
@ -24,6 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtklabel.h"
|
||||
#include "gtkeventbox.h"
|
||||
#include "gtkpixmap.h"
|
||||
|
@ -24,6 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include <string.h> /* strcmp */
|
||||
|
||||
#include "gtktypeutils.h"
|
||||
|
@ -127,6 +127,10 @@ typedef void (*GtkSignalFunc) (void);
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
typedef struct _GtkTypeInfo GtkTypeInfo;
|
||||
typedef GSignalCMarshaller GtkSignalMarshaller;
|
||||
#endif
|
||||
|
||||
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
|
||||
/* Used by gtk_container_foreach_unmarshal () */
|
||||
|
||||
/* GtkArg, used to hold differently typed values */
|
||||
struct _GtkArg
|
||||
@ -183,7 +187,9 @@ struct _GtkArg
|
||||
#define GTK_VALUE_OBJECT(a) ((a).d.object_data)
|
||||
#define GTK_VALUE_POINTER(a) ((a).d.pointer_data)
|
||||
#define GTK_VALUE_SIGNAL(a) ((a).d.signal_data)
|
||||
#endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
/* return location macros, these all narrow down to
|
||||
* pointer types, because return values need to be
|
||||
* passed by reference
|
||||
@ -237,9 +243,6 @@ gpointer gtk_type_new (GtkType type);
|
||||
#define gtk_type_parent(type) g_type_parent (type)
|
||||
#define gtk_type_is_a(type, is_a_type) g_type_is_a ((type), (is_a_type))
|
||||
|
||||
/* deprecated, use g_type_init() instead */
|
||||
void gtk_type_init (GTypeDebugFlags debug_flags);
|
||||
|
||||
/* enum/flags compatibility functions, we strongly
|
||||
* recommend to use the glib enum/flags classes directly
|
||||
*/
|
||||
@ -254,6 +257,11 @@ GtkFlagValue* gtk_type_flags_find_value (GtkType flags_type,
|
||||
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
|
||||
/* deprecated, use g_type_init() instead */
|
||||
void gtk_type_init (GTypeDebugFlags debug_flags);
|
||||
#endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_TYPE_UTILS_H__ */
|
||||
|
202
gtk/gtkwidget.c
202
gtk/gtkwidget.c
@ -217,6 +217,10 @@ static void gtk_widget_invalidate_widget_windows (GtkWidget
|
||||
GdkRegion *region);
|
||||
static GdkScreen * gtk_widget_get_screen_unchecked (GtkWidget *widget);
|
||||
|
||||
static void gtk_widget_set_usize_internal (GtkWidget *widget,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
|
||||
/* --- variables --- */
|
||||
static gpointer parent_class = NULL;
|
||||
@ -1154,10 +1158,10 @@ gtk_widget_set_property (GObject *object,
|
||||
gtk_container_add (GTK_CONTAINER (g_value_get_object (value)), widget);
|
||||
break;
|
||||
case PROP_WIDTH_REQUEST:
|
||||
gtk_widget_set_usize (widget, g_value_get_int (value), -2);
|
||||
gtk_widget_set_usize_internal (widget, g_value_get_int (value), -2);
|
||||
break;
|
||||
case PROP_HEIGHT_REQUEST:
|
||||
gtk_widget_set_usize (widget, -2, g_value_get_int (value));
|
||||
gtk_widget_set_usize_internal (widget, -2, g_value_get_int (value));
|
||||
break;
|
||||
case PROP_VISIBLE:
|
||||
if (g_value_get_boolean (value))
|
||||
@ -1484,17 +1488,17 @@ gtk_widget_set (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static inline void
|
||||
gtk_widget_queue_clear_child (GtkWidget *widget)
|
||||
gtk_widget_queue_draw_child (GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
||||
parent = widget->parent;
|
||||
if (parent && GTK_WIDGET_DRAWABLE (parent))
|
||||
gtk_widget_queue_clear_area (parent,
|
||||
widget->allocation.x,
|
||||
widget->allocation.y,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
gtk_widget_queue_draw_area (parent,
|
||||
widget->allocation.x,
|
||||
widget->allocation.y,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1537,7 +1541,7 @@ gtk_widget_unparent (GtkWidget *widget)
|
||||
else
|
||||
toplevel = NULL;
|
||||
|
||||
gtk_widget_queue_clear_child (widget);
|
||||
gtk_widget_queue_draw_child (widget);
|
||||
|
||||
/* Reset the width and height here, to force reallocation if we
|
||||
* get added back to a new parent. This won't work if our new
|
||||
@ -2010,54 +2014,6 @@ gtk_widget_queue_draw_area (GtkWidget *widget,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_queue_clear_area (widget, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_queue_draw:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Equivalent to calling gtk_widget_queue_draw_area() for the
|
||||
* entire area of a widget.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gtk_widget_queue_draw (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_queue_clear (widget);
|
||||
}
|
||||
|
||||
/* Invalidates the given area (allocation-relative-coordinates)
|
||||
* in all of the widget's windows
|
||||
*/
|
||||
/**
|
||||
* gtk_widget_queue_clear_area:
|
||||
* @widget: a #GtkWidget
|
||||
* @x: x coordinate of upper-left corner of rectangle to redraw
|
||||
* @y: y coordinate of upper-left corner of rectangle to redraw
|
||||
* @width: width of region to draw
|
||||
* @height: height of region to draw
|
||||
*
|
||||
* DEPRECATED. This function is no longer different from
|
||||
* gtk_widget_queue_draw_area(), though it once was. Now it just calls
|
||||
* gtk_widget_queue_draw_area(). Originally
|
||||
* gtk_widget_queue_clear_area() would force a redraw of the
|
||||
* background for %GTK_NO_WINDOW widgets, and
|
||||
* gtk_widget_queue_draw_area() would not. Now both functions ensure
|
||||
* the background will be redrawn.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gtk_widget_queue_clear_area (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkRectangle invalid_rect;
|
||||
GtkWidget *w;
|
||||
@ -2115,6 +2071,65 @@ gtk_widget_queue_clear_area (GtkWidget *widget,
|
||||
gdk_window_invalidate_rect (widget->window, &invalid_rect, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_queue_draw:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Equivalent to calling gtk_widget_queue_draw_area() for the
|
||||
* entire area of a widget.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gtk_widget_queue_draw (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (widget->allocation.width || widget->allocation.height)
|
||||
{
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
gtk_widget_queue_draw_area (widget, widget->allocation.x,
|
||||
widget->allocation.y,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
else
|
||||
gtk_widget_queue_draw_area (widget, 0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Invalidates the given area (allocation-relative-coordinates)
|
||||
* in all of the widget's windows
|
||||
*/
|
||||
/**
|
||||
* gtk_widget_queue_clear_area:
|
||||
* @widget: a #GtkWidget
|
||||
* @x: x coordinate of upper-left corner of rectangle to redraw
|
||||
* @y: y coordinate of upper-left corner of rectangle to redraw
|
||||
* @width: width of region to draw
|
||||
* @height: height of region to draw
|
||||
*
|
||||
* DEPRECATED. This function is no longer different from
|
||||
* gtk_widget_queue_draw_area(), though it once was. Now it just calls
|
||||
* gtk_widget_queue_draw_area(). Originally
|
||||
* gtk_widget_queue_clear_area() would force a redraw of the
|
||||
* background for %GTK_NO_WINDOW widgets, and
|
||||
* gtk_widget_queue_draw_area() would not. Now both functions ensure
|
||||
* the background will be redrawn.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gtk_widget_queue_clear_area (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_queue_draw_area (widget, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_queue_clear:
|
||||
* @widget: a #GtkWidget
|
||||
@ -2126,18 +2141,7 @@ gtk_widget_queue_clear (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (widget->allocation.width || widget->allocation.height)
|
||||
{
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
gtk_widget_queue_clear_area (widget, widget->allocation.x,
|
||||
widget->allocation.y,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
else
|
||||
gtk_widget_queue_clear_area (widget, 0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
}
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3630,7 +3634,7 @@ gtk_widget_set_state (GtkWidget *widget,
|
||||
gtk_widget_propagate_state (widget, &data);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gtk_widget_queue_clear (widget);
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3650,7 +3654,7 @@ gtk_widget_set_app_paintable (GtkWidget *widget,
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_APP_PAINTABLE);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gtk_widget_queue_clear (widget);
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
g_object_notify (G_OBJECT (widget), "app_paintable");
|
||||
}
|
||||
@ -3766,7 +3770,7 @@ gtk_widget_set_sensitive (GtkWidget *widget,
|
||||
|
||||
gtk_widget_propagate_state (widget, &data);
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gtk_widget_queue_clear (widget);
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
g_object_notify (G_OBJECT (widget), "sensitive");
|
||||
}
|
||||
@ -4999,6 +5003,36 @@ gtk_widget_set_uposition (GtkWidget *widget,
|
||||
gtk_widget_size_allocate (widget, &widget->allocation);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_set_usize_internal (GtkWidget *widget,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (widget));
|
||||
|
||||
aux_info =_gtk_widget_get_aux_info (widget, TRUE);
|
||||
|
||||
if (width > -2)
|
||||
{
|
||||
g_object_notify (G_OBJECT (widget), "width_request");
|
||||
aux_info->width = width;
|
||||
}
|
||||
if (height > -2)
|
||||
{
|
||||
g_object_notify (G_OBJECT (widget), "height_request");
|
||||
aux_info->height = height;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (widget))
|
||||
gtk_widget_queue_resize (widget);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_set_usize:
|
||||
* @widget: a #GtkWidget
|
||||
@ -5032,29 +5066,9 @@ gtk_widget_set_usize (GtkWidget *widget,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (widget));
|
||||
|
||||
aux_info =_gtk_widget_get_aux_info (widget, TRUE);
|
||||
|
||||
if (width > -2)
|
||||
{
|
||||
g_object_notify (G_OBJECT (widget), "width_request");
|
||||
aux_info->width = width;
|
||||
}
|
||||
if (height > -2)
|
||||
{
|
||||
g_object_notify (G_OBJECT (widget), "height_request");
|
||||
aux_info->height = height;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (widget))
|
||||
gtk_widget_queue_resize (widget);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (widget));
|
||||
gtk_widget_set_usize_internal (widget, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5107,7 +5121,7 @@ gtk_widget_set_size_request (GtkWidget *widget,
|
||||
if (height == 0)
|
||||
height = 1;
|
||||
|
||||
gtk_widget_set_usize (widget, width, height);
|
||||
gtk_widget_set_usize_internal (widget, width, height);
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,6 +7,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@
|
||||
|
@ -24,6 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#undef G_LOG_DOMAIN
|
||||
|
@ -24,6 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#define GTK_ENABLE_BROKEN
|
||||
|
@ -1,3 +1,5 @@
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <string.h>
|
||||
|
Loading…
Reference in New Issue
Block a user