Commit Graph

24 Commits

Author SHA1 Message Date
Michael Natterer
f48ad7c0cc use gtk_widget_get_child_requisition() instead of accessing
2004-06-03  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkimagemenuitem.c: use gtk_widget_get_child_requisition()
	instead of accessing item->image->allocation.width/height
	directly. Makes widgets which only have a requisition set using
	gtk_widget_set_size_request() work and fixes bug #142789.
2004-06-03 19:22:28 +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
Matthias Clasen
add52ebbbf Fixes for #82099:
Thu Feb 19 23:41:06 2004  Matthias Clasen  <maclas@gmx.de>

	Fixes for #82099:

	* gdk/x11/gdkevents-x11.c: Introduce new XSettings "Gtk/ButtonImages"
	and "Gtk/MenuImages" and map them to "gtk-button-images" and
	"gtk-menu-images".

	* gtk/gtkimagemenuitem.c: Add a boolean setting "gtk-menu-images" and use
	it to set the visibility of the embedded image.

	* gtk/gtkbutton.c: Add a boolean setting "gtk-button-images" and use
	it to set the visibility of an embedded image.
2004-02-19 22:39:58 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Soeren Sandmann
c9714692aa don't request toggle_space when the image width is 0.
Sat Jul 26 15:21:27 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkimagemenuitem.c
	(gtk_image_menu_item_toggle_size_request): don't request
	toggle_space when the image width is 0.
