summaryrefslogtreecommitdiff
path: root/gtk/gtkrc.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 2008-06-30 Cody Russell <bratsche@gnome.org> * Practically everything changed. Change all references of GIMP Toolkit (and variations of it) to GTK+ Toolkit, showing no mercy at all to our beloved ancestry. (#540529) svn path=/trunk/; revision=20709
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* gtk/gtkfontsel.c gtk/gtkrc.c gtk/gtkstyle.c use g_object_unref() insteadMichael Natterer2008-06-161-3/+3
| | | | | | | | | | | | | 2008-06-16 Michael Natterer <mitch@imendio.com> * gtk/gtkfontsel.c * gtk/gtkrc.c * gtk/gtkstyle.c * gtk/gtkwidget.c: use g_object_unref() instead of the deprecated gtk_rc_style_unref(). svn path=/trunk/; revision=20405
* add cast to fix const warning.Michael Natterer2008-01-141-9/+14
| | | | | | | | | | | | | 2008-01-14 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (_gtk_rc_style_unset_rc_property): add cast to fix const warning. (gtk_rc_parse_any): change variables to const and introduce another local variable to fix const warnings. svn path=/trunk/; revision=19371
* Fix doc typosMatthias Clasen2007-11-301-2/+2
| | | | svn path=/trunk/; revision=19094
* Require gtk-doc 1.8Matthias Clasen2007-11-251-5/+6
| | | | | | | | | | | 2007-11-25 Matthias Clasen <mclasen@redhat.com> * configure.in: Require gtk-doc 1.8 * */*.c: Use gtk-doc abbreviations for examples in docs. svn path=/trunk/; revision=19041
* Accept class names starting with lowercase letters for style propertyMatthias Clasen2007-06-111-3/+1
| | | | | | | | | | | | 2007-06-10 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c (gtk_rc_parse_style): Accept class names starting with lowercase letters for style property assignments, since GType accepts these too, and gtkmm uses such class names. (#343012, Murray Cumming, Johannes Schmid) svn path=/trunk/; revision=18101
* initialize rc_priv in the else branch too. (#445539)Carlos Garnacho2007-06-081-0/+1
| | | | | | | | | | 2007-06-09 Carlos Garnacho <carlos@imendio.com> * gtk/gtkrc.c (gtk_rc_parse_engine): initialize rc_priv in the else branch too. (#445539) svn path=/trunk/; revision=18084
* Make it possible for theme engines to support symbolic colors. (#426192,Matthias Clasen2007-06-081-25/+65
| | | | | | | | | | | | | | | | 2007-06-08 Matthias Clasen <mclasen@redhat.com> Make it possible for theme engines to support symbolic colors. (#426192, Andrea Cimitan, patch by Olivier Samyn) * gtk/gtk.symbols: * gtk/gtkrc.h: * gtk/gtkrc.c (gtk_rc_parse_color_full): Export this function * gtk/gtkrc.c (gtk_rc_parse_engine): Copy color hashes to new style before parsing engine section. svn path=/trunk/; revision=18081
* new method, gtk_widget_modify_cursor() (#89314).Yevgen Muntyan2007-06-061-0/+34
| | | | | | | | | | | | | | | | | | | 2007-06-06 Yevgen Muntyan <muntyan@tamu.edu> * gtk/gtkwidget.c: * gtk/gtkwidget.h: new method, gtk_widget_modify_cursor() (#89314). * gtkrc.c: * gtkrc.h: new functions _gtk_rc_style_set_rc_property() and _gtk_rc_style_unset_rc_property(). * gtk/gtk.symbols: added gtk_widget_modify_cursor. * tests/testtext.c (do_cursor_visible_changed): * tests/testgtk.c (create_styles): test it. svn path=/trunk/; revision=18066
* Initialise variable. Bug #423064.Christian Persch2007-03-261-0/+1
| | | | | | | | 2007-03-26 Christian Persch <chpe@gnome.org> * gtk/gtkrc.c: (gtk_rc_context_get): Initialise variable. Bug #423064. svn path=/trunk/; revision=17564
* Freeze property notification. Handle the gtk-color-scheme xsetting beingMatthias Clasen2007-03-221-2/+4
| | | | | | | | | | | | | | | | 2007-03-22 Matthias Clasen <mclasen@redhat.com> * gtk/gtksettings.c (merge_color_scheme): Freeze property notification. * gtk/gtksettings.c (_gtk_settings_handle_event): Handle the gtk-color-scheme xsetting being unset. * gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Handle recursion locally. svn path=/trunk/; revision=17553
* Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,Matthias Clasen2007-03-091-10/+5
| | | | | | | | | | | | | 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
* Don't leak references to the color-hash gotten from GtkSettings. (#409357,Matthias Clasen2007-02-281-6/+0
| | | | | | | | | | 2007-02-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c: Don't leak references to the color-hash gotten from GtkSettings. (#409357, Benjamin Berg) svn path=/trunk/; revision=17364
* New tooltips API.Kristian Rietveld2007-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-02-06 Kristian Rietveld <kris@imendio.com> New tooltips API. * gtk/Makefile.am * gtk/gtk.h * gtk/gtk.symbols: build system foo. * gtk/gtkmain.c (gtk_main_do_event): call tooltip event handler hook for appropriate events. * gtk/gtkmarshalers.list: add BOOLEAN:INT,INT,BOOLEAN,OBJECT. * gtk/gtkrc.c: add style for gtk-tooltip. * gtk/gtksettings.c (gtk_settings_class_init): make the different tooltip timeouts configurable. * gtk/gtkwidget.[ch]: add new properties, signals, make sure tooltips are hidden on unmap, destroy, update window event mask on realize, hook into focus change and show help handlers. * gtk/gtkwindow.h: move GtkWindow typdef to gtkwidget.h ... * gtk/gtktooltip.[ch]: new files. * tests/Makefile.am * tests/testtooltips.c: add test application. svn path=/trunk/; revision=17264
* Fix accelerator clippingMatthias Clasen2006-12-071-0/+7
|
* plug small memory leak (#370395)Paolo Borelli2006-11-131-5/+5
| | | | | | | 2006-11-13 Paolo Borelli <pborelli@katamail.com> * gtk/gtkrc.c (gtk_rc_parse_icon_source): plug small memory leak (#370395)
* added new scanner token "unbind" which gets rid of a key binding (in fact,Michael Natterer2006-10-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-10-05 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.[ch]: added new scanner token "unbind" which gets rid of a key binding (in fact, it only lets it appear unbound). * gtk/gtkbindings.[ch] (struct GtkBindingEntry): added "guint marks_unbound : 1" (gtk_binding_entry_skip): new API which marks the entry as unbound. Changed code so it returns FALSE when "marks_unbound == TRUE" is encountered while activating bindings, effectively letting the binding appear unbound (regardless of still existing bindings in lower binding priority levels). Fixes bug #358329. (gtk_binding_entry_add) (gtk_binding_entry_clear) (gtk_binding_entry_add_signall) (gtk_binding_parse_binding): deprected these functions. (_gtk_binding_parse_binding) (_gtk_binding_entry_add_signall): new internal API. * gtk/gtk.symbols: changed accordingly.
* serialize floating point values using locale-independent functions.Michael Natterer2006-09-041-8/+27
| | | | | | | | 2006-09-04 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (rc_parse_token_or_compound) (gtk_rc_parse_assignment): serialize floating point values using locale-independent functions. (#346751, Frederic Crozat)
* reset scanner config to default values while checking if anMichael Natterer2006-08-031-16/+47
| | | | | | | | | 2006-08-03 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (gtk_rc_parse_assignment): reset scanner config to default values while checking if an expression(foobar) follows, because if no expression follows the scanner's "next token" must be usable for the caller of this function (fixes bug #349552).
* New function to destroy an rc context.Matthias Clasen2006-07-211-17/+65
| | | | | | | | | | | | 2006-07-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.h: * gtk/gtkrc.c (_gtk_rc_context_destroy): New function to destroy an rc context. * gtk/gtksettings.c (gtk_settings_finalize): Destroy the rc context. (gtk_settings_get_for_screen): Unref the settings when the screen goes away. (#348096, Chris Wilson)
* Replace gtk_rc_style_ref/unref by g_object_ref/unref.Matthias Clasen2006-07-211-3/+1
| | | | | | | | | 2006-07-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkstyle.c: * gtk/gtkrc.c: * gtk/gtkwidget.c: Replace gtk_rc_style_ref/unref by g_object_ref/unref.
* Enable symbolic colors and color expressions in style properties. FixesMichael Natterer2006-07-211-40/+134
| | | | | | | | | | | | | | | | | | | 2006-07-21 Michael Natterer <mitch@imendio.com> Enable symbolic colors and color expressions in style properties. Fixes bug #346751. * gtk/gtkrc.c (rc_parse_token_or_compound): add GtkRcStyle parameter and replace symbolic colors by color constants. (gtk_rc_parse_assignment): likewise. Also support parsing of expressions of the form identifier(compound). (gtk_rc_parse_style): pass the GtkRcStyle to gtk_rc_parse_assignment(). (gtk_rc_parse_statement): pass NULL since we don't have a GtkRcStyle here.
* gtk/gtkrc.c fix canonicalization of property names which was broken afterMichael Natterer2006-07-071-2/+2
| | | | | | | | 2006-07-07 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c * gtk/gtksettings.c: fix canonicalization of property names which was broken after recent constant string cleanup.
* added a bunch of utility functions to copy icon_factories and color_hashesMichael Natterer2006-07-061-86/+130
| | | | | | | | | 2006-07-06 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c: added a bunch of utility functions to copy icon_factories and color_hashes between GtkRcStyles and make sure that newly created, duplicated and merged styles have access to all icon_factories and color_hashes they need. Fixes bug #346668.
* Improve consistency of signal and property namesMatthias Clasen2006-07-061-8/+12
|
* Make transparent tray icons work. (#320034, based on a patch by DanMatthias Clasen2006-06-191-0/+5
| | | | | | | | | | | | | 2006-06-19 Matthias Clasen <mclasen@redhat.com> Make transparent tray icons work. (#320034, based on a patch by Dan Winship) * gtk/gtktrayicon-x11.c (gtk_tray_icon_init): Make trayicons app-paintable and non-double buffered. * gtk/gtkrc.c (_gtk_rc_init): Give tray icons a parent-relative background in the default style.
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Boilerplate reductionMatthias Clasen2006-05-021-32/+2
|
* Fix problems with setting symbolic colors from rc files. (#338345,Matthias Clasen2006-04-301-6/+13
| | | | | | | | | | | | 2006-04-30 Matthias Clasen <mclasen@localhost.localdomain> Fix problems with setting symbolic colors from rc files. (#338345, Benjamin Berg) * gtk/gtkrc.c (gtk_rc_settings_changed, gtk_rc_font_name_changed) (gtk_rc_color_hash_changed, gtk_rc_reparse_all_for_settings): Don't freeze notification for settings changes while parsing; instead manually avoid recursion, and update the color hashes.
* Allocate pixmap_path dynamically, rather than using a fixed array of sizeMatthias Clasen2006-04-181-48/+12
| | | | | | | 2006-04-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c: Allocate pixmap_path dynamically, rather than using a fixed array of size 128.
* Allocate the gtk_rc_default_files array dynamically.Matthias Clasen2006-04-031-7/+18
| | | | | | | | 2006-04-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c (gtk_rc_add_initial_default_files) (gtk_rc_add_default_file): Allocate the gtk_rc_default_files array dynamically.
* Avoid relocations for the array of symbol names.Matthias Clasen2006-04-031-41/+78
| | | | | | 2006-04-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c: Avoid relocations for the array of symbol names.
* Support subclasses in RC files. (#142417, Todd Berman, patch based on aMatthias Clasen2006-03-231-38/+370
| | | | | | | | | | | | | | | | | 2006-03-23 Matthias Clasen <mclasen@redhat.com> Support subclasses in RC files. (#142417, Todd Berman, patch based on a patch by Benjamin Berg) * gtk/gtkrc.h: * gtk/gtkrc.c: Support <classname> elements in widget_class paths in rc files which match any classes derived from named class. (_gtk_rc_init): Use the new syntax in the default rc string. * gtk/gtkbindings.c: Support the new syntax for bindings too. * tests/testrc.c: Tests for widget_class path matching
* Rework the way the color scheme setting is inherited. Now the overridingMatthias Clasen2005-12-161-33/+14
| | | | | | | | | | | | | | | 2005-12-16 Matthias Clasen <mclasen@redhat.com> * gtk/gtksettings.[hc]: Rework the way the color scheme setting is inherited. Now the overriding is done on a per-color basis, rather than for the setting as a whole. This has the effect that themes can declare defaults for all the symbolic colors they use by specifying a value for the gtk-color-scheme setting in their rc file, while still allowing the XSetting to override "standard" symbolic colors. The hash table is now available through the color-hash property. * gtk/gtkrc.c: Use the new color-hash property.
* Make the gtk-color-scheme setting work.Matthias Clasen2005-12-121-4/+2
| | | | | | | | | | | | | | 2005-12-12 Matthias Clasen <mclasen@redhat.com> Make the gtk-color-scheme setting work. * gtk/gtksettings.h: * gtk/gtksettings.c (_gtk_settings_get_color_hash): Add a getter that takes care of initializing the color hash if it is not already there. * gtk/gtkrc.c (gtk_rc_color_scheme_changed, gtk_rc_context_get): And use it here.
* don't leak all toplevel windows on other screens (correctly remove allMichael Natterer2005-11-231-1/+2
| | | | | | | | 2005-11-23 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (gtk_rc_reset_widgets): don't leak all toplevel windows on other screens (correctly remove all temporary references).
* Added symbolic themable colors. Patch is a merged version of proposalsMichael Natterer2005-11-231-60/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-11-23 Michael Natterer <mitch@imendio.com> Added symbolic themable colors. Patch is a merged version of proposals from Matthias and maemo-gtk. Fixes bug #114355. * configure.in: require glib >= 2.9.1 for refcountable hashtables. * gtk/gtksettings.c: added property "color-scheme" which is a string defining colors like "foreground:black\nbackground:grey". Automatically provide a name->GdkColor hash table mapping for the color scheme. * gtk/gtkrc.[ch]: added list of color hashes that works like the list of icon factories. Append the color scheme hash from GtkSettings if it exists. Extended gtkrc syntax to allow defining and referencing of logical colors. Also allow to modulate colors in gtkrc by using arbitrary expressions of mix(), shade(), lighter() and darker(). Added internal function _gtk_rc_style_get_color_hashes(). * gtk/gtkstyle.[ch]: keep a private list of color hashes around. Get the list from _gtk_rc_style_get_color_hashes(). Export internal function _gtk_style_shade() (used by above color expressions). Added public API gtk_style_lookup_color() which looks up a logical color by name. * gtk/gtk.symbols: add gtk_style_lookup_color * tests/testgtkrc: use symbolic colors for making the scrollbars red.
* applied patch from maemo-gtk that changes the mtime check for rc filesMichael Natterer2005-11-041-1/+1
| | | | | | | | | 2005-11-04 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): applied patch from maemo-gtk that changes the mtime check for rc files from '>' to '!=', otherwise theme changes go unnoticed when turning back the clock (Tommi Komulainen).
* Readd the memory leak fix, since the assertion failures were traced to anMatthias Clasen2005-10-051-0/+3
| | | | | | | | 2005-10-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c (gtk_rc_clear_realized_style): Readd the memory leak fix, since the assertion failures were traced to an xchat bug. (#314696)
* Revert the change from yesterday, since it leads to assertion failures.Matthias Clasen2005-10-041-3/+0
| | | | | | | | 2005-10-04 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c (gtk_rc_clear_realized_style): Revert the change from yesterday, since it leads to assertion failures. (#317879, Sebastian Bacher)
* Unref the style when removing it from the hash table. (#314696, BenjaminMatthias Clasen2005-10-031-0/+3
| | | | | | | 2005-10-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c (gtk_rc_clear_realized_style): Unref the style when removing it from the hash table. (#314696, Benjamin Berg)
* Intern some more strings.Matthias Clasen2005-09-011-1/+1
| | | | | | | | | 2005-09-01 Matthias Clasen <mclasen@redhat.com> * gdk/*.c: Intern some more strings. * gtk/gtkintl.h: * gtk/*.c: Define an I_() macro and use it instead of the bulky g_intern_static_string().
* Intern type names in code generated by glib-mkenums, too.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * gdk/Makefile.am: * gtk/Makefile.am: Intern type names in code generated by glib-mkenums, too. * gtk/*.c: * gdk/x11/*.c: * gdk/*.c: Intern type names before registering the type to avoid unnecessary copies.
* Make it compileMatthias Clasen2005-04-061-1/+1
|
* Don't modify scanner->value, copy it first. (#165693, Tommi Komulainen)Matthias Clasen2005-04-061-2/+5
| | | | | | | 2005-04-06 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value, copy it first. (#165693, Tommi Komulainen)
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-1/+5
| | | | | | | | | | | | | | | | | | 2005-03-20 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gtk/grk.symbols: Group symbols by header and source file. * gtk/makegtkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegtkalias.pl -def * gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate this file. * gtk/*.c: Include gtkalias.h after the other headers, include gtkaliasdef.c at the bottom. * gtk/*.h: Small cleanups.
* Don't leak the values here. (#169047, Philip Langdale)Matthias Clasen2005-03-031-1/+1
| | | | | | | | 2005-03-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtksettings.c (gtk_settings_get_property): * gtk/gtkrc.c (gtk_rc_parse_assignment): Don't leak the values here. (#169047, Philip Langdale)
* Fix many instances of "the the" in docs and comments. (#165815, MasaoMatthias Clasen2005-02-011-1/+1
| | | | | | | 2005-02-01 Matthias Clasen <mclasen@redhat.com> * */*.c: Fix many instances of "the the" in docs and comments. (#165815, Masao Mutoh)