Commit Graph

21 Commits

Author SHA1 Message Date
Matthias Clasen
e9fc660d7e Add a variant of gtk_icon_theme_load_symbolic that takes a style
As proposed by Owen in bug 621578 to reduce code duplication.
2010-06-14 23:46:46 -04:00
Michael Natterer
5e29973773 Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES
...and disallow inclusion of individual files unconditionally.
2010-05-03 01:51:18 +02:00
Matthias Clasen
6b939d57c7 Support 'symbolic' themed icons
Add gtk_icon_info_load_symbolic() to load symbolic icons, and
theme their background/foreground colours to match the
colours used in the theme.

Adds the gtk_icon_info_load_symbolic() function, explicit
support in GtkImage and GtkCellRendererPixbuf, and test cases
for those 2 widgets.

With help from Bastien Nocera <hadess@hadess.net>

https://bugzilla.gnome.org/show_bug.cgi?id=614711
2010-04-28 12:02:05 +01:00
Michael Natterer
77e99003a8 gtk/gtkaction.h gtk/gtkbuildable.h gtk/gtkbuilderprivate.h
2008-06-23  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaction.h
	* gtk/gtkbuildable.h
	* gtk/gtkbuilderprivate.h
	* gtk/gtkcelllayout.h
	* gtk/gtkentrycompletion.h
	* gtk/gtkfilechoosersettings.h
	* gtk/gtkfilesystem.h
	* gtk/gtkfilesystemmodel.h
	* gtk/gtkicontheme.h
	* gtk/gtklinkbutton.h
	* gtk/gtkpagesetup.h
	* gtk/gtkpapersize.h
	* gtk/gtkprintcontext.h
	* gtk/gtkprintoperation.h
	* gtk/gtkprintoperationpreview.h
	* gtk/gtkprintsettings.h
	* gtk/gtkrecentchooserprivate.h
	* gtk/gtkrecentmanager.h
	* gtk/gtksearchengine.h
	* gtk/gtktexttag.h
	* gtk/gtktreeselection.h
	* gtk/gtktreeviewcolumn.h
	* gtk/gtkuimanager.h: remove redundant inclusion of <glib.h> and
	<glib-object.h>. There is no point in relying on them being pulled
	in by other headers in some places and placing them explicitly in
	other places, so choose the "as little includes as possible"
	approach and get rid of them.


svn path=/trunk/; revision=20675
2008-06-23 14:07:19 +00:00
Tim Janik
33b19ed8ab Seal priv pointer in GtkIconTheme.
svn path=/trunk/; revision=20565
2008-06-20 11:04:45 +00:00
Matthias Clasen
ee8253f908 Bug 522084 – GIcon support for GtkIconTheme & GtkImage
2008-05-27  Matthias Clasen  <mclasen@redhat.com>

        Bug 522084 – GIcon support for GtkIconTheme & GtkImage

        * gtk/gtkicontheme.[hc]: Add support for GIcon based lookups.
        * gtk/gtkimage.[hc]: Allow setting an image from a GIcon.
        * gtk/gtk.symbols: Additions
        * tests/testimage.c: Add a GIcon test


svn path=/trunk/; revision=20236
2008-05-29 14:33:49 +00:00
Michael Natterer
eff99c282c define __GTK_H_INSIDE__ around including all other headers.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk.h: define __GTK_H_INSIDE__ around including all other
	headers.

	* gtk/gtktypebuiltins.h.template
	* gtk/gtkversion.h.in
	* gtk/gtk*.h: add single-include guards that #error out if
	GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
	included individually.

	* gtk/gtkprintbackend.h
	* gtk/gtkprinter-private.h
	* gtk/gtktextlayout.h
	* gtk/gtktexttagprivate.h
	* gtk/gtktexttypes.h
	* gtk/gtktreedatalist.h: include <gtk/gtk.h> instead of individual
	headers in these private or semi-private headers.

	* gtk/gtkimmodule.h: also here because it's not in gtk.h.

	* gtk/gtkpagesetupunixdialog.h
	* gtk/gtkprinter.h
	* gtk/gtkprintjob.h
	* gtk/gtkprintunixdialog.h: likewise in the gtkunixprint headers.

	* gtk/gtkclist.h
	* gtk/gtkcombo.h
	* gtk/gtkctree.h
	* gtk/gtkfilesel.h
	* gtk/gtkitemfactory.h
	* gtk/gtklist.h
	* gtk/gtklistitem.h
	* gtk/gtkoldeditable.h
	* gtk/gtkoptionmenu.h
	* gtk/gtkpixmap.h
	* gtk/gtkpreview.h
	* gtk/gtksignal.h
	* gtk/gtktipsquery.h: whenever possible, include only <gtk/gtk.h>
	instead of individual headers in these deprecated headers. They
	don't get included at all when GTK_DISABLE_DEPRECATED is defined,
	so if an app needs them anyway, it must undef GTK_DISABLE_DEPRECATED
	and include them individually, which should continue to work.

	* gtk/gtkclist.c: include "gtkctree.h" because of the change
	above.


