Compare commits

...

24 Commits

Author SHA1 Message Date
CST 1999 Shawn T. Amundson 2c659472e2 Released GTK+ 1.2.1
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.
1999-03-25 05:55:03 +00:00
Tim Janik 0720955e17 type/macro fixups.
Wed Mar 24 09:24:03 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkdrawingarea.[hc]: type/macro fixups.
1999-03-24 15:01:55 +00:00
Stefan Jeske 0c90498103 Added missing "%" to "prefix" 1999-03-24 09:43:05 +00:00
Kjartan Maraas bab8d95583 1112: add missing . after @xref
1999-03-22  Kjartan Maraas  <kmaraas@online.no>

		* gtk.texi:1112: add missing . after @xref
1999-03-22 20:47:19 +00:00
Tim Janik 3f2cd052fd grrr, stupid cvs, try grasp the meaning of "abort"!
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).
1999-03-22 06:46:16 +00:00
Tim Janik 0362058f6e only redraw children that are visible *and* mapped (i.e. drawable).
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 widget relative, 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, sicne that's already computed parent
        relative).
1999-03-22 06:35:54 +00:00
Lars Hamann b59eefd649 unmap clist if neccessary, unrealize title buttons.
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.
1999-03-21 23:57:07 +00:00
Manish Singh 287624f406 shut up cvs
-Yosh
1999-03-21 02:19:44 +00:00
Manish Singh d4ecce94c8 acinclude.m4 config.guess config.sub ltconfig upgrade to libtool 1.2f
* 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)

-Yosh
1999-03-20 00:48:13 +00:00
Lars Hamann 536673ad38 only connect/disconnect to GtkWidgetClass::event to block mouse events.
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
1999-03-19 12:36:22 +00:00
Tim Janik 8b424288ba plugging problems reported by "Bruce Mitchener, Jr." <bruce@puremagic.com>
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.
1999-03-17 10:32:33 +00:00
Stuart Parmenter f880eba7cd make sure gtk_style_copy copies theme information 1999-03-17 03:32:11 +00:00
Tim Janik ac8d845b3d updates.
* NEWS: updates.
1999-03-17 02:38:38 +00:00
Tim Janik b691a88e07 bumped version number to Gtk+1.2.1, interface 0, binary 1.
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.

        * 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.
