Commit Graph

126 Commits

Author SHA1 Message Date
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Javier Jardón
79350fcd8a Fix warning: should pass gboolean*, not gboolean** 2010-06-24 01:31:01 +02:00
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
Matthias Clasen
c4134a535e Fix up gtk_icon_info_load_symbolic docs 2010-05-25 09:47:20 -04:00
Matthias Clasen
1782151092 Doc fixes
Correct some Since tags.
2010-05-01 21:40:43 -04:00
Javier Jardón
fa3bb041eb Fix <ulink> tag in previous commit 2010-04-28 18:41:33 +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
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Tomeu Vizoso
c171d58640 Add a few more annotations to GtkIconTheme 2009-12-16 17:22:01 -02:00
Matthias Clasen
00c439dfcb Fix a typo
This was reported in bug 586347.
2009-08-06 23:44:00 -04:00
Michael Natterer
374fa4bb4a g_return_if_fail() on icon_name != NULL so we get a warning instead of a
2009-01-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkicontheme.c (gtk_icon_theme_has_icon): g_return_if_fail()
	on icon_name != NULL so we get a warning instead of a crash here.


svn path=/trunk/; revision=22174
2009-01-22 15:15:40 +00:00
Christian Persch
4ba6262be9 Bug 557059 – crash when compositing emblems with icon
2008-10-20  Christian Persch  <chpe@gnome.org>

	Bug 557059 – crash when compositing emblems with icon

	* gtk/gtkicontheme.c: (apply_emblems): Copy the pixbuf before using it
	with gtk_pixbuf_composite, in case its pixdata is read-only (mmaped
	from icon cache or builtins).

svn path=/trunk/; revision=21690
2008-10-20 16:55:00 +00:00
Tor Lillqvist
729524185b gtk/gtk.symbols gtk/makegtkalias.pl gtk/gtkaccelmap.c gtk/gtkfilechooser.c
2008-08-08  Tor Lillqvist  <tml@novell.com>

	* gtk/gtk.symbols
	* gtk/makegtkalias.pl
	* gtk/gtkaccelmap.c
	* gtk/gtkfilechooser.c
	* gtk/gtkfilesel.c
	* gtk/gtkiconfactory.c
	* gtk/gtkicontheme.c
	* gtk/gtkimage.c
	* gtk/gtkrc.c
	* gtk/gtkuimanager.c
	* gtk/gtkwindow.c: No need for the DLL ABI backward compatibility
	functions on Win64.


svn path=/trunk/; revision=21040
2008-08-08 03:49:18 +00:00
Michael Natterer
0324c243f3 move variables to local scopes, fix indentation and silence bogus warning
2008-08-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkicontheme.c (apply_emblems): move variables to local
	scopes, fix indentation and silence bogus warning about using
	uninitialized variables.