svn path=/trunk/; revision=20221
2008-05-28 15:07:04 +00:00
Michael Natterer
9f1bc132a2 gtk/gtkicontheme.h include <gdk/gdk.h> instead of <gdk/gdkscreen.h>.
2008-04-18  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkicontheme.h
	* gtk/gtkrecentmanager.h: include <gdk/gdk.h> instead of
	<gdk/gdkscreen.h>.

	* gtk/gtkbuilderparser.c
	* gtk/gtklinkbutton.c
	* gtk/gtkpreview.c
	* gtk/gtkrecentchooserdefault.c
	* gtk/gtkrecentchoosermenu.c
	* modules/input/gtkimcontextthai.c: remove inclusion of single
	files from gdk, none of the includes was actually needed.


svn path=/trunk/; revision=20023
2008-04-18 14:56:23 +00:00
Matthias Clasen
b82c9dc589 Add a function to look up an icon from a list of icon names. (#396901,
2007-05-18  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkicontheme.h:
        * gtk/gtkicontheme.c: Add a function to look up an icon from
        a list of icon names.  (#396901, Luca Ferretti)



svn path=/trunk/; revision=17868
2007-05-18 20:19:12 +00:00
Matthias Clasen
5a706b553b Add GTK_ICON_LOOKUP_GENERIC_FALLBACK icon lookup flag and implement it.
2007-04-19  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkicontheme.h:
        * gtk/gtkicontheme.c: Add GTK_ICON_LOOKUP_GENERIC_FALLBACK
        icon lookup flag and implement it.  (#396901, Luca Ferreti)



svn path=/trunk/; revision=17611
2007-04-19 04:14:39 +00:00
Rodney Dawes
57f51f5d54 Add a new API call gtk_icon_theme_list_contexts so that one can choose
2007-03-21  Rodney Dawes  <dobey@novell.com>

	* gtk/gtk.symbols:
	* gtk/gtkicontheme.[ch]:
	* docs/reference/gtk/gtk-sections.txt:
	* tests/testicontheme.c:
	Add a new API call gtk_icon_theme_list_contexts so that one can
	choose icons from a theme by context (#420719)


svn path=/trunk/; revision=17550
2007-03-21 19:31:01 +00:00
Matthias Clasen
7014a3b5bb Export this privately.
2006-07-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.h:
	* gtk/gtkicontheme.c (_gtk_icon_theme_ensure_builtin_cache):
	Export this privately.

	* gtk/gtkiconfactory.c (render_fallback_image): And call it
	here to initialize the builtin cache before using it.  (#348063,
	Diego Pettenò)
2006-07-20 18:07:21 +00:00
Manish Singh
4fe43281ee add declaration for _gtk_icon_theme_check_reload.
2005-08-22  Manish Singh  <yosh@gimp.org>

        * gtk/gtkicontheme.h: add declaration for _gtk_icon_theme_check_reload.

        * gtk/gtkwindow.c: remove declaration of gtk_window_read_rcfiles.
2005-08-22 20:51:56 +00:00
Tor Lillqvist
f3da170539 gtk/gtkaccelmap.[ch] gtk/gtkfilechooser.[ch] gtk/gtkfilesel.c
2004-12-12  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkaccelmap.[ch]
	* gtk/gtkfilechooser.[ch]
	* gtk/gtkfilesel.c
	* gtk/gtkfilesystemwin32.c
	* gtk/gtkiconfactory.[ch]
	* gtk/gtkicontheme.[ch]
	* gtk/gtkimage.[ch]
	* gtk/gtkimmodule.c
	* gtk/gtkmodules.c
	* gtk/gtkrc.[ch]
	* gtk/gtkuimanager.[ch]
	* gtk/gtkwindow.[ch]
	* gtk/updateiconcache.c
	* gtk/gtk.symbols: Use gstdio wrappers. On Windows, convert
	environment variables referring to pathnames from locale encoding
	to UTF-8. As in GLib, in order to preserve Windows DLL ABI
	stability, add binary compatibility versions of functions that
	take file names as arguments, or return file names. Add a _utf8
	suffix to the "real" such functions on Windows. The ABI
	compatibility versions keep the old name.

	* gtk/Makefile.am: Strip PRIVATE symbols from the GNU import
	library.

	* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Implement
	file mapping on Win32.

	* gtk/updateiconcache.c: Don't crash if invoked without
	argument. Use binary mode when opening file.

	* modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am: Install
	gtkrc in correct place, in <datadir>/themes/MS-Windows/gtk-2.0.
2004-12-12 21:09:13 +00:00
Matthias Clasen
b69987f217 Mark as const.
2004-11-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.h (gtk_ui_manager_get_type):
	* gtk/gtktreeview.h (gtk_tree_view_get_type):
	* gtk/gtktreeviewcolumn.h (gtk_tree_view_column_get_type):
	* gtk/gtktreestore.h (gtk_tree_store_get_type):
	* gtk/gtktreeselection.h (gtk_tree_selection_get_type):
	* gtk/gtktreemodelfilter.h (gtk_tree_model_filter_get_type):
	* gtk/gtktreemodel.h (gtk_tree_iter_get_type):
	(gtk_tree_path_get_type):
	(gtk_tree_row_reference_get_type):
	* gtk/gtktoolitem.h (gtk_tool_item_get_type):
	* gtk/gtktoolbutton.h (gtk_tool_button_get_type):
	* gtk/gtktoggleaction.h (gtk_toggle_action_get_type):
	* gtk/gtkthemes.h (gtk_theme_engine_get_type):
	* gtk/gtktextiter.h (gtk_text_iter_get_type):
	* gtk/gtksettings.h (gtk_settings_get_type):
	* gtk/gtkselection.h (gtk_selection_data_get_type):
	* gtk/gtkradioaction.h (gtk_radio_action_get_type):
	* gtk/gtkmenutoolbutton.h (gtk_menu_tool_button_get_type):
	* gtk/gtkliststore.h (gtk_list_store_get_type):
	* gtk/gtkiconview.h (gtk_icon_view_get_type):
	* gtk/gtkicontheme.h (gtk_icon_info_get_type):
	* gtk/gtkiconfactory.h (gtk_icon_factory_get_type):
	(gtk_icon_set_get_type):
	(gtk_icon_source_get_type):
	* gtk/gtkfilesystemwin32.h (gtk_file_system_win32_get_type):
	* gtk/gtkfilesystemunix.h (gtk_file_system_unix_get_type):
	* gtk/gtkfilesystem.h (gtk_file_folder_get_type):
	(gtk_file_info_get_type, gtk_file_path_get_type):
	(gtk_file_system_get_type):
	* gtk/gtkfilefilter.h (gtk_file_filter_get_type):
	* gtk/gtkfilechooserwidget.h (gtk_file_chooser_widget_get_type):
	* gtk/gtkfilechooser.h (gtk_file_chooser_get_type):
	* gtk/gtkfilechooserdialog.h (gtk_file_chooser_dialog_get_type):
	* gtk/gtkexpander.h (gtk_expander_get_type):
	* gtk/gtkentrycompletion.h (gtk_entry_completion_get_type):
	* gtk/gtkcombobox.h (gtk_combo_box_get_type):
	* gtk/gtkcomboboxentry.h (gtk_combo_box_entry_get_type):
	* gtk/gtkclipboard.h (gtk_clipboard_get_type):
	* gtk/gtkcellview.h (gtk_cell_view_get_type):
	* gtk/gtkcellrenderertoggle.h (gtk_cell_renderer_toggle_get_type):
	* gtk/gtkcellrenderertext.h (gtk_cell_renderer_text_get_type):
	* gtk/gtkcellrendererprogress.h (gtk_cell_renderer_progress_get_type):
	* gtk/gtkcellrendererpixbuf.h (gtk_cell_renderer_pixbuf_get_type):
	* gtk/gtkcellrenderercombo.h (gtk_cell_renderer_combo_get_type):
	* gtk/gtkcelllayout.h (gtk_cell_layout_get_type):
	* gtk/gtkactiongroup.h (gtk_action_group_get_type):
	* gtk/gtkaction.h (gtk_action_get_type):
	* gtk/gtkaccessible.h (gtk_accessible_get_type):
	* gtk/gtkaccelmap.h (gtk_accel_map_get_type):
	* gtk/gtkaccelgroup.h (gtk_accel_group_get_type):
	* gtk/gtkmessagedialog.h (gtk_message_dialog_get_type): Mark as const.

	* gtk/gtkicontheme.h:  Don't mark gtk_icon_theme_error_quark()
	as const, to be consistent with all the other error_quark
	functions. (technically they are const, but since these are
	called only in error paths, giving the compiler better
	optimization opportunities doesn't matter much)

	* gtk/gtk.symbols:
	* gdk/gdk.symbols: Add attribute annotations.

	* gtk/makegtkalias.pl:
	* gdk/makegdkalias.pl: Keep attribute annotations, but strip PRIVATE.

	* gtk/Makefile.am (gtk.def):
	* gdk/Makefile.am (gdk.def): Strip attribute annotations, but keep
	PRIVATE.
2004-11-23 20:02:15 +00:00
Matthias Clasen
dc25aac558 Improve the docs. (#157785, Torsten Schoenfeld)
2004-11-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.[ch]: Improve the docs.  (#157785,
	Torsten Schoenfeld)
2004-11-10 02:03:36 +00:00
Matthias Clasen
a5638e82e8 Support named themed window icons. 2004-07-17 03:55:07 +00:00
Matthias Clasen
5f1b20c252 Typo fix. (#144750, Jeff Franks)
2004-06-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.h (GTK_ICON_THEME_GET_CLASS): Typo
	fix.  (#144750, Jeff Franks)
2004-06-22 14:26:42 +00:00
Manish Singh
874c2ce9cc fix GTK_TYPE_ICON_INFO macro, reported by muppet.
Tue Dec 23 22:34:50 2003  Manish Singh  <yosh@gimp.org>

        * gtk/gtkicontheme.h: fix GTK_TYPE_ICON_INFO macro, reported by
        muppet.
2003-12-24 06:32:28 +00:00
Matthias Clasen
224cfe0763 Correct the definition of the values. (#123361, Marco Pesenti Gritti)
Wed Nov 12 20:57:50 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkicontheme.h (enum GtkIconLookupFlags): Correct
	the definition of the values.  (#123361, Marco Pesenti Gritti)
2003-11-12 19:58:43 +00:00
Owen Taylor
a72aed4ea2 Implement a loader for named themed icon based on from gnome-desktop
Wed Jul  2 18:00:56 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkicontheme.[ch]: Implement a loader for
        named themed icon based on from gnome-desktop library
        by Alex Larsson.

        * gtk/gtkiconthemeparser.[ch]: .ini file parsing code
        from gnome-desktop.

        * gtk/gtkiconfactory.[ch]: Add
        gtk_icon_source_set/get_icon_name() to allow stock icons
        to be based off of named theme icons.

        * gtk/gtkiconfactory.c: Rework sources so that the source
        is *either* a pixbuf, or a filename, or an icon name,
        instead of the pixbuf/filename mix it was before. Put a
        workaround for get_pixbuf() so that it can return the
        filename pixbuf, e.g, for render_icon().

        * gtk/gtkiconfactory.c: Make the default setup use
        themed icons, and add builtin icons to the default
        icon theme for all the standard pixbufs, so we
        don't rely on actually having an icon theme on disk.

        * gtk/gtkrc.c: Add support for @"icon-name" to specify
        a themed icon for a stock icon source.

        * tests/Makefile.am test/testicontheme.c: Add a test
        program from gnome-desktop.

        * gdk/x11/gdkevents-x11.c gtk/gtksettings.c: Add
        Net/IconThemeName / gtk-icon-theme-name setting.

        * gtk/gtkiconfactory.c (ensure_cache_up_to_date): Actually
        update the icon cache serial so we don't continually

        * gtk/gtkwidget.c: Fix a couple of references in doc comments
        to ::direction_set that should have been to ::direction-changed
2003-07-02 22:44:09 +00:00