1997-12-19 21:14:44 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
* GtkToolbar copyright (C) Federico Mena
|
|
|
|
*
|
2003-12-29 10:55:53 +00:00
|
|
|
* Copyright (C) 2002 Anders Carlsson <andersca@gnome.org>
|
2003-06-29 23:34:20 +00:00
|
|
|
* Copyright (C) 2002 James Henstridge <james@daa.com.au>
|
2004-01-18 12:28:38 +00:00
|
|
|
* Copyright (C) 2003, 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
2003-06-29 23:34:20 +00:00
|
|
|
*
|
1997-12-19 21:14:44 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1997-12-19 21:14:44 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
1997-12-19 21:14:44 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-12-19 21:14:44 +00:00
|
|
|
*/
|
|
|
|
|
1999-02-24 07:37:18 +00:00
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
1999-02-24 07:37:18 +00:00
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
#undef GTK_DISABLE_DEPRECATED
|
2002-10-25 21:36:55 +00:00
|
|
|
|
2004-03-06 03:38:59 +00:00
|
|
|
#include <config.h>
|
2003-06-29 23:34:20 +00:00
|
|
|
#include "gtkarrow.h"
|
|
|
|
#include "gtktoolbar.h"
|
|
|
|
#include "gtkradiotoolbutton.h"
|
|
|
|
#include "gtkseparatortoolitem.h"
|
|
|
|
#include "gtkmenu.h"
|
1998-02-23 20:48:46 +00:00
|
|
|
#include "gtkradiobutton.h"
|
1997-12-19 21:14:44 +00:00
|
|
|
#include "gtktoolbar.h"
|
2003-06-29 23:34:20 +00:00
|
|
|
#include "gtkbindings.h"
|
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
|
|
#include "gtkmarshalers.h"
|
|
|
|
#include "gtkmain.h"
|
2001-03-15 09:09:06 +00:00
|
|
|
#include "gtkstock.h"
|
2003-06-29 23:34:20 +00:00
|
|
|
#include "gtklabel.h"
|
|
|
|
#include "gtkprivate.h"
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
#include "gtkintl.h"
|
2003-06-29 23:34:20 +00:00
|
|
|
#include <string.h>
|
2004-01-17 21:03:31 +00:00
|
|
|
#include "gtkhbox.h"
|
|
|
|
#include "gtkvbox.h"
|
|
|
|
#include "gtkimage.h"
|
1997-12-19 21:14:44 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
typedef struct _ToolbarContent ToolbarContent;
|
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
#define DEFAULT_IPADDING 0
|
2003-07-07 14:35:31 +00:00
|
|
|
|
2004-01-27 01:11:18 +00:00
|
|
|
#define DEFAULT_SPACE_SIZE 12
|
2001-06-04 23:15:51 +00:00
|
|
|
#define DEFAULT_SPACE_STYLE GTK_TOOLBAR_SPACE_LINE
|
2004-01-18 14:31:00 +00:00
|
|
|
#define SPACE_LINE_DIVISION 10.0
|
2004-01-27 01:11:18 +00:00
|
|
|
#define SPACE_LINE_START 2.0
|
|
|
|
#define SPACE_LINE_END 8.0
|
1997-12-19 21:14:44 +00:00
|
|
|
|
2001-03-15 09:09:06 +00:00
|
|
|
#define DEFAULT_ICON_SIZE GTK_ICON_SIZE_LARGE_TOOLBAR
|
2002-10-22 20:00:31 +00:00
|
|
|
#define DEFAULT_TOOLBAR_STYLE GTK_TOOLBAR_BOTH
|
2001-03-15 09:09:06 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
#define MAX_HOMOGENEOUS_N_CHARS 13 /* Items that are wider than this do not participate
|
|
|
|
* in the homogeneous game. In units of
|
2003-08-29 18:28:23 +00:00
|
|
|
* pango_font_get_estimated_char_width().
|
|
|
|
*/
|
2004-01-27 01:11:18 +00:00
|
|
|
#define SLIDE_SPEED 600 /* How fast the items slide, in pixels per second */
|
2003-08-29 18:28:23 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/* Properties */
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
enum {
|
2001-05-17 16:22:06 +00:00
|
|
|
PROP_0,
|
|
|
|
PROP_ORIENTATION,
|
2003-06-29 23:34:20 +00:00
|
|
|
PROP_TOOLBAR_STYLE,
|
|
|
|
PROP_SHOW_ARROW
|
|
|
|
};
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/* Child properties */
|
2003-06-29 23:34:20 +00:00
|
|
|
enum {
|
|
|
|
CHILD_PROP_0,
|
|
|
|
CHILD_PROP_EXPAND,
|
2003-10-25 19:58:51 +00:00
|
|
|
CHILD_PROP_HOMOGENEOUS
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
};
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/* Signals */
|
1997-12-23 06:11:36 +00:00
|
|
|
enum {
|
1998-01-13 07:00:52 +00:00
|
|
|
ORIENTATION_CHANGED,
|
|
|
|
STYLE_CHANGED,
|
2003-06-29 23:34:20 +00:00
|
|
|
POPUP_CONTEXT_MENU,
|
|
|
|
MOVE_FOCUS,
|
2003-07-02 14:04:43 +00:00
|
|
|
FOCUS_HOME_OR_END,
|
1998-01-13 07:00:52 +00:00
|
|
|
LAST_SIGNAL
|
1997-12-23 06:11:36 +00:00
|
|
|
};
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/* API mode */
|
2003-06-29 23:34:20 +00:00
|
|
|
typedef enum {
|
|
|
|
DONT_KNOW,
|
|
|
|
OLD_API,
|
|
|
|
NEW_API
|
|
|
|
} ApiMode;
|
|
|
|
|
2003-11-19 19:44:45 +00:00
|
|
|
typedef enum {
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
TOOL_ITEM,
|
2004-01-18 12:28:38 +00:00
|
|
|
COMPATIBILITY
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
} ContentType;
|
2003-11-19 19:44:45 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
typedef enum {
|
|
|
|
NOT_ALLOCATED,
|
|
|
|
NORMAL,
|
|
|
|
HIDDEN,
|
|
|
|
OVERFLOWN,
|
|
|
|
} ItemState;
|
2003-09-30 22:48:10 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
struct _GtkToolbarPrivate
|
|
|
|
{
|
2003-11-30 16:37:38 +00:00
|
|
|
GList * content;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2003-11-30 16:37:38 +00:00
|
|
|
GtkWidget * arrow;
|
|
|
|
GtkWidget * arrow_button;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2003-11-30 16:37:38 +00:00
|
|
|
GtkMenu * menu;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-30 16:37:38 +00:00
|
|
|
GdkWindow * event_window;
|
|
|
|
ApiMode api_mode;
|
|
|
|
GtkSettings * settings;
|
|
|
|
int idle_id;
|
|
|
|
GtkToolItem * highlight_tool_item;
|
|
|
|
gint max_homogeneous_pixels;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-30 16:37:38 +00:00
|
|
|
GTimer * timer;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
guint show_arrow : 1;
|
|
|
|
guint need_sync : 1;
|
|
|
|
guint is_sliding : 1;
|
2003-06-29 23:34:20 +00:00
|
|
|
};
|
1997-12-23 06:11:36 +00:00
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
static void gtk_toolbar_init (GtkToolbar *toolbar);
|
|
|
|
static void gtk_toolbar_class_init (GtkToolbarClass *klass);
|
|
|
|
static void gtk_toolbar_set_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gtk_toolbar_get_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static gint gtk_toolbar_expose (GtkWidget *widget,
|
|
|
|
GdkEventExpose *event);
|
|
|
|
static void gtk_toolbar_realize (GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_unrealize (GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_size_request (GtkWidget *widget,
|
|
|
|
GtkRequisition *requisition);
|
|
|
|
static void gtk_toolbar_size_allocate (GtkWidget *widget,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
static void gtk_toolbar_style_set (GtkWidget *widget,
|
|
|
|
GtkStyle *prev_style);
|
|
|
|
static gboolean gtk_toolbar_focus (GtkWidget *widget,
|
|
|
|
GtkDirectionType dir);
|
|
|
|
static void gtk_toolbar_screen_changed (GtkWidget *widget,
|
|
|
|
GdkScreen *previous_screen);
|
|
|
|
static void gtk_toolbar_map (GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_unmap (GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_set_child_property (GtkContainer *container,
|
|
|
|
GtkWidget *child,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gtk_toolbar_get_child_property (GtkContainer *container,
|
|
|
|
GtkWidget *child,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gtk_toolbar_finalize (GObject *object);
|
|
|
|
static void gtk_toolbar_show_all (GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_hide_all (GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_add (GtkContainer *container,
|
|
|
|
GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_remove (GtkContainer *container,
|
|
|
|
GtkWidget *widget);
|
|
|
|
static void gtk_toolbar_forall (GtkContainer *container,
|
|
|
|
gboolean include_internals,
|
|
|
|
GtkCallback callback,
|
|
|
|
gpointer callback_data);
|
|
|
|
static GType gtk_toolbar_child_type (GtkContainer *container);
|
|
|
|
static void gtk_toolbar_orientation_changed (GtkToolbar *toolbar,
|
|
|
|
GtkOrientation orientation);
|
|
|
|
static void gtk_toolbar_real_style_changed (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarStyle style);
|
|
|
|
static gboolean gtk_toolbar_move_focus (GtkToolbar *toolbar,
|
|
|
|
GtkDirectionType dir);
|
|
|
|
static gboolean gtk_toolbar_focus_home_or_end (GtkToolbar *toolbar,
|
|
|
|
gboolean focus_home);
|
|
|
|
static gboolean gtk_toolbar_button_press (GtkWidget *toolbar,
|
|
|
|
GdkEventButton *event);
|
|
|
|
static gboolean gtk_toolbar_arrow_button_press (GtkWidget *button,
|
|
|
|
GdkEventButton *event,
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
static void gtk_toolbar_arrow_button_clicked (GtkWidget *button,
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
static void gtk_toolbar_update_button_relief (GtkToolbar *toolbar);
|
|
|
|
static gboolean gtk_toolbar_popup_menu (GtkWidget *toolbar);
|
|
|
|
static GtkWidget *internal_insert_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position,
|
|
|
|
gboolean use_stock);
|
|
|
|
static void gtk_toolbar_reconfigured (GtkToolbar *toolbar);
|
|
|
|
static gboolean gtk_toolbar_check_new_api (GtkToolbar *toolbar);
|
|
|
|
static gboolean gtk_toolbar_check_old_api (GtkToolbar *toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
static GtkReliefStyle get_button_relief (GtkToolbar *toolbar);
|
|
|
|
static gint get_internal_padding (GtkToolbar *toolbar);
|
|
|
|
static GtkShadowType get_shadow_type (GtkToolbar *toolbar);
|
|
|
|
static gint get_space_size (GtkToolbar *toolbar);
|
|
|
|
static GtkToolbarSpaceStyle get_space_style (GtkToolbar *toolbar);
|
1997-12-19 21:14:44 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/* methods on ToolbarContent 'class' */
|
|
|
|
static ToolbarContent *toolbar_content_new_tool_item (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *item,
|
|
|
|
gboolean is_placeholder,
|
|
|
|
gint pos);
|
|
|
|
static ToolbarContent *toolbar_content_new_compatibility (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkWidget *label,
|
|
|
|
gint pos);
|
|
|
|
static void toolbar_content_remove (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
static void toolbar_content_free (ToolbarContent *content);
|
|
|
|
static void toolbar_content_expose (ToolbarContent *content,
|
|
|
|
GtkContainer *container,
|
|
|
|
GdkEventExpose *expose);
|
|
|
|
static gboolean toolbar_content_visible (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
static void toolbar_content_size_request (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar,
|
|
|
|
GtkRequisition *requisition);
|
|
|
|
static gboolean toolbar_content_is_homogeneous (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
static gboolean toolbar_content_is_placeholder (ToolbarContent *content);
|
|
|
|
static gboolean toolbar_content_disappearing (ToolbarContent *content);
|
|
|
|
static ItemState toolbar_content_get_state (ToolbarContent *content);
|
|
|
|
static gboolean toolbar_content_child_visible (ToolbarContent *content);
|
|
|
|
static void toolbar_content_get_goal_allocation (ToolbarContent *content,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
static void toolbar_content_get_allocation (ToolbarContent *content,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
static void toolbar_content_set_start_allocation (ToolbarContent *content,
|
|
|
|
GtkAllocation *new_start_allocation);
|
|
|
|
static void toolbar_content_get_start_allocation (ToolbarContent *content,
|
|
|
|
GtkAllocation *start_allocation);
|
|
|
|
static gboolean toolbar_content_get_expand (ToolbarContent *content);
|
|
|
|
static void toolbar_content_set_goal_allocation (ToolbarContent *content,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
static void toolbar_content_set_child_visible (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar,
|
|
|
|
gboolean visible);
|
|
|
|
static void toolbar_content_size_allocate (ToolbarContent *content,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
static void toolbar_content_set_state (ToolbarContent *content,
|
|
|
|
ItemState new_state);
|
|
|
|
static GtkWidget * toolbar_content_get_widget (ToolbarContent *content);
|
|
|
|
static void toolbar_content_set_disappearing (ToolbarContent *content,
|
|
|
|
gboolean disappearing);
|
|
|
|
static void toolbar_content_set_size_request (ToolbarContent *content,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
static void toolbar_content_toolbar_reconfigured (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
static GtkWidget * toolbar_content_retrieve_menu_item (ToolbarContent *content);
|
|
|
|
static gboolean toolbar_content_is_separator (ToolbarContent *content);
|
|
|
|
static void toolbar_content_show_all (ToolbarContent *content);
|
|
|
|
static void toolbar_content_hide_all (ToolbarContent *content);
|
|
|
|
|
|
|
|
|
|
|
|
#define GTK_TOOLBAR_GET_PRIVATE(o) \
|
|
|
|
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_TOOLBAR, GtkToolbarPrivate))
|
|
|
|
|
|
|
|
static GtkContainerClass * parent_class = NULL;
|
|
|
|
static guint toolbar_signals [LAST_SIGNAL] = { 0 };
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2002-10-09 00:38:22 +00:00
|
|
|
GType
|
1998-01-13 07:00:52 +00:00
|
|
|
gtk_toolbar_get_type (void)
|
1997-12-19 21:14:44 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
static GtkType type = 0;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!type)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
static const GTypeInfo type_info =
|
|
|
|
{
|
|
|
|
sizeof (GtkToolbarClass),
|
|
|
|
(GBaseInitFunc) NULL,
|
|
|
|
(GBaseFinalizeFunc) NULL,
|
|
|
|
(GClassInitFunc) gtk_toolbar_class_init,
|
|
|
|
(GClassFinalizeFunc) NULL,
|
|
|
|
NULL,
|
|
|
|
sizeof (GtkToolbar),
|
|
|
|
0, /* n_preallocs */
|
|
|
|
(GInstanceInitFunc) gtk_toolbar_init,
|
|
|
|
};
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
type = g_type_register_static (GTK_TYPE_CONTAINER,
|
|
|
|
"GtkToolbar",
|
|
|
|
&type_info, 0);
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
add_arrow_bindings (GtkBindingSet *binding_set,
|
|
|
|
guint keysym,
|
|
|
|
GtkDirectionType dir)
|
|
|
|
{
|
|
|
|
guint keypad_keysym = keysym - GDK_Left + GDK_KP_Left;
|
|
|
|
|
|
|
|
gtk_binding_entry_add_signal (binding_set, keysym, 0,
|
|
|
|
"move_focus", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, dir);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, keypad_keysym, 0,
|
|
|
|
"move_focus", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, dir);
|
|
|
|
}
|
1998-01-13 07:00:52 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
add_ctrl_tab_bindings (GtkBindingSet *binding_set,
|
|
|
|
GdkModifierType modifiers,
|
|
|
|
GtkDirectionType direction)
|
|
|
|
{
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_Tab, GDK_CONTROL_MASK | modifiers,
|
|
|
|
"move_focus", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_KP_Tab, GDK_CONTROL_MASK | modifiers,
|
|
|
|
"move_focus", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_class_init (GtkToolbarClass *klass)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GObjectClass *gobject_class;
|
1998-01-13 07:00:52 +00:00
|
|
|
GtkWidgetClass *widget_class;
|
|
|
|
GtkContainerClass *container_class;
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkBindingSet *binding_set;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
|
|
|
|
gobject_class = (GObjectClass *)klass;
|
|
|
|
widget_class = (GtkWidgetClass *)klass;
|
|
|
|
container_class = (GtkContainerClass *)klass;
|
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
gobject_class->set_property = gtk_toolbar_set_property;
|
|
|
|
gobject_class->get_property = gtk_toolbar_get_property;
|
2003-07-03 01:02:04 +00:00
|
|
|
gobject_class->finalize = gtk_toolbar_finalize;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
widget_class->button_press_event = gtk_toolbar_button_press;
|
1998-01-13 07:00:52 +00:00
|
|
|
widget_class->expose_event = gtk_toolbar_expose;
|
|
|
|
widget_class->size_request = gtk_toolbar_size_request;
|
|
|
|
widget_class->size_allocate = gtk_toolbar_size_allocate;
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
widget_class->style_set = gtk_toolbar_style_set;
|
2001-06-08 18:09:34 +00:00
|
|
|
widget_class->focus = gtk_toolbar_focus;
|
2002-11-07 17:59:04 +00:00
|
|
|
widget_class->screen_changed = gtk_toolbar_screen_changed;
|
2003-06-29 23:34:20 +00:00
|
|
|
widget_class->realize = gtk_toolbar_realize;
|
|
|
|
widget_class->unrealize = gtk_toolbar_unrealize;
|
|
|
|
widget_class->map = gtk_toolbar_map;
|
|
|
|
widget_class->unmap = gtk_toolbar_unmap;
|
2003-07-04 16:48:40 +00:00
|
|
|
widget_class->popup_menu = gtk_toolbar_popup_menu;
|
2004-01-18 12:28:38 +00:00
|
|
|
widget_class->show_all = gtk_toolbar_show_all;
|
|
|
|
widget_class->hide_all = gtk_toolbar_hide_all;
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
container_class->add = gtk_toolbar_add;
|
1998-01-13 07:00:52 +00:00
|
|
|
container_class->remove = gtk_toolbar_remove;
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
container_class->forall = gtk_toolbar_forall;
|
2003-06-29 23:34:20 +00:00
|
|
|
container_class->child_type = gtk_toolbar_child_type;
|
|
|
|
container_class->get_child_property = gtk_toolbar_get_child_property;
|
|
|
|
container_class->set_child_property = gtk_toolbar_set_child_property;
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
klass->orientation_changed = gtk_toolbar_orientation_changed;
|
2003-06-29 23:34:20 +00:00
|
|
|
klass->style_changed = gtk_toolbar_real_style_changed;
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/**
|
|
|
|
* GtkToolbar::orientation-changed:
|
|
|
|
* @toolbar: the object which emitted the signal
|
|
|
|
* @orientation: the new #GtkOrientation of the toolbar
|
|
|
|
*
|
|
|
|
* Emitted when the orientation of the toolbar changes.
|
|
|
|
*/
|
doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
* gtk/gtkbox.c: change property types from (u)long to (u)int for
::position and ::padding.
* gtk/gtkcontainer.c: make ::border_width an INT property.
* gtk/gtkpacker.c: make ::position an INT property.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
guard against NULL h/v scrollbars, since this is used at construction
time.
* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
internal gtk_clist_constructor().
* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
gtk_ctree_constructor().
* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
* docs/reference/Makefile.am: fun stuff, disabled docs generation
again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
* gtk/gtkwidget.[hc]:
removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
and gtk_widget_get().
(gtk_widget_new): use g_object_new_valist().
(gtk_widget_set): use g_object_set_valist().
* gtk/gtkobject.[hc]:
removed gtk_object_arg_get_info(), gtk_object_getv(),
gtk_object_query_args(), gtk_object_newv(),
gtk_object_class_add_signals(),
gtk_object_class_user_signal_new(),
gtk_object_class_user_signal_newv(),
gtk_object_arg_set(), gtk_object_arg_get(),
gtk_object_args_collect(),
gtk_object_default_construct(),
gtk_object_constructed(),
GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
removed nsignals, signals and n_args members from GtkObjectClass.
(gtk_object_new): use g_object_new_valist().
(gtk_object_set): use g_object_set_valist().
(gtk_object_get): use g_object_get_valist().
* gtk/gtkcompat.h: define gtk_object_default_construct().
* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
g_object_new().
* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
fucntions, cleaned up method assignments (make sure your structures
are setup properly before calling out). removed all GTK_CONSTRUCTED
hacks ;)
2000-12-13 01:34:41 +00:00
|
|
|
toolbar_signals[ORIENTATION_CHANGED] =
|
2003-08-04 21:13:55 +00:00
|
|
|
g_signal_new ("orientation-changed",
|
2003-06-29 23:34:20 +00:00
|
|
|
G_OBJECT_CLASS_TYPE (klass),
|
2002-10-09 00:38:22 +00:00
|
|
|
G_SIGNAL_RUN_FIRST,
|
|
|
|
G_STRUCT_OFFSET (GtkToolbarClass, orientation_changed),
|
|
|
|
NULL, NULL,
|
2003-06-29 23:34:20 +00:00
|
|
|
g_cclosure_marshal_VOID__ENUM,
|
2002-10-09 00:38:22 +00:00
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
GTK_TYPE_ORIENTATION);
|
2004-01-18 12:28:38 +00:00
|
|
|
/**
|
|
|
|
* GtkToolbar::style-changed:
|
|
|
|
* @toolbar: The #GtkToolbar which emitted the signal
|
|
|
|
* @style: the new #GtkToolbarStyle of the toolbar
|
|
|
|
*
|
|
|
|
* Emitted when the style of the toolbar changes.
|
|
|
|
*/
|
doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
* gtk/gtkbox.c: change property types from (u)long to (u)int for
::position and ::padding.
* gtk/gtkcontainer.c: make ::border_width an INT property.
* gtk/gtkpacker.c: make ::position an INT property.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
guard against NULL h/v scrollbars, since this is used at construction
time.
* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
internal gtk_clist_constructor().
* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
gtk_ctree_constructor().
* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
* docs/reference/Makefile.am: fun stuff, disabled docs generation
again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
* gtk/gtkwidget.[hc]:
removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
and gtk_widget_get().
(gtk_widget_new): use g_object_new_valist().
(gtk_widget_set): use g_object_set_valist().
* gtk/gtkobject.[hc]:
removed gtk_object_arg_get_info(), gtk_object_getv(),
gtk_object_query_args(), gtk_object_newv(),
gtk_object_class_add_signals(),
gtk_object_class_user_signal_new(),
gtk_object_class_user_signal_newv(),
gtk_object_arg_set(), gtk_object_arg_get(),
gtk_object_args_collect(),
gtk_object_default_construct(),
gtk_object_constructed(),
GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
removed nsignals, signals and n_args members from GtkObjectClass.
(gtk_object_new): use g_object_new_valist().
(gtk_object_set): use g_object_set_valist().
(gtk_object_get): use g_object_get_valist().
* gtk/gtkcompat.h: define gtk_object_default_construct().
* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
g_object_new().
* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
fucntions, cleaned up method assignments (make sure your structures
are setup properly before calling out). removed all GTK_CONSTRUCTED
hacks ;)
2000-12-13 01:34:41 +00:00
|
|
|
toolbar_signals[STYLE_CHANGED] =
|
2003-08-04 21:13:55 +00:00
|
|
|
g_signal_new ("style-changed",
|
2003-06-29 23:34:20 +00:00
|
|
|
G_OBJECT_CLASS_TYPE (klass),
|
2002-10-09 00:38:22 +00:00
|
|
|
G_SIGNAL_RUN_FIRST,
|
|
|
|
G_STRUCT_OFFSET (GtkToolbarClass, style_changed),
|
|
|
|
NULL, NULL,
|
2003-06-29 23:34:20 +00:00
|
|
|
g_cclosure_marshal_VOID__ENUM,
|
2002-10-09 00:38:22 +00:00
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
GTK_TYPE_TOOLBAR_STYLE);
|
2004-01-18 12:28:38 +00:00
|
|
|
/**
|
|
|
|
* GtkToolbar::popup-context-menu:
|
|
|
|
* @toolbar: the #GtkToolbar which emitted the signal
|
|
|
|
* @x: the x coordinate of the point where the menu should appear
|
|
|
|
* @y: the y coordinate of the point where the menu should appear
|
|
|
|
* @button: the mouse button the user pressed, or -1
|
|
|
|
*
|
|
|
|
* Emitted when the user right-clicks the toolbar or uses the
|
|
|
|
* keybinding to display a popup menu.
|
|
|
|
*
|
|
|
|
* Application developers should handle this signal if they want
|
|
|
|
* to display a context menu on the toolbar. The context-menu should
|
|
|
|
* appear at the coordinates given by @x and @y. The mouse button
|
|
|
|
* number is given by the @button parameter. If the menu was popped
|
|
|
|
* up using the keybaord, @button is -1.
|
|
|
|
*
|
|
|
|
* Return value: return %TRUE if the signal was handled, %FALSE if not
|
|
|
|
*/
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar_signals[POPUP_CONTEXT_MENU] =
|
|
|
|
g_signal_new ("popup_context_menu",
|
|
|
|
G_OBJECT_CLASS_TYPE (klass),
|
2003-07-04 16:48:40 +00:00
|
|
|
G_SIGNAL_RUN_LAST,
|
2003-06-29 23:34:20 +00:00
|
|
|
G_STRUCT_OFFSET (GtkToolbarClass, popup_context_menu),
|
2003-07-04 16:48:40 +00:00
|
|
|
_gtk_boolean_handled_accumulator, NULL,
|
|
|
|
_gtk_marshal_BOOLEAN__INT_INT_INT,
|
|
|
|
G_TYPE_BOOLEAN, 3,
|
|
|
|
G_TYPE_INT, G_TYPE_INT,
|
|
|
|
G_TYPE_INT);
|
2004-01-18 12:28:38 +00:00
|
|
|
/**
|
|
|
|
* GtkToolbar::move-focus:
|
|
|
|
* @toolbar: the #GtkToolbar which emitted the signal
|
|
|
|
* @dir: a #GtkDirection
|
|
|
|
*
|
|
|
|
* A keybinding signal used internally by GTK+. This signal can't
|
|
|
|
* be used in application code.
|
|
|
|
*
|
|
|
|
* Return value: %TRUE if the signal was handled, %FALSE if not
|
|
|
|
*/
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar_signals[MOVE_FOCUS] =
|
|
|
|
_gtk_binding_signal_new ("move_focus",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
G_CALLBACK (gtk_toolbar_move_focus),
|
|
|
|
NULL, NULL,
|
|
|
|
_gtk_marshal_BOOLEAN__ENUM,
|
|
|
|
G_TYPE_BOOLEAN, 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE);
|
2004-01-18 12:28:38 +00:00
|
|
|
/**
|
|
|
|
* GtkToolbar::focus-home-or-end:
|
|
|
|
* @toolbar: the #GtkToolbar which emitted the signal
|
|
|
|
* @focus_home: %TRUE if the first item should be focused
|
|
|
|
*
|
|
|
|
* A keybinding signal used internally by GTK+. This signal can't
|
|
|
|
* be used in application code
|
|
|
|
*
|
|
|
|
* Return value: %TRUE if the signal was handled, %FALSE if not
|
|
|
|
*/
|
2003-07-02 14:04:43 +00:00
|
|
|
toolbar_signals[FOCUS_HOME_OR_END] =
|
|
|
|
_gtk_binding_signal_new ("focus_home_or_end",
|
2003-06-29 23:34:20 +00:00
|
|
|
G_OBJECT_CLASS_TYPE (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2003-07-02 14:04:43 +00:00
|
|
|
G_CALLBACK (gtk_toolbar_focus_home_or_end),
|
2003-06-29 23:34:20 +00:00
|
|
|
NULL, NULL,
|
|
|
|
_gtk_marshal_BOOLEAN__BOOLEAN,
|
|
|
|
G_TYPE_BOOLEAN, 1,
|
|
|
|
G_TYPE_BOOLEAN);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* properties */
|
2001-05-17 16:22:06 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_ORIENTATION,
|
|
|
|
g_param_spec_enum ("orientation",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Orientation"),
|
|
|
|
P_("The orientation of the toolbar"),
|
2001-05-17 16:22:06 +00:00
|
|
|
GTK_TYPE_ORIENTATION,
|
|
|
|
GTK_ORIENTATION_HORIZONTAL,
|
|
|
|
G_PARAM_READWRITE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TOOLBAR_STYLE,
|
|
|
|
g_param_spec_enum ("toolbar_style",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Toolbar Style"),
|
|
|
|
P_("How to draw the toolbar"),
|
2001-05-17 16:22:06 +00:00
|
|
|
GTK_TYPE_TOOLBAR_STYLE,
|
|
|
|
GTK_TOOLBAR_ICONS,
|
|
|
|
G_PARAM_READWRITE));
|
2003-06-29 23:34:20 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_SHOW_ARROW,
|
|
|
|
g_param_spec_boolean ("show_arrow",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Show Arrow"),
|
|
|
|
P_("If an arrow should be shown if the toolbar doesn't fit"),
|
2003-07-31 20:49:48 +00:00
|
|
|
TRUE,
|
2003-06-29 23:34:20 +00:00
|
|
|
G_PARAM_READWRITE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* child properties */
|
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_EXPAND,
|
|
|
|
g_param_spec_boolean ("expand",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Expand"),
|
|
|
|
P_("Whether the item should receive extra space when the toolbar grows"),
|
2003-06-29 23:34:20 +00:00
|
|
|
TRUE,
|
|
|
|
G_PARAM_READWRITE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_HOMOGENEOUS,
|
|
|
|
g_param_spec_boolean ("homogeneous",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Homogeneous"),
|
|
|
|
P_("Whether the item should be the same size as other homogeneous items"),
|
2003-06-29 23:34:20 +00:00
|
|
|
TRUE,
|
|
|
|
G_PARAM_READWRITE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* style properties */
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_int ("space_size",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Spacer size"),
|
|
|
|
P_("Size of spacers"),
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
0,
|
|
|
|
G_MAXINT,
|
|
|
|
DEFAULT_SPACE_SIZE,
|
|
|
|
G_PARAM_READABLE));
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_int ("internal_padding",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Internal padding"),
|
|
|
|
P_("Amount of border space between the toolbar shadow and the buttons"),
|
2001-06-04 23:15:51 +00:00
|
|
|
0,
|
|
|
|
G_MAXINT,
|
|
|
|
DEFAULT_IPADDING,
|
|
|
|
G_PARAM_READABLE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_enum ("space_style",
|
2004-01-18 12:28:38 +00:00
|
|
|
P_("Space style"),
|
|
|
|
P_("Whether spacers are vertical lines or just blank"),
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
GTK_TYPE_TOOLBAR_SPACE_STYLE,
|
|
|
|
DEFAULT_SPACE_STYLE,
|
|
|
|
G_PARAM_READABLE));
|
2003-06-29 23:34:20 +00:00
|
|
|
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_enum ("button_relief",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Button relief"),
|
|
|
|
P_("Type of bevel around toolbar buttons"),
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
GTK_TYPE_RELIEF_STYLE,
|
2001-06-04 23:15:51 +00:00
|
|
|
GTK_RELIEF_NONE,
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
G_PARAM_READABLE));
|
2001-06-04 23:15:51 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_enum ("shadow_type",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Shadow type"),
|
|
|
|
P_("Style of bevel around the toolbar"),
|
2001-06-04 23:15:51 +00:00
|
|
|
GTK_TYPE_SHADOW_TYPE,
|
|
|
|
GTK_SHADOW_OUT,
|
|
|
|
G_PARAM_READABLE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Allow %NULL for style to mean "revert to default style"
Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL
for style to mean "revert to default style"
* gtk/gtkwidget.[ch] (gtk_widget_set_rc_style,
gtk_widget_restore_default_style): Make this functions
deprecated aliases for gtk_widget_set_style (widget, NULL).
* gtk/gtkwidget.[ch]: Remove:
gtk_widget_set_default_style ()
gtk_widget_push_style ()
gtk_widget_pop_style ()
These functions interact are overriden by RC files, and
thus virtually useless, and complicated.
Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: Add a GtkRcContext structure to hold
most of the previous global variables in gtkrc.c. This is
in preparation for multi-head, since each screen can
have different GtkSettings and RC information.
* gtk/gtkrc.[ch]:
* gtk/gtkrc.h (struct _GtkRcStyleClass): Add a
GtkSettings parameter to GtkRcStyle::parse.
* gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c:
Add two new settings gtk-theme-name, gtk-key-theme-name,
for RC files that are loaded by name after reading
the default RC files.
* gtk/gtkrc.c: Allow priorities for styles, as wll as
bindings.
* gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME,
and use it by default for RC files loaded via
gtk-theme-name, gtk-key-theme-name.
* gtk/gtkiconfactory.c (gtk_icon_source_set_filename)
gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string)
tests/testgtkrc: Require pathnames to be absolute.
* gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for
the source when parsing, since the operation of looking up a
pixmap from an RC file depends on the parsing context.
* gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically
reset RC styles on all widgets when files are reparsed.
* tests/testgtk.c (create_rc_file)
gtk/gtkwindow.c (gtk_window_read_rcfiles):
Simplify, now that gtk_rc_reparse_all() resets styles on
all widgets itself.
* gtk/gtkmain.c (gtk_get_default_language): Fix broken
return value.
* gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove
GtkSettings argument.
* gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from
gtk_settings_get_global().
* gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings()
to get the appropriate GtkSettings for a widget. (For now,
just gets the default GtkSetttings.)
* gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c
gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings
changes.
* gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow
getting a style for a path without actually having a widget.
(Allows using a style for a subpart of a widget, for
example.)
* gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing
the RC files to be reloaded for just one GtkSettings
(not sure how useful this really is.)
* gtk/gtkrc.h: Deprecate
gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
|
|
|
gtk_settings_install_property (g_param_spec_enum ("gtk-toolbar-style",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Toolbar style"),
|
|
|
|
P_("Whether default toolbars have text only, text and icons, icons only, etc."),
|
2001-06-04 23:15:51 +00:00
|
|
|
GTK_TYPE_TOOLBAR_STYLE,
|
2002-10-22 20:00:31 +00:00
|
|
|
DEFAULT_TOOLBAR_STYLE,
|
2001-06-04 23:15:51 +00:00
|
|
|
G_PARAM_READWRITE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Allow %NULL for style to mean "revert to default style"
Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL
for style to mean "revert to default style"
* gtk/gtkwidget.[ch] (gtk_widget_set_rc_style,
gtk_widget_restore_default_style): Make this functions
deprecated aliases for gtk_widget_set_style (widget, NULL).
* gtk/gtkwidget.[ch]: Remove:
gtk_widget_set_default_style ()
gtk_widget_push_style ()
gtk_widget_pop_style ()
These functions interact are overriden by RC files, and
thus virtually useless, and complicated.
Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: Add a GtkRcContext structure to hold
most of the previous global variables in gtkrc.c. This is
in preparation for multi-head, since each screen can
have different GtkSettings and RC information.
* gtk/gtkrc.[ch]:
* gtk/gtkrc.h (struct _GtkRcStyleClass): Add a
GtkSettings parameter to GtkRcStyle::parse.
* gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c:
Add two new settings gtk-theme-name, gtk-key-theme-name,
for RC files that are loaded by name after reading
the default RC files.
* gtk/gtkrc.c: Allow priorities for styles, as wll as
bindings.
* gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME,
and use it by default for RC files loaded via
gtk-theme-name, gtk-key-theme-name.
* gtk/gtkiconfactory.c (gtk_icon_source_set_filename)
gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string)
tests/testgtkrc: Require pathnames to be absolute.
* gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for
the source when parsing, since the operation of looking up a
pixmap from an RC file depends on the parsing context.
* gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically
reset RC styles on all widgets when files are reparsed.
* tests/testgtk.c (create_rc_file)
gtk/gtkwindow.c (gtk_window_read_rcfiles):
Simplify, now that gtk_rc_reparse_all() resets styles on
all widgets itself.
* gtk/gtkmain.c (gtk_get_default_language): Fix broken
return value.
* gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove
GtkSettings argument.
* gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from
gtk_settings_get_global().
* gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings()
to get the appropriate GtkSettings for a widget. (For now,
just gets the default GtkSetttings.)
* gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c
gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings
changes.
* gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow
getting a style for a path without actually having a widget.
(Allows using a style for a subpart of a widget, for
example.)
* gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing
the RC files to be reloaded for just one GtkSettings
(not sure how useful this really is.)
* gtk/gtkrc.h: Deprecate
gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
|
|
|
gtk_settings_install_property (g_param_spec_enum ("gtk-toolbar-icon-size",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Toolbar icon size"),
|
|
|
|
P_("Size of icons in default toolbars"),
|
2001-06-04 23:15:51 +00:00
|
|
|
GTK_TYPE_ICON_SIZE,
|
2002-10-22 20:00:31 +00:00
|
|
|
DEFAULT_ICON_SIZE,
|
2001-06-04 23:15:51 +00:00
|
|
|
G_PARAM_READWRITE));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
binding_set = gtk_binding_set_by_class (klass);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
add_arrow_bindings (binding_set, GDK_Left, GTK_DIR_LEFT);
|
|
|
|
add_arrow_bindings (binding_set, GDK_Right, GTK_DIR_RIGHT);
|
|
|
|
add_arrow_bindings (binding_set, GDK_Up, GTK_DIR_UP);
|
|
|
|
add_arrow_bindings (binding_set, GDK_Down, GTK_DIR_DOWN);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, 0,
|
2003-07-02 14:04:43 +00:00
|
|
|
"focus_home_or_end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
G_TYPE_BOOLEAN, TRUE);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
|
2003-07-02 14:04:43 +00:00
|
|
|
"focus_home_or_end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
G_TYPE_BOOLEAN, TRUE);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KP_End, 0,
|
2003-07-02 14:04:43 +00:00
|
|
|
"focus_home_or_end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
G_TYPE_BOOLEAN, FALSE);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
|
2003-07-02 14:04:43 +00:00
|
|
|
"focus_home_or_end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
G_TYPE_BOOLEAN, FALSE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-02 14:04:43 +00:00
|
|
|
add_ctrl_tab_bindings (binding_set, 0, GTK_DIR_TAB_FORWARD);
|
|
|
|
add_ctrl_tab_bindings (binding_set, GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_type_class_add_private (gobject_class, sizeof (GtkToolbarPrivate));
|
2002-10-22 20:00:31 +00:00
|
|
|
}
|
|
|
|
|
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
make internals multihead aware.
* gtk/gtkcolorsel.[ch]: Add
gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
make up for non-multihead safety of
gtk_color_selection_set_change_palette_hook()
* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
gtk_{invisible,menu,window}_set_screen(); add "screen" properties
for GtkWindow and GtkMenu.
* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
gtk_plug_new_for_display(). Multihead fixes.
* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
make internals multihead aware.
* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
rid of now-useless gtk_settings_constructor().
* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
check/radio button indicators bitmap handling to be multihead
safe.
* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
gtk_widget_get_display(), gtk_widget_get_clipboard(),
gtk_widget_get_root_window().
* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
misc mechanical multihead-safety fixes.
* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
the dropper, look up the color palette only at realization time,
other multihead fixes.
* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
unrealizing.
* gtk/gtkentry.c: Only claim ownership of the primary selection
when realized, misc multihead fixes.
* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
fix gtk_font_selection_get_font() for multihead.
* gtk/gtkgc.c: make the depth => drawable hash per-screen.
* gtk/gtkinvisible.c: Add a constructor that realizes the
widget, so we get a realized widget with g_object_new() as
well gtk_invisible_new() as before.
* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
variables.
* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
are used on the wrong screen.
* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
read properties and connect to settings when the screen is changed,
rather than on init/finalize.
* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
default icon pixmaps/mask are only shared between windows on the
same screen. Misc multihead fixes.
Sat Apr 27 13:49:53 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.
2002-04-29 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
Fix silly bug, noticed by Sven Neumann.
Sun Apr 28 22:43:55 2002 Jonathan Blandford <jrb@gnome.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
|
|
|
static void
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_init (GtkToolbar *toolbar)
|
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
make internals multihead aware.
* gtk/gtkcolorsel.[ch]: Add
gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
make up for non-multihead safety of
gtk_color_selection_set_change_palette_hook()
* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
gtk_{invisible,menu,window}_set_screen(); add "screen" properties
for GtkWindow and GtkMenu.
* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
gtk_plug_new_for_display(). Multihead fixes.
* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
make internals multihead aware.
* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
rid of now-useless gtk_settings_constructor().
* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
check/radio button indicators bitmap handling to be multihead
safe.
* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
gtk_widget_get_display(), gtk_widget_get_clipboard(),
gtk_widget_get_root_window().
* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
misc mechanical multihead-safety fixes.
* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
the dropper, look up the color palette only at realization time,
other multihead fixes.
* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
unrealizing.
* gtk/gtkentry.c: Only claim ownership of the primary selection
when realized, misc multihead fixes.
* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
fix gtk_font_selection_get_font() for multihead.
* gtk/gtkgc.c: make the depth => drawable hash per-screen.
* gtk/gtkinvisible.c: Add a constructor that realizes the
widget, so we get a realized widget with g_object_new() as
well gtk_invisible_new() as before.
* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
variables.
* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
are used on the wrong screen.
* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
read properties and connect to settings when the screen is changed,
rather than on init/finalize.
* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
default icon pixmaps/mask are only shared between windows on the
same screen. Misc multihead fixes.
Sat Apr 27 13:49:53 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.
2002-04-29 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
Fix silly bug, noticed by Sven Neumann.
Sun Apr 28 22:43:55 2002 Jonathan Blandford <jrb@gnome.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
|
|
|
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (toolbar, GTK_CAN_FOCUS);
|
|
|
|
GTK_WIDGET_SET_FLAGS (toolbar, GTK_NO_WINDOW);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
make internals multihead aware.
* gtk/gtkcolorsel.[ch]: Add
gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
make up for non-multihead safety of
gtk_color_selection_set_change_palette_hook()
* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
gtk_{invisible,menu,window}_set_screen(); add "screen" properties
for GtkWindow and GtkMenu.
* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
gtk_plug_new_for_display(). Multihead fixes.
* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
make internals multihead aware.
* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
rid of now-useless gtk_settings_constructor().
* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
check/radio button indicators bitmap handling to be multihead
safe.
* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
gtk_widget_get_display(), gtk_widget_get_clipboard(),
gtk_widget_get_root_window().
* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
misc mechanical multihead-safety fixes.
* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
the dropper, look up the color palette only at realization time,
other multihead fixes.
* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
unrealizing.
* gtk/gtkentry.c: Only claim ownership of the primary selection
when realized, misc multihead fixes.
* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
fix gtk_font_selection_get_font() for multihead.
* gtk/gtkgc.c: make the depth => drawable hash per-screen.
* gtk/gtkinvisible.c: Add a constructor that realizes the
widget, so we get a realized widget with g_object_new() as
well gtk_invisible_new() as before.
* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
variables.
* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
are used on the wrong screen.
* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
read properties and connect to settings when the screen is changed,
rather than on init/finalize.
* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
default icon pixmaps/mask are only shared between windows on the
same screen. Misc multihead fixes.
Sat Apr 27 13:49:53 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.
2002-04-29 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
Fix silly bug, noticed by Sven Neumann.
Sun Apr 28 22:43:55 2002 Jonathan Blandford <jrb@gnome.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar->orientation = GTK_ORIENTATION_HORIZONTAL;
|
|
|
|
toolbar->style = DEFAULT_TOOLBAR_STYLE;
|
|
|
|
toolbar->icon_size = DEFAULT_ICON_SIZE;
|
|
|
|
toolbar->tooltips = gtk_tooltips_new ();
|
|
|
|
g_object_ref (toolbar->tooltips);
|
|
|
|
gtk_object_sink (GTK_OBJECT (toolbar->tooltips));
|
|
|
|
|
|
|
|
priv->arrow_button = gtk_toggle_button_new ();
|
|
|
|
g_signal_connect (priv->arrow_button, "button_press_event",
|
|
|
|
G_CALLBACK (gtk_toolbar_arrow_button_press), toolbar);
|
|
|
|
g_signal_connect (priv->arrow_button, "clicked",
|
|
|
|
G_CALLBACK (gtk_toolbar_arrow_button_clicked), toolbar);
|
|
|
|
gtk_button_set_relief (GTK_BUTTON (priv->arrow_button),
|
|
|
|
get_button_relief (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
priv->api_mode = DONT_KNOW;
|
|
|
|
|
|
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (priv->arrow_button), FALSE);
|
|
|
|
|
|
|
|
priv->arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
|
2003-09-14 15:03:07 +00:00
|
|
|
gtk_widget_set_name (priv->arrow, "gtk-toolbar-arrow");
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_widget_show (priv->arrow);
|
|
|
|
gtk_container_add (GTK_CONTAINER (priv->arrow_button), priv->arrow);
|
|
|
|
|
|
|
|
gtk_widget_set_parent (priv->arrow_button, GTK_WIDGET (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* which child position a drop will occur at */
|
|
|
|
priv->menu = NULL;
|
2003-07-31 20:49:48 +00:00
|
|
|
priv->show_arrow = TRUE;
|
2003-06-29 23:34:20 +00:00
|
|
|
priv->settings = NULL;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
priv->max_homogeneous_pixels = -1;
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
priv->timer = g_timer_new ();
|
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
make internals multihead aware.
* gtk/gtkcolorsel.[ch]: Add
gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
make up for non-multihead safety of
gtk_color_selection_set_change_palette_hook()
* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
gtk_{invisible,menu,window}_set_screen(); add "screen" properties
for GtkWindow and GtkMenu.
* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
gtk_plug_new_for_display(). Multihead fixes.
* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
make internals multihead aware.
* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
rid of now-useless gtk_settings_constructor().
* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
check/radio button indicators bitmap handling to be multihead
safe.
* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
gtk_widget_get_display(), gtk_widget_get_clipboard(),
gtk_widget_get_root_window().
* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
misc mechanical multihead-safety fixes.
* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
the dropper, look up the color palette only at realization time,
other multihead fixes.
* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
unrealizing.
* gtk/gtkentry.c: Only claim ownership of the primary selection
when realized, misc multihead fixes.
* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
fix gtk_font_selection_get_font() for multihead.
* gtk/gtkgc.c: make the depth => drawable hash per-screen.
* gtk/gtkinvisible.c: Add a constructor that realizes the
widget, so we get a realized widget with g_object_new() as
well gtk_invisible_new() as before.
* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
variables.
* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
are used on the wrong screen.
* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
read properties and connect to settings when the screen is changed,
rather than on init/finalize.
* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
default icon pixmaps/mask are only shared between windows on the
same screen. Misc multihead fixes.
Sat Apr 27 13:49:53 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.
2002-04-29 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
Fix silly bug, noticed by Sven Neumann.
Sun Apr 28 22:43:55 2002 Jonathan Blandford <jrb@gnome.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
|
|
|
}
|
|
|
|
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
static void
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_toolbar_set_property (GObject *object,
|
|
|
|
guint prop_id,
|
2001-05-17 16:22:06 +00:00
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
{
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (object);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
switch (prop_id)
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
{
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_ORIENTATION:
|
|
|
|
gtk_toolbar_set_orientation (toolbar, g_value_get_enum (value));
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TOOLBAR_STYLE:
|
|
|
|
gtk_toolbar_set_style (toolbar, g_value_get_enum (value));
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
2003-06-29 23:34:20 +00:00
|
|
|
case PROP_SHOW_ARROW:
|
|
|
|
gtk_toolbar_set_show_arrow (toolbar, g_value_get_boolean (value));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_get_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
{
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (object);
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
switch (prop_id)
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
{
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_ORIENTATION:
|
|
|
|
g_value_set_enum (value, toolbar->orientation);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TOOLBAR_STYLE:
|
|
|
|
g_value_set_enum (value, toolbar->style);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
2003-06-29 23:34:20 +00:00
|
|
|
case PROP_SHOW_ARROW:
|
|
|
|
g_value_set_boolean (value, priv->show_arrow);
|
|
|
|
break;
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
default:
|
2001-05-17 16:22:06 +00:00
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_map (GtkWidget *widget)
|
1997-12-19 21:14:44 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
GTK_WIDGET_CLASS (parent_class)->map (widget);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (priv->event_window)
|
|
|
|
gdk_window_show_unraised (priv->event_window);
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_unmap (GtkWidget *widget)
|
1997-12-19 21:14:44 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (priv->event_window)
|
|
|
|
gdk_window_hide (priv->event_window);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_realize (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
GdkWindowAttr attributes;
|
|
|
|
gint attributes_mask;
|
|
|
|
gint border_width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
border_width = GTK_CONTAINER (widget)->border_width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
attributes.wclass = GDK_INPUT_ONLY;
|
|
|
|
attributes.window_type = GDK_WINDOW_CHILD;
|
|
|
|
attributes.x = widget->allocation.x + border_width;
|
|
|
|
attributes.y = widget->allocation.y + border_width;
|
|
|
|
attributes.width = widget->allocation.width - border_width * 2;
|
|
|
|
attributes.height = widget->allocation.height - border_width * 2;
|
|
|
|
attributes.event_mask = gtk_widget_get_events (widget);
|
2003-07-08 18:59:16 +00:00
|
|
|
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
|
2003-06-29 23:34:20 +00:00
|
|
|
GDK_BUTTON_RELEASE_MASK |
|
|
|
|
GDK_ENTER_NOTIFY_MASK |
|
|
|
|
GDK_LEAVE_NOTIFY_MASK);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
widget->window = gtk_widget_get_parent_window (widget);
|
|
|
|
g_object_ref (widget->window);
|
2003-07-02 18:56:35 +00:00
|
|
|
widget->style = gtk_style_attach (widget->style, widget->window);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
|
|
|
&attributes, attributes_mask);
|
|
|
|
gdk_window_set_user_data (priv->event_window, toolbar);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_toolbar_unrealize (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (priv->event_window)
|
|
|
|
{
|
|
|
|
gdk_window_set_user_data (priv->event_window, NULL);
|
|
|
|
gdk_window_destroy (priv->event_window);
|
|
|
|
priv->event_window = NULL;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
|
|
|
|
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
|
1998-12-08 13:25:35 +00:00
|
|
|
}
|
|
|
|
|
1998-01-13 06:14:52 +00:00
|
|
|
static gint
|
1998-01-13 07:00:52 +00:00
|
|
|
gtk_toolbar_expose (GtkWidget *widget,
|
|
|
|
GdkEventExpose *event)
|
1997-12-19 21:14:44 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
GList *list;
|
2001-06-04 23:15:51 +00:00
|
|
|
gint border_width;
|
2001-03-09 13:28:26 +00:00
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
border_width = GTK_CONTAINER (widget)->border_width;
|
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
if (GTK_WIDGET_DRAWABLE (widget))
|
|
|
|
{
|
2001-06-04 23:15:51 +00:00
|
|
|
gtk_paint_box (widget->style,
|
|
|
|
widget->window,
|
|
|
|
GTK_WIDGET_STATE (widget),
|
2003-07-18 16:25:31 +00:00
|
|
|
get_shadow_type (toolbar),
|
2001-06-04 23:15:51 +00:00
|
|
|
&event->area, widget, "toolbar",
|
2003-06-29 23:34:20 +00:00
|
|
|
border_width + widget->allocation.x,
|
|
|
|
border_width + widget->allocation.y,
|
2003-06-05 23:37:03 +00:00
|
|
|
widget->allocation.width - 2 * border_width,
|
|
|
|
widget->allocation.height - 2 * border_width);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_expose (content, GTK_CONTAINER (widget), event);
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
|
|
|
priv->arrow_button,
|
|
|
|
event);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
return FALSE;
|
1998-01-13 06:14:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
1998-01-13 07:00:52 +00:00
|
|
|
gtk_toolbar_size_request (GtkWidget *widget,
|
|
|
|
GtkRequisition *requisition)
|
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *list;
|
|
|
|
gint max_child_height;
|
|
|
|
gint max_child_width;
|
|
|
|
gint max_homogeneous_child_width;
|
|
|
|
gint max_homogeneous_child_height;
|
|
|
|
gint homogeneous_size;
|
|
|
|
gint long_req;
|
|
|
|
gint pack_front_size;
|
2001-06-04 23:15:51 +00:00
|
|
|
gint ipadding;
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkRequisition arrow_requisition;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
max_homogeneous_child_width = 0;
|
|
|
|
max_homogeneous_child_height = 0;
|
|
|
|
max_child_width = 0;
|
|
|
|
max_child_height = 0;
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkRequisition requisition;
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!toolbar_content_visible (content, toolbar))
|
2003-06-29 23:34:20 +00:00
|
|
|
continue;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_content_size_request (content, toolbar, &requisition);
|
2004-01-25 14:17:15 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
max_child_width = MAX (max_child_width, requisition.width);
|
|
|
|
max_child_height = MAX (max_child_height, requisition.height);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_is_homogeneous (content, toolbar))
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
max_homogeneous_child_width = MAX (max_homogeneous_child_width, requisition.width);
|
|
|
|
max_homogeneous_child_height = MAX (max_homogeneous_child_height, requisition.height);
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
homogeneous_size = max_homogeneous_child_width;
|
1998-01-13 07:00:52 +00:00
|
|
|
else
|
2003-06-29 23:34:20 +00:00
|
|
|
homogeneous_size = max_homogeneous_child_height;
|
|
|
|
|
|
|
|
pack_front_size = 0;
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2003-06-29 23:34:20 +00:00
|
|
|
guint size;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!toolbar_content_visible (content, toolbar))
|
2003-06-29 23:34:20 +00:00
|
|
|
continue;
|
2004-01-25 14:17:15 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_is_homogeneous (content, toolbar))
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
size = homogeneous_size;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GtkRequisition requisition;
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_content_size_request (content, toolbar, &requisition);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
size = requisition.width;
|
|
|
|
else
|
|
|
|
size = requisition.height;
|
|
|
|
}
|
2004-01-25 14:17:15 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
pack_front_size += size;
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2003-07-31 20:49:48 +00:00
|
|
|
if (priv->show_arrow && priv->api_mode == NEW_API)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
gtk_widget_size_request (priv->arrow_button, &arrow_requisition);
|
|
|
|
|
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
long_req = arrow_requisition.width;
|
|
|
|
else
|
|
|
|
long_req = arrow_requisition.height;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* There is no point requesting space for the arrow if that would take
|
|
|
|
* up more space than all the items combined
|
|
|
|
*/
|
2003-10-25 19:58:51 +00:00
|
|
|
long_req = MIN (long_req, pack_front_size);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
arrow_requisition.height = 0;
|
|
|
|
arrow_requisition.width = 0;
|
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
long_req = pack_front_size;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
requisition->width = long_req;
|
|
|
|
requisition->height = MAX (max_child_height, arrow_requisition.height);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
requisition->height = long_req;
|
|
|
|
requisition->width = MAX (max_child_width, arrow_requisition.width);
|
|
|
|
}
|
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
/* Extra spacing */
|
2003-06-29 23:34:20 +00:00
|
|
|
ipadding = get_internal_padding (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
requisition->width += 2 * (ipadding + GTK_CONTAINER (toolbar)->border_width);
|
|
|
|
requisition->height += 2 * (ipadding + GTK_CONTAINER (toolbar)->border_width);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-18 16:25:31 +00:00
|
|
|
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
|
|
|
|
{
|
|
|
|
requisition->width += 2 * widget->style->xthickness;
|
|
|
|
requisition->height += 2 * widget->style->ythickness;
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
toolbar->button_maxw = max_homogeneous_child_width;
|
|
|
|
toolbar->button_maxh = max_homogeneous_child_height;
|
|
|
|
}
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
static gint
|
|
|
|
position (gint from, gint to, gdouble elapsed)
|
|
|
|
{
|
|
|
|
if (to > from)
|
|
|
|
return MIN (from + SLIDE_SPEED * elapsed, to);
|
|
|
|
else
|
|
|
|
return MAX (from - SLIDE_SPEED * elapsed, to);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
compute_intermediate_allocation (GtkToolbar *toolbar,
|
|
|
|
const GtkAllocation *start,
|
|
|
|
const GtkAllocation *goal,
|
|
|
|
GtkAllocation *intermediate)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
gdouble elapsed = g_timer_elapsed (priv->timer, NULL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
intermediate->x = position (start->x, goal->x, elapsed);
|
|
|
|
intermediate->y = position (start->y, goal->y, elapsed);
|
|
|
|
intermediate->width =
|
|
|
|
position (start->x + start->width, goal->x + goal->width, elapsed) - intermediate->x;
|
|
|
|
intermediate->height =
|
|
|
|
position (start->y + start->height, goal->y + goal->height, elapsed) - intermediate->y;
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
fixup_allocation_for_rtl (gint total_size,
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
{
|
|
|
|
allocation->x += (total_size - (2 * allocation->x + allocation->width));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
fixup_allocation_for_vertical (GtkAllocation *allocation)
|
|
|
|
{
|
|
|
|
gint tmp;
|
2001-06-04 23:15:51 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
tmp = allocation->x;
|
|
|
|
allocation->x = allocation->y;
|
|
|
|
allocation->y = tmp;
|
|
|
|
|
|
|
|
tmp = allocation->width;
|
|
|
|
allocation->width = allocation->height;
|
|
|
|
allocation->height = tmp;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2003-11-30 16:37:38 +00:00
|
|
|
get_item_size (GtkToolbar *toolbar,
|
|
|
|
ToolbarContent *content)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
GtkRequisition requisition;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_content_size_request (content, toolbar, &requisition);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-25 14:17:15 +00:00
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_is_homogeneous (content, toolbar))
|
2003-06-29 23:34:20 +00:00
|
|
|
return toolbar->button_maxw;
|
|
|
|
else
|
|
|
|
return requisition.width;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_is_homogeneous (content, toolbar))
|
2003-06-29 23:34:20 +00:00
|
|
|
return toolbar->button_maxh;
|
|
|
|
else
|
|
|
|
return requisition.height;
|
|
|
|
}
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
static gboolean
|
|
|
|
slide_idle_handler (gpointer data)
|
|
|
|
{
|
|
|
|
GtkToolbar *toolbar = data;
|
2003-12-29 11:35:43 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
2003-11-24 01:01:43 +00:00
|
|
|
GList *list;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-12-29 11:35:43 +00:00
|
|
|
GDK_THREADS_ENTER ();
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-12-29 11:35:43 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (priv->need_sync)
|
|
|
|
{
|
|
|
|
gdk_flush ();
|
|
|
|
priv->need_sync = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
ItemState state;
|
|
|
|
GtkAllocation goal_allocation;
|
|
|
|
GtkAllocation allocation;
|
2004-01-24 22:29:18 +00:00
|
|
|
gboolean cont;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
state = toolbar_content_get_state (content);
|
|
|
|
toolbar_content_get_goal_allocation (content, &goal_allocation);
|
|
|
|
toolbar_content_get_allocation (content, &allocation);
|
|
|
|
|
2004-01-24 22:29:18 +00:00
|
|
|
cont = FALSE;
|
|
|
|
|
|
|
|
if (state == NOT_ALLOCATED)
|
|
|
|
{
|
|
|
|
/* an unallocated item means that size allocate has to
|
|
|
|
* called at least once more
|
|
|
|
*/
|
|
|
|
cont = TRUE;
|
|
|
|
}
|
|
|
|
|
2004-01-25 14:17:15 +00:00
|
|
|
/* An invisible item with a goal allocation of
|
|
|
|
* 0 is already at its goal.
|
|
|
|
*/
|
|
|
|
if ((state == NORMAL || state == OVERFLOWN) &&
|
|
|
|
((goal_allocation.width != 0 &&
|
|
|
|
goal_allocation.height != 0) ||
|
|
|
|
toolbar_content_child_visible (content)))
|
2004-01-24 22:29:18 +00:00
|
|
|
{
|
|
|
|
if ((goal_allocation.x != allocation.x ||
|
|
|
|
goal_allocation.y != allocation.y ||
|
|
|
|
goal_allocation.width != allocation.width ||
|
|
|
|
goal_allocation.height != allocation.height))
|
|
|
|
{
|
2004-01-27 01:11:18 +00:00
|
|
|
/* An item is not in its right position yet. Note
|
|
|
|
* that OVERFLOWN items do get an allocation in
|
2004-01-24 22:29:18 +00:00
|
|
|
* gtk_toolbar_size_allocate(). This way you can see
|
2004-01-27 01:11:18 +00:00
|
|
|
* them slide back in when you drag an item off the
|
|
|
|
* toolbar.
|
2004-01-24 22:29:18 +00:00
|
|
|
*/
|
|
|
|
cont = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-01-27 01:11:18 +00:00
|
|
|
if (toolbar_content_is_placeholder (content) &&
|
|
|
|
toolbar_content_disappearing (content) &&
|
|
|
|
toolbar_content_child_visible (content))
|
|
|
|
{
|
|
|
|
/* A disappearing placeholder is still visible.
|
|
|
|
*/
|
|
|
|
|
|
|
|
cont = TRUE;
|
|
|
|
}
|
|
|
|
|
2004-01-24 22:29:18 +00:00
|
|
|
if (cont)
|
2003-11-24 01:01:43 +00:00
|
|
|
{
|
|
|
|
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-12-29 11:35:43 +00:00
|
|
|
GDK_THREADS_LEAVE ();
|
2003-11-24 01:01:43 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
priv->is_sliding = FALSE;
|
|
|
|
priv->idle_id = 0;
|
2004-01-25 14:17:15 +00:00
|
|
|
|
2003-12-29 11:35:43 +00:00
|
|
|
GDK_THREADS_LEAVE();
|
2003-11-24 01:01:43 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2004-01-27 01:11:18 +00:00
|
|
|
rect_within (GtkAllocation *a1,
|
|
|
|
GtkAllocation *a2)
|
2003-11-24 01:01:43 +00:00
|
|
|
{
|
|
|
|
return (a1->x >= a2->x &&
|
|
|
|
a1->x + a1->width <= a2->x + a2->width &&
|
|
|
|
a1->y >= a2->y &&
|
|
|
|
a1->y + a1->height <= a2->y + a2->height);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_toolbar_begin_sliding (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkWidget *widget = GTK_WIDGET (toolbar);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *list;
|
|
|
|
gint cur_x;
|
|
|
|
gint cur_y;
|
|
|
|
gint border_width;
|
|
|
|
gboolean rtl;
|
|
|
|
gboolean vertical;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
/* Start the sliding. This function copies the allocation of every
|
|
|
|
* item into content->start_allocation. For items that haven't
|
|
|
|
* been allocated yet, we calculate their position and save that
|
|
|
|
* in start_allocatino along with zero width and zero height.
|
|
|
|
*/
|
|
|
|
priv->is_sliding = TRUE;
|
|
|
|
|
|
|
|
if (!priv->idle_id)
|
|
|
|
priv->idle_id = g_idle_add (slide_idle_handler, toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
|
|
|
|
vertical = (toolbar->orientation == GTK_ORIENTATION_VERTICAL);
|
|
|
|
border_width = get_internal_padding (toolbar) + GTK_CONTAINER (toolbar)->border_width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (rtl)
|
|
|
|
{
|
|
|
|
cur_x = widget->allocation.width - border_width - widget->style->xthickness;
|
|
|
|
cur_y = widget->allocation.height - border_width - widget->style->ythickness;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cur_x = border_width + widget->style->xthickness;
|
|
|
|
cur_y = border_width + widget->style->ythickness;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
cur_x += widget->allocation.x;
|
|
|
|
cur_y += widget->allocation.y;
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkAllocation new_start_allocation;
|
|
|
|
GtkAllocation item_allocation;
|
2004-01-27 01:11:18 +00:00
|
|
|
ItemState state;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
state = toolbar_content_get_state (content);
|
|
|
|
toolbar_content_get_allocation (content, &item_allocation);
|
|
|
|
|
2004-01-24 22:29:18 +00:00
|
|
|
if ((state == NORMAL &&
|
|
|
|
rect_within (&item_allocation, &(widget->allocation))) ||
|
|
|
|
state == OVERFLOWN)
|
2003-11-24 01:01:43 +00:00
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
new_start_allocation = item_allocation;
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
new_start_allocation.x = cur_x;
|
|
|
|
new_start_allocation.y = cur_y;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (vertical)
|
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
new_start_allocation.width = widget->allocation.width -
|
2003-11-24 01:01:43 +00:00
|
|
|
2 * border_width - 2 * widget->style->xthickness;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
new_start_allocation.height = 0;
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
new_start_allocation.width = 0;
|
|
|
|
new_start_allocation.height = widget->allocation.height -
|
2003-11-24 01:01:43 +00:00
|
|
|
2 * border_width - 2 * widget->style->ythickness;
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (vertical)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
cur_y = new_start_allocation.y + new_start_allocation.height;
|
2003-11-24 01:01:43 +00:00
|
|
|
else if (rtl)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
cur_x = new_start_allocation.x;
|
2003-11-24 01:01:43 +00:00
|
|
|
else
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
cur_x = new_start_allocation.x + new_start_allocation.width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_set_start_allocation (content, &new_start_allocation);
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
2004-01-25 14:17:15 +00:00
|
|
|
|
|
|
|
/* This resize will run before the first idle handler. This
|
|
|
|
* will make sure that items get the right goal allocatiuon
|
|
|
|
* so that the idle handler will not immediately return
|
|
|
|
* FALSE
|
|
|
|
*/
|
|
|
|
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar));
|
2003-11-24 01:01:43 +00:00
|
|
|
g_timer_reset (priv->timer);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_toolbar_stop_sliding (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (priv->is_sliding)
|
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
priv->is_sliding = FALSE;
|
|
|
|
|
|
|
|
if (priv->idle_id)
|
|
|
|
{
|
|
|
|
g_source_remove (priv->idle_id);
|
|
|
|
priv->idle_id = 0;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
list = priv->content;
|
|
|
|
while (list)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
list = list->next;
|
2004-01-25 14:17:15 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_is_placeholder (content))
|
2004-01-18 12:28:38 +00:00
|
|
|
{
|
|
|
|
toolbar_content_remove (content, toolbar);
|
|
|
|
toolbar_content_free (content);
|
|
|
|
}
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
static void
|
1998-01-13 07:00:52 +00:00
|
|
|
gtk_toolbar_size_allocate (GtkWidget *widget,
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GtkAllocation *allocations;
|
2003-11-19 19:44:45 +00:00
|
|
|
ItemState *new_states;
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkAllocation arrow_allocation;
|
|
|
|
gint arrow_size;
|
|
|
|
gint size, pos, short_size;
|
|
|
|
GList *list;
|
|
|
|
gint i;
|
|
|
|
gboolean need_arrow;
|
|
|
|
gint n_expand_items;
|
|
|
|
gint border_width;
|
|
|
|
gint available_size;
|
|
|
|
gint n_items;
|
|
|
|
gint needed_size;
|
|
|
|
GtkRequisition arrow_requisition;
|
2003-10-25 19:58:51 +00:00
|
|
|
gboolean overflowing;
|
2003-11-24 01:01:43 +00:00
|
|
|
gboolean size_changed;
|
|
|
|
gdouble elapsed;
|
2004-01-25 14:17:15 +00:00
|
|
|
GtkAllocation item_area;
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
size_changed = FALSE;
|
|
|
|
if (widget->allocation.x != allocation->x ||
|
|
|
|
widget->allocation.y != allocation->y ||
|
|
|
|
widget->allocation.width != allocation->width ||
|
|
|
|
widget->allocation.height != allocation->height)
|
|
|
|
{
|
|
|
|
size_changed = TRUE;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (size_changed)
|
|
|
|
gtk_toolbar_stop_sliding (toolbar);
|
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
widget->allocation = *allocation;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
border_width = GTK_CONTAINER (toolbar)->border_width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (GTK_WIDGET_REALIZED (widget))
|
|
|
|
{
|
|
|
|
gdk_window_move_resize (priv->event_window,
|
|
|
|
allocation->x + border_width,
|
|
|
|
allocation->y + border_width,
|
|
|
|
allocation->width - border_width * 2,
|
|
|
|
allocation->height - border_width * 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
border_width += get_internal_padding (toolbar);
|
2001-06-04 23:15:51 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_widget_get_child_requisition (GTK_WIDGET (priv->arrow_button),
|
|
|
|
&arrow_requisition);
|
2001-06-04 23:15:51 +00:00
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
available_size = size = allocation->width - 2 * border_width;
|
|
|
|
short_size = allocation->height - 2 * border_width;
|
|
|
|
arrow_size = arrow_requisition.width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-18 16:25:31 +00:00
|
|
|
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
|
|
|
|
{
|
|
|
|
available_size -= 2 * widget->style->xthickness;
|
|
|
|
short_size -= 2 * widget->style->ythickness;
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
1998-01-13 07:00:52 +00:00
|
|
|
else
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
available_size = size = allocation->height - 2 * border_width;
|
|
|
|
short_size = allocation->width - 2 * border_width;
|
|
|
|
arrow_size = arrow_requisition.height;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-18 16:25:31 +00:00
|
|
|
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
|
|
|
|
{
|
|
|
|
available_size -= 2 * widget->style->ythickness;
|
|
|
|
short_size -= 2 * widget->style->xthickness;
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
n_items = g_list_length (priv->content);
|
2003-06-29 23:34:20 +00:00
|
|
|
allocations = g_new0 (GtkAllocation, n_items);
|
2003-11-19 19:44:45 +00:00
|
|
|
new_states = g_new0 (ItemState, n_items);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
needed_size = 0;
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_visible (content, toolbar))
|
2003-11-30 16:37:38 +00:00
|
|
|
needed_size += get_item_size (toolbar, content);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-31 20:49:48 +00:00
|
|
|
need_arrow = (needed_size > available_size) && priv->show_arrow && priv->api_mode == NEW_API;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (need_arrow)
|
|
|
|
size = available_size - arrow_size;
|
|
|
|
else
|
|
|
|
size = available_size;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
/* calculate widths of items */
|
2003-10-25 19:58:51 +00:00
|
|
|
overflowing = FALSE;
|
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2003-06-29 23:34:20 +00:00
|
|
|
gint item_size;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!toolbar_content_visible (content, toolbar))
|
2003-11-19 19:44:45 +00:00
|
|
|
{
|
|
|
|
new_states[i] = HIDDEN;
|
|
|
|
continue;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-30 16:37:38 +00:00
|
|
|
item_size = get_item_size (toolbar, content);
|
2003-10-25 19:58:51 +00:00
|
|
|
if (item_size <= size && !overflowing)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
size -= item_size;
|
|
|
|
allocations[i].width = item_size;
|
2003-11-19 19:44:45 +00:00
|
|
|
new_states[i] = NORMAL;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-10-25 19:58:51 +00:00
|
|
|
overflowing = TRUE;
|
2003-11-19 19:44:45 +00:00
|
|
|
new_states[i] = OVERFLOWN;
|
2004-01-24 22:29:18 +00:00
|
|
|
allocations[i].width = item_size;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
/* calculate width of arrow */
|
2003-06-29 23:34:20 +00:00
|
|
|
if (need_arrow)
|
|
|
|
{
|
|
|
|
arrow_allocation.width = arrow_size;
|
|
|
|
arrow_allocation.height = short_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* expand expandable items */
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:23:04 +00:00
|
|
|
/* We don't expand when there is an overflow menu, because that leads to
|
|
|
|
* weird jumps when items get moved to the overflow menu and the expanding
|
|
|
|
* items suddenly get a lot of extra space
|
2003-10-20 18:56:05 +00:00
|
|
|
*/
|
2003-11-24 01:23:04 +00:00
|
|
|
if (!overflowing)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
n_expand_items = 0;
|
2003-11-19 19:44:45 +00:00
|
|
|
for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_get_expand (content) && new_states[i] == NORMAL)
|
2003-11-19 19:44:45 +00:00
|
|
|
n_expand_items++;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_get_expand (content) && new_states[i] == NORMAL)
|
2003-10-20 18:56:05 +00:00
|
|
|
{
|
|
|
|
gint extra = size / n_expand_items;
|
|
|
|
if (size % n_expand_items != 0)
|
|
|
|
extra++;
|
|
|
|
|
|
|
|
allocations[i].width += extra;
|
|
|
|
size -= extra;
|
|
|
|
n_expand_items--;
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2003-10-20 18:56:05 +00:00
|
|
|
|
|
|
|
g_assert (n_expand_items == 0);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
/* position items */
|
2003-06-29 23:34:20 +00:00
|
|
|
pos = border_width;
|
2003-10-25 19:58:51 +00:00
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2004-01-24 22:29:18 +00:00
|
|
|
/* both NORMAL and OVERFLOWN items get a position. This ensures
|
|
|
|
* that sliding will work for OVERFLOWN items too
|
|
|
|
*/
|
|
|
|
if (new_states[i] == NORMAL ||
|
|
|
|
new_states[i] == OVERFLOWN)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
allocations[i].x = pos;
|
|
|
|
allocations[i].y = border_width;
|
|
|
|
allocations[i].height = short_size;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
pos += allocations[i].width;
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* position arrow */
|
|
|
|
if (need_arrow)
|
|
|
|
{
|
2003-10-25 19:58:51 +00:00
|
|
|
arrow_allocation.x = available_size - border_width - arrow_allocation.width;
|
2003-06-29 23:34:20 +00:00
|
|
|
arrow_allocation.y = border_width;
|
|
|
|
}
|
|
|
|
|
2004-02-01 15:18:32 +00:00
|
|
|
item_area.x = border_width;
|
|
|
|
item_area.y = border_width;
|
2004-01-25 14:17:15 +00:00
|
|
|
item_area.width = available_size - (need_arrow? arrow_size : 0);
|
|
|
|
item_area.height = short_size;
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* fix up allocations in the vertical or RTL cases */
|
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_VERTICAL)
|
|
|
|
{
|
|
|
|
for (i = 0; i < n_items; ++i)
|
|
|
|
fixup_allocation_for_vertical (&(allocations[i]));
|
|
|
|
|
|
|
|
if (need_arrow)
|
|
|
|
fixup_allocation_for_vertical (&arrow_allocation);
|
2004-01-25 14:17:15 +00:00
|
|
|
|
|
|
|
fixup_allocation_for_vertical (&item_area);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
else if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_RTL)
|
|
|
|
{
|
|
|
|
for (i = 0; i < n_items; ++i)
|
|
|
|
fixup_allocation_for_rtl (available_size, &(allocations[i]));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (need_arrow)
|
|
|
|
fixup_allocation_for_rtl (available_size, &arrow_allocation);
|
2004-01-25 14:17:15 +00:00
|
|
|
|
2004-02-12 14:49:37 +00:00
|
|
|
fixup_allocation_for_rtl (available_size, &item_area);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* translate the items by allocation->(x,y) */
|
|
|
|
for (i = 0; i < n_items; ++i)
|
|
|
|
{
|
|
|
|
allocations[i].x += allocation->x;
|
|
|
|
allocations[i].y += allocation->y;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-18 16:25:31 +00:00
|
|
|
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
|
|
|
|
{
|
|
|
|
allocations[i].x += widget->style->xthickness;
|
|
|
|
allocations[i].y += widget->style->ythickness;
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (need_arrow)
|
|
|
|
{
|
|
|
|
arrow_allocation.x += allocation->x;
|
|
|
|
arrow_allocation.y += allocation->y;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-18 16:25:31 +00:00
|
|
|
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
|
|
|
|
{
|
|
|
|
arrow_allocation.x += widget->style->xthickness;
|
|
|
|
arrow_allocation.y += widget->style->ythickness;
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-25 14:17:15 +00:00
|
|
|
|
|
|
|
item_area.x += allocation->x;
|
|
|
|
item_area.y += allocation->y;
|
|
|
|
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
|
|
|
|
{
|
|
|
|
item_area.x += widget->style->xthickness;
|
|
|
|
item_area.y += widget->style->ythickness;
|
|
|
|
}
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
/* did anything change? */
|
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, i++)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_get_state (content) == NORMAL &&
|
|
|
|
new_states[i] != NORMAL)
|
2003-11-24 01:01:43 +00:00
|
|
|
{
|
|
|
|
/* an item disappeared, begin sliding */
|
2004-02-01 15:36:22 +00:00
|
|
|
if (!size_changed && priv->api_mode == NEW_API)
|
2003-11-24 01:01:43 +00:00
|
|
|
gtk_toolbar_begin_sliding (toolbar);
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* finally allocate the items */
|
2004-01-17 21:03:31 +00:00
|
|
|
if (priv->is_sliding)
|
2003-11-24 01:01:43 +00:00
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, i++)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
toolbar_content_set_goal_allocation (content, &(allocations[i]));
|
|
|
|
}
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
elapsed = g_timer_elapsed (priv->timer, NULL);
|
2003-11-24 01:01:43 +00:00
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-25 14:17:15 +00:00
|
|
|
if (new_states[i] == OVERFLOWN ||
|
|
|
|
new_states[i] == NORMAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-11-24 01:01:43 +00:00
|
|
|
GtkAllocation alloc;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkAllocation start_allocation;
|
|
|
|
GtkAllocation goal_allocation;
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (priv->is_sliding)
|
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_get_start_allocation (content, &start_allocation);
|
|
|
|
toolbar_content_get_goal_allocation (content, &goal_allocation);
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
compute_intermediate_allocation (toolbar,
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
&start_allocation,
|
|
|
|
&goal_allocation,
|
2003-11-24 01:01:43 +00:00
|
|
|
&alloc);
|
2004-01-25 14:17:15 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
priv->need_sync = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
alloc = allocations[i];
|
|
|
|
}
|
2004-01-24 22:29:18 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
if (alloc.width == 0 || alloc.height == 0)
|
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_content_set_child_visible (content, toolbar, FALSE);
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-01-25 14:17:15 +00:00
|
|
|
if (!rect_within (&alloc, &item_area))
|
|
|
|
{
|
|
|
|
toolbar_content_set_child_visible (content, toolbar, FALSE);
|
|
|
|
toolbar_content_size_allocate (content, &alloc);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
toolbar_content_set_child_visible (content, toolbar, TRUE);
|
|
|
|
toolbar_content_size_allocate (content, &alloc);
|
|
|
|
}
|
2003-11-24 01:01:43 +00:00
|
|
|
}
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
2004-01-25 14:17:15 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
toolbar_content_set_child_visible (content, toolbar, FALSE);
|
|
|
|
}
|
2004-01-24 22:29:18 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_set_state (content, new_states[i]);
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (need_arrow)
|
|
|
|
{
|
|
|
|
gtk_widget_size_allocate (GTK_WIDGET (priv->arrow_button),
|
|
|
|
&arrow_allocation);
|
|
|
|
gtk_widget_show (GTK_WIDGET (priv->arrow_button));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gtk_widget_hide (GTK_WIDGET (priv->arrow_button));
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (allocations);
|
2003-11-19 19:44:45 +00:00
|
|
|
g_free (new_states);
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_update_button_relief (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
gtk_toolbar_reconfigured (toolbar);
|
|
|
|
|
|
|
|
gtk_button_set_relief (GTK_BUTTON (priv->arrow_button), get_button_relief (toolbar));
|
|
|
|
}
|
|
|
|
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
static void
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_style_set (GtkWidget *widget,
|
|
|
|
GtkStyle *prev_style)
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
{
|
2003-10-31 02:10:03 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
priv->max_homogeneous_pixels = -1;
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (GTK_WIDGET_REALIZED (widget))
|
|
|
|
gtk_style_set_background (widget->style, widget->window, widget->state);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
if (prev_style)
|
|
|
|
gtk_toolbar_update_button_relief (GTK_TOOLBAR (widget));
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static GList *
|
|
|
|
gtk_toolbar_list_children_in_focus_order (GtkToolbar *toolbar,
|
|
|
|
GtkDirectionType dir)
|
2001-06-04 23:15:51 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *result = NULL;
|
|
|
|
GList *list;
|
2003-07-02 14:04:43 +00:00
|
|
|
gboolean rtl;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-02 14:04:43 +00:00
|
|
|
/* generate list of children in reverse logical order */
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkWidget *widget;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
widget = toolbar_content_get_widget (content);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (widget)
|
|
|
|
result = g_list_prepend (result, widget);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-04 22:58:14 +00:00
|
|
|
result = g_list_prepend (result, priv->arrow_button);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-02 14:04:43 +00:00
|
|
|
rtl = (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_RTL);
|
|
|
|
|
|
|
|
/* move in logical order when
|
|
|
|
*
|
|
|
|
* - dir is TAB_FORWARD
|
|
|
|
*
|
|
|
|
* - in RTL mode and moving left or up
|
|
|
|
*
|
|
|
|
* - in LTR mode and moving right or down
|
|
|
|
*/
|
|
|
|
if (dir == GTK_DIR_TAB_FORWARD ||
|
|
|
|
(rtl && (dir == GTK_DIR_UP || dir == GTK_DIR_LEFT)) ||
|
|
|
|
(!rtl && (dir == GTK_DIR_DOWN || dir == GTK_DIR_RIGHT)))
|
|
|
|
{
|
|
|
|
result = g_list_reverse (result);
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return result;
|
1998-01-13 06:14:52 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static gboolean
|
2003-07-02 14:04:43 +00:00
|
|
|
gtk_toolbar_focus_home_or_end (GtkToolbar *toolbar,
|
|
|
|
gboolean focus_home)
|
1998-01-13 06:14:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GList *children, *list;
|
2003-07-02 14:04:43 +00:00
|
|
|
GtkDirectionType dir = focus_home? GTK_DIR_RIGHT : GTK_DIR_LEFT;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
children = gtk_toolbar_list_children_in_focus_order (toolbar, dir);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_RTL)
|
|
|
|
{
|
|
|
|
children = g_list_reverse (children);
|
2003-07-02 14:04:43 +00:00
|
|
|
|
|
|
|
dir = (dir == GTK_DIR_RIGHT)? GTK_DIR_LEFT : GTK_DIR_RIGHT;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
for (list = children; list != NULL; list = list->next)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *child = list->data;
|
|
|
|
|
|
|
|
if (GTK_CONTAINER (toolbar)->focus_child == child)
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
|
|
|
|
break;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_list_free (children);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
1998-01-13 06:14:52 +00:00
|
|
|
|
2003-07-02 14:04:43 +00:00
|
|
|
/* Keybinding handler. This function is called when the user presses
|
|
|
|
* Ctrl TAB or an arrow key.
|
|
|
|
*/
|
2003-06-29 23:34:20 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_move_focus (GtkToolbar *toolbar,
|
|
|
|
GtkDirectionType dir)
|
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
gboolean try_focus = FALSE;
|
2003-07-02 14:04:43 +00:00
|
|
|
GList *children;
|
|
|
|
GtkContainer *container = GTK_CONTAINER (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-02 14:04:43 +00:00
|
|
|
if (container->focus_child &&
|
|
|
|
gtk_widget_child_focus (container->focus_child, dir))
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
children = gtk_toolbar_list_children_in_focus_order (toolbar, dir);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
for (list = children; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
GtkWidget *child = list->data;
|
|
|
|
|
|
|
|
if (try_focus && GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (child == GTK_CONTAINER (toolbar)->focus_child)
|
|
|
|
try_focus = TRUE;
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_list_free (children);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-08-29 18:28:23 +00:00
|
|
|
return FALSE;
|
1997-12-19 21:14:44 +00:00
|
|
|
}
|
1997-12-22 20:43:55 +00:00
|
|
|
|
2003-07-02 14:04:43 +00:00
|
|
|
/* The focus handler for the toolbar. It called when the user presses
|
|
|
|
* TAB or otherwise tries to focus the toolbar.
|
2003-06-29 23:34:20 +00:00
|
|
|
*/
|
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_focus (GtkWidget *widget,
|
|
|
|
GtkDirectionType dir)
|
1997-12-23 00:35:48 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
GList *children, *list;
|
2004-04-19 19:52:45 +00:00
|
|
|
gboolean result = FALSE;
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* if focus is already somewhere inside the toolbar then return FALSE.
|
|
|
|
* The only way focus can stay inside the toolbar is when the user presses
|
|
|
|
* arrow keys or Ctrl TAB (both of which are handled by the
|
|
|
|
* gtk_toolbar_move_focus() keybinding function.
|
|
|
|
*/
|
|
|
|
if (GTK_CONTAINER (widget)->focus_child)
|
|
|
|
return FALSE;
|
2004-04-19 19:52:45 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
children = gtk_toolbar_list_children_in_focus_order (toolbar, dir);
|
2004-04-19 19:52:45 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
for (list = children; list != NULL; list = list->next)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *child = list->data;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
|
2004-04-19 19:52:45 +00:00
|
|
|
{
|
|
|
|
result = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
2004-04-19 19:52:45 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_list_free (children);
|
2004-04-19 19:52:45 +00:00
|
|
|
|
|
|
|
return result;
|
1997-12-22 20:43:55 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
style_change_notify (GtkToolbar *toolbar)
|
1997-12-22 20:43:55 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!toolbar->style_set)
|
|
|
|
{
|
|
|
|
/* pretend it was set, then unset, thus reverting to new default */
|
|
|
|
toolbar->style_set = TRUE;
|
|
|
|
gtk_toolbar_unset_style (toolbar);
|
|
|
|
}
|
1998-01-13 07:00:52 +00:00
|
|
|
}
|
1997-12-22 20:43:55 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
icon_size_change_notify (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
if (!toolbar->icon_size_set)
|
|
|
|
{
|
|
|
|
/* pretend it was set, then unset, thus reverting to new default */
|
|
|
|
toolbar->icon_size_set = TRUE;
|
|
|
|
gtk_toolbar_unset_icon_size (toolbar);
|
|
|
|
}
|
2001-03-22 06:45:57 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
static GtkSettings *
|
|
|
|
toolbar_get_settings (GtkToolbar *toolbar)
|
1998-01-13 07:00:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
return priv->settings;
|
1997-12-22 20:43:55 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_screen_changed (GtkWidget *widget,
|
|
|
|
GdkScreen *previous_screen)
|
2001-03-15 09:09:06 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
GtkSettings *old_settings = toolbar_get_settings (toolbar);
|
|
|
|
GtkSettings *settings;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (gtk_widget_has_screen (GTK_WIDGET (toolbar)))
|
|
|
|
settings = gtk_widget_get_settings (GTK_WIDGET (toolbar));
|
|
|
|
else
|
|
|
|
settings = NULL;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (settings == old_settings)
|
2001-03-15 09:09:06 +00:00
|
|
|
return;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (old_settings)
|
2001-03-15 09:09:06 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
g_signal_handler_disconnect (old_settings, toolbar->style_set_connection);
|
|
|
|
g_signal_handler_disconnect (old_settings, toolbar->icon_size_connection);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_object_unref (old_settings);
|
2001-03-15 09:09:06 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (settings)
|
|
|
|
{
|
|
|
|
toolbar->style_set_connection =
|
|
|
|
g_signal_connect_swapped (settings,
|
|
|
|
"notify::gtk-toolbar-style",
|
|
|
|
G_CALLBACK (style_change_notify),
|
|
|
|
toolbar);
|
|
|
|
toolbar->icon_size_connection =
|
|
|
|
g_signal_connect_swapped (settings,
|
|
|
|
"notify::gtk-toolbar-icon-size",
|
|
|
|
G_CALLBACK (icon_size_change_notify),
|
|
|
|
toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_object_ref (settings);
|
|
|
|
priv->settings = settings;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
priv->settings = NULL;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
style_change_notify (toolbar);
|
|
|
|
icon_size_change_notify (toolbar);
|
2001-06-24 15:34:48 +00:00
|
|
|
}
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
static int
|
|
|
|
find_drop_index (GtkToolbar *toolbar,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
2001-06-04 23:15:51 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2003-10-20 18:56:05 +00:00
|
|
|
GList *interesting_content;
|
|
|
|
GList *list;
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkOrientation orientation;
|
|
|
|
GtkTextDirection direction;
|
2003-10-20 18:56:05 +00:00
|
|
|
gint best_distance = G_MAXINT;
|
|
|
|
gint distance;
|
|
|
|
gint cursor;
|
|
|
|
gint pos;
|
|
|
|
ToolbarContent *best_content;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkAllocation allocation;
|
2003-10-20 18:56:05 +00:00
|
|
|
|
|
|
|
/* list items we care about wrt. drag and drop */
|
|
|
|
interesting_content = NULL;
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_get_state (content) == NORMAL)
|
2003-10-25 19:58:51 +00:00
|
|
|
interesting_content = g_list_prepend (interesting_content, content);
|
2003-10-20 18:56:05 +00:00
|
|
|
}
|
|
|
|
interesting_content = g_list_reverse (interesting_content);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
if (!interesting_content)
|
|
|
|
return 0;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
orientation = toolbar->orientation;
|
|
|
|
direction = gtk_widget_get_direction (GTK_WIDGET (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
/* distance to first interesting item */
|
|
|
|
best_content = interesting_content->data;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_get_allocation (best_content, &allocation);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
cursor = x;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
if (direction == GTK_TEXT_DIR_LTR)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
pos = allocation.x;
|
2003-10-20 18:56:05 +00:00
|
|
|
else
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
pos = allocation.x + allocation.width;
|
2003-10-20 18:56:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cursor = y;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
pos = allocation.y;
|
2003-10-20 18:56:05 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
best_content = NULL;
|
|
|
|
best_distance = ABS (pos - cursor);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
/* distance to far end of each item */
|
|
|
|
for (list = interesting_content; list != NULL; list = list->next)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_get_allocation (content, &allocation);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
if (direction == GTK_TEXT_DIR_LTR)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
pos = allocation.x + allocation.width;
|
2003-06-29 23:34:20 +00:00
|
|
|
else
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
pos = allocation.x;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2002-10-22 20:00:31 +00:00
|
|
|
else
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
pos = allocation.y + allocation.height;
|
2003-10-20 18:56:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
distance = ABS (pos - cursor);
|
|
|
|
|
|
|
|
if (distance < best_distance)
|
|
|
|
{
|
|
|
|
best_distance = distance;
|
|
|
|
best_content = content;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2001-06-04 23:15:51 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
g_list_free (interesting_content);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
if (!best_content)
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
return g_list_index (priv->content, best_content) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
reset_all_placeholders (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *list;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
2001-03-15 09:09:06 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (toolbar_content_is_placeholder (content))
|
|
|
|
toolbar_content_set_disappearing (content, TRUE);
|
2001-03-15 09:09:06 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2002-10-25 21:36:55 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
static gint
|
2004-01-18 12:28:38 +00:00
|
|
|
physical_to_logical (GtkToolbar *toolbar,
|
|
|
|
gint physical)
|
2003-10-25 19:58:51 +00:00
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *list;
|
|
|
|
int logical;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
g_assert (physical >= 0);
|
|
|
|
|
|
|
|
logical = 0;
|
|
|
|
for (list = priv->content; list && physical > 0; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!toolbar_content_is_placeholder (content))
|
2003-10-25 19:58:51 +00:00
|
|
|
logical++;
|
|
|
|
physical--;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
g_assert (physical == 0);
|
|
|
|
|
|
|
|
return logical;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2004-01-18 12:28:38 +00:00
|
|
|
logical_to_physical (GtkToolbar *toolbar,
|
|
|
|
gint logical)
|
2003-10-25 19:58:51 +00:00
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *list;
|
|
|
|
gint physical;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
g_assert (logical >= 0);
|
|
|
|
|
|
|
|
physical = 0;
|
2003-10-30 17:08:49 +00:00
|
|
|
for (list = priv->content; list; list = list->next)
|
2003-10-25 19:58:51 +00:00
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!toolbar_content_is_placeholder (content))
|
2003-10-30 17:08:49 +00:00
|
|
|
{
|
|
|
|
if (logical == 0)
|
|
|
|
break;
|
|
|
|
logical--;
|
|
|
|
}
|
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
physical++;
|
2003-10-30 15:30:24 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
g_assert (logical == 0);
|
2003-10-30 17:08:49 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
return physical;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2003-10-29 01:58:38 +00:00
|
|
|
* gtk_toolbar_set_drop_highlight_item:
|
2003-10-25 19:58:51 +00:00
|
|
|
* @toolbar: a #GtkToolbar
|
2004-01-22 23:47:42 +00:00
|
|
|
* @tool_item: a #GtkToolItem, or %NULL to turn of highlighting
|
2003-10-29 01:58:38 +00:00
|
|
|
* @index: a position on @toolbar
|
2003-10-25 19:58:51 +00:00
|
|
|
*
|
2003-10-29 01:58:38 +00:00
|
|
|
* Highlights @toolbar to give an idea of what it would look like
|
|
|
|
* if @item was added to @toolbar at position indicated by @index. If @item
|
|
|
|
* is %NULL, highlighting is turned off. In that case @index is ignored.
|
|
|
|
*
|
|
|
|
* The @tool_item passed to this function must not be part of any widget
|
|
|
|
* hierarchy. When an item is set as drop highlight item it can not
|
|
|
|
* added to any widget hierarchy or used as highlight item for another
|
|
|
|
* toolbar.
|
2003-10-25 19:58:51 +00:00
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-10-20 18:56:05 +00:00
|
|
|
void
|
2003-10-29 01:58:38 +00:00
|
|
|
gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *tool_item,
|
|
|
|
gint index)
|
2003-10-20 18:56:05 +00:00
|
|
|
{
|
|
|
|
ToolbarContent *content;
|
2003-10-25 19:58:51 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
|
|
|
gint n_items;
|
|
|
|
GtkRequisition requisition;
|
2004-01-27 01:11:18 +00:00
|
|
|
GtkRequisition old_requisition;
|
|
|
|
gboolean restart_sliding;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2003-10-29 01:58:38 +00:00
|
|
|
g_return_if_fail (tool_item == NULL || GTK_IS_TOOL_ITEM (tool_item));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
gtk_toolbar_check_new_api (toolbar);
|
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-29 01:58:38 +00:00
|
|
|
if (!tool_item)
|
|
|
|
{
|
2003-11-24 01:38:52 +00:00
|
|
|
if (priv->highlight_tool_item)
|
2003-10-29 01:58:38 +00:00
|
|
|
{
|
2003-11-24 01:38:52 +00:00
|
|
|
gtk_widget_unparent (GTK_WIDGET (priv->highlight_tool_item));
|
|
|
|
g_object_unref (priv->highlight_tool_item);
|
|
|
|
priv->highlight_tool_item = NULL;
|
2003-10-29 01:58:38 +00:00
|
|
|
}
|
|
|
|
|
2003-11-24 01:38:52 +00:00
|
|
|
reset_all_placeholders (toolbar);
|
|
|
|
gtk_toolbar_begin_sliding (toolbar);
|
2003-10-29 01:58:38 +00:00
|
|
|
return;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-27 01:11:18 +00:00
|
|
|
n_items = gtk_toolbar_get_n_items (toolbar);
|
|
|
|
if (index < 0 || index > n_items)
|
|
|
|
index = n_items;
|
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
if (tool_item != priv->highlight_tool_item)
|
|
|
|
{
|
|
|
|
if (priv->highlight_tool_item)
|
|
|
|
g_object_unref (priv->highlight_tool_item);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-29 01:58:38 +00:00
|
|
|
g_object_ref (tool_item);
|
|
|
|
gtk_object_sink (GTK_OBJECT (tool_item));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
priv->highlight_tool_item = tool_item;
|
|
|
|
|
|
|
|
gtk_widget_set_parent (GTK_WIDGET (priv->highlight_tool_item),
|
|
|
|
GTK_WIDGET (toolbar));
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
index = logical_to_physical (toolbar, index);
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
content = g_list_nth_data (priv->content, index);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
if (index > 0)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *prev_content;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
prev_content = g_list_nth_data (priv->content, index - 1);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (prev_content && toolbar_content_is_placeholder (prev_content))
|
2003-10-20 18:56:05 +00:00
|
|
|
content = prev_content;
|
|
|
|
}
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!content || !toolbar_content_is_placeholder (content))
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-31 02:10:03 +00:00
|
|
|
GtkWidget *placeholder;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
placeholder = GTK_WIDGET (gtk_separator_tool_item_new ());
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
content = toolbar_content_new_tool_item (toolbar,
|
|
|
|
GTK_TOOL_ITEM (placeholder),
|
|
|
|
TRUE, index);
|
2003-11-24 01:01:43 +00:00
|
|
|
gtk_widget_show (placeholder);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
g_assert (content);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert (toolbar_content_is_placeholder (content));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
gtk_widget_size_request (GTK_WIDGET (priv->highlight_tool_item),
|
|
|
|
&requisition);
|
2004-01-27 01:11:18 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-27 01:11:18 +00:00
|
|
|
restart_sliding = FALSE;
|
|
|
|
toolbar_content_size_request (content, toolbar, &old_requisition);
|
2003-11-24 01:01:43 +00:00
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2004-01-27 01:11:18 +00:00
|
|
|
{
|
|
|
|
requisition.height = -1;
|
|
|
|
if (requisition.width != old_requisition.width)
|
|
|
|
restart_sliding = TRUE;
|
|
|
|
}
|
2003-11-24 01:01:43 +00:00
|
|
|
else
|
2004-01-27 01:11:18 +00:00
|
|
|
{
|
|
|
|
requisition.width = -1;
|
|
|
|
if (requisition.height != old_requisition.height)
|
|
|
|
restart_sliding = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (toolbar_content_disappearing (content))
|
|
|
|
restart_sliding = TRUE;
|
|
|
|
|
|
|
|
reset_all_placeholders (toolbar);
|
|
|
|
toolbar_content_set_disappearing (content, FALSE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
toolbar_content_set_size_request (content,
|
|
|
|
requisition.width, requisition.height);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-27 01:11:18 +00:00
|
|
|
if (restart_sliding)
|
|
|
|
gtk_toolbar_begin_sliding (toolbar);
|
1997-12-22 20:43:55 +00:00
|
|
|
}
|
1997-12-23 06:11:36 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_get_child_property (GtkContainer *container,
|
|
|
|
GtkWidget *child,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
2001-06-05 20:45:33 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolItem *item = GTK_TOOL_ITEM (child);
|
2001-06-05 20:45:33 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
switch (property_id)
|
2001-06-05 20:45:33 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
case CHILD_PROP_HOMOGENEOUS:
|
2003-07-08 10:58:23 +00:00
|
|
|
g_value_set_boolean (value, gtk_tool_item_get_homogeneous (item));
|
2003-06-29 23:34:20 +00:00
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
case CHILD_PROP_EXPAND:
|
2003-07-08 10:58:23 +00:00
|
|
|
g_value_set_boolean (value, gtk_tool_item_get_expand (item));
|
2003-06-29 23:34:20 +00:00
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
default:
|
|
|
|
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
|
|
|
break;
|
2001-06-05 20:45:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_set_child_property (GtkContainer *container,
|
|
|
|
GtkWidget *child,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
1998-01-13 06:14:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
switch (property_id)
|
|
|
|
{
|
|
|
|
case CHILD_PROP_HOMOGENEOUS:
|
|
|
|
gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (child), g_value_get_boolean (value));
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
case CHILD_PROP_EXPAND:
|
2004-02-16 19:16:03 +00:00
|
|
|
gtk_tool_item_set_expand (GTK_TOOL_ITEM (child), g_value_get_boolean (value));
|
2003-06-29 23:34:20 +00:00
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
default:
|
|
|
|
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
1998-01-13 06:14:52 +00:00
|
|
|
}
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_show_all (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
toolbar_content_show_all (content);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_show (widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_toolbar_hide_all (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (widget);
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
toolbar_content_hide_all (content);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_hide (widget);
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_add (GtkContainer *container,
|
|
|
|
GtkWidget *widget)
|
1998-01-13 06:14:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (container));
|
|
|
|
g_return_if_fail (widget != NULL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar = GTK_TOOLBAR (container);
|
|
|
|
|
|
|
|
if (GTK_IS_TOOL_ITEM (widget))
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_toolbar_insert (toolbar, GTK_TOOL_ITEM (widget), -1);
|
2003-06-29 23:34:20 +00:00
|
|
|
else
|
|
|
|
gtk_toolbar_append_widget (toolbar, widget, NULL, NULL);
|
1998-01-13 06:14:52 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_remove (GtkContainer *container,
|
|
|
|
GtkWidget *widget)
|
1998-01-13 06:14:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
|
|
|
ToolbarContent *content_to_remove;
|
|
|
|
GList *list;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (container));
|
2003-07-04 16:48:40 +00:00
|
|
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar = GTK_TOOLBAR (container);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
content_to_remove = NULL;
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
GtkWidget *child;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
child = toolbar_content_get_widget (content);
|
|
|
|
if (child && child == widget)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
content_to_remove = content;
|
|
|
|
break;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
|
|
|
g_return_if_fail (content_to_remove != NULL);
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
toolbar_content_remove (content_to_remove, toolbar);
|
|
|
|
toolbar_content_free (content_to_remove);
|
1998-02-23 20:48:46 +00:00
|
|
|
}
|
1998-01-13 06:14:52 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_forall (GtkContainer *container,
|
|
|
|
gboolean include_internals,
|
|
|
|
GtkCallback callback,
|
|
|
|
gpointer callback_data)
|
1998-02-23 20:48:46 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (container);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2003-10-20 18:56:05 +00:00
|
|
|
GList *list;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_if_fail (callback != NULL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
list = priv->content;
|
|
|
|
while (list)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
GList *next = list->next;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (include_internals || !toolbar_content_is_placeholder (content))
|
|
|
|
{
|
|
|
|
GtkWidget *child = toolbar_content_get_widget (content);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (child)
|
|
|
|
(*callback) (child, callback_data);
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
list = next;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (include_internals)
|
|
|
|
(* callback) (priv->arrow_button, callback_data);
|
1998-02-23 20:48:46 +00:00
|
|
|
}
|
1998-01-13 06:14:52 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static GType
|
|
|
|
gtk_toolbar_child_type (GtkContainer *container)
|
1998-02-23 20:48:46 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
return GTK_TYPE_TOOL_ITEM;
|
1998-02-23 20:48:46 +00:00
|
|
|
}
|
1998-01-13 06:14:52 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_reconfigured (GtkToolbar *toolbar)
|
2001-03-22 06:45:57 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2003-10-20 18:56:05 +00:00
|
|
|
GList *list;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
list = priv->content;
|
|
|
|
while (list)
|
2001-03-22 06:45:57 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
GList *next = list->next;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_content_toolbar_reconfigured (content, toolbar);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
list = next;
|
2001-03-22 06:45:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-01-30 21:38:37 +00:00
|
|
|
static void
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_toolbar_orientation_changed (GtkToolbar *toolbar,
|
|
|
|
GtkOrientation orientation)
|
2003-01-30 21:38:37 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
if (toolbar->orientation != orientation)
|
2003-01-30 21:38:37 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar->orientation = orientation;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
gtk_arrow_set (GTK_ARROW (priv->arrow), GTK_ARROW_DOWN, GTK_SHADOW_NONE);
|
2004-03-12 22:51:13 +00:00
|
|
|
else
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_arrow_set (GTK_ARROW (priv->arrow), GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_reconfigured (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "orientation");
|
2003-01-30 21:38:37 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2003-01-30 21:38:37 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_real_style_changed (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarStyle style)
|
|
|
|
{
|
|
|
|
if (toolbar->style != style)
|
2003-01-30 21:38:37 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar->style = style;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_toolbar_reconfigured (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "toolbar_style");
|
2003-01-30 21:38:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
menu_position_func (GtkMenu *menu,
|
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
gboolean *push_in,
|
|
|
|
gpointer user_data)
|
1998-02-23 20:48:46 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (user_data);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GtkRequisition req;
|
|
|
|
GtkRequisition menu_req;
|
|
|
|
|
|
|
|
gdk_window_get_origin (GTK_BUTTON (priv->arrow_button)->event_window, x, y);
|
|
|
|
gtk_widget_size_request (priv->arrow_button, &req);
|
|
|
|
gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
|
|
|
|
|
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
*y += priv->arrow_button->allocation.height;
|
|
|
|
if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_LTR)
|
|
|
|
*x += priv->arrow_button->allocation.width - req.width;
|
|
|
|
else
|
|
|
|
*x += req.width - menu_req.width;
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
else
|
1998-03-14 16:09:36 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_LTR)
|
|
|
|
*x += priv->arrow_button->allocation.width;
|
|
|
|
else
|
|
|
|
*x -= menu_req.width;
|
|
|
|
*y += priv->arrow_button->allocation.height - req.height;
|
|
|
|
}
|
|
|
|
|
|
|
|
*push_in = TRUE;
|
|
|
|
}
|
1998-03-14 16:09:36 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
menu_deactivated (GtkWidget *menu,
|
|
|
|
GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->arrow_button), FALSE);
|
|
|
|
}
|
1998-03-14 16:09:36 +00:00
|
|
|
|
2004-02-06 21:18:50 +00:00
|
|
|
static void
|
|
|
|
menu_detached (GtkWidget *toolbar,
|
|
|
|
GtkMenu *menu)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
priv->menu = NULL;
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
remove_item (GtkWidget *menu_item,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gtk_container_remove (GTK_CONTAINER (menu_item->parent), menu_item);
|
|
|
|
}
|
1998-01-13 06:14:52 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
show_menu (GtkToolbar *toolbar,
|
|
|
|
GdkEventButton *event)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
if (priv->menu)
|
|
|
|
{
|
|
|
|
gtk_container_foreach (GTK_CONTAINER (priv->menu), remove_item, NULL);
|
|
|
|
gtk_widget_destroy (GTK_WIDGET (priv->menu));
|
|
|
|
}
|
2004-02-06 21:18:50 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
priv->menu = GTK_MENU (gtk_menu_new ());
|
2004-02-06 21:18:50 +00:00
|
|
|
gtk_menu_attach_to_widget (priv->menu,
|
|
|
|
GTK_WIDGET (toolbar),
|
|
|
|
menu_detached);
|
2003-06-29 23:34:20 +00:00
|
|
|
g_signal_connect (priv->menu, "deactivate", G_CALLBACK (menu_deactivated), toolbar);
|
2004-02-06 21:18:50 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content = list->data;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-25 14:17:15 +00:00
|
|
|
if (toolbar_content_get_state (content) == OVERFLOWN &&
|
|
|
|
!toolbar_content_is_placeholder (content))
|
1998-03-14 16:09:36 +00:00
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkWidget *menu_item = toolbar_content_retrieve_menu_item (content);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (menu_item)
|
|
|
|
{
|
|
|
|
g_assert (GTK_IS_MENU_ITEM (menu_item));
|
|
|
|
gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), menu_item);
|
|
|
|
}
|
1998-03-21 07:46:04 +00:00
|
|
|
}
|
1998-03-14 16:09:36 +00:00
|
|
|
}
|
2004-02-04 21:17:54 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
gtk_widget_show_all (GTK_WIDGET (priv->menu));
|
2004-02-04 21:17:54 +00:00
|
|
|
|
|
|
|
gtk_menu_popup (priv->menu, NULL, NULL,
|
2003-06-29 23:34:20 +00:00
|
|
|
menu_position_func, toolbar,
|
2004-02-04 21:17:54 +00:00
|
|
|
event? event->button : 0,
|
|
|
|
event? event->time : gtk_get_current_event_time());
|
1998-01-13 06:14:52 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_arrow_button_clicked (GtkWidget *button,
|
|
|
|
GtkToolbar *toolbar)
|
1997-12-23 06:11:36 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->arrow_button)) &&
|
|
|
|
(!priv->menu || !GTK_WIDGET_VISIBLE (GTK_WIDGET (priv->menu))))
|
|
|
|
{
|
|
|
|
/* We only get here when the button is clicked with the keybaord,
|
|
|
|
* because mouse button presses result in the menu being shown so
|
|
|
|
* that priv->menu would be non-NULL and visible.
|
|
|
|
*/
|
|
|
|
show_menu (toolbar, NULL);
|
|
|
|
gtk_menu_shell_select_first (GTK_MENU_SHELL (priv->menu), FALSE);
|
|
|
|
}
|
1997-12-23 06:11:36 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_arrow_button_press (GtkWidget *button,
|
|
|
|
GdkEventButton *event,
|
|
|
|
GtkToolbar *toolbar)
|
2001-06-24 15:34:48 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
show_menu (toolbar, event);
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return TRUE;
|
2001-06-24 15:34:48 +00:00
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_button_press (GtkWidget *toolbar,
|
|
|
|
GdkEventButton *event)
|
1997-12-23 06:11:36 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
if (event->button == 3)
|
2003-07-03 01:02:04 +00:00
|
|
|
{
|
2003-07-04 16:48:40 +00:00
|
|
|
gboolean return_value;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-03 01:02:04 +00:00
|
|
|
g_signal_emit (toolbar, toolbar_signals[POPUP_CONTEXT_MENU], 0,
|
2003-07-04 16:48:40 +00:00
|
|
|
(int)event->x_root, (int)event->y_root, event->button,
|
|
|
|
&return_value);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-04 16:48:40 +00:00
|
|
|
return return_value;
|
2003-07-03 01:02:04 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return FALSE;
|
1997-12-23 06:11:36 +00:00
|
|
|
}
|
|
|
|
|
2003-07-04 16:48:40 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_popup_menu (GtkWidget *toolbar)
|
|
|
|
{
|
|
|
|
gboolean return_value;
|
|
|
|
/* This function is the handler for the "popup menu" keybinding,
|
|
|
|
* ie., it is called when the user presses Shift F10
|
|
|
|
*/
|
|
|
|
g_signal_emit (toolbar, toolbar_signals[POPUP_CONTEXT_MENU], 0,
|
|
|
|
-1, -1, -1, &return_value);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-07-04 16:48:40 +00:00
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_new:
|
|
|
|
*
|
|
|
|
* Creates a new toolbar.
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return Value: the newly-created toolbar.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *
|
|
|
|
gtk_toolbar_new (void)
|
|
|
|
{
|
|
|
|
GtkToolbar *toolbar;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar = g_object_new (GTK_TYPE_TOOLBAR, NULL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return GTK_WIDGET (toolbar);
|
|
|
|
}
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_insert:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
* @item: a #GtkToolItem
|
|
|
|
* @pos: the position of the new item
|
|
|
|
*
|
|
|
|
* Insert a #GtkToolItem into the toolbar at position @pos. If @pos is
|
|
|
|
* 0 the item is prepended to the start of the toolbar. If @pos is
|
2003-10-20 18:56:05 +00:00
|
|
|
* negative, the item is appended to the end of the toolbar.
|
2003-08-04 21:13:55 +00:00
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_insert (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *item,
|
|
|
|
gint pos)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
|
|
|
g_return_if_fail (GTK_IS_TOOL_ITEM (item));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_new_api (toolbar))
|
|
|
|
return;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
if (pos >= 0)
|
|
|
|
pos = logical_to_physical (toolbar, pos);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
toolbar_content_new_tool_item (toolbar, item, FALSE, pos);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_item_index:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
* @item: a #GtkToolItem that is a child of @toolbar
|
|
|
|
*
|
|
|
|
* Returns the position of @item on the toolbar, starting from 0.
|
|
|
|
* It is an error if @item is not a child of the toolbar.
|
|
|
|
*
|
|
|
|
* Return value: the position of item on the toolbar.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
gint
|
|
|
|
gtk_toolbar_get_item_index (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *item)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv;
|
2003-10-20 18:56:05 +00:00
|
|
|
GList *list;
|
|
|
|
int n;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), -1);
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOL_ITEM (item), -1);
|
2003-10-20 18:56:05 +00:00
|
|
|
g_return_val_if_fail (GTK_WIDGET (item)->parent == GTK_WIDGET (toolbar), -1);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_new_api (toolbar))
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
n = 0;
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkWidget *widget;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
widget = toolbar_content_get_widget (content);
|
|
|
|
|
|
|
|
if (item == GTK_TOOL_ITEM (widget))
|
2003-10-20 18:56:05 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
++n;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
return physical_to_logical (toolbar, n);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_set_orientation:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @orientation: a new #GtkOrientation.
|
|
|
|
*
|
|
|
|
* Sets whether a toolbar should appear horizontally or vertically.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_set_orientation (GtkToolbar *toolbar,
|
|
|
|
GtkOrientation orientation)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_signal_emit (toolbar, toolbar_signals[ORIENTATION_CHANGED], 0, orientation);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_orientation:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Retrieves the current orientation of the toolbar. See
|
|
|
|
* gtk_toolbar_set_orientation().
|
|
|
|
*
|
|
|
|
* Return value: the orientation
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkOrientation
|
|
|
|
gtk_toolbar_get_orientation (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), GTK_ORIENTATION_HORIZONTAL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return toolbar->orientation;
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_set_style:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @style: the new style for @toolbar.
|
|
|
|
*
|
|
|
|
* Alters the view of @toolbar to display either icons only, text only, or both.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_set_style (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarStyle style)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
toolbar->style_set = TRUE;
|
|
|
|
g_signal_emit (toolbar, toolbar_signals[STYLE_CHANGED], 0, style);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_style:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Retrieves whether the toolbar has text, icons, or both . See
|
|
|
|
* gtk_toolbar_set_style().
|
|
|
|
|
|
|
|
* Return value: the current style of @toolbar
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarStyle
|
|
|
|
gtk_toolbar_get_style (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), DEFAULT_TOOLBAR_STYLE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return toolbar->style;
|
2001-06-24 15:34:48 +00:00
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_unset_style:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Unsets a toolbar style set with gtk_toolbar_set_style(), so that
|
|
|
|
* user preferences will be used to determine the toolbar style.
|
|
|
|
**/
|
2001-06-04 23:15:51 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_unset_style (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarStyle style;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
if (toolbar->style_set)
|
|
|
|
{
|
2002-10-22 20:00:31 +00:00
|
|
|
GtkSettings *settings = toolbar_get_settings (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2002-10-22 20:00:31 +00:00
|
|
|
if (settings)
|
|
|
|
g_object_get (settings,
|
|
|
|
"gtk-toolbar-style", &style,
|
|
|
|
NULL);
|
|
|
|
else
|
|
|
|
style = DEFAULT_TOOLBAR_STYLE;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
if (style != toolbar->style)
|
2003-06-29 23:34:20 +00:00
|
|
|
g_signal_emit (toolbar, toolbar_signals[STYLE_CHANGED], 0, style);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2001-06-04 23:15:51 +00:00
|
|
|
toolbar->style_set = FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_set_tooltips:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @enable: set to %FALSE to disable the tooltips, or %TRUE to enable them.
|
|
|
|
*
|
|
|
|
* Sets if the tooltips of a toolbar should be active or not.
|
|
|
|
**/
|
1997-12-23 06:11:36 +00:00
|
|
|
void
|
1998-01-13 07:00:52 +00:00
|
|
|
gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
|
2001-03-16 20:12:40 +00:00
|
|
|
gboolean enable)
|
1997-12-23 06:11:36 +00:00
|
|
|
{
|
1998-01-13 07:00:52 +00:00
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
if (enable)
|
|
|
|
gtk_tooltips_enable (toolbar->tooltips);
|
|
|
|
else
|
|
|
|
gtk_tooltips_disable (toolbar->tooltips);
|
1997-12-23 06:11:36 +00:00
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_tooltips:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Retrieves whether tooltips are enabled. See
|
|
|
|
* gtk_toolbar_set_tooltips().
|
|
|
|
*
|
|
|
|
* Return value: %TRUE if tooltips are enabled
|
|
|
|
**/
|
2001-06-24 15:34:48 +00:00
|
|
|
gboolean
|
|
|
|
gtk_toolbar_get_tooltips (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), FALSE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
return toolbar->tooltips->enabled;
|
|
|
|
}
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_n_items:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Returns the number of items on the toolbar.
|
|
|
|
*
|
|
|
|
* Return value: the number of items on the toolbar
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
gint
|
|
|
|
gtk_toolbar_get_n_items (GtkToolbar *toolbar)
|
1998-05-12 21:30:52 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), -1);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_new_api (toolbar))
|
|
|
|
return -1;
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
return physical_to_logical (toolbar, g_list_length (priv->content));
|
1998-05-12 21:30:52 +00:00
|
|
|
}
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_nth_item:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
* @n: A position on the toolbar
|
|
|
|
*
|
|
|
|
* Returns the @n<!-- -->'s item on @toolbar, or %NULL if the
|
|
|
|
* toolbar does not contain an @n<!-- -->'th item.
|
|
|
|
*
|
|
|
|
* Return value: The @n<!-- -->'th #GtkToolItem on @toolbar, or %NULL if there
|
|
|
|
* isn't an @n<!-- -->th item.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolItem *
|
|
|
|
gtk_toolbar_get_nth_item (GtkToolbar *toolbar,
|
|
|
|
gint n)
|
1997-12-23 06:11:36 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
2003-10-20 18:56:05 +00:00
|
|
|
ToolbarContent *content;
|
2003-10-30 15:30:24 +00:00
|
|
|
gint n_items;
|
2003-10-20 18:56:05 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), NULL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_new_api (toolbar))
|
|
|
|
return NULL;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-30 15:30:24 +00:00
|
|
|
n_items = gtk_toolbar_get_n_items (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-30 15:30:24 +00:00
|
|
|
if (n < 0 || n >= n_items)
|
|
|
|
return NULL;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
content = g_list_nth_data (priv->content, logical_to_physical (toolbar, n));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-30 15:30:24 +00:00
|
|
|
g_assert (content);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert (!toolbar_content_is_placeholder (content));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return GTK_TOOL_ITEM (toolbar_content_get_widget (content));
|
1997-12-23 06:11:36 +00:00
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_icon_size:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Retrieves the icon size fo the toolbar. See gtk_toolbar_set_icon_size().
|
|
|
|
*
|
|
|
|
* Return value: the current icon size for the icons on the toolbar.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkIconSize
|
|
|
|
gtk_toolbar_get_icon_size (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), DEFAULT_ICON_SIZE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
return toolbar->icon_size;
|
|
|
|
}
|
2003-01-30 21:38:37 +00:00
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_relief_style:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Returns the relief style of buttons on @toolbar. See
|
2004-02-26 22:29:24 +00:00
|
|
|
* gtk_button_set_relief().
|
2003-08-04 21:13:55 +00:00
|
|
|
*
|
|
|
|
* Return value: The relief style of buttons on @toolbar.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkReliefStyle
|
|
|
|
gtk_toolbar_get_relief_style (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), GTK_RELIEF_NONE);
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
return get_button_relief (toolbar);
|
1997-12-23 06:11:36 +00:00
|
|
|
}
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_set_show_arrow:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
* @show_arrow: Whether to show an overflow menu
|
|
|
|
*
|
|
|
|
* Sets whether to show an overflow menu when
|
|
|
|
* @toolbar doesn't have room for all items on it. If %TRUE,
|
|
|
|
* items that there are not room are available through an
|
|
|
|
* overflow menu.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_set_show_arrow (GtkToolbar *toolbar,
|
|
|
|
gboolean show_arrow)
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
show_arrow = show_arrow != FALSE;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (priv->show_arrow != show_arrow)
|
|
|
|
{
|
|
|
|
priv->show_arrow = show_arrow;
|
|
|
|
|
|
|
|
if (!priv->show_arrow)
|
|
|
|
gtk_widget_hide (priv->arrow_button);
|
|
|
|
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "show_arrow");
|
|
|
|
}
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
}
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_show_arrow:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Returns whether the toolbar has an overflow menu.
|
|
|
|
* See gtk_toolbar_set_show_arrow()
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
gboolean
|
|
|
|
gtk_toolbar_get_show_arrow (GtkToolbar *toolbar)
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
{
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), FALSE);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_new_api (toolbar))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
return priv->show_arrow;
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
}
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_get_drop_index:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
* @x: x coordinate of a point on the toolbar
|
|
|
|
* @y: y coordinate of a point on the toolbar
|
|
|
|
*
|
|
|
|
* Returns the position corresponding to the indicated point on
|
|
|
|
* @toolbar. This is useful when dragging items to the toolbar:
|
|
|
|
* this function returns the position a new item should be
|
|
|
|
* inserted.
|
|
|
|
*
|
|
|
|
* @x and @y are in @toolbar coordinates.
|
|
|
|
*
|
|
|
|
* Return value: The position corresponding to the point (@x, @y) on the toolbar.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
gint
|
|
|
|
gtk_toolbar_get_drop_index (GtkToolbar *toolbar,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
{
|
2004-01-30 19:49:40 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), -1);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_new_api (toolbar))
|
|
|
|
return -1;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
return physical_to_logical (toolbar, find_drop_index (toolbar, x, y));
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static void
|
|
|
|
gtk_toolbar_finalize (GObject *object)
|
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (object);
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
if (toolbar->tooltips)
|
|
|
|
g_object_unref (toolbar->tooltips);
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
toolbar_content_free (content);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_list_free (priv->content);
|
|
|
|
g_list_free (toolbar->children);
|
|
|
|
|
|
|
|
g_timer_destroy (priv->timer);
|
|
|
|
|
|
|
|
if (priv->menu)
|
|
|
|
gtk_widget_destroy (GTK_WIDGET (priv->menu));
|
|
|
|
|
|
|
|
if (priv->idle_id)
|
|
|
|
g_source_remove (priv->idle_id);
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Deprecated API
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_toolbar_set_icon_size:
|
|
|
|
* @toolbar: A #GtkToolbar
|
|
|
|
* @icon_size: The #GtkIconSize that stock icons in the toolbar shall have.
|
|
|
|
*
|
|
|
|
* This function sets the size of stock icons in the toolbar. You
|
|
|
|
* can call it both before you add the icons and after they've been
|
|
|
|
* added. The size you set will override user preferences for the default
|
|
|
|
* icon size.
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
gtk_toolbar_set_icon_size (GtkToolbar *toolbar,
|
|
|
|
GtkIconSize icon_size)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
|
|
|
|
|
|
|
toolbar->icon_size_set = TRUE;
|
|
|
|
|
|
|
|
if (toolbar->icon_size == icon_size)
|
|
|
|
return;
|
|
|
|
|
|
|
|
toolbar->icon_size = icon_size;
|
|
|
|
|
|
|
|
gtk_toolbar_reconfigured (toolbar);
|
|
|
|
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_toolbar_unset_icon_size:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
*
|
|
|
|
* Unsets toolbar icon size set with gtk_toolbar_set_icon_size(), so that
|
|
|
|
* user preferences will be used to determine the icon size.
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
gtk_toolbar_unset_icon_size (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkIconSize size;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
|
|
|
|
|
|
|
if (toolbar->icon_size_set)
|
|
|
|
{
|
|
|
|
GtkSettings *settings = toolbar_get_settings (toolbar);
|
|
|
|
|
|
|
|
if (settings)
|
|
|
|
{
|
|
|
|
g_object_get (settings,
|
|
|
|
"gtk-toolbar-icon-size", &size,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
size = DEFAULT_ICON_SIZE;
|
|
|
|
|
|
|
|
if (size != toolbar->icon_size)
|
|
|
|
gtk_toolbar_set_icon_size (toolbar, size);
|
|
|
|
|
|
|
|
toolbar->icon_size_set = FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_append_item:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @text: give your toolbar button a label.
|
|
|
|
* @tooltip_text: a string that appears when the user holds the mouse over this item.
|
|
|
|
* @tooltip_private_text: use with #GtkTipsQuery.
|
|
|
|
* @icon: a #GtkWidget that should be used as the button's icon.
|
|
|
|
* @callback: the function to be executed when the button is pressed.
|
|
|
|
* @user_data: a pointer to any data you wish to be passed to the callback.
|
|
|
|
*
|
|
|
|
* Inserts a new item into the toolbar. You must specify the position
|
|
|
|
* in the toolbar where it will be inserted.
|
2003-08-29 18:28:23 +00:00
|
|
|
*
|
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return value: the new toolbar item as a #GtkWidget.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *
|
|
|
|
gtk_toolbar_append_item (GtkToolbar *toolbar,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
return gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_BUTTON,
|
|
|
|
NULL, text,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
icon, callback, user_data,
|
|
|
|
toolbar->num_children);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_prepend_item:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @text: give your toolbar button a label.
|
|
|
|
* @tooltip_text: a string that appears when the user holds the mouse over this item.
|
|
|
|
* @tooltip_private_text: use with #GtkTipsQuery.
|
|
|
|
* @icon: a #GtkWidget that should be used as the button's icon.
|
|
|
|
* @callback: the function to be executed when the button is pressed.
|
|
|
|
* @user_data: a pointer to any data you wish to be passed to the callback.
|
|
|
|
*
|
|
|
|
* Adds a new button to the beginning (top or left edges) of the given toolbar.
|
|
|
|
*
|
2003-08-29 18:28:23 +00:00
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return value: the new toolbar item as a #GtkWidget.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *
|
|
|
|
gtk_toolbar_prepend_item (GtkToolbar *toolbar,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
return gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_BUTTON,
|
|
|
|
NULL, text,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
icon, callback, user_data,
|
|
|
|
0);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_insert_item:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @text: give your toolbar button a label.
|
|
|
|
* @tooltip_text: a string that appears when the user holds the mouse over this item.
|
|
|
|
* @tooltip_private_text: use with #GtkTipsQuery.
|
|
|
|
* @icon: a #GtkWidget that should be used as the button's icon.
|
|
|
|
* @callback: the function to be executed when the button is pressed.
|
|
|
|
* @user_data: a pointer to any data you wish to be passed to the callback.
|
|
|
|
* @position: the number of widgets to insert this item after.
|
|
|
|
*
|
|
|
|
* Inserts a new item into the toolbar. You must specify the position in the
|
|
|
|
* toolbar where it will be inserted.
|
|
|
|
*
|
2003-08-29 18:28:23 +00:00
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return value: the new toolbar item as a #GtkWidget.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *
|
|
|
|
gtk_toolbar_insert_item (GtkToolbar *toolbar,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position)
|
|
|
|
{
|
|
|
|
return gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_BUTTON,
|
|
|
|
NULL, text,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
icon, callback, user_data,
|
|
|
|
position);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_insert_stock:
|
|
|
|
* @toolbar: A #GtkToolbar
|
|
|
|
* @stock_id: The id of the stock item you want to insert
|
|
|
|
* @tooltip_text: The text in the tooltip of the toolbar button
|
|
|
|
* @tooltip_private_text: The private text of the tooltip
|
|
|
|
* @callback: The callback called when the toolbar button is clicked.
|
|
|
|
* @user_data: user data passed to callback
|
|
|
|
* @position: The position the button shall be inserted at.
|
|
|
|
* -1 means at the end.
|
|
|
|
*
|
|
|
|
* Inserts a stock item at the specified position of the toolbar. If
|
|
|
|
* @stock_id is not a known stock item ID, it's inserted verbatim,
|
|
|
|
* except that underscores used to mark mnemonics are removed.
|
|
|
|
*
|
2003-08-29 18:28:23 +00:00
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Returns: the inserted widget
|
|
|
|
*/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget*
|
|
|
|
gtk_toolbar_insert_stock (GtkToolbar *toolbar,
|
|
|
|
const gchar *stock_id,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position)
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
return internal_insert_element (toolbar, GTK_TOOLBAR_CHILD_BUTTON,
|
|
|
|
NULL, stock_id,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
NULL, callback, user_data,
|
|
|
|
position, TRUE);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_append_space:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
*
|
|
|
|
* Adds a new space to the end of the toolbar.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_append_space (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_SPACE,
|
|
|
|
NULL, NULL,
|
|
|
|
NULL, NULL,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
toolbar->num_children);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_prepend_space:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
*
|
|
|
|
* Adds a new space to the beginning of the toolbar.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_prepend_space (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_SPACE,
|
|
|
|
NULL, NULL,
|
|
|
|
NULL, NULL,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
0);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_insert_space:
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
* @position: the number of widgets after which a space should be inserted.
|
|
|
|
*
|
|
|
|
* Inserts a new space in the toolbar at the specified position.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_insert_space (GtkToolbar *toolbar,
|
|
|
|
gint position)
|
|
|
|
{
|
|
|
|
gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_SPACE,
|
|
|
|
NULL, NULL,
|
|
|
|
NULL, NULL,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
position);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_remove_space:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @position: the index of the space to remove.
|
|
|
|
*
|
|
|
|
* Removes a space from the specified position.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_remove_space (GtkToolbar *toolbar,
|
|
|
|
gint position)
|
|
|
|
{
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkToolbarPrivate *priv;
|
|
|
|
ToolbarContent *content;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (!gtk_toolbar_check_old_api (toolbar))
|
|
|
|
return;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
content = g_list_nth_data (priv->content, position);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!content)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
g_warning ("Toolbar position %d doesn't exist", position);
|
|
|
|
return;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if (!toolbar_content_is_separator (content))
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
|
|
|
g_warning ("Toolbar position %d is not a space", position);
|
2003-07-08 18:20:45 +00:00
|
|
|
return;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
toolbar_content_remove (content, toolbar);
|
|
|
|
toolbar_content_free (content);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_append_widget:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @widget: a #GtkWidget to add to the toolbar.
|
|
|
|
* @tooltip_text: the element's tooltip.
|
|
|
|
* @tooltip_private_text: used for context-sensitive help about this toolbar element.
|
|
|
|
*
|
|
|
|
* Adds a widget to the end of the given toolbar.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_append_widget (GtkToolbar *toolbar,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const gchar *tooltip_text,
|
|
|
|
const gchar *tooltip_private_text)
|
|
|
|
{
|
|
|
|
gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_WIDGET,
|
|
|
|
widget, NULL,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
toolbar->num_children);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_prepend_widget:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @widget: a #GtkWidget to add to the toolbar.
|
|
|
|
* @tooltip_text: the element's tooltip.
|
|
|
|
* @tooltip_private_text: used for context-sensitive help about this toolbar element.
|
|
|
|
*
|
|
|
|
* Adds a widget to the beginning of the given toolbar.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_prepend_widget (GtkToolbar *toolbar,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const gchar *tooltip_text,
|
|
|
|
const gchar *tooltip_private_text)
|
|
|
|
{
|
|
|
|
gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_WIDGET,
|
|
|
|
widget, NULL,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
0);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_insert_widget:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @widget: a #GtkWidget to add to the toolbar.
|
|
|
|
* @tooltip_text: the element's tooltip.
|
|
|
|
* @tooltip_private_text: used for context-sensitive help about this toolbar element.
|
|
|
|
* @position: the number of widgets to insert this widget after.
|
|
|
|
*
|
|
|
|
* Inserts a widget in the toolbar at the given position.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
void
|
|
|
|
gtk_toolbar_insert_widget (GtkToolbar *toolbar,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
gint position)
|
|
|
|
{
|
|
|
|
gtk_toolbar_insert_element (toolbar, GTK_TOOLBAR_CHILD_WIDGET,
|
|
|
|
widget, NULL,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
position);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_append_element:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @type: a value of type #GtkToolbarChildType that determines what @widget will be.
|
|
|
|
* @widget: a #GtkWidget, or %NULL.
|
|
|
|
* @text: the element's label.
|
|
|
|
* @tooltip_text: the element's tooltip.
|
|
|
|
* @tooltip_private_text: used for context-sensitive help about this toolbar element.
|
|
|
|
* @icon: a #GtkWidget that provides pictorial representation of the element's function.
|
|
|
|
* @callback: the function to be executed when the button is pressed.
|
|
|
|
* @user_data: any data you wish to pass to the callback.
|
|
|
|
*
|
|
|
|
* Adds a new element to the end of a toolbar.
|
|
|
|
*
|
|
|
|
* If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
|
|
|
|
* If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
|
|
|
|
* the radio group for the new element. In all other cases, @widget must
|
|
|
|
* be %NULL.
|
|
|
|
*
|
2003-08-29 18:28:23 +00:00
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return value: the new toolbar element as a #GtkWidget.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget*
|
|
|
|
gtk_toolbar_append_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
return gtk_toolbar_insert_element (toolbar, type, widget, text,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
icon, callback, user_data,
|
|
|
|
toolbar->num_children);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_prepend_element:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @type: a value of type #GtkToolbarChildType that determines what @widget will be.
|
|
|
|
* @widget: a #GtkWidget, or %NULL
|
|
|
|
* @text: the element's label.
|
|
|
|
* @tooltip_text: the element's tooltip.
|
|
|
|
* @tooltip_private_text: used for context-sensitive help about this toolbar element.
|
|
|
|
* @icon: a #GtkWidget that provides pictorial representation of the element's function.
|
|
|
|
* @callback: the function to be executed when the button is pressed.
|
|
|
|
* @user_data: any data you wish to pass to the callback.
|
|
|
|
*
|
|
|
|
* Adds a new element to the beginning of a toolbar.
|
|
|
|
*
|
|
|
|
* If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
|
|
|
|
* If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
|
|
|
|
* the radio group for the new element. In all other cases, @widget must
|
Change the XML format: <Root> element is replaced by <ui>, <menu> element
2003-08-28 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c: Change the XML format:
<Root> element is replaced by <ui>,
<menu> element is replaced by <menubar>,
<submenu> element is replaced by <menu>,
<dockitem> element is replaced by <toolbar>,
<popups> element is gone,
verb attribute is replaced by action,
name defaults to action or the element name.
* gtk/gtkactiongroup.[hc]: Replace GtkActionGroupEntry by GtkActionEntry
and GtkRadioActionEntry. GtkActionEntry is simplified by removing
the user_data, entry_type and extra_data fields, GtkRadioActionEntry is
further simplified by removing the callback. The user_data can now be
specified as an argument to gtk_action_group_add_actions(). There is
a new method gtk_action_group_add_radio_actions(), which is similar
to gtk_action_group_add_actions(), but takes GtkRadioActionEntrys
and a callback parameter in addition to the user_data. The callback
is connected to the ::changed signal of the first group member.
There are _full() variants taking a GDestroyNotify of
gtk_action_group_add_[radio_]actions().
* gtk/gtkradioaction.[hc]: Add a ::changed signal which gets emitted
on every member of the radio group when the active member is changed.
Add an integer property "value", and a getter for the value of "value"
on the currently active group member.
* tests/testactions.c:
* tests/testmerge.c:
* tests/merge-[123].ui:
* demos/gtk-demo/appwindow.c: Adjust to these changes.
* gtk/gtktoolbar.c (gtk_toolbar_append_element): Trivial doc fix.
2003-08-27 22:22:28 +00:00
|
|
|
* be %NULL.
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
*
|
2003-08-29 18:28:23 +00:00
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return value: the new toolbar element as a #GtkWidget.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *
|
|
|
|
gtk_toolbar_prepend_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
return gtk_toolbar_insert_element (toolbar, type, widget, text,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
icon, callback, user_data, 0);
|
|
|
|
}
|
|
|
|
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
/**
|
|
|
|
* gtk_toolbar_insert_element:
|
|
|
|
* @toolbar: a #GtkToolbar.
|
|
|
|
* @type: a value of type #GtkToolbarChildType that determines what @widget
|
|
|
|
* will be.
|
|
|
|
* @widget: a #GtkWidget, or %NULL.
|
|
|
|
* @text: the element's label.
|
|
|
|
* @tooltip_text: the element's tooltip.
|
|
|
|
* @tooltip_private_text: used for context-sensitive help about this toolbar element.
|
|
|
|
* @icon: a #GtkWidget that provides pictorial representation of the element's function.
|
|
|
|
* @callback: the function to be executed when the button is pressed.
|
|
|
|
* @user_data: any data you wish to pass to the callback.
|
|
|
|
* @position: the number of widgets to insert this element after.
|
|
|
|
*
|
|
|
|
* Inserts a new element in the toolbar at the given position.
|
|
|
|
*
|
|
|
|
* If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
|
|
|
|
* If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
|
|
|
|
* the radio group for the new element. In all other cases, @widget must
|
|
|
|
* be %NULL.
|
|
|
|
*
|
2003-08-29 18:28:23 +00:00
|
|
|
* @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
|
|
|
|
* arguments. Use the GTK_SIGNAL_FUNC() to cast the function to #GtkSignalFunc.
|
|
|
|
*
|
Move documentation inline from template files.
Tue Jul 29 13:55:44 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (gtk_toolbar_set_style,
gtk_toolbar_prepend_element, gtk_toolbar_append_element,
gtk_toolbar_insert_space, gtk_toolbar_prepend_space,
gtk_toolbar_append_space, gtk_toolbar_insert_item,
gtk_toolbar_prepend_item, gtk_toolbar_append_item,
gtk_toolbar_set_tooltips, gtk_toolbar_set_orientation,
gtk_toolbar_new, gtk_toolbar_prepend_item):
Move documentation inline from template files.
* gtk/gtktoolbar.c (gtk_toolbar_insert_element,
gtk_toolbar_insert_widget, gtk_toolbar_prepend_widget,
gtk_toolbar_append_widget, gtk_toolbar_remove_space,
gtk_toolbar_insert_stock, gtk_toolbar_unset_icon_size,
gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size,
gtk_toolbar_get_tooltips, gtk_toolbar_unset_style,
gtk_toolbar_get_style, gtk_toolbar_get_orientation)
Copy documentation from stable that was added after the EggToolbar
branched.
* gtk/gtktoolbar.h: deprecate gtk_toolbar_unset_icon_size()
2003-07-29 12:16:02 +00:00
|
|
|
* Return value: the new toolbar element as a #GtkWidget.
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkWidget *
|
|
|
|
gtk_toolbar_insert_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position)
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
return internal_insert_element (toolbar, type, widget, text,
|
|
|
|
tooltip_text, tooltip_private_text,
|
|
|
|
icon, callback, user_data, position, FALSE);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
static void
|
|
|
|
set_child_packing_and_visibility(GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChild *child)
|
|
|
|
{
|
|
|
|
GtkWidget *box;
|
|
|
|
gboolean expand;
|
|
|
|
|
|
|
|
box = gtk_bin_get_child (GTK_BIN (child->widget));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
g_return_if_fail (GTK_IS_BOX (box));
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (child->label)
|
|
|
|
{
|
|
|
|
expand = (toolbar->style != GTK_TOOLBAR_BOTH);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
gtk_box_set_child_packing (GTK_BOX (box), child->label,
|
|
|
|
expand, expand, 0, GTK_PACK_END);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (toolbar->style != GTK_TOOLBAR_ICONS)
|
|
|
|
gtk_widget_show (child->label);
|
|
|
|
else
|
|
|
|
gtk_widget_hide (child->label);
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (child->icon)
|
|
|
|
{
|
|
|
|
expand = (toolbar->style != GTK_TOOLBAR_BOTH_HORIZ);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
gtk_box_set_child_packing (GTK_BOX (box), child->icon,
|
|
|
|
expand, expand, 0, GTK_PACK_END);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (toolbar->style != GTK_TOOLBAR_TEXT)
|
|
|
|
gtk_widget_show (child->icon);
|
|
|
|
else
|
|
|
|
gtk_widget_hide (child->icon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
static GtkWidget *
|
2004-01-18 12:28:38 +00:00
|
|
|
internal_insert_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position,
|
|
|
|
gboolean use_stock)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkWidget *box;
|
|
|
|
ToolbarContent *content;
|
|
|
|
GtkToolbarPrivate *priv;
|
|
|
|
char *free_me = NULL;
|
2004-01-18 12:28:38 +00:00
|
|
|
gboolean is_button = FALSE;
|
|
|
|
|
|
|
|
GtkWidget *child_widget;
|
|
|
|
GtkWidget *child_label;
|
|
|
|
GtkWidget *child_icon;
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), NULL);
|
|
|
|
if (type == GTK_TOOLBAR_CHILD_WIDGET)
|
|
|
|
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
|
|
|
else if (type != GTK_TOOLBAR_CHILD_RADIOBUTTON)
|
|
|
|
g_return_val_if_fail (widget == NULL, NULL);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (!gtk_toolbar_check_old_api (toolbar))
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
child_widget = NULL;
|
|
|
|
child_label = NULL;
|
|
|
|
child_icon = NULL;
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GTK_TOOLBAR_CHILD_SPACE:
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
case GTK_TOOLBAR_CHILD_WIDGET:
|
2004-01-18 12:28:38 +00:00
|
|
|
child_widget = widget;
|
2003-06-29 23:34:20 +00:00
|
|
|
break;
|
2004-01-17 21:03:31 +00:00
|
|
|
|
|
|
|
case GTK_TOOLBAR_CHILD_BUTTON:
|
|
|
|
case GTK_TOOLBAR_CHILD_TOGGLEBUTTON:
|
2003-06-29 23:34:20 +00:00
|
|
|
case GTK_TOOLBAR_CHILD_RADIOBUTTON:
|
2004-01-18 12:28:38 +00:00
|
|
|
is_button = TRUE;
|
2004-01-17 21:03:31 +00:00
|
|
|
if (type == GTK_TOOLBAR_CHILD_BUTTON)
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
child_widget = gtk_button_new ();
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
else if (type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON)
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
child_widget = gtk_toggle_button_new ();
|
|
|
|
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (child_widget), FALSE);
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
else /* type == GTK_TOOLBAR_CHILD_RADIOBUTTON */
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
GSList *group = NULL;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
if (widget)
|
|
|
|
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
|
|
|
|
|
|
|
|
child_widget = gtk_radio_button_new (group);
|
|
|
|
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (child_widget), FALSE);
|
|
|
|
}
|
2003-11-12 00:37:02 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_button_set_relief (GTK_BUTTON (child_widget), get_button_relief (toolbar));
|
|
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (child_widget), FALSE);
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (callback)
|
2004-01-18 12:28:38 +00:00
|
|
|
{
|
|
|
|
g_signal_connect (child_widget, "clicked",
|
|
|
|
callback, user_data);
|
|
|
|
}
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (toolbar->style == GTK_TOOLBAR_BOTH_HORIZ)
|
|
|
|
box = gtk_hbox_new (FALSE, 0);
|
|
|
|
else
|
|
|
|
box = gtk_vbox_new (FALSE, 0);
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (child_widget), box);
|
|
|
|
gtk_widget_show (box);
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (text && use_stock)
|
2003-06-29 23:34:20 +00:00
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkStockItem stock_item;
|
2004-03-06 12:46:25 +00:00
|
|
|
if (gtk_stock_lookup (text, &stock_item))
|
|
|
|
{
|
|
|
|
if (!icon)
|
|
|
|
icon = gtk_image_new_from_stock (text, toolbar->icon_size);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-03-06 12:46:25 +00:00
|
|
|
text = free_me = _gtk_toolbar_elide_underscores (stock_item.label);
|
|
|
|
}
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (text)
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
child_label = gtk_label_new (text);
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (box), child_label);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if (icon)
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
child_icon = GTK_WIDGET (icon);
|
|
|
|
gtk_container_add (GTK_CONTAINER (box), child_icon);
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
gtk_widget_show (child_widget);
|
2004-01-17 21:03:31 +00:00
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
default:
|
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
2003-06-29 23:34:20 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
if ((type != GTK_TOOLBAR_CHILD_SPACE) && tooltip_text)
|
2004-01-18 12:28:38 +00:00
|
|
|
{
|
|
|
|
gtk_tooltips_set_tip (toolbar->tooltips, child_widget,
|
|
|
|
tooltip_text, tooltip_private_text);
|
|
|
|
}
|
|
|
|
|
|
|
|
content = toolbar_content_new_compatibility (toolbar, type, child_widget,
|
|
|
|
child_icon, child_label, position);
|
|
|
|
|
|
|
|
if (free_me)
|
|
|
|
g_free (free_me);
|
|
|
|
|
|
|
|
return child_widget;
|
|
|
|
}
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/*
|
|
|
|
* ToolbarContent methods
|
|
|
|
*/
|
|
|
|
struct _ToolbarContent
|
|
|
|
{
|
|
|
|
ContentType type;
|
|
|
|
ItemState state;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
GtkToolItem * item;
|
|
|
|
GtkAllocation start_allocation;
|
|
|
|
GtkAllocation goal_allocation;
|
|
|
|
guint is_placeholder : 1;
|
|
|
|
guint disappearing : 1;
|
|
|
|
} tool_item;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
GtkToolbarChild child;
|
|
|
|
GtkAllocation space_allocation;
|
|
|
|
guint space_visible : 1;
|
|
|
|
} compatibility;
|
|
|
|
} u;
|
|
|
|
};
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static ToolbarContent *
|
|
|
|
toolbar_content_new_tool_item (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *item,
|
|
|
|
gboolean is_placeholder,
|
|
|
|
gint pos)
|
|
|
|
{
|
|
|
|
ToolbarContent *content;
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
content = g_new0 (ToolbarContent, 1);
|
|
|
|
|
|
|
|
content->type = TOOL_ITEM;
|
|
|
|
content->state = NOT_ALLOCATED;
|
|
|
|
content->u.tool_item.item = item;
|
|
|
|
content->u.tool_item.is_placeholder = is_placeholder;
|
|
|
|
|
|
|
|
gtk_widget_set_parent (GTK_WIDGET (item), GTK_WIDGET (toolbar));
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
priv->content = g_list_insert (priv->content, content, pos);
|
|
|
|
|
|
|
|
if (!is_placeholder)
|
2004-01-18 14:31:00 +00:00
|
|
|
{
|
|
|
|
toolbar->num_children++;
|
|
|
|
|
|
|
|
gtk_toolbar_stop_sliding (toolbar);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
return content;
|
fix warning
2001-04-27 Havoc Pennington <hp@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning
* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable
* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
line/para separators
(gtk_entry_create_layout): set single paragraph mode on the layout
* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
spacing between the image and label; instead, inside a button box
the button will get extra space that will go there, but if people
configure button box for 0 chubbiness, then there's no spacing.
* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
and min/max size style properties, so people can tune their
chubbiness.
* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
functions
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
space_style, and button_relief into style properties, remove
functions for setting them
* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
it back down
* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
types from gtk_widget_style_get
* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
with a style property.
* gdk/x11/gdkevents-x11.c: namespace the settings
* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.
* gtk/gtksettings.c (gtk_settings_class_init): remove code with
side effects from inside g_assert(), so that G_DISABLE_ASSERT can
be used. Also, translate doc strings for settings. Also, namespace
the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
|
|
|
}
|
2003-07-03 01:02:04 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static ToolbarContent *
|
|
|
|
toolbar_content_new_compatibility (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkWidget *label,
|
|
|
|
gint pos)
|
2003-07-03 01:02:04 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
ToolbarContent *content;
|
|
|
|
GtkToolbarChild *child;
|
2003-10-20 18:56:05 +00:00
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
content = g_new0 (ToolbarContent, 1);
|
2004-01-17 11:51:28 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
child = &(content->u.compatibility.child);
|
|
|
|
|
|
|
|
content->type = COMPATIBILITY;
|
|
|
|
child->type = type;
|
|
|
|
child->widget = widget;
|
|
|
|
child->icon = icon;
|
|
|
|
child->label = label;
|
|
|
|
|
|
|
|
if (type != GTK_TOOLBAR_CHILD_SPACE)
|
|
|
|
{
|
|
|
|
gtk_widget_set_parent (child->widget, GTK_WIDGET (toolbar));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
content->u.compatibility.space_visible = TRUE;
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type == GTK_TOOLBAR_CHILD_BUTTON ||
|
|
|
|
type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON ||
|
|
|
|
type == GTK_TOOLBAR_CHILD_RADIOBUTTON)
|
|
|
|
{
|
|
|
|
set_child_packing_and_visibility (toolbar, child);
|
|
|
|
}
|
2003-07-04 16:48:40 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
priv->content = g_list_insert (priv->content, content, pos);
|
|
|
|
toolbar->children = g_list_insert (toolbar->children, child, pos);
|
|
|
|
|
|
|
|
toolbar->num_children++;
|
|
|
|
|
|
|
|
return content;
|
|
|
|
}
|
2003-07-04 16:48:40 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static void
|
|
|
|
toolbar_content_remove (ToolbarContent *content,
|
|
|
|
GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarChild *child;
|
|
|
|
GtkToolbarPrivate *priv;
|
2003-10-20 18:56:05 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
gtk_widget_unparent (GTK_WIDGET (content->u.tool_item.item));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
child = &(content->u.compatibility.child);
|
|
|
|
|
|
|
|
if (child->type != GTK_TOOLBAR_CHILD_SPACE)
|
|
|
|
{
|
|
|
|
g_object_ref (child->widget);
|
|
|
|
gtk_widget_unparent (child->widget);
|
|
|
|
gtk_widget_destroy (child->widget);
|
|
|
|
g_object_unref (child->widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
toolbar->children = g_list_remove (toolbar->children, child);
|
|
|
|
break;
|
|
|
|
}
|
2003-10-20 18:56:05 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
priv->content = g_list_remove (priv->content, content);
|
2003-10-20 18:56:05 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
if (!toolbar_content_is_placeholder (content))
|
|
|
|
toolbar->num_children--;
|
2003-10-20 18:56:05 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_free (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
g_free (content);
|
2003-07-03 01:02:04 +00:00
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
|
|
|
static gint
|
|
|
|
calculate_max_homogeneous_pixels (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
PangoContext *context;
|
|
|
|
PangoFontMetrics *metrics;
|
|
|
|
gint char_width;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
context = gtk_widget_get_pango_context (widget);
|
|
|
|
metrics = pango_context_get_metrics (context,
|
|
|
|
widget->style->font_desc,
|
|
|
|
pango_context_get_language (context));
|
|
|
|
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
|
|
|
pango_font_metrics_unref (metrics);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return PANGO_PIXELS (MAX_HOMOGENEOUS_N_CHARS * char_width);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_expose (ToolbarContent *content,
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkContainer *container,
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GdkEventExpose *expose)
|
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (container);
|
|
|
|
GtkToolbarChild *child;
|
|
|
|
GtkWidget *widget = NULL; /* quiet gcc */
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
if (!content->u.tool_item.is_placeholder)
|
2004-01-17 21:03:31 +00:00
|
|
|
widget = GTK_WIDGET (content->u.tool_item.item);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
child = &(content->u.compatibility.child);
|
2004-01-17 21:03:31 +00:00
|
|
|
|
|
|
|
if (child->type == GTK_TOOLBAR_CHILD_SPACE)
|
|
|
|
{
|
|
|
|
if (get_space_style (toolbar) == GTK_TOOLBAR_SPACE_LINE &&
|
2004-01-18 12:28:38 +00:00
|
|
|
content->u.compatibility.space_visible)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 14:31:00 +00:00
|
|
|
_gtk_toolbar_paint_space_line (GTK_WIDGET (toolbar), toolbar,
|
|
|
|
&expose->area,
|
|
|
|
&content->u.compatibility.space_allocation);
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
widget = child->widget;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
if (widget)
|
|
|
|
gtk_container_propagate_expose (container, widget, expose);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
toolbar_content_visible (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkToolbar *toolbar)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
GtkToolItem *item;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
item = content->u.tool_item.item;
|
|
|
|
|
|
|
|
if (!GTK_WIDGET_VISIBLE (item))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL &&
|
|
|
|
gtk_tool_item_get_visible_horizontal (item))
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
if ((toolbar->orientation == GTK_ORIENTATION_VERTICAL &&
|
|
|
|
gtk_tool_item_get_visible_vertical (item)))
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return FALSE;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
if (content->u.compatibility.child.type != GTK_TOOLBAR_CHILD_SPACE)
|
|
|
|
return GTK_WIDGET_VISIBLE (content->u.compatibility.child.widget);
|
2004-01-17 21:03:31 +00:00
|
|
|
else
|
|
|
|
return TRUE;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
g_assert_not_reached ();
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_size_request (ToolbarContent *content,
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkToolbar *toolbar,
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkRequisition *requisition)
|
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
gint space_size;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
gtk_widget_size_request (GTK_WIDGET (content->u.tool_item.item),
|
|
|
|
requisition);
|
2004-01-25 14:17:15 +00:00
|
|
|
if (content->u.tool_item.is_placeholder &&
|
|
|
|
content->u.tool_item.disappearing)
|
|
|
|
{
|
|
|
|
requisition->width = 0;
|
|
|
|
requisition->height = 0;
|
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
space_size = get_space_size (toolbar);
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
if (content->u.compatibility.child.type != GTK_TOOLBAR_CHILD_SPACE)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_widget_size_request (content->u.compatibility.child.widget,
|
2004-01-17 21:03:31 +00:00
|
|
|
requisition);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
requisition->width = space_size;
|
|
|
|
requisition->height = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
requisition->height = space_size;
|
|
|
|
requisition->width = 0;
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
toolbar_content_is_homogeneous (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkToolbar *toolbar)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
gboolean result = FALSE; /* quiet gcc */
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
GtkRequisition requisition;
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
if (priv->max_homogeneous_pixels < 0)
|
|
|
|
{
|
|
|
|
priv->max_homogeneous_pixels =
|
|
|
|
calculate_max_homogeneous_pixels (GTK_WIDGET (toolbar));
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_content_size_request (content, toolbar, &requisition);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
|
|
|
if (requisition.width > priv->max_homogeneous_pixels)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
result = gtk_tool_item_get_homogeneous (content->u.tool_item.item) &&
|
|
|
|
!GTK_IS_SEPARATOR_TOOL_ITEM (content->u.tool_item.item);
|
|
|
|
|
|
|
|
if (gtk_tool_item_get_is_important (content->u.tool_item.item) &&
|
|
|
|
toolbar->style == GTK_TOOLBAR_BOTH_HORIZ &&
|
|
|
|
toolbar->orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
result = FALSE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
case COMPATIBILITY:
|
|
|
|
if (content->u.compatibility.child.type == GTK_TOOLBAR_CHILD_BUTTON ||
|
|
|
|
content->u.compatibility.child.type == GTK_TOOLBAR_CHILD_RADIOBUTTON ||
|
|
|
|
content->u.compatibility.child.type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
|
|
|
result = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result = FALSE;
|
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
toolbar_content_is_placeholder (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
if (content->type == TOOL_ITEM && content->u.tool_item.is_placeholder)
|
|
|
|
return TRUE;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
toolbar_content_disappearing (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
if (content->type == TOOL_ITEM && content->u.tool_item.disappearing)
|
|
|
|
return TRUE;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ItemState
|
|
|
|
toolbar_content_get_state (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
return content->state;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
toolbar_content_child_visible (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
return GTK_WIDGET_CHILD_VISIBLE (content->u.tool_item.item);
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
if (content->u.compatibility.child.type != GTK_TOOLBAR_CHILD_SPACE)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
return GTK_WIDGET_CHILD_VISIBLE (content->u.compatibility.child.widget);
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
return content->u.compatibility.space_visible;
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return FALSE; /* quiet gcc */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_get_goal_allocation (ToolbarContent *content,
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
*allocation = content->u.tool_item.goal_allocation;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
/* Goal allocations are only relevant when we are
|
|
|
|
* using the new API, so we should never get here
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
*/
|
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_get_allocation (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkAllocation *allocation)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkToolbarChild *child;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
*allocation = GTK_WIDGET (content->u.tool_item.item)->allocation;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
child = &(content->u.compatibility.child);
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (child->type == GTK_TOOLBAR_CHILD_SPACE)
|
2004-01-18 12:28:38 +00:00
|
|
|
*allocation = content->u.compatibility.space_allocation;
|
2004-01-17 21:03:31 +00:00
|
|
|
else
|
2004-01-18 12:28:38 +00:00
|
|
|
*allocation = child->widget->allocation;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_set_start_allocation (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkAllocation *allocation)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
content->u.tool_item.start_allocation = *allocation;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
/* start_allocation is only relevant when using the new API */
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
toolbar_content_get_expand (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
if (content->type == TOOL_ITEM &&
|
|
|
|
gtk_tool_item_get_expand (content->u.tool_item.item))
|
2004-01-18 12:28:38 +00:00
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_set_goal_allocation (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkAllocation *allocation)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
content->u.tool_item.goal_allocation = *allocation;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
/* Only relevant when using new API */
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_set_child_visible (ToolbarContent *content,
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkToolbar *toolbar,
|
|
|
|
gboolean visible)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkToolbarChild *child;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
gtk_widget_set_child_visible (GTK_WIDGET (content->u.tool_item.item),
|
|
|
|
visible);
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
child = &(content->u.compatibility.child);
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
if (child->type != GTK_TOOLBAR_CHILD_SPACE)
|
|
|
|
{
|
|
|
|
gtk_widget_set_child_visible (child->widget, visible);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
content->u.compatibility.space_visible = visible;
|
2004-01-17 21:03:31 +00:00
|
|
|
gtk_widget_queue_draw (GTK_WIDGET (toolbar));
|
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
static void
|
|
|
|
toolbar_content_get_start_allocation (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkAllocation *start_allocation)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
*start_allocation = content->u.tool_item.start_allocation;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
/* Only relevant for new API */
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_size_allocate (ToolbarContent *content,
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
gtk_widget_size_allocate (GTK_WIDGET (content->u.tool_item.item),
|
|
|
|
allocation);
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
if (content->u.compatibility.child.type != GTK_TOOLBAR_CHILD_SPACE)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
gtk_widget_size_allocate (content->u.compatibility.child.widget,
|
|
|
|
allocation);
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
content->u.compatibility.space_allocation = *allocation;
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_set_state (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
ItemState state)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
content->state = state;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
toolbar_content_get_widget (ToolbarContent *content)
|
|
|
|
{
|
2004-01-17 21:03:31 +00:00
|
|
|
GtkToolbarChild *child;
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
return GTK_WIDGET (content->u.tool_item.item);
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
child = &(content->u.compatibility.child);
|
2004-01-17 21:03:31 +00:00
|
|
|
if (child->type != GTK_TOOLBAR_CHILD_SPACE)
|
|
|
|
return child->widget;
|
|
|
|
else
|
|
|
|
return NULL;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_set_disappearing (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
gboolean disappearing)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
content->u.tool_item.disappearing = disappearing;
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
/* Only relevant for new API */
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_set_size_request (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
gint width,
|
|
|
|
gint height)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
gtk_widget_set_size_request (GTK_WIDGET (content->u.tool_item.item),
|
|
|
|
width, height);
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
2004-01-17 21:03:31 +00:00
|
|
|
/* Setting size requests only happens with sliding,
|
|
|
|
* so not relevant here
|
|
|
|
*/
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-01-17 21:03:31 +00:00
|
|
|
toolbar_child_reconfigure (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChild *child)
|
|
|
|
{
|
|
|
|
GtkWidget *box;
|
|
|
|
GtkImage *image;
|
|
|
|
GtkToolbarStyle style;
|
|
|
|
GtkIconSize icon_size;
|
|
|
|
GtkReliefStyle relief;
|
|
|
|
gchar *stock_id;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
style = gtk_toolbar_get_style (toolbar);
|
|
|
|
icon_size = gtk_toolbar_get_icon_size (toolbar);
|
|
|
|
relief = gtk_toolbar_get_relief_style (toolbar);
|
|
|
|
|
|
|
|
/* style */
|
|
|
|
if (child->type == GTK_TOOLBAR_CHILD_BUTTON ||
|
|
|
|
child->type == GTK_TOOLBAR_CHILD_RADIOBUTTON ||
|
|
|
|
child->type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON)
|
|
|
|
{
|
|
|
|
box = gtk_bin_get_child (GTK_BIN (child->widget));
|
|
|
|
|
|
|
|
if (style == GTK_TOOLBAR_BOTH && GTK_IS_HBOX (box))
|
|
|
|
{
|
|
|
|
GtkWidget *vbox;
|
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
|
|
|
|
if (child->label)
|
|
|
|
gtk_widget_reparent (child->label, vbox);
|
|
|
|
if (child->icon)
|
|
|
|
gtk_widget_reparent (child->icon, vbox);
|
|
|
|
|
|
|
|
gtk_widget_destroy (box);
|
|
|
|
gtk_container_add (GTK_CONTAINER (child->widget), vbox);
|
|
|
|
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
}
|
|
|
|
else if (style == GTK_TOOLBAR_BOTH_HORIZ && GTK_IS_VBOX (box))
|
|
|
|
{
|
|
|
|
GtkWidget *hbox;
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 0);
|
|
|
|
|
|
|
|
if (child->label)
|
|
|
|
gtk_widget_reparent (child->label, hbox);
|
|
|
|
if (child->icon)
|
|
|
|
gtk_widget_reparent (child->icon, hbox);
|
|
|
|
|
|
|
|
gtk_widget_destroy (box);
|
|
|
|
gtk_container_add (GTK_CONTAINER (child->widget), hbox);
|
|
|
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
set_child_packing_and_visibility (toolbar, child);
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
/* icon size */
|
|
|
|
|
|
|
|
if ((child->type == GTK_TOOLBAR_CHILD_BUTTON ||
|
|
|
|
child->type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON ||
|
|
|
|
child->type == GTK_TOOLBAR_CHILD_RADIOBUTTON) &&
|
|
|
|
GTK_IS_IMAGE (child->icon))
|
|
|
|
{
|
|
|
|
image = GTK_IMAGE (child->icon);
|
|
|
|
if (gtk_image_get_storage_type (image) == GTK_IMAGE_STOCK)
|
|
|
|
{
|
|
|
|
gtk_image_get_stock (image, &stock_id, NULL);
|
|
|
|
stock_id = g_strdup (stock_id);
|
|
|
|
gtk_image_set_from_stock (image,
|
|
|
|
stock_id,
|
|
|
|
icon_size);
|
|
|
|
g_free (stock_id);
|
|
|
|
}
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
/* relief */
|
|
|
|
if (child->type == GTK_TOOLBAR_CHILD_BUTTON ||
|
|
|
|
child->type == GTK_TOOLBAR_CHILD_RADIOBUTTON ||
|
|
|
|
child->type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON)
|
|
|
|
{
|
|
|
|
gtk_button_set_relief (GTK_BUTTON (child->widget), relief);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_toolbar_reconfigured (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkToolbar *toolbar)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
_gtk_tool_item_toolbar_reconfigured (content->u.tool_item.item);
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
toolbar_child_reconfigure (toolbar, &(content->u.compatibility.child));
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
toolbar_content_retrieve_menu_item (ToolbarContent *content)
|
|
|
|
{
|
|
|
|
if (content->type == TOOL_ITEM)
|
|
|
|
return gtk_tool_item_retrieve_proxy_menu_item (content->u.tool_item.item);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
/* FIXME - we might actually be able to do something meaningful here */
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static gboolean
|
|
|
|
toolbar_content_is_separator (ToolbarContent *content)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkToolbarChild *child;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
switch (content->type)
|
|
|
|
{
|
|
|
|
case TOOL_ITEM:
|
|
|
|
return GTK_IS_SEPARATOR_TOOL_ITEM (content->u.tool_item.item);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case COMPATIBILITY:
|
|
|
|
child = &(content->u.compatibility.child);
|
|
|
|
return (child->type == GTK_TOOLBAR_CHILD_SPACE);
|
|
|
|
break;
|
|
|
|
}
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
return FALSE;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static gboolean
|
|
|
|
ignore_show_and_hide_all (ToolbarContent *content)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
if (content->type == COMPATIBILITY)
|
2004-01-17 21:03:31 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkToolbarChildType type = content->u.compatibility.child.type;
|
|
|
|
|
|
|
|
if (type == GTK_TOOLBAR_CHILD_BUTTON ||
|
|
|
|
type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON ||
|
|
|
|
type == GTK_TOOLBAR_CHILD_RADIOBUTTON)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
return FALSE;
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
|
|
|
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
static void
|
2004-01-18 12:28:38 +00:00
|
|
|
toolbar_content_show_all (ToolbarContent *content)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkWidget *widget;
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
if (ignore_show_and_hide_all (content))
|
|
|
|
return;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
widget = toolbar_content_get_widget (content);
|
|
|
|
if (widget)
|
|
|
|
gtk_widget_show_all (widget);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
toolbar_content_hide_all (ToolbarContent *content)
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
{
|
2004-01-18 12:28:38 +00:00
|
|
|
GtkWidget *widget;
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
if (ignore_show_and_hide_all (content))
|
|
|
|
return;
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
widget = toolbar_content_get_widget (content);
|
|
|
|
if (widget)
|
|
|
|
gtk_widget_hide_all (widget);
|
Phase 1 of fixing #128678: Only access ToolbarContent through a set of new
Sat Jan 17 16:53:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c:
Phase 1 of fixing #128678: Only access ToolbarContent through a
set of new functions:
toolbar_content_expose, toolbar_content_visible,
toolbar_content_size_request, toolbar_content_is_homogeneous,
toolbar_content_get_child_requisition,
toolbar_content_is_placeholder, toolbar_content_disappearing,
toolbar_content_get_state, toolbar_content_child_visible,
toolbar_content_get_goal_allocation,
toolbar_content_get_allocation,
toolbar_content_set_start_allocation,
toolbar_content_get_start_allocation, toolbar_content_get_expand,
toolbar_content_set_goal_allocation,
toolbar_content_set_child_visible, toolbar_content_size_allocate,
toolbar_content_set_state, toolbar_content_get_widget,
toolbar_content_set_disappearing,
toolbar_content_set_size_request,
toolbar_content_toolbar_reconfigured,
toolbar_content_retrieve_menu_item,
toolbar_content_new_tool_item, toolbar_content_destroy,
toolbar_content_is_separator
Also fix #127092.
2004-01-17 16:58:17 +00:00
|
|
|
}
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
/*
|
|
|
|
* Getters
|
|
|
|
*/
|
2004-01-17 21:03:31 +00:00
|
|
|
static gint
|
|
|
|
get_space_size (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
gint space_size = DEFAULT_SPACE_SIZE;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-18 14:31:00 +00:00
|
|
|
if (toolbar)
|
|
|
|
{
|
|
|
|
gtk_widget_style_get (GTK_WIDGET (toolbar),
|
|
|
|
"space_size", &space_size,
|
|
|
|
NULL);
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
return space_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkToolbarSpaceStyle
|
|
|
|
get_space_style (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarSpaceStyle space_style = DEFAULT_SPACE_STYLE;
|
2004-01-18 14:31:00 +00:00
|
|
|
|
|
|
|
if (toolbar)
|
|
|
|
{
|
|
|
|
gtk_widget_style_get (GTK_WIDGET (toolbar),
|
|
|
|
"space_style", &space_style,
|
|
|
|
NULL);
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
return space_style;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkReliefStyle
|
|
|
|
get_button_relief (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkReliefStyle button_relief = GTK_RELIEF_NORMAL;
|
|
|
|
|
|
|
|
gtk_widget_ensure_style (GTK_WIDGET (toolbar));
|
|
|
|
|
|
|
|
gtk_widget_style_get (GTK_WIDGET (toolbar),
|
|
|
|
"button_relief", &button_relief,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
return button_relief;
|
|
|
|
}
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static gint
|
|
|
|
get_internal_padding (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
gint ipadding = 0;
|
|
|
|
|
|
|
|
gtk_widget_style_get (GTK_WIDGET (toolbar),
|
|
|
|
"internal_padding", &ipadding,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
return ipadding;
|
|
|
|
}
|
2004-01-17 21:03:31 +00:00
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static GtkShadowType
|
|
|
|
get_shadow_type (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkShadowType shadow_type;
|
|
|
|
|
|
|
|
gtk_widget_style_get (GTK_WIDGET (toolbar),
|
|
|
|
"shadow_type", &shadow_type,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
return shadow_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* API checks
|
|
|
|
*/
|
2004-03-09 01:21:45 +00:00
|
|
|
#define mixed_api_warning \
|
|
|
|
"mixing deprecated and non-deprecated GtkToolbar API is not allowed"
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_check_old_api (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
if (priv->api_mode == NEW_API)
|
|
|
|
{
|
2004-03-09 01:21:45 +00:00
|
|
|
g_warning (mixed_api_warning);
|
2004-01-18 12:28:38 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv->api_mode = OLD_API;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gtk_toolbar_check_new_api (GtkToolbar *toolbar)
|
|
|
|
{
|
|
|
|
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
|
|
|
|
|
|
|
|
if (priv->api_mode == OLD_API)
|
|
|
|
{
|
2004-03-09 01:21:45 +00:00
|
|
|
g_warning (mixed_api_warning);
|
2004-01-18 12:28:38 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv->api_mode = NEW_API;
|
|
|
|
return TRUE;
|
2004-01-17 21:03:31 +00:00
|
|
|
}
|
2004-03-09 01:21:45 +00:00
|
|
|
|
|
|
|
/* GTK+ internal methods */
|
|
|
|
|
|
|
|
gint
|
|
|
|
_gtk_toolbar_get_default_space_size (void)
|
|
|
|
{
|
|
|
|
return DEFAULT_SPACE_SIZE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_gtk_toolbar_paint_space_line (GtkWidget *widget,
|
|
|
|
GtkToolbar *toolbar,
|
|
|
|
GdkRectangle *area,
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
{
|
|
|
|
const double start_fraction = (SPACE_LINE_START / SPACE_LINE_DIVISION);
|
|
|
|
const double end_fraction = (SPACE_LINE_END / SPACE_LINE_DIVISION);
|
|
|
|
|
|
|
|
gint space_size;
|
|
|
|
GtkToolbarSpaceStyle space_style;
|
|
|
|
GtkOrientation orientation;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
|
|
|
|
|
|
space_size = get_space_size (toolbar);
|
|
|
|
space_style = get_space_style (toolbar);
|
|
|
|
orientation = toolbar? toolbar->orientation : GTK_ORIENTATION_HORIZONTAL;
|
|
|
|
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
{
|
|
|
|
gtk_paint_vline (widget->style, widget->window,
|
|
|
|
GTK_WIDGET_STATE (widget), area, widget,
|
|
|
|
"toolbar",
|
|
|
|
allocation->y + allocation->height * start_fraction,
|
|
|
|
allocation->y + allocation->height * end_fraction,
|
|
|
|
allocation->x + (space_size - widget->style->xthickness) / 2);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gtk_paint_hline (widget->style, widget->window,
|
|
|
|
GTK_WIDGET_STATE (widget), area, widget,
|
|
|
|
"toolbar",
|
|
|
|
allocation->x + allocation->width * start_fraction,
|
|
|
|
allocation->x + allocation->width * end_fraction,
|
|
|
|
allocation->y + (space_size - widget->style->ythickness) / 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
gchar *
|
|
|
|
_gtk_toolbar_elide_underscores (const gchar *original)
|
|
|
|
{
|
|
|
|
gchar *q, *result;
|
|
|
|
const gchar *p;
|
|
|
|
gboolean last_underscore;
|
|
|
|
|
|
|
|
q = result = g_malloc (strlen (original) + 1);
|
|
|
|
last_underscore = FALSE;
|
|
|
|
|
|
|
|
for (p = original; *p; p++)
|
|
|
|
{
|
|
|
|
if (!last_underscore && *p == '_')
|
|
|
|
last_underscore = TRUE;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
last_underscore = FALSE;
|
|
|
|
*q++ = *p;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*q = '\0';
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|