svn path=/trunk/; revision=21031
2008-08-07 10:07:49 +00:00
Matthias Clasen
25536fafd0 Update to handle GEmblem`
svn path=/trunk/; revision=20980
2008-08-04 16:36:28 +00:00
Matthias Clasen
34dc548878 Support rendering GEmblemedIcon
svn path=/trunk/; revision=20910
2008-07-28 16:15:14 +00:00
Christian Persch
446f41757b Use g_set_error_literal where appropriate. Bug #538640.
svn path=/trunk/; revision=20463
2008-06-19 12:47:48 +00:00
Tor Lillqvist
effd6886f6 Bug 538362 - Get Win32 icons back in the file chooser
2008-06-16  Tor Lillqvist  <tml@novell.com>

	Bug 538362 - Get Win32 icons back in the file chooser

	* gtk/gtkicontheme.c (choose_icon): Check if the icon name is a
	reference to an icon resource in a DLL or .EXE as in the
	Registry. In that case, extract the icon and convert to a
	GdkPixbuf. Patch by Hans Breuer.


svn path=/trunk/; revision=20398
2008-06-16 13:27:46 +00:00
Matthias Clasen
4d15d77fc5 Fix docs
svn path=/trunk/; revision=20392
2008-06-15 22:56:47 +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
9c7a2c321f remove unused variable.
2008-01-09  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcolorsel.c (make_label_spinbutton): remove unused
	variable.

	* gtk/gtkcombobox.c (gtk_combo_box_detacher)
	* gtk/gtkicontheme.c (theme_list_contexts)
	(gtk_icon_theme_lookup_icon)
	* gtk/gtkimcontextsimple.c (beep_window)
	* gtk/gtklinkbutton.c (set_link_color)
	* gtk/gtkuimanager.c (child_hierarchy_changed_cb): add casts to
	fix warnings.

	* gtk/gtkpathbar.c (_gtk_path_bar_set_file_system): remove unused
	variable and add const to another to fix a warning.


svn path=/trunk/; revision=19330
2008-01-09 17:02:50 +00:00
Matthias Clasen
f9e4618bda Two optimizations for icon cache lookups.
2007-12-03  Matthias Clasen  <mclasen@redhat.com>

        Two optimizations for icon cache lookups.

        * gtk/gtkiconcache.[hc]:
        * gtk/gtkicontheme.c: Remember the directory index for
        subdirectories, instead of running over the directory list
        again and again.

        * gtk/gtkiconcache.c (find_image_offset): Remember the last
        chain and try it first; this helps with the the usage patterns
        in gtkicontheme.c, where the same icon is queried for a lot
        of subdirectories.


svn path=/trunk/; revision=19099
2007-12-03 17:44:27 +00:00
Matthias Clasen
e0e3b2136f Small cleanups
svn path=/trunk/; revision=18488
2007-07-18 07:30:34 +00:00
Sven Neumann
721ed98534 use g_slice_dup().
2007-06-19  Sven Neumann  <sven@gimp.org>

	* gtk/gtkicontheme.c (gtk_icon_info_copy): use g_slice_dup().

svn path=/trunk/; revision=18189
2007-06-19 15:41:24 +00:00
Torsten Schönfeld
5b12bfdad2 Initialize unthemed_icon to NULL to avoid accessing uninitialized memory
* gtk/gtkicontheme.c (choose_icon): Initialize unthemed_icon to NULL
	to avoid accessing uninitialized memory when
	gtk_icon_theme_choose_icon() is called with an empty names list.

svn path=/trunk/; revision=18018
2007-06-03 20:44:10 +00:00
Matthias Clasen
11e2767fbd Improve a warning Always set the error when returning NULL. (#440982,
2007-05-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkiconfactory.c: Improve a warning
        * gtk/gtkicontheme.c (gtk_icon_info_load_icon): Always
        set the error when returning NULL.  (#440982, Carlos Garcia
        Campos)



svn path=/trunk/; revision=17912
2007-05-25 15:31:28 +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
0ac3069358 Set the filename to NULL for builtin icons, sinc
2007-04-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkicontheme.c (theme_lookup_icon): Set the filename to
        NULL for builtin icons, sinc gtk_icon_info_get_builtin_pixbuf()
        depends on it.

        * tests/testicontheme.c: Report builtin icons.


svn path=/trunk/; revision=17638
2007-04-25 18:01:44 +00:00
Chris Wilson
18a9c78bf3 Ensure the icon_theme->all_icons and dir->icons hash tables use the same
2007-04-24  Chris Wilson  <chris@chris-wilson.co.uk>

    * gtk/gtkicontheme.c (scan_directory): Ensure the 
    icon_theme->all_icons and dir->icons hash tables use the same string
    as their keys. (#418531)


svn path=/trunk/; revision=17626
2007-04-24 14:55:52 +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
889e223ee3 Fix a couple of comment typos (#421627)
2007-03-23  Rodney Dawes  <dobey@novell.com>

	* gtk/gtkicontheme.c: Fix a couple of comment typos (#421627)


svn path=/trunk/; revision=17559
2007-03-23 14:06:52 +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
Chris Wilson
0b1c9b7cc2 Protect ensure_valid_themes() from recursion, which can happen for example
2007-03-15  Chris Wilson  <chris@chris-wilson.co.uk>

	* gtk/gtkicontheme.c (ensure_valid_themes), (rescan_themes),
	(gtk_icon_theme_rescan_if_needed): Protect ensure_valid_themes()
	from recursion, which can happen for example if the app tries to
	reload an icon from within a theme-changed handler. (#418531)


svn path=/trunk/; revision=17523
2007-03-15 18:40:16 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Chris Wilson
8a82e3c943 Be careful not to trigger a style reset before we have loaded the icon
2007-03-06  Chris Wilson  <chris@chris-wilson.co.uk>

	* gtk/gtkicontheme.c (update_current_theme), (gtk_icon_theme_init),
	(do_theme_change), (gtk_icon_theme_set_custom_theme),
	(load_themes):
		Be careful not to trigger a style reset before we have loaded
		the icon theme. (#414875).


svn path=/trunk/; revision=17404
2007-03-06 18:26:41 +00:00
Chris Wilson
e2a74a9bd9 Bug 409101 – invalid read to gtkicontheme.c insert_theme(), might cause
2007-02-26  Chris Wilson  <chris@chris-wilson.co.uk>

	Bug 409101 – invalid read to gtkicontheme.c insert_theme(), might cause gnome-panel crash

	* gtk/gtkicontheme.c: (scan_directory):
		Reorder the replacement of the shared base_name key, so that we
		avoid dereferencing the string in the icon_theme->all_icon
		hash table after freeing it from the dir->icons hash table.


svn path=/trunk/; revision=17353
2007-02-26 14:09:21 +00:00
Matthias Clasen
82ef0d0d2a When finding a matching non-scalable dir, keep going and look for a closer
2007-01-14  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkicontheme.c (theme_lookup_icon): When finding a matching
        non-scalable dir, keep going and look for a closer match.
        (#395830, Luca Ferretti)


svn path=/trunk/; revision=17153
2007-01-15 02:56:33 +00:00
Matthias Clasen
bcf7d7e972 Waste less time with non-directories. (#391725, Chris Wilson)
2007-01-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkicontheme.c (load_themes): Waste less time
        with non-directories.  (#391725, Chris Wilson)



svn path=/trunk/; revision=17005
2007-01-02 04:19:28 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Matthias Clasen
f71cc8fcaf Fix a crash with icon themes 2006-12-02 19:48:22 +00:00
Paolo Borelli
a1808a8ef3 plug memory leak. Fixes bug #362439.
2006-10-15  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtkicontheme.c (pixbuf_supports_svg): plug memory leak.
	Fixes bug #362439.
2006-10-15 22:58:08 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
52398c8354 Actually use a higher priority than resize 2006-08-15 18:25:35 +00:00
Matthias Clasen
6f535cb264 Run the reset_styles idle at a priority higher than size negotiation.
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (do_theme_change): Run the reset_styles
	idle at a priority higher than size negotiation.  (#350517,
	Søren Sandmann)
2006-08-15 17:44:09 +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
Matthias Clasen
489529be5a Small memory savings 2006-07-07 05:24:00 +00:00
Matthias Clasen
36f7ed300a Remove debugging spew 2006-06-07 13:45:11 +00:00
Matthias Clasen
a9d11e9dba make the last change work 2006-06-07 04:16:52 +00:00
Matthias Clasen
b2b9fc97f8 Small optimization 2006-06-06 20:09:43 +00:00