Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ee4ba7781 | |||
| 3a03678080 | |||
| badd841246 | |||
| ffafb164d9 | |||
| 8286bd2493 | |||
| ceb0f66e51 | |||
| 3de957405f | |||
| 4361369939 | |||
| 0d353949e2 | |||
| 80c5ac85d4 | |||
| b44c5d0f0c | |||
| 7ac92e74e8 | |||
| eaa98e5cfc | |||
| db496116d9 | |||
| d32d93cc3c | |||
| da74d5d843 | |||
| 44dd4a430d | |||
| fcc38c19d8 | |||
| 737580cc57 | |||
| db025ebfb0 | |||
| 0ae73a09dd | |||
| 2c659472e2 | |||
| 0720955e17 | |||
| 0c90498103 | |||
| bab8d95583 | |||
| 3f2cd052fd | |||
| 0362058f6e | |||
| b59eefd649 | |||
| 287624f406 | |||
| d4ecce94c8 | |||
| 536673ad38 | |||
| 8b424288ba | |||
| f880eba7cd | |||
| ac8d845b3d | |||
| b691a88e07 | |||
| af138bc287 | |||
| 29ce61fcf3 | |||
| 69d2eba366 | |||
| efb837bdb6 | |||
| 5db63aaa6d | |||
| 7e8d27f327 | |||
| 8556b64654 | |||
| 12d38df79e | |||
| 7699e34d83 | |||
| 14ff63b93d |
@@ -13,3 +13,5 @@ gtk-config
|
||||
config.cache
|
||||
ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -1,3 +1,491 @@
|
||||
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.2
|
||||
|
||||
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
|
||||
that we don't do in many other places. (Fixing duplicate
|
||||
#include of config.h)
|
||||
|
||||
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
|
||||
Otherwise, #ifndef XINPUT_NONE check in the latter
|
||||
doesn't work. (Bug #546)
|
||||
|
||||
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
|
||||
binary 2.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
|
||||
"None" case insensitive.
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
|
||||
dest_xid field into two fields - one for the window
|
||||
to send in messages, one to indicate the last looked
|
||||
up window for caching purposes. This is needed, so
|
||||
that Leave messages get the correct window.
|
||||
|
||||
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
|
||||
explicitly for the string "None" - it is in the XPM
|
||||
spec and some servers treat unknown colors in odd ways
|
||||
(like asking the user!)
|
||||
|
||||
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
|
||||
Fix warning created by people mucking around
|
||||
with the gsource API.
|
||||
|
||||
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
|
||||
Change mapping between GIOCondition and GdkInputCondition
|
||||
to match the way the Linux kernel does it. This should
|
||||
fix problems where closed pipes were no longer signalling
|
||||
GDK_INPUT_READ on systems with a native poll().
|
||||
|
||||
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkevents.c: made "->" into a "." of previous change so
|
||||
it compiles
|
||||
|
||||
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
|
||||
|
||||
* autogen.sh: add --enable-maintainer-mode
|
||||
|
||||
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkevents.c (gdk_compress_exposures): Set the
|
||||
window field of the event structure before calling
|
||||
user filters.
|
||||
|
||||
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
|
||||
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
|
||||
|
||||
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:31:52 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
|
||||
intermediate text property - prevents major memory
|
||||
leak when gdk_use_mb.
|
||||
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
|
||||
|
||||
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]
|
||||
|
||||
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
|
||||
sizeof(wchar_t) != sizeof (GdkWChar)
|
||||
|
||||
* 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
|
||||
|
||||
* gdk/gdk.c (gdk_init_check):
|
||||
Remove --xim-preedit and --xim-status from argv properly.
|
||||
|
||||
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
|
||||
that the client window is present on the X server
|
||||
before we pass it to the input method.
|
||||
|
||||
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
|
||||
if --display is specified on the command line, than
|
||||
the drag window will not be created on that display.
|
||||
|
||||
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
|
||||
lookups with only_if_exists == TRUE were inserting
|
||||
bogus values into the atom cache.
|
||||
|
||||
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 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.1
|
||||
|
||||
* INSTALL:
|
||||
README:
|
||||
sanity_check: Updated.
|
||||
|
||||
* docs/gtk-config.1.in:
|
||||
docs/Makefile.am:
|
||||
configure.in: gtk-config is now generated.
|
||||
|
||||
* docs/gtk-config.1: Removed, now generated.
|
||||
|
||||
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 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acinclude.m4
|
||||
* config.guess
|
||||
* config.sub
|
||||
* ltconfig
|
||||
* ltmain.sh: upgrade to libtool 1.2f
|
||||
|
||||
* autogen.sh: libtool is not required to autogen gtk+
|
||||
|
||||
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||
needed)
|
||||
|
||||
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.
|
||||
|
||||
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
|
||||
then reset it to NULL.
|
||||
|
||||
* 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.
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colors_free):
|
||||
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
|
||||
key for g_hash_table_remove() in both functions, this prevents us
|
||||
from accessing possibly uninitialized portions of a GdkColor structure
|
||||
where we are only interested in its pixel value.
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
|
||||
binary 1.
|
||||
|
||||
* NEWS: updates.
|
||||
|
||||
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
|
||||
macro to test for specific gtk versions, e.g.
|
||||
#if GTK_CHECK_VERSION (1,2,1)
|
||||
gtk_menu_ensure_uline_accel_group (menu);
|
||||
#endif /* Gtk+1.2.1 */
|
||||
this macro will return whether the Gtk+ header files are from version
|
||||
major.minor.micro or _newer_, as opposed to gtk_check_version() which
|
||||
requires an exact match for binary compatibility.
|
||||
|
||||
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
|
||||
item factory class has been created.
|
||||
(gtk_item_factory_parse_rc): likewise.
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
keep proper references for old_active_menu_item.
|
||||
(gtk_menu_reparent): unset the usize of the new parent,
|
||||
so the menu can sanely be size requested and we don't get nasty screen
|
||||
artefacts upon next reparentation.
|
||||
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
|
||||
enter notify. only synthesize enter notifies if the pointer really is
|
||||
inside the event window.
|
||||
(gtk_menu_popdown): use gtk_menu_shell_deselect().
|
||||
(gtk_menu_popup): move the background setting stuff into
|
||||
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
|
||||
gtk_menu_shell_select_item() to select the new item.
|
||||
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
|
||||
do the right thing for deselection as well.
|
||||
|
||||
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.[hc]:
|
||||
(gtk_widget_accelerators_locked): return whether a widget's accelerators
|
||||
are locked.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
|
||||
existing accelerators if the widget's accelerators are locked.
|
||||
|
||||
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
|
||||
|
||||
* gtk/gtkmenu.c: truely forward key press and key release events to
|
||||
the menu widget from the toplevel or tearoff window. we can't simply
|
||||
connect to that, we need to stop further processing of the events as
|
||||
well.
|
||||
|
||||
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c:
|
||||
(gtk_menu_key_press): pass event->keyval, event->state to
|
||||
gtk_accelerator_valid, instead of event->keyval twice.
|
||||
refuse to install single letter accelerators for menus that use
|
||||
single letter shortcuts.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
|
||||
gtk_menu_ensure_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
|
||||
which will always return an uline accel group, made
|
||||
gtk_menu_get_uline_accel_group() return NULL if the group isn't
|
||||
yet created.
|
||||
|
||||
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
|
||||
|
||||
* gtk/gtkclist.c (gtk_clist_column_title_passive):
|
||||
Leave button sensitive, trap button_press, button_release,
|
||||
motion_notify, enter_notify and leave_notify events instead.
|
||||
(gtk_clist_column_title_active): disconnect event handler.
|
||||
(gtk_clist_drag_data_get): fixed memory leak. Reported by
|
||||
Guillaume Laurent <glaurent@worldnet.fr>
|
||||
|
||||
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
|
||||
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
|
||||
it was connecting a void function to expose_event and the int
|
||||
returning function to the draw signal
|
||||
|
||||
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
|
||||
width/height mixups.
|
||||
|
||||
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
|
||||
if needed.
|
||||
|
||||
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* merged from 1.3:
|
||||
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
|
||||
the number of calls to gdk_draw_point() (and thus to X) by
|
||||
clipping the points by hand.
|
||||
|
||||
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
|
||||
the clip parameter.
|
||||
(gtk_handle_box_paint): Only paint the handle if the expose area
|
||||
intersects it.
|
||||
|
||||
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/testgtk.c (create_item_factory): unref the item factory after
|
||||
window's destruction.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
|
||||
count on the menu shell around the menu item's activation, since the
|
||||
signal emission may cause menu shell destruction.
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
the previous code leaked one accel group per menu. we use
|
||||
gtk_menu_get_uline_accel_group() now to fix that, and with that
|
||||
also create the underline accelerator group of the menus only if
|
||||
required (i.e. an underline accelerator has been specified).
|
||||
(gtk_item_factory_construct):
|
||||
(gtk_item_factory_create_item): removed code that would create an
|
||||
extra accel group for the menu (and leak references).
|
||||
(gtk_item_factory_create_item): adapted the underline accelerator
|
||||
installation code to properly feature gtk_menu_get_uline_accel_group().
|
||||
|
||||
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
|
||||
menu->accel_group, this may return NULL if the accelerator group
|
||||
hasn't been set yet.
|
||||
added gtk_menu_get_uline_accel_group() to retrive the underline
|
||||
accelerator group of the menu, this will be created on demand
|
||||
and proper care is taken about its reference count.
|
||||
|
||||
* gtk/gtkitemfactory.h:
|
||||
* gtk/gtkitemfactory.c:
|
||||
dumped the approach of keeping a widgets by action list on the
|
||||
factory since the factory<->widget destroy negotiation didn't work
|
||||
and would be hard to get going at all. instead we keep a list of
|
||||
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
|
||||
persistant throughout a program's life time).
|
||||
also, i removed the static const gchar *key_* variables, and made
|
||||
them inline strings (they weren't actually used anyways).
|
||||
(gtk_item_factory_add_item): update ifactory->items.
|
||||
(gtk_item_factory_destroy): destroy ifactory->items (and remove
|
||||
the item factory pointer from the remaining ifactory widgets).
|
||||
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
|
||||
list to find the widget.
|
||||
(gtk_item_factory_get_item): new function that works around
|
||||
gtk_item_factory_get_widget() limitations, this function will only
|
||||
return menu items, even for <Branch> entries.
|
||||
|
||||
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
|
||||
font hash table, if we have a GdkFontPrivate entry for this font
|
||||
already, simply increment its reference count, provided by Olaf Dietsche
|
||||
<olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
|
||||
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
|
||||
|
||||
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.c:
|
||||
(gtk_container_add_with_args):
|
||||
(gtk_container_addv):
|
||||
(gtk_container_add): before adding a child to a conatiner, make sure
|
||||
it is (default) constructed, this is neccessary because under certain
|
||||
circumstances the child will get relized and mapped immediatedly, in
|
||||
which case it has to be constructed already.
|
||||
|
||||
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
|
||||
values > 1 as TRUE also.
|
||||
|
||||
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* Released GTK+ 1.2.0
|
||||
|
||||
@@ -7,8 +7,8 @@ you got this package.
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-1.2.0.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.0 # change to the toplevel directory
|
||||
% gzip -cd gtk+-1.2.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.2 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
@@ -92,7 +92,7 @@ You can compile GTK+ against a copy of GLIB that you have not
|
||||
yet installed. To do this, give the --with-glib=DIR options
|
||||
to ./configure. For instance:
|
||||
|
||||
./configure --with-glib=../glib-1.2.0
|
||||
./configure --with-glib=../glib-1.2.2
|
||||
|
||||
This, however, will not work if you built GLIB with different
|
||||
source and build directories.
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
Overview of Changes in GTK+ 1.2.2:
|
||||
|
||||
* Improved Dnd behaviour with Motif applications.
|
||||
* Bug fixes for the Gtk selection code.
|
||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
||||
* Bug fixes and leak plugs for the Gdk IM code.
|
||||
* Added gtk_object_get() facility to retrive object arguments easily.
|
||||
The var args list expects ("arg-name", &value) pairs.
|
||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
||||
problems where closed pipes were no longer signalling GDK_INPUT_READ on
|
||||
systems with a native poll().
|
||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
||||
anymore).
|
||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
||||
eXodus (commercial X windows server) from popping up a color dialog every
|
||||
time a transparent pixmap is created.
|
||||
* Fixed bug where Gtk timout/idle handlers would execute without the global
|
||||
Gdk lock being held.
|
||||
* Other minor bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.1:
|
||||
|
||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
||||
accelerator installation. This is often required to get GtkItemFactory
|
||||
like accelerator propagation between different windows with the same
|
||||
menu heirarchy and for centralized parsing and saving of accelerators.
|
||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
||||
* Miscellaneous other bug fixes.
|
||||
|
||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
||||
|
||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 1.2.0. GTK+, which stands for the Gimp ToolKit,
|
||||
This is GTK+ version 1.2.2. GTK+, which stands for the Gimp ToolKit,
|
||||
is a library for creating graphical user interfaces for the X Window
|
||||
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||
written in C with a very object-oriented approach.
|
||||
@@ -37,9 +37,9 @@ version number. This should be separated by a blank
|
||||
line from the actual headers.
|
||||
|
||||
Package: gtk+
|
||||
Version: 1.2.0
|
||||
Version: 1.2.2
|
||||
|
||||
[ Please substitute 1.2.0 with the version of GTK+ that
|
||||
[ Please substitute 1.2.2 with the version of GTK+ that
|
||||
you have installed ]
|
||||
|
||||
Then describe the bug. Include:
|
||||
@@ -82,7 +82,7 @@ From: yourname@your.address.org
|
||||
Subject: handlebox test in testgtk is misnamed.
|
||||
|
||||
Package: gtk+
|
||||
Version: 1.2.0
|
||||
Version: 1.2.2
|
||||
|
||||
When I run gtk/testgtk, the button "handle box"
|
||||
is misnamed. There are multiple handle boxes in
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
#undef WITH_SYMBOL_UNDERSCORE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
+278
-196
@@ -1,5 +1,5 @@
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1998 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
@@ -21,28 +21,58 @@
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 29 AM_PROG_LIBTOOL
|
||||
AC_DEFUN(AM_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AM_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AM_PROG_LD])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
|
||||
AC_REQUIRE([AM_SYS_SYMBOL_UNDERSCORE])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
# serial 35 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_SYS_NM_PARSE])dnl
|
||||
AC_REQUIRE([AC_SYS_SYMBOL_UNDERSCORE])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags=
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
|
||||
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
@@ -81,8 +111,8 @@ case "$host" in
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-cygwin32*)
|
||||
AM_SYS_LIBTOOL_CYGWIN32
|
||||
*-*-cygwin*)
|
||||
AC_SYS_LIBTOOL_CYGWIN
|
||||
;;
|
||||
|
||||
esac
|
||||
@@ -97,30 +127,20 @@ need_locks=yes)
|
||||
if test x"$need_locks" = xno; then
|
||||
libtool_flags="$libtool_flags --disable-lock"
|
||||
fi
|
||||
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
# AM_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
|
||||
# AC_LIBTOOL_DLOPEN - check for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [lt_dlopen=yes])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_SHARED,
|
||||
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_DEFUN(AC_ENABLE_SHARED,
|
||||
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
@@ -138,26 +158,22 @@ no) enable_shared=no ;;
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AM_DISABLE_SHARED,
|
||||
[AM_ENABLE_SHARED(no)])
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED,
|
||||
[AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AM_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AM_DISABLE_STATIC,
|
||||
[AM_ENABLE_STATIC(no)])
|
||||
|
||||
# AM_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_STATIC,
|
||||
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_DEFUN(AC_ENABLE_STATIC,
|
||||
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
@@ -175,12 +191,50 @@ no) enable_static=no ;;
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC,
|
||||
[AC_ENABLE_STATIC(no)])
|
||||
|
||||
# AM_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AM_PROG_LD,
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL,
|
||||
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL,
|
||||
[AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
@@ -195,47 +249,15 @@ if test "$ac_cv_prog_gcc" = yes; then
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
/* | [A-Za-z]:/*)
|
||||
# Canonicalize the path of ld
|
||||
/* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
|
||||
changequote([,])dnl
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
case "$host_os" in
|
||||
cygwin*)
|
||||
# Convert to a UNC path for cygwin
|
||||
test -z "$LD" && LD=`echo X$ac_prog | sed -e "1s/^X//" -e "$sub_uncdrive"`
|
||||
;;
|
||||
*)
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
##
|
||||
## FIXME: The code fails later on if we try to use an $LD with
|
||||
## '\\' path separators.
|
||||
##
|
||||
changequote(,)dnl
|
||||
[A-Za-z]:[\\]*)
|
||||
# Canonicalize the path of ld
|
||||
re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
|
||||
sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
|
||||
changequote([,])dnl
|
||||
sub_uncdir='s%\\%/%g'
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
case "$host_os" in
|
||||
cygwin*)
|
||||
# Convert to a UNC path for cygwin
|
||||
test -z "$LD" && LD=`echo X$ac_prog | sed -e 's%^X%%' -e "$sub_uncdrive" -e "$sub_uncdir"`
|
||||
;;
|
||||
*)
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
esac
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
@@ -264,7 +286,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -280,10 +302,10 @@ else
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AM_PROG_LD_GNU
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_PROG_LD_GNU,
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
@@ -293,8 +315,8 @@ else
|
||||
fi])
|
||||
])
|
||||
|
||||
# AM_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AM_PROG_NM,
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
@@ -302,20 +324,22 @@ AC_CACHE_VAL(ac_cv_path_NM,
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM="$ac_dir/nm"
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
@@ -326,11 +350,11 @@ AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AM_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed
|
||||
# AC_SYS_NM_PARSE - Check for command to grab the raw symbol name followed
|
||||
# by C symbol name from nm.
|
||||
AC_DEFUN(AM_SYS_NM_PARSE,
|
||||
AC_DEFUN(AC_SYS_NM_PARSE,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
# Check for command to grab the raw symbol name followed by C symbol from nm.
|
||||
AC_MSG_CHECKING([command to parse $NM output])
|
||||
AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
|
||||
@@ -339,52 +363,51 @@ AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
|
||||
|
||||
changequote(,)dnl
|
||||
# Character class describing NM global symbol codes.
|
||||
ac_symcode='[BCDEGRSTU]'
|
||||
ac_symcode='[BCDEGRST]'
|
||||
|
||||
# Regexp to match symbols that can be accessed directly from C.
|
||||
ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
|
||||
|
||||
# Transform the above into a raw symbol and a C symbol.
|
||||
ac_symxfrm='\1 \1'
|
||||
ac_symxfrm='\1 \2\3 \3'
|
||||
|
||||
# Transform an extracted symbol line into a proper C declaration
|
||||
ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
|
||||
|
||||
# Define system-specific variables.
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
ac_symcode='[BCDTU]'
|
||||
ac_symcode='[BCDT]'
|
||||
;;
|
||||
sunos* | cygwin32* | mingw32*)
|
||||
ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
|
||||
ac_symxfrm='_\1 \1'
|
||||
cygwin* | mingw*)
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
;;
|
||||
hpux*)
|
||||
ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
|
||||
;;
|
||||
irix*)
|
||||
# Cannot use undefined symbols on IRIX because inlined functions mess us up.
|
||||
ac_symcode='[BCDEGRST]'
|
||||
;;
|
||||
solaris*)
|
||||
ac_symcode='[BDTU]'
|
||||
ac_symcode='[BDT]'
|
||||
;;
|
||||
esac
|
||||
|
||||
# If we're using GNU nm, then use its standard symbol codes.
|
||||
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
ac_symcode='[ABCDGISTUW]'
|
||||
fi
|
||||
|
||||
case "$host_os" in
|
||||
cygwin32* | mingw32*)
|
||||
# We do not want undefined symbols on cygwin32. The user must
|
||||
# arrange to define them via -l arguments.
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Write the raw and C identifiers.
|
||||
ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_sympat$/$ac_symxfrm/p'"
|
||||
# Try without a prefix undercore, then with it.
|
||||
for ac_symprfx in "" "_"; do
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
ac_pipe_works=no
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
ac_pipe_works=no
|
||||
rm -f conftest.$ac_ext
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -395,96 +418,100 @@ void nm_test_func(){}
|
||||
#endif
|
||||
int main(){nm_test_var='a';nm_test_func;return 0;}
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
|
||||
mv -f "$ac_nlist"T "$ac_nlist"
|
||||
ac_wcout=`wc "$ac_nlist" 2>/dev/null`
|
||||
changequote(,)dnl
|
||||
ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
changequote([,])dnl
|
||||
(test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1
|
||||
else
|
||||
rm -f "$ac_nlist"T
|
||||
ac_count=-1
|
||||
fi
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
|
||||
# Make sure that we snagged all the symbols we need.
|
||||
if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
|
||||
if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
|
||||
cat <<EOF > conftest.c
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
|
||||
mv -f "$ac_nlist"T "$ac_nlist"
|
||||
else
|
||||
rm -f "$ac_nlist"T
|
||||
fi
|
||||
|
||||
# Make sure that we snagged all the symbols we need.
|
||||
if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
|
||||
if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
|
||||
cat <<EOF > conftest.c
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EOF
|
||||
# Now generate the symbol file.
|
||||
sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
|
||||
# Now generate the symbol file.
|
||||
eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
|
||||
|
||||
cat <<EOF >> conftest.c
|
||||
cat <<EOF >> conftest.c
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# define __ptr_t void *
|
||||
# define lt_ptr_t void *
|
||||
#else
|
||||
# define __ptr_t char *
|
||||
# define lt_ptr_t char *
|
||||
# define const
|
||||
#endif
|
||||
|
||||
/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
|
||||
int dld_preloaded_symbol_count = $ac_count;
|
||||
|
||||
/* The mapping between symbol names and symbols. */
|
||||
struct {
|
||||
char *name;
|
||||
__ptr_t address;
|
||||
const struct {
|
||||
const char *name;
|
||||
lt_ptr_t address;
|
||||
}
|
||||
changequote(,)dnl
|
||||
dld_preloaded_symbols[] =
|
||||
lt_preloaded_symbols[] =
|
||||
changequote([,])dnl
|
||||
{
|
||||
EOF
|
||||
sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
|
||||
cat <<\EOF >> conftest.c
|
||||
{0, (__ptr_t) 0}
|
||||
sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
|
||||
cat <<\EOF >> conftest.c
|
||||
{0, (lt_ptr_t) 0}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
# Now try linking the two files.
|
||||
mv conftest.$ac_objext conftestm.$ac_objext
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
LIBS="conftestm.$ac_objext"
|
||||
CFLAGS="$CFLAGS$no_builtin_flag"
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
||||
ac_pipe_works=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
LIBS="$ac_save_LIBS"
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
# Now try linking the two files.
|
||||
mv conftest.$ac_objext conftestm.$ac_objext
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
LIBS="conftestm.$ac_objext"
|
||||
CFLAGS="$CFLAGS$no_builtin_flag"
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
||||
ac_pipe_works=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
LIBS="$ac_save_LIBS"
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
else
|
||||
echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
|
||||
echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
|
||||
echo "$progname: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "$progname: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
rm -rf conftest*
|
||||
rm -rf conftest*
|
||||
|
||||
# Do not use the global_symbol_pipe unless it works.
|
||||
test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=
|
||||
# Do not use the global_symbol_pipe unless it works.
|
||||
if test "$ac_pipe_works" = yes; then
|
||||
if test x"$ac_symprfx" = x"_"; then
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
else
|
||||
ac_cv_sys_symbol_underscore=no
|
||||
fi
|
||||
break
|
||||
else
|
||||
ac_cv_sys_global_symbol_pipe=
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
ac_result=yes
|
||||
@@ -494,17 +521,17 @@ fi
|
||||
AC_MSG_RESULT($ac_result)
|
||||
])
|
||||
|
||||
# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
|
||||
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
|
||||
# AC_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
|
||||
AC_DEFUN(AC_SYS_LIBTOOL_CYGWIN,
|
||||
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
])
|
||||
|
||||
# AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
|
||||
# AC_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
|
||||
# with an underscore?
|
||||
AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,
|
||||
[AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
|
||||
AC_DEFUN(AC_SYS_SYMBOL_UNDERSCORE,
|
||||
[AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_SYS_NM_PARSE])dnl
|
||||
AC_MSG_CHECKING([for _ prefix in compiled symbols])
|
||||
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
|
||||
[ac_cv_sys_symbol_underscore=no
|
||||
@@ -517,13 +544,13 @@ if AC_TRY_EVAL(ac_compile); then
|
||||
ac_nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
# See whether the symbols have a leading underscore.
|
||||
if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then
|
||||
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
else
|
||||
if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then
|
||||
:
|
||||
if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
|
||||
:
|
||||
else
|
||||
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
fi
|
||||
else
|
||||
@@ -536,12 +563,67 @@ fi
|
||||
rm -rf conftest*
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
|
||||
if test x$ac_cv_sys_symbol_underscore = xyes; then
|
||||
AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,
|
||||
[define if compiled symbols have a leading underscore])
|
||||
fi
|
||||
USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
|
||||
AC_SUBST(USE_SYMBOL_UNDERSCORE)dnl
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM, [
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl)
|
||||
AC_CHECK_LIB(m, cos)
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [
|
||||
AC_CHECK_LIB(ltdl, main, LIBLTDL="-lltdl", [
|
||||
case "$enable_ltdl_install" in
|
||||
no) AC_MSG_WARN([libltdl not installed, but installation disabled]) ;;
|
||||
"") enable_ltdl_install=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install" ;;
|
||||
esac
|
||||
])
|
||||
if test x"$enable_ltdl_install" != x"no"; then
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
AC_DEFUN(AM_SYS_NM_PARSE, [indir([AC_SYS_NM_PARSE])])dnl
|
||||
AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE, [indir([AC_SYS_SYMBOL_UNDERSCORE])])dnl
|
||||
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN, [indir([AC_SYS_LIBTOOL_CYGWIN])])dnl
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
|
||||
+1
-9
@@ -20,14 +20,6 @@ DIE=0
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile $PROJECT."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/libtool-1.2b.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
@@ -88,7 +80,7 @@ automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
$srcdir/configure "$@"
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
|
||||
Vendored
+104
-59
@@ -23,6 +23,7 @@
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -46,7 +47,8 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
@@ -59,7 +61,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >dummy.s
|
||||
cat <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
@@ -76,9 +78,9 @@ main:
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
${CC-cc} $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
@@ -97,7 +99,7 @@ EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
@@ -150,7 +152,7 @@ EOF
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE:*:*:dcosx)
|
||||
NILE*:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
@@ -238,8 +240,12 @@ EOF
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#if defined (host_mips) && defined (MIPSEB)
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
||||
@@ -254,10 +260,10 @@ EOF
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy \
|
||||
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
${CC-cc} $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
@@ -309,7 +315,7 @@ EOF
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
@@ -320,8 +326,8 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
@@ -368,25 +374,25 @@ EOF
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[136790] | 9000/892 )
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
@@ -394,20 +400,20 @@ EOF
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
|
||||
rm -f dummy.c dummy
|
||||
(${CC-cc} $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
@@ -432,8 +438,8 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
@@ -442,6 +448,12 @@ EOF
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
*9??*:MPE*:*:*)
|
||||
echo hppa1.0-hp-mpeix
|
||||
exit 0 ;;
|
||||
*9??*:MPE*:*:*)
|
||||
echo hppa1.0-hp-mpeix
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
@@ -490,6 +502,9 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo t3e-cray-unicosmk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
@@ -510,10 +525,19 @@ EOF
|
||||
sparc*:BSD/OS:*:*)
|
||||
echo sparc-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
if test -x /usr/bin/objformat; then
|
||||
if test "elf" = "`/usr/bin/objformat`"; then
|
||||
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
@@ -523,13 +547,13 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin32
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
@@ -541,6 +565,7 @@ EOF
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
@@ -563,7 +588,7 @@ EOF
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >dummy.s
|
||||
sed 's/^ //' <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
@@ -581,9 +606,9 @@ EOF
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
${CC-cc} $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
@@ -600,22 +625,23 @@ EOF
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
objdump --private-headers dummy | \
|
||||
objdump --private-headers $dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
@@ -625,8 +651,8 @@ main(argc, argv)
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
@@ -645,12 +671,13 @@ EOF
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
@@ -667,8 +694,8 @@ main(argc, argv)
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
@@ -752,7 +779,7 @@ EOF
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:*)
|
||||
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
@@ -764,6 +791,9 @@ EOF
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:ReliantUNIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
@@ -794,7 +824,7 @@ EOF
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
@@ -810,12 +840,24 @@ EOF
|
||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
exit 0 ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
@@ -853,7 +895,10 @@ main ()
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
@@ -913,8 +958,8 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
||||
Vendored
+27
-3
@@ -152,6 +152,7 @@ case $basic_machine in
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
|
||||
| hppa2.0w \
|
||||
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
@@ -176,13 +177,14 @@ case $basic_machine in
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
|
||||
| hppa2.0w-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
|
||||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
| f301-* | armv*-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -345,6 +347,14 @@ case $basic_machine in
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
hp3k9[0-9][0-9] | hp9[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
os=-mpeix
|
||||
;;
|
||||
hp3k9[0-9][0-9] | hp9[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
os=-mpeix
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@@ -412,6 +422,10 @@ case $basic_machine in
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
netwinder)
|
||||
basic_machine=armv4l-corel
|
||||
os=-linux
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
@@ -713,8 +727,9 @@ case $os in
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \
|
||||
| -openstep* | -mpeix* | -oskit*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
@@ -800,6 +815,9 @@ case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-corel)
|
||||
os=-linux
|
||||
;;
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
@@ -920,6 +938,12 @@ case $basic_machine in
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-mpeix*)
|
||||
vendor=hp
|
||||
;;
|
||||
-mpeix*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
|
||||
+9
-5
@@ -29,9 +29,9 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
#
|
||||
GTK_MAJOR_VERSION=1
|
||||
GTK_MINOR_VERSION=2
|
||||
GTK_MICRO_VERSION=0
|
||||
GTK_MICRO_VERSION=2
|
||||
GTK_INTERFACE_AGE=0
|
||||
GTK_BINARY_AGE=0
|
||||
GTK_BINARY_AGE=2
|
||||
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
|
||||
dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
@@ -143,6 +143,9 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
# define a MAINT-like variable REBUILD which is set if Perl
|
||||
# and awk are found, so autogenerated sources can be rebuilt
|
||||
|
||||
@@ -214,9 +217,9 @@ fi
|
||||
if test x$with_glib = x ; then
|
||||
# Look for separately installed glib
|
||||
|
||||
AM_PATH_GLIB(1.2.0,,
|
||||
AM_PATH_GLIB(1.2.2,,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB 1.2.0 or better is required. The latest version of GLIB
|
||||
*** GLIB 1.2.2 or better is required. The latest version of GLIB
|
||||
*** is always available from ftp://ftp.gtk.org/.]),
|
||||
gmodule gthread)
|
||||
|
||||
@@ -416,7 +419,7 @@ need_x_locale=yes)
|
||||
AC_MSG_RESULT($need_x_locale)
|
||||
|
||||
if test $need_x_locale = yes; then
|
||||
GTK_LOCALE_CFLAGS="-DX_LOCALE"
|
||||
GTK_LOCALE_FLAGS="-DX_LOCALE"
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
@@ -511,6 +514,7 @@ AC_SUBST(GTK_LOCALE_FLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
gtk+.spec
|
||||
docs/gtk-config.1
|
||||
Makefile
|
||||
gtk-config
|
||||
po/Makefile.in
|
||||
|
||||
@@ -18,3 +18,4 @@ Makefile.in
|
||||
*.vrs
|
||||
html
|
||||
text
|
||||
gtk-config.1
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ FAQ_FILES=html/gtkfaq.html \
|
||||
text/gtkfaq.txt
|
||||
|
||||
EXTRA_DIST = \
|
||||
gtk-config.1 \
|
||||
gtk-config.1.in \
|
||||
texinfo.tex \
|
||||
macros.texi \
|
||||
gtkdocs_fix \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH GTK+ 1 "25 October 1998" Version 1.2.0
|
||||
.TH GTK+ 1 "25 October 1998" Version @VERSION@
|
||||
.SH NAME
|
||||
gtk-config - script to get information about the installed version of GTK+
|
||||
.SH SYNOPSIS
|
||||
+1
-1
@@ -1109,7 +1109,7 @@ opaque.
|
||||
All widget creation routines in GTK return pointers to GtkWidget
|
||||
structures. In reality, all widget creation routines create structures
|
||||
that can be viewed as equivalent to the GtkWidget structure, but often
|
||||
have contain additional information. @xref{Object Implementation}
|
||||
have contain additional information. @xref{Object Implementation}.
|
||||
|
||||
The widgets available for use are implemented in a hierarchy. Several
|
||||
widgets exist solely as common bases for more specific widgets. For
|
||||
|
||||
@@ -240,7 +240,7 @@ Taking care of proper referencing
|
||||
---------------------------------
|
||||
|
||||
There are some cases where referencing of widgets from outside the toolkit
|
||||
(on the application side is needed).
|
||||
(on the application side) is needed.
|
||||
Once the application performes an operation on a widget that will cause
|
||||
its reference count to drop, if it wants to take further actions on the
|
||||
widget, it needs to hold a reference to it.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
libgdk-pixbuf.la \
|
||||
libpixbuf-png.la
|
||||
|
||||
#
|
||||
# The GdkPixBuf library
|
||||
#
|
||||
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
|
||||
|
||||
libgdk_pixbuf_la_SOURCES = \
|
||||
gdk-pixbuf.c \
|
||||
gdk-pixbuf-io.c
|
||||
|
||||
libgdk_pixbufinclude_HEADERS = \
|
||||
gdk-pixbuf.h
|
||||
|
||||
#
|
||||
# The PNG plugin.
|
||||
#
|
||||
libpixbuf_png_la_SOURCES = \
|
||||
io-png.c
|
||||
@@ -1,15 +0,0 @@
|
||||
#ifndef _GDK_PIXBUF_CACHE_H_
|
||||
#define _GDK_PIXBUF_CACHE_H_
|
||||
|
||||
/* The optional cache interface */
|
||||
typedef struct {
|
||||
int dummy;
|
||||
} GdkPixBufCache;
|
||||
|
||||
GdkPixBufCache *gdk_pixbuf_cache_new (long image_cache_limit,
|
||||
long pixmap_bitmap_cache_limit);
|
||||
void gdk_pixbuf_cache_destroy (GdkPixBufCache *cache);
|
||||
|
||||
GdkPixBuf *gdk_pixbuf_cache_load_image (GdkPixBufCache *cache,
|
||||
const char *file);
|
||||
#endif
|
||||
@@ -1,199 +0,0 @@
|
||||
/*
|
||||
* gdk-pixbuf-io.c: Code to load images into GdkPixBufs
|
||||
*
|
||||
* Author:
|
||||
* Miguel de Icaza (miguel@gnu.org)
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_png (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 28)
|
||||
return FALSE;
|
||||
|
||||
if (buffer [0] != 0x89 ||
|
||||
buffer [1] != 'P' ||
|
||||
buffer [2] != 'N' ||
|
||||
buffer [3] != 'G' ||
|
||||
buffer [4] != 0x0d ||
|
||||
buffer [5] != 0x0a ||
|
||||
buffer [6] != 0x1a ||
|
||||
buffer [7] != 0x0a)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_jpeg (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 10)
|
||||
return FALSE;
|
||||
|
||||
if (buffer [0] != 0xff || buffer [1] != 0xd8)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_tiff (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 10)
|
||||
return FALSE;
|
||||
|
||||
if (buffer [0] == 'M' && buffer [1] == 'M' && buffer [2] == 0 && buffer [3] == 0x2a)
|
||||
return TRUE;
|
||||
|
||||
if (buffer [0] == 'I' && buffer [1] == 'I' && buffer [2] == 0x2a && buffer [3] == 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_gif (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 20)
|
||||
return FALSE;
|
||||
|
||||
if (strncmp (buffer, "GIF8", 4) == 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_xpm (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 20)
|
||||
return FALSE;
|
||||
|
||||
if (strncmp (buffer, "/* XPM */", 9) == 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_bmp (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 20)
|
||||
return FALSE;
|
||||
|
||||
if (buffer [0] != 'B' || buffer [1] != 'M')
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pixbuf_check_ppm (unsigned char *buffer, int size)
|
||||
{
|
||||
if (size < 20)
|
||||
return FALSE;
|
||||
|
||||
if (buffer [0] == 'P'){
|
||||
if (buffer [1] == '1' ||
|
||||
buffer [1] == '2' ||
|
||||
buffer [1] == '3' ||
|
||||
buffer [1] == '4' ||
|
||||
buffer [1] == '5' ||
|
||||
buffer [1] == '6')
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static struct {
|
||||
char *module_name;
|
||||
gboolean (*format_check)(unsigned char *buffer, int size);
|
||||
GModule *module;
|
||||
GdkPixBuf *(*load)(FILE *f)
|
||||
int (*save)(char *filename, ...);
|
||||
} file_formats [] = {
|
||||
{ "png", pixbuf_check_png, NULL, NULL, NULL },
|
||||
{ "jpeg", pixbuf_check_jpeg, NULL, NULL, NULL },
|
||||
{ "tiff", pixbuf_check_tiff, NULL, NULL, NULL },
|
||||
{ "gif", pixbuf_check_gif, NULL, NULL, NULL },
|
||||
{ "xpm", pixbuf_check_xpm, NULL, NULL, NULL }
|
||||
{ "bmp", pixbuf_check_bmp, NULL, NULL, NULL },
|
||||
{ "ppm", pixbuf_check_ppm, NULL, NULL, NULL },
|
||||
{ NULL, NULL, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
static int
|
||||
image_file_format (const char *file)
|
||||
{
|
||||
FILE *f = fopen (file);
|
||||
|
||||
if (!f)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
image_handler_load (int idx)
|
||||
{
|
||||
char *module_name = g_strconcat ("pixbuf-", file_formats [idx].module_name, NULL);
|
||||
char *path;
|
||||
GModule *module;
|
||||
void *load_sym, *save_sym;
|
||||
|
||||
path = g_module_build_path (PIXBUF_LIBDIR, module_name);
|
||||
g_free (module_name);
|
||||
|
||||
module = g_module_open (path, G_MODULE_BIND_LAZY);
|
||||
if (!module)
|
||||
return;
|
||||
|
||||
file_formats [idx].module = module;
|
||||
|
||||
if (g_module_symbol (module, "image_load", &load_sym))
|
||||
file_formats [idx].load = load_sym;
|
||||
|
||||
if (g_module_symbol (module, "image_save", &save_sym))
|
||||
file_formats [idx].save = save_sym;
|
||||
}
|
||||
|
||||
GdkPixBuf *
|
||||
gdk_pixbuf_load_image (const char *file)
|
||||
{
|
||||
GdkPixBuf *pixbuf;
|
||||
FormatLoader format_loader;
|
||||
FILE *f;
|
||||
char buffer [128];
|
||||
|
||||
f = fopen (file);
|
||||
if (!f)
|
||||
return NULL;
|
||||
n = fread (&buffer, 1, sizeof (buffer), f);
|
||||
|
||||
if (n == 0){
|
||||
fclose (f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; file_formats [i].module_name; i++){
|
||||
if ((*file_formats [i].format_check)(buffer, n)){
|
||||
if (!file_formats [i].load)
|
||||
image_handler_load (i);
|
||||
|
||||
if (!file_formats [i].load){
|
||||
fclose (f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rewind (f);
|
||||
pixbuf = (*file_formats [i].load)(f);
|
||||
fclose (f);
|
||||
return pixbuf;
|
||||
}
|
||||
}
|
||||
|
||||
fclose (f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* gdk-pixbuf.c: Resource management.
|
||||
*
|
||||
* Author:
|
||||
* Miguel de Icaza (miguel@gnu.org)
|
||||
*/
|
||||
#include <config.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
|
||||
|
||||
static void
|
||||
gdk_pixbuf_destroy (GdkPixBuf *pixbuf)
|
||||
{
|
||||
art_pixbuf_free (pixbuf->art_pixbuf);
|
||||
g_free (pixbuf);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_pixbuf_ref (GdkPixBuf *pixbuf)
|
||||
{
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
|
||||
pixbuf->ref_count++;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_pixbuf_unref (GdkPixBuf *pixbuf)
|
||||
{
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->ref_count == 0);
|
||||
|
||||
pixbuf->ref_count--;
|
||||
if (pixbuf->ref_count)
|
||||
gdk_pixbuf_destroy (pixbuf);
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef _GDK_PIXBUF_H_
|
||||
#define _GDK_PIXBUF_H_
|
||||
|
||||
#include <libart_lgpl/art_misc.h>
|
||||
#include <libart_lgpl/art_pixbuf.h>
|
||||
|
||||
typedef struct {
|
||||
int ref_count;
|
||||
ArtPixBuf *art_pixbuf;
|
||||
void (*unref_func)(void *gdkpixbuf);
|
||||
} GdkPixBuf;
|
||||
|
||||
GdkPixBuf *gdk_pixbuf_load_image (const char *file);
|
||||
void gdk_pixbuf_save_image (const char *format_id, const char *file, ...);
|
||||
void gdk_pixbuf_ref (GdkPixBuf *pixbuf);
|
||||
void gdk_pixbuf_unref (GdkPixBuf *pixbuf);
|
||||
GdkPixBuf gdk_pixbuf_duplicate (GdkPixBuf *pixbuf);
|
||||
|
||||
#endif /* _GDK_PIXBUF_H_ */
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* io-png.c: GdkPixBuf image loader for PNG files.
|
||||
*
|
||||
* Author:
|
||||
* Miguel de Icaza (miguel@gnu.org)
|
||||
*
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-io.h"
|
||||
#include <png.h>
|
||||
|
||||
/* Shared library entry point */
|
||||
GdkPixBuf *
|
||||
image_load (FILE *f);
|
||||
{
|
||||
png_structp png;
|
||||
png_infop info_ptr, end_info;
|
||||
int width, height, depth, color_type, interlace_type;
|
||||
int have_alpha, number_passes;
|
||||
art_u8 *data;
|
||||
|
||||
g_return_val_if_fail (filename != NULL, NULL);
|
||||
|
||||
png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
if (png)
|
||||
return NULL;
|
||||
|
||||
info_ptr = png_create_info_struct (png);
|
||||
if (!info_ptr){
|
||||
png_destroy_read_struct (&png, NULL, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
end_info = png_create_info_struct (png);
|
||||
if (!end_info){
|
||||
png_destroy_read_struct (&png, &info_ptr, NULL);
|
||||
return NULL:
|
||||
}
|
||||
|
||||
if (setjmp (png->jmpbuf)){
|
||||
png_destroy_read_struct (&png, &info_ptr, &end_info);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
png_init_io (pngptr, f);
|
||||
|
||||
png_read_info (png, info_ptr);
|
||||
png_get_IHDR (png, info_ptr, &width, &height, &depth, &color_type, &interlace_type, NULL, NULL);
|
||||
|
||||
if (color_type == color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_expand (png);
|
||||
|
||||
/*
|
||||
* Strip 16 bit information to 8 bit
|
||||
*/
|
||||
png_set_strip_16 (png);
|
||||
|
||||
/*
|
||||
* Extract multiple pixels with bit depths 1, 2 and 4 from a single
|
||||
* byte into separate bytes
|
||||
*/
|
||||
png_set_packing (png);
|
||||
|
||||
/*
|
||||
* Makes the PNG file to be rendered into RGB or RGBA
|
||||
* modes (no matter of the bit depth nor the image
|
||||
* mode
|
||||
*/
|
||||
png_set_expand (png);
|
||||
|
||||
/*
|
||||
* Simplify loading by always having 4 bytes
|
||||
*/
|
||||
png_set_filler (png, 0xff, PNG_FILLER_AFTER);
|
||||
|
||||
if (color_type & PNG_COLOR_MASK_ALPHA)
|
||||
have_alpha = 1
|
||||
else
|
||||
have_alpha = 0;
|
||||
|
||||
data = art_alloc (width * height * (3 + have_alpha));
|
||||
if (!data){
|
||||
png_destroy_read_struct (&png, &info_ptr, &end_info);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
number_passes = png_set_interlace_handling (png);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef _GDK_PIXBUF_H_
|
||||
#define _GDK_PIXBUF_H_
|
||||
|
||||
#include <libart_lgpl/art_pixbuf.h>
|
||||
|
||||
typedef struct {
|
||||
int ref_count;
|
||||
ArtPixBuf *pixbuf;
|
||||
void (*unref_func)(void *gdkpixbuf);
|
||||
} GdkPixBuf;
|
||||
|
||||
GdkPixBuf *gdk_pixbuf_load_image (const char *file);
|
||||
void gdk_pixbuf_save_image (const char *format_id, const char *file, ...);
|
||||
void gdk_pixbuf_ref (GdkPixBuf *pixbuf);
|
||||
void gdk_pixbuf_unref (GdkPixBuf *pixbuf);
|
||||
GdkPixBuf gdk_pixbuf_duplicate (GdkPixBuf *pixbuf);
|
||||
|
||||
#endif /* _GDK_PIXBUF_H_ */
|
||||
@@ -333,6 +333,7 @@ gdk_init_check (int *argc,
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
|
||||
else if (strcmp ("callbacks", (*argv)[i]) == 0)
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
|
||||
(*argv)[i] = NULL;
|
||||
}
|
||||
}
|
||||
else if (strcmp ("--xim-status", (*argv)[i]) == 0)
|
||||
@@ -348,6 +349,7 @@ gdk_init_check (int *argc,
|
||||
gdk_im_set_best_style (GDK_IM_STATUS_AREA);
|
||||
else if (strcmp ("callbacks", (*argv)[i]) == 0)
|
||||
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
|
||||
(*argv)[i] = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -406,9 +408,9 @@ gdk_init_check (int *argc,
|
||||
g_free(argv_orig[i]);
|
||||
g_free(argv_orig);
|
||||
|
||||
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True);
|
||||
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True);
|
||||
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True);
|
||||
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False);
|
||||
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False);
|
||||
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False);
|
||||
gdk_wm_window_protocols[0] = gdk_wm_delete_window;
|
||||
gdk_wm_window_protocols[1] = gdk_wm_take_focus;
|
||||
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
|
||||
|
||||
+98
-98
@@ -432,55 +432,6 @@ gdk_colors_alloc (GdkColormap *colormap,
|
||||
return return_val;
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colormap_free_colors.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colors_free (GdkColormap *colormap,
|
||||
gulong *in_pixels,
|
||||
gint in_npixels,
|
||||
gulong planes)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (in_pixels != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, in_npixels);
|
||||
|
||||
for (i=0; i<in_npixels; i++)
|
||||
{
|
||||
gulong pixel = in_pixels[i];
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colormap->colors[in_pixels[i]]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, planes);
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------
|
||||
* gdk_color_copy
|
||||
@@ -609,6 +560,104 @@ gdk_color_parse (const gchar *spec,
|
||||
return return_val;
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colormap_free_colors.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colors_free (GdkColormap *colormap,
|
||||
gulong *in_pixels,
|
||||
gint in_npixels,
|
||||
gulong planes)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (in_pixels != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, in_npixels);
|
||||
|
||||
for (i=0; i<in_npixels; i++)
|
||||
{
|
||||
gulong pixel = in_pixels[i];
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, planes);
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colors_free.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colormap_free_colors (GdkColormap *colormap,
|
||||
GdkColor *colors,
|
||||
gint ncolors)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (colors != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, ncolors);
|
||||
|
||||
for (i=0; i<ncolors; i++)
|
||||
{
|
||||
gulong pixel = colors[i].pixel;
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, 0);
|
||||
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/********************
|
||||
* Color allocation *
|
||||
********************/
|
||||
@@ -1026,55 +1075,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap,
|
||||
return success;
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colors_free.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colormap_free_colors (GdkColormap *colormap,
|
||||
GdkColor *colors,
|
||||
gint ncolors)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (colors != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, ncolors);
|
||||
|
||||
for (i=0; i<ncolors; i++)
|
||||
{
|
||||
gulong pixel = colors[i].pixel;
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colors[i]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, 0);
|
||||
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_color_alloc (GdkColormap *colormap,
|
||||
GdkColor *color)
|
||||
|
||||
+21
-30
@@ -31,8 +31,6 @@
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdk.h"
|
||||
|
||||
#define NEW_DRAGS
|
||||
|
||||
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
|
||||
|
||||
typedef enum {
|
||||
@@ -70,7 +68,8 @@ struct _GdkDragContextPrivate {
|
||||
GdkDragAction old_actions; /* The last actions we sent to the source */
|
||||
GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */
|
||||
|
||||
Window dest_xid;
|
||||
Window dest_xid; /* The last window we looked up */
|
||||
Window drop_xid; /* The (non-proxied) window that is receiving drops */
|
||||
guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */
|
||||
guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */
|
||||
guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
|
||||
@@ -196,8 +195,8 @@ gdk_drag_context_find (gboolean is_source,
|
||||
private = (GdkDragContextPrivate *)context;
|
||||
|
||||
context_dest_xid = context->dest_window ?
|
||||
(private->dest_xid ?
|
||||
private->dest_xid :
|
||||
(private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window)) :
|
||||
None;
|
||||
|
||||
@@ -869,7 +868,7 @@ motif_find_drag_window (gboolean create)
|
||||
|
||||
Display *display;
|
||||
XSetWindowAttributes attr;
|
||||
display = XOpenDisplay (NULL);
|
||||
display = XOpenDisplay (gdk_display_name);
|
||||
XSetCloseDownMode (display, RetainPermanent);
|
||||
|
||||
XGrabServer (display);
|
||||
@@ -2106,13 +2105,9 @@ xdnd_send_enter (GdkDragContext *context)
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = (3 << 24); /* version */
|
||||
xev.xclient.data.l[2] = 0;
|
||||
@@ -2162,13 +2157,9 @@ xdnd_send_leave (GdkDragContext *context)
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = 0;
|
||||
@@ -2195,13 +2186,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time)
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = time;
|
||||
@@ -2232,13 +2219,9 @@ xdnd_send_motion (GdkDragContext *context,
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = (x_root << 16) | y_root;
|
||||
@@ -2859,6 +2842,12 @@ gdk_drag_find_window (GdkDragContext *context,
|
||||
|
||||
/* Check if new destination accepts drags, and which protocol */
|
||||
|
||||
/* There is some ugliness here. We actually need to pass
|
||||
* _three_ pieces of information to drag_motion - dest_window,
|
||||
* protocol, and the XID of the unproxied window. The first
|
||||
* two are passed explicitely, the third implicitly through
|
||||
* protocol->dest_xid.
|
||||
*/
|
||||
if ((recipient = gdk_drag_get_protocol (dest, protocol)))
|
||||
{
|
||||
*dest_window = gdk_window_lookup (recipient);
|
||||
@@ -2917,6 +2906,7 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
if (dest_window)
|
||||
{
|
||||
context->dest_window = dest_window;
|
||||
private->drop_xid = private->dest_xid;
|
||||
gdk_window_ref (context->dest_window);
|
||||
context->protocol = protocol;
|
||||
|
||||
@@ -2941,6 +2931,7 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
else
|
||||
{
|
||||
context->dest_window = NULL;
|
||||
private->drop_xid = None;
|
||||
context->action = 0;
|
||||
}
|
||||
|
||||
|
||||
+23
-11
@@ -27,7 +27,6 @@
|
||||
#include "gdk.h"
|
||||
#include "gdkx.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkinput.h"
|
||||
#include "gdkkeysyms.h"
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
@@ -37,6 +36,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "gdkinput.h"
|
||||
|
||||
typedef struct _GdkIOClosure GdkIOClosure;
|
||||
typedef struct _GdkEventPrivate GdkEventPrivate;
|
||||
@@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void);
|
||||
|
||||
static gboolean gdk_event_prepare (gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gint *timeout);
|
||||
gint *timeout,
|
||||
gpointer user_data);
|
||||
static gboolean gdk_event_check (gpointer source_data,
|
||||
GTimeVal *current_time);
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data);
|
||||
static gboolean gdk_event_dispatch (gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data);
|
||||
@@ -449,6 +451,8 @@ gdk_compress_exposures (XEvent *xevent,
|
||||
&tmp_event,
|
||||
expose_predicate,
|
||||
(XPointer)&info);
|
||||
|
||||
event.any.window = window;
|
||||
|
||||
/* We apply filters here, and if it was filtered, completely
|
||||
* ignore the return
|
||||
@@ -849,6 +853,12 @@ gdk_io_destroy (gpointer data)
|
||||
g_free (closure);
|
||||
}
|
||||
|
||||
/* What do we do with G_IO_NVAL?
|
||||
*/
|
||||
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
|
||||
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
|
||||
#define EXCEPTION_CONDITION (G_IO_PRI)
|
||||
|
||||
static gboolean
|
||||
gdk_io_invoke (GIOChannel *source,
|
||||
GIOCondition condition,
|
||||
@@ -857,11 +867,11 @@ gdk_io_invoke (GIOChannel *source,
|
||||
GdkIOClosure *closure = data;
|
||||
GdkInputCondition gdk_cond = 0;
|
||||
|
||||
if (condition & (G_IO_IN | G_IO_PRI))
|
||||
if (condition & READ_CONDITION)
|
||||
gdk_cond |= GDK_INPUT_READ;
|
||||
if (condition & G_IO_OUT)
|
||||
if (condition & WRITE_CONDITION)
|
||||
gdk_cond |= GDK_INPUT_WRITE;
|
||||
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
|
||||
if (condition & EXCEPTION_CONDITION)
|
||||
gdk_cond |= GDK_INPUT_EXCEPTION;
|
||||
|
||||
if (closure->condition & gdk_cond)
|
||||
@@ -888,11 +898,11 @@ gdk_input_add_full (gint source,
|
||||
closure->data = data;
|
||||
|
||||
if (condition & GDK_INPUT_READ)
|
||||
cond |= (G_IO_IN | G_IO_PRI);
|
||||
cond |= READ_CONDITION;
|
||||
if (condition & GDK_INPUT_WRITE)
|
||||
cond |= G_IO_OUT;
|
||||
cond |= WRITE_CONDITION;
|
||||
if (condition & GDK_INPUT_EXCEPTION)
|
||||
cond |= G_IO_ERR|G_IO_HUP|G_IO_NVAL;
|
||||
cond |= EXCEPTION_CONDITION;
|
||||
|
||||
channel = g_io_channel_unix_new (source);
|
||||
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
|
||||
@@ -2017,7 +2027,8 @@ gdk_events_queue (void)
|
||||
static gboolean
|
||||
gdk_event_prepare (gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gint *timeout)
|
||||
gint *timeout,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
@@ -2034,7 +2045,8 @@ gdk_event_prepare (gpointer source_data,
|
||||
|
||||
static gboolean
|
||||
gdk_event_check (gpointer source_data,
|
||||
GTimeVal *current_time)
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
|
||||
+37
-14
@@ -34,27 +34,37 @@ gdk_font_load (const gchar *font_name)
|
||||
{
|
||||
GdkFont *font;
|
||||
GdkFontPrivate *private;
|
||||
XFontStruct *xfont;
|
||||
|
||||
private = g_new (GdkFontPrivate, 1);
|
||||
font = (GdkFont*) private;
|
||||
g_return_val_if_fail (font_name != NULL, NULL);
|
||||
|
||||
private->xdisplay = gdk_display;
|
||||
private->xfont = XLoadQueryFont (private->xdisplay, font_name);
|
||||
private->ref_count = 1;
|
||||
xfont = XLoadQueryFont (gdk_display, font_name);
|
||||
if (xfont == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!private->xfont)
|
||||
font = gdk_font_lookup (xfont->fid);
|
||||
if (font != NULL)
|
||||
{
|
||||
g_free (font);
|
||||
return NULL;
|
||||
private = (GdkFontPrivate *) font;
|
||||
if (xfont != private->xfont)
|
||||
XFreeFont (gdk_display, xfont);
|
||||
|
||||
gdk_font_ref (font);
|
||||
}
|
||||
else
|
||||
{
|
||||
font->type = GDK_FONT_FONT;
|
||||
font->ascent = ((XFontStruct *) private->xfont)->ascent;
|
||||
font->descent = ((XFontStruct *) private->xfont)->descent;
|
||||
}
|
||||
private = g_new (GdkFontPrivate, 1);
|
||||
private->xdisplay = gdk_display;
|
||||
private->xfont = xfont;
|
||||
private->ref_count = 1;
|
||||
|
||||
gdk_xid_table_insert (&((XFontStruct *) private->xfont)->fid, font);
|
||||
font = (GdkFont*) private;
|
||||
font->type = GDK_FONT_FONT;
|
||||
font->ascent = xfont->ascent;
|
||||
font->descent = xfont->descent;
|
||||
|
||||
gdk_xid_table_insert (&xfont->fid, font);
|
||||
}
|
||||
|
||||
return font;
|
||||
}
|
||||
@@ -568,7 +578,20 @@ gdk_text_extents_wc (GdkFont *font,
|
||||
}
|
||||
case GDK_FONT_FONTSET:
|
||||
fontset = (XFontSet) private->xfont;
|
||||
XwcTextExtents (fontset, text, text_length, &ink, &logical);
|
||||
|
||||
if (sizeof(GdkWChar) == sizeof(wchar_t))
|
||||
XwcTextExtents (fontset, (wchar_t *)text, text_length, &ink, &logical);
|
||||
else
|
||||
{
|
||||
wchar_t *text_wchar;
|
||||
gint i;
|
||||
|
||||
text_wchar = g_new (wchar_t, text_length);
|
||||
for (i = 0; i < text_length; i++)
|
||||
text_wchar[i] = text[i];
|
||||
XwcTextExtents (fontset, text_wchar, text_length, &ink, &logical);
|
||||
g_free (text_wchar);
|
||||
}
|
||||
if (lbearing)
|
||||
*lbearing = ink.x;
|
||||
if (rbearing)
|
||||
|
||||
@@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic)
|
||||
break;
|
||||
}
|
||||
|
||||
/* We have to ensure that the client window is actually created on
|
||||
* the X server, or XCreateIC fails because the XIM server can't get
|
||||
* information about the client window.
|
||||
*/
|
||||
gdk_flush();
|
||||
|
||||
if (preedit_attr != NULL && status_attr != NULL)
|
||||
private->xic = XCreateIC (xim_im,
|
||||
XNInputStyle,
|
||||
@@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
|
||||
!= Success)
|
||||
{
|
||||
/* InvalidChar */
|
||||
XFree(tpr.value);
|
||||
return -1;
|
||||
}
|
||||
XFree(tpr.value);
|
||||
if (num_wstrs == 0)
|
||||
return 0;
|
||||
wstr_src = wstrs[0];
|
||||
|
||||
+1
-1
@@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window,
|
||||
|
||||
color_name = gdk_pixmap_extract_color (buffer);
|
||||
|
||||
if (color_name == NULL ||
|
||||
if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
|
||||
gdk_color_parse (color_name, &color->color) == FALSE)
|
||||
{
|
||||
color->color = *transparent_color;
|
||||
|
||||
+4
-3
@@ -45,9 +45,10 @@ gdk_atom_intern (const gchar *atom_name,
|
||||
{
|
||||
retval = XInternAtom (gdk_display, atom_name, only_if_exists);
|
||||
|
||||
g_hash_table_insert (atom_hash,
|
||||
g_strdup (atom_name),
|
||||
GUINT_TO_POINTER (retval));
|
||||
if (retval != None || !only_if_exists)
|
||||
g_hash_table_insert (atom_hash,
|
||||
g_strdup (atom_name),
|
||||
GUINT_TO_POINTER (retval));
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
+4
-4
@@ -105,7 +105,7 @@ gdk_selection_property_get (GdkWindow *requestor,
|
||||
gulong length;
|
||||
GdkAtom prop_type;
|
||||
gint prop_format;
|
||||
guchar *t;
|
||||
guchar *t = NULL;
|
||||
|
||||
g_return_val_if_fail (requestor != NULL, 0);
|
||||
|
||||
@@ -133,11 +133,11 @@ gdk_selection_property_get (GdkWindow *requestor,
|
||||
*data = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (t)
|
||||
{
|
||||
t = NULL;
|
||||
XFree (t);
|
||||
t = NULL;
|
||||
}
|
||||
|
||||
/* Add on an extra byte to handle null termination. X guarantees
|
||||
@@ -188,7 +188,7 @@ gdk_selection_send_notify (guint32 requestor,
|
||||
xevent.property = property;
|
||||
xevent.time = time;
|
||||
|
||||
XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent);
|
||||
gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
|
||||
}
|
||||
|
||||
gint
|
||||
|
||||
+3
-11
@@ -34,17 +34,9 @@
|
||||
#include "gdkprivate.h"
|
||||
#include "MwmUtil.h"
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# endif
|
||||
#else
|
||||
# include <stdlib.h>
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#ifdef HAVE_SHAPE_EXT
|
||||
|
||||
+98
-98
@@ -432,55 +432,6 @@ gdk_colors_alloc (GdkColormap *colormap,
|
||||
return return_val;
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colormap_free_colors.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colors_free (GdkColormap *colormap,
|
||||
gulong *in_pixels,
|
||||
gint in_npixels,
|
||||
gulong planes)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (in_pixels != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, in_npixels);
|
||||
|
||||
for (i=0; i<in_npixels; i++)
|
||||
{
|
||||
gulong pixel = in_pixels[i];
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colormap->colors[in_pixels[i]]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, planes);
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------
|
||||
* gdk_color_copy
|
||||
@@ -609,6 +560,104 @@ gdk_color_parse (const gchar *spec,
|
||||
return return_val;
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colormap_free_colors.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colors_free (GdkColormap *colormap,
|
||||
gulong *in_pixels,
|
||||
gint in_npixels,
|
||||
gulong planes)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (in_pixels != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, in_npixels);
|
||||
|
||||
for (i=0; i<in_npixels; i++)
|
||||
{
|
||||
gulong pixel = in_pixels[i];
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, planes);
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colors_free.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colormap_free_colors (GdkColormap *colormap,
|
||||
GdkColor *colors,
|
||||
gint ncolors)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (colors != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, ncolors);
|
||||
|
||||
for (i=0; i<ncolors; i++)
|
||||
{
|
||||
gulong pixel = colors[i].pixel;
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, 0);
|
||||
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/********************
|
||||
* Color allocation *
|
||||
********************/
|
||||
@@ -1026,55 +1075,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap,
|
||||
return success;
|
||||
}
|
||||
|
||||
/* This is almost identical to gdk_colors_free.
|
||||
* Keep them in sync!
|
||||
*/
|
||||
void
|
||||
gdk_colormap_free_colors (GdkColormap *colormap,
|
||||
GdkColor *colors,
|
||||
gint ncolors)
|
||||
{
|
||||
GdkColormapPrivate *private;
|
||||
gulong *pixels;
|
||||
gint npixels = 0;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (colors != NULL);
|
||||
|
||||
private = (GdkColormapPrivate*) colormap;
|
||||
|
||||
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
|
||||
(private->visual->type != GDK_VISUAL_GRAYSCALE))
|
||||
return;
|
||||
|
||||
pixels = g_new (gulong, ncolors);
|
||||
|
||||
for (i=0; i<ncolors; i++)
|
||||
{
|
||||
gulong pixel = colors[i].pixel;
|
||||
|
||||
if (private->info[pixel].ref_count)
|
||||
{
|
||||
private->info[pixel].ref_count--;
|
||||
|
||||
if (private->info[pixel].ref_count == 0)
|
||||
{
|
||||
pixels[npixels++] = pixel;
|
||||
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
|
||||
g_hash_table_remove (private->hash, &colors[i]);
|
||||
private->info[pixel].flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npixels)
|
||||
XFreeColors (private->xdisplay, private->xcolormap,
|
||||
pixels, npixels, 0);
|
||||
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_color_alloc (GdkColormap *colormap,
|
||||
GdkColor *color)
|
||||
|
||||
+21
-30
@@ -31,8 +31,6 @@
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdk.h"
|
||||
|
||||
#define NEW_DRAGS
|
||||
|
||||
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
|
||||
|
||||
typedef enum {
|
||||
@@ -70,7 +68,8 @@ struct _GdkDragContextPrivate {
|
||||
GdkDragAction old_actions; /* The last actions we sent to the source */
|
||||
GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */
|
||||
|
||||
Window dest_xid;
|
||||
Window dest_xid; /* The last window we looked up */
|
||||
Window drop_xid; /* The (non-proxied) window that is receiving drops */
|
||||
guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */
|
||||
guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */
|
||||
guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
|
||||
@@ -196,8 +195,8 @@ gdk_drag_context_find (gboolean is_source,
|
||||
private = (GdkDragContextPrivate *)context;
|
||||
|
||||
context_dest_xid = context->dest_window ?
|
||||
(private->dest_xid ?
|
||||
private->dest_xid :
|
||||
(private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window)) :
|
||||
None;
|
||||
|
||||
@@ -869,7 +868,7 @@ motif_find_drag_window (gboolean create)
|
||||
|
||||
Display *display;
|
||||
XSetWindowAttributes attr;
|
||||
display = XOpenDisplay (NULL);
|
||||
display = XOpenDisplay (gdk_display_name);
|
||||
XSetCloseDownMode (display, RetainPermanent);
|
||||
|
||||
XGrabServer (display);
|
||||
@@ -2106,13 +2105,9 @@ xdnd_send_enter (GdkDragContext *context)
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = (3 << 24); /* version */
|
||||
xev.xclient.data.l[2] = 0;
|
||||
@@ -2162,13 +2157,9 @@ xdnd_send_leave (GdkDragContext *context)
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = 0;
|
||||
@@ -2195,13 +2186,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time)
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = time;
|
||||
@@ -2232,13 +2219,9 @@ xdnd_send_motion (GdkDragContext *context,
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
|
||||
xev.xclient.format = 32;
|
||||
#ifdef NEW_DRAGS
|
||||
xev.xclient.window = private->dest_xid ?
|
||||
private->dest_xid :
|
||||
xev.xclient.window = private->drop_xid ?
|
||||
private->drop_xid :
|
||||
GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#else
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
|
||||
#endif
|
||||
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = (x_root << 16) | y_root;
|
||||
@@ -2859,6 +2842,12 @@ gdk_drag_find_window (GdkDragContext *context,
|
||||
|
||||
/* Check if new destination accepts drags, and which protocol */
|
||||
|
||||
/* There is some ugliness here. We actually need to pass
|
||||
* _three_ pieces of information to drag_motion - dest_window,
|
||||
* protocol, and the XID of the unproxied window. The first
|
||||
* two are passed explicitely, the third implicitly through
|
||||
* protocol->dest_xid.
|
||||
*/
|
||||
if ((recipient = gdk_drag_get_protocol (dest, protocol)))
|
||||
{
|
||||
*dest_window = gdk_window_lookup (recipient);
|
||||
@@ -2917,6 +2906,7 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
if (dest_window)
|
||||
{
|
||||
context->dest_window = dest_window;
|
||||
private->drop_xid = private->dest_xid;
|
||||
gdk_window_ref (context->dest_window);
|
||||
context->protocol = protocol;
|
||||
|
||||
@@ -2941,6 +2931,7 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
else
|
||||
{
|
||||
context->dest_window = NULL;
|
||||
private->drop_xid = None;
|
||||
context->action = 0;
|
||||
}
|
||||
|
||||
|
||||
+23
-11
@@ -27,7 +27,6 @@
|
||||
#include "gdk.h"
|
||||
#include "gdkx.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkinput.h"
|
||||
#include "gdkkeysyms.h"
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
@@ -37,6 +36,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "gdkinput.h"
|
||||
|
||||
typedef struct _GdkIOClosure GdkIOClosure;
|
||||
typedef struct _GdkEventPrivate GdkEventPrivate;
|
||||
@@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void);
|
||||
|
||||
static gboolean gdk_event_prepare (gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gint *timeout);
|
||||
gint *timeout,
|
||||
gpointer user_data);
|
||||
static gboolean gdk_event_check (gpointer source_data,
|
||||
GTimeVal *current_time);
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data);
|
||||
static gboolean gdk_event_dispatch (gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data);
|
||||
@@ -449,6 +451,8 @@ gdk_compress_exposures (XEvent *xevent,
|
||||
&tmp_event,
|
||||
expose_predicate,
|
||||
(XPointer)&info);
|
||||
|
||||
event.any.window = window;
|
||||
|
||||
/* We apply filters here, and if it was filtered, completely
|
||||
* ignore the return
|
||||
@@ -849,6 +853,12 @@ gdk_io_destroy (gpointer data)
|
||||
g_free (closure);
|
||||
}
|
||||
|
||||
/* What do we do with G_IO_NVAL?
|
||||
*/
|
||||
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
|
||||
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
|
||||
#define EXCEPTION_CONDITION (G_IO_PRI)
|
||||
|
||||
static gboolean
|
||||
gdk_io_invoke (GIOChannel *source,
|
||||
GIOCondition condition,
|
||||
@@ -857,11 +867,11 @@ gdk_io_invoke (GIOChannel *source,
|
||||
GdkIOClosure *closure = data;
|
||||
GdkInputCondition gdk_cond = 0;
|
||||
|
||||
if (condition & (G_IO_IN | G_IO_PRI))
|
||||
if (condition & READ_CONDITION)
|
||||
gdk_cond |= GDK_INPUT_READ;
|
||||
if (condition & G_IO_OUT)
|
||||
if (condition & WRITE_CONDITION)
|
||||
gdk_cond |= GDK_INPUT_WRITE;
|
||||
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
|
||||
if (condition & EXCEPTION_CONDITION)
|
||||
gdk_cond |= GDK_INPUT_EXCEPTION;
|
||||
|
||||
if (closure->condition & gdk_cond)
|
||||
@@ -888,11 +898,11 @@ gdk_input_add_full (gint source,
|
||||
closure->data = data;
|
||||
|
||||
if (condition & GDK_INPUT_READ)
|
||||
cond |= (G_IO_IN | G_IO_PRI);
|
||||
cond |= READ_CONDITION;
|
||||
if (condition & GDK_INPUT_WRITE)
|
||||
cond |= G_IO_OUT;
|
||||
cond |= WRITE_CONDITION;
|
||||
if (condition & GDK_INPUT_EXCEPTION)
|
||||
cond |= G_IO_ERR|G_IO_HUP|G_IO_NVAL;
|
||||
cond |= EXCEPTION_CONDITION;
|
||||
|
||||
channel = g_io_channel_unix_new (source);
|
||||
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
|
||||
@@ -2017,7 +2027,8 @@ gdk_events_queue (void)
|
||||
static gboolean
|
||||
gdk_event_prepare (gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gint *timeout)
|
||||
gint *timeout,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
@@ -2034,7 +2045,8 @@ gdk_event_prepare (gpointer source_data,
|
||||
|
||||
static gboolean
|
||||
gdk_event_check (gpointer source_data,
|
||||
GTimeVal *current_time)
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
|
||||
+37
-14
@@ -34,27 +34,37 @@ gdk_font_load (const gchar *font_name)
|
||||
{
|
||||
GdkFont *font;
|
||||
GdkFontPrivate *private;
|
||||
XFontStruct *xfont;
|
||||
|
||||
private = g_new (GdkFontPrivate, 1);
|
||||
font = (GdkFont*) private;
|
||||
g_return_val_if_fail (font_name != NULL, NULL);
|
||||
|
||||
private->xdisplay = gdk_display;
|
||||
private->xfont = XLoadQueryFont (private->xdisplay, font_name);
|
||||
private->ref_count = 1;
|
||||
xfont = XLoadQueryFont (gdk_display, font_name);
|
||||
if (xfont == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!private->xfont)
|
||||
font = gdk_font_lookup (xfont->fid);
|
||||
if (font != NULL)
|
||||
{
|
||||
g_free (font);
|
||||
return NULL;
|
||||
private = (GdkFontPrivate *) font;
|
||||
if (xfont != private->xfont)
|
||||
XFreeFont (gdk_display, xfont);
|
||||
|
||||
gdk_font_ref (font);
|
||||
}
|
||||
else
|
||||
{
|
||||
font->type = GDK_FONT_FONT;
|
||||
font->ascent = ((XFontStruct *) private->xfont)->ascent;
|
||||
font->descent = ((XFontStruct *) private->xfont)->descent;
|
||||
}
|
||||
private = g_new (GdkFontPrivate, 1);
|
||||
private->xdisplay = gdk_display;
|
||||
private->xfont = xfont;
|
||||
private->ref_count = 1;
|
||||
|
||||
gdk_xid_table_insert (&((XFontStruct *) private->xfont)->fid, font);
|
||||
font = (GdkFont*) private;
|
||||
font->type = GDK_FONT_FONT;
|
||||
font->ascent = xfont->ascent;
|
||||
font->descent = xfont->descent;
|
||||
|
||||
gdk_xid_table_insert (&xfont->fid, font);
|
||||
}
|
||||
|
||||
return font;
|
||||
}
|
||||
@@ -568,7 +578,20 @@ gdk_text_extents_wc (GdkFont *font,
|
||||
}
|
||||
case GDK_FONT_FONTSET:
|
||||
fontset = (XFontSet) private->xfont;
|
||||
XwcTextExtents (fontset, text, text_length, &ink, &logical);
|
||||
|
||||
if (sizeof(GdkWChar) == sizeof(wchar_t))
|
||||
XwcTextExtents (fontset, (wchar_t *)text, text_length, &ink, &logical);
|
||||
else
|
||||
{
|
||||
wchar_t *text_wchar;
|
||||
gint i;
|
||||
|
||||
text_wchar = g_new (wchar_t, text_length);
|
||||
for (i = 0; i < text_length; i++)
|
||||
text_wchar[i] = text[i];
|
||||
XwcTextExtents (fontset, text_wchar, text_length, &ink, &logical);
|
||||
g_free (text_wchar);
|
||||
}
|
||||
if (lbearing)
|
||||
*lbearing = ink.x;
|
||||
if (rbearing)
|
||||
|
||||
@@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic)
|
||||
break;
|
||||
}
|
||||
|
||||
/* We have to ensure that the client window is actually created on
|
||||
* the X server, or XCreateIC fails because the XIM server can't get
|
||||
* information about the client window.
|
||||
*/
|
||||
gdk_flush();
|
||||
|
||||
if (preedit_attr != NULL && status_attr != NULL)
|
||||
private->xic = XCreateIC (xim_im,
|
||||
XNInputStyle,
|
||||
@@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
|
||||
!= Success)
|
||||
{
|
||||
/* InvalidChar */
|
||||
XFree(tpr.value);
|
||||
return -1;
|
||||
}
|
||||
XFree(tpr.value);
|
||||
if (num_wstrs == 0)
|
||||
return 0;
|
||||
wstr_src = wstrs[0];
|
||||
|
||||
@@ -333,6 +333,7 @@ gdk_init_check (int *argc,
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
|
||||
else if (strcmp ("callbacks", (*argv)[i]) == 0)
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
|
||||
(*argv)[i] = NULL;
|
||||
}
|
||||
}
|
||||
else if (strcmp ("--xim-status", (*argv)[i]) == 0)
|
||||
@@ -348,6 +349,7 @@ gdk_init_check (int *argc,
|
||||
gdk_im_set_best_style (GDK_IM_STATUS_AREA);
|
||||
else if (strcmp ("callbacks", (*argv)[i]) == 0)
|
||||
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
|
||||
(*argv)[i] = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -406,9 +408,9 @@ gdk_init_check (int *argc,
|
||||
g_free(argv_orig[i]);
|
||||
g_free(argv_orig);
|
||||
|
||||
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True);
|
||||
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True);
|
||||
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True);
|
||||
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False);
|
||||
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False);
|
||||
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False);
|
||||
gdk_wm_window_protocols[0] = gdk_wm_delete_window;
|
||||
gdk_wm_window_protocols[1] = gdk_wm_take_focus;
|
||||
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
|
||||
|
||||
@@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window,
|
||||
|
||||
color_name = gdk_pixmap_extract_color (buffer);
|
||||
|
||||
if (color_name == NULL ||
|
||||
if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
|
||||
gdk_color_parse (color_name, &color->color) == FALSE)
|
||||
{
|
||||
color->color = *transparent_color;
|
||||
|
||||
@@ -45,9 +45,10 @@ gdk_atom_intern (const gchar *atom_name,
|
||||
{
|
||||
retval = XInternAtom (gdk_display, atom_name, only_if_exists);
|
||||
|
||||
g_hash_table_insert (atom_hash,
|
||||
g_strdup (atom_name),
|
||||
GUINT_TO_POINTER (retval));
|
||||
if (retval != None || !only_if_exists)
|
||||
g_hash_table_insert (atom_hash,
|
||||
g_strdup (atom_name),
|
||||
GUINT_TO_POINTER (retval));
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
@@ -105,7 +105,7 @@ gdk_selection_property_get (GdkWindow *requestor,
|
||||
gulong length;
|
||||
GdkAtom prop_type;
|
||||
gint prop_format;
|
||||
guchar *t;
|
||||
guchar *t = NULL;
|
||||
|
||||
g_return_val_if_fail (requestor != NULL, 0);
|
||||
|
||||
@@ -133,11 +133,11 @@ gdk_selection_property_get (GdkWindow *requestor,
|
||||
*data = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (t)
|
||||
{
|
||||
t = NULL;
|
||||
XFree (t);
|
||||
t = NULL;
|
||||
}
|
||||
|
||||
/* Add on an extra byte to handle null termination. X guarantees
|
||||
@@ -188,7 +188,7 @@ gdk_selection_send_notify (guint32 requestor,
|
||||
xevent.property = property;
|
||||
xevent.time = time;
|
||||
|
||||
XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent);
|
||||
gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
|
||||
}
|
||||
|
||||
gint
|
||||
|
||||
+3
-11
@@ -34,17 +34,9 @@
|
||||
#include "gdkprivate.h"
|
||||
#include "MwmUtil.h"
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# endif
|
||||
#else
|
||||
# include <stdlib.h>
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#ifdef HAVE_SHAPE_EXT
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
# Note that this is NOT a relocatable package
|
||||
%define ver @VERSION@
|
||||
%define rel SNAP
|
||||
%define rel 1
|
||||
%define prefix /usr
|
||||
|
||||
Summary: The Gimp Toolkit
|
||||
@@ -148,10 +148,10 @@ fi
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS COPYING ChangeLog NEWS README TODO
|
||||
%{prefix}/lib/libgtk-1.1.so.*
|
||||
%{prefix}/lib/libgdk-1.1.so.*
|
||||
{prefix}/share/themes/Default
|
||||
+%{prefix}/share/locale/*/*/*
|
||||
%{prefix}/lib/libgtk-1.2.so.*
|
||||
%{prefix}/lib/libgdk-1.2.so.*
|
||||
%{prefix}/share/themes/Default
|
||||
%{prefix}/share/locale/*/*/*
|
||||
|
||||
|
||||
%files devel
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include "gtkaccelgroup.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
+220
-5
@@ -422,17 +422,40 @@ gtk_arg_copy (GtkArg *src_arg,
|
||||
}
|
||||
|
||||
void
|
||||
gtk_arg_free (GtkArg *arg,
|
||||
gboolean free_contents)
|
||||
gtk_arg_free (GtkArg *arg,
|
||||
gboolean free_contents)
|
||||
{
|
||||
g_return_if_fail (arg != NULL);
|
||||
|
||||
if (free_contents &&
|
||||
GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING)
|
||||
g_free (GTK_VALUE_STRING (*arg));
|
||||
if (free_contents)
|
||||
gtk_arg_reset (arg);
|
||||
g_free (arg);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_arg_reset (GtkArg *arg)
|
||||
{
|
||||
GtkType fundamental_type;
|
||||
|
||||
g_return_if_fail (arg != NULL);
|
||||
|
||||
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
|
||||
if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
|
||||
{
|
||||
fundamental_type = gtk_type_get_varargs_type (fundamental_type);
|
||||
if (!fundamental_type)
|
||||
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
|
||||
}
|
||||
|
||||
if (fundamental_type == GTK_TYPE_STRING)
|
||||
{
|
||||
g_free (GTK_VALUE_STRING (*arg));
|
||||
arg->type = GTK_TYPE_INVALID;
|
||||
}
|
||||
else if (arg->type != GTK_TYPE_INVALID)
|
||||
arg->type = GTK_TYPE_INVALID;
|
||||
}
|
||||
|
||||
gint
|
||||
gtk_arg_info_equal (gconstpointer arg_info_1,
|
||||
gconstpointer arg_info_2)
|
||||
@@ -466,3 +489,195 @@ gtk_arg_info_hash (gconstpointer arg_info)
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_arg_values_equal (const GtkArg *arg1,
|
||||
const GtkArg *arg2)
|
||||
{
|
||||
GtkType fundamental_type;
|
||||
gboolean equal;
|
||||
|
||||
g_return_val_if_fail (arg1 != NULL, FALSE);
|
||||
g_return_val_if_fail (arg2 != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_FUNDAMENTAL_TYPE (arg1->type) ==
|
||||
GTK_FUNDAMENTAL_TYPE (arg2->type), FALSE);
|
||||
|
||||
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg1->type);
|
||||
if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
|
||||
{
|
||||
fundamental_type = gtk_type_get_varargs_type (fundamental_type);
|
||||
if (!fundamental_type)
|
||||
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg1->type);
|
||||
}
|
||||
|
||||
switch (fundamental_type)
|
||||
{
|
||||
case GTK_TYPE_INVALID:
|
||||
equal = TRUE;
|
||||
break;
|
||||
case GTK_TYPE_CHAR:
|
||||
equal = GTK_VALUE_CHAR (*arg1) == GTK_VALUE_CHAR (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_BOOL:
|
||||
equal = (GTK_VALUE_BOOL (*arg1) != FALSE) == (GTK_VALUE_BOOL (*arg2) != FALSE);
|
||||
break;
|
||||
case GTK_TYPE_INT:
|
||||
equal = GTK_VALUE_INT (*arg1) == GTK_VALUE_INT (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_UINT:
|
||||
equal = GTK_VALUE_UINT (*arg1) == GTK_VALUE_UINT (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_LONG:
|
||||
equal = GTK_VALUE_LONG (*arg1) == GTK_VALUE_LONG (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_ULONG:
|
||||
equal = GTK_VALUE_ULONG (*arg1) == GTK_VALUE_ULONG (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_FLOAT:
|
||||
equal = GTK_VALUE_FLOAT (*arg1) == GTK_VALUE_FLOAT (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_DOUBLE:
|
||||
equal = GTK_VALUE_DOUBLE (*arg1) == GTK_VALUE_DOUBLE (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_STRING:
|
||||
if (!GTK_VALUE_STRING (*arg1) ||
|
||||
!GTK_VALUE_STRING (*arg2))
|
||||
equal = GTK_VALUE_STRING (*arg1) == GTK_VALUE_STRING (*arg2);
|
||||
else
|
||||
equal = g_str_equal (GTK_VALUE_STRING (*arg1), GTK_VALUE_STRING (*arg2));
|
||||
break;
|
||||
case GTK_TYPE_ENUM:
|
||||
equal = GTK_VALUE_ENUM (*arg1) == GTK_VALUE_ENUM (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_FLAGS:
|
||||
equal = GTK_VALUE_FLAGS (*arg1) == GTK_VALUE_FLAGS (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_BOXED:
|
||||
equal = GTK_VALUE_BOXED (*arg1) == GTK_VALUE_BOXED (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_FOREIGN:
|
||||
equal = (GTK_VALUE_FOREIGN (*arg1).data == GTK_VALUE_FOREIGN (*arg2).data &&
|
||||
GTK_VALUE_FOREIGN (*arg1).notify == GTK_VALUE_FOREIGN (*arg2).notify);
|
||||
break;
|
||||
case GTK_TYPE_CALLBACK:
|
||||
equal = (GTK_VALUE_CALLBACK (*arg1).marshal == GTK_VALUE_CALLBACK (*arg2).marshal &&
|
||||
GTK_VALUE_CALLBACK (*arg1).data == GTK_VALUE_CALLBACK (*arg2).data &&
|
||||
GTK_VALUE_CALLBACK (*arg1).notify == GTK_VALUE_CALLBACK (*arg2).notify);
|
||||
break;
|
||||
case GTK_TYPE_ARGS:
|
||||
equal = (GTK_VALUE_ARGS (*arg1).n_args == GTK_VALUE_ARGS (*arg2).n_args &&
|
||||
GTK_VALUE_ARGS (*arg1).args == GTK_VALUE_ARGS (*arg2).args);
|
||||
break;
|
||||
case GTK_TYPE_OBJECT:
|
||||
equal = GTK_VALUE_OBJECT (*arg1) == GTK_VALUE_OBJECT (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_POINTER:
|
||||
equal = GTK_VALUE_POINTER (*arg1) == GTK_VALUE_POINTER (*arg2);
|
||||
break;
|
||||
case GTK_TYPE_SIGNAL:
|
||||
equal = (GTK_VALUE_SIGNAL (*arg1).f == GTK_VALUE_SIGNAL (*arg2).f &&
|
||||
GTK_VALUE_SIGNAL (*arg1).d == GTK_VALUE_SIGNAL (*arg2).d);
|
||||
break;
|
||||
case GTK_TYPE_C_CALLBACK:
|
||||
equal = (GTK_VALUE_C_CALLBACK (*arg1).func == GTK_VALUE_C_CALLBACK (*arg2).func &&
|
||||
GTK_VALUE_C_CALLBACK (*arg1).func_data == GTK_VALUE_C_CALLBACK (*arg2).func_data);
|
||||
break;
|
||||
default:
|
||||
g_warning ("gtk_arg_values_equal() used with unknown type `%s'", gtk_type_name (arg1->type));
|
||||
equal = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return equal;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_arg_to_valueloc (GtkArg *arg,
|
||||
gpointer value_pointer)
|
||||
{
|
||||
GtkType fundamental_type;
|
||||
|
||||
g_return_if_fail (arg != NULL);
|
||||
g_return_if_fail (value_pointer != NULL);
|
||||
|
||||
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
|
||||
if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
|
||||
{
|
||||
fundamental_type = gtk_type_get_varargs_type (fundamental_type);
|
||||
if (!fundamental_type)
|
||||
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
|
||||
}
|
||||
|
||||
switch (fundamental_type)
|
||||
{
|
||||
gchar *p_char;
|
||||
guchar *p_uchar;
|
||||
gboolean *p_boolean;
|
||||
gint *p_int;
|
||||
guint *p_uint;
|
||||
glong *p_long;
|
||||
gulong *p_ulong;
|
||||
gfloat *p_float;
|
||||
gdouble *p_double;
|
||||
gpointer *p_pointer;
|
||||
case GTK_TYPE_CHAR:
|
||||
p_char = value_pointer;
|
||||
*p_char = GTK_VALUE_CHAR (*arg);
|
||||
break;
|
||||
case GTK_TYPE_UCHAR:
|
||||
p_uchar = value_pointer;
|
||||
*p_uchar = GTK_VALUE_UCHAR (*arg);
|
||||
break;
|
||||
case GTK_TYPE_BOOL:
|
||||
p_boolean = value_pointer;
|
||||
*p_boolean = GTK_VALUE_BOOL (*arg);
|
||||
break;
|
||||
case GTK_TYPE_INT:
|
||||
case GTK_TYPE_ENUM:
|
||||
p_int = value_pointer;
|
||||
*p_int = GTK_VALUE_INT (*arg);
|
||||
break;
|
||||
case GTK_TYPE_UINT:
|
||||
case GTK_TYPE_FLAGS:
|
||||
p_uint = value_pointer;
|
||||
*p_uint = GTK_VALUE_UINT (*arg);
|
||||
break;
|
||||
case GTK_TYPE_LONG:
|
||||
p_long = value_pointer;
|
||||
*p_long = GTK_VALUE_LONG (*arg);
|
||||
break;
|
||||
case GTK_TYPE_ULONG:
|
||||
p_ulong = value_pointer;
|
||||
*p_ulong = GTK_VALUE_ULONG (*arg);
|
||||
break;
|
||||
case GTK_TYPE_FLOAT:
|
||||
p_float = value_pointer;
|
||||
*p_float = GTK_VALUE_FLOAT (*arg);
|
||||
break;
|
||||
case GTK_TYPE_DOUBLE:
|
||||
p_double = value_pointer;
|
||||
*p_double = GTK_VALUE_DOUBLE (*arg);
|
||||
break;
|
||||
case GTK_TYPE_STRING:
|
||||
case GTK_TYPE_POINTER:
|
||||
case GTK_TYPE_BOXED:
|
||||
case GTK_TYPE_OBJECT:
|
||||
p_pointer = value_pointer;
|
||||
*p_pointer = GTK_VALUE_POINTER (*arg);
|
||||
break;
|
||||
case GTK_TYPE_SIGNAL:
|
||||
case GTK_TYPE_ARGS:
|
||||
case GTK_TYPE_FOREIGN:
|
||||
case GTK_TYPE_CALLBACK:
|
||||
case GTK_TYPE_C_CALLBACK:
|
||||
case GTK_TYPE_NONE:
|
||||
case GTK_TYPE_INVALID:
|
||||
/* it doesn't make much sense to retrive these values,
|
||||
* they either are always read-only args, or require
|
||||
* multiple pointers.
|
||||
*/
|
||||
g_warning ("gtk_arg_fill_retloc(): unsupported argument type `%s'",
|
||||
gtk_type_name (arg->type));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-4
@@ -63,6 +63,9 @@ GtkArg* gtk_arg_copy (GtkArg *src_arg,
|
||||
GtkArg *dest_arg);
|
||||
void gtk_arg_free (GtkArg *arg,
|
||||
gboolean free_contents);
|
||||
void gtk_arg_reset (GtkArg *arg);
|
||||
gboolean gtk_arg_values_equal (const GtkArg *arg1,
|
||||
const GtkArg *arg2);
|
||||
gchar* gtk_args_collect (GtkType object_type,
|
||||
GHashTable *arg_info_hash_table,
|
||||
GSList **arg_list_p,
|
||||
@@ -87,10 +90,12 @@ GtkArg* gtk_args_query (GtkType class_type,
|
||||
guint32 **arg_flags,
|
||||
guint *n_args_p);
|
||||
gchar* gtk_arg_name_strip_type (const gchar *arg_name);
|
||||
gint gtk_arg_info_equal (gconstpointer arg_info_1,
|
||||
gconstpointer arg_info_2);
|
||||
guint gtk_arg_info_hash (gconstpointer arg_info);
|
||||
|
||||
gint gtk_arg_info_equal (gconstpointer arg_info_1,
|
||||
gconstpointer arg_info_2);
|
||||
guint gtk_arg_info_hash (gconstpointer arg_info);
|
||||
void gtk_arg_to_valueloc (GtkArg *arg,
|
||||
gpointer value_pointer);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+8
-5
@@ -167,10 +167,13 @@ gtk_bin_draw (GtkWidget *widget,
|
||||
g_return_if_fail (GTK_IS_BIN (widget));
|
||||
|
||||
bin = GTK_BIN (widget);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child) &&
|
||||
gtk_widget_intersect (bin->child, area, &child_area))
|
||||
gtk_widget_draw (bin->child, &child_area);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (bin))
|
||||
{
|
||||
if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
|
||||
gtk_widget_intersect (bin->child, area, &child_area))
|
||||
gtk_widget_draw (bin->child, &child_area);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -189,7 +192,7 @@ gtk_bin_expose (GtkWidget *widget,
|
||||
bin = GTK_BIN (widget);
|
||||
|
||||
child_event = *event;
|
||||
if (bin->child &&
|
||||
if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
|
||||
GTK_WIDGET_NO_WINDOW (bin->child) &&
|
||||
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
|
||||
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "gtkbindings.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
+4
-2
@@ -660,7 +660,8 @@ gtk_box_draw (GtkWidget *widget,
|
||||
child = children->data;
|
||||
children = children->next;
|
||||
|
||||
if (gtk_widget_intersect (child->widget, area, &child_area))
|
||||
if (GTK_WIDGET_DRAWABLE (child->widget) &&
|
||||
gtk_widget_intersect (child->widget, area, &child_area))
|
||||
gtk_widget_draw (child->widget, &child_area);
|
||||
}
|
||||
}
|
||||
@@ -691,7 +692,8 @@ gtk_box_expose (GtkWidget *widget,
|
||||
child = children->data;
|
||||
children = children->next;
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (child->widget) &&
|
||||
if (GTK_WIDGET_DRAWABLE (child->widget) &&
|
||||
GTK_WIDGET_NO_WINDOW (child->widget) &&
|
||||
gtk_widget_intersect (child->widget, &event->area, &child_event.area))
|
||||
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
|
||||
}
|
||||
|
||||
+173
-136
@@ -39,7 +39,7 @@
|
||||
#define MAX_BUTTON 5
|
||||
|
||||
/* the number rows memchunk expands at a time */
|
||||
#define CLIST_OPTIMUM_SIZE 512
|
||||
#define CLIST_OPTIMUM_SIZE 64
|
||||
|
||||
/* the width of the column resize windows */
|
||||
#define DRAG_WIDTH 6
|
||||
@@ -438,11 +438,14 @@ static GList *gtk_clist_mergesort (GtkCList *clist,
|
||||
GList *list,
|
||||
gint num);
|
||||
/* Misc */
|
||||
static gboolean title_focus (GtkCList *clist,
|
||||
gint dir);
|
||||
static void real_row_move (GtkCList *clist,
|
||||
gint source_row,
|
||||
gint dest_row);
|
||||
static gboolean title_focus (GtkCList *clist,
|
||||
gint dir);
|
||||
static void real_row_move (GtkCList *clist,
|
||||
gint source_row,
|
||||
gint dest_row);
|
||||
static gint column_title_passive_func (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
|
||||
|
||||
|
||||
@@ -1296,39 +1299,49 @@ gtk_clist_column_title_active (GtkCList *clist,
|
||||
|
||||
if (column < 0 || column >= clist->columns)
|
||||
return;
|
||||
if (!clist->column[column].button)
|
||||
if (!clist->column[column].button || !clist->column[column].button_passive)
|
||||
return;
|
||||
|
||||
if (!GTK_WIDGET_SENSITIVE (clist->column[column].button) ||
|
||||
!GTK_WIDGET_CAN_FOCUS (clist->column[column].button))
|
||||
{
|
||||
GTK_WIDGET_SET_FLAGS (clist->column[column].button,
|
||||
GTK_SENSITIVE | GTK_CAN_FOCUS);
|
||||
if (GTK_WIDGET_VISIBLE (clist))
|
||||
gtk_widget_queue_draw (clist->column[column].button);
|
||||
}
|
||||
clist->column[column].button_passive = FALSE;
|
||||
|
||||
gtk_signal_disconnect_by_func (GTK_OBJECT (clist->column[column].button),
|
||||
(GtkSignalFunc) column_title_passive_func,
|
||||
NULL);
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
|
||||
if (GTK_WIDGET_VISIBLE (clist))
|
||||
gtk_widget_queue_draw (clist->column[column].button);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_clist_column_title_passive (GtkCList *clist,
|
||||
gint column)
|
||||
{
|
||||
GtkButton *button;
|
||||
|
||||
g_return_if_fail (clist != NULL);
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if (column < 0 || column >= clist->columns)
|
||||
return;
|
||||
if (!clist->column[column].button)
|
||||
if (!clist->column[column].button || clist->column[column].button_passive)
|
||||
return;
|
||||
|
||||
if (GTK_WIDGET_SENSITIVE (clist->column[column].button) ||
|
||||
GTK_WIDGET_CAN_FOCUS (clist->column[column].button))
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (clist->column[column].button,
|
||||
GTK_SENSITIVE | GTK_CAN_FOCUS);
|
||||
if (GTK_WIDGET_VISIBLE (clist))
|
||||
gtk_widget_queue_draw (clist->column[column].button);
|
||||
}
|
||||
button = GTK_BUTTON (clist->column[column].button);
|
||||
|
||||
clist->column[column].button_passive = TRUE;
|
||||
|
||||
if (button->button_down)
|
||||
gtk_button_released (button);
|
||||
if (button->in_button)
|
||||
gtk_button_leave (button);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (clist->column[column].button), "event",
|
||||
(GtkSignalFunc) column_title_passive_func, NULL);
|
||||
|
||||
GTK_WIDGET_UNSET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
|
||||
if (GTK_WIDGET_VISIBLE (clist))
|
||||
gtk_widget_queue_draw (clist->column[column].button);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1764,6 +1777,7 @@ gtk_clist_set_column_max_width (GtkCList *clist,
|
||||
* new_column_width
|
||||
* column_button_create
|
||||
* column_button_clicked
|
||||
* column_title_passive_func
|
||||
*/
|
||||
static void
|
||||
column_auto_resize (GtkCList *clist,
|
||||
@@ -2079,7 +2093,6 @@ column_button_create (GtkCList *clist,
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) column_button_clicked,
|
||||
(gpointer) clist);
|
||||
|
||||
gtk_widget_show (button);
|
||||
}
|
||||
|
||||
@@ -2103,84 +2116,29 @@ column_button_clicked (GtkWidget *widget,
|
||||
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[CLICK_COLUMN], i);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_clist_set_row_height (GtkCList *clist,
|
||||
guint height)
|
||||
static gint
|
||||
column_title_passive_func (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
g_return_if_fail (clist != NULL);
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
widget = GTK_WIDGET (clist);
|
||||
|
||||
if (height > 0)
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
switch (event->type)
|
||||
{
|
||||
clist->row_height = height;
|
||||
GTK_CLIST_SET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
|
||||
case GDK_MOTION_NOTIFY:
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
case GDK_3BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
case GDK_ENTER_NOTIFY:
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
return TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
GTK_CLIST_UNSET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
|
||||
clist->row_height = 0;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_REALIZED (clist))
|
||||
{
|
||||
if (!GTK_CLIST_ROW_HEIGHT_SET(clist))
|
||||
{
|
||||
clist->row_height = (widget->style->font->ascent +
|
||||
widget->style->font->descent + 1);
|
||||
clist->row_center_offset = widget->style->font->ascent + 1.5;
|
||||
}
|
||||
else
|
||||
clist->row_center_offset = 1.5 + (clist->row_height +
|
||||
widget->style->font->ascent -
|
||||
widget->style->font->descent - 1) / 2;
|
||||
}
|
||||
|
||||
CLIST_REFRESH (clist);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_clist_moveto (GtkCList *clist,
|
||||
gint row,
|
||||
gint column,
|
||||
gfloat row_align,
|
||||
gfloat col_align)
|
||||
{
|
||||
g_return_if_fail (clist != NULL);
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if (row < -1 || row >= clist->rows)
|
||||
return;
|
||||
if (column < -1 || column >= clist->columns)
|
||||
return;
|
||||
|
||||
row_align = CLAMP (row_align, 0, 1);
|
||||
col_align = CLAMP (col_align, 0, 1);
|
||||
|
||||
/* adjust horizontal scrollbar */
|
||||
if (clist->hadjustment && column >= 0)
|
||||
{
|
||||
gint x;
|
||||
|
||||
x = (COLUMN_LEFT (clist, column) - CELL_SPACING - COLUMN_INSET -
|
||||
(col_align * (clist->clist_window_width - 2 * COLUMN_INSET -
|
||||
CELL_SPACING - clist->column[column].area.width)));
|
||||
if (x < 0)
|
||||
gtk_adjustment_set_value (clist->hadjustment, 0.0);
|
||||
else if (x > LIST_WIDTH (clist) - clist->clist_window_width)
|
||||
gtk_adjustment_set_value
|
||||
(clist->hadjustment, LIST_WIDTH (clist) - clist->clist_window_width);
|
||||
else
|
||||
gtk_adjustment_set_value (clist->hadjustment, x);
|
||||
}
|
||||
|
||||
/* adjust vertical scrollbar */
|
||||
if (clist->vadjustment && row >= 0)
|
||||
move_vertical (clist, row, row_align);
|
||||
}
|
||||
|
||||
/* PUBLIC CELL FUNCTIONS
|
||||
* gtk_clist_get_cell_type
|
||||
@@ -2413,7 +2371,7 @@ gtk_clist_set_shift (GtkCList *clist,
|
||||
gint vertical,
|
||||
gint horizontal)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
GtkRequisition requisition = { 0 };
|
||||
GtkCListRow *clist_row;
|
||||
|
||||
g_return_if_fail (clist != NULL);
|
||||
@@ -2934,6 +2892,8 @@ real_row_move (GtkCList *clist,
|
||||
}
|
||||
|
||||
/* PUBLIC ROW FUNCTIONS
|
||||
* gtk_clist_moveto
|
||||
* gtk_clist_set_row_height
|
||||
* gtk_clist_set_row_data
|
||||
* gtk_clist_set_row_data_full
|
||||
* gtk_clist_get_row_data
|
||||
@@ -2944,6 +2904,85 @@ real_row_move (GtkCList *clist,
|
||||
* gtk_clist_set_foreground
|
||||
* gtk_clist_set_background
|
||||
*/
|
||||
void
|
||||
gtk_clist_moveto (GtkCList *clist,
|
||||
gint row,
|
||||
gint column,
|
||||
gfloat row_align,
|
||||
gfloat col_align)
|
||||
{
|
||||
g_return_if_fail (clist != NULL);
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if (row < -1 || row >= clist->rows)
|
||||
return;
|
||||
if (column < -1 || column >= clist->columns)
|
||||
return;
|
||||
|
||||
row_align = CLAMP (row_align, 0, 1);
|
||||
col_align = CLAMP (col_align, 0, 1);
|
||||
|
||||
/* adjust horizontal scrollbar */
|
||||
if (clist->hadjustment && column >= 0)
|
||||
{
|
||||
gint x;
|
||||
|
||||
x = (COLUMN_LEFT (clist, column) - CELL_SPACING - COLUMN_INSET -
|
||||
(col_align * (clist->clist_window_width - 2 * COLUMN_INSET -
|
||||
CELL_SPACING - clist->column[column].area.width)));
|
||||
if (x < 0)
|
||||
gtk_adjustment_set_value (clist->hadjustment, 0.0);
|
||||
else if (x > LIST_WIDTH (clist) - clist->clist_window_width)
|
||||
gtk_adjustment_set_value
|
||||
(clist->hadjustment, LIST_WIDTH (clist) - clist->clist_window_width);
|
||||
else
|
||||
gtk_adjustment_set_value (clist->hadjustment, x);
|
||||
}
|
||||
|
||||
/* adjust vertical scrollbar */
|
||||
if (clist->vadjustment && row >= 0)
|
||||
move_vertical (clist, row, row_align);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_clist_set_row_height (GtkCList *clist,
|
||||
guint height)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
g_return_if_fail (clist != NULL);
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
widget = GTK_WIDGET (clist);
|
||||
|
||||
if (height > 0)
|
||||
{
|
||||
clist->row_height = height;
|
||||
GTK_CLIST_SET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
|
||||
}
|
||||
else
|
||||
{
|
||||
GTK_CLIST_UNSET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
|
||||
clist->row_height = 0;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_REALIZED (clist))
|
||||
{
|
||||
if (!GTK_CLIST_ROW_HEIGHT_SET(clist))
|
||||
{
|
||||
clist->row_height = (widget->style->font->ascent +
|
||||
widget->style->font->descent + 1);
|
||||
clist->row_center_offset = widget->style->font->ascent + 1.5;
|
||||
}
|
||||
else
|
||||
clist->row_center_offset = 1.5 + (clist->row_height +
|
||||
widget->style->font->ascent -
|
||||
widget->style->font->descent - 1) / 2;
|
||||
}
|
||||
|
||||
CLIST_REFRESH (clist);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_clist_set_row_data (GtkCList *clist,
|
||||
gint row,
|
||||
@@ -3152,7 +3191,7 @@ gtk_clist_set_cell_style (GtkCList *clist,
|
||||
gint column,
|
||||
GtkStyle *style)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
GtkRequisition requisition = { 0 };
|
||||
GtkCListRow *clist_row;
|
||||
|
||||
g_return_if_fail (clist != NULL);
|
||||
@@ -4517,8 +4556,12 @@ gtk_clist_unrealize (GtkWidget *widget)
|
||||
/* freeze the list */
|
||||
clist->freeze_count++;
|
||||
|
||||
/* detach optional row/cell styles */
|
||||
if (GTK_WIDGET_MAPPED (widget))
|
||||
gtk_clist_unmap (widget);
|
||||
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
|
||||
|
||||
/* detach optional row/cell styles */
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
GtkCListRow *clist_row;
|
||||
@@ -4545,12 +4588,16 @@ gtk_clist_unrealize (GtkWidget *widget)
|
||||
gdk_gc_destroy (clist->bg_gc);
|
||||
|
||||
for (i = 0; i < clist->columns; i++)
|
||||
if (clist->column[i].window)
|
||||
{
|
||||
gdk_window_set_user_data (clist->column[i].window, NULL);
|
||||
gdk_window_destroy (clist->column[i].window);
|
||||
clist->column[i].window = NULL;
|
||||
}
|
||||
{
|
||||
if (clist->column[i].button)
|
||||
gtk_widget_unrealize (clist->column[i].button);
|
||||
if (clist->column[i].window)
|
||||
{
|
||||
gdk_window_set_user_data (clist->column[i].window, NULL);
|
||||
gdk_window_destroy (clist->column[i].window);
|
||||
clist->column[i].window = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gdk_window_set_user_data (clist->clist_window, NULL);
|
||||
gdk_window_destroy (clist->clist_window);
|
||||
@@ -4586,10 +4633,12 @@ gtk_clist_map (GtkWidget *widget)
|
||||
|
||||
/* map column buttons */
|
||||
for (i = 0; i < clist->columns; i++)
|
||||
if (clist->column[i].button &&
|
||||
GTK_WIDGET_VISIBLE (clist->column[i].button) &&
|
||||
!GTK_WIDGET_MAPPED (clist->column[i].button))
|
||||
gtk_widget_map (clist->column[i].button);
|
||||
{
|
||||
if (clist->column[i].button &&
|
||||
GTK_WIDGET_VISIBLE (clist->column[i].button) &&
|
||||
!GTK_WIDGET_MAPPED (clist->column[i].button))
|
||||
gtk_widget_map (clist->column[i].button);
|
||||
}
|
||||
|
||||
for (i = 0; i < clist->columns; i++)
|
||||
if (clist->column[i].window && clist->column[i].button)
|
||||
@@ -6356,6 +6405,7 @@ columns_new (GtkCList *clist)
|
||||
column[i].width_set = FALSE;
|
||||
column[i].resizeable = TRUE;
|
||||
column[i].auto_resize = FALSE;
|
||||
column[i].button_passive = FALSE;
|
||||
column[i].justification = GTK_JUSTIFY_LEFT;
|
||||
}
|
||||
|
||||
@@ -7038,19 +7088,14 @@ move_vertical (GtkCList *clist,
|
||||
static gint
|
||||
horizontal_timeout (GtkCList *clist)
|
||||
{
|
||||
gint x, y;
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
GdkEventMotion event = { 0 };
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
clist->htimer = 0;
|
||||
gdk_window_get_pointer (clist->clist_window, &x, &y, &mask);
|
||||
|
||||
event.is_hint = 0;
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
event.state = mask;
|
||||
event.type = GDK_MOTION_NOTIFY;
|
||||
event.send_event = TRUE;
|
||||
|
||||
gtk_clist_motion (GTK_WIDGET (clist), &event);
|
||||
|
||||
@@ -7062,19 +7107,14 @@ horizontal_timeout (GtkCList *clist)
|
||||
static gint
|
||||
vertical_timeout (GtkCList *clist)
|
||||
{
|
||||
gint x, y;
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
GdkEventMotion event = { 0 };
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
clist->vtimer = 0;
|
||||
gdk_window_get_pointer (clist->clist_window, &x, &y, &mask);
|
||||
|
||||
event.is_hint = 0;
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
event.state = mask;
|
||||
event.type = GDK_MOTION_NOTIFY;
|
||||
event.send_event = TRUE;
|
||||
|
||||
gtk_clist_motion (GTK_WIDGET (clist), &event);
|
||||
|
||||
@@ -7708,21 +7748,18 @@ gtk_clist_drag_data_get (GtkWidget *widget,
|
||||
|
||||
if (info)
|
||||
{
|
||||
GtkCListCellInfo *ret_info;
|
||||
GtkCListCellInfo ret_info;
|
||||
|
||||
ret_info = g_new (GtkCListCellInfo, 1);
|
||||
ret_info->row = info->row;
|
||||
ret_info->column = info->column;
|
||||
ret_info.row = info->row;
|
||||
ret_info.column = info->column;
|
||||
|
||||
gtk_selection_data_set (selection_data,
|
||||
selection_data->target,
|
||||
GTK_TYPE_POINTER,
|
||||
(guchar *) ret_info,
|
||||
gtk_selection_data_set (selection_data, selection_data->target,
|
||||
GTK_TYPE_POINTER, (guchar *) &ret_info,
|
||||
sizeof (GtkCListCellInfo));
|
||||
}
|
||||
else
|
||||
gtk_selection_data_set (selection_data, selection_data->target,
|
||||
GTK_TYPE_POINTER, NULL, 0);
|
||||
GTK_TYPE_POINTER, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -330,10 +330,11 @@ struct _GtkCListColumn
|
||||
gint max_width;
|
||||
GtkJustification justification;
|
||||
|
||||
guint visible : 1;
|
||||
guint width_set : 1;
|
||||
guint resizeable : 1;
|
||||
guint auto_resize : 1;
|
||||
guint visible : 1;
|
||||
guint width_set : 1;
|
||||
guint resizeable : 1;
|
||||
guint auto_resize : 1;
|
||||
guint button_passive : 1;
|
||||
};
|
||||
|
||||
struct _GtkCListRow
|
||||
|
||||
@@ -1145,10 +1145,14 @@ gtk_color_selection_wheel_timeout (GtkColorSelection *colorsel)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
gdk_window_get_pointer (colorsel->wheel_area->window, &x, &y, NULL);
|
||||
gtk_color_selection_update_wheel (colorsel, x, y);
|
||||
gtk_color_selection_color_changed (colorsel);
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,8 @@ gtk_container_add_with_args (GtkContainer *container,
|
||||
gtk_widget_ref (GTK_WIDGET (container));
|
||||
gtk_widget_ref (widget);
|
||||
|
||||
if (!GTK_OBJECT_CONSTRUCTED (widget))
|
||||
gtk_object_default_construct (GTK_OBJECT (widget));
|
||||
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
|
||||
|
||||
if (widget->parent)
|
||||
@@ -322,6 +324,8 @@ gtk_container_addv (GtkContainer *container,
|
||||
gtk_widget_ref (GTK_WIDGET (container));
|
||||
gtk_widget_ref (widget);
|
||||
|
||||
if (!GTK_OBJECT_CONSTRUCTED (widget))
|
||||
gtk_object_default_construct (GTK_OBJECT (widget));
|
||||
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
|
||||
|
||||
if (widget->parent)
|
||||
@@ -703,6 +707,8 @@ gtk_container_add (GtkContainer *container,
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (widget->parent == NULL);
|
||||
|
||||
if (!GTK_OBJECT_CONSTRUCTED (widget))
|
||||
gtk_object_default_construct (GTK_OBJECT (widget));
|
||||
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
|
||||
}
|
||||
|
||||
|
||||
+1
-18
@@ -3065,24 +3065,7 @@ tree_delete (GtkCTree *ctree,
|
||||
GtkCTreeNode *node,
|
||||
gpointer data)
|
||||
{
|
||||
GtkCList *clist;
|
||||
|
||||
clist = GTK_CLIST (ctree);
|
||||
|
||||
if (GTK_CTREE_ROW (node)->row.state == GTK_STATE_SELECTED)
|
||||
{
|
||||
GList *work;
|
||||
|
||||
work = g_list_find (clist->selection, node);
|
||||
if (work)
|
||||
{
|
||||
if (clist->selection_end && clist->selection_end == work)
|
||||
clist->selection_end = clist->selection_end->prev;
|
||||
clist->selection = g_list_remove_link (clist->selection, work);
|
||||
g_list_free_1 (work);
|
||||
}
|
||||
}
|
||||
|
||||
tree_unselect (ctree, node, NULL);
|
||||
row_delete (ctree, GTK_CTREE_ROW (node));
|
||||
g_list_free_1 ((GList *)node);
|
||||
}
|
||||
|
||||
+27
-11
@@ -744,10 +744,10 @@ void
|
||||
gtk_drag_highlight (GtkWidget *widget)
|
||||
{
|
||||
gtk_signal_connect_after (GTK_OBJECT (widget), "draw",
|
||||
GTK_SIGNAL_FUNC (gtk_drag_highlight_expose),
|
||||
GTK_SIGNAL_FUNC (gtk_drag_highlight_paint),
|
||||
NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (widget), "expose_event",
|
||||
GTK_SIGNAL_FUNC (gtk_drag_highlight_paint),
|
||||
GTK_SIGNAL_FUNC (gtk_drag_highlight_expose),
|
||||
NULL);
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
@@ -953,7 +953,17 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
gint tx, ty;
|
||||
|
||||
if (event->type == GDK_DROP_START)
|
||||
info->dropped = TRUE;
|
||||
{
|
||||
info->dropped = TRUE;
|
||||
/* We send a leave here so that the widget unhighlights
|
||||
* properly.
|
||||
*/
|
||||
if (info->widget)
|
||||
{
|
||||
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
|
||||
info->widget = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gdk_window_get_origin (toplevel->window, &tx, &ty);
|
||||
|
||||
@@ -969,11 +979,7 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
|
||||
gtk_drag_find_widget (toplevel, &data);
|
||||
|
||||
/* We send a leave here so that the widget unhighlights
|
||||
* properly
|
||||
*/
|
||||
if (info->widget &&
|
||||
((event->type == GDK_DROP_START) || (!data.found)))
|
||||
if (info->widget && !data.found)
|
||||
{
|
||||
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
|
||||
info->widget = NULL;
|
||||
@@ -986,7 +992,7 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
if (!data.found)
|
||||
gdk_drag_status (context, 0, event->dnd.time);
|
||||
}
|
||||
else if (event->type == GDK_DROP_START)
|
||||
else if (event->type == GDK_DROP_START && !info->proxy_source)
|
||||
{
|
||||
gdk_drop_reply (context, data.found, event->dnd.time);
|
||||
if ((context->protocol == GDK_DRAG_PROTO_MOTIF) && !data.found)
|
||||
@@ -1332,7 +1338,7 @@ gtk_drag_dest_leave (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (site->flags & GTK_DEST_DEFAULT_HIGHLIGHT)
|
||||
if ((site->flags & GTK_DEST_DEFAULT_HIGHLIGHT) && site->have_drag)
|
||||
gtk_drag_unhighlight (widget);
|
||||
|
||||
if (!(site->flags & GTK_DEST_DEFAULT_MOTION) || site->have_drag)
|
||||
@@ -2032,8 +2038,14 @@ gtk_drag_source_handle_event (GtkWidget *widget,
|
||||
{
|
||||
if (info->proxy_dest->proxy_drop_wait)
|
||||
{
|
||||
gboolean result = context->action != 0;
|
||||
|
||||
/* Aha - we can finally pass the MOTIF DROP on... */
|
||||
gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
|
||||
gdk_drop_reply (info->proxy_dest->context, result, info->proxy_dest->proxy_drop_time);
|
||||
if (result)
|
||||
gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
|
||||
else
|
||||
gtk_drag_finish (info->proxy_dest->context, FALSE, FALSE, info->proxy_dest->proxy_drop_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2654,11 +2666,15 @@ gtk_drag_abort_timeout (gpointer data)
|
||||
GtkDragSourceInfo *info = data;
|
||||
guint32 time = GDK_CURRENT_TIME;
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
if (info->proxy_dest)
|
||||
time = info->proxy_dest->proxy_drop_time;
|
||||
|
||||
info->drop_timeout = 0;
|
||||
gtk_drag_drop_finished (info, FALSE, time);
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ static void gtk_drawing_area_size_allocate (GtkWidget *widget,
|
||||
static void gtk_drawing_area_send_configure (GtkDrawingArea *darea);
|
||||
|
||||
|
||||
guint
|
||||
GtkType
|
||||
gtk_drawing_area_get_type (void)
|
||||
{
|
||||
static guint drawing_area_type = 0;
|
||||
static GtkType drawing_area_type = 0;
|
||||
|
||||
if (!drawing_area_type)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ gtk_drawing_area_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
drawing_area_type = gtk_type_unique (gtk_widget_get_type (), &drawing_area_info);
|
||||
drawing_area_type = gtk_type_unique (GTK_TYPE_WIDGET, &drawing_area_info);
|
||||
}
|
||||
|
||||
return drawing_area_type;
|
||||
@@ -65,7 +65,7 @@ gtk_drawing_area_class_init (GtkDrawingAreaClass *class)
|
||||
{
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
widget_class->realize = gtk_drawing_area_realize;
|
||||
widget_class->size_allocate = gtk_drawing_area_size_allocate;
|
||||
@@ -160,6 +160,7 @@ gtk_drawing_area_send_configure (GtkDrawingArea *darea)
|
||||
|
||||
event.type = GDK_CONFIGURE;
|
||||
event.window = widget->window;
|
||||
event.send_event = TRUE;
|
||||
event.x = widget->allocation.x;
|
||||
event.y = widget->allocation.y;
|
||||
event.width = widget->allocation.width;
|
||||
|
||||
@@ -37,9 +37,11 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_DRAWING_AREA(obj) GTK_CHECK_CAST (obj, gtk_drawing_area_get_type (), GtkDrawingArea)
|
||||
#define GTK_DRAWING_AREA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_drawing_area_get_type (), GtkDrawingAreaClass)
|
||||
#define GTK_IS_DRAWING_AREA(obj) GTK_CHECK_TYPE (obj, gtk_drawing_area_get_type ())
|
||||
#define GTK_TYPE_DRAWING_AREA (gtk_drawing_area_get_type ())
|
||||
#define GTK_DRAWING_AREA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
|
||||
#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
|
||||
#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
|
||||
#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
|
||||
|
||||
|
||||
typedef struct _GtkDrawingArea GtkDrawingArea;
|
||||
@@ -58,7 +60,7 @@ struct _GtkDrawingAreaClass
|
||||
};
|
||||
|
||||
|
||||
guint gtk_drawing_area_get_type (void);
|
||||
GtkType gtk_drawing_area_get_type (void);
|
||||
GtkWidget* gtk_drawing_area_new (void);
|
||||
void gtk_drawing_area_size (GtkDrawingArea *darea,
|
||||
gint width,
|
||||
|
||||
+9
-1
@@ -186,6 +186,7 @@ gtk_editable_class_init (GtkEditableClass *class)
|
||||
GTK_SIGNAL_OFFSET (GtkEditableClass, activate),
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
widget_class->activate_signal = editable_signals[ACTIVATE];
|
||||
|
||||
editable_signals[SET_EDITABLE] =
|
||||
gtk_signal_new ("set-editable",
|
||||
@@ -416,13 +417,14 @@ gtk_editable_insert_text (GtkEditable *editable,
|
||||
gint *position)
|
||||
{
|
||||
GtkEditableClass *klass;
|
||||
|
||||
gchar buf[64];
|
||||
gchar *text;
|
||||
|
||||
g_return_if_fail (editable != NULL);
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
|
||||
gtk_widget_ref (GTK_WIDGET (editable));
|
||||
|
||||
klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
|
||||
|
||||
if (new_text_length <= 64)
|
||||
@@ -437,6 +439,8 @@ gtk_editable_insert_text (GtkEditable *editable,
|
||||
|
||||
if (new_text_length > 64)
|
||||
g_free (text);
|
||||
|
||||
gtk_widget_unref (GTK_WIDGET (editable));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -449,10 +453,14 @@ gtk_editable_delete_text (GtkEditable *editable,
|
||||
g_return_if_fail (editable != NULL);
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
|
||||
gtk_widget_ref (GTK_WIDGET (editable));
|
||||
|
||||
klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
|
||||
|
||||
gtk_signal_emit (GTK_OBJECT (editable), editable_signals[DELETE_TEXT], start_pos, end_pos);
|
||||
gtk_signal_emit (GTK_OBJECT (editable), editable_signals[CHANGED]);
|
||||
|
||||
gtk_widget_unref (GTK_WIDGET (editable));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+1
-1
@@ -1115,7 +1115,7 @@ gtk_entry_key_press (GtkWidget *widget,
|
||||
break;
|
||||
case GDK_Return:
|
||||
return_val = TRUE;
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (entry), "activate");
|
||||
gtk_widget_activate (widget);
|
||||
break;
|
||||
/* The next two keys should not be inserted literally. Any others ??? */
|
||||
case GDK_Tab:
|
||||
|
||||
@@ -32,6 +32,12 @@ extern "C" {
|
||||
#define GTK_MICRO_VERSION (@GTK_MICRO_VERSION@)
|
||||
#define GTK_BINARY_AGE (@GTK_BINARY_AGE@)
|
||||
#define GTK_INTERFACE_AGE (@GTK_INTERFACE_AGE@)
|
||||
#define GTK_CHECK_VERSION(major,minor,micro) \
|
||||
(GTK_MAJOR_VERSION > (major) || \
|
||||
(GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION > (minor)) || \
|
||||
(GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION == (minor) && \
|
||||
GTK_MICRO_VERSION >= (micro)))
|
||||
|
||||
|
||||
/* new gtk_container_set_focus_[hv]adjustment()
|
||||
*/
|
||||
|
||||
+15
-13
@@ -1440,19 +1440,21 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
|
||||
can_match = TRUE;
|
||||
|
||||
if (nbitmapped_sizes)
|
||||
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
|
||||
{
|
||||
if (*bitmapped_sizes % 10 != 0)
|
||||
can_match = FALSE;
|
||||
bitmap_size = *bitmapped_sizes / 10;
|
||||
bitmap_size_float = *bitmapped_sizes / 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap_size = *bitmapped_sizes;
|
||||
bitmap_size_float = *bitmapped_sizes;
|
||||
}
|
||||
|
||||
{
|
||||
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
|
||||
{
|
||||
if (*bitmapped_sizes % 10 != 0)
|
||||
can_match = FALSE;
|
||||
bitmap_size = *bitmapped_sizes / 10;
|
||||
bitmap_size_float = *bitmapped_sizes / 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap_size = *bitmapped_sizes;
|
||||
bitmap_size_float = *bitmapped_sizes;
|
||||
}
|
||||
}
|
||||
|
||||
if (can_match && nstandard_sizes && nbitmapped_sizes
|
||||
&& *standard_sizes == bitmap_size)
|
||||
{
|
||||
|
||||
+6
-2
@@ -690,7 +690,7 @@ draw_textured_frame (GtkWidget *widget, GdkWindow *window, GdkRectangle *rect, G
|
||||
GdkRectangle *clip)
|
||||
{
|
||||
gtk_paint_handle(widget->style, window, GTK_STATE_NORMAL, shadow,
|
||||
NULL, widget, "handlebox",
|
||||
clip, widget, "handlebox",
|
||||
rect->x, rect->y, rect->width, rect->height,
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
}
|
||||
@@ -740,6 +740,7 @@ gtk_handle_box_paint (GtkWidget *widget,
|
||||
guint width;
|
||||
guint height;
|
||||
GdkRectangle rect;
|
||||
GdkRectangle dest;
|
||||
|
||||
bin = GTK_BIN (widget);
|
||||
hb = GTK_HANDLE_BOX (widget);
|
||||
@@ -797,7 +798,10 @@ gtk_handle_box_paint (GtkWidget *widget,
|
||||
break;
|
||||
}
|
||||
|
||||
draw_textured_frame (widget, hb->bin_window, &rect, GTK_SHADOW_OUT, event ? &event->area : area);
|
||||
if (gdk_rectangle_intersect (event ? &event->area : area, &rect, &dest))
|
||||
draw_textured_frame (widget, hb->bin_window, &rect,
|
||||
GTK_SHADOW_OUT,
|
||||
event ? &event->area : area);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
|
||||
+2
-2
@@ -278,8 +278,8 @@ gtk_hscale_draw (GtkWidget *widget,
|
||||
|
||||
gtk_hscale_pos_trough (GTK_HSCALE (widget), &x, &y, &width, &height);
|
||||
|
||||
tmp_area.x = x;
|
||||
tmp_area.y = y;
|
||||
tmp_area.x = x + widget->allocation.x;
|
||||
tmp_area.y = y + widget->allocation.y;
|
||||
tmp_area.width = width;
|
||||
tmp_area.height = height;
|
||||
|
||||
|
||||
+265
-247
@@ -53,7 +53,6 @@
|
||||
|
||||
/* --- structures --- */
|
||||
typedef struct _GtkIFCBData GtkIFCBData;
|
||||
typedef struct _GtkIFActionLink GtkIFActionLink;
|
||||
typedef struct _GtkIFDumpData GtkIFDumpData;
|
||||
struct _GtkIFCBData
|
||||
{
|
||||
@@ -62,11 +61,6 @@ struct _GtkIFCBData
|
||||
gpointer func_data;
|
||||
guint callback_action;
|
||||
};
|
||||
struct _GtkIFActionLink
|
||||
{
|
||||
GtkWidget *widget;
|
||||
guint callback_action;
|
||||
};
|
||||
struct _GtkIFDumpData
|
||||
{
|
||||
GtkPrintFunc print_func;
|
||||
@@ -89,31 +83,20 @@ static GtkObjectClass *parent_class = NULL;
|
||||
static const gchar *item_factory_string = "Gtk-<ItemFactory>";
|
||||
static GMemChunk *ifactory_item_chunks = NULL;
|
||||
static GMemChunk *ifactory_cb_data_chunks = NULL;
|
||||
static const gchar *key_popup_data = "GtkItemFactory-popup-data";
|
||||
static GQuark quark_popup_data = 0;
|
||||
static const gchar *key_if_menu_pos = "GtkItemFactory-menu-position";
|
||||
static GQuark quark_if_menu_pos = 0;
|
||||
static const gchar *key_item_factory = "GtkItemFactory";
|
||||
static GQuark quark_item_factory = 0;
|
||||
static const gchar *key_item_factory_path = "GtkItemFactory-path";
|
||||
static GQuark quark_item_factory_path = 0;
|
||||
static const gchar *key_type_item = "<Item>";
|
||||
static GQuark quark_item_path = 0;
|
||||
static GQuark quark_action = 0;
|
||||
static GQuark quark_accel_group = 0;
|
||||
static GQuark quark_type_item = 0;
|
||||
static const gchar *key_type_title = "<Title>";
|
||||
static GQuark quark_type_title = 0;
|
||||
static const gchar *key_type_radio_item = "<RadioItem>";
|
||||
static GQuark quark_type_radio_item = 0;
|
||||
static const gchar *key_type_check_item = "<CheckItem>";
|
||||
static GQuark quark_type_check_item = 0;
|
||||
static const gchar *key_type_toggle_item = "<ToggleItem>";
|
||||
static GQuark quark_type_toggle_item = 0;
|
||||
static const gchar *key_type_tearoff_item = "<Tearoff>";
|
||||
static GQuark quark_type_tearoff_item = 0;
|
||||
static const gchar *key_type_separator_item = "<Separator>";
|
||||
static GQuark quark_type_separator_item = 0;
|
||||
static const gchar *key_type_branch = "<Branch>";
|
||||
static GQuark quark_type_branch = 0;
|
||||
static const gchar *key_type_last_branch = "<LastBranch>";
|
||||
static GQuark quark_type_last_branch = 0;
|
||||
static GScannerConfig ifactory_scanner_config =
|
||||
{
|
||||
@@ -201,6 +184,7 @@ gtk_item_factory_class_init (GtkItemFactoryClass *class)
|
||||
class->cpair_comment_single = g_strdup (";\n");
|
||||
|
||||
class->item_ht = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
class->dummy = NULL;
|
||||
ifactory_item_chunks =
|
||||
g_mem_chunk_new ("GtkItemFactoryItem",
|
||||
sizeof (GtkItemFactoryItem),
|
||||
@@ -212,19 +196,21 @@ gtk_item_factory_class_init (GtkItemFactoryClass *class)
|
||||
sizeof (GtkIFCBData) * ITEM_BLOCK_SIZE,
|
||||
G_ALLOC_AND_FREE);
|
||||
|
||||
quark_popup_data = g_quark_from_static_string (key_popup_data);
|
||||
quark_if_menu_pos = g_quark_from_static_string (key_if_menu_pos);
|
||||
quark_item_factory = g_quark_from_static_string (key_item_factory);
|
||||
quark_item_factory_path = g_quark_from_static_string (key_item_factory_path);
|
||||
quark_type_item = g_quark_from_static_string (key_type_item);
|
||||
quark_type_title = g_quark_from_static_string (key_type_title);
|
||||
quark_type_radio_item = g_quark_from_static_string (key_type_radio_item);
|
||||
quark_type_check_item = g_quark_from_static_string (key_type_check_item);
|
||||
quark_type_toggle_item = g_quark_from_static_string (key_type_toggle_item);
|
||||
quark_type_tearoff_item = g_quark_from_static_string (key_type_tearoff_item);
|
||||
quark_type_separator_item = g_quark_from_static_string (key_type_separator_item);
|
||||
quark_type_branch = g_quark_from_static_string (key_type_branch);
|
||||
quark_type_last_branch = g_quark_from_static_string (key_type_last_branch);
|
||||
quark_popup_data = g_quark_from_static_string ("GtkItemFactory-popup-data");
|
||||
quark_if_menu_pos = g_quark_from_static_string ("GtkItemFactory-menu-position");
|
||||
quark_item_factory = g_quark_from_static_string ("GtkItemFactory");
|
||||
quark_item_path = g_quark_from_static_string ("GtkItemFactory-path");
|
||||
quark_action = g_quark_from_static_string ("GtkItemFactory-action");
|
||||
quark_accel_group = g_quark_from_static_string ("GtkAccelGroup");
|
||||
quark_type_item = g_quark_from_static_string ("<Item>");
|
||||
quark_type_title = g_quark_from_static_string ("<Title>");
|
||||
quark_type_radio_item = g_quark_from_static_string ("<RadioItem>");
|
||||
quark_type_check_item = g_quark_from_static_string ("<CheckItem>");
|
||||
quark_type_toggle_item = g_quark_from_static_string ("<ToggleItem>");
|
||||
quark_type_tearoff_item = g_quark_from_static_string ("<Tearoff>");
|
||||
quark_type_separator_item = g_quark_from_static_string ("<Separator>");
|
||||
quark_type_branch = g_quark_from_static_string ("<Branch>");
|
||||
quark_type_last_branch = g_quark_from_static_string ("<LastBranch>");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -237,7 +223,7 @@ gtk_item_factory_init (GtkItemFactory *ifactory)
|
||||
ifactory->path = NULL;
|
||||
ifactory->accel_group = NULL;
|
||||
ifactory->widget = NULL;
|
||||
ifactory->widgets_by_action = NULL;
|
||||
ifactory->items = NULL;
|
||||
}
|
||||
|
||||
GtkItemFactory*
|
||||
@@ -304,50 +290,48 @@ gtk_item_factory_propagate_accelerator (GtkItemFactoryItem *item,
|
||||
for (slist = widget_list; slist; slist = slist->next)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkItemFactory *ifactory;
|
||||
GtkAccelGroup *accel_group;
|
||||
guint signal_id;
|
||||
|
||||
widget = slist->data;
|
||||
|
||||
ifactory = gtk_item_factory_from_widget (widget);
|
||||
accel_group = gtk_object_get_data_by_id (GTK_OBJECT (widget), quark_accel_group);
|
||||
|
||||
if (ifactory)
|
||||
signal_id = gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (widget));
|
||||
if (signal_id && accel_group)
|
||||
{
|
||||
guint signal_id;
|
||||
|
||||
signal_id = gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (widget));
|
||||
if (signal_id)
|
||||
if (item->accelerator_key)
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate",
|
||||
accel_group,
|
||||
item->accelerator_key,
|
||||
item->accelerator_mods,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
else
|
||||
{
|
||||
if (item->accelerator_key)
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate",
|
||||
ifactory->accel_group,
|
||||
item->accelerator_key,
|
||||
item->accelerator_mods,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
else
|
||||
GSList *work;
|
||||
|
||||
work = gtk_accel_group_entries_from_object (GTK_OBJECT (widget));
|
||||
while (work)
|
||||
{
|
||||
GSList *work;
|
||||
GtkAccelEntry *ac_entry;
|
||||
|
||||
work = gtk_accel_group_entries_from_object (GTK_OBJECT (widget));
|
||||
while (work)
|
||||
{
|
||||
GtkAccelEntry *ac_entry;
|
||||
|
||||
ac_entry = work->data;
|
||||
work = work->next;
|
||||
if (ac_entry->accel_flags & GTK_ACCEL_VISIBLE &&
|
||||
ac_entry->accel_group == ifactory->accel_group &&
|
||||
ac_entry->signal_id == signal_id)
|
||||
gtk_widget_remove_accelerator (GTK_WIDGET (widget),
|
||||
ac_entry->accel_group,
|
||||
ac_entry->accelerator_key,
|
||||
ac_entry->accelerator_mods);
|
||||
}
|
||||
ac_entry = work->data;
|
||||
work = work->next;
|
||||
if (ac_entry->accel_flags & GTK_ACCEL_VISIBLE &&
|
||||
ac_entry->accel_group == accel_group &&
|
||||
ac_entry->signal_id == signal_id)
|
||||
gtk_widget_remove_accelerator (GTK_WIDGET (widget),
|
||||
ac_entry->accel_group,
|
||||
ac_entry->accelerator_key,
|
||||
ac_entry->accelerator_mods);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_unref (widget);
|
||||
}
|
||||
|
||||
g_slist_free (widget_list);
|
||||
|
||||
item->in_propagation = FALSE;
|
||||
@@ -402,7 +386,90 @@ gtk_item_factory_item_remove_widget (GtkWidget *widget,
|
||||
{
|
||||
item->widgets = g_slist_remove (item->widgets, widget);
|
||||
gtk_object_remove_data_by_id (GTK_OBJECT (widget), quark_item_factory);
|
||||
gtk_object_remove_data_by_id (GTK_OBJECT (widget), quark_item_factory_path);
|
||||
gtk_object_remove_data_by_id (GTK_OBJECT (widget), quark_item_path);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_item_factory_add_foreign (GtkWidget *accel_widget,
|
||||
const gchar *full_path,
|
||||
GtkAccelGroup *accel_group,
|
||||
guint keyval,
|
||||
GdkModifierType modifiers)
|
||||
{
|
||||
GtkItemFactoryClass *class;
|
||||
GtkItemFactoryItem *item;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (accel_widget));
|
||||
g_return_if_fail (full_path != NULL);
|
||||
|
||||
class = gtk_type_class (GTK_TYPE_ITEM_FACTORY);
|
||||
|
||||
keyval = keyval != GDK_VoidSymbol ? keyval : 0;
|
||||
|
||||
item = g_hash_table_lookup (class->item_ht, full_path);
|
||||
if (!item)
|
||||
{
|
||||
item = g_chunk_new (GtkItemFactoryItem, ifactory_item_chunks);
|
||||
|
||||
item->path = g_strdup (full_path);
|
||||
item->accelerator_key = keyval;
|
||||
item->accelerator_mods = modifiers;
|
||||
item->modified = FALSE;
|
||||
item->in_propagation = FALSE;
|
||||
item->dummy = NULL;
|
||||
item->widgets = NULL;
|
||||
|
||||
g_hash_table_insert (class->item_ht, item->path, item);
|
||||
}
|
||||
|
||||
item->widgets = g_slist_prepend (item->widgets, accel_widget);
|
||||
gtk_signal_connect (GTK_OBJECT (accel_widget),
|
||||
"destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_widget),
|
||||
item);
|
||||
|
||||
/* set the item path for the widget
|
||||
*/
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (accel_widget), quark_item_path, item->path);
|
||||
gtk_widget_set_name (accel_widget, item->path);
|
||||
if (accel_group)
|
||||
{
|
||||
gtk_accel_group_ref (accel_group);
|
||||
gtk_object_set_data_by_id_full (GTK_OBJECT (accel_widget),
|
||||
quark_accel_group,
|
||||
accel_group,
|
||||
(GtkDestroyNotify) gtk_accel_group_unref);
|
||||
}
|
||||
else
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (accel_widget), quark_accel_group, NULL);
|
||||
|
||||
/* install defined accelerators
|
||||
*/
|
||||
if (gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (accel_widget)))
|
||||
{
|
||||
if (item->accelerator_key && accel_group)
|
||||
gtk_widget_add_accelerator (accel_widget,
|
||||
"activate",
|
||||
accel_group,
|
||||
item->accelerator_key,
|
||||
item->accelerator_mods,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
else
|
||||
gtk_widget_remove_accelerators (accel_widget,
|
||||
"activate",
|
||||
TRUE);
|
||||
}
|
||||
|
||||
/* keep track of accelerator changes
|
||||
*/
|
||||
gtk_signal_connect_after (GTK_OBJECT (accel_widget),
|
||||
"add-accelerator",
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_item_add_accelerator),
|
||||
item);
|
||||
gtk_signal_connect_after (GTK_OBJECT (accel_widget),
|
||||
"remove-accelerator",
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_accelerator),
|
||||
item);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -425,112 +492,18 @@ gtk_item_factory_add_item (GtkItemFactory *ifactory,
|
||||
GtkItemFactoryClass *class;
|
||||
GtkItemFactoryItem *item;
|
||||
gchar *fpath;
|
||||
guint keyval, mods;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (item_type != NULL);
|
||||
|
||||
class = GTK_ITEM_FACTORY_CLASS (GTK_OBJECT (ifactory)->klass);
|
||||
|
||||
fpath = g_strconcat (ifactory->path, path, NULL);
|
||||
item = g_hash_table_lookup (class->item_ht, fpath);
|
||||
|
||||
/* link the widget into its item-entry
|
||||
*/
|
||||
if (!item)
|
||||
{
|
||||
guint keyval;
|
||||
guint mods;
|
||||
|
||||
if (accelerator)
|
||||
gtk_accelerator_parse (accelerator, &keyval, &mods);
|
||||
else
|
||||
{
|
||||
keyval = 0;
|
||||
mods = 0;
|
||||
}
|
||||
|
||||
item = g_chunk_new (GtkItemFactoryItem, ifactory_item_chunks);
|
||||
|
||||
item->path = fpath;
|
||||
fpath = NULL;
|
||||
item->accelerator_key = keyval;
|
||||
item->accelerator_mods = mods;
|
||||
item->modified = FALSE;
|
||||
item->in_propagation = FALSE;
|
||||
item->item_type = NULL;
|
||||
item->widgets = NULL;
|
||||
|
||||
g_hash_table_insert (class->item_ht, item->path, item);
|
||||
}
|
||||
g_free (fpath);
|
||||
|
||||
if (item->item_type == NULL)
|
||||
{
|
||||
g_assert (item->widgets == NULL);
|
||||
|
||||
if (item_type != ITEM_FACTORY_STRING)
|
||||
item->item_type = g_strdup (item_type);
|
||||
else
|
||||
item->item_type = ITEM_FACTORY_STRING;
|
||||
}
|
||||
|
||||
item->widgets = g_slist_prepend (item->widgets, widget);
|
||||
gtk_signal_connect (GTK_OBJECT (widget),
|
||||
"destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_widget),
|
||||
item);
|
||||
|
||||
/* set back pointers for the widget
|
||||
*/
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_item_factory, ifactory);
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_item_factory_path, item->path);
|
||||
gtk_widget_set_name (widget, item->path);
|
||||
|
||||
/* set accelerator group on menu widgets
|
||||
*/
|
||||
if (GTK_IS_MENU (widget))
|
||||
gtk_menu_set_accel_group ((GtkMenu*) widget, ifactory->accel_group);
|
||||
|
||||
/* install defined accelerators
|
||||
*/
|
||||
if (gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (widget)))
|
||||
{
|
||||
if (item->accelerator_key)
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate",
|
||||
ifactory->accel_group,
|
||||
item->accelerator_key,
|
||||
item->accelerator_mods,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
else
|
||||
gtk_widget_remove_accelerators (widget,
|
||||
"activate",
|
||||
TRUE);
|
||||
}
|
||||
|
||||
/* keep track of accelerator changes
|
||||
*/
|
||||
gtk_signal_connect_after (GTK_OBJECT (widget),
|
||||
"add-accelerator",
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_item_add_accelerator),
|
||||
item);
|
||||
gtk_signal_connect_after (GTK_OBJECT (widget),
|
||||
"remove-accelerator",
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_accelerator),
|
||||
item);
|
||||
|
||||
/* keep a per-action list of the widgets on the factory
|
||||
*/
|
||||
if (callback)
|
||||
{
|
||||
GtkIFActionLink *link;
|
||||
|
||||
link = g_new (GtkIFActionLink, 1);
|
||||
link->widget = widget;
|
||||
link->callback_action = callback_action;
|
||||
ifactory->widgets_by_action = g_slist_prepend (ifactory->widgets_by_action, link);
|
||||
}
|
||||
|
||||
/* connect callback if neccessary
|
||||
*/
|
||||
if (callback)
|
||||
@@ -551,6 +524,28 @@ gtk_item_factory_add_item (GtkItemFactory *ifactory,
|
||||
GTK_SIGNAL_FUNC (gtk_item_factory_callback_marshal),
|
||||
data);
|
||||
}
|
||||
|
||||
/* link the widget into its item-entry
|
||||
* and keep back pointer on both the item factory and the widget
|
||||
*/
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_action, GUINT_TO_POINTER (callback_action));
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_item_factory, ifactory);
|
||||
if (accelerator)
|
||||
gtk_accelerator_parse (accelerator, &keyval, &mods);
|
||||
else
|
||||
{
|
||||
keyval = 0;
|
||||
mods = 0;
|
||||
}
|
||||
fpath = g_strconcat (ifactory->path, path, NULL);
|
||||
gtk_item_factory_add_foreign (widget, fpath, ifactory->accel_group, keyval, mods);
|
||||
item = g_hash_table_lookup (class->item_ht, fpath);
|
||||
g_free (fpath);
|
||||
|
||||
g_return_if_fail (item != NULL);
|
||||
|
||||
if (!g_slist_find (ifactory->items, item))
|
||||
ifactory->items = g_slist_prepend (ifactory->items, item);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -559,7 +554,6 @@ gtk_item_factory_construct (GtkItemFactory *ifactory,
|
||||
const gchar *path,
|
||||
GtkAccelGroup *accel_group)
|
||||
{
|
||||
GtkAccelGroup *menu_group;
|
||||
guint len;
|
||||
|
||||
g_return_if_fail (ifactory != NULL);
|
||||
@@ -593,15 +587,6 @@ gtk_item_factory_construct (GtkItemFactory *ifactory,
|
||||
gtk_object_ref (GTK_OBJECT (ifactory));
|
||||
gtk_object_sink (GTK_OBJECT (ifactory));
|
||||
|
||||
menu_group = gtk_accel_group_new ();
|
||||
gtk_accel_group_attach (menu_group, GTK_OBJECT (ifactory->widget));
|
||||
|
||||
/*
|
||||
gtk_signal_connect_object_while_alive (GTK_OBJECT (ifactory->widget),
|
||||
"destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_object_destroy),
|
||||
GTK_OBJECT (ifactory));
|
||||
*/
|
||||
gtk_item_factory_add_item (ifactory,
|
||||
"", NULL,
|
||||
NULL, 0, NULL, 0,
|
||||
@@ -670,10 +655,17 @@ gtk_item_factory_destroy (GtkObject *object)
|
||||
ifactory->widget = NULL;
|
||||
}
|
||||
|
||||
for (slist = ifactory->widgets_by_action; slist; slist = slist->next)
|
||||
g_free (slist->data);
|
||||
g_slist_free (ifactory->widgets_by_action);
|
||||
ifactory->widgets_by_action = NULL;
|
||||
for (slist = ifactory->items; slist; slist = slist->next)
|
||||
{
|
||||
GtkItemFactoryItem *item = slist->data;
|
||||
GSList *link;
|
||||
|
||||
for (link = item->widgets; link; link = link->next)
|
||||
if (gtk_object_get_data_by_id (link->data, quark_item_factory))
|
||||
gtk_object_remove_data_by_id (link->data, quark_item_factory);
|
||||
}
|
||||
g_slist_free (ifactory->items);
|
||||
ifactory->items = NULL;
|
||||
|
||||
parent_class->destroy (object);
|
||||
}
|
||||
@@ -713,7 +705,7 @@ gtk_item_factory_path_from_widget (GtkWidget *widget)
|
||||
g_return_val_if_fail (widget != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
|
||||
return gtk_object_get_data_by_id (GTK_OBJECT (widget), quark_item_factory_path);
|
||||
return gtk_object_get_data_by_id (GTK_OBJECT (widget), quark_item_path);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -813,20 +805,20 @@ gtk_item_factory_dump_rc (const gchar *file_name,
|
||||
}
|
||||
|
||||
void
|
||||
gtk_item_factory_create_items (GtkItemFactory *ifactory,
|
||||
guint n_entries,
|
||||
GtkItemFactoryEntry *entries,
|
||||
gpointer callback_data)
|
||||
gtk_item_factory_create_items (GtkItemFactory *ifactory,
|
||||
guint n_entries,
|
||||
GtkItemFactoryEntry *entries,
|
||||
gpointer callback_data)
|
||||
{
|
||||
gtk_item_factory_create_items_ac (ifactory, n_entries, entries, callback_data, 1);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
|
||||
guint n_entries,
|
||||
GtkItemFactoryEntry *entries,
|
||||
gpointer callback_data,
|
||||
guint callback_type)
|
||||
gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
|
||||
guint n_entries,
|
||||
GtkItemFactoryEntry *entries,
|
||||
gpointer callback_data,
|
||||
guint callback_type)
|
||||
{
|
||||
guint i;
|
||||
|
||||
@@ -844,13 +836,12 @@ gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
gtk_item_factory_get_widget (GtkItemFactory *ifactory,
|
||||
const gchar *path)
|
||||
gtk_item_factory_get_widget (GtkItemFactory *ifactory,
|
||||
const gchar *path)
|
||||
{
|
||||
GtkItemFactoryClass *class;
|
||||
GtkItemFactoryItem *item;
|
||||
|
||||
g_return_val_if_fail (ifactory != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
|
||||
@@ -882,27 +873,60 @@ gtk_item_factory_get_widget (GtkItemFactory *ifactory,
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory,
|
||||
guint action)
|
||||
gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory,
|
||||
guint action)
|
||||
{
|
||||
GSList *slist;
|
||||
|
||||
g_return_val_if_fail (ifactory != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
|
||||
|
||||
for (slist = ifactory->widgets_by_action; slist; slist = slist->next)
|
||||
for (slist = ifactory->items; slist; slist = slist->next)
|
||||
{
|
||||
GtkIFActionLink *link;
|
||||
GtkItemFactoryItem *item = slist->data;
|
||||
GSList *link;
|
||||
|
||||
link = slist->data;
|
||||
|
||||
if (link->callback_action == action)
|
||||
return link->widget;
|
||||
for (link = item->widgets; link; link = link->next)
|
||||
if (gtk_object_get_data_by_id (link->data, quark_item_factory) == ifactory &&
|
||||
gtk_object_get_data_by_id (link->data, quark_action) == GUINT_TO_POINTER (action))
|
||||
return link->data;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
gtk_item_factory_get_item (GtkItemFactory *ifactory,
|
||||
const gchar *path)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
|
||||
widget = gtk_item_factory_get_widget (ifactory, path);
|
||||
|
||||
if (GTK_IS_MENU (widget))
|
||||
widget = gtk_menu_get_attach_widget (GTK_MENU (widget));
|
||||
|
||||
return GTK_IS_ITEM (widget) ? widget : NULL;
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory,
|
||||
guint action)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
|
||||
|
||||
widget = gtk_item_factory_get_widget_by_action (ifactory, action);
|
||||
|
||||
if (GTK_IS_MENU (widget))
|
||||
widget = gtk_menu_get_attach_widget (GTK_MENU (widget));
|
||||
|
||||
return GTK_IS_ITEM (widget) ? widget : NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_item_factory_parse_path (GtkItemFactory *ifactory,
|
||||
gchar *str,
|
||||
@@ -964,8 +988,6 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
guint type_id;
|
||||
GtkType type;
|
||||
gchar *item_type_path;
|
||||
GtkAccelGroup *parent_accel_group = NULL;
|
||||
GSList *tmp_list;
|
||||
|
||||
g_return_if_fail (ifactory != NULL);
|
||||
g_return_if_fail (GTK_IS_ITEM_FACTORY (ifactory));
|
||||
@@ -977,7 +999,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
if (!entry->item_type ||
|
||||
entry->item_type[0] == 0)
|
||||
{
|
||||
item_type_path = (gpointer) key_type_item;
|
||||
item_type_path = "<Item>";
|
||||
type_id = quark_type_item;
|
||||
}
|
||||
else
|
||||
@@ -1052,12 +1074,8 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
}
|
||||
g_free (parent_path);
|
||||
|
||||
g_return_if_fail (parent != NULL);
|
||||
g_return_if_fail (GTK_IS_CONTAINER (parent));
|
||||
|
||||
tmp_list = gtk_accel_groups_from_object (GTK_OBJECT (parent));
|
||||
if (tmp_list)
|
||||
parent_accel_group = tmp_list->data;
|
||||
|
||||
widget = gtk_widget_new (type,
|
||||
"GtkWidget::visible", TRUE,
|
||||
"GtkWidget::sensitive", (type_id != quark_type_separator_item &&
|
||||
@@ -1069,64 +1087,58 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (widget), radio_group);
|
||||
if (GTK_IS_CHECK_MENU_ITEM (widget))
|
||||
gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (widget), TRUE);
|
||||
|
||||
if ((type_id != quark_type_separator_item) &&
|
||||
(type_id != quark_type_tearoff_item) &&
|
||||
|
||||
/* install underline accelerators for this item
|
||||
*/
|
||||
if (type_id != quark_type_separator_item &&
|
||||
type_id != quark_type_tearoff_item &&
|
||||
*name)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
label =
|
||||
gtk_widget_new (GTK_TYPE_ACCEL_LABEL,
|
||||
"GtkWidget::visible", TRUE,
|
||||
"GtkWidget::parent", widget,
|
||||
"GtkAccelLabel::accel_widget", widget,
|
||||
"GtkMisc::xalign", 0.0,
|
||||
NULL);
|
||||
|
||||
|
||||
label = gtk_widget_new (GTK_TYPE_ACCEL_LABEL,
|
||||
"GtkWidget::visible", TRUE,
|
||||
"GtkWidget::parent", widget,
|
||||
"GtkAccelLabel::accel_widget", widget,
|
||||
"GtkMisc::xalign", 0.0,
|
||||
NULL);
|
||||
|
||||
accel_key = gtk_label_parse_uline (GTK_LABEL (label), name);
|
||||
|
||||
if ((accel_key != GDK_VoidSymbol) && GTK_IS_MENU_BAR (parent))
|
||||
|
||||
if (accel_key != GDK_VoidSymbol)
|
||||
{
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate_item",
|
||||
ifactory->accel_group,
|
||||
accel_key, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_LOCKED);
|
||||
}
|
||||
if (GTK_IS_MENU_BAR (parent))
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate_item",
|
||||
ifactory->accel_group,
|
||||
accel_key, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_LOCKED);
|
||||
|
||||
if ((accel_key != GDK_VoidSymbol) && parent_accel_group)
|
||||
{
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate_item",
|
||||
parent_accel_group,
|
||||
accel_key, 0,
|
||||
GTK_ACCEL_LOCKED);
|
||||
if (GTK_IS_MENU (parent))
|
||||
gtk_widget_add_accelerator (widget,
|
||||
"activate_item",
|
||||
gtk_menu_ensure_uline_accel_group (GTK_MENU (parent)),
|
||||
accel_key, 0,
|
||||
GTK_ACCEL_LOCKED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
g_free (name);
|
||||
|
||||
|
||||
if (type_id == quark_type_branch ||
|
||||
type_id == quark_type_last_branch)
|
||||
{
|
||||
GtkAccelGroup *menu_group;
|
||||
|
||||
if (entry->callback)
|
||||
g_warning ("gtk_item_factory_create_item(): Can't specify a callback on a branch: \"%s\"",
|
||||
entry->path);
|
||||
|
||||
menu_group = gtk_accel_group_new ();
|
||||
|
||||
if (type_id == quark_type_last_branch)
|
||||
gtk_menu_item_right_justify (GTK_MENU_ITEM (widget));
|
||||
|
||||
parent = widget;
|
||||
widget =
|
||||
gtk_widget_new (GTK_TYPE_MENU,
|
||||
NULL);
|
||||
|
||||
gtk_accel_group_attach (menu_group, GTK_OBJECT (widget));
|
||||
parent = widget;
|
||||
widget = gtk_widget_new (GTK_TYPE_MENU,
|
||||
NULL);
|
||||
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (parent), widget);
|
||||
}
|
||||
|
||||
@@ -1188,7 +1200,7 @@ gtk_item_factory_create_menu_entries (guint n_entries,
|
||||
entry.callback = entries[i].callback;
|
||||
entry.callback_action = 0;
|
||||
if (gtk_pattern_match_string (&pspec_separator, path))
|
||||
entry.item_type = (gpointer) key_type_separator_item;
|
||||
entry.item_type = "<Separator>";
|
||||
else if (!gtk_pattern_match_string (&pspec_check, path))
|
||||
entry.item_type = NULL;
|
||||
else
|
||||
@@ -1209,7 +1221,7 @@ gtk_item_factory_create_menu_entries (guint n_entries,
|
||||
path++;
|
||||
}
|
||||
*c = 0;
|
||||
entry.item_type = (gpointer) key_type_toggle_item;
|
||||
entry.item_type = "<ToggleItem>";
|
||||
entry.path = cpath;
|
||||
}
|
||||
|
||||
@@ -1472,7 +1484,7 @@ gtk_item_factory_parse_menu_path (GScanner *scanner,
|
||||
item->accelerator_mods = 0;
|
||||
item->modified = TRUE;
|
||||
item->in_propagation = FALSE;
|
||||
item->item_type = NULL;
|
||||
item->dummy = NULL;
|
||||
item->widgets = NULL;
|
||||
|
||||
g_hash_table_insert (class->item_ht, item->path, item);
|
||||
@@ -1559,6 +1571,9 @@ gtk_item_factory_parse_rc_string (const gchar *rc_string)
|
||||
|
||||
g_return_if_fail (rc_string != NULL);
|
||||
|
||||
if (!gtk_item_factory_class)
|
||||
gtk_type_class (GTK_TYPE_ITEM_FACTORY);
|
||||
|
||||
ifactory_scanner_config.cpair_comment_single = gtk_item_factory_class->cpair_comment_single;
|
||||
scanner = g_scanner_new (&ifactory_scanner_config);
|
||||
|
||||
@@ -1613,6 +1628,9 @@ gtk_item_factory_parse_rc (const gchar *file_name)
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
if (!gtk_item_factory_class)
|
||||
gtk_type_class (GTK_TYPE_ITEM_FACTORY);
|
||||
|
||||
ifactory_scanner_config.cpair_comment_single = gtk_item_factory_class->cpair_comment_single;
|
||||
scanner = g_scanner_new (&ifactory_scanner_config);
|
||||
|
||||
|
||||
+13
-4
@@ -69,7 +69,7 @@ struct _GtkItemFactory
|
||||
gchar *path;
|
||||
GtkAccelGroup *accel_group;
|
||||
GtkWidget *widget;
|
||||
GSList *widgets_by_action;
|
||||
GSList *items;
|
||||
|
||||
GtkTranslateFunc translate_func;
|
||||
gpointer translate_data;
|
||||
@@ -118,7 +118,7 @@ struct _GtkItemFactoryItem
|
||||
guint accelerator_mods;
|
||||
guint modified : 1;
|
||||
guint in_propagation : 1;
|
||||
gchar *item_type;
|
||||
gchar *dummy;
|
||||
|
||||
GSList *widgets;
|
||||
};
|
||||
@@ -142,14 +142,23 @@ void gtk_item_factory_construct (GtkItemFactory *ifactory,
|
||||
void gtk_item_factory_parse_rc (const gchar *file_name);
|
||||
void gtk_item_factory_parse_rc_string (const gchar *rc_string);
|
||||
void gtk_item_factory_parse_rc_scanner (GScanner *scanner);
|
||||
void gtk_item_factory_add_foreign (GtkWidget *accel_widget,
|
||||
const gchar *full_path,
|
||||
GtkAccelGroup *accel_group,
|
||||
guint keyval,
|
||||
GdkModifierType modifiers);
|
||||
|
||||
GtkItemFactory* gtk_item_factory_from_widget (GtkWidget *widget);
|
||||
gchar* gtk_item_factory_path_from_widget (GtkWidget *widget);
|
||||
|
||||
GtkWidget* gtk_item_factory_get_widget (GtkItemFactory *ifactory,
|
||||
const gchar *path);
|
||||
GtkWidget* gtk_item_factory_get_item (GtkItemFactory *ifactory,
|
||||
const gchar *path);
|
||||
GtkWidget* gtk_item_factory_get_widget (GtkItemFactory *ifactory,
|
||||
const gchar *path);
|
||||
GtkWidget* gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory,
|
||||
guint action);
|
||||
GtkWidget* gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory,
|
||||
guint action);
|
||||
|
||||
/* If `path_pspec' is passed as `NULL', this function will iterate over
|
||||
* all hash entries. otherwise only those entries will be dumped for which
|
||||
|
||||
+139
-187
@@ -81,21 +81,17 @@ static void gtk_label_style_set (GtkWidget *widget,
|
||||
static gint gtk_label_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
|
||||
static GtkLabelWord * gtk_label_word_alloc (void);
|
||||
static GtkLabelULine * gtk_label_uline_alloc (void);
|
||||
static void gtk_label_free_words (GtkLabel *label);
|
||||
static void gtk_label_free_ulines (GtkLabelWord *word);
|
||||
static gint gtk_label_split_text (GtkLabel * label);
|
||||
static void gtk_label_finalize_lines (GtkLabel * label, gint line_width);
|
||||
static void gtk_label_finalize_lines_wrap(GtkLabel * label, gint line_width);
|
||||
static GtkLabelWord* gtk_label_word_alloc (void);
|
||||
static GtkLabelULine* gtk_label_uline_alloc (void);
|
||||
static void gtk_label_free_words (GtkLabel *label);
|
||||
static void gtk_label_free_ulines (GtkLabelWord *word);
|
||||
static gint gtk_label_split_text (GtkLabel *label);
|
||||
|
||||
|
||||
static GtkMiscClass *parent_class = NULL;
|
||||
|
||||
static GMemChunk *word_chunk = 0;
|
||||
static GtkLabelWord *free_words = 0;
|
||||
static GMemChunk *uline_chunk = 0;
|
||||
static GtkLabelULine *free_ulines = 0;
|
||||
static GMemChunk *word_chunk = NULL;
|
||||
static GMemChunk *uline_chunk = NULL;
|
||||
|
||||
GtkType
|
||||
gtk_label_get_type (void)
|
||||
@@ -116,7 +112,7 @@ gtk_label_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
label_type = gtk_type_unique (gtk_misc_get_type (), &label_info);
|
||||
label_type = gtk_type_unique (GTK_TYPE_MISC, &label_info);
|
||||
gtk_type_set_chunk_alloc (label_type, 32);
|
||||
}
|
||||
|
||||
@@ -132,7 +128,7 @@ gtk_label_class_init (GtkLabelClass *class)
|
||||
object_class = (GtkObjectClass*) class;
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_misc_get_type ());
|
||||
parent_class = gtk_type_class (GTK_TYPE_MISC);
|
||||
|
||||
gtk_object_add_arg_type ("GtkLabel::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
|
||||
gtk_object_add_arg_type ("GtkLabel::pattern", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_PATTERN);
|
||||
@@ -159,7 +155,7 @@ gtk_label_set_arg (GtkObject *object,
|
||||
switch (arg_id)
|
||||
{
|
||||
case ARG_LABEL:
|
||||
gtk_label_set_text (label, GTK_VALUE_STRING (*arg) ? GTK_VALUE_STRING (*arg) : "");
|
||||
gtk_label_set_text (label, GTK_VALUE_STRING (*arg));
|
||||
break;
|
||||
case ARG_PATTERN:
|
||||
gtk_label_set_pattern (label, GTK_VALUE_STRING (*arg));
|
||||
@@ -217,54 +213,48 @@ gtk_label_init (GtkLabel *label)
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
gtk_label_new (const char *str)
|
||||
gtk_label_new (const gchar *str)
|
||||
{
|
||||
GtkLabel *label;
|
||||
|
||||
g_return_val_if_fail (str != NULL, NULL);
|
||||
|
||||
label = gtk_type_new (gtk_label_get_type ());
|
||||
|
||||
gtk_label_set_text (label, str);
|
||||
label = gtk_type_new (GTK_TYPE_LABEL);
|
||||
|
||||
if (str && *str)
|
||||
gtk_label_set_text (label, str);
|
||||
|
||||
return GTK_WIDGET (label);
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
gtk_label_set_text_internal (GtkLabel *label,
|
||||
char *str,
|
||||
gchar *str,
|
||||
GdkWChar *str_wc)
|
||||
{
|
||||
if (label->label)
|
||||
g_free (label->label);
|
||||
if (label->label_wc)
|
||||
g_free (label->label_wc);
|
||||
g_free (label->label);
|
||||
g_free (label->label_wc);
|
||||
|
||||
label->label = str;
|
||||
label->label_wc = str_wc;
|
||||
|
||||
gtk_label_free_words (label);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (label))
|
||||
{
|
||||
if (GTK_WIDGET_MAPPED (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
if (GTK_WIDGET_DRAWABLE (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
|
||||
void
|
||||
gtk_label_set_text (GtkLabel *label,
|
||||
const char *str)
|
||||
gtk_label_set_text (GtkLabel *label,
|
||||
const gchar *str)
|
||||
{
|
||||
GdkWChar *str_wc;
|
||||
gint len;
|
||||
gint wc_len;
|
||||
|
||||
g_return_if_fail (label != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
g_return_if_fail (str != NULL);
|
||||
if (!str)
|
||||
str = "";
|
||||
|
||||
if (!label->label || strcmp (label->label, str))
|
||||
{
|
||||
@@ -286,68 +276,61 @@ void
|
||||
gtk_label_set_pattern (GtkLabel *label,
|
||||
const gchar *pattern)
|
||||
{
|
||||
g_return_if_fail (label != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
if (label->pattern)
|
||||
g_free (label->pattern);
|
||||
g_free (label->pattern);
|
||||
label->pattern = g_strdup (pattern);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (label))
|
||||
if (GTK_WIDGET_DRAWABLE (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
|
||||
void
|
||||
gtk_label_set_justify (GtkLabel *label,
|
||||
GtkJustification jtype)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
g_return_if_fail (jtype >= GTK_JUSTIFY_LEFT && jtype <= GTK_JUSTIFY_FILL);
|
||||
|
||||
if ((GtkJustification) label->jtype != jtype)
|
||||
{
|
||||
if (GTK_WIDGET_MAPPED (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
if (label->jtype == GTK_JUSTIFY_FILL ||
|
||||
jtype == GTK_JUSTIFY_FILL)
|
||||
gtk_label_free_words (label);
|
||||
|
||||
label->jtype = jtype;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_label_set_justify (GtkLabel *label, GtkJustification jtype)
|
||||
gtk_label_set_line_wrap (GtkLabel *label,
|
||||
gboolean wrap)
|
||||
{
|
||||
g_return_if_fail (label != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
if ((GtkJustification) label->jtype != jtype)
|
||||
wrap = wrap != FALSE;
|
||||
|
||||
if (label->wrap != wrap)
|
||||
{
|
||||
if ((label->jtype == GTK_JUSTIFY_FILL) ||
|
||||
(jtype == GTK_JUSTIFY_FILL))
|
||||
/* FIXME: think about this a little */
|
||||
gtk_label_free_words (label);
|
||||
if (GTK_WIDGET_DRAWABLE (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
|
||||
label->jtype = jtype;
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (label))
|
||||
{
|
||||
if (GTK_WIDGET_MAPPED (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
label->wrap = wrap;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_label_set_line_wrap (GtkLabel *label, gboolean wrap)
|
||||
{
|
||||
g_return_if_fail (label != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
if (label->wrap != wrap) {
|
||||
if (GTK_WIDGET_VISIBLE (label))
|
||||
{
|
||||
if (GTK_WIDGET_MAPPED (label))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (label));
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
label->wrap = wrap;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_label_get (GtkLabel *label,
|
||||
char **str)
|
||||
gtk_label_get (GtkLabel *label,
|
||||
gchar **str)
|
||||
{
|
||||
g_return_if_fail (label != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
@@ -368,77 +351,22 @@ gtk_label_finalize (GtkObject *object)
|
||||
|
||||
g_free (label->label);
|
||||
g_free (label->label_wc);
|
||||
|
||||
if (label->pattern)
|
||||
g_free (label->pattern);
|
||||
g_free (label->pattern);
|
||||
|
||||
gtk_label_free_words (label);
|
||||
(* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
|
||||
|
||||
GTK_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static GtkLabelWord*
|
||||
gtk_label_word_alloc ()
|
||||
{
|
||||
GtkLabelWord * word;
|
||||
|
||||
if (!word_chunk)
|
||||
{
|
||||
word_chunk = g_mem_chunk_new ("GtkLabelWord chunk",
|
||||
sizeof (GtkLabelWord),
|
||||
32 * sizeof (GtkLabelWord),
|
||||
G_ALLOC_ONLY);
|
||||
}
|
||||
|
||||
if (free_words)
|
||||
{
|
||||
word = free_words;
|
||||
free_words = word->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
word = g_mem_chunk_alloc (word_chunk);
|
||||
}
|
||||
|
||||
word->next = 0;
|
||||
word->uline = 0;
|
||||
return word;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_free_words (GtkLabel *label)
|
||||
{
|
||||
GtkLabelWord * last;
|
||||
|
||||
if (label->words)
|
||||
{
|
||||
for (last = label->words; last->next != 0; last = last->next)
|
||||
gtk_label_free_ulines (label->words);
|
||||
last->next = free_words;
|
||||
free_words = label->words;
|
||||
label->words = NULL;
|
||||
}
|
||||
}
|
||||
static GtkLabelULine*
|
||||
gtk_label_uline_alloc (void)
|
||||
{
|
||||
GtkLabelULine * uline;
|
||||
GtkLabelULine *uline;
|
||||
|
||||
if (!uline_chunk)
|
||||
{
|
||||
uline_chunk = g_mem_chunk_new ("GtkLabelWord chunk",
|
||||
sizeof (GtkLabelULine),
|
||||
32 * sizeof (GtkLabelULine),
|
||||
G_ALLOC_ONLY);
|
||||
}
|
||||
|
||||
if (free_ulines)
|
||||
{
|
||||
uline = free_ulines;
|
||||
free_ulines = uline->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
uline = g_mem_chunk_alloc (uline_chunk);
|
||||
}
|
||||
uline_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE);
|
||||
|
||||
uline = g_chunk_new0 (GtkLabelULine, uline_chunk);
|
||||
|
||||
uline->next = NULL;
|
||||
|
||||
@@ -448,14 +376,44 @@ gtk_label_uline_alloc (void)
|
||||
static void
|
||||
gtk_label_free_ulines (GtkLabelWord *word)
|
||||
{
|
||||
GtkLabelULine *last;
|
||||
if (word->uline)
|
||||
while (word->uline)
|
||||
{
|
||||
for (last = word->uline; last->next != 0; last = last->next)
|
||||
;
|
||||
last->next = free_ulines;
|
||||
free_ulines = word->uline;
|
||||
word->uline = 0;
|
||||
GtkLabelULine *uline = word->uline;
|
||||
|
||||
word->uline = uline->next;
|
||||
g_chunk_free (uline, uline_chunk);
|
||||
}
|
||||
}
|
||||
|
||||
static GtkLabelWord*
|
||||
gtk_label_word_alloc (void)
|
||||
{
|
||||
GtkLabelWord * word;
|
||||
|
||||
if (!word_chunk)
|
||||
word_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE);
|
||||
|
||||
word = g_chunk_new0 (GtkLabelWord, word_chunk);
|
||||
|
||||
word->beginning = NULL;
|
||||
word->next = NULL;
|
||||
word->uline = NULL;
|
||||
|
||||
return word;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_free_words (GtkLabel *label)
|
||||
{
|
||||
while (label->words)
|
||||
{
|
||||
GtkLabelWord *word = label->words;
|
||||
|
||||
label->words = word->next;
|
||||
|
||||
gtk_label_free_ulines (word);
|
||||
|
||||
g_chunk_free (word, word_chunk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,8 +424,6 @@ gtk_label_split_text (GtkLabel *label)
|
||||
gint space_width, line_width, max_line_width;
|
||||
GdkWChar *str, *p;
|
||||
|
||||
g_return_val_if_fail (GTK_WIDGET (label)->style->font != NULL, 0);
|
||||
|
||||
gtk_label_free_words (label);
|
||||
if (label->label == NULL)
|
||||
return 0;
|
||||
@@ -530,7 +486,7 @@ gtk_label_split_text (GtkLabel *label)
|
||||
|
||||
/* Add an empty word to represent an empty line
|
||||
*/
|
||||
if ((str == label->label_wc) || (str[-1] == '\n'))
|
||||
if (str == label->label_wc || str[-1] == '\n')
|
||||
{
|
||||
word = gtk_label_word_alloc ();
|
||||
|
||||
@@ -546,16 +502,14 @@ gtk_label_split_text (GtkLabel *label)
|
||||
return MAX (line_width, max_line_width);
|
||||
}
|
||||
|
||||
/* this needs to handle white space better. */
|
||||
static gint
|
||||
gtk_label_split_text_wrapped (GtkLabel *label)
|
||||
{
|
||||
/* this needs to handle white space better. */
|
||||
GtkLabelWord *word, **tailp;
|
||||
gint space_width, line_width, max_line_width;
|
||||
GdkWChar *str, *p;
|
||||
|
||||
g_return_val_if_fail (GTK_WIDGET (label)->style->font != NULL, 0);
|
||||
|
||||
gtk_label_free_words (label);
|
||||
if (label->label == NULL)
|
||||
return 0;
|
||||
@@ -668,8 +622,9 @@ gtk_label_pick_width (GtkLabel *label,
|
||||
* use gtk_label_finalize_wrap instead.
|
||||
*/
|
||||
static void
|
||||
gtk_label_finalize_lines (GtkLabel *label,
|
||||
gint line_width)
|
||||
gtk_label_finalize_lines (GtkLabel *label,
|
||||
GtkRequisition *requisition,
|
||||
gint max_line_width)
|
||||
{
|
||||
GtkLabelWord *line;
|
||||
gint y, baseline_skip, y_max;
|
||||
@@ -680,14 +635,15 @@ gtk_label_finalize_lines (GtkLabel *label,
|
||||
ptrn = label->pattern;
|
||||
|
||||
y = 0;
|
||||
baseline_skip = GTK_WIDGET (label)->style->font->ascent + GTK_WIDGET (label)->style->font->descent + 2;
|
||||
baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
|
||||
GTK_WIDGET (label)->style->font->descent + 2);
|
||||
|
||||
for (line = label->words; line; line = line->next)
|
||||
{
|
||||
if (label->jtype == GTK_JUSTIFY_CENTER)
|
||||
line->x = (line_width - line->width) / 2;
|
||||
line->x = (max_line_width - line->width) / 2;
|
||||
else if (label->jtype == GTK_JUSTIFY_RIGHT)
|
||||
line->x = line_width - line->width;
|
||||
line->x = max_line_width - line->width;
|
||||
else
|
||||
line->x = 0;
|
||||
|
||||
@@ -748,15 +704,16 @@ gtk_label_finalize_lines (GtkLabel *label,
|
||||
y += (baseline_skip + y_max);
|
||||
}
|
||||
|
||||
label->max_width = line_width;
|
||||
GTK_WIDGET (label)->requisition.width = line_width + 2 * label->misc.xpad;
|
||||
GTK_WIDGET (label)->requisition.height = y + 2 * label->misc.ypad;
|
||||
label->max_width = max_line_width;
|
||||
requisition->width = max_line_width + 2 * label->misc.xpad;
|
||||
requisition->height = y + 2 * label->misc.ypad;
|
||||
}
|
||||
|
||||
/* this finalizes word-wrapped words */
|
||||
static void
|
||||
gtk_label_finalize_lines_wrap (GtkLabel *label,
|
||||
gint line_width)
|
||||
gtk_label_finalize_lines_wrap (GtkLabel *label,
|
||||
GtkRequisition *requisition,
|
||||
gint max_line_width)
|
||||
{
|
||||
GtkLabelWord *word, *line, *next_line;
|
||||
GtkWidget *widget;
|
||||
@@ -767,12 +724,13 @@ gtk_label_finalize_lines_wrap (GtkLabel *label,
|
||||
|
||||
ptrn = label->pattern;
|
||||
y = 0;
|
||||
baseline_skip = GTK_WIDGET (label)->style->font->ascent + GTK_WIDGET (label)->style->font->descent + 1;
|
||||
baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
|
||||
GTK_WIDGET (label)->style->font->descent + 1);
|
||||
|
||||
for (line = label->words; line != 0; line = next_line)
|
||||
{
|
||||
space = 0;
|
||||
extra_width = line_width - line->width;
|
||||
extra_width = max_line_width - line->width;
|
||||
|
||||
for (next_line = line->next; next_line; next_line = next_line->next)
|
||||
{
|
||||
@@ -809,10 +767,10 @@ gtk_label_finalize_lines_wrap (GtkLabel *label,
|
||||
y += (baseline_skip);
|
||||
}
|
||||
|
||||
label->max_width = line_width;
|
||||
label->max_width = max_line_width;
|
||||
widget = GTK_WIDGET (label);
|
||||
widget->requisition.width = line_width + 2 * label->misc.xpad;
|
||||
widget->requisition.height = y + 2 * label->misc.ypad + 1;
|
||||
requisition->width = max_line_width + 2 * label->misc.xpad;
|
||||
requisition->height = y + 2 * label->misc.ypad + 1;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -821,12 +779,11 @@ gtk_label_size_request (GtkWidget *widget,
|
||||
{
|
||||
GtkLabel *label;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (widget));
|
||||
g_return_if_fail (requisition != NULL);
|
||||
|
||||
label = GTK_LABEL (widget);
|
||||
|
||||
|
||||
/*
|
||||
* There are a number of conditions which will necessitate re-filling
|
||||
* our text:
|
||||
@@ -858,7 +815,7 @@ gtk_label_size_request (GtkWidget *widget,
|
||||
aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info");
|
||||
if (aux_info && aux_info->width > 0)
|
||||
{
|
||||
label->max_width = MAX(aux_info->width - 2 * label->misc.xpad, 1);
|
||||
label->max_width = MAX (aux_info->width - 2 * label->misc.xpad, 1);
|
||||
gtk_label_split_text_wrapped (label);
|
||||
}
|
||||
else
|
||||
@@ -878,33 +835,29 @@ gtk_label_size_request (GtkWidget *widget,
|
||||
label->max_width);
|
||||
}
|
||||
}
|
||||
gtk_label_finalize_lines_wrap (label, label->max_width);
|
||||
gtk_label_finalize_lines_wrap (label, requisition, label->max_width);
|
||||
}
|
||||
else if (label->words == NULL)
|
||||
else if (!label->words)
|
||||
{
|
||||
label->max_width = gtk_label_split_text (label);
|
||||
gtk_label_finalize_lines (label, label->max_width);
|
||||
gtk_label_finalize_lines (label, requisition, label->max_width);
|
||||
}
|
||||
|
||||
if (requisition != &widget->requisition)
|
||||
*requisition = widget->requisition;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
gtk_label_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GtkLabel *label;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_LABEL (widget));
|
||||
|
||||
|
||||
label = GTK_LABEL (widget);
|
||||
|
||||
/* Clear the list of words so that they are recomputed on
|
||||
* size_request
|
||||
*/
|
||||
if (previous_style && label->words)
|
||||
/* Clear the list of words so that they are recomputed on
|
||||
* size_request
|
||||
*/
|
||||
gtk_label_free_words (label);
|
||||
}
|
||||
|
||||
@@ -946,7 +899,6 @@ gtk_label_expose (GtkWidget *widget,
|
||||
GtkLabelWord *word;
|
||||
gint x, y;
|
||||
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_LABEL (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
@@ -999,7 +951,8 @@ gtk_label_parse_uline (GtkLabel *label,
|
||||
gint length, wc_length;
|
||||
gboolean underscore;
|
||||
|
||||
g_return_val_if_fail(string != NULL, GDK_VoidSymbol);
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), GDK_VoidSymbol);
|
||||
g_return_val_if_fail (string != NULL, GDK_VoidSymbol);
|
||||
|
||||
/* Convert text to wide characters */
|
||||
length = strlen (string);
|
||||
@@ -1058,4 +1011,3 @@ gtk_label_parse_uline (GtkLabel *label,
|
||||
|
||||
return accel_key;
|
||||
}
|
||||
|
||||
|
||||
+5
-6
@@ -54,7 +54,7 @@ struct _GtkLabel
|
||||
|
||||
gchar *label;
|
||||
GdkWChar *label_wc;
|
||||
gchar *pattern;
|
||||
gchar *pattern;
|
||||
|
||||
GtkLabelWord *words;
|
||||
|
||||
@@ -69,10 +69,10 @@ struct _GtkLabelClass
|
||||
};
|
||||
|
||||
|
||||
guint gtk_label_get_type (void);
|
||||
GtkWidget* gtk_label_new (const char *str);
|
||||
GtkType gtk_label_get_type (void);
|
||||
GtkWidget* gtk_label_new (const gchar *str);
|
||||
void gtk_label_set_text (GtkLabel *label,
|
||||
const char *str);
|
||||
const gchar *str);
|
||||
void gtk_label_set_justify (GtkLabel *label,
|
||||
GtkJustification jtype);
|
||||
void gtk_label_set_pattern (GtkLabel *label,
|
||||
@@ -80,13 +80,12 @@ void gtk_label_set_pattern (GtkLabel *label,
|
||||
void gtk_label_set_line_wrap (GtkLabel *label,
|
||||
gboolean wrap);
|
||||
void gtk_label_get (GtkLabel *label,
|
||||
char **str);
|
||||
gchar **str);
|
||||
|
||||
/* Convenience function to set the name and pattern by parsing
|
||||
* a string with embedded underscores, and return the appropriate
|
||||
* key symbol for the accelerator.
|
||||
*/
|
||||
|
||||
guint gtk_label_parse_uline (GtkLabel *label,
|
||||
const gchar *string);
|
||||
|
||||
|
||||
+22
-8
@@ -53,6 +53,7 @@ struct _GtkLayoutChild {
|
||||
static void gtk_layout_class_init (GtkLayoutClass *class);
|
||||
static void gtk_layout_init (GtkLayout *layout);
|
||||
|
||||
static void gtk_layout_finalize (GtkObject *object);
|
||||
static void gtk_layout_realize (GtkWidget *widget);
|
||||
static void gtk_layout_unrealize (GtkWidget *widget);
|
||||
static void gtk_layout_map (GtkWidget *widget);
|
||||
@@ -198,6 +199,17 @@ gtk_layout_set_adjustments (GtkLayout *layout,
|
||||
gtk_layout_adjustment_changed (NULL, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_layout_finalize (GtkObject *object)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (object);
|
||||
|
||||
gtk_object_unref (GTK_OBJECT (layout->hadjustment));
|
||||
gtk_object_unref (GTK_OBJECT (layout->vadjustment));
|
||||
|
||||
GTK_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_layout_set_hadjustment (GtkLayout *layout,
|
||||
GtkAdjustment *adjustment)
|
||||
@@ -374,6 +386,8 @@ gtk_layout_class_init (GtkLayoutClass *class)
|
||||
|
||||
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
|
||||
|
||||
object_class->finalize = gtk_layout_finalize;
|
||||
|
||||
widget_class->realize = gtk_layout_realize;
|
||||
widget_class->unrealize = gtk_layout_unrealize;
|
||||
widget_class->map = gtk_layout_map;
|
||||
@@ -382,6 +396,11 @@ gtk_layout_class_init (GtkLayoutClass *class)
|
||||
widget_class->draw = gtk_layout_draw;
|
||||
widget_class->expose_event = gtk_layout_expose;
|
||||
|
||||
container_class->remove = gtk_layout_remove;
|
||||
container_class->forall = gtk_layout_forall;
|
||||
|
||||
class->set_scroll_adjustments = gtk_layout_set_adjustments;
|
||||
|
||||
widget_class->set_scroll_adjustments_signal =
|
||||
gtk_signal_new ("set_scroll_adjustments",
|
||||
GTK_RUN_LAST,
|
||||
@@ -389,11 +408,6 @@ gtk_layout_class_init (GtkLayoutClass *class)
|
||||
GTK_SIGNAL_OFFSET (GtkLayoutClass, set_scroll_adjustments),
|
||||
gtk_marshal_NONE__POINTER_POINTER,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
|
||||
|
||||
container_class->remove = gtk_layout_remove;
|
||||
container_class->forall = gtk_layout_forall;
|
||||
|
||||
class->set_scroll_adjustments = gtk_layout_set_adjustments;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1009,7 +1023,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
|
||||
0,
|
||||
MAX ((gint)widget->allocation.height - dy, 0),
|
||||
widget->allocation.width,
|
||||
MIN (dy, widget->allocation.width));
|
||||
MIN (dy, widget->allocation.height));
|
||||
}
|
||||
else if (dy < 0)
|
||||
{
|
||||
@@ -1031,8 +1045,8 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
|
||||
gtk_layout_expose_area (layout,
|
||||
0,
|
||||
0,
|
||||
widget->allocation.height,
|
||||
MIN (-dy, (gint)widget->allocation.width));
|
||||
widget->allocation.width,
|
||||
MIN (-dy, (gint)widget->allocation.height));
|
||||
}
|
||||
|
||||
gtk_layout_position_children (layout);
|
||||
|
||||
+6
-17
@@ -2409,19 +2409,14 @@ gtk_list_move_focus_child (GtkList *list,
|
||||
static gint
|
||||
gtk_list_horizontal_timeout (GtkWidget *list)
|
||||
{
|
||||
gint x, y;
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
GdkEventMotion event = { 0 };
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
GTK_LIST (list)->htimer = 0;
|
||||
gdk_window_get_pointer (list->window, &x, &y, &mask);
|
||||
|
||||
event.is_hint = 0;
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
event.state = mask;
|
||||
event.type = GDK_MOTION_NOTIFY;
|
||||
event.send_event = TRUE;
|
||||
|
||||
gtk_list_motion_notify (list, &event);
|
||||
|
||||
@@ -2433,20 +2428,14 @@ gtk_list_horizontal_timeout (GtkWidget *list)
|
||||
static gint
|
||||
gtk_list_vertical_timeout (GtkWidget *list)
|
||||
{
|
||||
gint x;
|
||||
gint y;
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
GdkEventMotion event = { 0 };
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
GTK_LIST (list)->vtimer = 0;
|
||||
gdk_window_get_pointer (list->window, &x, &y, &mask);
|
||||
|
||||
event.is_hint = 0;
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
event.state = mask;
|
||||
event.type = GDK_MOTION_NOTIFY;
|
||||
event.send_event = TRUE;
|
||||
|
||||
gtk_list_motion_notify (list, &event);
|
||||
|
||||
|
||||
+202
-91
@@ -73,7 +73,8 @@ static void gtk_menu_reparent (GtkMenu *menu,
|
||||
gboolean unrealize);
|
||||
|
||||
static GtkMenuShellClass *parent_class = NULL;
|
||||
static const gchar *attach_data_key = "gtk-menu-attach-data";
|
||||
static const gchar *attach_data_key = "gtk-menu-attach-data";
|
||||
static GQuark quark_uline_accel_group = 0;
|
||||
|
||||
|
||||
GtkType
|
||||
@@ -155,6 +156,33 @@ gtk_menu_class_init (GtkMenuClass *class)
|
||||
GTK_MENU_DIR_CHILD);
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_menu_window_event (GtkWidget *window,
|
||||
GdkEvent *event,
|
||||
GtkWidget *menu)
|
||||
{
|
||||
gboolean handled = FALSE;
|
||||
|
||||
gtk_widget_ref (window);
|
||||
gtk_widget_ref (menu);
|
||||
|
||||
switch (event->type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
gtk_widget_event (menu, event);
|
||||
handled = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_widget_unref (window);
|
||||
gtk_widget_unref (menu);
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_init (GtkMenu *menu)
|
||||
{
|
||||
@@ -165,9 +193,10 @@ gtk_menu_init (GtkMenu *menu)
|
||||
menu->position_func_data = NULL;
|
||||
|
||||
menu->toplevel = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_signal_connect_object (GTK_OBJECT (menu->toplevel), "key_press_event",
|
||||
GTK_SIGNAL_FUNC (gtk_menu_key_press),
|
||||
GTK_OBJECT (menu));
|
||||
gtk_signal_connect (GTK_OBJECT (menu->toplevel),
|
||||
"event",
|
||||
GTK_SIGNAL_FUNC (gtk_menu_window_event),
|
||||
GTK_OBJECT (menu));
|
||||
gtk_window_set_policy (GTK_WINDOW (menu->toplevel),
|
||||
FALSE, FALSE, TRUE);
|
||||
|
||||
@@ -203,6 +232,12 @@ gtk_menu_destroy (GtkObject *object)
|
||||
|
||||
gtk_menu_set_accel_group (menu, NULL);
|
||||
|
||||
if (menu->old_active_menu_item)
|
||||
{
|
||||
gtk_widget_unref (menu->old_active_menu_item);
|
||||
menu->old_active_menu_item = NULL;
|
||||
}
|
||||
|
||||
/* Add back the reference count for being a child */
|
||||
gtk_object_ref (object);
|
||||
|
||||
@@ -327,6 +362,42 @@ gtk_menu_insert (GtkMenu *menu,
|
||||
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), child, position);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_tearoff_bg_copy (GtkMenu *menu)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = GTK_WIDGET (menu);
|
||||
|
||||
if (menu->torn_off)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GdkGC *gc;
|
||||
GdkGCValues gc_values;
|
||||
|
||||
gc_values.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
||||
gc = gdk_gc_new_with_values (widget->window,
|
||||
&gc_values, GDK_GC_SUBWINDOW);
|
||||
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
widget->requisition.width,
|
||||
widget->requisition.height,
|
||||
-1);
|
||||
|
||||
gdk_draw_pixmap (pixmap, gc,
|
||||
widget->window,
|
||||
0, 0, 0, 0, -1, -1);
|
||||
gdk_gc_unref (gc);
|
||||
|
||||
gtk_widget_set_usize (menu->tearoff_window,
|
||||
widget->requisition.width,
|
||||
widget->requisition.height);
|
||||
|
||||
gdk_window_set_back_pixmap (menu->tearoff_window->window, pixmap, FALSE);
|
||||
gdk_pixmap_unref (pixmap);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_popup (GtkMenu *menu,
|
||||
GtkWidget *parent_menu_shell,
|
||||
@@ -363,35 +434,12 @@ gtk_menu_popup (GtkMenu *menu,
|
||||
if ((current_event->type != GDK_BUTTON_PRESS) &&
|
||||
(current_event->type != GDK_ENTER_NOTIFY))
|
||||
menu_shell->ignore_enter = TRUE;
|
||||
gdk_event_free(current_event);
|
||||
gdk_event_free (current_event);
|
||||
}
|
||||
|
||||
if (menu->torn_off)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GdkGC *gc;
|
||||
GdkGCValues gc_values;
|
||||
|
||||
gc_values.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
||||
gc = gdk_gc_new_with_values (widget->window,
|
||||
&gc_values, GDK_GC_SUBWINDOW);
|
||||
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
widget->requisition.width,
|
||||
widget->requisition.height,
|
||||
-1);
|
||||
|
||||
gdk_draw_pixmap (pixmap, gc,
|
||||
widget->window,
|
||||
0, 0, 0, 0, -1, -1);
|
||||
gdk_gc_unref(gc);
|
||||
|
||||
gtk_widget_set_usize (menu->tearoff_window,
|
||||
widget->requisition.width,
|
||||
widget->requisition.height);
|
||||
|
||||
gdk_window_set_back_pixmap (menu->tearoff_window->window, pixmap, FALSE);
|
||||
gdk_pixmap_unref (pixmap);
|
||||
gtk_menu_tearoff_bg_copy (menu);
|
||||
|
||||
/* We force an unrealize here so that we don't trigger redrawing/
|
||||
* clearing code - we just want to reveal our backing pixmap.
|
||||
@@ -479,10 +527,13 @@ gtk_menu_popdown (GtkMenu *menu)
|
||||
|
||||
if (menu_shell->active_menu_item)
|
||||
{
|
||||
if (menu->old_active_menu_item)
|
||||
gtk_widget_unref (menu->old_active_menu_item);
|
||||
menu->old_active_menu_item = menu_shell->active_menu_item;
|
||||
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
|
||||
menu_shell->active_menu_item = NULL;
|
||||
gtk_widget_ref (menu->old_active_menu_item);
|
||||
}
|
||||
|
||||
gtk_menu_shell_deselect (menu_shell);
|
||||
|
||||
/* The X Grab, if present, will automatically be removed when we hide
|
||||
* the window */
|
||||
@@ -538,6 +589,8 @@ gtk_menu_get_active (GtkMenu *menu)
|
||||
}
|
||||
|
||||
menu->old_active_menu_item = child;
|
||||
if (menu->old_active_menu_item)
|
||||
gtk_widget_ref (menu->old_active_menu_item);
|
||||
}
|
||||
|
||||
return menu->old_active_menu_item;
|
||||
@@ -558,7 +611,12 @@ gtk_menu_set_active (GtkMenu *menu,
|
||||
{
|
||||
child = tmp_list->data;
|
||||
if (GTK_BIN (child)->child)
|
||||
menu->old_active_menu_item = child;
|
||||
{
|
||||
if (menu->old_active_menu_item)
|
||||
gtk_widget_unref (menu->old_active_menu_item);
|
||||
menu->old_active_menu_item = child;
|
||||
gtk_widget_ref (menu->old_active_menu_item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +624,6 @@ void
|
||||
gtk_menu_set_accel_group (GtkMenu *menu,
|
||||
GtkAccelGroup *accel_group)
|
||||
{
|
||||
g_return_if_fail (menu != NULL);
|
||||
g_return_if_fail (GTK_IS_MENU (menu));
|
||||
|
||||
if (menu->accel_group != accel_group)
|
||||
@@ -579,6 +636,45 @@ gtk_menu_set_accel_group (GtkMenu *menu,
|
||||
}
|
||||
}
|
||||
|
||||
GtkAccelGroup*
|
||||
gtk_menu_get_accel_group (GtkMenu *menu)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
|
||||
|
||||
return menu->accel_group;
|
||||
}
|
||||
|
||||
GtkAccelGroup*
|
||||
gtk_menu_ensure_uline_accel_group (GtkMenu *menu)
|
||||
{
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
|
||||
|
||||
if (!quark_uline_accel_group)
|
||||
quark_uline_accel_group = g_quark_from_static_string ("GtkMenu-uline-accel-group");
|
||||
|
||||
accel_group = gtk_object_get_data_by_id (GTK_OBJECT (menu), quark_uline_accel_group);
|
||||
if (!accel_group)
|
||||
{
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_accel_group_attach (accel_group, GTK_OBJECT (menu));
|
||||
gtk_object_set_data_by_id_full (GTK_OBJECT (menu),
|
||||
quark_uline_accel_group,
|
||||
accel_group,
|
||||
(GtkDestroyNotify) gtk_accel_group_unref);
|
||||
}
|
||||
|
||||
return accel_group;
|
||||
}
|
||||
|
||||
GtkAccelGroup*
|
||||
gtk_menu_get_uline_accel_group (GtkMenu *menu)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
|
||||
|
||||
return gtk_object_get_data_by_id (GTK_OBJECT (menu), quark_uline_accel_group);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_reposition (GtkMenu *menu)
|
||||
@@ -614,10 +710,10 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
|
||||
|
||||
menu->tearoff_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_set_app_paintable (menu->tearoff_window, TRUE);
|
||||
gtk_signal_connect_object (GTK_OBJECT (menu->tearoff_window),
|
||||
"key_press_event",
|
||||
GTK_SIGNAL_FUNC (gtk_menu_key_press),
|
||||
GTK_OBJECT (menu));
|
||||
gtk_signal_connect (GTK_OBJECT (menu->tearoff_window),
|
||||
"event",
|
||||
GTK_SIGNAL_FUNC (gtk_menu_window_event),
|
||||
GTK_OBJECT (menu));
|
||||
gtk_widget_realize (menu->tearoff_window);
|
||||
|
||||
title = gtk_object_get_data (GTK_OBJECT (menu), "gtk-menu-title");
|
||||
@@ -888,16 +984,19 @@ gtk_menu_expose (GtkWidget *widget,
|
||||
GtkWidget *child;
|
||||
GdkEventExpose child_event;
|
||||
GList *children;
|
||||
GtkMenu *menu;
|
||||
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
menu_shell = GTK_MENU_SHELL (widget);
|
||||
menu = GTK_MENU (widget);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
gtk_menu_paint (widget);
|
||||
|
||||
menu_shell = GTK_MENU_SHELL (widget);
|
||||
child_event = *event;
|
||||
|
||||
children = menu_shell->children;
|
||||
@@ -943,59 +1042,62 @@ gtk_menu_key_press (GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* Modify the accelerators */
|
||||
if (delete || gtk_accelerator_valid (event->keyval, event->keyval))
|
||||
if (menu_shell->active_menu_item &&
|
||||
GTK_BIN (menu_shell->active_menu_item)->child &&
|
||||
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu == NULL &&
|
||||
!gtk_widget_accelerators_locked (menu_shell->active_menu_item) &&
|
||||
(delete ||
|
||||
(gtk_accelerator_valid (event->keyval, event->state) &&
|
||||
(event->state ||
|
||||
!gtk_menu_get_uline_accel_group (GTK_MENU (menu_shell)) ||
|
||||
(event->keyval >= GDK_F1 && event->keyval <= GDK_F35)))))
|
||||
{
|
||||
if (menu_shell->active_menu_item &&
|
||||
GTK_BIN (menu_shell->active_menu_item)->child &&
|
||||
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu == NULL)
|
||||
GtkMenuItem *menu_item;
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
menu_item = GTK_MENU_ITEM (menu_shell->active_menu_item);
|
||||
|
||||
if (!GTK_MENU (widget)->accel_group)
|
||||
accel_group = gtk_accel_group_get_default ();
|
||||
else
|
||||
accel_group = GTK_MENU (widget)->accel_group;
|
||||
|
||||
gtk_widget_remove_accelerators (GTK_WIDGET (menu_item),
|
||||
gtk_signal_name (menu_item->accelerator_signal),
|
||||
TRUE);
|
||||
|
||||
if (!delete &&
|
||||
0 == gtk_widget_accelerator_signal (GTK_WIDGET (menu_item),
|
||||
accel_group,
|
||||
event->keyval,
|
||||
event->state))
|
||||
{
|
||||
GtkMenuItem *menu_item;
|
||||
GtkAccelGroup *accel_group;
|
||||
GSList *slist;
|
||||
|
||||
menu_item = GTK_MENU_ITEM (menu_shell->active_menu_item);
|
||||
|
||||
if (!GTK_MENU (widget)->accel_group)
|
||||
accel_group = gtk_accel_group_get_default ();
|
||||
else
|
||||
accel_group = GTK_MENU (widget)->accel_group;
|
||||
|
||||
gtk_widget_remove_accelerators (GTK_WIDGET (menu_item),
|
||||
gtk_signal_name (menu_item->accelerator_signal),
|
||||
TRUE);
|
||||
|
||||
if (!delete &&
|
||||
0 == gtk_widget_accelerator_signal (GTK_WIDGET (menu_item),
|
||||
accel_group,
|
||||
event->keyval,
|
||||
event->state))
|
||||
slist = gtk_accel_group_entries_from_object (GTK_OBJECT (menu_item));
|
||||
while (slist)
|
||||
{
|
||||
GSList *slist;
|
||||
GtkAccelEntry *ac_entry;
|
||||
|
||||
slist = gtk_accel_group_entries_from_object (GTK_OBJECT (menu_item));
|
||||
while (slist)
|
||||
{
|
||||
GtkAccelEntry *ac_entry;
|
||||
|
||||
ac_entry = slist->data;
|
||||
|
||||
if (ac_entry->signal_id == menu_item->accelerator_signal)
|
||||
break;
|
||||
|
||||
slist = slist->next;
|
||||
}
|
||||
|
||||
if (!slist)
|
||||
gtk_widget_add_accelerator (GTK_WIDGET (menu_item),
|
||||
gtk_signal_name (menu_item->accelerator_signal),
|
||||
accel_group,
|
||||
event->keyval,
|
||||
event->state,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
ac_entry = slist->data;
|
||||
|
||||
if (ac_entry->signal_id == menu_item->accelerator_signal)
|
||||
break;
|
||||
|
||||
slist = slist->next;
|
||||
}
|
||||
|
||||
if (!slist)
|
||||
gtk_widget_add_accelerator (GTK_WIDGET (menu_item),
|
||||
gtk_signal_name (menu_item->accelerator_signal),
|
||||
accel_group,
|
||||
event->keyval,
|
||||
event->state,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -1004,20 +1106,28 @@ gtk_menu_motion_notify (GtkWidget *widget,
|
||||
{
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
|
||||
|
||||
|
||||
if (GTK_MENU_SHELL (widget)->ignore_enter)
|
||||
GTK_MENU_SHELL (widget)->ignore_enter = FALSE;
|
||||
else
|
||||
else
|
||||
{
|
||||
GdkEvent send_event;
|
||||
gint width, height;
|
||||
|
||||
send_event.crossing.type = GDK_ENTER_NOTIFY;
|
||||
send_event.crossing.window = event->window;
|
||||
send_event.crossing.time = event->time;
|
||||
|
||||
gtk_widget_event (widget, &send_event);
|
||||
gdk_window_get_size (event->window, &width, &height);
|
||||
if (event->x >= 0 && event->x < width &&
|
||||
event->y >= 0 && event->y < height)
|
||||
{
|
||||
GdkEvent send_event;
|
||||
|
||||
send_event.crossing.type = GDK_ENTER_NOTIFY;
|
||||
send_event.crossing.window = event->window;
|
||||
send_event.crossing.time = event->time;
|
||||
send_event.crossing.send_event = TRUE;
|
||||
|
||||
gtk_widget_event (widget, &send_event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1111,6 +1221,7 @@ gtk_menu_reparent (GtkMenu *menu,
|
||||
}
|
||||
else
|
||||
gtk_widget_reparent (GTK_WIDGET (menu), new_parent);
|
||||
gtk_widget_set_usize (new_parent, -1, -1);
|
||||
|
||||
if (was_floating)
|
||||
GTK_OBJECT_SET_FLAGS (object, GTK_FLOATING);
|
||||
|
||||
+12
-1
@@ -117,8 +117,19 @@ GtkWidget* gtk_menu_get_active (GtkMenu *menu);
|
||||
void gtk_menu_set_active (GtkMenu *menu,
|
||||
guint index);
|
||||
|
||||
void gtk_menu_set_accel_group (GtkMenu *menu,
|
||||
/* set/get the acclerator group that holds global accelerators (should
|
||||
* be added to the corresponding toplevel with gtk_window_add_accel_group().
|
||||
*/
|
||||
void gtk_menu_set_accel_group (GtkMenu *menu,
|
||||
GtkAccelGroup *accel_group);
|
||||
GtkAccelGroup* gtk_menu_get_accel_group (GtkMenu *menu);
|
||||
|
||||
/* get the accelerator group that is used internally by the menu for
|
||||
* underline accelerators while the menu is popped up.
|
||||
*/
|
||||
GtkAccelGroup* gtk_menu_get_uline_accel_group (GtkMenu *menu);
|
||||
GtkAccelGroup* gtk_menu_ensure_uline_accel_group (GtkMenu *menu);
|
||||
|
||||
|
||||
/* A reference count is kept for a widget when it is attached to
|
||||
* a particular widget. This is typically a menu item; it may also
|
||||
|
||||
+14
-7
@@ -63,6 +63,7 @@ static void gtk_real_menu_item_select (GtkItem *item);
|
||||
static void gtk_real_menu_item_deselect (GtkItem *item);
|
||||
static void gtk_real_menu_item_activate_item (GtkMenuItem *item);
|
||||
static gint gtk_menu_item_select_timeout (gpointer data);
|
||||
static void gtk_menu_item_select_timeout_unlocked (gpointer data);
|
||||
static void gtk_menu_item_position_menu (GtkMenu *menu,
|
||||
gint *x,
|
||||
gint *y,
|
||||
@@ -552,7 +553,7 @@ gtk_real_menu_item_select (GtkItem *item)
|
||||
gtk_menu_item_select_timeout,
|
||||
menu_item);
|
||||
else
|
||||
gtk_menu_item_select_timeout (menu_item);
|
||||
gtk_menu_item_select_timeout_unlocked (menu_item);
|
||||
if(event) gdk_event_free(event);
|
||||
}
|
||||
|
||||
@@ -628,10 +629,20 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item)
|
||||
static gint
|
||||
gtk_menu_item_select_timeout (gpointer data)
|
||||
{
|
||||
GtkMenuItem *menu_item;
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
gtk_menu_item_select_timeout_unlocked (data);
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_item_select_timeout_unlocked (gpointer data)
|
||||
{
|
||||
GtkMenuItem *menu_item;
|
||||
|
||||
menu_item = GTK_MENU_ITEM (data);
|
||||
menu_item->timer = 0;
|
||||
|
||||
@@ -655,10 +666,6 @@ gtk_menu_item_select_timeout (gpointer data)
|
||||
gtk_menu_shell_select_item (submenu, submenu->children->data);
|
||||
}
|
||||
}
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+17
-19
@@ -137,7 +137,6 @@ static GtkWidget *gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
|
||||
GdkEvent *event);
|
||||
static GtkType gtk_menu_shell_child_type (GtkContainer *container);
|
||||
|
||||
static void gtk_menu_shell_deselect (GtkMenuShell *menu_shell);
|
||||
static void gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
GtkMenuDirectionType direction);
|
||||
static void gtk_real_menu_shell_activate_current (GtkMenuShell *menu_shell,
|
||||
@@ -435,15 +434,7 @@ gtk_menu_shell_button_press (GtkWidget *widget,
|
||||
{
|
||||
if ((menu_item->parent == widget) &&
|
||||
(menu_item != menu_shell->active_menu_item))
|
||||
{
|
||||
if (menu_shell->active_menu_item)
|
||||
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
|
||||
|
||||
menu_shell->active_menu_item = menu_item;
|
||||
gtk_menu_item_set_placement (GTK_MENU_ITEM (menu_shell->active_menu_item),
|
||||
MENU_SHELL_CLASS (menu_shell)->submenu_placement);
|
||||
gtk_menu_item_select (GTK_MENU_ITEM (menu_shell->active_menu_item));
|
||||
}
|
||||
gtk_menu_shell_select_item (menu_shell, menu_item);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -755,7 +746,7 @@ gtk_menu_shell_is_item (GtkMenuShell *menu_shell,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
static GtkWidget*
|
||||
gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
|
||||
GdkEvent *event)
|
||||
{
|
||||
@@ -775,16 +766,15 @@ gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
|
||||
/* Handlers for action signals */
|
||||
|
||||
void
|
||||
gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
|
||||
GtkWidget *menu_item)
|
||||
gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
|
||||
GtkWidget *menu_item)
|
||||
{
|
||||
g_return_if_fail (menu_shell != NULL);
|
||||
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
|
||||
g_return_if_fail (menu_item != NULL);
|
||||
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
|
||||
|
||||
if (menu_shell->active_menu_item)
|
||||
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
|
||||
gtk_menu_shell_deselect (menu_shell);
|
||||
|
||||
menu_shell->active_menu_item = menu_item;
|
||||
gtk_menu_item_set_placement (GTK_MENU_ITEM (menu_shell->active_menu_item),
|
||||
@@ -798,11 +788,16 @@ gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
|
||||
gtk_widget_activate (menu_shell->active_menu_item);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_shell_deselect (GtkMenuShell *menu_shell)
|
||||
void
|
||||
gtk_menu_shell_deselect (GtkMenuShell *menu_shell)
|
||||
{
|
||||
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
|
||||
menu_shell->active_menu_item = NULL;
|
||||
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
|
||||
|
||||
if (menu_shell->active_menu_item)
|
||||
{
|
||||
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
|
||||
menu_shell->active_menu_item = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -831,10 +826,13 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
|
||||
*/
|
||||
gdk_flush ();
|
||||
}
|
||||
|
||||
gtk_widget_ref (GTK_WIDGET (menu_shell));
|
||||
gtk_widget_activate (menu_item);
|
||||
|
||||
if (deactivate)
|
||||
gtk_signal_emit (GTK_OBJECT (menu_shell), menu_shell_signals[SELECTION_DONE]);
|
||||
gtk_widget_unref (GTK_WIDGET (menu_shell));
|
||||
}
|
||||
|
||||
/* Distance should be +/- 1 */
|
||||
|
||||
@@ -94,6 +94,7 @@ void gtk_menu_shell_insert (GtkMenuShell *menu_shell,
|
||||
void gtk_menu_shell_deactivate (GtkMenuShell *menu_shell);
|
||||
void gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
|
||||
GtkWidget *menu_item);
|
||||
void gtk_menu_shell_deselect (GtkMenuShell *menu_shell);
|
||||
void gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
|
||||
GtkWidget *menu_item,
|
||||
gboolean force_deactivate);
|
||||
|
||||
@@ -670,6 +670,49 @@ gtk_object_getv (GtkObject *object,
|
||||
gtk_object_arg_get (object, args, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_object_get (GtkObject *object,
|
||||
const gchar *first_arg_name,
|
||||
...)
|
||||
{
|
||||
va_list var_args;
|
||||
gchar *name;
|
||||
|
||||
g_return_if_fail (GTK_IS_OBJECT (object));
|
||||
|
||||
va_start (var_args, first_arg_name);
|
||||
|
||||
name = (gchar*) first_arg_name;
|
||||
while (name)
|
||||
{
|
||||
gpointer value_pointer = va_arg (var_args, gpointer);
|
||||
|
||||
if (value_pointer)
|
||||
{
|
||||
GtkArgInfo *info;
|
||||
gchar *error;
|
||||
GtkArg arg;
|
||||
|
||||
error = gtk_arg_get_info (GTK_OBJECT_TYPE (object),
|
||||
object_arg_info_ht,
|
||||
name,
|
||||
&info);
|
||||
if (error)
|
||||
{
|
||||
g_warning ("gtk_object_get(): %s", error);
|
||||
g_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
arg.name = name;
|
||||
gtk_object_arg_get (object, &arg, info);
|
||||
gtk_arg_to_valueloc (&arg, value_pointer);
|
||||
}
|
||||
|
||||
name = va_arg (var_args, gchar*);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_object_set (GtkObject *object,
|
||||
const gchar *first_arg_name,
|
||||
|
||||
@@ -243,6 +243,14 @@ void gtk_object_destroy (GtkObject *object);
|
||||
void gtk_object_getv (GtkObject *object,
|
||||
guint n_args,
|
||||
GtkArg *args);
|
||||
/* gtk_object_get() sets the variable values pointed to by the adresses
|
||||
* passed after the argument names according to the arguments value.
|
||||
* if GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING, it's
|
||||
* the callers response to do a g_free (retrived_value);
|
||||
*/
|
||||
void gtk_object_get (GtkObject *object,
|
||||
const gchar *first_arg_name,
|
||||
...);
|
||||
|
||||
/* gtk_object_set() takes a variable argument list of the form:
|
||||
* (..., gchar *arg_name, ARG_VALUES, [repeatedly name/value pairs,] NULL)
|
||||
|
||||
+17
-10
@@ -455,9 +455,13 @@ gtk_paned_set_position (GtkPaned *paned,
|
||||
|
||||
if (position >= 0)
|
||||
{
|
||||
paned->child1_size = CLAMP (position,
|
||||
paned->min_position,
|
||||
paned->max_position);
|
||||
/* We don't clamp here - the assumption is that
|
||||
* if the total allocation changes at the same time
|
||||
* as the position, the position set is with reference
|
||||
* to the new total size. If only the position changes,
|
||||
* then clamping will occur in gtk_paned_compute_position()
|
||||
*/
|
||||
paned->child1_size = position;
|
||||
paned->position_set = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -525,13 +529,16 @@ gtk_paned_compute_position (GtkPaned *paned,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (paned->last_allocation < 0)
|
||||
paned->last_allocation = allocation;
|
||||
|
||||
if (paned->child1_resize && !paned->child2_resize)
|
||||
paned->child1_size += (allocation - paned->last_allocation);
|
||||
else if (!(!paned->child1_resize && paned->child2_resize))
|
||||
paned->child1_size = allocation * ((gdouble)paned->child1_size / (paned->last_allocation));
|
||||
/* If the position was set before the initial allocation.
|
||||
* (paned->last_allocation < 0) just clamp it and leave it.
|
||||
*/
|
||||
if (paned->last_allocation >= 0)
|
||||
{
|
||||
if (paned->child1_resize && !paned->child2_resize)
|
||||
paned->child1_size += (allocation - paned->last_allocation);
|
||||
else if (!(!paned->child1_resize && paned->child2_resize))
|
||||
paned->child1_size = allocation * ((gdouble)paned->child1_size / (paned->last_allocation));
|
||||
}
|
||||
}
|
||||
|
||||
paned->child1_size = CLAMP (paned->child1_size,
|
||||
|
||||
+2
-2
@@ -288,7 +288,7 @@ gtk_rc_append_default_module_path(void)
|
||||
module_path[n++] = g_strdup(path);
|
||||
g_free(path);
|
||||
|
||||
var = getenv("HOME");
|
||||
var = g_get_home_dir ();
|
||||
if (var)
|
||||
path = g_strdup_printf("%s%s", var, ".gtk/lib/themes/engines");
|
||||
module_path[n++] = g_strdup(path);
|
||||
@@ -388,7 +388,7 @@ gtk_rc_init (void)
|
||||
gchar *locale_suffixes[3];
|
||||
gint n_locale_suffixes = 0;
|
||||
gint i, j;
|
||||
#ifdef HAVE_LC_MESSAGES
|
||||
#if defined (HAVE_LC_MESSAGES) && !defined (X_LOCALE)
|
||||
char *locale = setlocale (LC_MESSAGES, NULL);
|
||||
#else
|
||||
char *locale = setlocale (LC_CTYPE, NULL);
|
||||
|
||||
+23
-9
@@ -837,6 +837,8 @@ gtk_selection_request (GtkWidget *widget,
|
||||
gint length;
|
||||
|
||||
mult_atoms = NULL;
|
||||
|
||||
gdk_error_trap_push();
|
||||
if (!gdk_property_get (info->requestor, event->property, 0, /* AnyPropertyType */
|
||||
0, GTK_SELECTION_MAX_SIZE, FALSE,
|
||||
&type, &format, &length, &mult_atoms))
|
||||
@@ -847,6 +849,7 @@ gtk_selection_request (GtkWidget *widget,
|
||||
g_free (info);
|
||||
return TRUE;
|
||||
}
|
||||
gdk_error_trap_pop();
|
||||
|
||||
info->num_conversions = length / (2*sizeof (GdkAtom));
|
||||
info->conversions = g_new (GtkIncrConversion, info->num_conversions);
|
||||
@@ -957,9 +960,19 @@ gtk_selection_request (GtkWidget *widget,
|
||||
mult_atoms, 2*info->num_conversions);
|
||||
g_free (mult_atoms);
|
||||
}
|
||||
|
||||
gdk_selection_send_notify (event->requestor, event->selection, event->target,
|
||||
event->property, event->time);
|
||||
|
||||
if (info->num_conversions == 1 &&
|
||||
info->conversions[0].property == GDK_NONE)
|
||||
{
|
||||
/* Reject the entire conversion */
|
||||
gdk_selection_send_notify (event->requestor, event->selection,
|
||||
event->target, GDK_NONE, event->time);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_selection_send_notify (event->requestor, event->selection,
|
||||
event->target, event->property, event->time);
|
||||
}
|
||||
|
||||
if (info->num_incrs == 0)
|
||||
{
|
||||
@@ -1162,7 +1175,7 @@ gtk_selection_notify (GtkWidget *widget,
|
||||
{
|
||||
GList *tmp_list;
|
||||
GtkRetrievalInfo *info = NULL;
|
||||
guchar *buffer;
|
||||
guchar *buffer = NULL;
|
||||
gint length;
|
||||
GdkAtom type;
|
||||
gint format;
|
||||
@@ -1183,8 +1196,12 @@ gtk_selection_notify (GtkWidget *widget,
|
||||
|
||||
if (!tmp_list) /* no retrieval in progress */
|
||||
return FALSE;
|
||||
|
||||
if (event->property == GDK_NONE)
|
||||
|
||||
if (event->property != GDK_NONE)
|
||||
length = gdk_selection_property_get (widget->window, &buffer,
|
||||
&type, &format);
|
||||
|
||||
if (event->property == GDK_NONE || buffer == NULL)
|
||||
{
|
||||
current_retrievals = g_list_remove_link (current_retrievals, tmp_list);
|
||||
g_list_free (tmp_list);
|
||||
@@ -1195,9 +1212,6 @@ gtk_selection_notify (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
length = gdk_selection_property_get (widget->window, &buffer,
|
||||
&type, &format);
|
||||
|
||||
if (type == gtk_selection_atoms[INCR])
|
||||
{
|
||||
/* The remainder of the selection will come through PropertyNotify
|
||||
|
||||
+1
-1
@@ -1768,7 +1768,7 @@ gtk_signal_connect_by_type (GtkObject *object,
|
||||
handler = gtk_signal_handler_new ();
|
||||
handler->id = gtk_handler_id++;
|
||||
handler->signal_id = signal_id;
|
||||
handler->object_signal = object_signal;
|
||||
handler->object_signal = object_signal != FALSE;
|
||||
handler->func = func;
|
||||
handler->func_data = func_data;
|
||||
handler->destroy_func = destroy_func;
|
||||
|
||||
+48
-29
@@ -28,7 +28,6 @@
|
||||
#include "gtkgc.h"
|
||||
#include "gtkrc.h"
|
||||
#include "gtkstyle.h"
|
||||
#include "gtkthemes.h"
|
||||
#include "gtkwidget.h"
|
||||
#include "gtkthemes.h"
|
||||
#include "gdk/gdkprivate.h"
|
||||
@@ -362,9 +361,23 @@ gtk_style_copy (GtkStyle *style)
|
||||
new_style->bg_pixmap[i] = style->bg_pixmap[i];
|
||||
}
|
||||
|
||||
gdk_font_unref (new_style->font);
|
||||
new_style->font = style->font;
|
||||
gdk_font_ref (new_style->font);
|
||||
|
||||
if (style->rc_style)
|
||||
{
|
||||
new_style->rc_style = style->rc_style;
|
||||
gtk_rc_style_ref (style->rc_style);
|
||||
}
|
||||
|
||||
if (style->engine)
|
||||
{
|
||||
new_style->engine = style->engine;
|
||||
gtk_theme_engine_ref(new_style->engine);
|
||||
new_style->engine->duplicate_style (new_style, style);
|
||||
}
|
||||
|
||||
return new_style;
|
||||
}
|
||||
|
||||
@@ -380,18 +393,6 @@ gtk_style_duplicate (GtkStyle *style)
|
||||
style->styles = g_slist_append (style->styles, new_style);
|
||||
new_style->styles = style->styles;
|
||||
|
||||
if (style->rc_style)
|
||||
{
|
||||
new_style->rc_style = style->rc_style;
|
||||
gtk_rc_style_ref (style->rc_style);
|
||||
}
|
||||
|
||||
if (style->engine)
|
||||
{
|
||||
new_style->engine = style->engine;
|
||||
new_style->engine->duplicate_style (new_style, style);
|
||||
}
|
||||
|
||||
return new_style;
|
||||
}
|
||||
|
||||
@@ -561,6 +562,7 @@ GtkStyle*
|
||||
gtk_style_ref (GtkStyle *style)
|
||||
{
|
||||
g_return_val_if_fail (style != NULL, NULL);
|
||||
g_return_val_if_fail (style->ref_count > 0, NULL);
|
||||
|
||||
style->ref_count += 1;
|
||||
return style;
|
||||
@@ -570,6 +572,7 @@ void
|
||||
gtk_style_unref (GtkStyle *style)
|
||||
{
|
||||
g_return_if_fail (style != NULL);
|
||||
g_return_if_fail (style->ref_count > 0);
|
||||
|
||||
style->ref_count -= 1;
|
||||
if (style->ref_count == 0)
|
||||
@@ -3054,7 +3057,9 @@ gtk_default_draw_handle (GtkStyle *style,
|
||||
gint xx, yy;
|
||||
gint xthick, ythick;
|
||||
GdkGC *light_gc, *dark_gc;
|
||||
GdkRectangle rect;
|
||||
GdkRectangle dest;
|
||||
gint intersect;
|
||||
|
||||
g_return_if_fail (style != NULL);
|
||||
g_return_if_fail (window != NULL);
|
||||
@@ -3075,26 +3080,40 @@ gtk_default_draw_handle (GtkStyle *style,
|
||||
xthick = style->klass->xthickness;
|
||||
ythick = style->klass->ythickness;
|
||||
|
||||
dest.x = x + xthick;
|
||||
dest.y = y + ythick;
|
||||
dest.width = width - (xthick * 2);
|
||||
dest.height = height - (ythick * 2);
|
||||
|
||||
gdk_gc_set_clip_rectangle (light_gc, &dest);
|
||||
gdk_gc_set_clip_rectangle (dark_gc, &dest);
|
||||
|
||||
rect.x = x + xthick;
|
||||
rect.y = y + ythick;
|
||||
rect.width = width - (xthick * 2);
|
||||
rect.height = height - (ythick * 2);
|
||||
|
||||
if (area)
|
||||
intersect = gdk_rectangle_intersect (area, &rect, &dest);
|
||||
else
|
||||
{
|
||||
intersect = TRUE;
|
||||
dest = rect;
|
||||
}
|
||||
|
||||
if (!intersect)
|
||||
return;
|
||||
|
||||
#define DRAW_POINT(w, gc, clip, xx, yy) \
|
||||
{ \
|
||||
if ((xx) >= (clip).x \
|
||||
&& (yy) >= (clip).y \
|
||||
&& (xx) < (clip).x + (clip).width \
|
||||
&& (yy) < (clip).y + (clip).height) \
|
||||
gdk_draw_point ((w), (gc), (xx), (yy)); \
|
||||
}
|
||||
|
||||
for (yy = y + ythick; yy < (y + height - ythick); yy += 3)
|
||||
for (xx = x + xthick; xx < (x + width - xthick); xx += 6)
|
||||
{
|
||||
gdk_draw_point (window, light_gc, xx, yy);
|
||||
gdk_draw_point (window, dark_gc, xx + 1, yy + 1);
|
||||
|
||||
gdk_draw_point (window, light_gc, xx + 3, yy + 1);
|
||||
gdk_draw_point (window, dark_gc, xx + 4, yy + 2);
|
||||
DRAW_POINT (window, light_gc, dest, xx, yy);
|
||||
DRAW_POINT (window, dark_gc, dest, xx + 1, yy + 1);
|
||||
|
||||
DRAW_POINT (window, light_gc, dest, xx + 3, yy + 1);
|
||||
DRAW_POINT (window, dark_gc, dest, xx + 4, yy + 2);
|
||||
}
|
||||
|
||||
gdk_gc_set_clip_rectangle (light_gc, NULL);
|
||||
gdk_gc_set_clip_rectangle (dark_gc, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -257,6 +257,11 @@ gtk_tips_query_destroy (GtkObject *object)
|
||||
|
||||
gtk_tips_query_set_caller (tips_query, NULL);
|
||||
|
||||
g_free (tips_query->label_inactive);
|
||||
tips_query->label_inactive = NULL;
|
||||
g_free (tips_query->label_no_tip);
|
||||
tips_query->label_no_tip = NULL;
|
||||
|
||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -278,8 +278,8 @@ gtk_vscale_draw (GtkWidget *widget,
|
||||
|
||||
gtk_vscale_pos_trough (GTK_VSCALE (widget), &x, &y, &width, &height);
|
||||
|
||||
tmp_area.x = x;
|
||||
tmp_area.y = y;
|
||||
tmp_area.x = x + widget->allocation.x;
|
||||
tmp_area.y = y + widget->allocation.y;
|
||||
tmp_area.width = width;
|
||||
tmp_area.height = height;
|
||||
|
||||
|
||||
+16
-12
@@ -2499,12 +2499,8 @@ gtk_widget_lock_accelerators (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (gtk_signal_handler_pending_by_func (GTK_OBJECT (widget),
|
||||
widget_signals[ADD_ACCELERATOR],
|
||||
TRUE,
|
||||
GTK_SIGNAL_FUNC (gtk_widget_stop_add_accelerator),
|
||||
NULL) == 0)
|
||||
|
||||
if (!gtk_widget_accelerators_locked (widget))
|
||||
{
|
||||
gtk_signal_connect (GTK_OBJECT (widget),
|
||||
"add_accelerator",
|
||||
@@ -2522,12 +2518,8 @@ gtk_widget_unlock_accelerators (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (gtk_signal_handler_pending_by_func (GTK_OBJECT (widget),
|
||||
widget_signals[ADD_ACCELERATOR],
|
||||
TRUE,
|
||||
GTK_SIGNAL_FUNC (gtk_widget_stop_add_accelerator),
|
||||
NULL) > 0)
|
||||
|
||||
if (gtk_widget_accelerators_locked (widget))
|
||||
{
|
||||
gtk_signal_disconnect_by_func (GTK_OBJECT (widget),
|
||||
GTK_SIGNAL_FUNC (gtk_widget_stop_add_accelerator),
|
||||
@@ -2538,6 +2530,18 @@ gtk_widget_unlock_accelerators (GtkWidget *widget)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_widget_accelerators_locked (GtkWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
|
||||
|
||||
return gtk_signal_handler_pending_by_func (GTK_OBJECT (widget),
|
||||
widget_signals[ADD_ACCELERATOR],
|
||||
TRUE,
|
||||
GTK_SIGNAL_FUNC (gtk_widget_stop_add_accelerator),
|
||||
NULL) > 0;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_add_accelerator (GtkWidget *widget,
|
||||
const gchar *accel_signal,
|
||||
|
||||
@@ -491,6 +491,7 @@ guint gtk_widget_accelerator_signal (GtkWidget *widget,
|
||||
guint accel_mods);
|
||||
void gtk_widget_lock_accelerators (GtkWidget *widget);
|
||||
void gtk_widget_unlock_accelerators (GtkWidget *widget);
|
||||
gboolean gtk_widget_accelerators_locked (GtkWidget *widget);
|
||||
gint gtk_widget_event (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
|
||||
|
||||
@@ -1062,20 +1062,28 @@ gtk_window_key_press_event (GtkWidget *widget,
|
||||
case GDK_Down:
|
||||
case GDK_Left:
|
||||
case GDK_Right:
|
||||
case GDK_KP_Up:
|
||||
case GDK_KP_Down:
|
||||
case GDK_KP_Left:
|
||||
case GDK_KP_Right:
|
||||
case GDK_Tab:
|
||||
case GDK_ISO_Left_Tab:
|
||||
switch (event->keyval)
|
||||
{
|
||||
case GDK_Up:
|
||||
case GDK_KP_Up:
|
||||
direction = GTK_DIR_UP;
|
||||
break;
|
||||
case GDK_Down:
|
||||
case GDK_KP_Down:
|
||||
direction = GTK_DIR_DOWN;
|
||||
break;
|
||||
case GDK_Left:
|
||||
case GDK_KP_Left:
|
||||
direction = GTK_DIR_LEFT;
|
||||
break;
|
||||
case GDK_Right:
|
||||
case GDK_KP_Right:
|
||||
direction = GTK_DIR_RIGHT;
|
||||
break;
|
||||
case GDK_Tab:
|
||||
|
||||
+7
-1
@@ -274,12 +274,14 @@ gboolean have_drag;
|
||||
|
||||
enum {
|
||||
TARGET_STRING,
|
||||
TARGET_ROOTWIN
|
||||
TARGET_ROOTWIN,
|
||||
TARGET_URL
|
||||
};
|
||||
|
||||
static GtkTargetEntry target_table[] = {
|
||||
{ "STRING", 0, TARGET_STRING },
|
||||
{ "text/plain", 0, TARGET_STRING },
|
||||
{ "text/uri-list", 0, TARGET_URL },
|
||||
{ "application/x-rootwin-drop", 0, TARGET_ROOTWIN }
|
||||
};
|
||||
|
||||
@@ -390,6 +392,10 @@ source_drag_data_get (GtkWidget *widget,
|
||||
{
|
||||
if (info == TARGET_ROOTWIN)
|
||||
g_print ("I was dropped on the rootwin\n");
|
||||
else if (info == TARGET_URL)
|
||||
gtk_selection_data_set (selection_data,
|
||||
selection_data->target,
|
||||
8, "file:///home/otaylor/images/weave.png", 37);
|
||||
else
|
||||
gtk_selection_data_set (selection_data,
|
||||
selection_data->target,
|
||||
|
||||
+10
-3
@@ -2418,8 +2418,12 @@ create_item_factory (void)
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
|
||||
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window),
|
||||
"<main>",
|
||||
item_factory,
|
||||
(GtkDestroyNotify) gtk_object_unref);
|
||||
gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
|
||||
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Item Factory");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
@@ -4641,7 +4645,7 @@ void create_ctree (void)
|
||||
GtkWidget *check;
|
||||
GtkAdjustment *adj;
|
||||
GtkWidget *spinner;
|
||||
GdkColor transparent;
|
||||
GdkColor transparent = { 0 };
|
||||
|
||||
char *title[] = { "Tree" , "Info" };
|
||||
char buf[80];
|
||||
@@ -5126,7 +5130,10 @@ void
|
||||
font_selection_ok (GtkWidget *w,
|
||||
GtkFontSelectionDialog *fs)
|
||||
{
|
||||
g_print ("%s\n", gtk_font_selection_dialog_get_font_name (fs));
|
||||
gchar *s = gtk_font_selection_dialog_get_font_name (fs);
|
||||
|
||||
g_print ("%s\n", s);
|
||||
g_free (s);
|
||||
gtk_widget_destroy (GTK_WIDGET (fs));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+ 1.1.12\n"
|
||||
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
|
||||
"POT-Creation-Date: 1999-04-13 16:43-0500\n"
|
||||
"PO-Revision-Date: 1999-01-06 13:55+01:00\n"
|
||||
"Last-Translator: Stanislav Brabec <utx@k332.feld.cvut.cz>\n"
|
||||
"Language-Team: Czech <cs@li.org>\n"
|
||||
@@ -42,19 +42,19 @@ msgid "Opacity:"
|
||||
msgstr "Neprùhlednost:"
|
||||
|
||||
#. The OK button
|
||||
#: gtk/gtkcolorsel.c:1668 gtk/gtkfilesel.c:469 gtk/gtkfontsel.c:3475
|
||||
#: gtk/gtkcolorsel.c:1672 gtk/gtkfilesel.c:469 gtk/gtkfontsel.c:3477
|
||||
#: gtk/gtkgamma.c:416
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#. The Cancel button
|
||||
#: gtk/gtkcolorsel.c:1674 gtk/gtkfilesel.c:476 gtk/gtkfilesel.c:851
|
||||
#: gtk/gtkfilesel.c:951 gtk/gtkfilesel.c:1066 gtk/gtkfontsel.c:3488
|
||||
#: gtk/gtkcolorsel.c:1678 gtk/gtkfilesel.c:476 gtk/gtkfilesel.c:851
|
||||
#: gtk/gtkfilesel.c:951 gtk/gtkfilesel.c:1066 gtk/gtkfontsel.c:3490
|
||||
#: gtk/gtkgamma.c:424
|
||||
msgid "Cancel"
|
||||
msgstr "Zru¹it"
|
||||
|
||||
#: gtk/gtkcolorsel.c:1679
|
||||
#: gtk/gtkcolorsel.c:1683
|
||||
msgid "Help"
|
||||
msgstr "Pomoc"
|
||||
|
||||
@@ -196,7 +196,7 @@ msgstr "Sou
|
||||
msgid "Font"
|
||||
msgstr "Písmo"
|
||||
|
||||
#: gtk/gtkfontsel.c:504 gtk/gtkfontsel.c:2156 gtk/gtkfontsel.c:2386
|
||||
#: gtk/gtkfontsel.c:504 gtk/gtkfontsel.c:2158 gtk/gtkfontsel.c:2388
|
||||
msgid "Font:"
|
||||
msgstr "Písmo:"
|
||||
|
||||
@@ -271,23 +271,23 @@ msgstr "P
|
||||
msgid "regular"
|
||||
msgstr "normální"
|
||||
|
||||
#: gtk/gtkfontsel.c:1220 gtk/gtkfontsel.c:1948
|
||||
#: gtk/gtkfontsel.c:1220 gtk/gtkfontsel.c:1950
|
||||
msgid "italic"
|
||||
msgstr "kurzíva"
|
||||
|
||||
#: gtk/gtkfontsel.c:1221 gtk/gtkfontsel.c:1949
|
||||
#: gtk/gtkfontsel.c:1221 gtk/gtkfontsel.c:1951
|
||||
msgid "oblique"
|
||||
msgstr "tuèný"
|
||||
|
||||
#: gtk/gtkfontsel.c:1222 gtk/gtkfontsel.c:1950
|
||||
#: gtk/gtkfontsel.c:1222 gtk/gtkfontsel.c:1952
|
||||
msgid "reverse italic"
|
||||
msgstr "obrácená kurzíva"
|
||||
|
||||
#: gtk/gtkfontsel.c:1223 gtk/gtkfontsel.c:1951
|
||||
#: gtk/gtkfontsel.c:1223 gtk/gtkfontsel.c:1953
|
||||
msgid "reverse oblique"
|
||||
msgstr "obrácený tuèný"
|
||||
|
||||
#: gtk/gtkfontsel.c:1224 gtk/gtkfontsel.c:1952
|
||||
#: gtk/gtkfontsel.c:1224 gtk/gtkfontsel.c:1954
|
||||
msgid "other"
|
||||
msgstr "jiný"
|
||||
|
||||
@@ -299,51 +299,51 @@ msgstr "[M]"
|
||||
msgid "[C]"
|
||||
msgstr "[C]"
|
||||
|
||||
#: gtk/gtkfontsel.c:1780
|
||||
#: gtk/gtkfontsel.c:1782
|
||||
msgid "The selected font is not available."
|
||||
msgstr "Zvolené písmo není dostupné."
|
||||
|
||||
#: gtk/gtkfontsel.c:1786
|
||||
#: gtk/gtkfontsel.c:1788
|
||||
msgid "The selected font is not a valid font."
|
||||
msgstr "Zvolené písmo není platným písmem."
|
||||
|
||||
#: gtk/gtkfontsel.c:1844
|
||||
#: gtk/gtkfontsel.c:1846
|
||||
msgid "This is a 2-byte font and may not be displayed correctly."
|
||||
msgstr "Toto je 2bytové písmo a nemusí být zobrazeno správnì."
|
||||
|
||||
#: gtk/gtkfontsel.c:1936 gtk/gtkinputdialog.c:607
|
||||
#: gtk/gtkfontsel.c:1938 gtk/gtkinputdialog.c:607
|
||||
msgid "(unknown)"
|
||||
msgstr "(neznámý)"
|
||||
|
||||
#: gtk/gtkfontsel.c:1947
|
||||
#: gtk/gtkfontsel.c:1949
|
||||
msgid "roman"
|
||||
msgstr "normální"
|
||||
|
||||
#: gtk/gtkfontsel.c:1959
|
||||
#: gtk/gtkfontsel.c:1961
|
||||
msgid "proportional"
|
||||
msgstr "proporcionální"
|
||||
|
||||
#: gtk/gtkfontsel.c:1960
|
||||
#: gtk/gtkfontsel.c:1962
|
||||
msgid "monospaced"
|
||||
msgstr "pevná ¹íøka"
|
||||
|
||||
#: gtk/gtkfontsel.c:1961
|
||||
#: gtk/gtkfontsel.c:1963
|
||||
msgid "char cell"
|
||||
msgstr "znaková buòka"
|
||||
|
||||
#: gtk/gtkfontsel.c:2161
|
||||
#: gtk/gtkfontsel.c:2163
|
||||
msgid "Font: (Filter Applied)"
|
||||
msgstr "Písmo: (filtr pou¾it)"
|
||||
|
||||
#: gtk/gtkfontsel.c:2637
|
||||
#: gtk/gtkfontsel.c:2639
|
||||
msgid "MAX_FONTS exceeded. Some fonts may be missing."
|
||||
msgstr "Pøekroèeno MAX_FONTS. Nìkterá písma mohou chybìt."
|
||||
|
||||
#: gtk/gtkfontsel.c:3482
|
||||
#: gtk/gtkfontsel.c:3484
|
||||
msgid "Apply"
|
||||
msgstr "Pou¾ít"
|
||||
|
||||
#: gtk/gtkfontsel.c:3504
|
||||
#: gtk/gtkfontsel.c:3506
|
||||
msgid "Font Selection"
|
||||
msgstr "Volba písma"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user