diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 19fea2db20..457f57b9cc 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -136,6 +136,9 @@ endif # by configure) deprecated_h_sources = \ + deprecated/gtkactivatable.h \ + deprecated/gtkaction.h \ + deprecated/gtkactiongroup.h \ deprecated/gtkcolorsel.h \ deprecated/gtkcolorseldialog.h \ deprecated/gtkfontsel.h \ @@ -148,11 +151,18 @@ deprecated_h_sources = \ deprecated/gtkhscrollbar.h \ deprecated/gtkhseparator.h \ deprecated/gtkhsv.h \ + deprecated/gtkiconfactory.h \ + deprecated/gtkimagemenuitem.h \ + deprecated/gtkradioaction.h \ deprecated/gtkrc.h \ + deprecated/gtkrecentaction.h \ + deprecated/gtkstock.h \ deprecated/gtkstyle.h \ deprecated/gtksymboliccolor.h \ deprecated/gtktable.h \ deprecated/gtktearoffmenuitem.h \ + deprecated/gtktoggleaction.h \ + deprecated/gtkuimanager.h \ deprecated/gtkvbbox.h \ deprecated/gtkvbox.h \ deprecated/gtkvscale.h \ @@ -174,9 +184,6 @@ gtk_public_h_sources = \ gtkaccelmap.h \ gtkaccessible.h \ gtkactionable.h \ - gtkaction.h \ - gtkactiongroup.h \ - gtkactivatable.h \ gtkadjustment.h \ gtkalignment.h \ gtkappchooser.h \ @@ -249,11 +256,9 @@ gtk_public_h_sources = \ gtkframe.h \ gtkgrid.h \ gtkheaderbar.h \ - gtkiconfactory.h \ gtkicontheme.h \ gtkiconview.h \ gtkimage.h \ - gtkimagemenuitem.h \ gtkimcontext.h \ gtkimcontextinfo.h \ gtkimcontextsimple.h \ @@ -294,12 +299,10 @@ gtk_public_h_sources = \ gtkprintoperationpreview.h \ gtkprintsettings.h \ gtkprogressbar.h \ - gtkradioaction.h \ gtkradiobutton.h \ gtkradiomenuitem.h \ gtkradiotoolbutton.h \ gtkrange.h \ - gtkrecentaction.h \ gtkrecentchooser.h \ gtkrecentchooserdialog.h \ gtkrecentchoosermenu.h \ @@ -329,7 +332,6 @@ gtk_public_h_sources = \ gtkstackswitcher.h \ gtkstatusbar.h \ gtkstatusicon.h \ - gtkstock.h \ gtkstylecontext.h \ gtkstyleproperties.h \ gtkstyleprovider.h \ @@ -346,7 +348,6 @@ gtk_public_h_sources = \ gtktexttagtable.h \ gtktextview.h \ gtkthemingengine.h \ - gtktoggleaction.h \ gtktogglebutton.h \ gtktoggletoolbutton.h \ gtktoolbar.h \ @@ -366,7 +367,6 @@ gtk_public_h_sources = \ gtktreeview.h \ gtktreeviewcolumn.h \ gtktypes.h \ - gtkuimanager.h \ gtkviewport.h \ gtkvolumebutton.h \ gtkwidget.h \ @@ -563,6 +563,9 @@ gtk_private_h_sources = \ # GTK+ C sources to build the library from deprecated_c_sources = \ + deprecated/gtkactivatable.c \ + deprecated/gtkaction.c \ + deprecated/gtkactiongroup.c \ deprecated/gtkcolorsel.c \ deprecated/gtkcolorseldialog.c \ deprecated/gtkfontsel.c \ @@ -575,11 +578,18 @@ deprecated_c_sources = \ deprecated/gtkhscrollbar.c \ deprecated/gtkhseparator.c \ deprecated/gtkhsv.c \ + deprecated/gtkiconfactory.c \ + deprecated/gtkimagemenuitem.c \ + deprecated/gtkradioaction.c \ deprecated/gtkrc.c \ + deprecated/gtkrecentaction.c \ + deprecated/gtkstock.c \ deprecated/gtkstyle.c \ deprecated/gtksymboliccolor.c \ deprecated/gtktable.c \ deprecated/gtktearoffmenuitem.c \ + deprecated/gtktoggleaction.c \ + deprecated/gtkuimanager.c \ deprecated/gtkvbbox.c \ deprecated/gtkvbox.c \ deprecated/gtkvscale.c \ @@ -604,10 +614,7 @@ gtk_base_c_sources = \ gtkaccellabel.c \ gtkaccelmap.c \ gtkaccessible.c \ - gtkaction.c \ gtkactionhelper.c \ - gtkactiongroup.c \ - gtkactivatable.c \ gtkadjustment.c \ gtkalignment.c \ gtkallocatedbitmask.c \ @@ -744,12 +751,10 @@ gtk_base_c_sources = \ gtkhsla.c \ gtkiconcache.c \ gtkiconcachevalidator.c \ - gtkiconfactory.c \ gtkiconhelper.c \ gtkicontheme.c \ gtkiconview.c \ gtkimage.c \ - gtkimagemenuitem.c \ gtkimcontext.c \ gtkimcontextsimple.c \ gtkimmodule.c \ @@ -802,13 +807,11 @@ gtk_base_c_sources = \ gtkprivatetypebuiltins.c \ gtkprogressbar.c \ gtkpixelcache.c \ - gtkradioaction.c \ gtkradiobutton.c \ gtkradiomenuitem.c \ gtkradiotoolbutton.c \ gtkrange.c \ gtkrbtree.c \ - gtkrecentaction.c \ gtkrecentchooserdefault.c \ gtkrecentchooserdialog.c \ gtkrecentchoosermenu.c \ @@ -840,7 +843,6 @@ gtk_base_c_sources = \ gtkstackswitcher.c \ gtkstatusbar.c \ gtkstatusicon.c \ - gtkstock.c \ gtkstyleanimation.c \ gtkstylecascade.c \ gtkstylecontext.c \ @@ -869,7 +871,6 @@ gtk_base_c_sources = \ gtktextview.c \ gtkthemingbackground.c \ gtkthemingengine.c \ - gtktoggleaction.c \ gtktogglebutton.c \ gtktoggletoolbutton.c \ gtktoolbar.c \ @@ -892,7 +893,6 @@ gtk_base_c_sources = \ gtktreeview.c \ gtktreeviewcolumn.c \ gtktypebuiltins.c \ - gtkuimanager.c \ gtkvolumebutton.c \ gtkviewport.c \ gtkwidget.c \ diff --git a/gtk/gtkaction.c b/gtk/deprecated/gtkaction.c similarity index 100% rename from gtk/gtkaction.c rename to gtk/deprecated/gtkaction.c diff --git a/gtk/gtkaction.h b/gtk/deprecated/gtkaction.h similarity index 100% rename from gtk/gtkaction.h rename to gtk/deprecated/gtkaction.h diff --git a/gtk/gtkactiongroup.c b/gtk/deprecated/gtkactiongroup.c similarity index 100% rename from gtk/gtkactiongroup.c rename to gtk/deprecated/gtkactiongroup.c diff --git a/gtk/gtkactiongroup.h b/gtk/deprecated/gtkactiongroup.h similarity index 99% rename from gtk/gtkactiongroup.h rename to gtk/deprecated/gtkactiongroup.h index 625fe89762..e2e54edc51 100644 --- a/gtk/gtkactiongroup.h +++ b/gtk/deprecated/gtkactiongroup.h @@ -33,8 +33,8 @@ #error "Only can be included directly." #endif -#include -#include +#include +#include G_BEGIN_DECLS diff --git a/gtk/gtkactivatable.c b/gtk/deprecated/gtkactivatable.c similarity index 100% rename from gtk/gtkactivatable.c rename to gtk/deprecated/gtkactivatable.c diff --git a/gtk/gtkactivatable.h b/gtk/deprecated/gtkactivatable.h similarity index 98% rename from gtk/gtkactivatable.h rename to gtk/deprecated/gtkactivatable.h index 5312ef1a2c..3930386238 100644 --- a/gtk/gtkactivatable.h +++ b/gtk/deprecated/gtkactivatable.h @@ -22,7 +22,7 @@ #error "Only can be included directly." #endif -#include +#include G_BEGIN_DECLS diff --git a/gtk/gtkiconfactory.c b/gtk/deprecated/gtkiconfactory.c similarity index 99% rename from gtk/gtkiconfactory.c rename to gtk/deprecated/gtkiconfactory.c index ca54ad1b24..eb3a20591b 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/deprecated/gtkiconfactory.c @@ -35,7 +35,7 @@ #include "gtkdebug.h" #include "gtkicontheme.h" #include "gtksettingsprivate.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtkwidget.h" #include "gtkintl.h" #include "gtkbuildable.h" diff --git a/gtk/gtkiconfactory.h b/gtk/deprecated/gtkiconfactory.h similarity index 100% rename from gtk/gtkiconfactory.h rename to gtk/deprecated/gtkiconfactory.h diff --git a/gtk/gtkimagemenuitem.h b/gtk/deprecated/gtkimagemenuitem.h similarity index 100% rename from gtk/gtkimagemenuitem.h rename to gtk/deprecated/gtkimagemenuitem.h diff --git a/gtk/gtkradioaction.c b/gtk/deprecated/gtkradioaction.c similarity index 100% rename from gtk/gtkradioaction.c rename to gtk/deprecated/gtkradioaction.c diff --git a/gtk/gtkradioaction.h b/gtk/deprecated/gtkradioaction.h similarity index 98% rename from gtk/gtkradioaction.h rename to gtk/deprecated/gtkradioaction.h index d33cfb1e7b..dce4986116 100644 --- a/gtk/gtkradioaction.h +++ b/gtk/deprecated/gtkradioaction.h @@ -33,7 +33,7 @@ #error "Only can be included directly." #endif -#include +#include G_BEGIN_DECLS diff --git a/gtk/gtkrecentaction.c b/gtk/deprecated/gtkrecentaction.c similarity index 100% rename from gtk/gtkrecentaction.c rename to gtk/deprecated/gtkrecentaction.c diff --git a/gtk/gtkrecentaction.h b/gtk/deprecated/gtkrecentaction.h similarity index 98% rename from gtk/gtkrecentaction.h rename to gtk/deprecated/gtkrecentaction.h index 6ca717d5c9..0cd77cf9b6 100644 --- a/gtk/gtkrecentaction.h +++ b/gtk/deprecated/gtkrecentaction.h @@ -24,7 +24,7 @@ #error "Only can be included directly." #endif -#include +#include #include G_BEGIN_DECLS diff --git a/gtk/gtkstock.c b/gtk/deprecated/gtkstock.c similarity index 100% rename from gtk/gtkstock.c rename to gtk/deprecated/gtkstock.c diff --git a/gtk/gtkstock.h b/gtk/deprecated/gtkstock.h similarity index 100% rename from gtk/gtkstock.h rename to gtk/deprecated/gtkstock.h diff --git a/gtk/gtktoggleaction.c b/gtk/deprecated/gtktoggleaction.c similarity index 100% rename from gtk/gtktoggleaction.c rename to gtk/deprecated/gtktoggleaction.c diff --git a/gtk/gtktoggleaction.h b/gtk/deprecated/gtktoggleaction.h similarity index 99% rename from gtk/gtktoggleaction.h rename to gtk/deprecated/gtktoggleaction.h index c89cbcb425..695aa02bc3 100644 --- a/gtk/gtktoggleaction.h +++ b/gtk/deprecated/gtktoggleaction.h @@ -33,7 +33,7 @@ #error "Only can be included directly." #endif -#include +#include G_BEGIN_DECLS diff --git a/gtk/gtkuimanager.c b/gtk/deprecated/gtkuimanager.c similarity index 100% rename from gtk/gtkuimanager.c rename to gtk/deprecated/gtkuimanager.c diff --git a/gtk/gtkuimanager.h b/gtk/deprecated/gtkuimanager.h similarity index 98% rename from gtk/gtkuimanager.h rename to gtk/deprecated/gtkuimanager.h index b0ee553cdd..e37d5a9021 100644 --- a/gtk/gtkuimanager.h +++ b/gtk/deprecated/gtkuimanager.h @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include G_BEGIN_DECLS diff --git a/gtk/gtk.h b/gtk/gtk.h index 1d4863906a..fa20539147 100644 --- a/gtk/gtk.h +++ b/gtk/gtk.h @@ -33,10 +33,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -109,11 +106,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -152,12 +147,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -186,7 +179,6 @@ #include #include #include -#include #include #include #include @@ -201,7 +193,6 @@ #include #include #include -#include #include #include #include @@ -223,7 +214,6 @@ #include #include #include -#include #include #include #include @@ -232,6 +222,9 @@ #include #ifndef GTK_DISABLE_DEPRECATED +#include +#include +#include #include #include #include @@ -244,11 +237,18 @@ #include #include #include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include #include #include #include diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 70c3265430..cb28cc5256 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -44,7 +44,7 @@ #include "gtkorientable.h" #include "gtkscrolledwindow.h" #include "gtktextview.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkshow.h" #include "gtkmain.h" #include "gtkmessagedialog.h" diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c index bb0ffc9ceb..fc7bb28e72 100644 --- a/gtk/gtkappchooserdialog.c +++ b/gtk/gtkappchooserdialog.c @@ -52,7 +52,7 @@ #include "gtkbbox.h" #include "gtkbutton.h" #include "gtkmenuitem.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include #include diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index a8ceb576cd..9184005ef1 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -254,7 +254,7 @@ #include "gtktypebuiltins.h" #include "gtkwindow.h" #include "gtkicontheme.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" static void gtk_builder_class_init (GtkBuilderClass *klass); diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 26ce7039b3..9c552bfd3f 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -48,9 +48,9 @@ #include "gtkmarshalers.h" #include "gtkimage.h" #include "gtkbox.h" -#include "gtkstock.h" -#include "gtkiconfactory.h" -#include "gtkactivatable.h" +#include "deprecated/gtkstock.h" +#include "deprecated/gtkiconfactory.h" +#include "deprecated/gtkactivatable.h" #include "gtksizerequest.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtkbuttonprivate.h b/gtk/gtkbuttonprivate.h index 54483de8a2..67ef99c5d4 100644 --- a/gtk/gtkbuttonprivate.h +++ b/gtk/gtkbuttonprivate.h @@ -20,7 +20,7 @@ #define __GTK_BUTTON_PRIVATE_H__ #include "gtkactionhelper.h" -#include "gtkaction.h" +#include "deprecated/gtkaction.h" G_BEGIN_DECLS diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index 19c372518f..4b67ee561c 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -19,7 +19,7 @@ #include #include #include "gtkcellrendererpixbuf.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkiconhelperprivate.h" #include "gtkicontheme.h" #include "gtkintl.h" diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 00c8ae875b..f38fce15d9 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -28,7 +28,7 @@ #include "config.h" #include "gtkcellrendererspinner.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkintl.h" #include "gtksettings.h" diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c index e29d88e2c8..a0837f3587 100644 --- a/gtk/gtkcheckmenuitem.c +++ b/gtk/gtkcheckmenuitem.c @@ -26,8 +26,8 @@ #include "gtkcheckmenuitem.h" #include "gtkmenuitemprivate.h" #include "gtkaccellabel.h" -#include "gtkactivatable.h" -#include "gtktoggleaction.h" +#include "deprecated/gtkactivatable.h" +#include "deprecated/gtktoggleaction.h" #include "gtkmarshalers.h" #include "gtkprivate.h" #include "gtkintl.h" diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 28e9480d9b..789c573f8f 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -40,7 +40,7 @@ #include "gtkprivate.h" #include "gtkbuildable.h" #include "gtksettings.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" /** * SECTION:gtkdialog diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c index e1a6026192..f7d42f4fc9 100644 --- a/gtk/gtkdnd-quartz.c +++ b/gtk/gtkdnd-quartz.c @@ -30,7 +30,7 @@ #include "gdk/gdk.h" #include "gtkdnd.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkimageprivate.h" #include "gtkinvisible.h" diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index cf4db840a5..fb8beba5ba 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -40,13 +40,13 @@ #endif #include "gtkdnd.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkiconhelperprivate.h" #include "gtkicontheme.h" #include "gtkinvisible.h" #include "gtkmain.h" #include "gtkplug.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtktooltip.h" #include "gtkwindow.h" #include "gtkintl.h" diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 1b7cf0fa5f..2aea6bde66 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -38,7 +38,7 @@ #include "gtkentry.h" #include "gtkentrybuffer.h" #include "gtkiconhelperprivate.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkimcontextsimple.h" #include "gtkimmulticontext.h" #include "gtkintl.h" @@ -51,7 +51,7 @@ #include "gtkselection.h" #include "gtksettings.h" #include "gtkspinbutton.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtktextutil.h" #include "gtkwindow.h" #include "gtktreeview.h" @@ -61,7 +61,7 @@ #include "gtkentryprivate.h" #include "gtkcelllayout.h" #include "gtktooltip.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkwidgetprivate.h" #include "gtkstylecontextprivate.h" diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 6259b08664..e4fc423179 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -36,11 +36,11 @@ #include "gtkcombobox.h" #include "gtkdnd.h" #include "gtkicontheme.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkimage.h" #include "gtklabel.h" #include "gtkliststore.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtktreemodelfilter.h" #include "gtkseparator.h" #include "gtkfilechooserdialog.h" diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index b25c0bc9a8..bb4241ecd2 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -45,10 +45,10 @@ #include "gtkfilesystemmodel.h" #include "gtkframe.h" #include "gtkgrid.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkimage.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkinfobar.h" #include "gtklabel.h" #include "gtkmarshalers.h" diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c index 80750a307c..45a49cfd2d 100644 --- a/gtk/gtkfontchooserdialog.c +++ b/gtk/gtkfontchooserdialog.c @@ -28,7 +28,7 @@ #include "gtkfontchooserwidget.h" #include "gtkfontchooserutils.h" #include "gtkbox.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtkintl.h" #include "gtkaccessible.h" #include "gtkbuildable.h" diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 9cd192a6d4..eb4c904e5e 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -39,7 +39,7 @@ #include "gtkicontheme.h" #include "gtkdebug.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkiconcache.h" #include "gtkbuiltincache.h" #include "gtkintl.h" diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 8b25a0698d..a6b6572686 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -31,8 +31,8 @@ #include "gtkcontainer.h" #include "gtkiconhelperprivate.h" #include "gtkimageprivate.h" -#include "gtkiconfactory.h" -#include "gtkstock.h" +#include "deprecated/gtkiconfactory.h" +#include "deprecated/gtkstock.h" #include "gtkicontheme.h" #include "gtksizerequest.h" #include "gtkintl.h" diff --git a/gtk/gtkimagemenuitem.c b/gtk/gtkimagemenuitem.c deleted file mode 100644 index d377618557..0000000000 --- a/gtk/gtkimagemenuitem.c +++ /dev/null @@ -1,1130 +0,0 @@ -/* GTK - The GIMP Toolkit - * Copyright (C) 2001 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - */ - -/* - * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include "config.h" - -#define GDK_DISABLE_DEPRECATION_WARNINGS - -#include "gtkimagemenuitem.h" - -#include "gtkmenuitemprivate.h" -#include "gtkaccellabel.h" -#include "gtkstock.h" -#include "gtkiconfactory.h" -#include "gtkimage.h" -#include "gtkmenubar.h" -#include "gtkcontainer.h" -#include "gtkwindow.h" -#include "gtkactivatable.h" - -#include "gtkintl.h" -#include "gtkprivate.h" - - -/** - * SECTION:gtkimagemenuitem - * @Short_description: A menu item with an icon - * @Title: GtkImageMenuItem - * - * A GtkImageMenuItem is a menu item which has an icon next to the text label. - * - * Note that the user can disable display of menu icons, so make sure to still - * fill in the text label. - */ - - -struct _GtkImageMenuItemPrivate -{ - GtkWidget *image; - - gchar *label; - guint use_stock : 1; - guint always_show_image : 1; -}; - -enum { - PROP_0, - PROP_IMAGE, - PROP_USE_STOCK, - PROP_ACCEL_GROUP, - PROP_ALWAYS_SHOW_IMAGE -}; - -static GtkActivatableIface *parent_activatable_iface; - -static void gtk_image_menu_item_destroy (GtkWidget *widget); -static void gtk_image_menu_item_get_preferred_width (GtkWidget *widget, - gint *minimum, - gint *natural); -static void gtk_image_menu_item_get_preferred_height (GtkWidget *widget, - gint *minimum, - gint *natural); -static void gtk_image_menu_item_get_preferred_height_for_width (GtkWidget *widget, - gint width, - gint *minimum, - gint *natural); -static void gtk_image_menu_item_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void gtk_image_menu_item_map (GtkWidget *widget); -static void gtk_image_menu_item_remove (GtkContainer *container, - GtkWidget *child); -static void gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item, - gint *requisition); -static void gtk_image_menu_item_set_label (GtkMenuItem *menu_item, - const gchar *label); -static const gchar * gtk_image_menu_item_get_label (GtkMenuItem *menu_item); - -static void gtk_image_menu_item_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data); - -static void gtk_image_menu_item_finalize (GObject *object); -static void gtk_image_menu_item_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void gtk_image_menu_item_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); - -static void gtk_image_menu_item_recalculate (GtkImageMenuItem *image_menu_item); - -static void gtk_image_menu_item_activatable_interface_init (GtkActivatableIface *iface); -static void gtk_image_menu_item_update (GtkActivatable *activatable, - GtkAction *action, - const gchar *property_name); -static void gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable, - GtkAction *action); - - -G_DEFINE_TYPE_WITH_CODE (GtkImageMenuItem, gtk_image_menu_item, GTK_TYPE_MENU_ITEM, - G_ADD_PRIVATE (GtkImageMenuItem) - G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE, - gtk_image_menu_item_activatable_interface_init)) - - -static void -gtk_image_menu_item_class_init (GtkImageMenuItemClass *klass) -{ - GObjectClass *gobject_class = (GObjectClass*) klass; - GtkWidgetClass *widget_class = (GtkWidgetClass*) klass; - GtkMenuItemClass *menu_item_class = (GtkMenuItemClass*) klass; - GtkContainerClass *container_class = (GtkContainerClass*) klass; - - widget_class->destroy = gtk_image_menu_item_destroy; - widget_class->get_preferred_width = gtk_image_menu_item_get_preferred_width; - widget_class->get_preferred_height = gtk_image_menu_item_get_preferred_height; - widget_class->get_preferred_height_for_width = gtk_image_menu_item_get_preferred_height_for_width; - widget_class->size_allocate = gtk_image_menu_item_size_allocate; - widget_class->map = gtk_image_menu_item_map; - - container_class->forall = gtk_image_menu_item_forall; - container_class->remove = gtk_image_menu_item_remove; - - menu_item_class->toggle_size_request = gtk_image_menu_item_toggle_size_request; - menu_item_class->set_label = gtk_image_menu_item_set_label; - menu_item_class->get_label = gtk_image_menu_item_get_label; - - gobject_class->finalize = gtk_image_menu_item_finalize; - gobject_class->set_property = gtk_image_menu_item_set_property; - gobject_class->get_property = gtk_image_menu_item_get_property; - - /** - * GtkImageMenuItem:image: - * - * Child widget to appear next to the menu text. - * - * Deprecated: 3.10 - */ - g_object_class_install_property (gobject_class, - PROP_IMAGE, - g_param_spec_object ("image", - P_("Image widget"), - P_("Child widget to appear next to the menu text"), - GTK_TYPE_WIDGET, - GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); - /** - * GtkImageMenuItem:use-stock: - * - * If %TRUE, the label set in the menuitem is used as a - * stock id to select the stock item for the item. - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ - g_object_class_install_property (gobject_class, - PROP_USE_STOCK, - g_param_spec_boolean ("use-stock", - P_("Use stock"), - P_("Whether to use the label text to create a stock menu item"), - FALSE, - GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)); - - /** - * GtkImageMenuItem:always-show-image: - * - * If %TRUE, the menu item will always show the image, if available. - * - * Use this property only if the menuitem would be useless or hard to use - * without the image. - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ - g_object_class_install_property (gobject_class, - PROP_ALWAYS_SHOW_IMAGE, - g_param_spec_boolean ("always-show-image", - P_("Always show image"), - P_("Whether the image will always be shown"), - FALSE, - GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)); - - /** - * GtkImageMenuItem:accel-group: - * - * The Accel Group to use for stock accelerator keys - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ - g_object_class_install_property (gobject_class, - PROP_ACCEL_GROUP, - g_param_spec_object ("accel-group", - P_("Accel Group"), - P_("The Accel Group to use for stock accelerator keys"), - GTK_TYPE_ACCEL_GROUP, - GTK_PARAM_WRITABLE | G_PARAM_DEPRECATED)); - -} - -static void -gtk_image_menu_item_init (GtkImageMenuItem *image_menu_item) -{ - GtkImageMenuItemPrivate *priv; - - image_menu_item->priv = gtk_image_menu_item_get_instance_private (image_menu_item); - priv = image_menu_item->priv; - - priv->image = NULL; - priv->use_stock = FALSE; - priv->label = NULL; -} - -static void -gtk_image_menu_item_finalize (GObject *object) -{ - GtkImageMenuItemPrivate *priv = GTK_IMAGE_MENU_ITEM (object)->priv; - - g_free (priv->label); - priv->label = NULL; - - G_OBJECT_CLASS (gtk_image_menu_item_parent_class)->finalize (object); -} - -static void -gtk_image_menu_item_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (object); - - switch (prop_id) - { - case PROP_IMAGE: - gtk_image_menu_item_set_image (image_menu_item, (GtkWidget *) g_value_get_object (value)); - break; - case PROP_USE_STOCK: - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - gtk_image_menu_item_set_use_stock (image_menu_item, g_value_get_boolean (value)); - G_GNUC_END_IGNORE_DEPRECATIONS; - break; - case PROP_ALWAYS_SHOW_IMAGE: - gtk_image_menu_item_set_always_show_image (image_menu_item, g_value_get_boolean (value)); - break; - case PROP_ACCEL_GROUP: - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - gtk_image_menu_item_set_accel_group (image_menu_item, g_value_get_object (value)); - G_GNUC_END_IGNORE_DEPRECATIONS; - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gtk_image_menu_item_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (object); - - switch (prop_id) - { - case PROP_IMAGE: - g_value_set_object (value, gtk_image_menu_item_get_image (image_menu_item)); - break; - case PROP_USE_STOCK: - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - g_value_set_boolean (value, gtk_image_menu_item_get_use_stock (image_menu_item)); - G_GNUC_END_IGNORE_DEPRECATIONS; - break; - case PROP_ALWAYS_SHOW_IMAGE: - g_value_set_boolean (value, gtk_image_menu_item_get_always_show_image (image_menu_item)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gtk_image_menu_item_map (GtkWidget *widget) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (widget); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - - GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->map (widget); - - if (priv->image) - g_object_set (priv->image, - "visible", priv->always_show_image, - NULL); -} - -static void -gtk_image_menu_item_destroy (GtkWidget *widget) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (widget); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - - if (priv->image) - gtk_container_remove (GTK_CONTAINER (image_menu_item), - priv->image); - - GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->destroy (widget); -} - -static void -gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item, - gint *requisition) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (menu_item); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - GtkPackDirection pack_dir; - GtkWidget *parent; - GtkWidget *widget = GTK_WIDGET (menu_item); - - parent = gtk_widget_get_parent (widget); - - if (GTK_IS_MENU_BAR (parent)) - pack_dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent)); - else - pack_dir = GTK_PACK_DIRECTION_LTR; - - *requisition = 0; - - if (priv->image && gtk_widget_get_visible (priv->image)) - { - GtkRequisition image_requisition; - guint toggle_spacing; - - gtk_widget_get_preferred_size (priv->image, &image_requisition, NULL); - - gtk_widget_style_get (GTK_WIDGET (menu_item), - "toggle-spacing", &toggle_spacing, - NULL); - - if (pack_dir == GTK_PACK_DIRECTION_LTR || pack_dir == GTK_PACK_DIRECTION_RTL) - { - if (image_requisition.width > 0) - *requisition = image_requisition.width + toggle_spacing; - } - else - { - if (image_requisition.height > 0) - *requisition = image_requisition.height + toggle_spacing; - } - } -} - -static void -gtk_image_menu_item_recalculate (GtkImageMenuItem *image_menu_item) -{ - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - GtkStockItem stock_item; - GtkWidget *image; - const gchar *resolved_label = priv->label; - - if (priv->use_stock && priv->label) - { - - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - - if (!priv->image) - { - image = gtk_image_new_from_stock (priv->label, GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (image_menu_item, image); - } - - if (gtk_stock_lookup (priv->label, &stock_item)) - resolved_label = stock_item.label; - - gtk_menu_item_set_use_underline (GTK_MENU_ITEM (image_menu_item), TRUE); - - G_GNUC_END_IGNORE_DEPRECATIONS; - } - - GTK_MENU_ITEM_CLASS - (gtk_image_menu_item_parent_class)->set_label (GTK_MENU_ITEM (image_menu_item), resolved_label); - -} - -static void -gtk_image_menu_item_set_label (GtkMenuItem *menu_item, - const gchar *label) -{ - GtkImageMenuItemPrivate *priv = GTK_IMAGE_MENU_ITEM (menu_item)->priv; - - if (priv->label != label) - { - g_free (priv->label); - priv->label = g_strdup (label); - - gtk_image_menu_item_recalculate (GTK_IMAGE_MENU_ITEM (menu_item)); - - g_object_notify (G_OBJECT (menu_item), "label"); - - } -} - -static const gchar * -gtk_image_menu_item_get_label (GtkMenuItem *menu_item) -{ - GtkImageMenuItemPrivate *priv = GTK_IMAGE_MENU_ITEM (menu_item)->priv; - - return priv->label; -} - -static void -gtk_image_menu_item_get_preferred_width (GtkWidget *widget, - gint *minimum, - gint *natural) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (widget); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - GtkPackDirection pack_dir; - GtkWidget *parent; - - parent = gtk_widget_get_parent (widget); - - if (GTK_IS_MENU_BAR (parent)) - pack_dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent)); - else - pack_dir = GTK_PACK_DIRECTION_LTR; - - GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->get_preferred_width (widget, minimum, natural); - - if ((pack_dir == GTK_PACK_DIRECTION_TTB || pack_dir == GTK_PACK_DIRECTION_BTT) && - priv->image && - gtk_widget_get_visible (priv->image)) - { - gint child_minimum, child_natural; - - gtk_widget_get_preferred_width (priv->image, &child_minimum, &child_natural); - - *minimum = MAX (*minimum, child_minimum); - *natural = MAX (*natural, child_natural); - } -} - -static void -gtk_image_menu_item_get_preferred_height (GtkWidget *widget, - gint *minimum, - gint *natural) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (widget); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - gint child_height = 0; - GtkPackDirection pack_dir; - GtkWidget *parent; - - parent = gtk_widget_get_parent (widget); - - if (GTK_IS_MENU_BAR (parent)) - pack_dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent)); - else - pack_dir = GTK_PACK_DIRECTION_LTR; - - if (priv->image && gtk_widget_get_visible (priv->image)) - { - GtkRequisition child_requisition; - - gtk_widget_get_preferred_size (priv->image, &child_requisition, NULL); - - child_height = child_requisition.height; - } - - GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->get_preferred_height (widget, minimum, natural); - - if (pack_dir == GTK_PACK_DIRECTION_RTL || pack_dir == GTK_PACK_DIRECTION_LTR) - { - *minimum = MAX (*minimum, child_height); - *natural = MAX (*natural, child_height); - } -} - -static void -gtk_image_menu_item_get_preferred_height_for_width (GtkWidget *widget, - gint width, - gint *minimum, - gint *natural) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (widget); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - gint child_height = 0; - GtkPackDirection pack_dir; - GtkWidget *parent; - - parent = gtk_widget_get_parent (widget); - - if (GTK_IS_MENU_BAR (parent)) - pack_dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent)); - else - pack_dir = GTK_PACK_DIRECTION_LTR; - - if (priv->image && gtk_widget_get_visible (priv->image)) - { - GtkRequisition child_requisition; - - gtk_widget_get_preferred_size (priv->image, &child_requisition, NULL); - - child_height = child_requisition.height; - } - - GTK_WIDGET_CLASS - (gtk_image_menu_item_parent_class)->get_preferred_height_for_width (widget, width, minimum, natural); - - if (pack_dir == GTK_PACK_DIRECTION_RTL || pack_dir == GTK_PACK_DIRECTION_LTR) - { - *minimum = MAX (*minimum, child_height); - *natural = MAX (*natural, child_height); - } -} - - -static void -gtk_image_menu_item_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (widget); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - GtkAllocation widget_allocation; - GtkPackDirection pack_dir; - GtkWidget *parent; - - parent = gtk_widget_get_parent (widget); - - if (GTK_IS_MENU_BAR (parent)) - pack_dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent)); - else - pack_dir = GTK_PACK_DIRECTION_LTR; - - GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->size_allocate (widget, allocation); - - if (priv->image && gtk_widget_get_visible (priv->image)) - { - gint x, y, offset; - GtkStyleContext *context; - GtkStateFlags state; - GtkBorder padding; - GtkRequisition child_requisition; - GtkAllocation child_allocation; - guint horizontal_padding, toggle_spacing; - gint toggle_size; - - toggle_size = GTK_MENU_ITEM (image_menu_item)->priv->toggle_size; - gtk_widget_style_get (widget, - "horizontal-padding", &horizontal_padding, - "toggle-spacing", &toggle_spacing, - NULL); - - /* Man this is lame hardcoding action, but I can't - * come up with a solution that's really better. - */ - - gtk_widget_get_preferred_size (priv->image, &child_requisition, NULL); - - gtk_widget_get_allocation (widget, &widget_allocation); - - context = gtk_widget_get_style_context (widget); - state = gtk_widget_get_state_flags (widget); - gtk_style_context_get_padding (context, state, &padding); - offset = gtk_container_get_border_width (GTK_CONTAINER (image_menu_item)); - - if (pack_dir == GTK_PACK_DIRECTION_LTR || - pack_dir == GTK_PACK_DIRECTION_RTL) - { - if ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) == - (pack_dir == GTK_PACK_DIRECTION_LTR)) - x = offset + horizontal_padding + padding.left + - (toggle_size - toggle_spacing - child_requisition.width) / 2; - else - x = widget_allocation.width - offset - horizontal_padding - padding.right - - toggle_size + toggle_spacing + - (toggle_size - toggle_spacing - child_requisition.width) / 2; - - y = (widget_allocation.height - child_requisition.height) / 2; - } - else - { - if ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) == - (pack_dir == GTK_PACK_DIRECTION_TTB)) - y = offset + horizontal_padding + padding.top + - (toggle_size - toggle_spacing - child_requisition.height) / 2; - else - y = widget_allocation.height - offset - horizontal_padding - padding.bottom - - toggle_size + toggle_spacing + - (toggle_size - toggle_spacing - child_requisition.height) / 2; - - x = (widget_allocation.width - child_requisition.width) / 2; - } - - child_allocation.width = child_requisition.width; - child_allocation.height = child_requisition.height; - child_allocation.x = widget_allocation.x + MAX (x, 0); - child_allocation.y = widget_allocation.y + MAX (y, 0); - - gtk_widget_size_allocate (priv->image, &child_allocation); - } -} - -static void -gtk_image_menu_item_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (container); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - - GTK_CONTAINER_CLASS (gtk_image_menu_item_parent_class)->forall (container, - include_internals, - callback, - callback_data); - - if (include_internals && priv->image) - (* callback) (priv->image, callback_data); -} - - -static void -gtk_image_menu_item_activatable_interface_init (GtkActivatableIface *iface) -{ - parent_activatable_iface = g_type_interface_peek_parent (iface); - iface->update = gtk_image_menu_item_update; - iface->sync_action_properties = gtk_image_menu_item_sync_action_properties; -} - -static gboolean -activatable_update_stock_id (GtkImageMenuItem *image_menu_item, GtkAction *action) -{ - GtkWidget *image; - const gchar *stock_id = gtk_action_get_stock_id (action); - - image = gtk_image_menu_item_get_image (image_menu_item); - - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - - if (GTK_IS_IMAGE (image) && - stock_id && gtk_icon_factory_lookup_default (stock_id)) - { - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - gtk_image_set_from_stock (GTK_IMAGE (image), stock_id, GTK_ICON_SIZE_MENU); - G_GNUC_END_IGNORE_DEPRECATIONS; - return TRUE; - } - - G_GNUC_END_IGNORE_DEPRECATIONS; - - return FALSE; -} - -static gboolean -activatable_update_gicon (GtkImageMenuItem *image_menu_item, GtkAction *action) -{ - GtkWidget *image; - GIcon *icon = gtk_action_get_gicon (action); - const gchar *stock_id; - gboolean ret = FALSE; - - stock_id = gtk_action_get_stock_id (action); - - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - - image = gtk_image_menu_item_get_image (image_menu_item); - - if (icon && GTK_IS_IMAGE (image) && - !(stock_id && gtk_icon_factory_lookup_default (stock_id))) - { - gtk_image_set_from_gicon (GTK_IMAGE (image), icon, GTK_ICON_SIZE_MENU); - ret = TRUE; - } - - G_GNUC_END_IGNORE_DEPRECATIONS; - - return ret; -} - -static void -activatable_update_icon_name (GtkImageMenuItem *image_menu_item, GtkAction *action) -{ - GtkWidget *image; - const gchar *icon_name = gtk_action_get_icon_name (action); - - image = gtk_image_menu_item_get_image (image_menu_item); - - if (GTK_IS_IMAGE (image) && - (gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_EMPTY || - gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_ICON_NAME)) - { - gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name, GTK_ICON_SIZE_MENU); - } -} - -static void -gtk_image_menu_item_update (GtkActivatable *activatable, - GtkAction *action, - const gchar *property_name) -{ - GtkImageMenuItem *image_menu_item; - gboolean use_appearance; - - image_menu_item = GTK_IMAGE_MENU_ITEM (activatable); - - parent_activatable_iface->update (activatable, action, property_name); - - use_appearance = gtk_activatable_get_use_action_appearance (activatable); - if (!use_appearance) - return; - - if (strcmp (property_name, "stock-id") == 0) - activatable_update_stock_id (image_menu_item, action); - else if (strcmp (property_name, "gicon") == 0) - activatable_update_gicon (image_menu_item, action); - else if (strcmp (property_name, "icon-name") == 0) - activatable_update_icon_name (image_menu_item, action); -} - -static void -gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable, - GtkAction *action) -{ - GtkImageMenuItem *image_menu_item; - GtkWidget *image; - gboolean use_appearance; - - image_menu_item = GTK_IMAGE_MENU_ITEM (activatable); - - parent_activatable_iface->sync_action_properties (activatable, action); - - if (!action) - return; - - use_appearance = gtk_activatable_get_use_action_appearance (activatable); - if (!use_appearance) - return; - - image = gtk_image_menu_item_get_image (image_menu_item); - if (image && !GTK_IS_IMAGE (image)) - { - gtk_image_menu_item_set_image (image_menu_item, NULL); - image = NULL; - } - - if (!image) - { - image = gtk_image_new (); - gtk_widget_show (image); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (activatable), - image); - } - - if (!activatable_update_stock_id (image_menu_item, action) && - !activatable_update_gicon (image_menu_item, action)) - activatable_update_icon_name (image_menu_item, action); - - gtk_image_menu_item_set_always_show_image (image_menu_item, - gtk_action_get_always_show_image (action)); -} - - -/** - * gtk_image_menu_item_new: - * - * Creates a new #GtkImageMenuItem with an empty label. - * - * Returns: a new #GtkImageMenuItem - * - * Deprecated: 3.10: Use gtk_menu_item_new() instead. - */ -GtkWidget* -gtk_image_menu_item_new (void) -{ - return g_object_new (GTK_TYPE_IMAGE_MENU_ITEM, NULL); -} - -/** - * gtk_image_menu_item_new_with_label: - * @label: the text of the menu item. - * - * Creates a new #GtkImageMenuItem containing a label. - * - * Returns: a new #GtkImageMenuItem. - * - * Deprecated: 3.10: Use gtk_menu_item_new_with_label() instead. - */ -GtkWidget* -gtk_image_menu_item_new_with_label (const gchar *label) -{ - return g_object_new (GTK_TYPE_IMAGE_MENU_ITEM, - "label", label, - NULL); -} - -/** - * gtk_image_menu_item_new_with_mnemonic: - * @label: the text of the menu item, with an underscore in front of the - * mnemonic character - * - * Creates a new #GtkImageMenuItem containing a label. The label - * will be created using gtk_label_new_with_mnemonic(), so underscores - * in @label indicate the mnemonic for the menu item. - * - * Returns: a new #GtkImageMenuItem - * - * Deprecated: 3.10: Use gtk_menu_item_new_with_mnemonic() instead. - */ -GtkWidget* -gtk_image_menu_item_new_with_mnemonic (const gchar *label) -{ - return g_object_new (GTK_TYPE_IMAGE_MENU_ITEM, - "use-underline", TRUE, - "label", label, - NULL); -} - -/** - * gtk_image_menu_item_new_from_stock: - * @stock_id: the name of the stock item. - * @accel_group: (allow-none): the #GtkAccelGroup to add the menu items - * accelerator to, or %NULL. - * - * Creates a new #GtkImageMenuItem containing the image and text from a - * stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK - * and #GTK_STOCK_APPLY. - * - * If you want this menu item to have changeable accelerators, then pass in - * %NULL for accel_group. Next call gtk_menu_item_set_accel_path() with an - * appropriate path for the menu item, use gtk_stock_lookup() to look up the - * standard accelerator for the stock item, and if one is found, call - * gtk_accel_map_add_entry() to register it. - * - * Returns: a new #GtkImageMenuItem. - * - * Deprecated: 3.10: Use gtk_image_menu_item_new() instead. - */ -GtkWidget* -gtk_image_menu_item_new_from_stock (const gchar *stock_id, - GtkAccelGroup *accel_group) -{ - return g_object_new (GTK_TYPE_IMAGE_MENU_ITEM, - "label", stock_id, - "use-stock", TRUE, - "accel-group", accel_group, - NULL); -} - -/** - * gtk_image_menu_item_set_use_stock: - * @image_menu_item: a #GtkImageMenuItem - * @use_stock: %TRUE if the menuitem should use a stock item - * - * If %TRUE, the label set in the menuitem is used as a - * stock id to select the stock item for the item. - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ -void -gtk_image_menu_item_set_use_stock (GtkImageMenuItem *image_menu_item, - gboolean use_stock) -{ - GtkImageMenuItemPrivate *priv; - - g_return_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item)); - - priv = image_menu_item->priv; - - if (priv->use_stock != use_stock) - { - priv->use_stock = use_stock; - - gtk_image_menu_item_recalculate (image_menu_item); - - g_object_notify (G_OBJECT (image_menu_item), "use-stock"); - } -} - -/** - * gtk_image_menu_item_get_use_stock: - * @image_menu_item: a #GtkImageMenuItem - * - * Checks whether the label set in the menuitem is used as a - * stock id to select the stock item for the item. - * - * Returns: %TRUE if the label set in the menuitem is used as a - * stock id to select the stock item for the item - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ -gboolean -gtk_image_menu_item_get_use_stock (GtkImageMenuItem *image_menu_item) -{ - g_return_val_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item), FALSE); - - return image_menu_item->priv->use_stock; -} - -/** - * gtk_image_menu_item_set_always_show_image: - * @image_menu_item: a #GtkImageMenuItem - * @always_show: %TRUE if the menuitem should always show the image - * - * If %TRUE, the menu item will always show the image, if available. - * - * Use this property if the menuitem would be useless or hard to use - * without the image. - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ -void -gtk_image_menu_item_set_always_show_image (GtkImageMenuItem *image_menu_item, - gboolean always_show) -{ - GtkImageMenuItemPrivate *priv; - - g_return_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item)); - - priv = image_menu_item->priv; - - if (priv->always_show_image != always_show) - { - priv->always_show_image = always_show; - - if (priv->image) - { - if (priv->always_show_image) - gtk_widget_show (priv->image); - else - gtk_widget_hide (priv->image); - } - - g_object_notify (G_OBJECT (image_menu_item), "always-show-image"); - } -} - -/** - * gtk_image_menu_item_get_always_show_image: - * @image_menu_item: a #GtkImageMenuItem - * - * Returns whether the menu item will always show the image, if available. - * - * Returns: %TRUE if the menu item will always show the image - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ -gboolean -gtk_image_menu_item_get_always_show_image (GtkImageMenuItem *image_menu_item) -{ - g_return_val_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item), FALSE); - - return image_menu_item->priv->always_show_image; -} - - -/** - * gtk_image_menu_item_set_accel_group: - * @image_menu_item: a #GtkImageMenuItem - * @accel_group: the #GtkAccelGroup - * - * Specifies an @accel_group to add the menu items accelerator to - * (this only applies to stock items so a stock item must already - * be set, make sure to call gtk_image_menu_item_set_use_stock() - * and gtk_menu_item_set_label() with a valid stock item first). - * - * If you want this menu item to have changeable accelerators then - * you shouldnt need this (see gtk_image_menu_item_new_from_stock()). - * - * Since: 2.16 - * - * Deprecated: 3.10 - */ -void -gtk_image_menu_item_set_accel_group (GtkImageMenuItem *image_menu_item, - GtkAccelGroup *accel_group) -{ - GtkImageMenuItemPrivate *priv; - GtkStockItem stock_item; - - /* Silent return for the constructor */ - if (!accel_group) - return; - - g_return_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item)); - g_return_if_fail (GTK_IS_ACCEL_GROUP (accel_group)); - - priv = image_menu_item->priv; - - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - - if (priv->use_stock && priv->label && gtk_stock_lookup (priv->label, &stock_item)) - if (stock_item.keyval) - { - gtk_widget_add_accelerator (GTK_WIDGET (image_menu_item), - "activate", - accel_group, - stock_item.keyval, - stock_item.modifier, - GTK_ACCEL_VISIBLE); - - g_object_notify (G_OBJECT (image_menu_item), "accel-group"); - } - - G_GNUC_END_IGNORE_DEPRECATIONS; - -} - -/** - * gtk_image_menu_item_set_image: - * @image_menu_item: a #GtkImageMenuItem. - * @image: (allow-none): a widget to set as the image for the menu item. - * - * Sets the image of @image_menu_item to the given widget. - * Note that it depends on the show-menu-images setting whether - * the image will be displayed or not. - * - * Deprecated: 3.10 - */ -void -gtk_image_menu_item_set_image (GtkImageMenuItem *image_menu_item, - GtkWidget *image) -{ - GtkImageMenuItemPrivate *priv; - - g_return_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item)); - - priv = image_menu_item->priv; - - if (image == priv->image) - return; - - if (priv->image) - gtk_container_remove (GTK_CONTAINER (image_menu_item), - priv->image); - - priv->image = image; - - if (image == NULL) - return; - - gtk_widget_set_parent (image, GTK_WIDGET (image_menu_item)); - g_object_set (image, - "visible", priv->always_show_image, - "no-show-all", TRUE, - NULL); - - g_object_notify (G_OBJECT (image_menu_item), "image"); -} - -/** - * gtk_image_menu_item_get_image: - * @image_menu_item: a #GtkImageMenuItem - * - * Gets the widget that is currently set as the image of @image_menu_item. - * See gtk_image_menu_item_set_image(). - * - * Return value: (transfer none): the widget set as image of @image_menu_item - * - * Deprecated: 3.10 - **/ -GtkWidget* -gtk_image_menu_item_get_image (GtkImageMenuItem *image_menu_item) -{ - g_return_val_if_fail (GTK_IS_IMAGE_MENU_ITEM (image_menu_item), NULL); - - return image_menu_item->priv->image; -} - -static void -gtk_image_menu_item_remove (GtkContainer *container, - GtkWidget *child) -{ - GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (container); - GtkImageMenuItemPrivate *priv = image_menu_item->priv; - - if (child == priv->image) - { - gboolean widget_was_visible; - - widget_was_visible = gtk_widget_get_visible (child); - - gtk_widget_unparent (child); - priv->image = NULL; - - if (widget_was_visible && - gtk_widget_get_visible (GTK_WIDGET (container))) - gtk_widget_queue_resize (GTK_WIDGET (container)); - - g_object_notify (G_OBJECT (image_menu_item), "image"); - } - else - { - GTK_CONTAINER_CLASS (gtk_image_menu_item_parent_class)->remove (container, child); - } -} diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c index d1e3a1c48e..bd805b64a6 100644 --- a/gtk/gtkinfobar.c +++ b/gtk/gtkinfobar.c @@ -45,7 +45,7 @@ #include "gtkprivate.h" #include "gtkorientable.h" #include "gtktypebuiltins.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" /** * SECTION:gtkinfobar diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 36fe5c86dc..7f030e0721 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -34,7 +34,7 @@ #include "gtkpango.h" #include "gtkwindow.h" #include "gtkclipboard.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkintl.h" #include "gtkseparatormenuitem.h" #include "gtktextutil.h" diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index e3af4bd52a..56b4abf126 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -52,7 +52,7 @@ #include "gtkclipboard.h" #include "gtkdnd.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtklabel.h" #include "gtkmain.h" #include "gtkmarshalers.h" diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index f300bb4b1f..1d503897d1 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -37,7 +37,7 @@ #include "gtkseparatormenuitem.h" #include "gtkprivate.h" #include "gtkbuildable.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtkwidgetprivate.h" #include "gtkintl.h" #include "gtksettings.h" diff --git a/gtk/gtkmenuitemprivate.h b/gtk/gtkmenuitemprivate.h index 689e7d735d..e3673df940 100644 --- a/gtk/gtkmenuitemprivate.h +++ b/gtk/gtkmenuitemprivate.h @@ -19,7 +19,7 @@ #define __GTK_MENU_ITEM_PRIVATE_H__ #include -#include +#include #include G_BEGIN_DECLS diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 57504b0989..0ce697de3f 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -33,7 +33,7 @@ #include "gtklabel.h" #include "gtkbox.h" #include "gtkimage.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkintl.h" #include "gtkprivate.h" #include "gtktypebuiltins.h" diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index 3d566b5c50..5427ff2e05 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -46,7 +46,7 @@ #include "gtkcellrendererpixbuf.h" #include "gtkscrolledwindow.h" #include "gtkicontheme.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkmain.h" #include diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index d8f1be8cb1..040285923a 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -25,7 +25,7 @@ #include "gtkprivate.h" #include "gtkliststore.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtktreeviewcolumn.h" #include "gtktreeselection.h" #include "gtktreemodel.h" diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index e8d15b821d..c143e93c82 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -25,7 +25,7 @@ #include "gtkarrow.h" #include "gtkbox.h" #include "gtkdnd.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkimage.h" #include "gtkintl.h" diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index cf0f952bc4..63b66f43a9 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -56,7 +56,7 @@ #include "gtkcellrendererpixbuf.h" #include "gtkfilechooserprivate.h" #include "gtkicontheme.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkintl.h" #include "gtkmain.h" #include "gtkmarshalers.h" diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index cbf0e2fa58..ed9b2eef6a 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -36,7 +36,7 @@ #include "gtkspinbutton.h" #include "gtkcellrendererpixbuf.h" #include "gtkcellrenderertext.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkimage.h" #include "gtktreeselection.h" #include "gtknotebook.h" diff --git a/gtk/gtkradiomenuitem.c b/gtk/gtkradiomenuitem.c index d59eb04b60..122d7d2f26 100644 --- a/gtk/gtkradiomenuitem.c +++ b/gtk/gtkradiomenuitem.c @@ -26,7 +26,7 @@ #include "gtkaccellabel.h" #include "gtkmarshalers.h" #include "gtkradiomenuitem.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtkprivate.h" #include "gtkintl.h" #include "a11y/gtkradiomenuitemaccessible.h" diff --git a/gtk/gtkrecentchooser.c b/gtk/gtkrecentchooser.c index af0b4705ad..f10790dfa5 100644 --- a/gtk/gtkrecentchooser.c +++ b/gtk/gtkrecentchooser.c @@ -22,8 +22,8 @@ #include "gtkrecentchooser.h" #include "gtkrecentchooserprivate.h" #include "gtkrecentmanager.h" -#include "gtkrecentaction.h" -#include "gtkactivatable.h" +#include "deprecated/gtkrecentaction.h" +#include "deprecated/gtkactivatable.h" #include "gtkintl.h" #include "gtktypebuiltins.h" #include "gtkprivate.h" diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c index 85a5bcd82e..20f1fbc856 100644 --- a/gtk/gtkrecentchooserdefault.c +++ b/gtk/gtkrecentchooserdefault.c @@ -28,7 +28,7 @@ #endif #include "gtkicontheme.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtksettings.h" #include "gtktreeview.h" #include "gtkliststore.h" @@ -46,7 +46,7 @@ #include "gtkbox.h" #include "gtkpaned.h" #include "gtkimage.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkintl.h" #include "gtklabel.h" #include "gtkmenuitem.h" @@ -62,7 +62,7 @@ #include "gtktooltip.h" #include "gtktypebuiltins.h" #include "gtkorientable.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtkrecentmanager.h" #include "gtkrecentfilter.h" diff --git a/gtk/gtkrecentchoosermenu.c b/gtk/gtkrecentchoosermenu.c index f1ce8479f9..65fd1a5192 100644 --- a/gtk/gtkrecentchoosermenu.c +++ b/gtk/gtkrecentchoosermenu.c @@ -27,20 +27,20 @@ #include "gtkrecentchooserprivate.h" #include "gtkrecentchoosermenu.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtkicontheme.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkintl.h" #include "gtksettings.h" #include "gtkmenushell.h" #include "gtkmenuitem.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkseparatormenuitem.h" #include "gtkmenu.h" #include "gtkimage.h" #include "gtklabel.h" #include "gtktooltip.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtktypebuiltins.h" #include "gtkprivate.h" diff --git a/gtk/gtkrecentchooserprivate.h b/gtk/gtkrecentchooserprivate.h index 8ff874d6d2..8e1be08672 100644 --- a/gtk/gtkrecentchooserprivate.h +++ b/gtk/gtkrecentchooserprivate.h @@ -23,7 +23,7 @@ #include "gtkrecentmanager.h" #include "gtkrecentchooser.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" G_BEGIN_DECLS diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index ab96db28d2..b03b12df28 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -103,7 +103,7 @@ #include "gtkrecentmanager.h" #include "gtkintl.h" #include "gtksettings.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtkicontheme.h" #include "gtktypebuiltins.h" #include "gtkprivate.h" diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 46b7ceb703..1e951b6598 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -34,7 +34,7 @@ #include "gtkbindings.h" #include "gtkbuildable.h" #include "gtkbuilderprivate.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkintl.h" #include "gtkmarshalers.h" diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 13d29d4cd6..95ea50f186 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -46,7 +46,7 @@ #include "gtkorientableprivate.h" #include "gtkprivate.h" #include "gtksettings.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtktypebuiltins.h" #include "gtkwidgetpath.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c index dd21d4bb1f..8fccfb351f 100644 --- a/gtk/gtkstatusicon.c +++ b/gtk/gtkstatusicon.c @@ -33,7 +33,7 @@ #include "gtkstatusicon.h" #include "gtkintl.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkiconhelperprivate.h" #include "gtkmain.h" #include "gtkmarshalers.h" diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 890688c1b9..5807241de9 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -37,7 +37,7 @@ #include "gtkwidget.h" #include "gtkwindow.h" #include "gtkprivate.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkwidgetpath.h" #include "gtkwidgetprivate.h" #include "gtkstylecascadeprivate.h" diff --git a/gtk/gtkstyleprovider.h b/gtk/gtkstyleprovider.h index 74ce032428..57fef53a24 100644 --- a/gtk/gtkstyleprovider.h +++ b/gtk/gtkstyleprovider.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index c296fe7f6f..382fbc4430 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -38,10 +38,10 @@ #include "gtkswitch.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtkintl.h" #include "gtkprivate.h" -#include "gtktoggleaction.h" +#include "deprecated/gtktoggleaction.h" #include "gtkwidget.h" #include "gtkmarshalers.h" #include "gtkapplicationprivate.h" diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 32e7e403ab..0f1db3790c 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -30,7 +30,7 @@ #define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API #include "gtkbindings.h" #include "gtkdnd.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtkintl.h" #include "gtkmain.h" #include "gtkmarshalers.h" diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index 4697ae9ee4..21eab4a54e 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -30,8 +30,8 @@ #include "gtklabel.h" #include "gtkmain.h" #include "gtkmarshalers.h" -#include "gtktoggleaction.h" -#include "gtkactivatable.h" +#include "deprecated/gtktoggleaction.h" +#include "deprecated/gtkactivatable.h" #include "gtkprivate.h" #include "gtkintl.h" #include "a11y/gtktogglebuttonaccessible.h" diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c index 4db54aa629..eb74549fca 100644 --- a/gtk/gtktoggletoolbutton.c +++ b/gtk/gtktoggletoolbutton.c @@ -22,11 +22,11 @@ #include "gtkcheckmenuitem.h" #include "gtklabel.h" #include "gtktogglebutton.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtkintl.h" #include "gtkradiotoolbutton.h" -#include "gtktoggleaction.h" -#include "gtkactivatable.h" +#include "deprecated/gtktoggleaction.h" +#include "deprecated/gtkactivatable.h" #include "gtkprivate.h" diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index b9c5fa8f61..b02663b8eb 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -49,7 +49,7 @@ #include "gtkradiotoolbutton.h" #include "gtkseparatormenuitem.h" #include "gtkseparatortoolitem.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtktoolshell.h" #include "gtkbox.h" #include "gtkprivate.h" diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index e079faecda..dee9f946b7 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -21,15 +21,15 @@ #include "config.h" #include "gtktoolbutton.h" #include "gtkbutton.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkimage.h" -#include "gtkimagemenuitem.h" +#include "deprecated/gtkimagemenuitem.h" #include "gtklabel.h" -#include "gtkstock.h" +#include "deprecated/gtkstock.h" #include "gtkbox.h" #include "gtkintl.h" #include "gtktoolbar.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtkactionable.h" #include "gtkprivate.h" diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c index b29a295442..01634d0c21 100644 --- a/gtk/gtktoolitem.c +++ b/gtk/gtktoolitem.c @@ -28,7 +28,7 @@ #include "gtktoolshell.h" #include "gtkseparatormenuitem.h" #include "gtksizerequest.h" -#include "gtkactivatable.h" +#include "deprecated/gtkactivatable.h" #include "gtkintl.h" #include "gtkprivate.h" diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 865892a75d..347f8b3b1e 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -38,7 +38,7 @@ #include "gtkclipboard.h" #include "gtkcssstylepropertyprivate.h" #include "gtkcssnumbervalueprivate.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkintl.h" #include "gtkmarshalers.h" #include "gtkselectionprivate.h" diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 3d0847c030..11976519df 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -40,7 +40,7 @@ #include "gtkmain.h" #include "gtkmnemonichash.h" #include "gtkmenubar.h" -#include "gtkiconfactory.h" +#include "deprecated/gtkiconfactory.h" #include "gtkicontheme.h" #include "gtkmarshalers.h" #include "gtkplug.h"