1999-03-17 00:03:10 +00:00
Tim Janik af138bc287 ensure the item factory class has been created.
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.
1999-03-16 22:37:32 +00:00
Lars Hamann 29ce61fcf3 added button_passive flag.
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>
1999-03-15 22:37:28 +00:00
George Lebl 69d2eba366 swap the gtk_drag_highlight_expose and gtk_drag_highlight_paint since it
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
1999-03-15 11:40:27 +00:00
Lars Hamann efb837bdb6 fixed a few width/height mixups.
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.
1999-03-10 23:20:10 +00:00
Federico Mena Quintero 5db63aaa6d Significantly reduced the number of calls to gdk_draw_point() (and thus to
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.
1999-03-10 01:14:38 +00:00
Tim Janik 7e8d27f327 unref the item factory after window's destruction.
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.
1999-03-10 01:00:04 +00:00
Tim Janik 8556b64654 first lookup the xfont ID in our font hash table, if we have a
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>.
1999-03-09 00:21:31 +00:00
Tim Janik 12d38df79e before adding a child to a conatiner, make sure it is (default)
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.
1999-03-07 06:09:53 +00:00
Tim Janik 7699e34d83 count object_signal values > 1 as TRUE also.
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.
1999-03-01 18:51:07 +00:00
Tim Janik 14ff63b93d minor fix. 1999-02-27 00:35:08 +00:00
82 changed files with 6460 additions and 4046 deletions
+2
View File
@@ -13,3 +13,5 @@ gtk-config
config.cache
ABOUT-NLS
intl
stamp-h.in
gtk+.spec
+287
View File
@@ -1,3 +1,290 @@
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
+287
View File
@@ -1,3 +1,290 @@
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
+287
View File
@@ -1,3 +1,290 @@
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
+287
View File
@@ -1,3 +1,290 @@
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
+287
View File
@@ -1,3 +1,290 @@
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
+287
View File
@@ -1,3 +1,290 @@
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
+287
View File
@@ -1,3 +1,290 @@
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
+3 -3
View File
@@ -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.1.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.2.1 # 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.1
This, however, will not work if you built GLIB with different
source and build directories.
+10
View File
@@ -1,3 +1,13 @@
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,
+4 -4
View File
@@ -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.1. 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.1
[ Please substitute 1.2.0 with the version of GTK+ that
[ Please substitute 1.2.1 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.1
When I run gtk/testgtk, the button "handle box"
is misnamed. There are multiple handle boxes in
-2
View File
@@ -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
View File
@@ -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.
#
-8
View File
@@ -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."
+104 -59
View File
@@ -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
View File
@@ -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
;;
+5 -4
View File
@@ -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=1
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0
GTK_BINARY_AGE=1
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
dnl
AC_DIVERT_POP()dnl
@@ -214,9 +214,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.1,,
AC_MSG_ERROR([
*** GLIB 1.2.0 or better is required. The latest version of GLIB
*** GLIB 1.2.1 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org/.]),
gmodule gthread)
@@ -511,6 +511,7 @@ AC_SUBST(GTK_LOCALE_FLAGS)
AC_OUTPUT([
gtk+.spec
docs/gtk-config.1
Makefile
gtk-config
po/Makefile.in
+1 -1
View File
@@ -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 -1
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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.
View File
-22
View File
@@ -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
-15
View File
@@ -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
-199
View File
@@ -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;
}
-36
View File
@@ -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);
}
-19
View File
@@ -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_ */
-90
View File
@@ -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);
}
-18
View File
@@ -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_ */
+98 -98
View File
@@ -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)
+23 -13
View File
@@ -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;
}
+3 -3
View File
@@ -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
+98 -98
View File
@@ -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)
+23 -13
View File
@@ -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;
}
+3 -3
View File
@@ -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
+5 -5
View File
@@ -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
+8 -5
View File
@@ -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);
+4 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
+6
View File
@@ -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
View File
@@ -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);
}
+2 -2
View File
@@ -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);
+5 -4
View File
@@ -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;
+6 -4
View File
@@ -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,
+6
View File
@@ -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()
*/
+6 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
+22 -8
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
+17 -19
View File
@@ -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 */
+1
View File
@@ -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);
+1 -1
View File
@@ -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 -28
View File
@@ -362,9 +362,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 +394,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 +563,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 +573,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 +3058,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 +3081,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
+5
View File
@@ -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
View File
@@ -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
View File
@@ -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,
+1
View File
@@ -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);
+10 -3
View File
@@ -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));
}
+1126 -405
View File
File diff suppressed because it is too large Load Diff
+1766 -1066
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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-03-24 23:06-0600\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"
+1 -1
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.9\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-12-18 12:15+0100\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <de@li.org>\n"
+1 -1
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.14\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1999-02-07 17:37+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: \n"
+1 -1
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ VERSION\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-12-18 20:32+0100\n"
"Last-Translator: Vincent Renardias <vincent@debian.org>\n"
"Language-Team: Vincent Renardias <vincent@debian.org>\n"
+1 -1
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.15\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-12-18 12:15+0100\n"
"Last-Translator: Shooby Ban <bansz@szif.hu>\n"
"Language-Team: Hungarian <hu@li.org>\n"
+1 -1
View File
@@ -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-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-12-18 12:15+0100\n"
"Last-Translator: Tristan Tarrant <ttarrant@etnoteam.it>\n"
"Language-Team: German <it@li.org>\n"
+1 -1
View File
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.7\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-12-16 15:18+0900\n"
"Last-Translator: Çòºê ÂÙ¹° <yasuhiro@awa.tohoku.ac.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
+1 -1
View File
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.15\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1999-02-09 06:07+0900\n"
"Last-Translator: Changwoo Ryu <cwryu@adam.kaist.ac.kr>\n"
"Language-Team: Korean <ko@li.org>\n"
+1 -1
View File
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1999-01-31 23:04+0100\n"
"Last-Translator: Paul Siegmann <pauls@euronet.nl>\n"
"Language-Team: LANGUAGE <nl@li.org>\n"
+1 -1
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.16\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-02-25 00:00+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@fib.hl.no>\n"
"Language-Team: Norwegian <no@li.org>\n"
+1 -1
View File
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gtk+ 1.1.9\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1998-12-18 02:21+0100\n"
"Last-Translator: Krzysztof Krzy¿aniak <eloy@venco.com.pl>\n"
"Language-Team: Polish <plug@poznan.linux.org.pl>\n"
+1 -1
View File
@@ -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-03-24 23:06-0600\n"
"PO-Revision-Date: 1999-02-17 01:20+00:00\n"
"Last-Translator: Nuno Ferreira <nmrf@rnl.ist.utl.pt>\n"
"Language-Team: Portuguese <pt@li.org>\n"
+1 -1
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-25 05:04-0600\n"
"POT-Creation-Date: 1999-03-24 23:06-0600\n"
"PO-Revision-Date: 1999-01-21 21:51 EST\n"
"Last-Translator: Sergey Panov <sipan@mit.edu>\n"
"Language-Team: Russian <ru@li.org>\n"
+1 -1
View File
@@ -6,7 +6,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-03-24 23:06-0600\n"
"PO-Revision-Date: 1999-01-12 22:50+0100\n"
"Last-Translator: Tomas Ögren <stric@ing.umu.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
-11
View File
@@ -13,17 +13,6 @@ echo "Checking gtk+-$VERSION.tar.gz..."
tar xfz gtk+-$VERSION.tar.gz
for file in gtk+.spec docs/gtk-config.1
do
echo -n "$file... "
if [ "x`grep $VERSION gtk+-$VERSION/$file | wc -l | awk -F' ' '{print $1}'`" == "x1" ]; then
echo "ok"
else
echo "failed."
exit 1
fi
done
echo -n "README..."
if [ "x`grep $VERSION gtk+-$VERSION/README | wc -l | awk -F' ' '{print $1}'`" == "x4" ]; then
echo "ok"
+10 -3
View File
@@ -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));
}