2008-07-01 22:57:50 +00:00
|
|
|
|
/* GTK - The GIMP Toolkit
|
1997-12-19 21:14:44 +00:00
|
|
|
|
* 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>
|
2008-11-11 15:28:07 +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
|
2012-02-27 13:01:10 +00:00
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
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
|
2008-11-11 15:28:07 +00:00
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
1999-02-24 07:37:18 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2002-10-25 21:36:55 +00:00
|
|
|
|
|
2008-06-22 14:28:52 +00:00
|
|
|
|
#include "config.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
2011-01-04 17:21:41 +00:00
|
|
|
|
#include "gtktoolbar.h"
|
2014-04-05 06:04:12 +00:00
|
|
|
|
#include "gtktoolbarprivate.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
#include "gtkbindings.h"
|
2014-06-15 15:57:59 +00:00
|
|
|
|
#include "gtkbox.h"
|
2011-09-27 02:29:55 +00:00
|
|
|
|
#include "gtkcontainerprivate.h"
|
2015-12-30 00:47:04 +00:00
|
|
|
|
#include "gtkcsscustomgadgetprivate.h"
|
2015-07-12 21:11:24 +00:00
|
|
|
|
#include "gtkcssnodeprivate.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
#include "gtkimage.h"
|
2014-06-15 15:57:59 +00:00
|
|
|
|
#include "gtkintl.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
#include "gtklabel.h"
|
2011-10-23 11:57:07 +00:00
|
|
|
|
#include "gtkmain.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
#include "gtkmarshalers.h"
|
|
|
|
|
#include "gtkmenu.h"
|
|
|
|
|
#include "gtkorientable.h"
|
2012-10-10 15:36:28 +00:00
|
|
|
|
#include "gtkorientableprivate.h"
|
2014-06-15 15:57:59 +00:00
|
|
|
|
#include "gtkprivate.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
#include "gtkradiobutton.h"
|
|
|
|
|
#include "gtkradiotoolbutton.h"
|
2014-06-15 15:57:59 +00:00
|
|
|
|
#include "gtkrender.h"
|
2008-11-11 15:28:07 +00:00
|
|
|
|
#include "gtkseparatormenuitem.h"
|
|
|
|
|
#include "gtkseparatortoolitem.h"
|
|
|
|
|
#include "gtktoolshell.h"
|
2011-01-04 19:51:19 +00:00
|
|
|
|
#include "gtktypebuiltins.h"
|
2012-03-16 19:01:50 +00:00
|
|
|
|
#include "gtkwidgetpath.h"
|
2012-03-21 08:37:09 +00:00
|
|
|
|
#include "gtkwidgetprivate.h"
|
2013-05-15 21:18:05 +00:00
|
|
|
|
#include "gtkwindowprivate.h"
|
2010-07-09 17:22:23 +00:00
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
|
|
2010-10-02 22:28:54 +00:00
|
|
|
|
/**
|
|
|
|
|
* SECTION:gtktoolbar
|
|
|
|
|
* @Short_description: Create bars of buttons and other widgets
|
|
|
|
|
* @Title: GtkToolbar
|
|
|
|
|
* @See_also: #GtkToolItem
|
|
|
|
|
*
|
|
|
|
|
* A toolbar is created with a call to gtk_toolbar_new().
|
|
|
|
|
*
|
|
|
|
|
* A toolbar can contain instances of a subclass of #GtkToolItem. To add
|
|
|
|
|
* a #GtkToolItem to the a toolbar, use gtk_toolbar_insert(). To remove
|
|
|
|
|
* an item from the toolbar use gtk_container_remove(). To add a button
|
|
|
|
|
* to the toolbar, add an instance of #GtkToolButton.
|
|
|
|
|
*
|
|
|
|
|
* Toolbar items can be visually grouped by adding instances of
|
|
|
|
|
* #GtkSeparatorToolItem to the toolbar. If the GtkToolbar child property
|
2014-02-05 18:07:34 +00:00
|
|
|
|
* “expand” is #TRUE and the property #GtkSeparatorToolItem:draw is set to
|
2010-10-02 22:28:54 +00:00
|
|
|
|
* #FALSE, the effect is to force all following items to the end of the toolbar.
|
|
|
|
|
*
|
|
|
|
|
* Creating a context menu for the toolbar can be done by connecting to
|
|
|
|
|
* the #GtkToolbar::popup-context-menu signal.
|
2015-11-01 00:30:56 +00:00
|
|
|
|
*
|
|
|
|
|
* # CSS nodes
|
|
|
|
|
*
|
|
|
|
|
* GtkToolbar has a single CSS node with name toolbar.
|
2010-10-02 22:28:54 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
typedef struct _ToolbarContent ToolbarContent;
|
|
|
|
|
|
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
|
2013-07-08 17:28:48 +00:00
|
|
|
|
#define DEFAULT_TOOLBAR_STYLE GTK_TOOLBAR_BOTH_HORIZ
|
2005-12-01 20:49:17 +00:00
|
|
|
|
#define DEFAULT_ANIMATION_STATE TRUE
|
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-09-04 00:44:04 +00:00
|
|
|
|
#define SLIDE_SPEED 600.0 /* How fast the items slide, in pixels per second */
|
|
|
|
|
#define ACCEL_THRESHOLD 0.18 /* After how much time in seconds will items start speeding up */
|
2003-08-29 18:28:23 +00:00
|
|
|
|
|
2004-07-24 19:42:44 +00:00
|
|
|
|
|
2010-08-26 17:15:37 +00:00
|
|
|
|
struct _GtkToolbarPrivate
|
2010-08-14 00:00:14 +00:00
|
|
|
|
{
|
|
|
|
|
GtkMenu *menu;
|
|
|
|
|
GtkSettings *settings;
|
2011-04-12 16:48:55 +00:00
|
|
|
|
|
|
|
|
|
GtkIconSize icon_size;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbarStyle style;
|
2011-04-12 16:48:55 +00:00
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolItem *highlight_tool_item;
|
|
|
|
|
GtkWidget *arrow;
|
|
|
|
|
GtkWidget *arrow_button;
|
|
|
|
|
|
|
|
|
|
GdkWindow *event_window;
|
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkCssGadget *gadget;
|
|
|
|
|
GtkAllocation prev_allocation;
|
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GList *content;
|
|
|
|
|
|
|
|
|
|
GTimer *timer;
|
|
|
|
|
|
2011-04-12 16:48:55 +00:00
|
|
|
|
gulong settings_connection;
|
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
gint idle_id;
|
|
|
|
|
gint button_maxw; /* maximum width of homogeneous children */
|
|
|
|
|
gint button_maxh; /* maximum height of homogeneous children */
|
|
|
|
|
gint max_homogeneous_pixels;
|
|
|
|
|
gint num_children;
|
|
|
|
|
|
2011-04-12 16:48:55 +00:00
|
|
|
|
GtkOrientation orientation;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
guint animation : 1;
|
|
|
|
|
guint icon_size_set : 1;
|
|
|
|
|
guint is_sliding : 1;
|
|
|
|
|
guint need_rebuild : 1; /* whether the overflow menu should be regenerated */
|
|
|
|
|
guint need_sync : 1;
|
|
|
|
|
guint show_arrow : 1;
|
|
|
|
|
guint style_set : 1;
|
|
|
|
|
};
|
|
|
|
|
|
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,
|
2005-04-04 14:20:55 +00:00
|
|
|
|
PROP_SHOW_ARROW,
|
2005-08-31 05:19:56 +00:00
|
|
|
|
PROP_TOOLTIPS,
|
|
|
|
|
PROP_ICON_SIZE,
|
|
|
|
|
PROP_ICON_SIZE_SET
|
2003-06-29 23:34:20 +00:00
|
|
|
|
};
|
|
|
|
|
|
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,
|
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
|
|
|
|
typedef enum {
|
|
|
|
|
NOT_ALLOCATED,
|
|
|
|
|
NORMAL,
|
|
|
|
|
HIDDEN,
|
2004-07-21 02:30:19 +00:00
|
|
|
|
OVERFLOWN
|
2004-01-18 12:28:38 +00:00
|
|
|
|
} ItemState;
|
2003-09-30 22:48:10 +00:00
|
|
|
|
|
1997-12-23 06:11:36 +00:00
|
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
|
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);
|
2010-09-06 14:10:08 +00:00
|
|
|
|
static gint gtk_toolbar_draw (GtkWidget *widget,
|
|
|
|
|
cairo_t *cr);
|
2004-03-09 01:21:45 +00:00
|
|
|
|
static void gtk_toolbar_realize (GtkWidget *widget);
|
|
|
|
|
static void gtk_toolbar_unrealize (GtkWidget *widget);
|
2010-10-27 13:41:37 +00:00
|
|
|
|
static void gtk_toolbar_get_preferred_width (GtkWidget *widget,
|
|
|
|
|
gint *minimum,
|
|
|
|
|
gint *natural);
|
|
|
|
|
static void gtk_toolbar_get_preferred_height (GtkWidget *widget,
|
|
|
|
|
gint *minimum,
|
|
|
|
|
gint *natural);
|
|
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
|
static void gtk_toolbar_size_allocate (GtkWidget *widget,
|
|
|
|
|
GtkAllocation *allocation);
|
2010-12-28 18:03:46 +00:00
|
|
|
|
static void gtk_toolbar_style_updated (GtkWidget *widget);
|
2004-03-09 01:21:45 +00:00
|
|
|
|
static gboolean gtk_toolbar_focus (GtkWidget *widget,
|
|
|
|
|
GtkDirectionType dir);
|
2007-06-04 15:00:22 +00:00
|
|
|
|
static void gtk_toolbar_move_focus (GtkWidget *widget,
|
|
|
|
|
GtkDirectionType dir);
|
2004-03-09 01:21:45 +00:00
|
|
|
|
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);
|
2011-09-05 15:07:36 +00:00
|
|
|
|
static void gtk_toolbar_dispose (GObject *object);
|
2004-03-09 01:21:45 +00:00
|
|
|
|
static void gtk_toolbar_show_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);
|
2011-06-18 16:45:56 +00:00
|
|
|
|
|
2013-02-22 14:14:10 +00:00
|
|
|
|
static void gtk_toolbar_direction_changed (GtkWidget *widget,
|
|
|
|
|
GtkTextDirection previous_direction);
|
2004-03-09 01:21:45 +00:00
|
|
|
|
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_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 gboolean gtk_toolbar_popup_menu (GtkWidget *toolbar);
|
|
|
|
|
static void gtk_toolbar_reconfigured (GtkToolbar *toolbar);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
static void gtk_toolbar_allocate (GtkCssGadget *gadget,
|
|
|
|
|
const GtkAllocation *allocation,
|
|
|
|
|
int baseline,
|
|
|
|
|
GtkAllocation *out_clip,
|
|
|
|
|
gpointer data);
|
|
|
|
|
static void gtk_toolbar_measure (GtkCssGadget *gadget,
|
|
|
|
|
GtkOrientation orientation,
|
|
|
|
|
int for_size,
|
|
|
|
|
int *minimum,
|
|
|
|
|
int *natural,
|
|
|
|
|
int *minimum_baseline,
|
|
|
|
|
int *natural_baseline,
|
|
|
|
|
gpointer data);
|
|
|
|
|
static gboolean gtk_toolbar_render (GtkCssGadget *gadget,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int width,
|
|
|
|
|
int height,
|
|
|
|
|
gpointer data);
|
|
|
|
|
|
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 void toolbar_content_remove (ToolbarContent *content,
|
|
|
|
|
GtkToolbar *toolbar);
|
|
|
|
|
static void toolbar_content_free (ToolbarContent *content);
|
2010-09-06 14:10:08 +00:00
|
|
|
|
static void toolbar_content_draw (ToolbarContent *content,
|
2004-01-18 12:28:38 +00:00
|
|
|
|
GtkContainer *container,
|
2010-09-06 14:10:08 +00:00
|
|
|
|
cairo_t *cr);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
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);
|
2004-06-05 18:24:53 +00:00
|
|
|
|
static gboolean toolbar_content_has_proxy_menu_item (ToolbarContent *content);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
static gboolean toolbar_content_is_separator (ToolbarContent *content);
|
|
|
|
|
static void toolbar_content_show_all (ToolbarContent *content);
|
2004-09-08 16:40:31 +00:00
|
|
|
|
static void toolbar_content_set_expand (ToolbarContent *content,
|
|
|
|
|
gboolean expand);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2007-12-14 10:57:46 +00:00
|
|
|
|
static void toolbar_tool_shell_iface_init (GtkToolShellIface *iface);
|
|
|
|
|
static GtkIconSize toolbar_get_icon_size (GtkToolShell *shell);
|
|
|
|
|
static GtkOrientation toolbar_get_orientation (GtkToolShell *shell);
|
|
|
|
|
static GtkToolbarStyle toolbar_get_style (GtkToolShell *shell);
|
|
|
|
|
static void toolbar_rebuild_menu (GtkToolShell *shell);
|
|
|
|
|
|
2004-01-17 21:03:31 +00:00
|
|
|
|
|
2007-12-14 10:57:46 +00:00
|
|
|
|
G_DEFINE_TYPE_WITH_CODE (GtkToolbar, gtk_toolbar, GTK_TYPE_CONTAINER,
|
2013-06-27 19:02:52 +00:00
|
|
|
|
G_ADD_PRIVATE (GtkToolbar)
|
2008-11-11 15:28:07 +00:00
|
|
|
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_TOOL_SHELL,
|
|
|
|
|
toolbar_tool_shell_iface_init)
|
|
|
|
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
|
|
|
|
|
NULL))
|
|
|
|
|
|
|
|
|
|
static guint toolbar_signals[LAST_SIGNAL] = { 0 };
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
add_arrow_bindings (GtkBindingSet *binding_set,
|
|
|
|
|
guint keysym,
|
|
|
|
|
GtkDirectionType dir)
|
|
|
|
|
{
|
2010-09-08 17:35:51 +00:00
|
|
|
|
guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
|
|
gtk_binding_entry_add_signal (binding_set, keysym, 0,
|
2008-08-12 14:37:03 +00:00
|
|
|
|
"move-focus", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, dir);
|
|
|
|
|
gtk_binding_entry_add_signal (binding_set, keypad_keysym, 0,
|
2008-08-12 14:37:03 +00:00
|
|
|
|
"move-focus", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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,
|
2010-09-08 17:35:51 +00:00
|
|
|
|
GDK_KEY_Tab, GDK_CONTROL_MASK | modifiers,
|
2008-08-12 14:37:03 +00:00
|
|
|
|
"move-focus", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
2010-09-08 17:35:51 +00:00
|
|
|
|
GDK_KEY_KP_Tab, GDK_CONTROL_MASK | modifiers,
|
2008-08-12 14:37:03 +00:00
|
|
|
|
"move-focus", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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
|
|
|
|
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;
|
2011-09-05 15:07:36 +00:00
|
|
|
|
gobject_class->dispose = gtk_toolbar_dispose;
|
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;
|
2010-09-06 14:10:08 +00:00
|
|
|
|
widget_class->draw = gtk_toolbar_draw;
|
2010-10-27 13:41:37 +00:00
|
|
|
|
widget_class->get_preferred_width = gtk_toolbar_get_preferred_width;
|
|
|
|
|
widget_class->get_preferred_height = gtk_toolbar_get_preferred_height;
|
1998-01-13 07:00:52 +00:00
|
|
|
|
widget_class->size_allocate = gtk_toolbar_size_allocate;
|
2010-12-28 18:03:46 +00:00
|
|
|
|
widget_class->style_updated = gtk_toolbar_style_updated;
|
2001-06-08 18:09:34 +00:00
|
|
|
|
widget_class->focus = gtk_toolbar_focus;
|
2007-06-04 15:00:22 +00:00
|
|
|
|
|
2011-07-18 16:12:06 +00:00
|
|
|
|
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TOOL_BAR);
|
|
|
|
|
|
2008-07-21 12:27:30 +00:00
|
|
|
|
/* need to override the base class function via override_class_handler,
|
2007-06-04 15:00:22 +00:00
|
|
|
|
* because the signal slot is not available in GtkWidgetClass
|
|
|
|
|
*/
|
2008-07-21 12:27:30 +00:00
|
|
|
|
g_signal_override_class_handler ("move-focus",
|
2007-06-04 15:00:22 +00:00
|
|
|
|
GTK_TYPE_TOOLBAR,
|
2008-07-21 12:27:30 +00:00
|
|
|
|
G_CALLBACK (gtk_toolbar_move_focus));
|
2007-06-04 15:00:22 +00:00
|
|
|
|
|
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;
|
2013-02-22 14:14:10 +00:00
|
|
|
|
widget_class->direction_changed = gtk_toolbar_direction_changed;
|
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;
|
2011-06-18 16:45:56 +00:00
|
|
|
|
|
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] =
|
2005-09-01 05:11:46 +00:00
|
|
|
|
g_signal_new (I_("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] =
|
2005-09-01 05:11:46 +00:00
|
|
|
|
g_signal_new (I_("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.
|
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: return %TRUE if the signal was handled, %FALSE if not
|
2004-01-18 12:28:38 +00:00
|
|
|
|
*/
|
2003-06-29 23:34:20 +00:00
|
|
|
|
toolbar_signals[POPUP_CONTEXT_MENU] =
|
2008-08-08 14:23:32 +00:00
|
|
|
|
g_signal_new (I_("popup-context-menu"),
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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);
|
2007-06-04 15:00:22 +00:00
|
|
|
|
|
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
|
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: %TRUE if the signal was handled, %FALSE if not
|
2004-01-18 12:28:38 +00:00
|
|
|
|
*/
|
2003-07-02 14:04:43 +00:00
|
|
|
|
toolbar_signals[FOCUS_HOME_OR_END] =
|
2008-08-08 14:23:32 +00:00
|
|
|
|
g_signal_new_class_handler (I_("focus-home-or-end"),
|
2008-07-21 09:48:20 +00:00
|
|
|
|
G_OBJECT_CLASS_TYPE (klass),
|
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
|
G_CALLBACK (gtk_toolbar_focus_home_or_end),
|
|
|
|
|
NULL, NULL,
|
|
|
|
|
_gtk_marshal_BOOLEAN__BOOLEAN,
|
|
|
|
|
G_TYPE_BOOLEAN, 1,
|
|
|
|
|
G_TYPE_BOOLEAN);
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
/* properties */
|
2008-11-11 15:28:07 +00:00
|
|
|
|
g_object_class_override_property (gobject_class,
|
|
|
|
|
PROP_ORIENTATION,
|
|
|
|
|
"orientation");
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
|
PROP_TOOLBAR_STYLE,
|
2005-03-09 06:15:13 +00:00
|
|
|
|
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,
|
2007-11-21 05:49:35 +00:00
|
|
|
|
DEFAULT_TOOLBAR_STYLE,
|
2014-06-09 15:48:40 +00:00
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
|
PROP_SHOW_ARROW,
|
2005-03-09 06:15:13 +00:00
|
|
|
|
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,
|
2014-06-09 15:48:40 +00:00
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
2005-08-31 05:19:56 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GtkToolbar:icon-size:
|
|
|
|
|
*
|
|
|
|
|
* The size of the icons in a toolbar is normally determined by
|
|
|
|
|
* the toolbar-icon-size setting. When this property is set, it
|
|
|
|
|
* overrides the setting.
|
|
|
|
|
*
|
|
|
|
|
* This should only be used for special-purpose toolbars, normal
|
|
|
|
|
* application toolbars should respect the user preferences for the
|
|
|
|
|
* size of icons.
|
|
|
|
|
*
|
|
|
|
|
* Since: 2.10
|
|
|
|
|
*/
|
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
|
PROP_ICON_SIZE,
|
2013-10-18 20:12:58 +00:00
|
|
|
|
g_param_spec_enum ("icon-size",
|
|
|
|
|
P_("Icon size"),
|
|
|
|
|
P_("Size of icons in this toolbar"),
|
|
|
|
|
GTK_TYPE_ICON_SIZE,
|
|
|
|
|
DEFAULT_ICON_SIZE,
|
2014-06-09 15:48:40 +00:00
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
2005-08-31 05:19:56 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GtkToolbar:icon-size-set:
|
|
|
|
|
*
|
|
|
|
|
* Is %TRUE if the icon-size property has been set.
|
|
|
|
|
*
|
|
|
|
|
* Since: 2.10
|
|
|
|
|
*/
|
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
|
PROP_ICON_SIZE_SET,
|
|
|
|
|
g_param_spec_boolean ("icon-size-set",
|
|
|
|
|
P_("Icon size set"),
|
|
|
|
|
P_("Whether the icon-size property has been set"),
|
|
|
|
|
FALSE,
|
|
|
|
|
GTK_PARAM_READWRITE));
|
|
|
|
|
|
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"),
|
2008-05-24 19:03:33 +00:00
|
|
|
|
FALSE,
|
2005-03-22 02:14:55 +00:00
|
|
|
|
GTK_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"),
|
2008-05-24 19:03:33 +00:00
|
|
|
|
FALSE,
|
2005-03-22 02:14:55 +00:00
|
|
|
|
GTK_PARAM_READWRITE));
|
2006-05-16 13:51:30 +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
|
|
|
|
|
2010-09-08 17:35:51 +00:00
|
|
|
|
add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
|
|
|
|
|
add_arrow_bindings (binding_set, GDK_KEY_Right, GTK_DIR_RIGHT);
|
|
|
|
|
add_arrow_bindings (binding_set, GDK_KEY_Up, GTK_DIR_UP);
|
|
|
|
|
add_arrow_bindings (binding_set, GDK_KEY_Down, GTK_DIR_DOWN);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2010-09-08 17:35:51 +00:00
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Home, 0,
|
2008-08-08 14:23:32 +00:00
|
|
|
|
"focus-home-or-end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
G_TYPE_BOOLEAN, TRUE);
|
2010-09-08 17:35:51 +00:00
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Home, 0,
|
2008-08-08 14:23:32 +00:00
|
|
|
|
"focus-home-or-end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
G_TYPE_BOOLEAN, TRUE);
|
2010-09-08 17:35:51 +00:00
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_End, 0,
|
2008-08-08 14:23:32 +00:00
|
|
|
|
"focus-home-or-end", 1,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
G_TYPE_BOOLEAN, FALSE);
|
2010-09-08 17:35:51 +00:00
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_End, 0,
|
2008-08-08 14:23:32 +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);
|
2015-11-01 00:30:56 +00:00
|
|
|
|
|
|
|
|
|
gtk_widget_class_set_css_name (widget_class, "toolbar");
|
2002-10-22 20:00:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2008-11-11 15:28:07 +00:00
|
|
|
|
static void
|
|
|
|
|
toolbar_tool_shell_iface_init (GtkToolShellIface *iface)
|
|
|
|
|
{
|
|
|
|
|
iface->get_icon_size = toolbar_get_icon_size;
|
|
|
|
|
iface->get_orientation = toolbar_get_orientation;
|
|
|
|
|
iface->get_style = toolbar_get_style;
|
|
|
|
|
iface->rebuild_menu = toolbar_rebuild_menu;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2015-12-28 20:37:56 +00:00
|
|
|
|
GtkWidget *widget;
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkCssNode *widget_node;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2015-12-28 20:37:56 +00:00
|
|
|
|
widget = GTK_WIDGET (toolbar);
|
2013-06-27 19:02:52 +00:00
|
|
|
|
toolbar->priv = gtk_toolbar_get_instance_private (toolbar);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
2015-12-28 20:37:56 +00:00
|
|
|
|
gtk_widget_set_can_focus (widget, FALSE);
|
|
|
|
|
gtk_widget_set_has_window (widget, FALSE);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
|
|
|
|
priv->style = DEFAULT_TOOLBAR_STYLE;
|
|
|
|
|
priv->icon_size = DEFAULT_ICON_SIZE;
|
2005-12-01 20:49:17 +00:00
|
|
|
|
priv->animation = DEFAULT_ANIMATION_STATE;
|
2009-12-10 11:28:38 +00:00
|
|
|
|
|
2014-07-18 23:40:12 +00:00
|
|
|
|
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (toolbar));
|
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
widget_node = gtk_widget_get_css_node (widget);
|
|
|
|
|
priv->gadget = gtk_css_custom_gadget_new_for_node (widget_node,
|
|
|
|
|
widget,
|
|
|
|
|
gtk_toolbar_measure,
|
|
|
|
|
gtk_toolbar_allocate,
|
|
|
|
|
gtk_toolbar_render,
|
|
|
|
|
NULL, NULL);
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
priv->arrow_button = gtk_toggle_button_new ();
|
2008-08-08 14:23:32 +00:00
|
|
|
|
g_signal_connect (priv->arrow_button, "button-press-event",
|
2003-06-29 23:34:20 +00:00
|
|
|
|
G_CALLBACK (gtk_toolbar_arrow_button_press), toolbar);
|
|
|
|
|
g_signal_connect (priv->arrow_button, "clicked",
|
|
|
|
|
G_CALLBACK (gtk_toolbar_arrow_button_clicked), toolbar);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2015-10-23 20:13:30 +00:00
|
|
|
|
gtk_widget_set_focus_on_click (priv->arrow_button, FALSE);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2014-05-13 03:51:39 +00:00
|
|
|
|
priv->arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
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);
|
|
|
|
|
|
2015-12-28 20:37:56 +00:00
|
|
|
|
gtk_widget_set_parent (priv->arrow_button, widget);
|
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);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +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:
|
2008-11-11 15:28:07 +00:00
|
|
|
|
g_signal_emit (toolbar, toolbar_signals[ORIENTATION_CHANGED], 0,
|
|
|
|
|
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;
|
2005-08-31 05:19:56 +00:00
|
|
|
|
case PROP_ICON_SIZE:
|
2013-10-18 20:12:58 +00:00
|
|
|
|
gtk_toolbar_set_icon_size (toolbar, g_value_get_enum (value));
|
2005-08-31 05:19:56 +00:00
|
|
|
|
break;
|
|
|
|
|
case PROP_ICON_SIZE_SET:
|
|
|
|
|
if (g_value_get_boolean (value))
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->icon_size_set = TRUE;
|
2005-08-31 05:19:56 +00:00
|
|
|
|
else
|
|
|
|
|
gtk_toolbar_unset_icon_size (toolbar);
|
|
|
|
|
break;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +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:
|
2010-08-14 00:00:14 +00:00
|
|
|
|
g_value_set_enum (value, priv->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:
|
2010-08-14 00:00:14 +00:00
|
|
|
|
g_value_set_enum (value, priv->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;
|
2005-08-31 05:19:56 +00:00
|
|
|
|
case PROP_ICON_SIZE:
|
2013-10-18 20:12:58 +00:00
|
|
|
|
g_value_set_enum (value, gtk_toolbar_get_icon_size (toolbar));
|
2005-08-31 05:19:56 +00:00
|
|
|
|
break;
|
|
|
|
|
case PROP_ICON_SIZE_SET:
|
2010-08-14 00:00:14 +00:00
|
|
|
|
g_value_set_boolean (value, priv->icon_size_set);
|
2005-08-31 05:19:56 +00:00
|
|
|
|
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
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2006-05-02 23:56:43 +00:00
|
|
|
|
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->map (widget);
|
2010-08-14 00:00:14 +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
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +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
|
|
|
|
|
2006-05-02 23:56:43 +00:00
|
|
|
|
GTK_WIDGET_CLASS (gtk_toolbar_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)
|
|
|
|
|
{
|
2010-08-11 20:52:10 +00:00
|
|
|
|
GtkAllocation allocation;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-11 20:52:10 +00:00
|
|
|
|
GdkWindow *window;
|
2010-06-02 04:28:22 +00:00
|
|
|
|
|
2010-03-06 10:51:33 +00:00
|
|
|
|
gtk_widget_set_realized (widget, TRUE);
|
2010-06-02 04:28:22 +00:00
|
|
|
|
|
2010-08-11 20:52:10 +00:00
|
|
|
|
gtk_widget_get_allocation (widget, &allocation);
|
2010-06-02 04:28:22 +00:00
|
|
|
|
|
2010-08-11 20:52:10 +00:00
|
|
|
|
window = gtk_widget_get_parent_window (widget);
|
|
|
|
|
gtk_widget_set_window (widget, window);
|
|
|
|
|
g_object_ref (window);
|
|
|
|
|
|
2016-10-17 18:22:47 +00:00
|
|
|
|
priv->event_window = gdk_window_new_input (gtk_widget_get_parent_window (widget),
|
|
|
|
|
gtk_widget_get_events (widget)
|
|
|
|
|
| GDK_BUTTON_PRESS_MASK
|
|
|
|
|
| GDK_BUTTON_RELEASE_MASK
|
|
|
|
|
| GDK_POINTER_MOTION_MASK
|
|
|
|
|
| GDK_ENTER_NOTIFY_MASK
|
|
|
|
|
| GDK_LEAVE_NOTIFY_MASK,
|
|
|
|
|
&allocation);
|
2013-02-05 08:36:49 +00:00
|
|
|
|
gtk_widget_register_window (widget, priv->event_window);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_unrealize (GtkWidget *widget)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (priv->event_window)
|
|
|
|
|
{
|
2013-02-05 08:36:49 +00:00
|
|
|
|
gtk_widget_unregister_window (widget, priv->event_window);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
gdk_window_destroy (priv->event_window);
|
|
|
|
|
priv->event_window = NULL;
|
|
|
|
|
}
|
2008-08-12 09:44:32 +00:00
|
|
|
|
|
|
|
|
|
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->unrealize (widget);
|
1998-12-08 13:25:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
static gboolean
|
|
|
|
|
gtk_toolbar_render (GtkCssGadget *gadget,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int width,
|
|
|
|
|
int height,
|
|
|
|
|
gpointer data)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-10-20 18:56:05 +00:00
|
|
|
|
GList *list;
|
2010-06-02 04:28:22 +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
|
|
|
|
|
2010-09-06 14:10:08 +00:00
|
|
|
|
toolbar_content_draw (content, GTK_CONTAINER (widget), cr);
|
1998-01-13 07:00:52 +00:00
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2010-09-06 14:10:08 +00:00
|
|
|
|
gtk_container_propagate_draw (GTK_CONTAINER (widget),
|
|
|
|
|
priv->arrow_button,
|
|
|
|
|
cr);
|
2010-12-28 18:03:46 +00:00
|
|
|
|
|
1998-01-13 07:00:52 +00:00
|
|
|
|
return FALSE;
|
1998-01-13 06:14:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
static gint
|
|
|
|
|
gtk_toolbar_draw (GtkWidget *widget,
|
|
|
|
|
cairo_t *cr)
|
2012-08-04 15:22:38 +00:00
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2012-08-04 15:22:38 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
gtk_css_gadget_draw (priv->gadget, cr);
|
2012-08-04 15:22:38 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
return FALSE;
|
2012-08-04 15:22:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
1998-01-13 06:14:52 +00:00
|
|
|
|
static void
|
2015-12-30 00:47:04 +00:00
|
|
|
|
gtk_toolbar_measure (GtkCssGadget *gadget,
|
|
|
|
|
GtkOrientation orientation,
|
|
|
|
|
int for_size,
|
|
|
|
|
int *minimum,
|
|
|
|
|
int *natural,
|
|
|
|
|
int *minimum_baseline,
|
|
|
|
|
int *natural_baseline,
|
|
|
|
|
gpointer data)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GList *list;
|
|
|
|
|
gint max_child_height;
|
|
|
|
|
gint max_child_width;
|
|
|
|
|
gint max_homogeneous_child_width;
|
|
|
|
|
gint max_homogeneous_child_height;
|
|
|
|
|
gint homogeneous_size;
|
|
|
|
|
gint pack_front_size;
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkRequisition arrow_requisition, min_requisition, nat_requisition;
|
|
|
|
|
|
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
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->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
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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
|
|
|
|
}
|
2013-07-31 14:42:50 +00:00
|
|
|
|
|
|
|
|
|
arrow_requisition.height = 0;
|
|
|
|
|
arrow_requisition.width = 0;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
2010-05-22 05:10:18 +00:00
|
|
|
|
if (priv->show_arrow)
|
2013-07-31 14:42:50 +00:00
|
|
|
|
gtk_widget_get_preferred_size (priv->arrow_button,
|
2010-09-21 14:35:17 +00:00
|
|
|
|
&arrow_requisition, NULL);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
nat_requisition.width = pack_front_size;
|
|
|
|
|
nat_requisition.height = MAX (max_child_height, arrow_requisition.height);
|
2013-07-31 14:42:50 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
min_requisition.width = priv->show_arrow ? arrow_requisition.width : nat_requisition.width;
|
|
|
|
|
min_requisition.height = nat_requisition.height;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
nat_requisition.width = MAX (max_child_width, arrow_requisition.width);
|
|
|
|
|
nat_requisition.height = pack_front_size;
|
2013-07-31 14:42:50 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
min_requisition.width = nat_requisition.width;
|
|
|
|
|
min_requisition.height = priv->show_arrow ? arrow_requisition.height : nat_requisition.height;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2010-06-02 04:28:22 +00:00
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->button_maxw = max_homogeneous_child_width;
|
|
|
|
|
priv->button_maxh = max_homogeneous_child_height;
|
2015-12-30 00:47:04 +00:00
|
|
|
|
|
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
|
{
|
|
|
|
|
*minimum = min_requisition.width;
|
|
|
|
|
*natural = nat_requisition.width;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
*minimum = min_requisition.height;
|
|
|
|
|
*natural = nat_requisition.height;
|
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-10-27 13:41:37 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_get_preferred_width (GtkWidget *widget,
|
|
|
|
|
gint *minimum,
|
|
|
|
|
gint *natural)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-10-27 13:41:37 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
gtk_css_gadget_get_preferred_size (priv->gadget,
|
|
|
|
|
GTK_ORIENTATION_HORIZONTAL,
|
|
|
|
|
-1,
|
|
|
|
|
minimum, natural,
|
|
|
|
|
NULL, NULL);
|
2010-10-27 13:41:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_get_preferred_height (GtkWidget *widget,
|
|
|
|
|
gint *minimum,
|
|
|
|
|
gint *natural)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-10-27 13:41:37 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
gtk_css_gadget_get_preferred_size (priv->gadget,
|
|
|
|
|
GTK_ORIENTATION_VERTICAL,
|
|
|
|
|
-1,
|
|
|
|
|
minimum, natural,
|
|
|
|
|
NULL, NULL);
|
2010-10-27 13:41:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
|
static gint
|
2005-12-01 20:49:17 +00:00
|
|
|
|
position (GtkToolbar *toolbar,
|
|
|
|
|
gint from,
|
|
|
|
|
gint to,
|
|
|
|
|
gdouble elapsed)
|
2003-11-24 01:01:43 +00:00
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2004-09-04 00:44:04 +00:00
|
|
|
|
gint n_pixels;
|
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (!priv->animation)
|
2005-12-01 20:49:17 +00:00
|
|
|
|
return to;
|
|
|
|
|
|
2004-09-04 00:44:04 +00:00
|
|
|
|
if (elapsed <= ACCEL_THRESHOLD)
|
|
|
|
|
{
|
|
|
|
|
n_pixels = SLIDE_SPEED * elapsed;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* The formula is a second degree polynomial in
|
|
|
|
|
* @elapsed that has the line SLIDE_SPEED * @elapsed
|
|
|
|
|
* as tangent for @elapsed == ACCEL_THRESHOLD.
|
|
|
|
|
* This makes @n_pixels a smooth function of elapsed time.
|
|
|
|
|
*/
|
|
|
|
|
n_pixels = (SLIDE_SPEED / ACCEL_THRESHOLD) * elapsed * elapsed -
|
|
|
|
|
SLIDE_SPEED * elapsed + SLIDE_SPEED * ACCEL_THRESHOLD;
|
|
|
|
|
}
|
2005-12-01 20:49:17 +00:00
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
|
if (to > from)
|
2004-09-04 00:44:04 +00:00
|
|
|
|
return MIN (from + n_pixels, to);
|
2003-11-24 01:01:43 +00:00
|
|
|
|
else
|
2004-09-04 00:44:04 +00:00
|
|
|
|
return MAX (from - n_pixels, to);
|
2003-11-24 01:01:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
compute_intermediate_allocation (GtkToolbar *toolbar,
|
|
|
|
|
const GtkAllocation *start,
|
|
|
|
|
const GtkAllocation *goal,
|
|
|
|
|
GtkAllocation *intermediate)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
gdouble elapsed = g_timer_elapsed (priv->timer, NULL);
|
2005-12-01 20:49:17 +00:00
|
|
|
|
|
|
|
|
|
intermediate->x = position (toolbar, start->x, goal->x, elapsed);
|
|
|
|
|
intermediate->y = position (toolbar, start->y, goal->y, elapsed);
|
|
|
|
|
intermediate->width = position (toolbar, start->x + start->width,
|
|
|
|
|
goal->x + goal->width,
|
|
|
|
|
elapsed) - intermediate->x;
|
|
|
|
|
intermediate->height = position (toolbar, start->y + start->height,
|
|
|
|
|
goal->y + goal->height,
|
|
|
|
|
elapsed) - intermediate->y;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
if (priv->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))
|
2010-08-14 00:00:14 +00:00
|
|
|
|
return priv->button_maxw;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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))
|
2010-08-14 00:00:14 +00:00
|
|
|
|
return priv->button_maxh;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (data);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
GList *list;
|
2010-08-14 00:00:14 +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-11-24 01:01:43 +00:00
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2009-01-31 02:21:27 +00:00
|
|
|
|
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar));
|
|
|
|
|
|
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-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)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkAllocation content_allocation;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
GtkWidget *widget = GTK_WIDGET (toolbar);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
GList *list;
|
|
|
|
|
gint cur_x;
|
|
|
|
|
gint cur_y;
|
|
|
|
|
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.
|
2004-06-05 18:24:53 +00:00
|
|
|
|
*
|
|
|
|
|
* FIXME: It would be nice if we could share this code with
|
|
|
|
|
* the equivalent in gtk_widget_size_allocate().
|
2003-11-24 01:01:43 +00:00
|
|
|
|
*/
|
|
|
|
|
priv->is_sliding = TRUE;
|
|
|
|
|
|
|
|
|
|
if (!priv->idle_id)
|
2014-03-22 11:44:01 +00:00
|
|
|
|
{
|
|
|
|
|
priv->idle_id = gdk_threads_add_idle (slide_idle_handler, toolbar);
|
|
|
|
|
g_source_set_name_by_id (priv->idle_id, "[gtk+] slide_idle_handler");
|
|
|
|
|
}
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
gtk_css_gadget_get_content_allocation (priv->gadget,
|
|
|
|
|
&content_allocation, NULL);
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
|
rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
vertical = (priv->orientation == GTK_ORIENTATION_VERTICAL);
|
2012-08-04 15:22:38 +00:00
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
|
if (rtl)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
cur_x = content_allocation.width;
|
|
|
|
|
cur_y = content_allocation.height;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
cur_x = 0;
|
|
|
|
|
cur_y = 0;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
}
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
cur_x += content_allocation.x;
|
|
|
|
|
cur_y += content_allocation.y;
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
|
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 &&
|
2015-12-30 00:47:04 +00:00
|
|
|
|
rect_within (&item_allocation, &content_allocation)) ||
|
2004-01-24 22:29:18 +00:00
|
|
|
|
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)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
new_start_allocation.width = content_allocation.width;
|
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;
|
2015-12-30 00:47:04 +00:00
|
|
|
|
new_start_allocation.height = content_allocation.height;
|
2003-11-24 01:01:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
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
|
2004-09-14 21:40:41 +00:00
|
|
|
|
* will make sure that items get the right goal allocation
|
2004-01-25 14:17:15 +00:00
|
|
|
|
* 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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +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));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2004-06-05 18:24:53 +00:00
|
|
|
|
static void
|
|
|
|
|
remove_item (GtkWidget *menu_item,
|
|
|
|
|
gpointer data)
|
|
|
|
|
{
|
2010-08-11 20:52:10 +00:00
|
|
|
|
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (menu_item)),
|
|
|
|
|
menu_item);
|
2004-06-05 18:24:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
menu_deactivated (GtkWidget *menu,
|
|
|
|
|
GtkToolbar *toolbar)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2004-06-05 18:24:53 +00:00
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->arrow_button), FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2010-08-14 00:00:14 +00:00
|
|
|
|
menu_detached (GtkWidget *widget,
|
2004-06-05 18:24:53 +00:00
|
|
|
|
GtkMenu *menu)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2004-06-05 18:24:53 +00:00
|
|
|
|
priv->menu = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
rebuild_menu (GtkToolbar *toolbar)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2004-06-05 18:24:53 +00:00
|
|
|
|
GList *list, *children;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2004-06-05 18:24:53 +00:00
|
|
|
|
if (!priv->menu)
|
|
|
|
|
{
|
2013-08-18 14:45:24 +00:00
|
|
|
|
priv->menu = GTK_MENU (gtk_menu_new ());
|
2004-06-05 18:24:53 +00:00
|
|
|
|
gtk_menu_attach_to_widget (priv->menu,
|
|
|
|
|
GTK_WIDGET (toolbar),
|
|
|
|
|
menu_detached);
|
|
|
|
|
|
2008-08-08 14:23:32 +00:00
|
|
|
|
g_signal_connect (priv->menu, "deactivate",
|
|
|
|
|
G_CALLBACK (menu_deactivated), toolbar);
|
2004-06-05 18:24:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gtk_container_foreach (GTK_CONTAINER (priv->menu), remove_item, NULL);
|
|
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
|
{
|
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
|
|
if (toolbar_content_get_state (content) == OVERFLOWN &&
|
|
|
|
|
!toolbar_content_is_placeholder (content))
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *menu_item = toolbar_content_retrieve_menu_item (content);
|
|
|
|
|
|
|
|
|
|
if (menu_item)
|
|
|
|
|
{
|
|
|
|
|
g_assert (GTK_IS_MENU_ITEM (menu_item));
|
|
|
|
|
gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), menu_item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Remove leading and trailing separator items */
|
|
|
|
|
children = gtk_container_get_children (GTK_CONTAINER (priv->menu));
|
|
|
|
|
|
|
|
|
|
list = children;
|
|
|
|
|
while (list && GTK_IS_SEPARATOR_MENU_ITEM (list->data))
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *child = list->data;
|
|
|
|
|
|
|
|
|
|
gtk_container_remove (GTK_CONTAINER (priv->menu), child);
|
|
|
|
|
list = list->next;
|
|
|
|
|
}
|
|
|
|
|
g_list_free (children);
|
|
|
|
|
|
|
|
|
|
/* Regenerate the list of children so we don't try to remove items twice */
|
|
|
|
|
children = gtk_container_get_children (GTK_CONTAINER (priv->menu));
|
|
|
|
|
|
|
|
|
|
list = g_list_last (children);
|
|
|
|
|
while (list && GTK_IS_SEPARATOR_MENU_ITEM (list->data))
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *child = list->data;
|
|
|
|
|
|
|
|
|
|
gtk_container_remove (GTK_CONTAINER (priv->menu), child);
|
|
|
|
|
list = list->prev;
|
|
|
|
|
}
|
|
|
|
|
g_list_free (children);
|
|
|
|
|
|
|
|
|
|
priv->need_rebuild = FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
|
static void
|
2015-12-30 00:47:04 +00:00
|
|
|
|
gtk_toolbar_allocate (GtkCssGadget *gadget,
|
|
|
|
|
const GtkAllocation *allocation,
|
|
|
|
|
int baseline,
|
|
|
|
|
GtkAllocation *out_clip,
|
|
|
|
|
gpointer data)
|
1998-01-13 07:00:52 +00:00
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2015-12-30 00:47:04 +00:00
|
|
|
|
GtkAllocation arrow_allocation, item_area, widget_allocation;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GtkAllocation *allocations;
|
2003-11-19 19:44:45 +00:00
|
|
|
|
ItemState *new_states;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
gint arrow_size;
|
|
|
|
|
gint size, pos, short_size;
|
|
|
|
|
GList *list;
|
|
|
|
|
gint i;
|
|
|
|
|
gboolean need_arrow;
|
|
|
|
|
gint n_expand_items;
|
|
|
|
|
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;
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
|
|
|
|
gtk_widget_get_allocation (widget, &widget_allocation);
|
2003-11-24 01:01:43 +00:00
|
|
|
|
size_changed = FALSE;
|
2015-12-30 00:47:04 +00:00
|
|
|
|
if (widget_allocation.x != priv->prev_allocation.x ||
|
|
|
|
|
widget_allocation.y != priv->prev_allocation.y ||
|
|
|
|
|
widget_allocation.width != priv->prev_allocation.width ||
|
|
|
|
|
widget_allocation.height != priv->prev_allocation.height)
|
2003-11-24 01:01:43 +00:00
|
|
|
|
{
|
|
|
|
|
size_changed = TRUE;
|
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-11-24 01:01:43 +00:00
|
|
|
|
if (size_changed)
|
|
|
|
|
gtk_toolbar_stop_sliding (toolbar);
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
2010-09-21 14:35:17 +00:00
|
|
|
|
gtk_widget_get_preferred_size (priv->arrow_button,
|
|
|
|
|
&arrow_requisition, NULL);
|
2012-08-04 15:22:38 +00:00
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
available_size = size = allocation->width;
|
|
|
|
|
short_size = allocation->height;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
arrow_size = arrow_requisition.width;
|
|
|
|
|
}
|
1998-01-13 07:00:52 +00:00
|
|
|
|
else
|
2003-06-29 23:34:20 +00:00
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
available_size = size = allocation->height;
|
|
|
|
|
short_size = allocation->width;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
arrow_size = arrow_requisition.height;
|
|
|
|
|
}
|
2011-01-24 02:50:39 +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);
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
needed_size = 0;
|
2004-06-05 18:24:53 +00:00
|
|
|
|
need_arrow = FALSE;
|
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;
|
2004-06-05 18:24:53 +00:00
|
|
|
|
|
2011-01-24 02:50:39 +00:00
|
|
|
|
if (toolbar_content_visible (content, toolbar))
|
|
|
|
|
{
|
|
|
|
|
needed_size += get_item_size (toolbar, content);
|
|
|
|
|
|
|
|
|
|
/* Do we need an arrow?
|
|
|
|
|
*
|
|
|
|
|
* Assume we don't, and see if any non-separator item
|
|
|
|
|
* with a proxy menu item is then going to overflow.
|
|
|
|
|
*/
|
|
|
|
|
if (needed_size > available_size &&
|
|
|
|
|
!need_arrow &&
|
|
|
|
|
priv->show_arrow &&
|
|
|
|
|
toolbar_content_has_proxy_menu_item (content) &&
|
|
|
|
|
!toolbar_content_is_separator (content))
|
|
|
|
|
{
|
|
|
|
|
need_arrow = TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (need_arrow)
|
|
|
|
|
size = available_size - arrow_size;
|
|
|
|
|
else
|
|
|
|
|
size = available_size;
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2004-09-04 00:44:04 +00:00
|
|
|
|
/* calculate widths and states 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;
|
2011-01-24 02:50:39 +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))
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
new_states[i] = HIDDEN;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
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)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
size -= item_size;
|
|
|
|
|
allocations[i].width = item_size;
|
|
|
|
|
new_states[i] = NORMAL;
|
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
else
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
overflowing = TRUE;
|
|
|
|
|
new_states[i] = OVERFLOWN;
|
|
|
|
|
allocations[i].width = item_size;
|
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
|
|
|
|
/* calculate width of arrow */
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (need_arrow)
|
|
|
|
|
{
|
|
|
|
|
arrow_allocation.width = arrow_size;
|
2004-09-01 17:55:09 +00:00
|
|
|
|
arrow_allocation.height = MAX (short_size, 1);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
/* expand expandable items */
|
2011-01-24 02:50:39 +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
|
2003-11-24 01:23:04 +00:00
|
|
|
|
* 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;
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-11-19 19:44:45 +00:00
|
|
|
|
for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
|
|
if (toolbar_content_get_expand (content) && new_states[i] == NORMAL)
|
|
|
|
|
n_expand_items++;
|
|
|
|
|
}
|
|
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
|
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
|
|
if (toolbar_content_get_expand (content) && new_states[i] == NORMAL)
|
|
|
|
|
{
|
|
|
|
|
gint extra = size / n_expand_items;
|
|
|
|
|
if (size % n_expand_items != 0)
|
|
|
|
|
extra++;
|
2006-05-16 13:51:30 +00:00
|
|
|
|
|
2011-01-24 02:50:39 +00:00
|
|
|
|
allocations[i].width += extra;
|
|
|
|
|
size -= extra;
|
|
|
|
|
n_expand_items--;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
|
g_assert (n_expand_items == 0);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
|
/* position items */
|
2015-12-28 20:51:25 +00:00
|
|
|
|
pos = 0;
|
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
|
|
|
|
{
|
2011-01-24 02:50:39 +00:00
|
|
|
|
/* Both NORMAL and OVERFLOWN items get a position.
|
|
|
|
|
* This ensures that sliding will work for OVERFLOWN items too.
|
2004-01-24 22:29:18 +00:00
|
|
|
|
*/
|
2011-01-24 02:50:39 +00:00
|
|
|
|
if (new_states[i] == NORMAL || new_states[i] == OVERFLOWN)
|
|
|
|
|
{
|
|
|
|
|
allocations[i].x = pos;
|
2015-12-28 20:51:25 +00:00
|
|
|
|
allocations[i].y = 0;
|
2011-01-24 02:50:39 +00:00
|
|
|
|
allocations[i].height = short_size;
|
|
|
|
|
|
|
|
|
|
pos += allocations[i].width;
|
|
|
|
|
}
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
/* position arrow */
|
|
|
|
|
if (need_arrow)
|
|
|
|
|
{
|
2015-12-28 20:51:25 +00:00
|
|
|
|
arrow_allocation.x = available_size - arrow_allocation.width;
|
|
|
|
|
arrow_allocation.y = 0;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2015-12-28 20:51:25 +00:00
|
|
|
|
item_area.x = 0;
|
|
|
|
|
item_area.y = 0;
|
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 */
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
{
|
|
|
|
|
for (i = 0; i < n_items; ++i)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
fixup_allocation_for_vertical (&(allocations[i]));
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (need_arrow)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
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)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
fixup_allocation_for_rtl (available_size, &(allocations[i]));
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (need_arrow)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
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
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
/* translate the items by allocation->(x,y) */
|
|
|
|
|
for (i = 0; i < n_items; ++i)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
allocations[i].x += allocation->x;
|
|
|
|
|
allocations[i].y += allocation->y;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (need_arrow)
|
|
|
|
|
{
|
2015-12-30 00:47:04 +00:00
|
|
|
|
arrow_allocation.x += allocation->x;
|
|
|
|
|
arrow_allocation.y += allocation->y;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2004-01-25 14:17:15 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
item_area.x += allocation->x;
|
|
|
|
|
item_area.y += allocation->y;
|
2004-01-25 14:17:15 +00:00
|
|
|
|
|
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;
|
2011-01-24 02:50:39 +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 &&
|
2011-01-24 02:50:39 +00:00
|
|
|
|
new_states[i] != NORMAL)
|
|
|
|
|
{
|
|
|
|
|
/* an item disappeared and we didn't change size, so begin sliding */
|
|
|
|
|
if (!size_changed)
|
|
|
|
|
gtk_toolbar_begin_sliding (toolbar);
|
|
|
|
|
}
|
2003-11-24 01:01:43 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +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++)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2011-01-24 02:50:39 +00:00
|
|
|
|
if (new_states[i] == OVERFLOWN || new_states[i] == NORMAL)
|
|
|
|
|
{
|
|
|
|
|
GtkAllocation alloc;
|
|
|
|
|
GtkAllocation start_allocation = { 0, };
|
|
|
|
|
GtkAllocation goal_allocation;
|
|
|
|
|
|
|
|
|
|
if (priv->is_sliding)
|
|
|
|
|
{
|
|
|
|
|
toolbar_content_get_start_allocation (content, &start_allocation);
|
|
|
|
|
toolbar_content_get_goal_allocation (content, &goal_allocation);
|
|
|
|
|
|
|
|
|
|
compute_intermediate_allocation (toolbar,
|
|
|
|
|
&start_allocation,
|
|
|
|
|
&goal_allocation,
|
|
|
|
|
&alloc);
|
|
|
|
|
|
|
|
|
|
priv->need_sync = TRUE;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alloc = allocations[i];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (alloc.width <= 0 || alloc.height <= 0)
|
|
|
|
|
{
|
|
|
|
|
toolbar_content_set_child_visible (content, toolbar, FALSE);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2004-01-25 14:17:15 +00:00
|
|
|
|
else
|
2011-01-24 02:50:39 +00:00
|
|
|
|
{
|
|
|
|
|
toolbar_content_set_child_visible (content, toolbar, 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
|
|
|
|
toolbar_content_set_state (content, new_states[i]);
|
1998-01-13 07:00:52 +00:00
|
|
|
|
}
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2004-06-05 18:24:53 +00:00
|
|
|
|
if (priv->menu && priv->need_rebuild)
|
|
|
|
|
rebuild_menu (toolbar);
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (need_arrow)
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_size_allocate (GTK_WIDGET (priv->arrow_button),
|
2011-01-24 02:50:39 +00:00
|
|
|
|
&arrow_allocation);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
gtk_widget_show (GTK_WIDGET (priv->arrow_button));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_hide (GTK_WIDGET (priv->arrow_button));
|
2004-06-05 18:24:53 +00:00
|
|
|
|
|
2010-03-01 06:47:38 +00:00
|
|
|
|
if (priv->menu && gtk_widget_get_visible (GTK_WIDGET (priv->menu)))
|
2011-01-24 02:50:39 +00:00
|
|
|
|
gtk_menu_shell_deactivate (GTK_MENU_SHELL (priv->menu));
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2004-06-05 18:24:53 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_free (allocations);
|
2003-11-19 19:44:45 +00:00
|
|
|
|
g_free (new_states);
|
2015-12-30 00:47:04 +00:00
|
|
|
|
}
|
2014-08-10 11:53:59 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_size_allocate (GtkWidget *widget,
|
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
|
{
|
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
|
|
|
|
GtkAllocation clip;
|
|
|
|
|
|
|
|
|
|
gtk_widget_set_allocation (widget, allocation);
|
|
|
|
|
|
|
|
|
|
if (gtk_widget_get_realized (widget))
|
|
|
|
|
gdk_window_move_resize (priv->event_window,
|
|
|
|
|
allocation->x,
|
|
|
|
|
allocation->y,
|
|
|
|
|
allocation->width,
|
|
|
|
|
allocation->height);
|
|
|
|
|
|
|
|
|
|
gtk_css_gadget_allocate (priv->gadget,
|
|
|
|
|
allocation,
|
|
|
|
|
gtk_widget_get_allocated_baseline (widget),
|
|
|
|
|
&clip);
|
|
|
|
|
|
|
|
|
|
gtk_widget_set_clip (widget, &clip);
|
1997-12-19 21:14:44 +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
|
|
|
|
static void
|
2010-12-28 18:03:46 +00:00
|
|
|
|
gtk_toolbar_style_updated (GtkWidget *widget)
|
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
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2011-02-07 12:30:37 +00:00
|
|
|
|
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->style_updated (widget);
|
|
|
|
|
|
2003-10-31 02:10:03 +00:00
|
|
|
|
priv->max_homogeneous_pixels = -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
|
|
|
|
static GList *
|
|
|
|
|
gtk_toolbar_list_children_in_focus_order (GtkToolbar *toolbar,
|
|
|
|
|
GtkDirectionType dir)
|
2001-06-04 23:15:51 +00:00
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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;
|
2010-06-02 04:28:22 +00:00
|
|
|
|
|
|
|
|
|
if (gtk_container_get_focus_child (GTK_CONTAINER (toolbar)) == child)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2010-03-02 04:19:28 +00:00
|
|
|
|
if (gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
|
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
|
|
|
|
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.
|
|
|
|
|
*/
|
2007-06-04 15:00:22 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_move_focus (GtkWidget *widget,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GtkDirectionType dir)
|
|
|
|
|
{
|
2007-06-04 15:00:22 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
|
|
|
|
GtkContainer *container = GTK_CONTAINER (toolbar);
|
2010-06-02 04:28:22 +00:00
|
|
|
|
GtkWidget *focus_child;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
GList *list;
|
|
|
|
|
gboolean try_focus = FALSE;
|
2003-07-02 14:04:43 +00:00
|
|
|
|
GList *children;
|
2007-06-04 15:00:22 +00:00
|
|
|
|
|
2010-06-02 04:28:22 +00:00
|
|
|
|
focus_child = gtk_container_get_focus_child (container);
|
|
|
|
|
|
|
|
|
|
if (focus_child && gtk_widget_child_focus (focus_child, dir))
|
|
|
|
|
return;
|
2003-07-02 14:04:43 +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
|
|
|
|
for (list = children; list != NULL; list = list->next)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *child = list->data;
|
|
|
|
|
|
2010-03-02 04:19:28 +00:00
|
|
|
|
if (try_focus && gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
|
2003-06-29 23:34:20 +00:00
|
|
|
|
break;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2010-06-02 04:28:22 +00:00
|
|
|
|
if (child == focus_child)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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);
|
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.
|
|
|
|
|
*/
|
2010-06-02 04:28:22 +00:00
|
|
|
|
if (gtk_container_get_focus_child (GTK_CONTAINER (widget)))
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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;
|
|
|
|
|
|
2010-03-02 04:19:28 +00:00
|
|
|
|
if (gtk_widget_get_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
|
|
|
|
}
|
|
|
|
|
|
2005-12-01 20:49:17 +00:00
|
|
|
|
static GtkSettings *
|
|
|
|
|
toolbar_get_settings (GtkToolbar *toolbar)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
return toolbar->priv->settings;
|
2005-12-01 20:49:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
animation_change_notify (GtkToolbar *toolbar)
|
1998-01-13 07:00:52 +00:00
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2005-12-01 20:49:17 +00:00
|
|
|
|
GtkSettings *settings = toolbar_get_settings (toolbar);
|
|
|
|
|
gboolean animation;
|
|
|
|
|
|
|
|
|
|
if (settings)
|
|
|
|
|
g_object_get (settings,
|
|
|
|
|
"gtk-enable-animations", &animation,
|
|
|
|
|
NULL);
|
|
|
|
|
else
|
|
|
|
|
animation = DEFAULT_ANIMATION_STATE;
|
|
|
|
|
|
|
|
|
|
priv->animation = animation;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
settings_change_notify (GtkSettings *settings,
|
|
|
|
|
const GParamSpec *pspec,
|
|
|
|
|
GtkToolbar *toolbar)
|
|
|
|
|
{
|
2013-07-08 17:45:01 +00:00
|
|
|
|
if (! strcmp (pspec->name, "gtk-enable-animations"))
|
2005-12-01 20:49:17 +00:00
|
|
|
|
animation_change_notify (toolbar);
|
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
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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
|
|
|
|
{
|
2005-12-01 20:49:17 +00:00
|
|
|
|
g_signal_handler_disconnect (old_settings, priv->settings_connection);
|
2012-09-12 13:08:28 +00:00
|
|
|
|
priv->settings_connection = 0;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_object_unref (old_settings);
|
2001-03-15 09:09:06 +00:00
|
|
|
|
}
|
2005-12-01 20:49:17 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (settings)
|
|
|
|
|
{
|
2005-12-01 20:49:17 +00:00
|
|
|
|
priv->settings_connection =
|
|
|
|
|
g_signal_connect (settings, "notify",
|
|
|
|
|
G_CALLBACK (settings_change_notify),
|
|
|
|
|
toolbar);
|
|
|
|
|
|
|
|
|
|
priv->settings = g_object_ref (settings);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
priv->settings = NULL;
|
2007-01-29 03:24:09 +00:00
|
|
|
|
|
|
|
|
|
animation_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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
orientation = priv->orientation;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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
|
|
|
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-10-25 19:58:51 +00:00
|
|
|
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-10-25 19:58:51 +00:00
|
|
|
|
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
|
2009-12-10 10:23:40 +00:00
|
|
|
|
* @tool_item: (allow-none): a #GtkToolItem, or %NULL to turn of highlighting
|
2004-06-02 03:16:03 +00:00
|
|
|
|
* @index_: a position on @toolbar
|
2009-12-10 10:23:40 +00:00
|
|
|
|
*
|
2003-10-29 01:58:38 +00:00
|
|
|
|
* Highlights @toolbar to give an idea of what it would look like
|
2009-12-10 10:23:40 +00:00
|
|
|
|
* if @item was added to @toolbar at the position indicated by @index_.
|
2004-06-02 03:16:03 +00:00
|
|
|
|
* If @item is %NULL, highlighting is turned off. In that case @index_
|
|
|
|
|
* is ignored.
|
2003-10-29 01:58:38 +00:00
|
|
|
|
*
|
|
|
|
|
* 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,
|
2004-06-02 03:16:03 +00:00
|
|
|
|
gint index_)
|
2003-10-20 18:56:05 +00:00
|
|
|
|
{
|
|
|
|
|
ToolbarContent *content;
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2003-10-25 19:58:51 +00:00
|
|
|
|
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));
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
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);
|
2004-06-02 03:16:03 +00:00
|
|
|
|
if (index_ < 0 || index_ > n_items)
|
|
|
|
|
index_ = n_items;
|
2004-01-27 01:11:18 +00:00
|
|
|
|
|
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
|
|
|
|
|
2005-11-23 18:06:58 +00:00
|
|
|
|
g_object_ref_sink (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
|
|
|
|
|
2004-06-02 03:16:03 +00:00
|
|
|
|
index_ = logical_to_physical (toolbar, index_);
|
2003-10-25 19:58:51 +00:00
|
|
|
|
|
2004-06-02 03:16:03 +00:00
|
|
|
|
content = g_list_nth_data (priv->content, index_);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2004-06-02 03:16:03 +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
|
|
|
|
|
2004-06-02 03:16:03 +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),
|
2004-06-02 03:16:03 +00:00
|
|
|
|
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));
|
2010-09-14 01:33:06 +00:00
|
|
|
|
|
2010-09-21 14:35:17 +00:00
|
|
|
|
gtk_widget_get_preferred_size (GTK_WIDGET (priv->highlight_tool_item),
|
|
|
|
|
&requisition, NULL);
|
2004-01-27 01:11:18 +00:00
|
|
|
|
|
2004-09-08 16:40:31 +00:00
|
|
|
|
toolbar_content_set_expand (content, gtk_tool_item_get_expand (tool_item));
|
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);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->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)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
|
{
|
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
|
|
toolbar_content_show_all (content);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gtk_widget_show (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
|
|
|
|
{
|
2008-02-27 11:30:10 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (container);
|
|
|
|
|
|
2009-10-07 15:58:22 +00:00
|
|
|
|
gtk_toolbar_insert (toolbar, GTK_TOOL_ITEM (widget), -1);
|
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
|
|
|
|
{
|
2008-02-27 11:30:10 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (container);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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_to_remove;
|
|
|
|
|
GList *list;
|
2008-02-27 11:30:10 +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,
|
2011-09-05 15:07:36 +00:00
|
|
|
|
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);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2003-10-20 18:56:05 +00:00
|
|
|
|
GList *list;
|
2011-09-05 15:07:36 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_return_if_fail (callback != NULL);
|
2011-09-05 15:07:36 +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;
|
2011-09-05 15:07: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
|
|
|
|
if (include_internals || !toolbar_content_is_placeholder (content))
|
2011-09-05 15:07:36 +00:00
|
|
|
|
{
|
|
|
|
|
GtkWidget *child = toolbar_content_get_widget (content);
|
|
|
|
|
|
|
|
|
|
if (child)
|
|
|
|
|
callback (child, callback_data);
|
|
|
|
|
}
|
|
|
|
|
|
2003-10-20 18:56:05 +00:00
|
|
|
|
list = next;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2011-09-05 15:07:36 +00:00
|
|
|
|
|
|
|
|
|
if (include_internals && priv->arrow_button)
|
2007-12-14 10:57:46 +00:00
|
|
|
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
if (priv->orientation != orientation)
|
2003-01-30 21:38:37 +00:00
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->orientation = orientation;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
2014-05-13 03:51:39 +00:00
|
|
|
|
gtk_image_set_from_icon_name (GTK_IMAGE (priv->arrow), "pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
2004-03-12 22:51:13 +00:00
|
|
|
|
else
|
2014-05-13 03:51:39 +00:00
|
|
|
|
gtk_image_set_from_icon_name (GTK_IMAGE (priv->arrow), "pan-end-symbolic", GTK_ICON_SIZE_BUTTON);
|
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
|
|
|
|
|
2012-10-10 15:36:28 +00:00
|
|
|
|
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (toolbar));
|
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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
if (priv->style != style)
|
2003-01-30 21:38:37 +00:00
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->style = style;
|
|
|
|
|
|
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));
|
2005-03-26 05:49:15 +00:00
|
|
|
|
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
|
2016-07-12 18:08:36 +00:00
|
|
|
|
show_menu (GtkToolbar *toolbar,
|
|
|
|
|
GdkEventButton *event)
|
1998-02-23 20:48:46 +00:00
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2016-07-12 18:08:36 +00:00
|
|
|
|
GtkRequisition minimum_size;
|
2010-09-14 01:33:06 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
rebuild_menu (toolbar);
|
2005-08-15 16:36:31 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
gtk_widget_show_all (GTK_WIDGET (priv->menu));
|
2010-08-11 20:52:10 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
switch (priv->orientation)
|
1998-03-14 16:09:36 +00:00
|
|
|
|
{
|
2016-07-12 18:08:36 +00:00
|
|
|
|
case GTK_ORIENTATION_HORIZONTAL:
|
|
|
|
|
gtk_widget_get_preferred_size (priv->arrow_button, &minimum_size, NULL);
|
2005-08-15 16:36:31 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
g_object_set (priv->menu,
|
|
|
|
|
"anchor-hints", (GDK_ANCHOR_FLIP_Y |
|
|
|
|
|
GDK_ANCHOR_SLIDE |
|
|
|
|
|
GDK_ANCHOR_RESIZE),
|
|
|
|
|
"menu-type-hint", GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU,
|
|
|
|
|
"rect-anchor-dx", -minimum_size.width,
|
|
|
|
|
NULL);
|
2005-08-15 16:36:31 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
gtk_menu_popup_at_widget (priv->menu,
|
|
|
|
|
priv->arrow_button,
|
|
|
|
|
GDK_GRAVITY_SOUTH_EAST,
|
|
|
|
|
GDK_GRAVITY_NORTH_WEST,
|
|
|
|
|
(GdkEvent *) event);
|
1998-03-14 16:09:36 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
break;
|
2004-02-06 21:18:50 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
case GTK_ORIENTATION_VERTICAL:
|
|
|
|
|
g_object_set (priv->menu,
|
|
|
|
|
"anchor-hints", (GDK_ANCHOR_FLIP_X |
|
|
|
|
|
GDK_ANCHOR_SLIDE |
|
|
|
|
|
GDK_ANCHOR_RESIZE),
|
|
|
|
|
NULL);
|
2004-02-04 21:17:54 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
gtk_menu_popup_at_widget (priv->menu,
|
|
|
|
|
priv->arrow_button,
|
|
|
|
|
GDK_GRAVITY_NORTH_EAST,
|
|
|
|
|
GDK_GRAVITY_NORTH_WEST,
|
|
|
|
|
(GdkEvent *) event);
|
2004-02-04 21:17:54 +00:00
|
|
|
|
|
2016-07-12 18:08:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->arrow_button)) &&
|
2010-03-01 06:47:38 +00:00
|
|
|
|
(!priv->menu || !gtk_widget_get_visible (GTK_WIDGET (priv->menu))))
|
2003-06-29 23:34:20 +00:00
|
|
|
|
{
|
2004-06-05 18:24:53 +00:00
|
|
|
|
/* We only get here when the button is clicked with the keyboard,
|
2003-06-29 23:34:20 +00:00
|
|
|
|
* 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);
|
2013-05-15 21:18:05 +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
|
|
|
|
{
|
2011-09-27 13:37:28 +00:00
|
|
|
|
if (gdk_event_triggers_context_menu ((GdkEvent *) event))
|
2003-07-03 01:02:04 +00:00
|
|
|
|
{
|
2003-07-04 16:48:40 +00:00
|
|
|
|
gboolean return_value;
|
2010-07-16 05:15:47 +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);
|
2010-07-16 05:15:47 +00:00
|
|
|
|
|
2003-07-04 16:48:40 +00:00
|
|
|
|
return return_value;
|
2003-07-03 01:02:04 +00:00
|
|
|
|
}
|
2010-07-16 05:15:47 +00:00
|
|
|
|
|
2014-01-13 02:01:43 +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
|
|
|
|
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: the newly-created toolbar.
|
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-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));
|
2016-05-10 17:16:19 +00:00
|
|
|
|
|
|
|
|
|
pos = MIN (pos, (int)g_list_length (toolbar->priv->content));
|
|
|
|
|
|
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.
|
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: the position of item on the toolbar.
|
2003-08-04 21:13:55 +00:00
|
|
|
|
*
|
|
|
|
|
* Since: 2.4
|
|
|
|
|
**/
|
2003-06-29 23:34:20 +00:00
|
|
|
|
gint
|
|
|
|
|
gtk_toolbar_get_item_index (GtkToolbar *toolbar,
|
|
|
|
|
GtkToolItem *item)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
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);
|
2010-08-11 20:52:10 +00:00
|
|
|
|
g_return_val_if_fail (gtk_widget_get_parent (GTK_WIDGET (item)) == GTK_WIDGET (toolbar), -1);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
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_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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
|
|
|
|
priv->style_set = TRUE;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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().
|
|
|
|
|
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: the current style of @toolbar
|
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-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);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
return toolbar->priv->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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2001-06-04 23:15:51 +00:00
|
|
|
|
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));
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
|
|
|
|
if (priv->style_set)
|
2001-06-04 23:15:51 +00:00
|
|
|
|
{
|
2013-07-08 17:28:48 +00:00
|
|
|
|
style = DEFAULT_TOOLBAR_STYLE;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
if (style != priv->style)
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_signal_emit (toolbar, toolbar_signals[STYLE_CHANGED], 0, style);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv->style_set = FALSE;
|
2001-06-04 23:15:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_toolbar_get_n_items:
|
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
|
*
|
|
|
|
|
* Returns the number of items on the toolbar.
|
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: the number of items on the toolbar
|
2003-08-04 21:13:55 +00:00
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), -1);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
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
|
|
|
|
|
*
|
2014-02-09 22:24:06 +00:00
|
|
|
|
* Returns the @n'th item on @toolbar, or %NULL if the
|
|
|
|
|
* toolbar does not contain an @n'th item.
|
2010-09-21 04:18:11 +00:00
|
|
|
|
*
|
2015-12-28 20:14:08 +00:00
|
|
|
|
* Returns: (nullable) (transfer none): The @n'th #GtkToolItem on @toolbar,
|
2014-02-09 22:24:06 +00:00
|
|
|
|
* or %NULL if there isn’t an @n'th item.
|
2010-09-21 04:18:11 +00:00
|
|
|
|
*
|
2003-08-04 21:13:55 +00:00
|
|
|
|
* 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
|
|
|
|
{
|
2010-08-26 17:15:37 +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);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
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;
|
2010-08-14 00:00:14 +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
|
|
|
|
|
*
|
2005-08-31 05:19:56 +00:00
|
|
|
|
* Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size().
|
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
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: the current icon size for the icons on the toolbar.
|
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-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);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
return toolbar->priv->icon_size;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
}
|
2003-01-30 21:38:37 +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
|
2014-02-07 18:32:47 +00:00
|
|
|
|
* @toolbar doesn’t have room for all items on it. If %TRUE,
|
2003-08-04 21:13:55 +00:00
|
|
|
|
* 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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
|
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));
|
2005-03-26 05:49:15 +00:00
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "show-arrow");
|
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
|
|
|
|
}
|
|
|
|
|
|
2003-08-04 21:13:55 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_toolbar_get_show_arrow:
|
|
|
|
|
* @toolbar: a #GtkToolbar
|
|
|
|
|
*
|
|
|
|
|
* Returns whether the toolbar has an overflow menu.
|
2005-06-10 04:45:40 +00:00
|
|
|
|
* See gtk_toolbar_set_show_arrow().
|
2003-08-04 21:13:55 +00:00
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: %TRUE if the toolbar has an overflow menu.
|
2003-08-04 21:13:55 +00:00
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), FALSE);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
return toolbar->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.
|
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: The position corresponding to the point (@x, @y) on the toolbar.
|
2003-08-04 21:13:55 +00:00
|
|
|
|
*
|
|
|
|
|
* 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-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
|
2011-09-05 15:07:36 +00:00
|
|
|
|
gtk_toolbar_dispose (GObject *object)
|
2004-01-18 12:28:38 +00:00
|
|
|
|
{
|
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (object);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2004-07-22 14:55:53 +00:00
|
|
|
|
if (priv->arrow_button)
|
2011-07-01 16:33:26 +00:00
|
|
|
|
{
|
2011-09-05 15:07:36 +00:00
|
|
|
|
gtk_widget_unparent (priv->arrow_button);
|
|
|
|
|
priv->arrow_button = NULL;
|
2011-07-01 16:33:26 +00:00
|
|
|
|
}
|
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
if (priv->menu)
|
2010-12-02 04:32:35 +00:00
|
|
|
|
{
|
|
|
|
|
g_signal_handlers_disconnect_by_func (priv->menu,
|
|
|
|
|
menu_deactivated, toolbar);
|
|
|
|
|
gtk_widget_destroy (GTK_WIDGET (priv->menu));
|
2011-09-05 15:07:36 +00:00
|
|
|
|
priv->menu = NULL;
|
2010-12-02 04:32:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-09-12 13:08:28 +00:00
|
|
|
|
if (priv->settings_connection > 0)
|
|
|
|
|
{
|
|
|
|
|
g_signal_handler_disconnect (priv->settings, priv->settings_connection);
|
|
|
|
|
priv->settings_connection = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_clear_object (&priv->settings);
|
|
|
|
|
|
2011-09-05 15:07:36 +00:00
|
|
|
|
G_OBJECT_CLASS (gtk_toolbar_parent_class)->dispose (object);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_finalize (GObject *object)
|
|
|
|
|
{
|
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (object);
|
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
|
|
|
|
|
|
|
|
|
g_list_free_full (priv->content, (GDestroyNotify)toolbar_content_free);
|
|
|
|
|
|
|
|
|
|
g_timer_destroy (priv->timer);
|
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
if (priv->idle_id)
|
|
|
|
|
g_source_remove (priv->idle_id);
|
2004-06-05 18:24:53 +00:00
|
|
|
|
|
2015-12-30 00:47:04 +00:00
|
|
|
|
g_clear_object (&priv->gadget);
|
|
|
|
|
|
2006-05-02 23:56:43 +00:00
|
|
|
|
G_OBJECT_CLASS (gtk_toolbar_parent_class)->finalize (object);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gtk_toolbar_set_icon_size:
|
|
|
|
|
* @toolbar: A #GtkToolbar
|
2013-10-18 20:12:58 +00:00
|
|
|
|
* @icon_size: The #GtkIconSize that stock icons in the toolbar shall have.
|
2004-01-18 12:28:38 +00:00
|
|
|
|
*
|
|
|
|
|
* This function sets the size of stock icons in the toolbar. You
|
2014-02-07 18:38:26 +00:00
|
|
|
|
* can call it both before you add the icons and after they’ve been
|
2004-01-18 12:28:38 +00:00
|
|
|
|
* added. The size you set will override user preferences for the default
|
|
|
|
|
* icon size.
|
2004-11-23 04:11:15 +00:00
|
|
|
|
*
|
2005-08-31 05:19:56 +00:00
|
|
|
|
* This should only be used for special-purpose toolbars, normal
|
|
|
|
|
* application toolbars should respect the user preferences for the
|
|
|
|
|
* size of icons.
|
2004-01-18 12:28:38 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_toolbar_set_icon_size (GtkToolbar *toolbar,
|
|
|
|
|
GtkIconSize icon_size)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2005-08-31 05:19:56 +00:00
|
|
|
|
g_return_if_fail (icon_size != GTK_ICON_SIZE_INVALID);
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
|
|
|
|
if (!priv->icon_size_set)
|
2005-08-31 05:19:56 +00:00
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->icon_size_set = TRUE;
|
2005-08-31 05:19:56 +00:00
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "icon-size-set");
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->icon_size == icon_size)
|
2004-01-18 12:28:38 +00:00
|
|
|
|
return;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv->icon_size = icon_size;
|
2005-08-31 05:19:56 +00:00
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "icon-size");
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
GtkIconSize size;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv = toolbar->priv;
|
|
|
|
|
|
|
|
|
|
if (priv->icon_size_set)
|
2004-01-18 12:28:38 +00:00
|
|
|
|
{
|
2013-07-08 17:45:01 +00:00
|
|
|
|
size = DEFAULT_ICON_SIZE;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
if (size != priv->icon_size)
|
2005-08-31 05:19:56 +00:00
|
|
|
|
{
|
|
|
|
|
gtk_toolbar_set_icon_size (toolbar, size);
|
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "icon-size");
|
|
|
|
|
}
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
priv->icon_size_set = FALSE;
|
2005-08-31 05:19:56 +00:00
|
|
|
|
g_object_notify (G_OBJECT (toolbar), "icon-size-set");
|
2004-01-18 12:28:38 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ToolbarContent methods
|
|
|
|
|
*/
|
2004-09-14 21:40:41 +00:00
|
|
|
|
typedef enum {
|
|
|
|
|
UNKNOWN,
|
|
|
|
|
YES,
|
2007-09-21 14:17:53 +00:00
|
|
|
|
NO
|
2004-09-14 21:40:41 +00:00
|
|
|
|
} TriState;
|
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
struct _ToolbarContent
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
ItemState state;
|
|
|
|
|
|
|
|
|
|
GtkToolItem *item;
|
2011-06-15 20:50:59 +00:00
|
|
|
|
GtkAllocation allocation;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
GtkAllocation start_allocation;
|
|
|
|
|
GtkAllocation goal_allocation;
|
|
|
|
|
guint is_placeholder : 1;
|
|
|
|
|
guint disappearing : 1;
|
|
|
|
|
guint has_menu : 2;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
};
|
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)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2015-07-12 21:11:24 +00:00
|
|
|
|
ToolbarContent *content, *previous;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
2007-09-08 05:23:12 +00:00
|
|
|
|
content = g_slice_new0 (ToolbarContent);
|
2004-01-18 12:28:38 +00:00
|
|
|
|
|
|
|
|
|
content->state = NOT_ALLOCATED;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
content->item = item;
|
|
|
|
|
content->is_placeholder = is_placeholder;
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
2015-07-12 21:11:24 +00:00
|
|
|
|
previous = pos > 0 ? g_list_nth_data (priv->content, -1) : NULL;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
priv->content = g_list_insert (priv->content, content, pos);
|
2011-10-19 11:17:18 +00:00
|
|
|
|
|
2015-07-12 21:11:24 +00:00
|
|
|
|
if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_RTL)
|
|
|
|
|
gtk_css_node_insert_after (gtk_widget_get_css_node (GTK_WIDGET (toolbar)),
|
|
|
|
|
gtk_widget_get_css_node (GTK_WIDGET (item)),
|
|
|
|
|
previous ? gtk_widget_get_css_node (GTK_WIDGET (previous->item)) : NULL);
|
|
|
|
|
else
|
|
|
|
|
gtk_css_node_insert_before (gtk_widget_get_css_node (GTK_WIDGET (toolbar)),
|
|
|
|
|
gtk_widget_get_css_node (GTK_WIDGET (item)),
|
|
|
|
|
previous ? gtk_widget_get_css_node (GTK_WIDGET (previous->item)) : NULL);
|
2011-06-18 16:45:56 +00:00
|
|
|
|
|
2015-07-12 21:11:24 +00:00
|
|
|
|
gtk_widget_set_parent (GTK_WIDGET (item), GTK_WIDGET (toolbar));
|
2011-06-30 19:51:10 +00:00
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
if (!is_placeholder)
|
2004-01-18 14:31:00 +00:00
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->num_children++;
|
2004-01-18 14:31:00 +00:00
|
|
|
|
|
|
|
|
|
gtk_toolbar_stop_sliding (toolbar);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
2004-06-05 18:24:53 +00:00
|
|
|
|
priv->need_rebuild = TRUE;
|
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 void
|
|
|
|
|
toolbar_content_remove (ToolbarContent *content,
|
|
|
|
|
GtkToolbar *toolbar)
|
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
|
|
|
|
|
gtk_widget_unparent (GTK_WIDGET (content->item));
|
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))
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->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));
|
2004-06-05 18:24:53 +00:00
|
|
|
|
priv->need_rebuild = TRUE;
|
2004-01-18 12:28:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
toolbar_content_free (ToolbarContent *content)
|
|
|
|
|
{
|
2007-09-08 05:23:12 +00:00
|
|
|
|
g_slice_free (ToolbarContent, 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);
|
2010-12-28 18:03:46 +00:00
|
|
|
|
|
2012-12-06 01:47:24 +00:00
|
|
|
|
metrics = pango_context_get_metrics (context,
|
|
|
|
|
pango_context_get_font_description (context),
|
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
|
|
|
|
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
|
2010-09-06 14:10:08 +00:00
|
|
|
|
toolbar_content_draw (ToolbarContent *content,
|
|
|
|
|
GtkContainer *container,
|
|
|
|
|
cairo_t *cr)
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
GtkWidget *widget;
|
|
|
|
|
|
2010-09-06 14:07:44 +00:00
|
|
|
|
if (content->is_placeholder)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
widget = GTK_WIDGET (content->item);
|
2010-05-22 05:10:18 +00:00
|
|
|
|
|
2004-01-18 12:28:38 +00:00
|
|
|
|
if (widget)
|
2010-09-06 14:10:08 +00:00
|
|
|
|
gtk_container_propagate_draw (container, widget, cr);
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
|
|
|
|
|
item = content->item;
|
|
|
|
|
|
|
|
|
|
if (!gtk_widget_get_visible (GTK_WIDGET (item)))
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gtk_tool_item_get_visible_horizontal (item))
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
2010-08-14 00:00:14 +00:00
|
|
|
|
if (priv->orientation == GTK_ORIENTATION_VERTICAL &&
|
2010-05-22 05:10:18 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
{
|
2010-09-21 14:35:17 +00:00
|
|
|
|
gtk_widget_get_preferred_size (GTK_WIDGET (content->item),
|
|
|
|
|
requisition, NULL);
|
2010-05-22 05:10:18 +00:00
|
|
|
|
if (content->is_placeholder &&
|
|
|
|
|
content->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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
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;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gboolean result;
|
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 (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;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
|
|
|
|
|
result = gtk_tool_item_get_homogeneous (content->item) &&
|
|
|
|
|
!GTK_IS_SEPARATOR_TOOL_ITEM (content->item);
|
|
|
|
|
|
|
|
|
|
if (gtk_tool_item_get_is_important (content->item) &&
|
2010-08-14 00:00:14 +00:00
|
|
|
|
priv->style == GTK_TOOLBAR_BOTH_HORIZ &&
|
|
|
|
|
priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
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
|
|
|
|
}
|
2010-05-22 05:10: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
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
|
toolbar_content_is_placeholder (ToolbarContent *content)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
if (content->is_placeholder)
|
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 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)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
if (content->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
|
|
|
|
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)
|
|
|
|
|
{
|
2010-09-28 16:26:23 +00:00
|
|
|
|
return gtk_widget_get_child_visible (GTK_WIDGET (content->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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
toolbar_content_get_goal_allocation (ToolbarContent *content,
|
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
*allocation = content->goal_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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2011-06-15 20:50:59 +00:00
|
|
|
|
*allocation = content->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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
content->start_allocation = *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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
|
toolbar_content_get_expand (ToolbarContent *content)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
if (!content->disappearing &&
|
|
|
|
|
gtk_tool_item_get_expand (content->item))
|
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
content->goal_allocation = *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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gtk_widget_set_child_visible (GTK_WIDGET (content->item),
|
|
|
|
|
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-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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
*start_allocation = content->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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
toolbar_content_size_allocate (ToolbarContent *content,
|
|
|
|
|
GtkAllocation *allocation)
|
|
|
|
|
{
|
2011-06-15 20:50:59 +00:00
|
|
|
|
content->allocation = *allocation;
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gtk_widget_size_allocate (GTK_WIDGET (content->item),
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
return GTK_WIDGET (content->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
|
|
|
|
}
|
|
|
|
|
|
2010-05-22 05:10: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
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
content->disappearing = 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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gtk_widget_set_size_request (GTK_WIDGET (content->item),
|
|
|
|
|
width, height);
|
2004-01-17 21:03:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gtk_tool_item_toolbar_reconfigured (content->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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
|
toolbar_content_retrieve_menu_item (ToolbarContent *content)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
return gtk_tool_item_retrieve_proxy_menu_item (content->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
|
|
|
|
}
|
|
|
|
|
|
2004-06-05 18:24:53 +00:00
|
|
|
|
static gboolean
|
|
|
|
|
toolbar_content_has_proxy_menu_item (ToolbarContent *content)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
GtkWidget *menu_item;
|
2004-06-05 18:24:53 +00:00
|
|
|
|
|
2010-05-22 05:10:18 +00:00
|
|
|
|
if (content->has_menu == YES)
|
|
|
|
|
return TRUE;
|
|
|
|
|
else if (content->has_menu == NO)
|
|
|
|
|
return FALSE;
|
2004-06-05 18:24:53 +00:00
|
|
|
|
|
2010-05-22 05:10:18 +00:00
|
|
|
|
menu_item = toolbar_content_retrieve_menu_item (content);
|
2004-09-14 21:40:41 +00:00
|
|
|
|
|
2010-05-22 05:10:18 +00:00
|
|
|
|
content->has_menu = menu_item? YES : NO;
|
|
|
|
|
|
|
|
|
|
return menu_item != NULL;
|
2004-06-05 18:24:53 +00:00
|
|
|
|
}
|
2004-09-14 21:40:41 +00:00
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
toolbar_content_set_unknown_menu_status (ToolbarContent *content)
|
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
content->has_menu = UNKNOWN;
|
2004-09-14 21:40:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
return GTK_IS_SEPARATOR_TOOL_ITEM (content->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
|
|
|
|
}
|
|
|
|
|
|
2004-09-08 16:40:31 +00:00
|
|
|
|
static void
|
|
|
|
|
toolbar_content_set_expand (ToolbarContent *content,
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gboolean expand)
|
2004-09-08 16:40:31 +00:00
|
|
|
|
{
|
2010-05-22 05:10:18 +00:00
|
|
|
|
gtk_tool_item_set_expand (content->item, expand);
|
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
|
|
|
|
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
|
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
|
/* GTK+ internal methods */
|
|
|
|
|
gchar *
|
|
|
|
|
_gtk_toolbar_elide_underscores (const gchar *original)
|
|
|
|
|
{
|
|
|
|
|
gchar *q, *result;
|
2006-05-08 18:10:23 +00:00
|
|
|
|
const gchar *p, *end;
|
|
|
|
|
gsize len;
|
2004-03-09 01:21:45 +00:00
|
|
|
|
gboolean last_underscore;
|
|
|
|
|
|
2005-08-26 03:09:36 +00:00
|
|
|
|
if (!original)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
2006-05-08 18:10:23 +00:00
|
|
|
|
len = strlen (original);
|
|
|
|
|
q = result = g_malloc (len + 1);
|
2004-03-09 01:21:45 +00:00
|
|
|
|
last_underscore = FALSE;
|
|
|
|
|
|
2006-05-08 18:10:23 +00:00
|
|
|
|
end = original + len;
|
|
|
|
|
for (p = original; p < end; p++)
|
2004-03-09 01:21:45 +00:00
|
|
|
|
{
|
|
|
|
|
if (!last_underscore && *p == '_')
|
|
|
|
|
last_underscore = TRUE;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
last_underscore = FALSE;
|
2007-04-29 07:20:50 +00:00
|
|
|
|
if (original + 2 <= p && p + 1 <= end &&
|
|
|
|
|
p[-2] == '(' && p[-1] == '_' && p[0] != '_' && p[1] == ')')
|
2006-05-08 18:10:23 +00:00
|
|
|
|
{
|
|
|
|
|
q--;
|
|
|
|
|
*q = '\0';
|
|
|
|
|
p++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
*q++ = *p;
|
2004-03-09 01:21:45 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2005-12-26 07:52:43 +00:00
|
|
|
|
|
2006-05-08 18:10:23 +00:00
|
|
|
|
if (last_underscore)
|
|
|
|
|
*q++ = '_';
|
|
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
|
*q = '\0';
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
2004-09-14 21:40:41 +00:00
|
|
|
|
|
2007-12-14 10:57:46 +00:00
|
|
|
|
static GtkIconSize
|
|
|
|
|
toolbar_get_icon_size (GtkToolShell *shell)
|
2004-09-14 21:40:41 +00:00
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (shell);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
return priv->icon_size;
|
2007-12-14 10:57:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static GtkOrientation
|
|
|
|
|
toolbar_get_orientation (GtkToolShell *shell)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (shell);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
return priv->orientation;
|
2007-12-14 10:57:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static GtkToolbarStyle
|
|
|
|
|
toolbar_get_style (GtkToolShell *shell)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (shell);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2010-08-14 00:00:14 +00:00
|
|
|
|
|
|
|
|
|
return priv->style;
|
2007-12-14 10:57:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
toolbar_rebuild_menu (GtkToolShell *shell)
|
|
|
|
|
{
|
2010-08-14 00:00:14 +00:00
|
|
|
|
GtkToolbar *toolbar = GTK_TOOLBAR (shell);
|
2010-08-26 17:15:37 +00:00
|
|
|
|
GtkToolbarPrivate *priv = toolbar->priv;
|
2004-09-14 21:40:41 +00:00
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
|
|
priv->need_rebuild = TRUE;
|
|
|
|
|
|
|
|
|
|
for (list = priv->content; list != NULL; list = list->next)
|
|
|
|
|
{
|
|
|
|
|
ToolbarContent *content = list->data;
|
|
|
|
|
|
|
|
|
|
toolbar_content_set_unknown_menu_status (content);
|
|
|
|
|
}
|
|
|
|
|
|
2007-12-14 10:57:46 +00:00
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (shell));
|
2004-09-14 21:40:41 +00:00
|
|
|
|
}
|
2011-06-18 16:45:56 +00:00
|
|
|
|
|
2013-02-22 14:14:10 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_toolbar_direction_changed (GtkWidget *widget,
|
|
|
|
|
GtkTextDirection previous_direction)
|
|
|
|
|
{
|
|
|
|
|
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->direction_changed (widget, previous_direction);
|
|
|
|
|
|
2015-07-12 21:11:24 +00:00
|
|
|
|
gtk_css_node_reverse_children (gtk_widget_get_css_node (widget));
|
2013-02-22 14:14:10 +00:00
|
|
|
|
}
|
|
|
|
|
|