2003-07-26 13:22:42 +00:00
Soeren Sandmann
c8515b2f8d add vertical_padding style property.
Sat Jul  5 10:34:00 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

        * gtk/gtkmenu.c: add vertical_padding style property.

        * gtk/gtkmenuitem.c: add style properties toggle_spacing,
        arrow_spacing and horizontal_padding. Also center separators and
        make them a bit taller.

        * gtk/*menuitem.c: use new style properties.

        * docs/widget_geometry.txt: Add note about GtkMenuItem

        * gtk/gtkstyle.c
        (gtk_default_draw_vline, gtk_default_draw_hline):
        fix +/-1 errors.

        (gtk_default_draw_shadow): draw a black border around menus.

        * gtk/gtkvseparator, gtk/gtkhseparator.c, gtk/gtkmenuitem.c: fix
        calls to gtk_paint_hline() and gtk_paint_vline() (they take x1,
        x2 and y1, y2 respectively, not x, width and y, height).
2003-07-06 13:14:28 +00:00
Matthias Clasen
00943af834 Automatic RTL flipping for some more widgets. 2002-11-02 00:18:14 +00:00
Matthias Clasen
a9b71314ee Lots of trivial doc fixes. 2002-10-11 20:36:21 +00:00
Manish Singh
8409ada92f Deprecation cleanup
Fri Oct  4 18:40:50 2002  Manish Singh  <yosh@gimp.org>

        * gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
        gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
        gtkradiomenuitem.[ch]: Deprecation cleanup
2002-10-05 01:51:16 +00:00
Owen Taylor
f5b8bde792 Add a note to the docs about how to use this in the context of changeable
Sat Mar  2 20:39:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
        Add a note to the docs about how to use this in the
        context of changeable accelerators. (#72382, Mark Patton)
2002-03-03 01:43:01 +00:00
Matthias Clasen
4dddfb2dc6 Remove excess calls to g_return_if_fail from static and virtual functions. 2002-01-30 22:29:03 +00:00
Owen Taylor
a75a0d494b Consistently use GdkModifierType. (#66950, Mark Patton)
Tue Jan 29 21:50:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
        Consistently use GdkModifierType. (#66950, Mark Patton)

        * gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
        For consistency with gtk_button_new_from_stock(), fall back
        to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
        Havoc Pennington)

        * gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
        Make G_CONST_RETURN. (#68527, Matt Wilson)
2002-01-30 03:07:14 +00:00
Owen Taylor
1431d7658e Make Menu items NO_WINDOW widgets.
Fri Nov 16 00:16:40 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/{gtkmenuitem.[ch],gtkcheckmenuitem.c,gtkimagemenuitem.c,
	gtkradiomenuitem.c,gtktearoffmenuitem.c}: Make Menu items
	NO_WINDOW widgets.

	* gtk/gtk{h,v,}paned.[ch]: Make NO_WINDOW widgets, some
	cleanup.

	* gtk/gtkstyle.c (gtk_default_draw_handle): Don't assume
	we are drawing in a window when drawing the paned handle.
2001-11-16 15:20:28 +00:00
Matthias Clasen
c27900c3f6 Documentation updates.
* gtk/gtkcellrenderertoggle.c, gtk/gtkimcontextsimple.c,
        gtk/gtkimmulticontext.c, gtk/gtkimagemenuitem.c,
        gtk/gtkiconfactory.c, gtk/gtkwindow.c: Documentation updates.

        * docs/reference/gtk/tmpl/gtkmenuitem.sgml,
        docs/reference/gtk/tmpl/gtkmenu.sgml,
        docs/reference/gtk/tmpl/gtkmenushell.sgml,
        docs/reference/gtk/tmpl/gtkcontainer.sgml,
        docs/reference/gtk/gtk-sections.txt: Updates.
2001-10-28 21:15:36 +00:00
Owen Taylor
aa49527fa7 Enforce the widget/child realization/mapping invariants.
Sat Jul  7 02:50:14 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_set_parent): Enforce
	the widget/child realization/mapping invariants.

	* gtk/gtkwidget.[ch] gtk/gtkprivate.h: Add functions
	gtk_widget_[get/set]_child_visible() to control
	whether visible children of a mapped window are
	mapped.

	* docs/widget_system.txt: Updated for changes in
	container contract, and addition of GTK_CHILD_VISIBLE.

	* gtk/gtkcontainer.c: Add generic map()/unmap()
	functions that work for almost all containers.

	* gtk/gtknotebook.c gtk/gtkpacker.c: Use
	gtk_widget_set_child_visible() where necessary.

	* gtk/*.c: Remove excess map(), unmap(), and
	realization/mapping invariant enforcing code
	from many containers.
2001-07-19 14:57:15 +00:00
Owen Taylor
4e2b60ac4d Patch from Matthias Clasen to remove remove all instances of
Wed Jul 18 19:28:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/*.c: Patch from Matthias Clasen to remove remove
	all instances of g_return_if_fail (foo != NULL); that are
	immediately before a g_return_if_fail (GTK_IS_FOO (foo));
	since the second check catches the NULL anyways.
2001-07-18 23:39:26 +00:00
Alex Larsson
56984ab277 Don't crash when the properties window is destroyed.
2001-06-05  Alex Larsson  <alexl@redhat.com>

	* tests/testgtk.c (destroy_properties):
	Don't crash when the properties window is destroyed.

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
	Use with_mnemonics to handle the case of stock items with
	underscores in them.
2001-06-05 21:48:24 +00:00
Havoc Pennington
8fd5c30b2f Use new mnemonic convenience functions
2001-06-05  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkcolorsel.c: Use new mnemonic convenience functions

	Applying patch from Jeff Franks, with function docs added.

	* gtk/gtkcheckbutton.c (gtk_check_button_new_with_mnemonic):
	remove call to set_mnemonic_widget, change docs a bit.

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_with_mnemonic):
	new function

	* gtk/gtkcheckmenuitem.c (gtk_check_menu_item_new_with_mnemonic):
	new function

	* gtk/gtkmenuitem.c (gtk_menu_item_new_with_mnemonic): new function

	* gtk/gtkradiobutton.c (gtk_radio_button_new_with_mnemonic): new
	function
	(gtk_radio_button_new_with_mnemonic_from_widget): new function

	* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_with_mnemonic):
	new function

	* gtk/gtktogglebutton.c (gtk_toggle_button_new_with_mnemonic): new
	function

	* gtk/gtklabel.c (gtk_label_new_with_mnemonic): Improve docs on
	auto-selection of mnemonic widget.
2001-06-05 18:22:30 +00:00
Martin Baulig
60530b8a8e Renamed gtk_image_menu_item_add_icon() to gtk_image_menu_item_set_icon()
2001-04-28  Martin Baulig  <baulig@suse.de>

	* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
	to gtk_image_menu_item_set_icon() and made it work if there's already
	an image.
	(gtk_image_menu_item_new): This function doesn't take any arguments anymore.
	(gtk_image_menu_item_new_with_label): New function.
2001-05-18 17:35:20 +00:00
Alexander Larsson
a24e9b1074 Add gtk_image_menu_item_new_from_stock()
2001-03-21  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkimagemenuitem.[c]:
	Add gtk_image_menu_item_new_from_stock()
2001-03-21 08:56:25 +00:00
Alexander Larsson
e7d4a7f90d Document expose event->region change and that gtk_widget_event doesn't
2001-03-09  Alexander Larsson  <alexl@redhat.com>

	* docs/Changes-2.0.txt:
	Document expose event->region change and that gtk_widget_event
	doesn't allow passing expose events.

	* gdk/gdkevents.h:
	Add region to expose event.

	* gdk/gdkevents.c:
	Handle event->region in gdk_event_copy() and gdk_event_free().

	* gdk/gdkwindow.c (gdk_window_process_updates_internal):
	Generate expose_event->region when creating expose events.

	* gdk/x11/gdkevents-x11.c:
	Generate expose events with regions when translating X events.

	* gtk/gtkcontainer.[ch]:
	Default expose handler that propagates expose events to NO_WINDOW
	children. New function gtk_container_propagate_expose()

	* gtk/gtkwidget.[ch]:
	Moved gtk_widget_event implementation to gtk_widget_event_internal.
	gtk_widget_event calls gtk_widget_event_internal but doesn't allow
	expose events. New function gtk_widget_send_expose() to send expose
	events. New function gtk_widget_region_intersect() to calculate
	window/region intersections.

	* gtk/gtkmain.c (gtk_main_do_event):
	Use gdk_window_begin_paint_region() instead of gdk_window_begin_paint_rect().
	Use gtk_widget_send_expose() to send expose events.

	* gtk/gtkbin.c:
	* gtk/gtkbox.c:
	* gtk/gtkfixed.c:
	* gtk/gtkimagemenuitem.c:
	* gtk/gtklist.c:
	* gtk/gtkpacker.c:
	* gtk/gtktable.c:
	* gtk/gtktree.c:
	Remove expose handler, using the default container implementation
	instead.

	* gtk/gtkbutton.c:
	* gtk/gtkcheckbutton.c:
	* gtk/gtkeventbox.c:
	* gtk/gtkfixed.c:
	* gtk/gtkhandlebox.c:
	* gtk/gtklayout.c:
	* gtk/gtklistitem.c:
	* gtk/gtkmenu.c:
	* gtk/gtkmenubar.c:
	* gtk/gtkmenuitem.c:
	* gtk/gtknotebook.c:
	* gtk/gtkoptionmenu.c:
	* gtk/gtkpaned.c:
	* gtk/gtkscrolledwindow.c:
	* gtk/gtktogglebutton.c:
	* gtk/gtktoolbar.c:
	* gtk/gtktreeitem.c:
	* gtk/gtkviewport.c:
	Chain expose handler to parent class handler. Use
	gtk_container_propagate_expose() to propagate exposes.

	* gtk/gtkclist.c (check_exposures):
	* gtk/gtktext.c (process_exposes):
	Use gtk_widget_send_expose instead of gtk_widget_event.
2001-03-09 13:28:26 +00:00
Tim Janik
35af5c4eba marshaller fixes.
Wed Mar  7 13:24:57 2001  Tim Janik  <timj@gtk.org>

        * gtk/*.c: marshaller fixes.

        * gtk/gtkmarshal.list: extreme cleanup.

        * gtk/gtktreeview.c (gtk_tree_view_class_init): disable interface
        param spec for now.

        * gtk/gtktexttag.c (gtk_text_tag_set_property): use g_value_get_boxed()
        where appliable.

        * gtk/gtktypeutils.[hc]: updates to GLib API changes.
        special cased autogenerated boxed types from gtktypebuiltins_ids.c
        which are not reference counted:
        GtkSelectionData, GdkEvent, GdkColor, GtkTextIter, PangoTabArray,
        PangoFontDescription, GtkTreeIter and GtkTreePath.

Thu Mar  1 03:58:56 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeselection.h:
        * gtk/gtktreemodel.c:
        * gtk/gtktreedatalist.[hc]: fixed includes. no gobject/*
        file should be included directly, and gobject/gmarshal.h
        as well as gtk/gtkmarshal.h even can't be included directly.

        * Makefile.am: grr, install gtk-config-2.0.

        * gtk/testgtk.c:
        * gtk/simple.c:
        * gtk/gtkmenu.c:
        * gtk/gtkitemfactory.c: use g_object_connect() instead of
        passing "*signal*::*" args to gtk_widget_set().

        * gtk/gtktypeutils.[hc]: got rid of GTK_TYPE_SIGNAL.

        * gtk/*.c: removed trailer arg from property setters and getters.
        macro fixups.

Thu Mar  1 04:01:57 2001  Tim Janik  <timj@gtk.org>

        * test-gdk-pixbuf.c: fixed includes.
2001-03-07 14:49:21 +00:00
Havoc Pennington
f1177b43fa add "static" to a private function (gtk_image_menu_item_class_init):
2001-02-14  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_remove): add
	"static" to a private function
	(gtk_image_menu_item_class_init): remove destroy handler,
	add "image" object property
2001-02-15 03:40:48 +00:00
Havoc Pennington
2097d764a7 fix bug where it always set the foreground, even if we were only using a
2001-02-12  Havoc Pennington  <hp@pobox.com>

	* gdk/gdkpango.c (gdk_pango_get_gc): fix bug where
	it always set the foreground, even if we were only using
	a stipple.
	(gdk_draw_layout_line_with_colors): new function, allow
	override colors
	(gdk_draw_layout_with_colors): new function, allow override
	colors
	(gdk_pango_layout_line_get_clip_region): function to get the clip
	region for a logical text range
	(gdk_pango_layout_get_clip_region): get the clip region for a
	logical text range

	* gdk/x11/gdkcolor-x11.c: forward declare gdk_colormap_sync(),
	(gdk_colormap_new): fix call to gdk_colormap_sync() so it has
	the right number of arguments.

	* gtk/gtktextbtree.c (gtk_text_btree_node_check_consistency):
	enhance the function to check that node data corresponds to a
	view still belonging to the tree.

	* gtk/gtktreeview.c (gtk_tree_view_changed): we were leaking the
	GtkTreePath
	(gtk_tree_view_inserted): ditto
	(gtk_tree_view_child_toggled): ditto

	* gtk/gtktreemodel.c (gtk_tree_path_append_index): use realloc to
	simplify this code.

	* gtk/gtkcellrenderertext.c (get_layout): fix leak of
	a PangoAttrList

	* demos/gtk-demo/main.c (load_file): Fix leak of a GString

	* gtk/gtkentry.c (gtk_entry_realize): Fix leak of a GdkCursor

	* gtk/gtkmenubar.c (gtk_menu_bar_size_request): consider toggle
	size in the size request
	(gtk_menu_bar_size_allocate): consider toggle size here

	* gtk/gtkimagemenuitem.h, gtkimagemenuitem.c: Menu item
	that displays a widget in the toggle slot

	* gtk/testgtk.c: test GtkImageMenuItem

	* gtk/Makefile.am, gtk/gtk.h: Add GtkImageMenuItem

	* gtk/gtkmenuitem.h: Use "gint" not "guint16" for toggle size
	request and allocation

	* gtk/gtkmenu.c (gtk_menu_size_request): use gint not guint16

	* gtk/gtkcheckmenuitem.c
	(gtk_check_menu_item_toggle_size_request): ditto
2001-02-13 05:44:47 +00:00