Commit Graph

188 Commits

Author SHA1 Message Date
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
Matthias Clasen
94eb8c9b15 Reinstate gtk_toolbar_content_new_compatibility() that was mistakenly
2007-01-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktoolbar.c: Reinstate gtk_toolbar_content_new_compatibility()
        that was mistakenly "cleaned up" a while ago. Also
        revert a problematic change to the screen_changed
        handler.  (#401598, Søren Sandmann)



svn path=/trunk/; revision=17232
2007-01-29 03:24:09 +00:00
Matthias Clasen
d465fbeda7 Rearrange things so that setting multiple properties causes not more than
2007-01-27  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktoolbar.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktoolbutton.c: Rearrange things so that setting
        multiple properties causes not more than a single
        reconstruction of the contents.

        * gtk/gtkaction.c (connect_proxy): Set all tool button
        properties in one go.



svn path=/trunk/; revision=17227
2007-01-28 03:16:30 +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
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
Søren Sandmann
5d4beaecb5 Move getting the property out of the loop, and rename the variable
Tue May 16 12:36:25 2006  Søren Sandmann  <sandmann@redhat.com>

        * gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Move getting the
        property out of the loop, and rename the variable 'max_expand'.

        * gtk/gtktoolbar.c (gtk_toolbar_class_init): Fix the decription
        for the max-child-expand property.
2006-05-16 16:51:27 +00:00
Michael Natterer
61fe062e42 added "max-child-expand" style property which limits the space taken by
2006-05-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktoolbar.c: added "max-child-expand" style property which
	limits the space taken by expanding tool items. Fixes bug #340722.
2006-05-16 13:51:30 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
729715465a Elide (_x) in the middle of the string, too. (#323956, Abel Cheung)
2006-05-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Elide (_x) in the middle
	of the string, too.  (#323956, Abel Cheung)
2006-05-08 18:10:23 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Michael Natterer
43cb6010cc Applied modified patch from maemo-gtk which makes separators more
2006-03-03  Michael Natterer  <mitch@imendio.com>

	Applied modified patch from maemo-gtk which makes separators more
	themeable. Fixes bug #332022.

	* gtk/gtkwidget.c: added style properties "wide-separators",
	"separator-width" and "separator-height".

	* gtk/gtkhseparator.c
	* gtk/gtkvseparator.c
	* gtk/gtkmenuitem.c
	* gtk/gtktoolbar.c: honor the new settings and paint separators
	using gtk_paint_box() if wide-separators is true.
2006-03-03 12:38:42 +00:00
Matthias Clasen
1460b38700 Also strip (_F) without a space 2005-12-26 07:54:32 +00:00
Matthias Clasen
b29a1d0f7e Mention the stripping of (_F) suffixes.
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* README.in: Mention the stripping of (_F) suffixes.

	* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Strip a suffix of
	the form " (_<single character>)", since this is the preferred way
	for some languages to indicate accelerators.  (#323956, Yang Hong)
2005-12-26 07:52:43 +00:00
Michael Natterer
dd7c0d77b1 Merged modified patch from maemo-gtk that allows to disable toolbar
2005-12-01  Michael Natterer  <mitch@imendio.com>

	Merged modified patch from maemo-gtk that allows to disable
	toolbar animations. Addresses bug #142582.

	* gtk/gtksettings.c: added boolean property "gtk-enable-animations".
	(patch from Christian Neumair)

	* gtk/gtktoolbar.c: don't animate toolbar changes if the settings
	property is FALSE. Replaced the individual "notify::foo"
	connections to GtkSettings by a single "notify" callback and
	dispatch internally.
2005-12-01 20:49:17 +00:00
Michael Natterer
ff7a092232 changed two private guint that used to hold signal handler IDs to two
2005-11-24  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktoolbar.h (struct _GtkToolbar): changed two private guint
	that used to hold signal handler IDs to two guint of padding.

	* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): added them as
	gulong here.

	(gtk_toolbar_screen_changed): changed accordingly.
2005-11-24 16:51:22 +00:00
Tim Janik
fbb2e3f4f5 deprecated floating/sink API and implemented it in terms of the GObject
Wed Nov 23 18:55:47 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkobject.[hc]: deprecated floating/sink API and implemented it
        in terms of the GObject floating/sink API.

        * gtk/gtkaboutdialog.c:
        * gtk/gtkaction.c:
        * gtk/gtkcellview.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcombobox.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkiconview.c:
        * gtk/gtkinvisible.c:
        * gtk/gtkitemfactory.c:
        * gtk/gtklayout.c:
        * gtk/gtkmenu.c:
        * gtk/gtkmenutoolbutton.c:
        * gtk/gtknotebook.c:
        * gtk/gtkprogress.c:
        * gtk/gtkrange.c:
        * gtk/gtkspinbutton.c:
        * gtk/gtkstatusicon.c:
        * gtk/gtktext.c:
        * gtk/gtktextview.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktreeitem.c:
        * gtk/gtktreeview.c:
        * gtk/gtktreeviewcolumn.c:
        * gtk/gtkuimanager.c:
        * gtk/gtkviewport.c:
        * gtk/gtkwidget.c:
        * gtk/gtkwindow.c:
        ported to use GObject's g_object_ref_sink().

        * gtk/gtkcolorsel.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkaboutdialog.c:
        fixed compiler warnings.
2005-11-23 18:06:58 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
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().
2005-09-01 05:11:46 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
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.
2005-08-31 16:53:43 +00:00
Matthias Clasen
0483aa6340 Undeprecate gtk_toolbar_set_icon_size(), and add icon-size and
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbar.c: Undeprecate gtk_toolbar_set_icon_size(),
	and add icon-size and icon-size-set properties.  (#314172)
2005-08-31 05:19:56 +00:00
Matthias Clasen
fe4954aee8 Handle NULL gracefully. (#314523, Ed Catmur)
2005-08-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle
	NULL gracefully.  (#314523, Ed Catmur)
2005-08-26 03:09:36 +00:00
Matthias Clasen
24a55633ce Add some more tests for menu placement.
2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* tests/testtoolbar.c: Add some more tests for menu placement.

	* gtk/gtkmenutoolbutton.c (menu_position_func):
	* gtk/gtktoolbar.c (menu_position_func): Improve positioning
	of toolbutton menus and of the overflow menu.  (#312937,
	#153870, Christian Persch, Paolo Borelli)
2005-08-15 16:36:31 +00:00
Matthias Clasen
80bf176f06 2005-06-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_expand):
	* gtk/gtktoolbar.c (gtk_toolbar_get_show_arrow):
	* gtk/gtktextview.c (gtk_text_view_get_iter_at_position):
	* gtk/gtkstock.c (gtk_stock_set_translate_func):
	* gtk/gtkspinbutton.c (gtk_spin_button_get_adjustment):
	* gtk/gtkscrolledwindow.h:
	* gtk/gtkmenushell.c (gtk_menu_shell_get_take_focus):
2005-06-10 04:45:40 +00:00
Matthias Clasen
8610171ecf Forgotten file 2005-05-16 20:04:44 +00:00
Matthias Clasen
d4b808080f Add a tooltips property.
2005-04-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbar.c: Add a tooltips property.
2005-04-04 14:20:55 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
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.
2005-03-20 07:01:23 +00:00
Matthias Clasen
52711c24e8 More canonical property names. 2005-03-09 06:15:13 +00:00
Matthias Clasen
5c47de587a Add a deprecation note.
2004-11-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbar.c (gtk_toolbar_set_icon_size): Add a deprecation
	note.
2004-11-23 04:11:15 +00:00
Søren Sandmann
5920789685 Call gtk_tool_item_rebuild_menu().
Tue Sep 14 23:20:56 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtkaction.c (connect_proxy): Call
	gtk_tool_item_rebuild_menu().

	* gtk/gtktoolitem.c (gtk_tool_item_class_init): Update
	documentation for GtkToolItem::create_menu_proxy.

	* gtk/gtktoolitem.c (gtk_tool_item_rebuild_menu): New
	API to make the toolbar update itself when the proxy menu item
	for a tool item changes.

	* gtk/gtktoolbutton.c (gtk_tool_button_construct_contents): Call
	gtk_tool_item_rebuild_menu here()

	* gtk/gtktoolbutton.c (gtk_tool_button_construct_contents):
	Remove redundant check for need_label.
2004-09-14 21:40:41 +00:00
Soeren Sandmann
e0b2ead302 Make dropping of expandable items look nicer.
Wed Sep  8 18:38:08 2004  Soeren Sandmann  <sandmann@redhat.com>

	Make dropping of expandable items look nicer.

	* gtk/gtktoolbar.c (gtk_toolbar_set_drop_highlight_item): Make
	placeholder expand if highlight item is expanding.

	* gtk/gtktoolbar.c (toolbar_content_set_expand): New function.

	* gtk/gtktoolbar.c (toolbar_content_get_expand): Return TRUE only
	if the item is not disappering.
2004-09-08 16:40:31 +00:00
Søren Sandmann
5445cbc7b0 Accelerate the animation when it has been running for a while. (#143647).
Sat Sep  4 02:38:57 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtktoolbar.c (position): Accelerate the animation when it
	has been running for a while. (#143647).
2004-09-04 00:44:04 +00:00
Søren Sandmann
0ac4f2837a Make sure children of the toolbar are given positive dimensions. (149540,
Wed Sep  1 19:11:44 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Make sure
	children of the toolbar are given positive dimensions. (149540,
	Felipe Heidrich).
2004-09-01 17:55:09 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Soeren Sandmann
92295447cb Warn if you try to add a tool item to a toolbar using the deprecated API.
Sat Jul 24 21:38:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
	add a tool item to a toolbar using the deprecated API.
2004-07-24 19:42:44 +00:00
Matthias Clasen
57f9f11bd7 Forgotten file. 2004-07-22 14:55:53 +00:00
Matthias Clasen
4466345809 Remove trailing commas from enumerations. (#148035)
Tue Jul 20 22:26:29 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkfilechooserutils.h:
	* gtk/gtktoolbutton.c:
	* gtk/gtktoolbar.c:
	* gtk/gtkicontheme.c:
	* gtk/gtkcalendar.c:
	* demos/gtk-demo/ui_manager.c:
	* demos/gtk-demo/appwindow.c: Remove trailing commas
	from enumerations.  (#148035)
2004-07-21 02:30:19 +00:00
Soeren Sandmann
e47c0d46b1 Add a checkbox to queue an merge/unmerge. Patch from Matthias Clasen.
Sat Jun  5 20:05:39 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/testmerge.c: Add a checkbox to queue an
	merge/unmerge. Patch from Matthias Clasen.

	* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): Add a new flag
	"need_rebuild"
	(rebuild_menu): New function that rebuilds the overflow menu and
	makes sure it doesn't start or end with a separator.
	(toolbar_content_new_tool_item)
	(toolbar_content_remove)
	(toolbar_content_new_compatibility): Set the rebuild_needed flag
	(gtk_toolbar_size_allocate): Only show the overflow arrow when we
	have actually overflown an item with a proxy menu item. Also make
	sure we rebuild the menu if needed.

	Fix #125504, #142377, #143463

	* gtk/gtkseparatortoolitem.c (gtk_separator_tool_item_expose):
	Obey the "priv->draw" flag. (#143692)
2004-06-05 18:24:53 +00:00
Matthias Clasen
d5f3cb1409 Rename function parameters from index to index_ to prevent clash with BSD
Tue Jun  1 23:14:46 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktoolbar.h:
	* gtk/gtktoolbar.c:
	* gtk/gtkentrycompletion.h:
	* gtk/gtkentrycompletion.c:
	* gtk/gtkcombobox.h:
	* gtk/gtkcombobox.c: Rename function parameters from
	index to index_ to prevent clash with BSD index().  (#143001)
2004-06-02 03:16:03 +00:00
Morten Welinder
cfe7b384bc Don't leak list of children. (#140523)
2004-04-19  Morten Welinder  <terra@gnome.org>

	* gtk/gtktoolbar.c (gtk_toolbar_focus): Don't leak list of
	children.  (#140523)
2004-04-19 19:52:45 +00:00
Owen Taylor
dcb6900c61 Swap GTK_ARROW_LEFT and GTK_ARROW_RIGHT for GTK_TEXT_DIR_LTR. (#129159,
Fri Mar 12 17:20:15 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
        and GTK_ARROW_RIGHT for GTK_TEXT_DIR_LTR. (#129159,
        Semion Chichelnitsky)

        * gtk/gtkpathbar.c gtk/gtktoolbar.c: Remove no-longer-needed
        gtk_toolbar_direction-changed handlers and explicit
        flipping of GtkArrow widgets.
2004-03-12 22:51:13 +00:00
Soeren Sandmann
db6cc5f788 Add boolean destroying (gtk_menu_destroy): Set priv->destroying
Tue Mar  9 02:11:50 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c Fix bug 136446.
	(struct _GtkMenuPrivate): Add boolean destroying
	(gtk_menu_destroy): Set priv->destroying
	(gtk_menu_remove): don't update the table information when the
	menu is being destroyed.

	* gtk/gtkmenu.c (gtk_menu_set_monitor): Formatting fix

	* gtk/gtktoolbar.[ch]: Some formatting fixes
2004-03-09 01:21:45 +00:00
Gustavo J. A. M. Carneiro
64cac40d2c fix #136202 (gtk_toolbar_insert_stock crashes if stock lookup fails) 2004-03-06 12:46:25 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Soeren Sandmann
dc0718bd7e New function. Use resize cursors for resize grips. (Bug #129621)
Thu Feb 26 23:26:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstatusbar.c (set_grip_cursor): New function. Use resize
	cursors for resize grips. (Bug #129621)

	* gtk/gtktoolbar.c (gtk_toolbar_get_relief_style): Documentation
	fix - patch by Torsten Schoenfeld.

	* gtk/gtkmenubar.c (gtk_menu_bar_size_request): don't request
	space between the items. (Bug #110775)

	* gtk/gtkrc.c (_gtk_rc_init): Provide extra horizontal padding
	inside menu items that are inside a menu bar. (Bug #110775)

	* configure.in (HAVE_XCURSOR): Make XCurosr part of GDK_EXTRA_,
	not GDK_PACKAGES, to prevent applications from getting linked to
	it (Bug #119804)

	* gtk/gtkmenubar.c (gtk_menu_bar_size_allocate): Put the vertical
	ipadding inside the item. (Bug #61843)
2004-02-26 22:29:24 +00:00
Soeren Sandmann
97ff0f48a4 Call gtk_tool_item_set_expand(), not gtk_tool_item_set_homogeneous() in
Mon Feb 16 18:26:39 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoolbar.c (gtk_toolbar_set_child_property): Call
	gtk_tool_item_set_expand(), not gtk_tool_item_set_homogeneous()
	in the CHILD_PROP_EXPAND branch. (#134545, Damon Chaplin)
2004-02-16 19:16:03 +00:00
Soeren Sandmann
8c80eedd0f Fix up item_area correctly in RTL mode. (#133984, patch from Semion
Thu Feb 12 15:46:26 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Fix up item_area
	correctly in RTL mode. (#133984, patch from Semion Chichelnitsky).
2004-02-12 14:49:37 +00:00
Morten Welinder
95ba48b38f Cleanup using gtk_menu_attach_to_widget. Also fixes leak, see #133411.
2004-02-06  Morten Welinder  <terra@gnome.org>

	* gtk/gtktoolbar.c (show_menu): Cleanup using
	gtk_menu_attach_to_widget.  Also fixes leak, see #133411.
2004-02-06 21:18:50 +00:00
Morten Welinder
0b14aeea37 Show on the right screen. (Fixes bug 133411, apart from the leak.)
2004-02-04  Morten Welinder  <terra@gnome.org>

	* gtk/gtktoolbar.c (show_menu): Show on the right screen.  (Fixes
	bug 133411, apart from the leak.)
2004-02-04 21:17:54 +00:00