Compare commits
70 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 876528e16b | |||
| 5f1caa9779 | |||
| 9f18204cc5 | |||
| 798e56c1e9 | |||
| 0c18fe881b | |||
| ce4015d2ec | |||
| 3ac2421694 | |||
| 9846287396 | |||
| 5b9f86b96a | |||
| c1a4a4cd56 | |||
| 516d2b85e5 | |||
| 24739f4261 | |||
| f6e4a6ae2b | |||
| 3d7693a13c | |||
| 4f525073c6 | |||
| 9e4e9889da | |||
| fbbd38ddb1 | |||
| 6e92d31415 | |||
| a075ca97ed | |||
| af177c8c1c | |||
| e0e5f1fd52 | |||
| 1594006ba2 | |||
| 087ea955d9 | |||
| 41e1167283 | |||
| 0988088c47 | |||
| 47a464fcb6 | |||
| 78068978a0 | |||
| 7bdde1e104 | |||
| f951eff62e | |||
| 653190b0df | |||
| 6caac23b8e | |||
| 2c2fdce82f | |||
| 205be12b37 | |||
| 245e344eff | |||
| d9fb9d5963 | |||
| be8d1d14b7 | |||
| 1322998cd6 | |||
| 5d2c80e124 | |||
| 0e7ede9036 | |||
| cd396b22ae | |||
| a2e52bc8cc | |||
| fffd34a24d | |||
| 39043b9dcc | |||
| 5d21cd3b72 | |||
| fccbe77810 | |||
| 79648eb953 | |||
| 458d964173 | |||
| 1cf67fae1b | |||
| 4635094c2f | |||
| 809c1777a4 | |||
| 61fddfc0ef | |||
| d9808b04bb | |||
| 457e5acb0b | |||
| 37976d540d | |||
| 4b38323296 | |||
| 4c9adc8d19 | |||
| 3c032484c1 | |||
| 20016b1511 | |||
| b95a071007 | |||
| fa98ac6287 | |||
| e3f5861fa0 | |||
| c5f53b623c | |||
| e6fbe340fa | |||
| 0f205e9172 | |||
| f48cdf2100 | |||
| b834eee6c6 | |||
| 620c316530 | |||
| db0bc7fb3b | |||
| bcf28d3444 | |||
| e69970bd65 |
@@ -1,3 +1,421 @@
|
||||
2004-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.2 ===
|
||||
|
||||
Thu Jun 3 21:17:29 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_completion_timeout): Calculate the
|
||||
length of the entry contents in characters, not in bytes.
|
||||
|
||||
* gtk/gtkentry.c (paste_received): Don't pop up the completion
|
||||
window on paste, noticed by Anders Carlsson.
|
||||
|
||||
Thu Jun 3 20:51:23 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_class_init): Fix the allowed
|
||||
values and default value for the ::active property. (#143669,
|
||||
Olivier Andrieu)
|
||||
|
||||
2004-06-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkimagemenuitem.c: use gtk_widget_get_child_requisition()
|
||||
instead of accessing item->image->allocation.width/height
|
||||
directly. Makes widgets which only have a requisition set using
|
||||
gtk_widget_set_size_request() work and fixes bug #142789.
|
||||
|
||||
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
|
||||
of sticky right click menus to return.
|
||||
|
||||
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
|
||||
better handle the "click" case. Better fix for #141169.
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_init): Bail out if the
|
||||
model is empty. Fixes #143536.
|
||||
|
||||
2004-06-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't
|
||||
close the dialog on focus out of the size entry. (#143505,
|
||||
David Hawthorne)
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fix #138807.
|
||||
|
||||
* gtk/fnmatch.c (_gtk_fnmatch): Take a no_leading_period argument.
|
||||
(gtk_fnmatch_intern): Likewise; also implement this option.
|
||||
|
||||
* gtk/gtkprivate.h (_gtk_fnmatch): Updated prototype.
|
||||
|
||||
* gtk/gtkfilesel.c (find_completion_dir): Pass TRUE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
(attempt_file_completion): Likewise.
|
||||
|
||||
* gtk/gtkfilefilter.c (gtk_file_filter_filter): Pass FALSE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
|
||||
Wed Jun 2 00:46:32 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkselection.c (_gtk_selection_request): Remove leftover
|
||||
debug code.
|
||||
|
||||
Wed Jun 2 00:17:07 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_range): Don't
|
||||
allow unless selection mode is multiple. (#142634, John Finlay)
|
||||
|
||||
Tue Jun 1 23:14:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
* gtk/gtkentrycompletion.h:
|
||||
* gtk/gtkentrycompletion.c:
|
||||
* gtk/gtkcombobox.h:
|
||||
* gtk/gtkcombobox.c: Rename function parameters from
|
||||
index to index_ to prevent clash with BSD index(). (#143001)
|
||||
|
||||
Tue Jun 1 22:41:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
|
||||
NULL on an accel label. (#139641, Sam Stephenson, patch by
|
||||
Michael Natterer)
|
||||
|
||||
Tue Jun 1 22:19:55 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_subdir_load): Prevent icon
|
||||
lookup finding icons in the wrong prefix. (#143328,
|
||||
Mark McLoughlin)
|
||||
|
||||
Wed Jun 2 00:39:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug #141169.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): Make menus
|
||||
only stay up if you release within 500 milliseconds.
|
||||
(gtk_menu_shell_button_press): Set the activate_time to the event
|
||||
time when a button is pressed.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify, gtk_menu_enter_notify):
|
||||
Interprete button releases as activate when we have seen both an
|
||||
enter an a motion event.
|
||||
|
||||
2004-06-01 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemmodel.c (do_files_removed): Don't insert a
|
||||
dummy node if there is no parent node. Fixes #143362.
|
||||
|
||||
2004-05-31 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Change to the
|
||||
newly-created folder. Fixes #138932.
|
||||
(trap_activate_cb): Only return TRUE if we did handle the event.
|
||||
Fixes #143359; patch by jylefort@brutele.be.
|
||||
|
||||
Mon May 31 02:38:15 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_new_from_pixmap): Fix typo in
|
||||
docs. (#142892, Tommi Komulainen)
|
||||
|
||||
Mon May 31 02:21:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhandlebox.c: Make detached handleboxes work when their
|
||||
parent is minimized, porting the fix from 1.2. (#1923, #57182)
|
||||
|
||||
Mon May 31 02:03:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): Make moving realized,
|
||||
unmapped windows work.
|
||||
|
||||
2004-05-29 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* configure.in: Added "tk" to ALL_LINGUAS.
|
||||
|
||||
Fri May 28 14:57:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||
messages for common problems. (#137974, Owen Taylor)
|
||||
|
||||
Fri May 28 14:14:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one errors. (#143337,
|
||||
Billy Biggs)
|
||||
|
||||
Thu May 27 00:12:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_size_request): Fix a typo.
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Send key
|
||||
modifiers (shift, ctrl etc) in button and motion events from the
|
||||
tablet. (#143240)
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (gdk_device_get_state): Simple
|
||||
implementation for extended input devices using last known
|
||||
device state (#143237)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (propagate): Don't propagate mouse
|
||||
events to windows that want extended input events. (#142943)
|
||||
(gdk_event_translate): Move check for extended input devices to
|
||||
propagate, new parameter to propagate.
|
||||
(gdk_pointer_grab, gdk_display_pointer_ungrab): Enable calls to
|
||||
_gdk_input_(un)grab_pointer. (#142943)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Check for
|
||||
input grab. [Fix missing update of impl in "dijkstra" event
|
||||
propagation loop] Drop the parallel "impl" pointer, just use a
|
||||
cast. Don't propagate beyond windows that want normal input
|
||||
events. (#142943)
|
||||
(gdk_input_grab_pointer, gdk_input_ungrab_pointer): Limited
|
||||
implementation of input grab. (#142943)
|
||||
|
||||
2004-05-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (print_lc): Remove duplicated
|
||||
line. (Spotted by Benoît Carpentier.)
|
||||
|
||||
2004-05-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
Restrict the width of the popup to be no larger than the
|
||||
monitor. (#142678, DmD Ljungmark)
|
||||
|
||||
* gtk/gtkbutton.c: Go back to the initial fix for the
|
||||
focus-overdrawing problem, which was actually correct
|
||||
according to docs/widget_geometry.txt.
|
||||
|
||||
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
|
||||
arrow size from 11 to 15 to compensate for that.
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_request)
|
||||
(gtk_button_size_allocate, _gtk_button_paint): Allocate
|
||||
space for the focus rectangle only if necessary. (#142668,
|
||||
Michael Natterer)
|
||||
|
||||
Sun May 16 23:14:37 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove two useless
|
||||
lines. (#142479, Morten Welinder)
|
||||
|
||||
2004-05-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
|
||||
GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
|
||||
time). It is used by the OLE2_DND code, which is unfinished and
|
||||
presumably horribly broken, but still, let's not make it not
|
||||
compile on purpose. Silence some gcc warnings in the OLE2_DND
|
||||
code.
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords):
|
||||
New function to go from tree window to tree coordinates, kept
|
||||
static for now until we figure out the multiple coordinate
|
||||
system mess in GtkTreeView API-wise.
|
||||
(gtk_tree_view_scroll_to_cell): Transform the coordinates
|
||||
from tree window to tree coordinates, using the new function.
|
||||
Previously, the x coordinate was wrongly transformed. (#142494)
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdktypes.h (GdkModifierType): Add a comment about unused
|
||||
bits.
|
||||
|
||||
* gtk/gtkstock.c (real_add, gtk_stock_lookup): Use an unused
|
||||
modifier bit to mark stock item which need to be freed
|
||||
eventually. (#140654, Michal Pasternak, Scott Tsai)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add missing
|
||||
call to g_object_ref in Wintab code. (#138341)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Fix numerous Wintab problems
|
||||
including unallocated buffers for event->motion.axes and
|
||||
event->button.axes, unsigned wraparound problem in the code for
|
||||
detecting missing press/release events and assigning min instead
|
||||
of max when setting up axes.
|
||||
|
||||
2004-05-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
|
||||
previous change to this function, clarify the docs instead.
|
||||
|
||||
2004-05-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): don't allocate the popup
|
||||
smaller than the combobox. Fixes bug #59660.
|
||||
|
||||
2004-05-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeprivate.h:
|
||||
* gtk/gtktreeview.c: Add a hove selection mode, which
|
||||
when TRUE makes the selection follow the mouse.
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_init):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use hover selection
|
||||
mode. (#127648, Dave Bordoley)
|
||||
|
||||
Mon May 10 23:04:25 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.h: Add prototype for _gtk_widget_grab_notify()
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (get_screen_icon_info):
|
||||
Make static.
|
||||
|
||||
* gdk/gdkdisplay.c (singlehead_...):
|
||||
* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
|
||||
* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
|
||||
* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below):
|
||||
Place the window above the combobox, if there is not enough
|
||||
room below.
|
||||
|
||||
* tests/testentrycompletion.c: Make the second example use the
|
||||
::match-selected signal to make it actually work.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): Make sure the menu pops up
|
||||
as wide as the combobox. (#59660, Havoc Pennington)
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfontsel.c (list_row_activated): Make Return activate the
|
||||
default button. (#118921)
|
||||
|
||||
Mon May 10 15:03:50 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_grab_notify): New internal function
|
||||
that emits the grab notify signal.
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_notify_foreach): Use it here.
|
||||
|
||||
Mon May 10 00:51:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkmenu.c: Make destruction of a torn off menu work
|
||||
like un-tearing off.
|
||||
|
||||
Sun May 9 21:05:38 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
|
||||
Allow to suppress the stock accelerator by using "". (#142196,
|
||||
David A Knight)
|
||||
|
||||
2004-05-08 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (extract_icon) : finally also
|
||||
create the correct mask for 'pseudo mime' icons
|
||||
|
||||
Sun May 9 01:57:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released):
|
||||
In list mode, accept the same mouse/wheel bindings on
|
||||
the cellview as on the button. (#136967)
|
||||
|
||||
Sun May 9 01:29:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkiconfactory.c (add_to_cache): Actually count the
|
||||
cached icons. (#135888, Crispin Flowerday)
|
||||
|
||||
Sun May 9 00:03:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Make sure
|
||||
that we actually return menus for nodes of type menu, not the
|
||||
menuitems they're attached to.
|
||||
|
||||
2004-05-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child
|
||||
draw over the focus rectangle.
|
||||
|
||||
Thu May 6 23:48:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): Also
|
||||
popup the submenu for items in torn off menus. (#122051)
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_state_changed): Remove
|
||||
this no longer needed signal handler. (#141817, Paul Pogonyshev)
|
||||
|
||||
2004-05-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkexpander.c (gtk_expander_size_allocate): in RTL mode,
|
||||
position the title lable next to the arrow just as we do for LTR
|
||||
rendering. Fixes bug #141825.
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* docs/RELEASE-HOWTO: Document the new policy of
|
||||
bumping version numbers after release.
|
||||
|
||||
* configure.in: Bump version number to 2.4.2.
|
||||
|
||||
Wed May 5 22:23:59 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkiconfactory.c (icon_source_clear): Don't
|
||||
call g_free() on a pixbuf. (#141961, Crispin Flowerday)
|
||||
|
||||
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (print_node): Make the output
|
||||
parseable. (#141929, Sven Neumann)
|
||||
|
||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||
multi-monitor offset. (#141842, John Ehresman)
|
||||
|
||||
2004-05-04 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Fixes #139562, based on a patch by Christian Neumair.
|
||||
|
||||
@@ -1,3 +1,421 @@
|
||||
2004-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.2 ===
|
||||
|
||||
Thu Jun 3 21:17:29 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_completion_timeout): Calculate the
|
||||
length of the entry contents in characters, not in bytes.
|
||||
|
||||
* gtk/gtkentry.c (paste_received): Don't pop up the completion
|
||||
window on paste, noticed by Anders Carlsson.
|
||||
|
||||
Thu Jun 3 20:51:23 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_class_init): Fix the allowed
|
||||
values and default value for the ::active property. (#143669,
|
||||
Olivier Andrieu)
|
||||
|
||||
2004-06-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkimagemenuitem.c: use gtk_widget_get_child_requisition()
|
||||
instead of accessing item->image->allocation.width/height
|
||||
directly. Makes widgets which only have a requisition set using
|
||||
gtk_widget_set_size_request() work and fixes bug #142789.
|
||||
|
||||
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
|
||||
of sticky right click menus to return.
|
||||
|
||||
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
|
||||
better handle the "click" case. Better fix for #141169.
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_init): Bail out if the
|
||||
model is empty. Fixes #143536.
|
||||
|
||||
2004-06-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't
|
||||
close the dialog on focus out of the size entry. (#143505,
|
||||
David Hawthorne)
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fix #138807.
|
||||
|
||||
* gtk/fnmatch.c (_gtk_fnmatch): Take a no_leading_period argument.
|
||||
(gtk_fnmatch_intern): Likewise; also implement this option.
|
||||
|
||||
* gtk/gtkprivate.h (_gtk_fnmatch): Updated prototype.
|
||||
|
||||
* gtk/gtkfilesel.c (find_completion_dir): Pass TRUE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
(attempt_file_completion): Likewise.
|
||||
|
||||
* gtk/gtkfilefilter.c (gtk_file_filter_filter): Pass FALSE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
|
||||
Wed Jun 2 00:46:32 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkselection.c (_gtk_selection_request): Remove leftover
|
||||
debug code.
|
||||
|
||||
Wed Jun 2 00:17:07 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_range): Don't
|
||||
allow unless selection mode is multiple. (#142634, John Finlay)
|
||||
|
||||
Tue Jun 1 23:14:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
* gtk/gtkentrycompletion.h:
|
||||
* gtk/gtkentrycompletion.c:
|
||||
* gtk/gtkcombobox.h:
|
||||
* gtk/gtkcombobox.c: Rename function parameters from
|
||||
index to index_ to prevent clash with BSD index(). (#143001)
|
||||
|
||||
Tue Jun 1 22:41:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
|
||||
NULL on an accel label. (#139641, Sam Stephenson, patch by
|
||||
Michael Natterer)
|
||||
|
||||
Tue Jun 1 22:19:55 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_subdir_load): Prevent icon
|
||||
lookup finding icons in the wrong prefix. (#143328,
|
||||
Mark McLoughlin)
|
||||
|
||||
Wed Jun 2 00:39:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug #141169.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): Make menus
|
||||
only stay up if you release within 500 milliseconds.
|
||||
(gtk_menu_shell_button_press): Set the activate_time to the event
|
||||
time when a button is pressed.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify, gtk_menu_enter_notify):
|
||||
Interprete button releases as activate when we have seen both an
|
||||
enter an a motion event.
|
||||
|
||||
2004-06-01 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemmodel.c (do_files_removed): Don't insert a
|
||||
dummy node if there is no parent node. Fixes #143362.
|
||||
|
||||
2004-05-31 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Change to the
|
||||
newly-created folder. Fixes #138932.
|
||||
(trap_activate_cb): Only return TRUE if we did handle the event.
|
||||
Fixes #143359; patch by jylefort@brutele.be.
|
||||
|
||||
Mon May 31 02:38:15 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_new_from_pixmap): Fix typo in
|
||||
docs. (#142892, Tommi Komulainen)
|
||||
|
||||
Mon May 31 02:21:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhandlebox.c: Make detached handleboxes work when their
|
||||
parent is minimized, porting the fix from 1.2. (#1923, #57182)
|
||||
|
||||
Mon May 31 02:03:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): Make moving realized,
|
||||
unmapped windows work.
|
||||
|
||||
2004-05-29 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* configure.in: Added "tk" to ALL_LINGUAS.
|
||||
|
||||
Fri May 28 14:57:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||
messages for common problems. (#137974, Owen Taylor)
|
||||
|
||||
Fri May 28 14:14:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one errors. (#143337,
|
||||
Billy Biggs)
|
||||
|
||||
Thu May 27 00:12:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_size_request): Fix a typo.
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Send key
|
||||
modifiers (shift, ctrl etc) in button and motion events from the
|
||||
tablet. (#143240)
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (gdk_device_get_state): Simple
|
||||
implementation for extended input devices using last known
|
||||
device state (#143237)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (propagate): Don't propagate mouse
|
||||
events to windows that want extended input events. (#142943)
|
||||
(gdk_event_translate): Move check for extended input devices to
|
||||
propagate, new parameter to propagate.
|
||||
(gdk_pointer_grab, gdk_display_pointer_ungrab): Enable calls to
|
||||
_gdk_input_(un)grab_pointer. (#142943)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Check for
|
||||
input grab. [Fix missing update of impl in "dijkstra" event
|
||||
propagation loop] Drop the parallel "impl" pointer, just use a
|
||||
cast. Don't propagate beyond windows that want normal input
|
||||
events. (#142943)
|
||||
(gdk_input_grab_pointer, gdk_input_ungrab_pointer): Limited
|
||||
implementation of input grab. (#142943)
|
||||
|
||||
2004-05-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (print_lc): Remove duplicated
|
||||
line. (Spotted by Benoît Carpentier.)
|
||||
|
||||
2004-05-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
Restrict the width of the popup to be no larger than the
|
||||
monitor. (#142678, DmD Ljungmark)
|
||||
|
||||
* gtk/gtkbutton.c: Go back to the initial fix for the
|
||||
focus-overdrawing problem, which was actually correct
|
||||
according to docs/widget_geometry.txt.
|
||||
|
||||
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
|
||||
arrow size from 11 to 15 to compensate for that.
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_request)
|
||||
(gtk_button_size_allocate, _gtk_button_paint): Allocate
|
||||
space for the focus rectangle only if necessary. (#142668,
|
||||
Michael Natterer)
|
||||
|
||||
Sun May 16 23:14:37 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove two useless
|
||||
lines. (#142479, Morten Welinder)
|
||||
|
||||
2004-05-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
|
||||
GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
|
||||
time). It is used by the OLE2_DND code, which is unfinished and
|
||||
presumably horribly broken, but still, let's not make it not
|
||||
compile on purpose. Silence some gcc warnings in the OLE2_DND
|
||||
code.
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords):
|
||||
New function to go from tree window to tree coordinates, kept
|
||||
static for now until we figure out the multiple coordinate
|
||||
system mess in GtkTreeView API-wise.
|
||||
(gtk_tree_view_scroll_to_cell): Transform the coordinates
|
||||
from tree window to tree coordinates, using the new function.
|
||||
Previously, the x coordinate was wrongly transformed. (#142494)
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdktypes.h (GdkModifierType): Add a comment about unused
|
||||
bits.
|
||||
|
||||
* gtk/gtkstock.c (real_add, gtk_stock_lookup): Use an unused
|
||||
modifier bit to mark stock item which need to be freed
|
||||
eventually. (#140654, Michal Pasternak, Scott Tsai)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add missing
|
||||
call to g_object_ref in Wintab code. (#138341)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Fix numerous Wintab problems
|
||||
including unallocated buffers for event->motion.axes and
|
||||
event->button.axes, unsigned wraparound problem in the code for
|
||||
detecting missing press/release events and assigning min instead
|
||||
of max when setting up axes.
|
||||
|
||||
2004-05-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
|
||||
previous change to this function, clarify the docs instead.
|
||||
|
||||
2004-05-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): don't allocate the popup
|
||||
smaller than the combobox. Fixes bug #59660.
|
||||
|
||||
2004-05-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeprivate.h:
|
||||
* gtk/gtktreeview.c: Add a hove selection mode, which
|
||||
when TRUE makes the selection follow the mouse.
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_init):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use hover selection
|
||||
mode. (#127648, Dave Bordoley)
|
||||
|
||||
Mon May 10 23:04:25 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.h: Add prototype for _gtk_widget_grab_notify()
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (get_screen_icon_info):
|
||||
Make static.
|
||||
|
||||
* gdk/gdkdisplay.c (singlehead_...):
|
||||
* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
|
||||
* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
|
||||
* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below):
|
||||
Place the window above the combobox, if there is not enough
|
||||
room below.
|
||||
|
||||
* tests/testentrycompletion.c: Make the second example use the
|
||||
::match-selected signal to make it actually work.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): Make sure the menu pops up
|
||||
as wide as the combobox. (#59660, Havoc Pennington)
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfontsel.c (list_row_activated): Make Return activate the
|
||||
default button. (#118921)
|
||||
|
||||
Mon May 10 15:03:50 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_grab_notify): New internal function
|
||||
that emits the grab notify signal.
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_notify_foreach): Use it here.
|
||||
|
||||
Mon May 10 00:51:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkmenu.c: Make destruction of a torn off menu work
|
||||
like un-tearing off.
|
||||
|
||||
Sun May 9 21:05:38 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
|
||||
Allow to suppress the stock accelerator by using "". (#142196,
|
||||
David A Knight)
|
||||
|
||||
2004-05-08 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (extract_icon) : finally also
|
||||
create the correct mask for 'pseudo mime' icons
|
||||
|
||||
Sun May 9 01:57:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released):
|
||||
In list mode, accept the same mouse/wheel bindings on
|
||||
the cellview as on the button. (#136967)
|
||||
|
||||
Sun May 9 01:29:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkiconfactory.c (add_to_cache): Actually count the
|
||||
cached icons. (#135888, Crispin Flowerday)
|
||||
|
||||
Sun May 9 00:03:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Make sure
|
||||
that we actually return menus for nodes of type menu, not the
|
||||
menuitems they're attached to.
|
||||
|
||||
2004-05-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child
|
||||
draw over the focus rectangle.
|
||||
|
||||
Thu May 6 23:48:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): Also
|
||||
popup the submenu for items in torn off menus. (#122051)
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_state_changed): Remove
|
||||
this no longer needed signal handler. (#141817, Paul Pogonyshev)
|
||||
|
||||
2004-05-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkexpander.c (gtk_expander_size_allocate): in RTL mode,
|
||||
position the title lable next to the arrow just as we do for LTR
|
||||
rendering. Fixes bug #141825.
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* docs/RELEASE-HOWTO: Document the new policy of
|
||||
bumping version numbers after release.
|
||||
|
||||
* configure.in: Bump version number to 2.4.2.
|
||||
|
||||
Wed May 5 22:23:59 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkiconfactory.c (icon_source_clear): Don't
|
||||
call g_free() on a pixbuf. (#141961, Crispin Flowerday)
|
||||
|
||||
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (print_node): Make the output
|
||||
parseable. (#141929, Sven Neumann)
|
||||
|
||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||
multi-monitor offset. (#141842, John Ehresman)
|
||||
|
||||
2004-05-04 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Fixes #139562, based on a patch by Christian Neumair.
|
||||
|
||||
@@ -1,3 +1,421 @@
|
||||
2004-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.2 ===
|
||||
|
||||
Thu Jun 3 21:17:29 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_completion_timeout): Calculate the
|
||||
length of the entry contents in characters, not in bytes.
|
||||
|
||||
* gtk/gtkentry.c (paste_received): Don't pop up the completion
|
||||
window on paste, noticed by Anders Carlsson.
|
||||
|
||||
Thu Jun 3 20:51:23 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_class_init): Fix the allowed
|
||||
values and default value for the ::active property. (#143669,
|
||||
Olivier Andrieu)
|
||||
|
||||
2004-06-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkimagemenuitem.c: use gtk_widget_get_child_requisition()
|
||||
instead of accessing item->image->allocation.width/height
|
||||
directly. Makes widgets which only have a requisition set using
|
||||
gtk_widget_set_size_request() work and fixes bug #142789.
|
||||
|
||||
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
|
||||
of sticky right click menus to return.
|
||||
|
||||
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
|
||||
better handle the "click" case. Better fix for #141169.
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_init): Bail out if the
|
||||
model is empty. Fixes #143536.
|
||||
|
||||
2004-06-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't
|
||||
close the dialog on focus out of the size entry. (#143505,
|
||||
David Hawthorne)
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fix #138807.
|
||||
|
||||
* gtk/fnmatch.c (_gtk_fnmatch): Take a no_leading_period argument.
|
||||
(gtk_fnmatch_intern): Likewise; also implement this option.
|
||||
|
||||
* gtk/gtkprivate.h (_gtk_fnmatch): Updated prototype.
|
||||
|
||||
* gtk/gtkfilesel.c (find_completion_dir): Pass TRUE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
(attempt_file_completion): Likewise.
|
||||
|
||||
* gtk/gtkfilefilter.c (gtk_file_filter_filter): Pass FALSE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
|
||||
Wed Jun 2 00:46:32 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkselection.c (_gtk_selection_request): Remove leftover
|
||||
debug code.
|
||||
|
||||
Wed Jun 2 00:17:07 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_range): Don't
|
||||
allow unless selection mode is multiple. (#142634, John Finlay)
|
||||
|
||||
Tue Jun 1 23:14:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
* gtk/gtkentrycompletion.h:
|
||||
* gtk/gtkentrycompletion.c:
|
||||
* gtk/gtkcombobox.h:
|
||||
* gtk/gtkcombobox.c: Rename function parameters from
|
||||
index to index_ to prevent clash with BSD index(). (#143001)
|
||||
|
||||
Tue Jun 1 22:41:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
|
||||
NULL on an accel label. (#139641, Sam Stephenson, patch by
|
||||
Michael Natterer)
|
||||
|
||||
Tue Jun 1 22:19:55 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_subdir_load): Prevent icon
|
||||
lookup finding icons in the wrong prefix. (#143328,
|
||||
Mark McLoughlin)
|
||||
|
||||
Wed Jun 2 00:39:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug #141169.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): Make menus
|
||||
only stay up if you release within 500 milliseconds.
|
||||
(gtk_menu_shell_button_press): Set the activate_time to the event
|
||||
time when a button is pressed.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify, gtk_menu_enter_notify):
|
||||
Interprete button releases as activate when we have seen both an
|
||||
enter an a motion event.
|
||||
|
||||
2004-06-01 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemmodel.c (do_files_removed): Don't insert a
|
||||
dummy node if there is no parent node. Fixes #143362.
|
||||
|
||||
2004-05-31 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Change to the
|
||||
newly-created folder. Fixes #138932.
|
||||
(trap_activate_cb): Only return TRUE if we did handle the event.
|
||||
Fixes #143359; patch by jylefort@brutele.be.
|
||||
|
||||
Mon May 31 02:38:15 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_new_from_pixmap): Fix typo in
|
||||
docs. (#142892, Tommi Komulainen)
|
||||
|
||||
Mon May 31 02:21:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhandlebox.c: Make detached handleboxes work when their
|
||||
parent is minimized, porting the fix from 1.2. (#1923, #57182)
|
||||
|
||||
Mon May 31 02:03:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): Make moving realized,
|
||||
unmapped windows work.
|
||||
|
||||
2004-05-29 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* configure.in: Added "tk" to ALL_LINGUAS.
|
||||
|
||||
Fri May 28 14:57:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||
messages for common problems. (#137974, Owen Taylor)
|
||||
|
||||
Fri May 28 14:14:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one errors. (#143337,
|
||||
Billy Biggs)
|
||||
|
||||
Thu May 27 00:12:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_size_request): Fix a typo.
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Send key
|
||||
modifiers (shift, ctrl etc) in button and motion events from the
|
||||
tablet. (#143240)
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (gdk_device_get_state): Simple
|
||||
implementation for extended input devices using last known
|
||||
device state (#143237)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (propagate): Don't propagate mouse
|
||||
events to windows that want extended input events. (#142943)
|
||||
(gdk_event_translate): Move check for extended input devices to
|
||||
propagate, new parameter to propagate.
|
||||
(gdk_pointer_grab, gdk_display_pointer_ungrab): Enable calls to
|
||||
_gdk_input_(un)grab_pointer. (#142943)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Check for
|
||||
input grab. [Fix missing update of impl in "dijkstra" event
|
||||
propagation loop] Drop the parallel "impl" pointer, just use a
|
||||
cast. Don't propagate beyond windows that want normal input
|
||||
events. (#142943)
|
||||
(gdk_input_grab_pointer, gdk_input_ungrab_pointer): Limited
|
||||
implementation of input grab. (#142943)
|
||||
|
||||
2004-05-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (print_lc): Remove duplicated
|
||||
line. (Spotted by Benoît Carpentier.)
|
||||
|
||||
2004-05-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
Restrict the width of the popup to be no larger than the
|
||||
monitor. (#142678, DmD Ljungmark)
|
||||
|
||||
* gtk/gtkbutton.c: Go back to the initial fix for the
|
||||
focus-overdrawing problem, which was actually correct
|
||||
according to docs/widget_geometry.txt.
|
||||
|
||||
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
|
||||
arrow size from 11 to 15 to compensate for that.
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_request)
|
||||
(gtk_button_size_allocate, _gtk_button_paint): Allocate
|
||||
space for the focus rectangle only if necessary. (#142668,
|
||||
Michael Natterer)
|
||||
|
||||
Sun May 16 23:14:37 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove two useless
|
||||
lines. (#142479, Morten Welinder)
|
||||
|
||||
2004-05-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
|
||||
GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
|
||||
time). It is used by the OLE2_DND code, which is unfinished and
|
||||
presumably horribly broken, but still, let's not make it not
|
||||
compile on purpose. Silence some gcc warnings in the OLE2_DND
|
||||
code.
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords):
|
||||
New function to go from tree window to tree coordinates, kept
|
||||
static for now until we figure out the multiple coordinate
|
||||
system mess in GtkTreeView API-wise.
|
||||
(gtk_tree_view_scroll_to_cell): Transform the coordinates
|
||||
from tree window to tree coordinates, using the new function.
|
||||
Previously, the x coordinate was wrongly transformed. (#142494)
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdktypes.h (GdkModifierType): Add a comment about unused
|
||||
bits.
|
||||
|
||||
* gtk/gtkstock.c (real_add, gtk_stock_lookup): Use an unused
|
||||
modifier bit to mark stock item which need to be freed
|
||||
eventually. (#140654, Michal Pasternak, Scott Tsai)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add missing
|
||||
call to g_object_ref in Wintab code. (#138341)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Fix numerous Wintab problems
|
||||
including unallocated buffers for event->motion.axes and
|
||||
event->button.axes, unsigned wraparound problem in the code for
|
||||
detecting missing press/release events and assigning min instead
|
||||
of max when setting up axes.
|
||||
|
||||
2004-05-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
|
||||
previous change to this function, clarify the docs instead.
|
||||
|
||||
2004-05-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): don't allocate the popup
|
||||
smaller than the combobox. Fixes bug #59660.
|
||||
|
||||
2004-05-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeprivate.h:
|
||||
* gtk/gtktreeview.c: Add a hove selection mode, which
|
||||
when TRUE makes the selection follow the mouse.
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_init):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use hover selection
|
||||
mode. (#127648, Dave Bordoley)
|
||||
|
||||
Mon May 10 23:04:25 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.h: Add prototype for _gtk_widget_grab_notify()
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (get_screen_icon_info):
|
||||
Make static.
|
||||
|
||||
* gdk/gdkdisplay.c (singlehead_...):
|
||||
* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
|
||||
* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
|
||||
* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below):
|
||||
Place the window above the combobox, if there is not enough
|
||||
room below.
|
||||
|
||||
* tests/testentrycompletion.c: Make the second example use the
|
||||
::match-selected signal to make it actually work.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): Make sure the menu pops up
|
||||
as wide as the combobox. (#59660, Havoc Pennington)
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfontsel.c (list_row_activated): Make Return activate the
|
||||
default button. (#118921)
|
||||
|
||||
Mon May 10 15:03:50 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_grab_notify): New internal function
|
||||
that emits the grab notify signal.
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_notify_foreach): Use it here.
|
||||
|
||||
Mon May 10 00:51:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkmenu.c: Make destruction of a torn off menu work
|
||||
like un-tearing off.
|
||||
|
||||
Sun May 9 21:05:38 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
|
||||
Allow to suppress the stock accelerator by using "". (#142196,
|
||||
David A Knight)
|
||||
|
||||
2004-05-08 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (extract_icon) : finally also
|
||||
create the correct mask for 'pseudo mime' icons
|
||||
|
||||
Sun May 9 01:57:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released):
|
||||
In list mode, accept the same mouse/wheel bindings on
|
||||
the cellview as on the button. (#136967)
|
||||
|
||||
Sun May 9 01:29:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkiconfactory.c (add_to_cache): Actually count the
|
||||
cached icons. (#135888, Crispin Flowerday)
|
||||
|
||||
Sun May 9 00:03:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Make sure
|
||||
that we actually return menus for nodes of type menu, not the
|
||||
menuitems they're attached to.
|
||||
|
||||
2004-05-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child
|
||||
draw over the focus rectangle.
|
||||
|
||||
Thu May 6 23:48:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): Also
|
||||
popup the submenu for items in torn off menus. (#122051)
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_state_changed): Remove
|
||||
this no longer needed signal handler. (#141817, Paul Pogonyshev)
|
||||
|
||||
2004-05-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkexpander.c (gtk_expander_size_allocate): in RTL mode,
|
||||
position the title lable next to the arrow just as we do for LTR
|
||||
rendering. Fixes bug #141825.
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* docs/RELEASE-HOWTO: Document the new policy of
|
||||
bumping version numbers after release.
|
||||
|
||||
* configure.in: Bump version number to 2.4.2.
|
||||
|
||||
Wed May 5 22:23:59 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkiconfactory.c (icon_source_clear): Don't
|
||||
call g_free() on a pixbuf. (#141961, Crispin Flowerday)
|
||||
|
||||
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (print_node): Make the output
|
||||
parseable. (#141929, Sven Neumann)
|
||||
|
||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||
multi-monitor offset. (#141842, John Ehresman)
|
||||
|
||||
2004-05-04 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Fixes #139562, based on a patch by Christian Neumair.
|
||||
|
||||
@@ -1,3 +1,421 @@
|
||||
2004-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.2 ===
|
||||
|
||||
Thu Jun 3 21:17:29 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_completion_timeout): Calculate the
|
||||
length of the entry contents in characters, not in bytes.
|
||||
|
||||
* gtk/gtkentry.c (paste_received): Don't pop up the completion
|
||||
window on paste, noticed by Anders Carlsson.
|
||||
|
||||
Thu Jun 3 20:51:23 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_class_init): Fix the allowed
|
||||
values and default value for the ::active property. (#143669,
|
||||
Olivier Andrieu)
|
||||
|
||||
2004-06-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkimagemenuitem.c: use gtk_widget_get_child_requisition()
|
||||
instead of accessing item->image->allocation.width/height
|
||||
directly. Makes widgets which only have a requisition set using
|
||||
gtk_widget_set_size_request() work and fixes bug #142789.
|
||||
|
||||
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
|
||||
of sticky right click menus to return.
|
||||
|
||||
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
|
||||
better handle the "click" case. Better fix for #141169.
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_init): Bail out if the
|
||||
model is empty. Fixes #143536.
|
||||
|
||||
2004-06-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't
|
||||
close the dialog on focus out of the size entry. (#143505,
|
||||
David Hawthorne)
|
||||
|
||||
2004-06-02 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fix #138807.
|
||||
|
||||
* gtk/fnmatch.c (_gtk_fnmatch): Take a no_leading_period argument.
|
||||
(gtk_fnmatch_intern): Likewise; also implement this option.
|
||||
|
||||
* gtk/gtkprivate.h (_gtk_fnmatch): Updated prototype.
|
||||
|
||||
* gtk/gtkfilesel.c (find_completion_dir): Pass TRUE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
(attempt_file_completion): Likewise.
|
||||
|
||||
* gtk/gtkfilefilter.c (gtk_file_filter_filter): Pass FALSE for the
|
||||
no_leading_period argument of _gtk_fnmatch().
|
||||
|
||||
Wed Jun 2 00:46:32 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkselection.c (_gtk_selection_request): Remove leftover
|
||||
debug code.
|
||||
|
||||
Wed Jun 2 00:17:07 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_range): Don't
|
||||
allow unless selection mode is multiple. (#142634, John Finlay)
|
||||
|
||||
Tue Jun 1 23:14:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
* gtk/gtkentrycompletion.h:
|
||||
* gtk/gtkentrycompletion.c:
|
||||
* gtk/gtkcombobox.h:
|
||||
* gtk/gtkcombobox.c: Rename function parameters from
|
||||
index to index_ to prevent clash with BSD index(). (#143001)
|
||||
|
||||
Tue Jun 1 22:41:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
|
||||
NULL on an accel label. (#139641, Sam Stephenson, patch by
|
||||
Michael Natterer)
|
||||
|
||||
Tue Jun 1 22:19:55 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_subdir_load): Prevent icon
|
||||
lookup finding icons in the wrong prefix. (#143328,
|
||||
Mark McLoughlin)
|
||||
|
||||
Wed Jun 2 00:39:58 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug #141169.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): Make menus
|
||||
only stay up if you release within 500 milliseconds.
|
||||
(gtk_menu_shell_button_press): Set the activate_time to the event
|
||||
time when a button is pressed.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify, gtk_menu_enter_notify):
|
||||
Interprete button releases as activate when we have seen both an
|
||||
enter an a motion event.
|
||||
|
||||
2004-06-01 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemmodel.c (do_files_removed): Don't insert a
|
||||
dummy node if there is no parent node. Fixes #143362.
|
||||
|
||||
2004-05-31 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Change to the
|
||||
newly-created folder. Fixes #138932.
|
||||
(trap_activate_cb): Only return TRUE if we did handle the event.
|
||||
Fixes #143359; patch by jylefort@brutele.be.
|
||||
|
||||
Mon May 31 02:38:15 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_new_from_pixmap): Fix typo in
|
||||
docs. (#142892, Tommi Komulainen)
|
||||
|
||||
Mon May 31 02:21:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhandlebox.c: Make detached handleboxes work when their
|
||||
parent is minimized, porting the fix from 1.2. (#1923, #57182)
|
||||
|
||||
Mon May 31 02:03:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): Make moving realized,
|
||||
unmapped windows work.
|
||||
|
||||
2004-05-29 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* configure.in: Added "tk" to ALL_LINGUAS.
|
||||
|
||||
Fri May 28 14:57:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||
messages for common problems. (#137974, Owen Taylor)
|
||||
|
||||
Fri May 28 14:14:48 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one errors. (#143337,
|
||||
Billy Biggs)
|
||||
|
||||
Thu May 27 00:12:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_size_request): Fix a typo.
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Send key
|
||||
modifiers (shift, ctrl etc) in button and motion events from the
|
||||
tablet. (#143240)
|
||||
|
||||
2004-05-26 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (gdk_device_get_state): Simple
|
||||
implementation for extended input devices using last known
|
||||
device state (#143237)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (propagate): Don't propagate mouse
|
||||
events to windows that want extended input events. (#142943)
|
||||
(gdk_event_translate): Move check for extended input devices to
|
||||
propagate, new parameter to propagate.
|
||||
(gdk_pointer_grab, gdk_display_pointer_ungrab): Enable calls to
|
||||
_gdk_input_(un)grab_pointer. (#142943)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Check for
|
||||
input grab. [Fix missing update of impl in "dijkstra" event
|
||||
propagation loop] Drop the parallel "impl" pointer, just use a
|
||||
cast. Don't propagate beyond windows that want normal input
|
||||
events. (#142943)
|
||||
(gdk_input_grab_pointer, gdk_input_ungrab_pointer): Limited
|
||||
implementation of input grab. (#142943)
|
||||
|
||||
2004-05-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (print_lc): Remove duplicated
|
||||
line. (Spotted by Benoît Carpentier.)
|
||||
|
||||
2004-05-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
Restrict the width of the popup to be no larger than the
|
||||
monitor. (#142678, DmD Ljungmark)
|
||||
|
||||
* gtk/gtkbutton.c: Go back to the initial fix for the
|
||||
focus-overdrawing problem, which was actually correct
|
||||
according to docs/widget_geometry.txt.
|
||||
|
||||
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
|
||||
arrow size from 11 to 15 to compensate for that.
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_request)
|
||||
(gtk_button_size_allocate, _gtk_button_paint): Allocate
|
||||
space for the focus rectangle only if necessary. (#142668,
|
||||
Michael Natterer)
|
||||
|
||||
Sun May 16 23:14:37 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove two useless
|
||||
lines. (#142479, Morten Welinder)
|
||||
|
||||
2004-05-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
|
||||
GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
|
||||
time). It is used by the OLE2_DND code, which is unfinished and
|
||||
presumably horribly broken, but still, let's not make it not
|
||||
compile on purpose. Silence some gcc warnings in the OLE2_DND
|
||||
code.
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords):
|
||||
New function to go from tree window to tree coordinates, kept
|
||||
static for now until we figure out the multiple coordinate
|
||||
system mess in GtkTreeView API-wise.
|
||||
(gtk_tree_view_scroll_to_cell): Transform the coordinates
|
||||
from tree window to tree coordinates, using the new function.
|
||||
Previously, the x coordinate was wrongly transformed. (#142494)
|
||||
|
||||
2004-05-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdktypes.h (GdkModifierType): Add a comment about unused
|
||||
bits.
|
||||
|
||||
* gtk/gtkstock.c (real_add, gtk_stock_lookup): Use an unused
|
||||
modifier bit to mark stock item which need to be freed
|
||||
eventually. (#140654, Michal Pasternak, Scott Tsai)
|
||||
|
||||
2004-05-11 Robert Ögren <gtk@roboros.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add missing
|
||||
call to g_object_ref in Wintab code. (#138341)
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Fix numerous Wintab problems
|
||||
including unallocated buffers for event->motion.axes and
|
||||
event->button.axes, unsigned wraparound problem in the code for
|
||||
detecting missing press/release events and assigning min instead
|
||||
of max when setting up axes.
|
||||
|
||||
2004-05-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
|
||||
previous change to this function, clarify the docs instead.
|
||||
|
||||
2004-05-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): don't allocate the popup
|
||||
smaller than the combobox. Fixes bug #59660.
|
||||
|
||||
2004-05-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeprivate.h:
|
||||
* gtk/gtktreeview.c: Add a hove selection mode, which
|
||||
when TRUE makes the selection follow the mouse.
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_init):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use hover selection
|
||||
mode. (#127648, Dave Bordoley)
|
||||
|
||||
Mon May 10 23:04:25 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.h: Add prototype for _gtk_widget_grab_notify()
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (get_screen_icon_info):
|
||||
Make static.
|
||||
|
||||
* gdk/gdkdisplay.c (singlehead_...):
|
||||
* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
|
||||
* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
|
||||
* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below):
|
||||
Place the window above the combobox, if there is not enough
|
||||
room below.
|
||||
|
||||
* tests/testentrycompletion.c: Make the second example use the
|
||||
::match-selected signal to make it actually work.
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_popup)
|
||||
(gtk_combo_box_menu_button_press): Make sure the menu pops up
|
||||
as wide as the combobox. (#59660, Havoc Pennington)
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfontsel.c (list_row_activated): Make Return activate the
|
||||
default button. (#118921)
|
||||
|
||||
Mon May 10 15:03:50 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_grab_notify): New internal function
|
||||
that emits the grab notify signal.
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_notify_foreach): Use it here.
|
||||
|
||||
Mon May 10 00:51:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkmenu.c: Make destruction of a torn off menu work
|
||||
like un-tearing off.
|
||||
|
||||
Sun May 9 21:05:38 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
|
||||
Allow to suppress the stock accelerator by using "". (#142196,
|
||||
David A Knight)
|
||||
|
||||
2004-05-08 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (extract_icon) : finally also
|
||||
create the correct mask for 'pseudo mime' icons
|
||||
|
||||
Sun May 9 01:57:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released):
|
||||
In list mode, accept the same mouse/wheel bindings on
|
||||
the cellview as on the button. (#136967)
|
||||
|
||||
Sun May 9 01:29:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkiconfactory.c (add_to_cache): Actually count the
|
||||
cached icons. (#135888, Crispin Flowerday)
|
||||
|
||||
Sun May 9 00:03:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Merge from HEAD:
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Make sure
|
||||
that we actually return menus for nodes of type menu, not the
|
||||
menuitems they're attached to.
|
||||
|
||||
2004-05-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child
|
||||
draw over the focus rectangle.
|
||||
|
||||
Thu May 6 23:48:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): Also
|
||||
popup the submenu for items in torn off menus. (#122051)
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_state_changed): Remove
|
||||
this no longer needed signal handler. (#141817, Paul Pogonyshev)
|
||||
|
||||
2004-05-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkexpander.c (gtk_expander_size_allocate): in RTL mode,
|
||||
position the title lable next to the arrow just as we do for LTR
|
||||
rendering. Fixes bug #141825.
|
||||
|
||||
2004-05-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* docs/RELEASE-HOWTO: Document the new policy of
|
||||
bumping version numbers after release.
|
||||
|
||||
* configure.in: Bump version number to 2.4.2.
|
||||
|
||||
Wed May 5 22:23:59 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkiconfactory.c (icon_source_clear): Don't
|
||||
call g_free() on a pixbuf. (#141961, Crispin Flowerday)
|
||||
|
||||
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (print_node): Make the output
|
||||
parseable. (#141929, Sven Neumann)
|
||||
|
||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||
multi-monitor offset. (#141842, John Ehresman)
|
||||
|
||||
2004-05-04 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Fixes #139562, based on a patch by Christian Neumair.
|
||||
|
||||
@@ -18,8 +18,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.4.1.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.4.1 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.4.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.4.2 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
Overview of Changes from GTK+ 2.4.1 to GTK+ 2.4.2
|
||||
=================================================
|
||||
* GtkUIManager
|
||||
- Install signals correctly [Michael Natterer]
|
||||
- Make the output of gtk_ui_manager_get_ui() parsable. [Michael]
|
||||
- Add a way to suppress stock accelerators. [David A Knight]
|
||||
* GtkClipboard
|
||||
- Fix INCRemental transfer of MULTIPLE targets [Matthias Clasen]
|
||||
- Increase the chunk size for INCRemental transfers [Matthias]
|
||||
* GtkFileChooser
|
||||
- Hide the combo box when appropriate [Christian Neumair]
|
||||
- bug fixes [Federico Mena Quintero]
|
||||
* GtkComboBox
|
||||
- add mouse/wheel bindings on the cellview [Matthias]
|
||||
- improve positioning of popup [Matthias]
|
||||
- make the selection follow the mouse [Matthias]
|
||||
* GtkEntryCompletion
|
||||
- make the selection follow the mouse [Matthias]
|
||||
- restrict popup size to monitor size [Matthias, DmD Ljungmark]
|
||||
- don't complete on paste [Anders Carlsson]
|
||||
* Win32
|
||||
- bug fixes [Benoît Carpentier, Hans Breuer, John Ehresman,
|
||||
Tor Lillqvist, Robert Ögren]
|
||||
* GtkButton/GtkArrow
|
||||
- Don't draw the focus over the button child [Matthias]
|
||||
- Increase default arrow size to compensate [Matthias]
|
||||
* Documentation improvements [Doug Quale, Matthias,
|
||||
Steffen Röcker, Steve Chaplin, Tommi Komulainen]
|
||||
* Other bug fixes [Billy Biggs, Crispin Flowerday,
|
||||
David Hawthorne, Federico, Havoc Pennington, John Finlay,
|
||||
Kouichirou Hiratsuka, Mark McLoughlin, Matthias, Michael,
|
||||
Michal Pasternak, Morten Welinder, Olivier Andrieu,
|
||||
Owen Taylor, Padraig O'Briain, Sam Stevenson, Scott Tsai,
|
||||
Soeren Sandmann, Sven Neumann]
|
||||
* Updated translations (bg,it,nl,tk,wa,zh_CN)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.0 to GTK+ 2.4.1
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.4.1. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.4.2. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
+3
-3
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [4])
|
||||
m4_define([gtk_micro_version], [1])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
m4_define([gtk_interface_age], [1])
|
||||
m4_define([gtk_interface_age], [2])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
@@ -401,7 +401,7 @@ fi
|
||||
# sure that both po/ and po-properties/ have .po files that correspond
|
||||
# to your language. If you only add one to po/, the build will break
|
||||
# in po-properties/.
|
||||
ALL_LINGUAS="af am ar az be bg bn br ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tr uk uz uz@Latn vi wa yi zh_CN zh_TW"
|
||||
ALL_LINGUAS="af am ar az be bg bn br ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk uz uz@Latn vi wa yi zh_CN zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
|
||||
@@ -1,392 +0,0 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <demos.h>
|
||||
|
||||
static GtkTextBuffer *info_buffer;
|
||||
static GtkTextBuffer *source_buffer;
|
||||
|
||||
static gchar *current_file = NULL;
|
||||
|
||||
enum {
|
||||
TITLE_COLUMN,
|
||||
FILENAME_COLUMN,
|
||||
FUNC_COLUMN,
|
||||
ITALIC_COLUMN,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
gboolean
|
||||
read_line (FILE *stream, GString *str)
|
||||
{
|
||||
int n_read = 0;
|
||||
|
||||
flockfile (stream);
|
||||
|
||||
g_string_truncate (str, 0);
|
||||
|
||||
while (1)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = getc_unlocked (stream);
|
||||
|
||||
if (c == EOF)
|
||||
goto done;
|
||||
else
|
||||
n_read++;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\r':
|
||||
case '\n':
|
||||
{
|
||||
int next_c = getc_unlocked (stream);
|
||||
|
||||
if (!(next_c == EOF ||
|
||||
(c == '\r' && next_c == '\n') ||
|
||||
(c == '\n' && next_c == '\r')))
|
||||
ungetc (next_c, stream);
|
||||
|
||||
goto done;
|
||||
}
|
||||
default:
|
||||
g_string_append_c (str, c);
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
funlockfile (stream);
|
||||
|
||||
return n_read > 0;
|
||||
}
|
||||
|
||||
void
|
||||
load_file (const gchar *filename)
|
||||
{
|
||||
FILE *file;
|
||||
GtkTextIter start, end;
|
||||
GString *buffer = g_string_new (NULL);
|
||||
int state = 0;
|
||||
gboolean in_para = 0;
|
||||
|
||||
if (current_file && !strcmp (current_file, filename))
|
||||
return;
|
||||
|
||||
g_free (current_file);
|
||||
current_file = g_strdup (filename);
|
||||
|
||||
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
|
||||
gtk_text_buffer_delete (info_buffer, &start, &end);
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||
gtk_text_buffer_delete (source_buffer, &start, &end);
|
||||
|
||||
file = fopen (filename, "r");
|
||||
if (!file)
|
||||
{
|
||||
g_warning ("Cannot open %s: %s\n", filename, g_strerror (errno));
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
|
||||
while (read_line (file, buffer))
|
||||
{
|
||||
gchar *p = buffer->str;
|
||||
gchar *q;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
/* Reading title */
|
||||
while (*p == '/' || *p == '*' || isspace (*p))
|
||||
p++;
|
||||
q = p + strlen (p);
|
||||
while (q > p && isspace (*(q - 1)))
|
||||
q--;
|
||||
|
||||
if (q > p)
|
||||
{
|
||||
int len_chars = g_utf8_pointer_to_offset (p, q);
|
||||
|
||||
end = start;
|
||||
|
||||
g_assert (strlen (p) >= q - p);
|
||||
gtk_text_buffer_insert (info_buffer, &end, p, q - p);
|
||||
start = end;
|
||||
|
||||
gtk_text_iter_backward_chars (&start, len_chars);
|
||||
gtk_text_buffer_apply_tag_by_name (info_buffer, "title", &start, &end);
|
||||
|
||||
start = end;
|
||||
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
/* Reading body of info section */
|
||||
while (isspace (*p))
|
||||
p++;
|
||||
if (*p == '*' && *(p + 1) == '/')
|
||||
{
|
||||
gtk_text_buffer_get_iter_at_offset (source_buffer, &start, 0);
|
||||
state++;
|
||||
}
|
||||
else
|
||||
{
|
||||
int len;
|
||||
|
||||
while (*p == '*' || isspace (*p))
|
||||
p++;
|
||||
|
||||
len = strlen (p);
|
||||
while (isspace (*(p + len - 1)))
|
||||
len--;
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
if (in_para)
|
||||
gtk_text_buffer_insert (info_buffer, &start, " ", 1);
|
||||
|
||||
g_assert (strlen (p) >= len);
|
||||
gtk_text_buffer_insert (info_buffer, &start, p, len);
|
||||
in_para = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
|
||||
in_para = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* Skipping blank lines */
|
||||
while (isspace (*p))
|
||||
p++;
|
||||
if (*p)
|
||||
{
|
||||
p = buffer->str;
|
||||
state++;
|
||||
/* Fall through */
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
case 3:
|
||||
/* Reading program body */
|
||||
gtk_text_buffer_insert (source_buffer, &start, p, -1);
|
||||
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
|
||||
}
|
||||
|
||||
gboolean
|
||||
button_press_event_cb (GtkTreeView *tree_view,
|
||||
GdkEventButton *event,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
if (event->type == GDK_2BUTTON_PRESS)
|
||||
{
|
||||
GtkTreePath *path = NULL;
|
||||
|
||||
gtk_tree_view_get_path_at_pos (tree_view,
|
||||
event->window,
|
||||
event->x,
|
||||
event->y,
|
||||
&path,
|
||||
NULL);
|
||||
|
||||
if (path)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gboolean italic;
|
||||
GVoidFunc func;
|
||||
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
gtk_tree_store_get (GTK_TREE_STORE (model),
|
||||
&iter,
|
||||
FUNC_COLUMN, &func,
|
||||
ITALIC_COLUMN, &italic,
|
||||
-1);
|
||||
(func) ();
|
||||
gtk_tree_store_set (GTK_TREE_STORE (model),
|
||||
&iter,
|
||||
ITALIC_COLUMN, !italic,
|
||||
-1);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (tree_view),
|
||||
"button_press_event");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
selection_cb (GtkTreeSelection *selection,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GValue value = {0, };
|
||||
|
||||
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
return;
|
||||
|
||||
gtk_tree_model_get_value (model, &iter,
|
||||
FILENAME_COLUMN,
|
||||
&value);
|
||||
load_file (g_value_get_string (&value));
|
||||
g_value_unset (&value);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_text (GtkTextBuffer **buffer,
|
||||
gboolean is_source)
|
||||
{
|
||||
GtkWidget *scrolled_window;
|
||||
GtkWidget *text_view;
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
text_view = gtk_text_view_new ();
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
|
||||
|
||||
*buffer = gtk_text_buffer_new (NULL);
|
||||
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
|
||||
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
|
||||
|
||||
if (is_source)
|
||||
{
|
||||
font_desc = pango_font_description_from_string ("Courier 10");
|
||||
gtk_widget_modify_font (text_view, font_desc);
|
||||
pango_font_description_free (font_desc);
|
||||
}
|
||||
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), !is_source);
|
||||
|
||||
return scrolled_window;
|
||||
}
|
||||
|
||||
/* Technically a list, but if we do go to 80 demos, we may want to move to a tree */
|
||||
static GtkWidget *
|
||||
create_tree (void)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkCellRenderer *cell;
|
||||
GtkWidget *tree_view;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeStore *model;
|
||||
GtkTreeIter iter;
|
||||
gint i;
|
||||
|
||||
model = gtk_tree_store_new_with_types (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
|
||||
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
|
||||
gtk_tree_selection_set_type (GTK_TREE_SELECTION (selection),
|
||||
GTK_TREE_SELECTION_SINGLE);
|
||||
gtk_widget_set_usize (tree_view, 200, -1);
|
||||
|
||||
for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++)
|
||||
{
|
||||
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
|
||||
|
||||
gtk_tree_store_set (GTK_TREE_STORE (model),
|
||||
&iter,
|
||||
TITLE_COLUMN, testgtk_demos[i].title,
|
||||
FILENAME_COLUMN, testgtk_demos[i].filename,
|
||||
FUNC_COLUMN, testgtk_demos[i].func,
|
||||
ITALIC_COLUMN, FALSE,
|
||||
-1);
|
||||
}
|
||||
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes ("Widget",
|
||||
cell,
|
||||
"text", TITLE_COLUMN,
|
||||
"italic", ITALIC_COLUMN,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
|
||||
GTK_TREE_VIEW_COLUMN (column));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", selection_cb, model);
|
||||
gtk_signal_connect (GTK_OBJECT (tree_view), "button_press_event", GTK_SIGNAL_FUNC (button_press_event_cb), model);
|
||||
|
||||
return tree_view;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *tree;
|
||||
GtkTextTag *tag;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
tree = create_tree ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
create_text (&info_buffer, FALSE),
|
||||
gtk_label_new ("Info"));
|
||||
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
create_text (&source_buffer, TRUE),
|
||||
gtk_label_new ("Source"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title");
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "source");
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Courier 10",
|
||||
"pixels_above_lines", 0,
|
||||
"pixels_below_lines", 0,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
|
||||
load_file (testgtk_demos[0].filename);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
+4
-2
@@ -16,8 +16,9 @@ Without those packages make distcheck will *not* pass.
|
||||
0) Blow away your gtk+ directory, check a new version out
|
||||
1) autogen and build it, make sure to enable docs.
|
||||
2) Update NEWS based on the various ChangeLog files
|
||||
3) Update version in configure.in, increase micro and interface age by 1.
|
||||
(Note that this is critical, a slip-up here will cause the soname to change).
|
||||
3) Verify that the version in configure.in has been bumped after the last
|
||||
release. (Note that this is critical, a slip-up here will cause the soname
|
||||
to change).
|
||||
4) Add === Released 2.x.y === at the top of all ChangeLog files
|
||||
5) make distcheck
|
||||
6) Fix broken stuff found by 5) repeat
|
||||
@@ -34,3 +35,4 @@ create a new message in the same form, replacing version numbers, commentary
|
||||
at the top about "what this release is about" and the Summary of changes.
|
||||
12) Send it to gnome-announce-list, gtk-list, gtk-app-devel-list and
|
||||
gtk-devel-list. Set reply-to to gnome-hackers.
|
||||
13) Bump the version number in configure.in.
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2004-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.2 ===
|
||||
|
||||
Mon May 31 00:18:29 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/tmpl/gtktable.sgml: Document the default attach
|
||||
options for gtk_table_attach_defaults(). (#143391,
|
||||
Steve Chaplin)
|
||||
|
||||
Fri May 28 14:35:53 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/tmpl/gtkcontainer.sgml: Fix docs for
|
||||
gtk_container_border_width(). (#143309, Doug Quale)
|
||||
|
||||
Fri May 7 01:36:30 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-csource.xml: Add an "Environment"
|
||||
section. (Jens Elkner)
|
||||
|
||||
Fri May 7 01:23:03 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/tmpl/gtkicontheme.sgml: Fix example. (Steffen Röcker)
|
||||
|
||||
2004-05-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkuimanager.sgml: Fixes to the DTD.
|
||||
|
||||
@@ -118,6 +118,8 @@ a widget used to choose from a list of items.
|
||||
</para>
|
||||
|
||||
@combo_box:
|
||||
@index_:
|
||||
<!-- # Unused Parameters # -->
|
||||
@index:
|
||||
|
||||
|
||||
|
||||
@@ -168,10 +168,10 @@ changes, use gtk_widget_child_notify().
|
||||
|
||||
<!-- ##### MACRO gtk_container_border_width ##### -->
|
||||
<para>
|
||||
Does the same as gtk_container_get_border_width().
|
||||
Does the same as gtk_container_set_border_width().
|
||||
</para>
|
||||
|
||||
@Deprecated: Use gtk_container_get_border_width() instead.
|
||||
@Deprecated: Use gtk_container_set_border_width() instead.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_container_add ##### -->
|
||||
|
||||
@@ -170,8 +170,10 @@ A function which decides whether the row indicated by @iter matches a given
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@index:
|
||||
@index_:
|
||||
@text:
|
||||
<!-- # Unused Parameters # -->
|
||||
@index:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_insert_action_markup ##### -->
|
||||
@@ -180,8 +182,10 @@ A function which decides whether the row indicated by @iter matches a given
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@index:
|
||||
@index_:
|
||||
@markup:
|
||||
<!-- # Unused Parameters # -->
|
||||
@index:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_delete_action ##### -->
|
||||
@@ -190,6 +194,8 @@ A function which decides whether the row indicated by @iter matches a given
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@index_:
|
||||
<!-- # Unused Parameters # -->
|
||||
@index:
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ icon_theme = gtk_icon_theme_get_default ();
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme,
|
||||
"my-icon-name", /* icon name */
|
||||
48, /* size */
|
||||
0, /* flags */);
|
||||
0, /* flags */
|
||||
&error);
|
||||
if (!pixbuf)
|
||||
{
|
||||
g_warning ("Couldn't load icon: %s", error->message);
|
||||
|
||||
@@ -210,7 +210,7 @@ and row numbers of the table. (Columns and rows are indexed from zero).
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_attach_defaults ##### -->
|
||||
<para>
|
||||
As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options.
|
||||
As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. The values used for the #GtkAttachOptions are <literal>GTK_EXPAND | GTK_FILL</literal>, and the padding is set to 0.
|
||||
</para>
|
||||
|
||||
@table: The table to add a new child widget to.
|
||||
|
||||
@@ -244,6 +244,8 @@ to a #GtkToolbar.
|
||||
|
||||
@toolbar:
|
||||
@tool_item:
|
||||
@index_:
|
||||
<!-- # Unused Parameters # -->
|
||||
@index:
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
2004-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.2 ===
|
||||
|
||||
Sun May 16 22:55:49 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* io-pnm.c (pnm_read_next_value): Don't read integers
|
||||
partially. (#142584, Kouichirou Hiratsuka)
|
||||
|
||||
2004-05-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* pixops/timescale.c:
|
||||
* pixops/pixops.c:
|
||||
* pixops/pixops.h:
|
||||
* gdk-pixbuf-scale.c: _-prefix the nonstatic pixops_...
|
||||
functions. (#142233, Morten Welinder)
|
||||
|
||||
2004-04-30 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.4.1 ===
|
||||
|
||||
@@ -72,13 +72,13 @@ gdk_pixbuf_scale (const GdkPixbuf *src,
|
||||
offset_x = floor (offset_x + 0.5);
|
||||
offset_y = floor (offset_y + 0.5);
|
||||
|
||||
pixops_scale (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels,
|
||||
dest_x - offset_x, dest_y - offset_y,
|
||||
dest_x + dest_width - offset_x, dest_y + dest_height - offset_y,
|
||||
dest->rowstride, dest->n_channels, dest->has_alpha,
|
||||
src->pixels, src->width, src->height,
|
||||
src->rowstride, src->n_channels, src->has_alpha,
|
||||
scale_x, scale_y, (PixopsInterpType)interp_type);
|
||||
_pixops_scale (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels,
|
||||
dest_x - offset_x, dest_y - offset_y,
|
||||
dest_x + dest_width - offset_x, dest_y + dest_height - offset_y,
|
||||
dest->rowstride, dest->n_channels, dest->has_alpha,
|
||||
src->pixels, src->width, src->height,
|
||||
src->rowstride, src->n_channels, src->has_alpha,
|
||||
scale_x, scale_y, (PixopsInterpType)interp_type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,13 +123,13 @@ gdk_pixbuf_composite (const GdkPixbuf *src,
|
||||
|
||||
offset_x = floor (offset_x + 0.5);
|
||||
offset_y = floor (offset_y + 0.5);
|
||||
pixops_composite (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels,
|
||||
dest_x - offset_x, dest_y - offset_y,
|
||||
dest_x + dest_width - offset_x, dest_y + dest_height - offset_y,
|
||||
dest->rowstride, dest->n_channels, dest->has_alpha,
|
||||
src->pixels, src->width, src->height,
|
||||
src->rowstride, src->n_channels, src->has_alpha,
|
||||
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha);
|
||||
_pixops_composite (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels,
|
||||
dest_x - offset_x, dest_y - offset_y,
|
||||
dest_x + dest_width - offset_x, dest_y + dest_height - offset_y,
|
||||
dest->rowstride, dest->n_channels, dest->has_alpha,
|
||||
src->pixels, src->width, src->height,
|
||||
src->rowstride, src->n_channels, src->has_alpha,
|
||||
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,14 +191,14 @@ gdk_pixbuf_composite_color (const GdkPixbuf *src,
|
||||
offset_x = floor (offset_x + 0.5);
|
||||
offset_y = floor (offset_y + 0.5);
|
||||
|
||||
pixops_composite_color (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels,
|
||||
dest_x - offset_x, dest_y - offset_y,
|
||||
dest_x + dest_width - offset_x, dest_y + dest_height - offset_y,
|
||||
dest->rowstride, dest->n_channels, dest->has_alpha,
|
||||
src->pixels, src->width, src->height,
|
||||
src->rowstride, src->n_channels, src->has_alpha,
|
||||
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha, check_x, check_y,
|
||||
check_size, color1, color2);
|
||||
_pixops_composite_color (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels,
|
||||
dest_x - offset_x, dest_y - offset_y,
|
||||
dest_x + dest_width - offset_x, dest_y + dest_height - offset_y,
|
||||
dest->rowstride, dest->n_channels, dest->has_alpha,
|
||||
src->pixels, src->width, src->height,
|
||||
src->rowstride, src->n_channels, src->has_alpha,
|
||||
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha, check_x, check_y,
|
||||
check_size, color1, color2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -237,7 +237,7 @@ pnm_read_next_value (PnmIOBuffer *inbuf, guint *value, GError **error)
|
||||
*word = '\0';
|
||||
|
||||
/* hmmm, there must be more data to this 'word' */
|
||||
if (!g_ascii_isspace (*p) && (*p != '#') && (p - inptr < 128))
|
||||
if (p == inend || (!g_ascii_isspace (*p) && (*p != '#') && (p - inptr < 128)))
|
||||
return PNM_SUSPEND;
|
||||
|
||||
/* get the value */
|
||||
|
||||
+67
-67
@@ -1357,29 +1357,29 @@ make_weights (PixopsFilter *filter,
|
||||
}
|
||||
|
||||
void
|
||||
pixops_composite_color (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
gboolean dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
gboolean src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha,
|
||||
int check_x,
|
||||
int check_y,
|
||||
int check_size,
|
||||
guint32 color1,
|
||||
guint32 color2)
|
||||
_pixops_composite_color (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
gboolean dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
gboolean src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha,
|
||||
int check_x,
|
||||
int check_y,
|
||||
int check_size,
|
||||
guint32 color1,
|
||||
guint32 color2)
|
||||
{
|
||||
PixopsFilter filter;
|
||||
PixopsLineFunc line_func;
|
||||
@@ -1396,10 +1396,10 @@ pixops_composite_color (guchar *dest_buf,
|
||||
|
||||
if (!src_has_alpha && overall_alpha == 255)
|
||||
{
|
||||
pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
|
||||
dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels,
|
||||
src_has_alpha, scale_x, scale_y, interp_type);
|
||||
_pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
|
||||
dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels,
|
||||
src_has_alpha, scale_x, scale_y, interp_type);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1435,7 +1435,7 @@ pixops_composite_color (guchar *dest_buf,
|
||||
}
|
||||
|
||||
/**
|
||||
* pixops_composite:
|
||||
* _pixops_composite:
|
||||
* @dest_buf: pointer to location to store result
|
||||
* @render_x0: x0 of region of scaled source to store into @dest_buf
|
||||
* @render_y0: y0 of region of scaled source to store into @dest_buf
|
||||
@@ -1459,24 +1459,24 @@ pixops_composite_color (guchar *dest_buf,
|
||||
* of the result into the destination buffer.
|
||||
**/
|
||||
void
|
||||
pixops_composite (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
gboolean dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
gboolean src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha)
|
||||
_pixops_composite (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
gboolean dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
gboolean src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha)
|
||||
{
|
||||
PixopsFilter filter;
|
||||
PixopsLineFunc line_func;
|
||||
@@ -1493,10 +1493,10 @@ pixops_composite (guchar *dest_buf,
|
||||
|
||||
if (!src_has_alpha && overall_alpha == 255)
|
||||
{
|
||||
pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
|
||||
dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels,
|
||||
src_has_alpha, scale_x, scale_y, interp_type);
|
||||
_pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
|
||||
dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels,
|
||||
src_has_alpha, scale_x, scale_y, interp_type);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1536,23 +1536,23 @@ pixops_composite (guchar *dest_buf,
|
||||
}
|
||||
|
||||
void
|
||||
pixops_scale (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
gboolean dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
gboolean src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type)
|
||||
_pixops_scale (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
gboolean dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
gboolean src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type)
|
||||
{
|
||||
PixopsFilter filter;
|
||||
PixopsLineFunc line_func;
|
||||
|
||||
+42
-42
@@ -18,24 +18,24 @@ typedef enum {
|
||||
* render_x, render_y, render_width, render_height in the new
|
||||
* coordinate system into dest_buf starting at 0, 0
|
||||
*/
|
||||
void pixops_composite (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
int dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
int src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha);
|
||||
void _pixops_composite (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
int dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
int src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha);
|
||||
|
||||
/* Scale src_buf from src_width / src_height by factors scale_x, scale_y
|
||||
* and composite the portion corresponding to
|
||||
@@ -43,36 +43,36 @@ void pixops_composite (guchar *dest_buf,
|
||||
* coordinate system against a checkboard with checks of size check_size
|
||||
* of the colors color1 and color2 into dest_buf starting at 0, 0
|
||||
*/
|
||||
void pixops_composite_color (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
int dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
int src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha,
|
||||
int check_x,
|
||||
int check_y,
|
||||
int check_size,
|
||||
guint32 color1,
|
||||
guint32 color2);
|
||||
void _pixops_composite_color (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
int render_y1,
|
||||
int dest_rowstride,
|
||||
int dest_channels,
|
||||
int dest_has_alpha,
|
||||
const guchar *src_buf,
|
||||
int src_width,
|
||||
int src_height,
|
||||
int src_rowstride,
|
||||
int src_channels,
|
||||
int src_has_alpha,
|
||||
double scale_x,
|
||||
double scale_y,
|
||||
PixopsInterpType interp_type,
|
||||
int overall_alpha,
|
||||
int check_x,
|
||||
int check_y,
|
||||
int check_size,
|
||||
guint32 color1,
|
||||
guint32 color2);
|
||||
|
||||
/* Scale src_buf from src_width / src_height by factors scale_x, scale_y
|
||||
* and composite the portion corresponding to
|
||||
* render_x, render_y, render_width, render_height in the new
|
||||
* coordinate system into dest_buf starting at 0, 0
|
||||
*/
|
||||
void pixops_scale (guchar *dest_buf,
|
||||
void _pixops_scale (guchar *dest_buf,
|
||||
int render_x0,
|
||||
int render_y0,
|
||||
int render_x1,
|
||||
|
||||
@@ -182,10 +182,10 @@ int main (int argc, char **argv)
|
||||
start_timing ();
|
||||
for (i = 0; i < ITERS; i++)
|
||||
{
|
||||
pixops_scale (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
|
||||
(double)dest_width / src_width, (double)dest_height / src_height,
|
||||
filter_level);
|
||||
_pixops_scale (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
|
||||
(double)dest_width / src_width, (double)dest_height / src_height,
|
||||
filter_level);
|
||||
}
|
||||
scale_times[src_index][dest_index][filter_level] =
|
||||
stop_timing (" scale\t\t", ITERS, dest_height * dest_width);
|
||||
@@ -194,10 +194,10 @@ int main (int argc, char **argv)
|
||||
start_timing ();
|
||||
for (i = 0; i < ITERS; i++)
|
||||
{
|
||||
pixops_composite (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
|
||||
(double)dest_width / src_width, (double)dest_height / src_height,
|
||||
filter_level, 255);
|
||||
_pixops_composite (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
|
||||
(double)dest_width / src_width, (double)dest_height / src_height,
|
||||
filter_level, 255);
|
||||
}
|
||||
composite_times[src_index][dest_index][filter_level] =
|
||||
stop_timing (" composite\t\t", ITERS, dest_height * dest_width);
|
||||
@@ -205,10 +205,10 @@ int main (int argc, char **argv)
|
||||
start_timing ();
|
||||
for (i = 0; i < ITERS; i++)
|
||||
{
|
||||
pixops_composite_color (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
|
||||
(double)dest_width / src_width, (double)dest_height / src_height,
|
||||
filter_level, 255, 0, 0, 16, 0xaaaaaa, 0x555555);
|
||||
_pixops_composite_color (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha,
|
||||
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
|
||||
(double)dest_width / src_width, (double)dest_height / src_height,
|
||||
filter_level, 255, 0, 0, 16, 0xaaaaaa, 0x555555);
|
||||
}
|
||||
composite_color_times[src_index][dest_index][filter_level] =
|
||||
stop_timing (" composite color\t", ITERS, dest_height * dest_width);
|
||||
|
||||
+21
-21
@@ -40,27 +40,27 @@ static void gdk_display_dispose (GObject *object);
|
||||
static void gdk_display_finalize (GObject *object);
|
||||
|
||||
|
||||
void singlehead_get_pointer (GdkDisplay *display,
|
||||
static void singlehead_get_pointer (GdkDisplay *display,
|
||||
GdkScreen **screen,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
GdkWindow* singlehead_window_get_pointer (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
GdkWindow* singlehead_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
static GdkWindow* singlehead_window_get_pointer (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
static GdkWindow* singlehead_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
|
||||
GdkWindow* singlehead_default_window_get_pointer (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
GdkWindow* singlehead_default_window_at_pointer (GdkScreen *screen,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
static GdkWindow* singlehead_default_window_get_pointer (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
static GdkWindow* singlehead_default_window_at_pointer (GdkScreen *screen,
|
||||
gint *win_x,
|
||||
gint *win_y);
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
@@ -558,7 +558,7 @@ gdk_display_set_pointer_hooks (GdkDisplay *display,
|
||||
return (GdkDisplayPointerHooks *)result;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
singlehead_get_pointer (GdkDisplay *display,
|
||||
GdkScreen **screen,
|
||||
gint *x,
|
||||
@@ -573,7 +573,7 @@ singlehead_get_pointer (GdkDisplay *display,
|
||||
singlehead_current_pointer_hooks->get_pointer (root_window, x, y, mask);
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
static GdkWindow*
|
||||
singlehead_window_get_pointer (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
gint *x,
|
||||
@@ -583,7 +583,7 @@ singlehead_window_get_pointer (GdkDisplay *display,
|
||||
return singlehead_current_pointer_hooks->get_pointer (window, x, y, mask);
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
static GdkWindow*
|
||||
singlehead_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y)
|
||||
@@ -594,7 +594,7 @@ singlehead_window_at_pointer (GdkDisplay *display,
|
||||
win_x, win_y);
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
static GdkWindow*
|
||||
singlehead_default_window_get_pointer (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
@@ -604,7 +604,7 @@ singlehead_default_window_get_pointer (GdkWindow *window,
|
||||
window, x, y, mask);
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
static GdkWindow*
|
||||
singlehead_default_window_at_pointer (GdkScreen *screen,
|
||||
gint *win_x,
|
||||
gint *win_y)
|
||||
|
||||
+3
-1
@@ -130,7 +130,9 @@ typedef enum
|
||||
GDK_BUTTON3_MASK = 1 << 10,
|
||||
GDK_BUTTON4_MASK = 1 << 11,
|
||||
GDK_BUTTON5_MASK = 1 << 12,
|
||||
/* The next few modifiers are used by XKB, so we skip to the end
|
||||
/* The next few modifiers are used by XKB, so we skip to the end.
|
||||
* Bits 16 - 28 are currently unused, but will eventually
|
||||
* be used for "virtual modifiers". Bit 29 is used internally.
|
||||
*/
|
||||
GDK_RELEASE_MASK = 1 << 30,
|
||||
GDK_MODIFIER_MASK = GDK_RELEASE_MASK | 0x1fff
|
||||
|
||||
@@ -65,7 +65,7 @@ typedef enum {
|
||||
#ifdef OLE2_DND
|
||||
|
||||
#define PRINT_GUID(guid) \
|
||||
g_print ("guid = %.08x-%.04x-%.04x-%.02x%.02x-%.02x%.02x%.02x%.02x%.02x%.02x", \
|
||||
g_print ("guid = %.08lx-%.04x-%.04x-%.02x%.02x-%.02x%.02x%.02x%.02x%.02x%.02x", \
|
||||
((gulong *) guid)[0], \
|
||||
((gushort *) guid)[2], \
|
||||
((gushort *) guid)[3], \
|
||||
@@ -88,6 +88,9 @@ static int nformats;
|
||||
* this is used on both source and destination sides.
|
||||
*/
|
||||
struct _GdkDragContextPrivateWin32 {
|
||||
#ifdef OLE2_DND
|
||||
gint ref_count;
|
||||
#endif
|
||||
guint16 last_x; /* Coordinates from last event */
|
||||
guint16 last_y;
|
||||
HWND dest_xid;
|
||||
@@ -139,6 +142,9 @@ gdk_drag_context_init (GdkDragContext *dragcontext)
|
||||
GdkDragContextPrivateWin32 *private = g_new0 (GdkDragContextPrivateWin32, 1);
|
||||
|
||||
dragcontext->windowing_data = private;
|
||||
#ifdef OLE2_DND
|
||||
private->ref_count = 1;
|
||||
#endif
|
||||
|
||||
contexts = g_list_prepend (contexts, dragcontext);
|
||||
}
|
||||
@@ -668,7 +674,7 @@ ienumformatetc_next (LPENUMFORMATETC This,
|
||||
enum_formats *en = (enum_formats *) This;
|
||||
int i, n;
|
||||
|
||||
GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %d\n", This, en->ix, celt));
|
||||
GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %ld\n", This, en->ix, celt));
|
||||
|
||||
n = 0;
|
||||
for (i = 0; i < celt; i++)
|
||||
@@ -694,7 +700,7 @@ ienumformatetc_skip (LPENUMFORMATETC This,
|
||||
{
|
||||
enum_formats *en = (enum_formats *) This;
|
||||
|
||||
GDK_NOTE (DND, g_print ("ienumformatetc_skip %p %d %d\n", This, en->ix, celt));
|
||||
GDK_NOTE (DND, g_print ("ienumformatetc_skip %p %d %ld\n", This, en->ix, celt));
|
||||
en->ix += celt;
|
||||
|
||||
return S_OK;
|
||||
@@ -1244,7 +1250,6 @@ gdk_drag_begin (GdkWindow *window,
|
||||
HRESULT hResult;
|
||||
DWORD dwEffect;
|
||||
HGLOBAL global;
|
||||
FORMATETC format;
|
||||
STGMEDIUM medium;
|
||||
|
||||
g_return_val_if_fail (window != NULL, NULL);
|
||||
@@ -1285,7 +1290,7 @@ gdk_drag_begin (GdkWindow *window,
|
||||
(hResult == DRAGDROP_S_DROP ? "DRAGDROP_S_DROP" :
|
||||
(hResult == DRAGDROP_S_CANCEL ? "DRAGDROP_S_CANCEL" :
|
||||
(hResult == E_UNEXPECTED ? "E_UNEXPECTED" :
|
||||
g_strdup_printf ("%#.8x", hResult))))));
|
||||
g_strdup_printf ("%#.8lx", hResult))))));
|
||||
|
||||
dobj->ido.lpVtbl->Release (&dobj->ido);
|
||||
ctx->ids.lpVtbl->Release (&ctx->ids);
|
||||
@@ -1362,8 +1367,8 @@ gdk_drag_find_window_for_screen (GdkDragContext *context,
|
||||
{
|
||||
find_window_enum_arg a;
|
||||
|
||||
a.x = x_root;
|
||||
a.y = y_root;
|
||||
a.x = x_root - _gdk_offset_x;
|
||||
a.y = y_root - _gdk_offset_y;
|
||||
a.ignore = drag_window ? GDK_WINDOW_HWND (drag_window) : NULL;
|
||||
a.result = NULL;
|
||||
|
||||
|
||||
+48
-41
@@ -533,13 +533,13 @@ gdk_pointer_grab (GdkWindow *window,
|
||||
hcursor = NULL;
|
||||
else if ((hcursor = CopyCursor (cursor_private->hcursor)) == NULL)
|
||||
WIN32_API_FAILED ("CopyCursor");
|
||||
#if 0
|
||||
|
||||
return_val = _gdk_input_grab_pointer (window,
|
||||
owner_events,
|
||||
event_mask,
|
||||
confine_to,
|
||||
time);
|
||||
#endif
|
||||
|
||||
if (return_val == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -615,9 +615,8 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
|
||||
GDK_NOTE (EVENTS, g_print ("%sgdk_display_pointer_ungrab%s",
|
||||
(debug_indent > 0 ? "\n" : ""),
|
||||
(debug_indent == 0 ? "\n" : "")));
|
||||
#if 0
|
||||
|
||||
_gdk_input_ungrab_pointer (time);
|
||||
#endif
|
||||
|
||||
if (GetCapture () != NULL)
|
||||
ReleaseCapture ();
|
||||
@@ -1557,6 +1556,9 @@ translate_mouse_coords (GdkWindow *window1,
|
||||
msg->lParam = MAKELPARAM (pt.x, pt.y);
|
||||
}
|
||||
|
||||
/* The check_extended flag controls whether to check if the windows want
|
||||
* events from extended input devices and if the message should be skipped
|
||||
* because an extended input device is active */
|
||||
static gboolean
|
||||
propagate (GdkWindow **window,
|
||||
MSG *msg,
|
||||
@@ -1564,13 +1566,24 @@ propagate (GdkWindow **window,
|
||||
gboolean grab_owner_events,
|
||||
gint grab_mask,
|
||||
gboolean (*doesnt_want_it) (gint mask,
|
||||
MSG *msg))
|
||||
MSG *msg),
|
||||
gboolean check_extended)
|
||||
{
|
||||
gboolean in_propagation = FALSE;
|
||||
|
||||
if (grab_window != NULL && !grab_owner_events)
|
||||
{
|
||||
/* Event source is grabbed with owner_events FALSE */
|
||||
|
||||
/* See if the event should be ignored because an extended input device
|
||||
* is used */
|
||||
if (check_extended &&
|
||||
((GdkWindowObject *) grab_window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored for grabber)"));
|
||||
return FALSE;
|
||||
}
|
||||
if ((*doesnt_want_it) (grab_mask, msg))
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (grabber doesn't want it)"));
|
||||
@@ -1585,7 +1598,16 @@ propagate (GdkWindow **window,
|
||||
}
|
||||
while (TRUE)
|
||||
{
|
||||
if ((*doesnt_want_it) (((GdkWindowObject *) *window)->event_mask, msg))
|
||||
/* See if the event should be ignored because an extended input device
|
||||
* is used */
|
||||
if (check_extended &&
|
||||
((GdkWindowObject *) *window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored)"));
|
||||
return FALSE;
|
||||
}
|
||||
if ((*doesnt_want_it) (((GdkWindowObject *) *window)->event_mask, msg))
|
||||
{
|
||||
/* Owner doesn't want it, propagate to parent. */
|
||||
GdkWindow *parent = gdk_window_get_parent (*window);
|
||||
@@ -1595,6 +1617,16 @@ propagate (GdkWindow **window,
|
||||
if (grab_window != NULL)
|
||||
{
|
||||
/* Event source is grabbed with owner_events TRUE */
|
||||
|
||||
/* See if the event should be ignored because an extended
|
||||
* input device is used */
|
||||
if (check_extended &&
|
||||
((GdkWindowObject *) grab_window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored for grabber)"));
|
||||
return FALSE;
|
||||
}
|
||||
if ((*doesnt_want_it) (grab_mask, msg))
|
||||
{
|
||||
/* Grabber doesn't want it either */
|
||||
@@ -2168,16 +2200,9 @@ gdk_event_translate (GdkDisplay *display,
|
||||
|
||||
assign_object (&window, new_window);
|
||||
|
||||
if (((GdkWindowObject *) window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored)"));
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
p_grab_window, p_grab_owner_events, p_grab_mask,
|
||||
doesnt_want_scroll))
|
||||
doesnt_want_scroll, TRUE))
|
||||
goto done;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2319,7 +2344,7 @@ gdk_event_translate (GdkDisplay *display,
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
k_grab_window, k_grab_owner_events, GDK_ALL_EVENTS_MASK,
|
||||
doesnt_want_key))
|
||||
doesnt_want_key, FALSE))
|
||||
break;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2401,7 +2426,7 @@ gdk_event_translate (GdkDisplay *display,
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
k_grab_window, k_grab_owner_events, GDK_ALL_EVENTS_MASK,
|
||||
doesnt_want_char))
|
||||
doesnt_want_char, FALSE))
|
||||
break;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2479,16 +2504,9 @@ gdk_event_translate (GdkDisplay *display,
|
||||
synthesize_crossing_events (window, GDK_CROSSING_NORMAL, msg);
|
||||
}
|
||||
|
||||
if (((GdkWindowObject *) window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored)"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
p_grab_window, p_grab_owner_events, p_grab_mask,
|
||||
doesnt_want_button_press))
|
||||
doesnt_want_button_press, TRUE))
|
||||
break;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2568,16 +2586,18 @@ gdk_event_translate (GdkDisplay *display,
|
||||
synthesize_crossing_events (window, GDK_CROSSING_NORMAL, msg);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (((GdkWindowObject *) window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored)"));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
p_grab_window, p_grab_owner_events, p_grab_mask,
|
||||
doesnt_want_button_release))
|
||||
doesnt_want_button_release, TRUE))
|
||||
{
|
||||
}
|
||||
else if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2640,16 +2660,9 @@ gdk_event_translate (GdkDisplay *display,
|
||||
synthesize_crossing_events (window, GDK_CROSSING_NORMAL, msg);
|
||||
}
|
||||
|
||||
if (((GdkWindowObject *) window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored)"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
p_grab_window, p_grab_owner_events, p_grab_mask,
|
||||
doesnt_want_button_motion))
|
||||
doesnt_want_button_motion, TRUE))
|
||||
break;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2747,16 +2760,9 @@ gdk_event_translate (GdkDisplay *display,
|
||||
assign_object (&window, new_window);
|
||||
}
|
||||
|
||||
if (((GdkWindowObject *) window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" (ignored)"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!propagate (&window, msg,
|
||||
p_grab_window, p_grab_owner_events, p_grab_mask,
|
||||
doesnt_want_scroll))
|
||||
doesnt_want_scroll, TRUE))
|
||||
break;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -3301,6 +3307,7 @@ gdk_event_translate (GdkDisplay *display,
|
||||
|
||||
event = gdk_event_new (GDK_NOTHING);
|
||||
event->any.window = window;
|
||||
g_object_ref (window);
|
||||
if (_gdk_input_other_event (event, msg, window))
|
||||
append_event (display, event);
|
||||
else
|
||||
|
||||
+125
-49
@@ -77,6 +77,16 @@ static GdkWindow *wintab_window;
|
||||
|
||||
#endif /* HAVE_WINTAB */
|
||||
|
||||
#ifdef HAVE_SOME_XINPUT
|
||||
|
||||
static GdkWindow *x_grab_window = NULL; /* Window that currently holds
|
||||
* the extended inputs grab
|
||||
*/
|
||||
static GdkEventMask x_grab_mask;
|
||||
static gboolean x_grab_owner_events;
|
||||
|
||||
#endif /* HAVE_SOME_XINPUT */
|
||||
|
||||
#ifdef HAVE_WINTAB
|
||||
|
||||
static GdkDevicePrivate *
|
||||
@@ -109,7 +119,6 @@ print_lc(LOGCONTEXT *lc)
|
||||
if (lc->lcOptions & CXO_MARGIN) g_print (" CXO_MARGIN");
|
||||
if (lc->lcOptions & CXO_MGNINSIDE) g_print (" CXO_MGNINSIDE");
|
||||
if (lc->lcOptions & CXO_CSRMESSAGES) g_print (" CXO_CSRMESSAGES");
|
||||
if (lc->lcOptions & CXO_CSRMESSAGES) g_print (" CXO_CSRMESSAGES");
|
||||
g_print ("\n");
|
||||
g_print ("lcStatus =");
|
||||
if (lc->lcStatus & CXS_DISABLED) g_print (" CXS_DISABLED");
|
||||
@@ -346,6 +355,20 @@ gdk_input_wintab_init (void)
|
||||
GDK_NOTE (INPUT, (g_print("context for device %d after WTOpen:\n", devix),
|
||||
print_lc(&lc)));
|
||||
#endif
|
||||
/* Increase packet queue size to reduce the risk of lost packets */
|
||||
/* According to the specs, if the function fails we must try again */
|
||||
/* with a smaller queue size */
|
||||
GDK_NOTE (INPUT, g_print("Attempting to increase queue size\n"));
|
||||
for (i = 128; i >= 1; i >>= 1)
|
||||
{
|
||||
if (WTQueueSizeSet(*hctx, i))
|
||||
{
|
||||
GDK_NOTE (INPUT, g_print("Queue size set to %d\n", i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!i)
|
||||
GDK_NOTE (INPUT, g_print("Whoops, no queue size could be set\n"));
|
||||
for (cursorix = firstcsr; cursorix < firstcsr + ncsrtypes; cursorix++)
|
||||
{
|
||||
active = FALSE;
|
||||
@@ -399,7 +422,7 @@ gdk_input_wintab_init (void)
|
||||
gdkdev->axes[k].max_value = axis_x.axMax;
|
||||
gdkdev->info.axes[k].use = GDK_AXIS_X;
|
||||
gdkdev->info.axes[k].min = axis_x.axMin;
|
||||
gdkdev->info.axes[k].min = axis_x.axMax;
|
||||
gdkdev->info.axes[k].max = axis_x.axMax;
|
||||
k++;
|
||||
}
|
||||
if (gdkdev->pktdata & PK_Y)
|
||||
@@ -412,7 +435,7 @@ gdk_input_wintab_init (void)
|
||||
gdkdev->axes[k].max_value = axis_y.axMax;
|
||||
gdkdev->info.axes[k].use = GDK_AXIS_Y;
|
||||
gdkdev->info.axes[k].min = axis_y.axMin;
|
||||
gdkdev->info.axes[k].min = axis_y.axMax;
|
||||
gdkdev->info.axes[k].max = axis_y.axMax;
|
||||
k++;
|
||||
}
|
||||
if (gdkdev->pktdata & PK_NORMAL_PRESSURE)
|
||||
@@ -424,8 +447,9 @@ gdk_input_wintab_init (void)
|
||||
gdkdev->axes[k].xmax_value =
|
||||
gdkdev->axes[k].max_value = axis_npressure.axMax;
|
||||
gdkdev->info.axes[k].use = GDK_AXIS_PRESSURE;
|
||||
gdkdev->info.axes[k].min = axis_npressure.axMin;
|
||||
gdkdev->info.axes[k].min = axis_npressure.axMax;
|
||||
/* GIMP seems to expect values in the range 0-1 */
|
||||
gdkdev->info.axes[k].min = 0.0; /*axis_npressure.axMin;*/
|
||||
gdkdev->info.axes[k].max = 1.0; /*axis_npressure.axMax;*/
|
||||
k++;
|
||||
}
|
||||
if (gdkdev->pktdata & PK_ORIENTATION)
|
||||
@@ -447,7 +471,7 @@ gdk_input_wintab_init (void)
|
||||
gdkdev->axes[k].max_value = 1000;
|
||||
gdkdev->info.axes[k].use = axis;
|
||||
gdkdev->info.axes[k].min = -1000;
|
||||
gdkdev->info.axes[k].min = 1000;
|
||||
gdkdev->info.axes[k].max = 1000;
|
||||
k++;
|
||||
}
|
||||
}
|
||||
@@ -670,6 +694,31 @@ _gdk_input_enter_event (GdkWindow *window)
|
||||
input_window->root_y = root_y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the currently active keyboard modifiers (ignoring the mouse buttons)
|
||||
* We could use gdk_window_get_pointer but that function does a lot of other
|
||||
* expensive things besides getting the modifiers. This code is somewhat based
|
||||
* on build_pointer_event_state from gdkevents-win32.c
|
||||
*/
|
||||
static guint
|
||||
get_modifier_key_state (void)
|
||||
{
|
||||
guint state;
|
||||
|
||||
state = 0;
|
||||
/* High-order bit is up/down, low order bit is toggled/untoggled */
|
||||
if (GetKeyState (VK_CONTROL) < 0)
|
||||
state |= GDK_CONTROL_MASK;
|
||||
if (GetKeyState (VK_SHIFT) < 0)
|
||||
state |= GDK_SHIFT_MASK;
|
||||
if (GetKeyState (VK_MENU) < 0)
|
||||
state |= GDK_MOD1_MASK;
|
||||
if (GetKeyState (VK_CAPITAL) & 0x1)
|
||||
state |= GDK_LOCK_MASK;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_input_other_event (GdkEvent *event,
|
||||
MSG *msg,
|
||||
@@ -680,11 +729,11 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
GdkWindow *current_window;
|
||||
#endif
|
||||
GdkDisplay *display;
|
||||
GdkWindowObject *obj;
|
||||
GdkWindowImplWin32 *impl;
|
||||
GdkWindowObject *obj, *grab_obj;
|
||||
GdkInputWindow *input_window;
|
||||
GdkDevicePrivate *gdkdev = NULL;
|
||||
GdkEventMask masktest;
|
||||
guint key_state;
|
||||
POINT pt;
|
||||
|
||||
PACKET packet;
|
||||
@@ -727,12 +776,11 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
}
|
||||
|
||||
obj = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
|
||||
|
||||
switch (msg->message)
|
||||
{
|
||||
case WT_PACKET:
|
||||
if (window == _gdk_parent_root)
|
||||
if (window == _gdk_parent_root && x_grab_window == NULL)
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...is root\n"));
|
||||
return FALSE;
|
||||
@@ -791,17 +839,46 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
masktest |= GDK_BUTTON_MOTION_MASK | GDK_BUTTON3_MOTION_MASK;
|
||||
}
|
||||
|
||||
/* See if input is grabbed */
|
||||
/* FIXME: x_grab_owner_events should probably be handled somehow */
|
||||
if (x_grab_window != NULL)
|
||||
{
|
||||
grab_obj = GDK_WINDOW_OBJECT (x_grab_window);
|
||||
if (!GDK_WINDOW_IMPL_WIN32 (grab_obj->impl)->extension_events_selected
|
||||
|| !(grab_obj->extension_events & masktest)
|
||||
|| !(x_grab_mask && masktest))
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("...grabber doesn't want it\n"));
|
||||
return FALSE;
|
||||
}
|
||||
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...to grabber\n"));
|
||||
|
||||
g_object_ref(x_grab_window);
|
||||
g_object_unref(window);
|
||||
window = x_grab_window;
|
||||
obj = grab_obj;
|
||||
}
|
||||
/* Now we can check if the window wants the event, and
|
||||
* propagate if necessary.
|
||||
*/
|
||||
dijkstra:
|
||||
if (!impl->extension_events_selected
|
||||
if (!GDK_WINDOW_IMPL_WIN32 (obj->impl)->extension_events_selected
|
||||
|| !(obj->extension_events & masktest))
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...not selected\n"));
|
||||
|
||||
if (obj->parent == GDK_WINDOW_OBJECT (_gdk_parent_root))
|
||||
return FALSE;
|
||||
|
||||
/* It is not good to propagate the extended events up to the parent
|
||||
* if this window wants normal (not extended) motion/button events */
|
||||
if (obj->event_mask & masktest)
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("...wants ordinary event, ignoring this\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pt.x = x;
|
||||
pt.y = y;
|
||||
@@ -827,7 +904,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
return FALSE;
|
||||
|
||||
event->any.window = window;
|
||||
|
||||
key_state = get_modifier_key_state ();
|
||||
if (event->any.type == GDK_BUTTON_PRESS
|
||||
|| event->any.type == GDK_BUTTON_RELEASE)
|
||||
{
|
||||
@@ -841,6 +918,8 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
return FALSE;
|
||||
#endif
|
||||
#endif
|
||||
event->button.axes = g_new(gdouble, gdkdev->info.num_axes);
|
||||
|
||||
gdk_input_translate_coordinates (gdkdev, input_window,
|
||||
gdkdev->last_axis_data,
|
||||
event->button.axes,
|
||||
@@ -850,7 +929,8 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
event->button.state = ((gdkdev->button_state << 8)
|
||||
& (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK
|
||||
| GDK_BUTTON3_MASK | GDK_BUTTON4_MASK
|
||||
| GDK_BUTTON5_MASK));
|
||||
| GDK_BUTTON5_MASK))
|
||||
| key_state;
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("WINTAB button %s:%d %g,%g\n",
|
||||
(event->button.type == GDK_BUTTON_PRESS ?
|
||||
@@ -864,6 +944,8 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
event->motion.is_hint = FALSE;
|
||||
event->motion.device = &gdkdev->info;
|
||||
|
||||
event->motion.axes = g_new(gdouble, gdkdev->info.num_axes);
|
||||
|
||||
gdk_input_translate_coordinates (gdkdev, input_window,
|
||||
gdkdev->last_axis_data,
|
||||
event->motion.axes,
|
||||
@@ -873,7 +955,8 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
event->motion.state = ((gdkdev->button_state << 8)
|
||||
& (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK
|
||||
| GDK_BUTTON3_MASK | GDK_BUTTON4_MASK
|
||||
| GDK_BUTTON5_MASK));
|
||||
| GDK_BUTTON5_MASK))
|
||||
| key_state;
|
||||
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("WINTAB motion: %g,%g\n",
|
||||
@@ -885,7 +968,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
*/
|
||||
if ((gdkdev->pktdata & PK_NORMAL_PRESSURE
|
||||
&& (event->motion.state & GDK_BUTTON1_MASK)
|
||||
&& packet.pkNormalPressure <= MAX (0, gdkdev->npbtnmarks[0] - 2))
|
||||
&& packet.pkNormalPressure <= MAX (0, (gint) gdkdev->npbtnmarks[0] - 2))
|
||||
|| (gdkdev->pktdata & PK_NORMAL_PRESSURE
|
||||
&& !(event->motion.state & GDK_BUTTON1_MASK)
|
||||
&& packet.pkNormalPressure > gdkdev->npbtnmarks[1] + 2))
|
||||
@@ -904,7 +987,8 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
event2->button.state = ((gdkdev->button_state << 8)
|
||||
& (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK
|
||||
| GDK_BUTTON3_MASK | GDK_BUTTON4_MASK
|
||||
| GDK_BUTTON5_MASK));
|
||||
| GDK_BUTTON5_MASK))
|
||||
| key_state;
|
||||
event2->button.button = 1;
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("WINTAB synthesized button %s: %d %g,%gg\n",
|
||||
@@ -1008,6 +1092,11 @@ _gdk_input_grab_pointer (GdkWindow *window,
|
||||
if (new_window)
|
||||
{
|
||||
new_window->grabbed = TRUE;
|
||||
x_grab_window = window;
|
||||
x_grab_mask = event_mask;
|
||||
x_grab_owner_events = owner_events;
|
||||
|
||||
/* FIXME: Do we need to handle confine_to and time? */
|
||||
|
||||
tmp_list = _gdk_input_devices;
|
||||
while (tmp_list)
|
||||
@@ -1037,6 +1126,7 @@ _gdk_input_grab_pointer (GdkWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
x_grab_window = NULL;
|
||||
tmp_list = _gdk_input_devices;
|
||||
while (tmp_list)
|
||||
{
|
||||
@@ -1095,6 +1185,7 @@ _gdk_input_ungrab_pointer (guint32 time)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
x_grab_window = NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -1134,42 +1225,27 @@ gdk_device_get_state (GdkDevice *device,
|
||||
GdkDevicePrivate *gdkdev;
|
||||
GdkInputWindow *input_window;
|
||||
|
||||
if (mask)
|
||||
gdk_window_get_pointer (window, NULL, NULL, mask);
|
||||
|
||||
gdkdev = (GdkDevicePrivate *)device;
|
||||
/* For now just use the last known button and axis state of the device.
|
||||
* Since graphical tablets send an insane amount of motion events each
|
||||
* second, the info should be fairly up to date */
|
||||
if (mask)
|
||||
{
|
||||
gdk_window_get_pointer (window, NULL, NULL, mask);
|
||||
*mask &= 0xFF; /* Mask away core pointer buttons */
|
||||
*mask |= ((gdkdev->button_state << 8)
|
||||
& (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK
|
||||
| GDK_BUTTON3_MASK | GDK_BUTTON4_MASK
|
||||
| GDK_BUTTON5_MASK));
|
||||
}
|
||||
input_window = _gdk_input_window_find (window);
|
||||
g_return_if_fail (input_window != NULL);
|
||||
|
||||
#if 0 /* FIXME */
|
||||
state = XQueryDeviceState (gdk_display, gdkdev->xdevice);
|
||||
input_class = state->data;
|
||||
for (i = 0; i < state->num_classes; i++)
|
||||
{
|
||||
switch (input_class->class)
|
||||
{
|
||||
case ValuatorClass:
|
||||
if (axes)
|
||||
gdk_input_translate_coordinates (gdkdev, input_window,
|
||||
((XValuatorState *)input_class)->valuators,
|
||||
axes, NULL, NULL);
|
||||
break;
|
||||
|
||||
case ButtonClass:
|
||||
if (mask)
|
||||
{
|
||||
*mask &= 0xFF;
|
||||
if (((XButtonState *)input_class)->num_buttons > 0)
|
||||
*mask |= ((XButtonState *)input_class)->buttons[0] << 7;
|
||||
/* GDK_BUTTON1_MASK = 1 << 8, and button n is stored
|
||||
* in bit 1<<(n%8) in byte n/8. n = 1,2,... */
|
||||
}
|
||||
break;
|
||||
}
|
||||
input_class = (XInputClass *)(((char *)input_class)+input_class->length);
|
||||
}
|
||||
XFreeDeviceState (state);
|
||||
#endif
|
||||
/* For some reason, input_window is sometimes NULL when I use The GIMP 2
|
||||
* (bug #141543?). Avoid crashing if debugging is disabled. */
|
||||
if (axes && gdkdev->last_axis_data && input_window)
|
||||
gdk_input_translate_coordinates (gdkdev, input_window,
|
||||
gdkdev->last_axis_data,
|
||||
axes, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -813,7 +813,7 @@ _gdk_windowing_set_default_display (GdkDisplay *display)
|
||||
}
|
||||
}
|
||||
|
||||
char*
|
||||
static char*
|
||||
escape_for_xmessage (const char *str)
|
||||
{
|
||||
GString *retval;
|
||||
|
||||
@@ -783,14 +783,14 @@ get_real_window (GdkDisplay *display,
|
||||
}
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static const char notify_modes[][18] = {
|
||||
static const char notify_modes[][19] = {
|
||||
"NotifyNormal",
|
||||
"NotifyGrab",
|
||||
"NotifyUngrab",
|
||||
"NotifyWhileGrabbed"
|
||||
};
|
||||
|
||||
static const char notify_details[][22] = {
|
||||
static const char notify_details[][23] = {
|
||||
"NotifyAncestor",
|
||||
"NotifyVirtual",
|
||||
"NotifyInferior",
|
||||
|
||||
@@ -866,7 +866,7 @@ gdk_window_postmove (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
expose_serial_predicate (Display *xdisplay,
|
||||
XEvent *xev,
|
||||
XPointer arg)
|
||||
|
||||
@@ -380,9 +380,9 @@ get_keymap (GdkKeymapX11 *keymap_x11)
|
||||
|
||||
#define GET_EFFECTIVE_KEYMAP(keymap) get_effective_keymap ((keymap), G_STRFUNC)
|
||||
|
||||
GdkKeymap *
|
||||
static GdkKeymap *
|
||||
get_effective_keymap (GdkKeymap *keymap,
|
||||
const char *function)
|
||||
const char *function)
|
||||
{
|
||||
if (!keymap)
|
||||
{
|
||||
|
||||
+80
-79
@@ -79,7 +79,8 @@ get_unescaped_char (const char **str,
|
||||
static gboolean
|
||||
gtk_fnmatch_intern (const char *pattern,
|
||||
const char *string,
|
||||
gboolean component_start)
|
||||
gboolean component_start,
|
||||
gboolean no_leading_period)
|
||||
{
|
||||
const char *p = pattern, *n = string;
|
||||
|
||||
@@ -97,7 +98,7 @@ gtk_fnmatch_intern (const char *pattern,
|
||||
return FALSE;
|
||||
else if (nc == G_DIR_SEPARATOR)
|
||||
return FALSE;
|
||||
else if (nc == '.' && component_start)
|
||||
else if (nc == '.' && component_start && no_leading_period)
|
||||
return FALSE;
|
||||
break;
|
||||
case '\\':
|
||||
@@ -107,7 +108,7 @@ gtk_fnmatch_intern (const char *pattern,
|
||||
return FALSE;
|
||||
break;
|
||||
case '*':
|
||||
if (nc == '.' && component_start)
|
||||
if (nc == '.' && component_start && no_leading_period)
|
||||
return FALSE;
|
||||
|
||||
{
|
||||
@@ -148,7 +149,7 @@ gtk_fnmatch_intern (const char *pattern,
|
||||
for (p = last_p; nc != '\0';)
|
||||
{
|
||||
if ((c == '[' || nc == c) &&
|
||||
gtk_fnmatch_intern (p, last_n, component_start))
|
||||
gtk_fnmatch_intern (p, last_n, component_start, no_leading_period))
|
||||
return TRUE;
|
||||
|
||||
component_start = (nc == G_DIR_SEPARATOR);
|
||||
@@ -168,7 +169,7 @@ gtk_fnmatch_intern (const char *pattern,
|
||||
if (nc == '\0' || nc == G_DIR_SEPARATOR)
|
||||
return FALSE;
|
||||
|
||||
if (nc == '.' && component_start)
|
||||
if (nc == '.' && component_start && no_leading_period)
|
||||
return FALSE;
|
||||
|
||||
not = (*p == '!' || *p == '^');
|
||||
@@ -245,116 +246,116 @@ gtk_fnmatch_intern (const char *pattern,
|
||||
*
|
||||
* FNM_FILE_NAME - always set
|
||||
* FNM_LEADING_DIR - never set
|
||||
* FNM_PERIOD - always set
|
||||
* FNM_NOESCAPE - set only on windows
|
||||
* FNM_CASEFOLD - set only on windows
|
||||
*/
|
||||
gboolean
|
||||
_gtk_fnmatch (const char *pattern,
|
||||
const char *string)
|
||||
const char *string,
|
||||
gboolean no_leading_period)
|
||||
{
|
||||
return gtk_fnmatch_intern (pattern, string, TRUE);
|
||||
return gtk_fnmatch_intern (pattern, string, TRUE, no_leading_period);
|
||||
}
|
||||
|
||||
#undef FNMATCH_TEST_CASES
|
||||
#ifdef FNMATCH_TEST_CASES
|
||||
|
||||
#define TEST(pat, str, result) \
|
||||
g_assert (_gtk_fnmatch ((pat), (str)) == result)
|
||||
#define TEST(pat, str, no_leading_period, result) \
|
||||
g_assert (_gtk_fnmatch ((pat), (str), (no_leading_period)) == result)
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
TEST ("[a-]", "-", TRUE);
|
||||
TEST ("[a-]", "-", TRUE, TRUE);
|
||||
|
||||
TEST ("a", "a", TRUE);
|
||||
TEST ("a", "b", FALSE);
|
||||
TEST ("a", "a", TRUE, TRUE);
|
||||
TEST ("a", "b", TRUE, FALSE);
|
||||
|
||||
/* Test what ? matches */
|
||||
TEST ("?", "a", TRUE);
|
||||
TEST ("?", ".", FALSE);
|
||||
TEST ("a?", "a.", TRUE);
|
||||
TEST ("a/?", "a/b", TRUE);
|
||||
TEST ("a/?", "a/.", FALSE);
|
||||
TEST ("?", "/", FALSE);
|
||||
TEST ("?", "a", TRUE, TRUE);
|
||||
TEST ("?", ".", TRUE, FALSE);
|
||||
TEST ("a?", "a.", TRUE, TRUE);
|
||||
TEST ("a/?", "a/b", TRUE, TRUE);
|
||||
TEST ("a/?", "a/.", TRUE, FALSE);
|
||||
TEST ("?", "/", TRUE, FALSE);
|
||||
|
||||
/* Test what * matches */
|
||||
TEST ("*", "a", TRUE);
|
||||
TEST ("*", ".", FALSE);
|
||||
TEST ("a*", "a.", TRUE);
|
||||
TEST ("a/*", "a/b", TRUE);
|
||||
TEST ("a/*", "a/.", FALSE);
|
||||
TEST ("*", "/", FALSE);
|
||||
TEST ("*", "a", TRUE, TRUE);
|
||||
TEST ("*", ".", TRUE, FALSE);
|
||||
TEST ("a*", "a.", TRUE, TRUE);
|
||||
TEST ("a/*", "a/b", TRUE, TRUE);
|
||||
TEST ("a/*", "a/.", TRUE, FALSE);
|
||||
TEST ("*", "/", TRUE, FALSE);
|
||||
|
||||
/* Range tests */
|
||||
TEST ("[ab]", "a", TRUE);
|
||||
TEST ("[ab]", "c", FALSE);
|
||||
TEST ("[^ab]", "a", FALSE);
|
||||
TEST ("[!ab]", "a", FALSE);
|
||||
TEST ("[^ab]", "c", TRUE);
|
||||
TEST ("[!ab]", "c", TRUE);
|
||||
TEST ("[a-c]", "b", TRUE);
|
||||
TEST ("[a-c]", "d", FALSE);
|
||||
TEST ("[a-]", "-", TRUE);
|
||||
TEST ("[]]", "]", TRUE);
|
||||
TEST ("[^]]", "a", TRUE);
|
||||
TEST ("[!]]", "a", TRUE);
|
||||
TEST ("[ab]", "a", TRUE, TRUE);
|
||||
TEST ("[ab]", "c", TRUE, FALSE);
|
||||
TEST ("[^ab]", "a", TRUE, FALSE);
|
||||
TEST ("[!ab]", "a", TRUE, FALSE);
|
||||
TEST ("[^ab]", "c", TRUE, TRUE);
|
||||
TEST ("[!ab]", "c", TRUE, TRUE);
|
||||
TEST ("[a-c]", "b", TRUE, TRUE);
|
||||
TEST ("[a-c]", "d", TRUE, FALSE);
|
||||
TEST ("[a-]", "-", TRUE, TRUE);
|
||||
TEST ("[]]", "]", TRUE, TRUE);
|
||||
TEST ("[^]]", "a", TRUE, TRUE);
|
||||
TEST ("[!]]", "a", TRUE, TRUE);
|
||||
|
||||
/* Various unclosed ranges */
|
||||
TEST ("[ab", "a", FALSE);
|
||||
TEST ("[a-", "a", FALSE);
|
||||
TEST ("[ab", "c", FALSE);
|
||||
TEST ("[a-", "c", FALSE);
|
||||
TEST ("[^]", "a", FALSE);
|
||||
TEST ("[ab", "a", TRUE, FALSE);
|
||||
TEST ("[a-", "a", TRUE, FALSE);
|
||||
TEST ("[ab", "c", TRUE, FALSE);
|
||||
TEST ("[a-", "c", TRUE, FALSE);
|
||||
TEST ("[^]", "a", TRUE, FALSE);
|
||||
|
||||
/* Ranges and special no-wildcard matches */
|
||||
TEST ("[.]", ".", FALSE);
|
||||
TEST ("a[.]", "a.", TRUE);
|
||||
TEST ("a/[.]", "a/.", FALSE);
|
||||
TEST ("[/]", "/", FALSE);
|
||||
TEST ("[^/]", "a", TRUE);
|
||||
TEST ("[.]", ".", TRUE, FALSE);
|
||||
TEST ("a[.]", "a.", TRUE, TRUE);
|
||||
TEST ("a/[.]", "a/.", TRUE, FALSE);
|
||||
TEST ("[/]", "/", TRUE, FALSE);
|
||||
TEST ("[^/]", "a", TRUE, TRUE);
|
||||
|
||||
/* Basic tests of * (and combinations of * and ?) */
|
||||
TEST ("a*b", "ab", TRUE);
|
||||
TEST ("a*b", "axb", TRUE);
|
||||
TEST ("a*b", "axxb", TRUE);
|
||||
TEST ("a**b", "ab", TRUE);
|
||||
TEST ("a**b", "axb", TRUE);
|
||||
TEST ("a**b", "axxb", TRUE);
|
||||
TEST ("a*?*b", "ab", FALSE);
|
||||
TEST ("a*?*b", "axb", TRUE);
|
||||
TEST ("a*?*b", "axxb", TRUE);
|
||||
TEST ("a*b", "ab", TRUE, TRUE);
|
||||
TEST ("a*b", "axb", TRUE, TRUE);
|
||||
TEST ("a*b", "axxb", TRUE, TRUE);
|
||||
TEST ("a**b", "ab", TRUE, TRUE);
|
||||
TEST ("a**b", "axb", TRUE, TRUE);
|
||||
TEST ("a**b", "axxb", TRUE, TRUE);
|
||||
TEST ("a*?*b", "ab", TRUE, FALSE);
|
||||
TEST ("a*?*b", "axb", TRUE, TRUE);
|
||||
TEST ("a*?*b", "axxb", TRUE, TRUE);
|
||||
|
||||
/* Test of *[range] */
|
||||
TEST ("a*[cd]", "ac", TRUE);
|
||||
TEST ("a*[cd]", "axc", TRUE);
|
||||
TEST ("a*[cd]", "axx", FALSE);
|
||||
TEST ("a*[cd]", "ac", TRUE, TRUE);
|
||||
TEST ("a*[cd]", "axc", TRUE, TRUE);
|
||||
TEST ("a*[cd]", "axx", TRUE, FALSE);
|
||||
|
||||
TEST ("a/[.]", "a/.", FALSE);
|
||||
TEST ("a*[.]", "a/.", FALSE);
|
||||
TEST ("a/[.]", "a/.", TRUE, FALSE);
|
||||
TEST ("a*[.]", "a/.", TRUE, FALSE);
|
||||
|
||||
/* Test of UTF-8 */
|
||||
|
||||
TEST ("ä", "ä", TRUE); /* TEST ("ä", "ä", TRUE); */
|
||||
TEST ("?", "ä", TRUE); /* TEST ("?", "ä", TRUE); */
|
||||
TEST ("*ö", "äö", TRUE); /* TEST ("*ö", "äö", TRUE); */
|
||||
TEST ("*ö", "ääö", TRUE); /* TEST ("*ö", "ääö", TRUE); */
|
||||
TEST ("[ä]", "ä", TRUE); /* TEST ("[ä]", "ä", TRUE); */
|
||||
TEST ("[ä-ö]", "é", TRUE); /* TEST ("[ä-ö]", "é", TRUE); */
|
||||
TEST ("[ä-ö]", "a", FALSE); /* TEST ("[ä-ö]", "a", FALSE); */
|
||||
TEST ("ä", "ä", TRUE, TRUE); /* TEST ("ä", "ä", TRUE); */
|
||||
TEST ("?", "ä", TRUE, TRUE); /* TEST ("?", "ä", TRUE); */
|
||||
TEST ("*ö", "äö", TRUE, TRUE); /* TEST ("*ö", "äö", TRUE); */
|
||||
TEST ("*ö", "ääö", TRUE, TRUE); /* TEST ("*ö", "ääö", TRUE); */
|
||||
TEST ("[ä]", "ä", TRUE, TRUE); /* TEST ("[ä]", "ä", TRUE); */
|
||||
TEST ("[ä-ö]", "é", TRUE, TRUE); /* TEST ("[ä-ö]", "é", TRUE); */
|
||||
TEST ("[ä-ö]", "a", TRUE, FALSE); /* TEST ("[ä-ö]", "a", FALSE); */
|
||||
|
||||
#ifdef DO_ESCAPE
|
||||
/* Tests of escaping */
|
||||
TEST ("\\\\", "\\", TRUE);
|
||||
TEST ("\\?", "?", TRUE);
|
||||
TEST ("\\?", "a", FALSE);
|
||||
TEST ("\\*", "*", TRUE);
|
||||
TEST ("\\*", "a", FALSE);
|
||||
TEST ("\\[a-b]", "[a-b]", TRUE);
|
||||
TEST ("[\\\\]", "\\", TRUE);
|
||||
TEST ("[\\^a]", "a", TRUE);
|
||||
TEST ("[a\\-c]", "b", FALSE);
|
||||
TEST ("[a\\-c]", "-", TRUE);
|
||||
TEST ("[a\\]", "a", FALSE);
|
||||
TEST ("\\\\", "\\", TRUE, TRUE);
|
||||
TEST ("\\?", "?", TRUE, TRUE);
|
||||
TEST ("\\?", "a", TRUE, FALSE);
|
||||
TEST ("\\*", "*", TRUE, TRUE);
|
||||
TEST ("\\*", "a", TRUE, FALSE);
|
||||
TEST ("\\[a-b]", "[a-b]", TRUE, TRUE);
|
||||
TEST ("[\\\\]", "\\", TRUE, TRUE);
|
||||
TEST ("[\\^a]", "a", TRUE, TRUE);
|
||||
TEST ("[a\\-c]", "b", TRUE, FALSE);
|
||||
TEST ("[a\\-c]", "-", TRUE, TRUE);
|
||||
TEST ("[a\\]", "a", TRUE, FALSE);
|
||||
#endif /* DO_ESCAPE */
|
||||
|
||||
return 0;
|
||||
|
||||
+12
-7
@@ -553,13 +553,13 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
|
||||
* @action_group: the action group
|
||||
* @action: the action to add
|
||||
* @accelerator: the accelerator for the action, in
|
||||
* the format understood by gtk_accelerator_parse(), or %NULL to use the
|
||||
* stock accelerator
|
||||
* the format understood by gtk_accelerator_parse(), or "" for no accelerator, or
|
||||
* %NULL to use the stock accelerator
|
||||
*
|
||||
* Adds an action object to the action group and sets up the accelerator.
|
||||
*
|
||||
* If @accelerator is %NULL, attempts to use the accelerator associated
|
||||
* with the stock_id of the action.
|
||||
* with the stock_id of the action.
|
||||
*
|
||||
* Accel paths are set to
|
||||
* <literal><Actions>/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
|
||||
@@ -585,10 +585,15 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
|
||||
|
||||
if (accelerator)
|
||||
{
|
||||
gtk_accelerator_parse (accelerator, &accel_key, &accel_mods);
|
||||
if (accel_key == 0)
|
||||
g_warning ("Unable to parse accelerator '%s' for action '%s'",
|
||||
accelerator, name);
|
||||
if (accelerator[0] == 0)
|
||||
accel_key = 0;
|
||||
else
|
||||
{
|
||||
gtk_accelerator_parse (accelerator, &accel_key, &accel_mods);
|
||||
if (accel_key == 0)
|
||||
g_warning ("Unable to parse accelerator '%s' for action '%s'",
|
||||
accelerator, name);
|
||||
}
|
||||
}
|
||||
else if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
|
||||
{
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
#include "gtkarrow.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
#define MIN_ARROW_SIZE 11
|
||||
#define MIN_ARROW_SIZE 15
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
|
||||
+13
-2
@@ -884,11 +884,10 @@ gtk_button_size_request (GtkWidget *widget,
|
||||
{
|
||||
GtkButton *button = GTK_BUTTON (widget);
|
||||
GtkBorder default_border;
|
||||
gboolean interior_focus;
|
||||
gint focus_width;
|
||||
gint focus_pad;
|
||||
|
||||
gtk_button_get_props (button, &default_border, NULL, &interior_focus);
|
||||
gtk_button_get_props (button, &default_border, NULL, NULL);
|
||||
gtk_widget_style_get (GTK_WIDGET (widget),
|
||||
"focus-line-width", &focus_width,
|
||||
"focus-padding", &focus_pad,
|
||||
@@ -930,8 +929,15 @@ gtk_button_size_allocate (GtkWidget *widget,
|
||||
gint xthickness = GTK_WIDGET (widget)->style->xthickness;
|
||||
gint ythickness = GTK_WIDGET (widget)->style->ythickness;
|
||||
GtkBorder default_border;
|
||||
gint focus_width;
|
||||
gint focus_pad;
|
||||
|
||||
gtk_button_get_props (button, &default_border, NULL, NULL);
|
||||
gtk_widget_style_get (GTK_WIDGET (widget),
|
||||
"focus-line-width", &focus_width,
|
||||
"focus-padding", &focus_pad,
|
||||
NULL);
|
||||
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
@@ -959,6 +965,11 @@ gtk_button_size_allocate (GtkWidget *widget,
|
||||
child_allocation.width = MAX (1, child_allocation.width - default_border.left - default_border.right);
|
||||
child_allocation.height = MAX (1, child_allocation.height - default_border.top - default_border.bottom);
|
||||
}
|
||||
|
||||
child_allocation.x += focus_width + focus_pad;
|
||||
child_allocation.y += focus_width + focus_pad;
|
||||
child_allocation.width = MAX (1, child_allocation.width - (focus_width + focus_pad) * 2);
|
||||
child_allocation.height = MAX (1, child_allocation.height - (focus_width + focus_pad) * 2);
|
||||
|
||||
if (button->depressed)
|
||||
{
|
||||
|
||||
+89
-56
@@ -34,6 +34,7 @@
|
||||
#include "gtkmenu.h"
|
||||
#include "gtktogglebutton.h"
|
||||
#include "gtktreeselection.h"
|
||||
#include "gtktreeprivate.h"
|
||||
#include "gtkvseparator.h"
|
||||
#include "gtkwindow.h"
|
||||
|
||||
@@ -114,8 +115,9 @@ struct _GtkComboBoxPrivate
|
||||
* cell_view -> GtkCellView, regular child
|
||||
* cell_view_frame -> NULL
|
||||
* button -> GtkToggleButton set_parent to combo
|
||||
* arrow -> GtkArrow set_parent to button
|
||||
* separator -> GtkVSepator set_parent to button
|
||||
* box -> child of button
|
||||
* arrow -> child of box
|
||||
* separator -> child of box
|
||||
* popup_widget -> GtkMenu
|
||||
* popup_window -> NULL
|
||||
* popup_frame -> NULL
|
||||
@@ -126,6 +128,7 @@ struct _GtkComboBoxPrivate
|
||||
* cell_view -> NULL
|
||||
* cell_view_frame -> NULL
|
||||
* button -> GtkToggleButton set_parent to combo
|
||||
* box -> NULL
|
||||
* arrow -> GtkArrow, child of button
|
||||
* separator -> NULL
|
||||
* popup_widget -> GtkMenu
|
||||
@@ -138,6 +141,7 @@ struct _GtkComboBoxPrivate
|
||||
* cell_view -> GtkCellView, regular child
|
||||
* cell_view_frame -> GtkFrame, set parent to combo
|
||||
* button -> GtkToggleButton, set_parent to combo
|
||||
* box -> NULL
|
||||
* arrow -> GtkArrow, child of button
|
||||
* separator -> NULL
|
||||
* popup_widget -> tree_view
|
||||
@@ -150,6 +154,7 @@ struct _GtkComboBoxPrivate
|
||||
* cell_view -> NULL
|
||||
* cell_view_frame -> NULL
|
||||
* button -> GtkToggleButton, set_parent to combo
|
||||
* box -> NULL
|
||||
* arrow -> GtkArrow, child of button
|
||||
* separator -> NULL
|
||||
* popup_widget -> tree_view
|
||||
@@ -337,9 +342,6 @@ static void gtk_combo_box_menu_row_changed (GtkTreeModel *model,
|
||||
static gboolean gtk_combo_box_menu_key_press (GtkWidget *widget,
|
||||
GdkEventKey *event,
|
||||
gpointer data);
|
||||
static void gtk_combo_box_menu_state_changed (GtkWidget *widget,
|
||||
GtkStateType previous,
|
||||
gpointer data);
|
||||
|
||||
/* cell layout */
|
||||
static void gtk_combo_box_cell_layout_pack_start (GtkCellLayout *layout,
|
||||
@@ -499,9 +501,9 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
g_param_spec_int ("active",
|
||||
P_("Active item"),
|
||||
P_("The item which is currently active"),
|
||||
0,
|
||||
-1,
|
||||
G_MAXINT,
|
||||
0,
|
||||
-1,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
gtk_widget_class_install_style_property (widget_class,
|
||||
@@ -913,30 +915,48 @@ gtk_combo_box_menu_position_below (GtkMenu *menu,
|
||||
gint *push_in,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
|
||||
gint sx, sy;
|
||||
GtkWidget *child;
|
||||
GtkRequisition req;
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
|
||||
GdkScreen *screen;
|
||||
gint monitor_num;
|
||||
GdkRectangle monitor;
|
||||
|
||||
/* FIXME: is using the size request here broken? */
|
||||
child = GTK_BIN (combo_box)->child;
|
||||
|
||||
gdk_window_get_origin (child->window, &sx, &sy);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (child))
|
||||
{
|
||||
sx += child->allocation.x;
|
||||
sy += child->allocation.y;
|
||||
}
|
||||
|
||||
gtk_widget_size_request (GTK_WIDGET (menu), &req);
|
||||
|
||||
|
||||
if (gtk_widget_get_direction (GTK_WIDGET (combo_box)) == GTK_TEXT_DIR_LTR)
|
||||
*x = sx;
|
||||
else
|
||||
*x = sx + child->allocation.width - req.width;
|
||||
*y = sy + child->allocation.height;
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (child))
|
||||
{
|
||||
*x += child->allocation.x;
|
||||
*y += child->allocation.y;
|
||||
}
|
||||
|
||||
*y = sy;
|
||||
|
||||
screen = gtk_widget_get_screen (GTK_WIDGET (combo_box));
|
||||
monitor_num = gdk_screen_get_monitor_at_window (screen,
|
||||
GTK_WIDGET (combo_box)->window);
|
||||
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
|
||||
|
||||
if (*x < monitor.x)
|
||||
*x = monitor.x;
|
||||
else if (*x + req.width > monitor.x + monitor.width)
|
||||
*x = monitor.x + monitor.width - req.width;
|
||||
|
||||
if (*y + child->allocation.height + req.height <= monitor.y + monitor.height)
|
||||
*y += child->allocation.height;
|
||||
else
|
||||
*y -= req.height;
|
||||
|
||||
*push_in = TRUE;
|
||||
}
|
||||
|
||||
@@ -1115,6 +1135,17 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||
gtk_menu_set_active (GTK_MENU (combo_box->priv->popup_widget),
|
||||
combo_box->priv->active_item);
|
||||
|
||||
if (combo_box->priv->wrap_width == 0)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
width = GTK_WIDGET (combo_box)->allocation.width;
|
||||
gtk_widget_size_request (combo_box->priv->popup_widget, &requisition);
|
||||
|
||||
gtk_widget_set_size_request (combo_box->priv->popup_widget,
|
||||
MAX (width, requisition.width), -1);
|
||||
}
|
||||
|
||||
gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),
|
||||
NULL, NULL,
|
||||
gtk_combo_box_menu_position, combo_box,
|
||||
@@ -1502,12 +1533,6 @@ gtk_combo_box_forall (GtkContainer *container,
|
||||
{
|
||||
if (combo_box->priv->button)
|
||||
(* callback) (combo_box->priv->button, callback_data);
|
||||
if (combo_box->priv->box)
|
||||
(* callback) (combo_box->priv->box, callback_data);
|
||||
if (combo_box->priv->separator)
|
||||
(* callback) (combo_box->priv->separator, callback_data);
|
||||
if (combo_box->priv->arrow)
|
||||
(* callback) (combo_box->priv->arrow, callback_data);
|
||||
if (combo_box->priv->cell_view_frame)
|
||||
(* callback) (combo_box->priv->cell_view_frame, callback_data);
|
||||
}
|
||||
@@ -1653,9 +1678,6 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box,
|
||||
g_signal_connect (combo_box->priv->button, "button_press_event",
|
||||
G_CALLBACK (gtk_combo_box_menu_button_press),
|
||||
combo_box);
|
||||
g_signal_connect (combo_box->priv->button, "state_changed",
|
||||
G_CALLBACK (gtk_combo_box_menu_state_changed),
|
||||
combo_box);
|
||||
|
||||
/* create our funky menu */
|
||||
menu = gtk_menu_new ();
|
||||
@@ -1714,10 +1736,6 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
|
||||
G_SIGNAL_MATCH_DATA,
|
||||
0, 0, NULL,
|
||||
gtk_combo_box_menu_button_press, NULL);
|
||||
g_signal_handlers_disconnect_matched (combo_box->priv->button,
|
||||
G_SIGNAL_MATCH_DATA,
|
||||
0, 0, NULL,
|
||||
gtk_combo_box_menu_state_changed, NULL);
|
||||
|
||||
/* unparent will remove our latest ref */
|
||||
gtk_widget_unparent (combo_box->priv->button);
|
||||
@@ -1736,13 +1754,13 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
|
||||
|
||||
static void
|
||||
gtk_combo_box_item_get_size (GtkComboBox *combo_box,
|
||||
gint index,
|
||||
gint index_,
|
||||
gint *cols,
|
||||
gint *rows)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_tree_model_iter_nth_child (combo_box->priv->model, &iter, NULL, index);
|
||||
gtk_tree_model_iter_nth_child (combo_box->priv->model, &iter, NULL, index_);
|
||||
|
||||
if (cols)
|
||||
{
|
||||
@@ -1890,6 +1908,18 @@ gtk_combo_box_menu_button_press (GtkWidget *widget,
|
||||
gtk_menu_set_active (GTK_MENU (combo_box->priv->popup_widget),
|
||||
combo_box->priv->active_item);
|
||||
|
||||
if (combo_box->priv->wrap_width == 0)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
gint width;
|
||||
|
||||
width = GTK_WIDGET (combo_box)->allocation.width;
|
||||
gtk_widget_size_request (combo_box->priv->popup_widget, &requisition);
|
||||
|
||||
gtk_widget_set_size_request (combo_box->priv->popup_widget,
|
||||
MAX (width, requisition.width), -1);
|
||||
}
|
||||
|
||||
gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),
|
||||
NULL, NULL,
|
||||
gtk_combo_box_menu_position, combo_box,
|
||||
@@ -1901,22 +1931,6 @@ gtk_combo_box_menu_button_press (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_combo_box_menu_state_changed (GtkWidget *widget,
|
||||
GtkStateType previous,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
|
||||
|
||||
if (combo_box->priv->cell_view)
|
||||
{
|
||||
gtk_widget_set_state (combo_box->priv->cell_view,
|
||||
GTK_WIDGET_STATE (widget));
|
||||
|
||||
gtk_widget_queue_draw (combo_box->priv->cell_view);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_combo_box_menu_item_activate (GtkWidget *item,
|
||||
gpointer user_data)
|
||||
@@ -2147,14 +2161,27 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box)
|
||||
gtk_cell_view_set_background_color (GTK_CELL_VIEW (combo_box->priv->cell_view),
|
||||
>K_WIDGET (combo_box)->style->base[GTK_WIDGET_STATE (combo_box)]);
|
||||
|
||||
gtk_widget_show (combo_box->priv->cell_view_frame);
|
||||
combo_box->priv->box = gtk_event_box_new ();
|
||||
gtk_event_box_set_visible_window (GTK_EVENT_BOX (combo_box->priv->box),
|
||||
FALSE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (combo_box->priv->cell_view_frame),
|
||||
combo_box->priv->box);
|
||||
|
||||
gtk_widget_show_all (combo_box->priv->cell_view_frame);
|
||||
|
||||
g_signal_connect (combo_box->priv->box, "button_press_event",
|
||||
G_CALLBACK (gtk_combo_box_list_button_pressed),
|
||||
combo_box);
|
||||
}
|
||||
|
||||
combo_box->priv->tree_view = gtk_tree_view_new ();
|
||||
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (combo_box->priv->tree_view));
|
||||
gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE);
|
||||
gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE);
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
FALSE);
|
||||
_gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
TRUE);
|
||||
if (combo_box->priv->model)
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
combo_box->priv->model);
|
||||
@@ -2226,6 +2253,11 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box)
|
||||
0, 0, NULL,
|
||||
gtk_combo_box_list_button_pressed,
|
||||
NULL);
|
||||
g_signal_handlers_disconnect_matched (combo_box->priv->box,
|
||||
G_SIGNAL_MATCH_DATA,
|
||||
0, 0, NULL,
|
||||
gtk_combo_box_list_button_pressed,
|
||||
NULL);
|
||||
|
||||
/* destroy things (unparent will kill the latest ref from us)
|
||||
* last unref on button will destroy the arrow
|
||||
@@ -2245,6 +2277,7 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box)
|
||||
{
|
||||
gtk_widget_unparent (combo_box->priv->cell_view_frame);
|
||||
combo_box->priv->cell_view_frame = NULL;
|
||||
combo_box->priv->box = NULL;
|
||||
}
|
||||
|
||||
gtk_widget_destroy (combo_box->priv->tree_view);
|
||||
@@ -2280,7 +2313,7 @@ gtk_combo_box_list_button_pressed (GtkWidget *widget,
|
||||
if (ewidget == combo_box->priv->tree_view)
|
||||
return TRUE;
|
||||
|
||||
if ((ewidget != combo_box->priv->button) ||
|
||||
if ((ewidget != combo_box->priv->button && ewidget != combo_box->priv->box) ||
|
||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (combo_box->priv->button)))
|
||||
return FALSE;
|
||||
|
||||
@@ -3035,7 +3068,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
|
||||
/**
|
||||
* gtk_combo_box_set_active:
|
||||
* @combo_box: A #GtkComboBox.
|
||||
* @index: An index in the model passed during construction, or -1 to have
|
||||
* @index_: An index in the model passed during construction, or -1 to have
|
||||
* no active item.
|
||||
*
|
||||
* Sets the active item of @combo_box to be the item at @index.
|
||||
@@ -3044,16 +3077,16 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
|
||||
*/
|
||||
void
|
||||
gtk_combo_box_set_active (GtkComboBox *combo_box,
|
||||
gint index)
|
||||
gint index_)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
/* -1 means "no item selected" */
|
||||
g_return_if_fail (index >= -1);
|
||||
g_return_if_fail (index_ >= -1);
|
||||
|
||||
if (combo_box->priv->active_item == index)
|
||||
if (combo_box->priv->active_item == index_)
|
||||
return;
|
||||
|
||||
gtk_combo_box_set_active_internal (combo_box, index);
|
||||
gtk_combo_box_set_active_internal (combo_box, index_);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ void gtk_combo_box_set_column_span_column (GtkComboBox *combo_box,
|
||||
/* get/set active item */
|
||||
gint gtk_combo_box_get_active (GtkComboBox *combo_box);
|
||||
void gtk_combo_box_set_active (GtkComboBox *combo_box,
|
||||
gint index);
|
||||
gint index_);
|
||||
gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
|
||||
GtkTreeIter *iter);
|
||||
void gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
|
||||
|
||||
+12
-1
@@ -3418,6 +3418,14 @@ paste_received (GtkClipboard *clipboard,
|
||||
if (text)
|
||||
{
|
||||
gint pos, start, end;
|
||||
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
|
||||
|
||||
if (completion)
|
||||
{
|
||||
g_signal_handler_block (entry, completion->priv->changed_id);
|
||||
if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
|
||||
_gtk_entry_completion_popdown (completion);
|
||||
}
|
||||
|
||||
if (gtk_editable_get_selection_bounds (editable, &start, &end))
|
||||
gtk_editable_delete_text (editable, start, end);
|
||||
@@ -3425,6 +3433,9 @@ paste_received (GtkClipboard *clipboard,
|
||||
pos = entry->current_pos;
|
||||
gtk_editable_insert_text (editable, text, -1, &pos);
|
||||
gtk_editable_set_position (editable, pos);
|
||||
|
||||
if (completion)
|
||||
g_signal_handler_unblock (entry, completion->priv->changed_id);
|
||||
}
|
||||
|
||||
g_object_unref (entry);
|
||||
@@ -4632,7 +4643,7 @@ gtk_entry_completion_timeout (gpointer data)
|
||||
|
||||
completion->priv->completion_timeout = 0;
|
||||
|
||||
if (strlen (gtk_entry_get_text (GTK_ENTRY (completion->priv->entry)))
|
||||
if (g_utf8_strlen (gtk_entry_get_text (GTK_ENTRY (completion->priv->entry)), -1)
|
||||
>= completion->priv->minimum_key_length)
|
||||
{
|
||||
gint matches;
|
||||
|
||||
+26
-23
@@ -34,6 +34,7 @@
|
||||
#include "gtkmain.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtktreeprivate.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -271,6 +272,7 @@ gtk_entry_completion_init (GtkEntryCompletion *completion)
|
||||
G_CALLBACK (gtk_entry_completion_list_button_press),
|
||||
completion);
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->tree_view), FALSE);
|
||||
_gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (priv->tree_view), TRUE);
|
||||
|
||||
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree_view));
|
||||
gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE);
|
||||
@@ -302,6 +304,7 @@ gtk_entry_completion_init (GtkEntryCompletion *completion)
|
||||
G_CALLBACK (gtk_entry_completion_action_button_press),
|
||||
completion);
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->action_view), FALSE);
|
||||
_gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (priv->action_view), TRUE);
|
||||
|
||||
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->action_view));
|
||||
gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE);
|
||||
@@ -960,10 +963,10 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
|
||||
/**
|
||||
* gtk_entry_completion_insert_action_text:
|
||||
* @completion: A #GtkEntryCompletion.
|
||||
* @index: The index of the item to insert.
|
||||
* @index_: The index of the item to insert.
|
||||
* @text: Text of the item to insert.
|
||||
*
|
||||
* Inserts an action in @completion's action item list at position @index
|
||||
* Inserts an action in @completion's action item list at position @index_
|
||||
* with text @text. If you want the action item to have markup, use
|
||||
* gtk_entry_completion_insert_action_markup().
|
||||
*
|
||||
@@ -971,57 +974,57 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
|
||||
*/
|
||||
void
|
||||
gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
|
||||
gint index,
|
||||
gint index_,
|
||||
const gchar *text)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
|
||||
g_return_if_fail (text != NULL);
|
||||
|
||||
gtk_entry_completion_insert_action (completion, index, text, FALSE);
|
||||
gtk_entry_completion_insert_action (completion, index_, text, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_entry_completion_insert_action_markup:
|
||||
* @completion: A #GtkEntryCompletion.
|
||||
* @index: The index of the item to insert.
|
||||
* @index_: The index of the item to insert.
|
||||
* @markup: Markup of the item to insert.
|
||||
*
|
||||
* Inserts an action in @completion's action item list at position @index
|
||||
* Inserts an action in @completion's action item list at position @index_
|
||||
* with markup @markup.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
void
|
||||
gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
|
||||
gint index,
|
||||
gint index_,
|
||||
const gchar *markup)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
|
||||
g_return_if_fail (markup != NULL);
|
||||
|
||||
gtk_entry_completion_insert_action (completion, index, markup, TRUE);
|
||||
gtk_entry_completion_insert_action (completion, index_, markup, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_entry_completion_delete_action:
|
||||
* @completion: A #GtkEntryCompletion.
|
||||
* @index: The index of the item to Delete.
|
||||
* @index_: The index of the item to Delete.
|
||||
*
|
||||
* Deletes the action at @index from @completion's action list.
|
||||
* Deletes the action at @index_ from @completion's action list.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
void
|
||||
gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
|
||||
gint index)
|
||||
gint index_)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
|
||||
g_return_if_fail (index >= 0);
|
||||
g_return_if_fail (index_ >= 0);
|
||||
|
||||
gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (completion->priv->actions),
|
||||
&iter, NULL, index);
|
||||
&iter, NULL, index_);
|
||||
gtk_list_store_remove (completion->priv->actions, &iter);
|
||||
}
|
||||
|
||||
@@ -1105,7 +1108,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
GtkRequisition popup_req;
|
||||
GtkTreePath *path;
|
||||
gboolean above;
|
||||
|
||||
gint width;
|
||||
|
||||
gdk_window_get_origin (completion->priv->entry->window, &x, &y);
|
||||
get_borders (GTK_ENTRY (completion->priv->entry), &x_border, &y_border);
|
||||
|
||||
@@ -1124,9 +1128,14 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
else
|
||||
gtk_widget_show (completion->priv->scrolled_window);
|
||||
|
||||
screen = gtk_widget_get_screen (GTK_WIDGET (completion->priv->entry));
|
||||
monitor_num = gdk_screen_get_monitor_at_window (screen,
|
||||
GTK_WIDGET (completion->priv->entry)->window);
|
||||
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
|
||||
|
||||
width = MIN (completion->priv->entry->allocation.width, monitor.width);
|
||||
gtk_widget_set_size_request (completion->priv->tree_view,
|
||||
completion->priv->entry->allocation.width - 2 * x_border,
|
||||
items * height);
|
||||
width - 2 * x_border, items * height);
|
||||
|
||||
/* default on no match */
|
||||
completion->priv->current_selected = -1;
|
||||
@@ -1142,18 +1151,12 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
&height);
|
||||
|
||||
gtk_widget_set_size_request (completion->priv->action_view,
|
||||
completion->priv->entry->allocation.width - 2 * x_border,
|
||||
items * height);
|
||||
width - 2 * x_border, items * height);
|
||||
}
|
||||
else
|
||||
gtk_widget_hide (completion->priv->action_view);
|
||||
|
||||
gtk_widget_size_request (completion->priv->popup_window, &popup_req);
|
||||
|
||||
screen = gtk_widget_get_screen (GTK_WIDGET (completion->priv->entry));
|
||||
monitor_num = gdk_screen_get_monitor_at_window (screen,
|
||||
GTK_WIDGET (completion->priv->entry)->window);
|
||||
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
|
||||
|
||||
if (x < monitor.x)
|
||||
x = monitor.x;
|
||||
|
||||
@@ -62,7 +62,7 @@ struct _GtkEntryCompletionClass
|
||||
GtkTreeModel *model,
|
||||
GtkTreeIter *iter);
|
||||
void (* action_activated) (GtkEntryCompletion *completion,
|
||||
gint index);
|
||||
gint index_);
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_reserved0) (void);
|
||||
@@ -91,13 +91,13 @@ gint gtk_entry_completion_get_minimum_key_length (GtkEntryComplet
|
||||
void gtk_entry_completion_complete (GtkEntryCompletion *completion);
|
||||
|
||||
void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
|
||||
gint index,
|
||||
gint index_,
|
||||
const gchar *text);
|
||||
void gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
|
||||
gint index,
|
||||
gint index_,
|
||||
const gchar *markup);
|
||||
void gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
|
||||
gint index);
|
||||
gint index_);
|
||||
|
||||
/* convenience */
|
||||
void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion,
|
||||
|
||||
+9
-2
@@ -614,9 +614,16 @@ gtk_expander_size_allocate (GtkWidget *widget,
|
||||
|
||||
ltr = gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL;
|
||||
|
||||
label_allocation.x = widget->allocation.x + border_width + focus_width + focus_pad;
|
||||
if (ltr)
|
||||
label_allocation.x += expander_size + 2 * expander_spacing;
|
||||
label_allocation.x = (widget->allocation.x +
|
||||
border_width + focus_width + focus_pad +
|
||||
expander_size + 2 * expander_spacing);
|
||||
else
|
||||
label_allocation.x = (widget->allocation.x + widget->allocation.width -
|
||||
(label_requisition.width +
|
||||
border_width + focus_width + focus_pad +
|
||||
expander_size + 2 * expander_spacing));
|
||||
|
||||
label_allocation.y = widget->allocation.y + border_width + focus_width + focus_pad;
|
||||
|
||||
label_allocation.width = MIN (label_requisition.width,
|
||||
|
||||
+11
-11
@@ -1504,16 +1504,14 @@ renderer_edited_cb (GtkCellRendererText *cell_renderer_text,
|
||||
}
|
||||
|
||||
error = NULL;
|
||||
if (!gtk_file_system_create_folder (impl->file_system, file_path, &error))
|
||||
{
|
||||
error_dialog (impl,
|
||||
_("Could not create folder %s:\n%s"),
|
||||
file_path, error);
|
||||
}
|
||||
if (gtk_file_system_create_folder (impl->file_system, file_path, &error))
|
||||
change_folder_and_display_error (impl, file_path);
|
||||
else
|
||||
error_dialog (impl,
|
||||
_("Could not create folder %s:\n%s"),
|
||||
file_path, error);
|
||||
|
||||
gtk_file_path_free (file_path);
|
||||
|
||||
/* FIXME: scroll to the new folder and select it */
|
||||
}
|
||||
|
||||
/* Callback used from the text cell renderer when the new folder edition gets
|
||||
@@ -2608,10 +2606,12 @@ trap_activate_cb (GtkWidget *widget,
|
||||
&& widget != window->default_widget
|
||||
&& !(widget == window->focus_widget &&
|
||||
(!window->default_widget || !GTK_WIDGET_SENSITIVE (window->default_widget))))
|
||||
gtk_window_activate_default (window);
|
||||
|
||||
return TRUE;
|
||||
{
|
||||
gtk_window_activate_default (window);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -378,7 +378,7 @@ gtk_file_filter_filter (GtkFileFilter *filter,
|
||||
break;
|
||||
case FILTER_RULE_PATTERN:
|
||||
if (filter_info->display_name != NULL &&
|
||||
_gtk_fnmatch (rule->u.pattern, filter_info->display_name))
|
||||
_gtk_fnmatch (rule->u.pattern, filter_info->display_name, FALSE))
|
||||
return TRUE;
|
||||
break;
|
||||
case FILTER_RULE_CUSTOM:
|
||||
|
||||
+3
-3
@@ -3694,7 +3694,7 @@ find_completion_dir (gchar *text_to_complete,
|
||||
for (i = 0; i < dir->sent->entry_count; i += 1)
|
||||
{
|
||||
if (dir->sent->entries[i].is_dir &&
|
||||
_gtk_fnmatch (pat_buf, dir->sent->entries[i].entry_name))
|
||||
_gtk_fnmatch (pat_buf, dir->sent->entries[i].entry_name, TRUE))
|
||||
{
|
||||
if (found)
|
||||
{
|
||||
@@ -3844,7 +3844,7 @@ attempt_file_completion (CompletionState *cmpl_state)
|
||||
{
|
||||
if (dir->sent->entries[dir->cmpl_index].is_dir)
|
||||
{
|
||||
if (_gtk_fnmatch (pat_buf, dir->sent->entries[dir->cmpl_index].entry_name))
|
||||
if (_gtk_fnmatch (pat_buf, dir->sent->entries[dir->cmpl_index].entry_name, TRUE))
|
||||
{
|
||||
CompletionDir* new_dir;
|
||||
|
||||
@@ -3892,7 +3892,7 @@ attempt_file_completion (CompletionState *cmpl_state)
|
||||
append_completion_text (dir->sent->entries[dir->cmpl_index].entry_name, cmpl_state);
|
||||
|
||||
cmpl_state->the_completion.is_a_completion =
|
||||
_gtk_fnmatch (pat_buf, dir->sent->entries[dir->cmpl_index].entry_name);
|
||||
_gtk_fnmatch (pat_buf, dir->sent->entries[dir->cmpl_index].entry_name, TRUE);
|
||||
|
||||
cmpl_state->the_completion.is_directory = dir->sent->entries[dir->cmpl_index].is_dir;
|
||||
if (dir->sent->entries[dir->cmpl_index].is_dir)
|
||||
|
||||
@@ -1777,7 +1777,7 @@ do_files_removed (GtkFileSystemModel *model,
|
||||
if (children->is_visible)
|
||||
n_visible--;
|
||||
|
||||
if (n_visible == 0)
|
||||
if (parent_node && n_visible == 0)
|
||||
{
|
||||
FileModelNode *dummy = file_model_node_new (model, NULL);
|
||||
dummy->is_visible = TRUE;
|
||||
|
||||
+66
-27
@@ -1,6 +1,7 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* gtkfilesystemwin32.c: Default implementation of GtkFileSystem for Windows
|
||||
* Copyright (C) 2003, Red Hat, Inc.
|
||||
* Copyright (C) 2004, Hans Breuer
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -933,53 +934,91 @@ extract_icon (const char* filename)
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
WORD iicon;
|
||||
HICON hicon;
|
||||
char filename_copy[MAX_PATH];
|
||||
|
||||
if (!filename || !filename[0])
|
||||
return NULL;
|
||||
|
||||
hicon = ExtractAssociatedIcon (GetModuleHandle (NULL), filename, &iicon);
|
||||
/* the ugly ExtractAssociatedIcon modifies filename in place - at least on win98 */
|
||||
strcpy(filename_copy, filename);
|
||||
hicon = ExtractAssociatedIcon (GetModuleHandle (NULL), filename_copy, &iicon);
|
||||
if (hicon > (HICON)1)
|
||||
{
|
||||
ICONINFO ii;
|
||||
|
||||
if (GetIconInfo (hicon, &ii))
|
||||
{
|
||||
SIZE size;
|
||||
GdkPixmap *pixmap;
|
||||
GdkGC *gc;
|
||||
HDC hdc;
|
||||
struct
|
||||
{
|
||||
BITMAPINFOHEADER bi;
|
||||
RGBQUAD colors[2];
|
||||
} bmi;
|
||||
HDC hdc;
|
||||
|
||||
if (!GetBitmapDimensionEx (ii.hbmColor, &size))
|
||||
g_warning ("GetBitmapDimensionEx failed.");
|
||||
memset (&bmi, 0, sizeof (bmi));
|
||||
bmi.bi.biSize = sizeof (bmi.bi);
|
||||
hdc = CreateCompatibleDC (NULL);
|
||||
|
||||
if (size.cx < 1) size.cx = 32;
|
||||
if (size.cy < 1) size.cy = 32;
|
||||
|
||||
pixmap = gdk_pixmap_new (NULL, size.cx, size.cy,
|
||||
gdk_screen_get_system_visual (gdk_screen_get_default ())->depth);
|
||||
gc = gdk_gc_new (pixmap);
|
||||
hdc = gdk_win32_hdc_get (GDK_DRAWABLE (pixmap), gc, 0);
|
||||
if (GetDIBits (hdc, ii.hbmColor, 0, 1, NULL, (BITMAPINFO *)&bmi, DIB_RGB_COLORS))
|
||||
{
|
||||
gchar *pixels, *bits;
|
||||
gint rowstride, x, y, w = bmi.bi.biWidth, h = bmi.bi.biHeight;
|
||||
|
||||
if (!DrawIcon (hdc, 0, 0, hicon))
|
||||
g_warning ("DrawIcon failed");
|
||||
bmi.bi.biBitCount = 24;
|
||||
bmi.bi.biCompression = BI_RGB;
|
||||
bmi.bi.biHeight = -h;
|
||||
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h);
|
||||
bits = g_malloc (4 * w * h);
|
||||
|
||||
gdk_win32_hdc_release (GDK_DRAWABLE (pixmap), gc, 0);
|
||||
/* color data */
|
||||
if (!GetDIBits (hdc, ii.hbmColor, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS))
|
||||
g_warning(G_STRLOC ": Failed to get dibits");
|
||||
|
||||
pixbuf = gdk_pixbuf_get_from_drawable (
|
||||
NULL, pixmap,
|
||||
gdk_screen_get_system_colormap (gdk_screen_get_default ()),
|
||||
0, 0, 0, 0, size.cx, size.cy);
|
||||
g_object_unref (pixmap);
|
||||
g_object_unref (gc);
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
pixels[2] = bits[(x+y*w) * 3];
|
||||
pixels[1] = bits[(x+y*w) * 3 + 1];
|
||||
pixels[0] = bits[(x+y*w) * 3 + 2];
|
||||
pixels += 4;
|
||||
}
|
||||
pixels += (w * 4 - rowstride);
|
||||
}
|
||||
/* transparency */
|
||||
if (!GetDIBits (hdc, ii.hbmMask, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS))
|
||||
g_warning(G_STRLOC ": Failed to get dibits");
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
pixels[3] = 255 - bits[(x + y * w) * 3];
|
||||
pixels += 4;
|
||||
}
|
||||
pixels += (w * 4 - rowstride);
|
||||
}
|
||||
|
||||
/* release temporary resources */
|
||||
g_free (bits);
|
||||
if (!DeleteObject (ii.hbmColor) || !DeleteObject (ii.hbmMask))
|
||||
g_warning(G_STRLOC ": Leaking Icon Bitmaps ?");
|
||||
}
|
||||
else
|
||||
g_warning(G_STRLOC ": GetDIBits () failed, %s", g_win32_error_message (GetLastError ()));
|
||||
|
||||
DeleteDC (hdc);
|
||||
}
|
||||
else
|
||||
g_print ("GetIconInfo failed: %s\n", g_win32_error_message (GetLastError ()));
|
||||
g_warning(G_STRLOC ": GetIconInfo failed: %s\n", g_win32_error_message (GetLastError ()));
|
||||
|
||||
if (!DestroyIcon (hicon))
|
||||
g_warning ("DestroyIcon failed");
|
||||
g_warning(G_STRLOC ": DestroyIcon failed");
|
||||
}
|
||||
else
|
||||
g_print ("ExtractAssociatedIcon failed: %s\n", g_win32_error_message (GetLastError ()));
|
||||
g_print ("ExtractAssociatedIcon(%s) failed: %s\n", filename, g_win32_error_message (GetLastError ()));
|
||||
|
||||
return pixbuf;
|
||||
}
|
||||
@@ -1048,7 +1087,7 @@ gtk_file_system_win32_render_icon (GtkFileSystem *file_system,
|
||||
case DRIVE_CDROM :
|
||||
icon_set = gtk_style_lookup_icon_set (widget->style, GTK_STOCK_CDROM);
|
||||
break;
|
||||
case DRIVE_FIXED : /* need a hard disk icon */
|
||||
case DRIVE_FIXED :
|
||||
icon_set = gtk_style_lookup_icon_set (widget->style, GTK_STOCK_HARDDISK);
|
||||
break;
|
||||
default :
|
||||
|
||||
+43
-2
@@ -279,6 +279,28 @@ static void gtk_font_selection_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
/* Handles key press events on the lists, so that we can trap Enter to
|
||||
* activate the default button on our own.
|
||||
*/
|
||||
static gboolean
|
||||
list_row_activated (GtkWidget *widget)
|
||||
{
|
||||
GtkWindow *window;
|
||||
|
||||
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (widget)));
|
||||
if (!GTK_WIDGET_TOPLEVEL (window))
|
||||
window = NULL;
|
||||
|
||||
if (window
|
||||
&& widget != window->default_widget
|
||||
&& !(widget == window->focus_widget &&
|
||||
(!window->default_widget || !GTK_WIDGET_SENSITIVE (window->default_widget))))
|
||||
{
|
||||
gtk_window_activate_default (window);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_selection_init (GtkFontSelection *fontsel)
|
||||
@@ -359,6 +381,9 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
|
||||
fontsel->family_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
g_object_unref (model);
|
||||
|
||||
g_signal_connect (fontsel->family_list, "row-activated",
|
||||
G_CALLBACK (list_row_activated), fontsel);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Family",
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", FAMILY_NAME_COLUMN,
|
||||
@@ -392,6 +417,8 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
|
||||
G_TYPE_STRING); /* FACE_NAME_COLUMN */
|
||||
fontsel->face_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
g_object_unref (model);
|
||||
g_signal_connect (fontsel->face_list, "row-activated",
|
||||
G_CALLBACK (list_row_activated), fontsel);
|
||||
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (style_label), fontsel->face_list);
|
||||
|
||||
@@ -425,6 +452,8 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
|
||||
model = gtk_list_store_new (1, G_TYPE_INT);
|
||||
fontsel->size_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
g_object_unref (model);
|
||||
g_signal_connect (fontsel->size_list, "row-activated",
|
||||
G_CALLBACK (list_row_activated), fontsel);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Size",
|
||||
gtk_cell_renderer_text_new (),
|
||||
@@ -958,7 +987,10 @@ gtk_font_selection_size_activate (GtkWidget *w,
|
||||
text = gtk_entry_get_text (GTK_ENTRY (fontsel->size_entry));
|
||||
new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
|
||||
|
||||
gtk_font_selection_set_size (fontsel, new_size);
|
||||
if (fontsel->size != new_size)
|
||||
gtk_font_selection_set_size (fontsel, new_size);
|
||||
else
|
||||
list_row_activated (w);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -966,7 +998,16 @@ gtk_font_selection_size_focus_out (GtkWidget *w,
|
||||
GdkEventFocus *event,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_font_selection_size_activate (w, data);
|
||||
GtkFontSelection *fontsel;
|
||||
gint new_size;
|
||||
const gchar *text;
|
||||
|
||||
fontsel = GTK_FONT_SELECTION (data);
|
||||
|
||||
text = gtk_entry_get_text (GTK_ENTRY (fontsel->size_entry));
|
||||
new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
|
||||
|
||||
gtk_font_selection_set_size (fontsel, new_size);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+1
-4
@@ -164,13 +164,10 @@ gtk_hruler_draw_ticks (GtkRuler *ruler)
|
||||
xthickness = widget->style->xthickness;
|
||||
ythickness = widget->style->ythickness;
|
||||
|
||||
digit_height = PANGO_PIXELS (ink_rect.height) + 2;
|
||||
digit_offset = ink_rect.y;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, "012456789");
|
||||
pango_layout_get_extents (layout, &ink_rect, &logical_rect);
|
||||
|
||||
digit_height = PANGO_PIXELS (ink_rect.height) + 1;
|
||||
digit_height = PANGO_PIXELS (ink_rect.height) + 2;
|
||||
digit_offset = ink_rect.y;
|
||||
|
||||
width = widget->allocation.width;
|
||||
|
||||
@@ -2091,7 +2091,8 @@ icon_source_clear (GtkIconSource *source)
|
||||
case GTK_ICON_SOURCE_FILENAME:
|
||||
g_free (source->source.filename);
|
||||
source->source.filename = NULL;
|
||||
g_free (source->filename_pixbuf);
|
||||
if (source->filename_pixbuf)
|
||||
g_object_unref (source->filename_pixbuf);
|
||||
source->filename_pixbuf = NULL;
|
||||
break;
|
||||
case GTK_ICON_SOURCE_PIXBUF:
|
||||
@@ -2613,6 +2614,7 @@ add_to_cache (GtkIconSet *icon_set,
|
||||
|
||||
icon = g_new (CachedIcon, 1);
|
||||
icon_set->cache = g_slist_prepend (icon_set->cache, icon);
|
||||
icon_set->cache_size++;
|
||||
|
||||
icon->style = style;
|
||||
icon->direction = direction;
|
||||
|
||||
+1
-1
@@ -1935,7 +1935,7 @@ theme_subdir_load (GtkIconTheme *icon_theme,
|
||||
|
||||
scan_directory (icon_theme->priv, dir, full_dir);
|
||||
|
||||
theme->dirs = g_list_append (theme->dirs, dir);
|
||||
theme->dirs = g_list_prepend (theme->dirs, dir);
|
||||
}
|
||||
else
|
||||
g_free (full_dir);
|
||||
|
||||
-2484
File diff suppressed because it is too large
Load Diff
@@ -1,151 +0,0 @@
|
||||
/* eggiconlist.h
|
||||
* Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __EGG_ICON_LIST_H__
|
||||
#define __EGG_ICON_LIST_H__
|
||||
|
||||
#include <gtk/gtkcontainer.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EGG_TYPE_ICON_LIST (egg_icon_list_get_type ())
|
||||
#define EGG_ICON_LIST(obj) (GTK_CHECK_CAST ((obj), EGG_TYPE_ICON_LIST, EggIconList))
|
||||
#define EGG_ICON_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EGG_TYPE_ICON_LIST, EggIconListClass))
|
||||
#define EGG_IS_ICON_LIST(obj) (GTK_CHECK_TYPE ((obj), EGG_TYPE_ICON_LIST))
|
||||
#define EGG_IS_ICON_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), EGG_TYPE_ICON_LIST))
|
||||
#define EGG_ICON_LIST_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), EGG_TYPE_ICON_LIST, EggIconListClass))
|
||||
|
||||
#define EGG_TYPE_ICON_LIST_ITEM (egg_icon_list_item_get_type ())
|
||||
|
||||
typedef struct _EggIconList EggIconList;
|
||||
typedef struct _EggIconListClass EggIconListClass;
|
||||
typedef struct _EggIconListPrivate EggIconListPrivate;
|
||||
typedef struct _EggIconListItem EggIconListItem;
|
||||
|
||||
typedef void (* EggIconListForeachFunc) (EggIconList *icon_list,
|
||||
EggIconListItem *item,
|
||||
gpointer data);
|
||||
typedef gint (* EggIconListItemCompareFunc) (EggIconList *icon_list,
|
||||
EggIconListItem *a,
|
||||
EggIconListItem *b,
|
||||
gpointer user_data);
|
||||
|
||||
struct _EggIconList
|
||||
{
|
||||
GtkContainer parent;
|
||||
|
||||
EggIconListPrivate *priv;
|
||||
};
|
||||
|
||||
struct _EggIconListClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
|
||||
void (* set_scroll_adjustments) (EggIconList *icon_list,
|
||||
GtkAdjustment *hadjustment,
|
||||
GtkAdjustment *vadjustment);
|
||||
|
||||
void (* item_activated) (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void (* selection_changed) (EggIconList *icon_list);
|
||||
void (* item_added) (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void (* item_removed) (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void (* item_changed) (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
/* Key binding signals */
|
||||
void (* select_all) (EggIconList *icon_list);
|
||||
void (* unselect_all) (EggIconList *icon_list);
|
||||
void (* select_cursor_item) (EggIconList *icon_list);
|
||||
void (* toggle_cursor_item) (EggIconList *icon_list);
|
||||
};
|
||||
|
||||
GType egg_icon_list_get_type (void);
|
||||
GType egg_icon_list_item_get_type (void);
|
||||
GtkWidget *egg_icon_list_new (void);
|
||||
|
||||
EggIconListItem * egg_icon_list_item_new (GdkPixbuf *icon,
|
||||
const gchar *label);
|
||||
void egg_icon_list_item_ref (EggIconListItem *item);
|
||||
void egg_icon_list_item_unref (EggIconListItem *item);
|
||||
void egg_icon_list_item_set_data (EggIconListItem *item,
|
||||
gpointer data);
|
||||
void egg_icon_list_item_set_data_full (EggIconListItem *item,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_notify);
|
||||
gpointer egg_icon_list_item_get_data (EggIconListItem *item);
|
||||
void egg_icon_list_item_set_label (EggIconListItem *item,
|
||||
const char *label);
|
||||
G_CONST_RETURN gchar *egg_icon_list_item_get_label (EggIconListItem *item);
|
||||
void egg_icon_list_item_set_icon (EggIconListItem *item,
|
||||
GdkPixbuf *icon);
|
||||
GdkPixbuf * egg_icon_list_item_get_icon (EggIconListItem *item);
|
||||
void egg_icon_list_append_item (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void egg_icon_list_prepend_item (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void egg_icon_list_insert_item_before (EggIconList *icon_list,
|
||||
EggIconListItem *sibling,
|
||||
EggIconListItem *item);
|
||||
void egg_icon_list_insert_item_after (EggIconList *icon_list,
|
||||
EggIconListItem *sibling,
|
||||
EggIconListItem *item);
|
||||
void egg_icon_list_remove_item (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void egg_icon_list_clear (EggIconList *icon_list);
|
||||
EggIconListItem * egg_icon_list_get_item_at_pos (EggIconList *icon_list,
|
||||
gint x,
|
||||
gint y);
|
||||
gint egg_icon_list_get_item_count (EggIconList *icon_list);
|
||||
void egg_icon_list_foreach (EggIconList *icon_list,
|
||||
EggIconListForeachFunc func,
|
||||
gpointer data);
|
||||
GList * egg_icon_list_get_selected (EggIconList *icon_list);
|
||||
void egg_icon_list_selected_foreach (EggIconList *icon_list,
|
||||
EggIconListForeachFunc func,
|
||||
gpointer data);
|
||||
void egg_icon_list_set_selection_mode (EggIconList *icon_list,
|
||||
GtkSelectionMode mode);
|
||||
GtkSelectionMode egg_icon_list_get_selection_mode (EggIconList *icon_list);
|
||||
void egg_icon_list_select_item (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
void egg_icon_list_unselect_item (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
gboolean egg_icon_list_item_is_selected (EggIconListItem *item);
|
||||
void egg_icon_list_select_all (EggIconList *icon_list);
|
||||
void egg_icon_list_unselect_all (EggIconList *icon_list);
|
||||
void egg_icon_list_set_sorted (EggIconList *icon_list,
|
||||
gboolean sorted);
|
||||
gboolean egg_icon_list_get_sorted (EggIconList *icon_list);
|
||||
void egg_icon_list_set_sort_func (EggIconList *icon_list,
|
||||
EggIconListItemCompareFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_notify);
|
||||
void egg_icon_list_set_sort_order (EggIconList *icon_list,
|
||||
GtkSortType order);
|
||||
GtkSortType egg_icon_list_get_sort_order (EggIconList *icon_list);
|
||||
void egg_icon_list_item_activated (EggIconList *icon_list,
|
||||
EggIconListItem *item);
|
||||
|
||||
/* For accessibility */
|
||||
GList *egg_icon_list_get_items (EggIconList *icon_list);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __EGG_ICON_LIST_H__ */
|
||||
+1
-1
@@ -402,7 +402,7 @@ gtk_image_get_property (GObject *object,
|
||||
* @mask: a #GdkBitmap, or %NULL
|
||||
*
|
||||
* Creates a #GtkImage widget displaying @pixmap with a @mask.
|
||||
* A #GdkImage is a server-side image buffer in the pixel format of the
|
||||
* A #GdkPixmap is a server-side image buffer in the pixel format of the
|
||||
* current display. The #GtkImage does not assume a reference to the
|
||||
* pixmap or mask; you still need to unref them if you own references.
|
||||
* #GtkImage will add its own reference rather than adopting yours.
|
||||
|
||||
+18
-13
@@ -220,16 +220,19 @@ gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item,
|
||||
|
||||
if (image_menu_item->image && show_image (image_menu_item))
|
||||
{
|
||||
guint image_width = image_menu_item->image->requisition.width;
|
||||
GtkRequisition image_requisition;
|
||||
|
||||
if (image_width > 0)
|
||||
gtk_widget_get_child_requisition (image_menu_item->image,
|
||||
&image_requisition);
|
||||
|
||||
if (image_requisition.width > 0)
|
||||
{
|
||||
guint toggle_spacing;
|
||||
gtk_widget_style_get (GTK_WIDGET (menu_item),
|
||||
"toggle_spacing", &toggle_spacing,
|
||||
NULL);
|
||||
|
||||
*requisition = image_width + toggle_spacing;
|
||||
|
||||
*requisition = image_requisition.width + toggle_spacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,7 +284,8 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (image_menu_item->image && show_image (image_menu_item))
|
||||
{
|
||||
gint width, height, x, y, offset;
|
||||
gint x, y, offset;
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
guint horizontal_padding, toggle_spacing;
|
||||
|
||||
@@ -293,9 +297,10 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget,
|
||||
/* Man this is lame hardcoding action, but I can't
|
||||
* come up with a solution that's really better.
|
||||
*/
|
||||
|
||||
width = image_menu_item->image->requisition.width;
|
||||
height = image_menu_item->image->requisition.height;
|
||||
|
||||
gtk_widget_get_child_requisition (image_menu_item->image,
|
||||
&child_requisition);
|
||||
|
||||
offset = GTK_CONTAINER (image_menu_item)->border_width +
|
||||
widget->style->xthickness;
|
||||
|
||||
@@ -303,20 +308,20 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
x = offset + horizontal_padding +
|
||||
(GTK_MENU_ITEM (image_menu_item)->toggle_size -
|
||||
toggle_spacing - width) / 2;
|
||||
toggle_spacing - child_requisition.width) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = widget->allocation.width - offset - horizontal_padding -
|
||||
GTK_MENU_ITEM (image_menu_item)->toggle_size + toggle_spacing +
|
||||
(GTK_MENU_ITEM (image_menu_item)->toggle_size -
|
||||
toggle_spacing - width) / 2;
|
||||
toggle_spacing - child_requisition.width) / 2;
|
||||
}
|
||||
|
||||
y = (widget->allocation.height - height) / 2;
|
||||
y = (widget->allocation.height - child_requisition.height) / 2;
|
||||
|
||||
child_allocation.width = width;
|
||||
child_allocation.height = height;
|
||||
child_allocation.width = child_requisition.width;
|
||||
child_allocation.height = child_requisition.height;
|
||||
child_allocation.x = widget->allocation.x + MAX (x, 0);
|
||||
child_allocation.y = widget->allocation.y + MAX (y, 0);
|
||||
|
||||
|
||||
+1
-1
@@ -1420,7 +1420,7 @@ gtk_label_ensure_layout (GtkLabel *label)
|
||||
|
||||
widget = GTK_WIDGET (label);
|
||||
|
||||
rtl = gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL;
|
||||
rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
||||
rwidth = label->misc.xpad * 2;
|
||||
rheight = label->misc.ypad * 2;
|
||||
|
||||
|
||||
+2
-2
@@ -1682,8 +1682,8 @@ gtk_grab_notify_foreach (GtkWidget *child,
|
||||
if (was_grabbed != is_grabbed)
|
||||
{
|
||||
g_object_ref (child);
|
||||
|
||||
g_signal_emit_by_name (child, "grab_notify", was_grabbed);
|
||||
|
||||
_gtk_widget_grab_notify (child, was_grabbed);
|
||||
|
||||
if (GTK_IS_CONTAINER (child))
|
||||
gtk_container_foreach (GTK_CONTAINER (child), gtk_grab_notify_foreach, info);
|
||||
|
||||
+47
-5
@@ -74,6 +74,8 @@ struct _GtkMenuAttachData
|
||||
|
||||
struct _GtkMenuPrivate
|
||||
{
|
||||
gboolean seen_enter;
|
||||
gboolean seen_motion;
|
||||
gboolean have_position;
|
||||
gint x;
|
||||
gint y;
|
||||
@@ -1231,6 +1233,7 @@ gtk_menu_popup (GtkMenu *menu,
|
||||
GtkWidget *parent;
|
||||
GdkEvent *current_event;
|
||||
GtkMenuShell *menu_shell;
|
||||
GtkMenuPrivate *priv = gtk_menu_get_private (menu);
|
||||
|
||||
g_return_if_fail (GTK_IS_MENU (menu));
|
||||
|
||||
@@ -1238,6 +1241,9 @@ gtk_menu_popup (GtkMenu *menu,
|
||||
menu_shell = GTK_MENU_SHELL (menu);
|
||||
|
||||
menu_shell->parent_menu_shell = parent_menu_shell;
|
||||
|
||||
priv->seen_enter = FALSE;
|
||||
priv->seen_motion = FALSE;
|
||||
|
||||
/* Find the last viewable ancestor, and make an X grab on it
|
||||
*/
|
||||
@@ -1722,6 +1728,13 @@ gtk_menu_get_toplevel (GtkWidget *menu)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
tearoff_window_destroyed (GtkWidget *widget,
|
||||
GtkMenu *menu)
|
||||
{
|
||||
gtk_menu_set_tearoff_state (menu, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_set_tearoff_state (GtkMenu *menu,
|
||||
gboolean torn_off)
|
||||
@@ -1755,7 +1768,7 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
|
||||
GDK_WINDOW_TYPE_HINT_MENU);
|
||||
gtk_window_set_mnemonic_modifier (GTK_WINDOW (menu->tearoff_window), 0);
|
||||
g_signal_connect (menu->tearoff_window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &menu->tearoff_window);
|
||||
G_CALLBACK (tearoff_window_destroyed), menu);
|
||||
g_signal_connect (menu->tearoff_window, "event",
|
||||
G_CALLBACK (gtk_menu_window_event), menu);
|
||||
|
||||
@@ -2511,9 +2524,13 @@ get_accel_path (GtkWidget *menu_item,
|
||||
g_object_get (label,
|
||||
"accel_closure", &accel_closure,
|
||||
NULL);
|
||||
accel_group = gtk_accel_group_from_accel_closure (accel_closure);
|
||||
|
||||
*locked = accel_group->lock_count > 0;
|
||||
|
||||
if (accel_closure)
|
||||
{
|
||||
accel_group = gtk_accel_group_from_accel_closure (accel_closure);
|
||||
|
||||
*locked = accel_group->lock_count > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2668,7 +2685,21 @@ gtk_menu_motion_notify (GtkWidget *widget,
|
||||
gboolean need_enter;
|
||||
|
||||
if (GTK_IS_MENU (widget))
|
||||
gtk_menu_handle_scrolling (GTK_MENU (widget), TRUE);
|
||||
{
|
||||
GtkMenuPrivate *priv = gtk_menu_get_private (GTK_MENU (widget));
|
||||
|
||||
gtk_menu_handle_scrolling (GTK_MENU (widget), TRUE);
|
||||
|
||||
priv->seen_motion = TRUE;
|
||||
if (priv->seen_enter)
|
||||
{
|
||||
/* After having seen both a motion and an enter,
|
||||
* button releases should be interpreted as "activate".
|
||||
*/
|
||||
|
||||
GTK_MENU_SHELL (widget)->activate_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* We received the event for one of two reasons:
|
||||
*
|
||||
@@ -2899,9 +2930,20 @@ gtk_menu_enter_notify (GtkWidget *widget,
|
||||
if (widget && GTK_IS_MENU (widget))
|
||||
{
|
||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget);
|
||||
GtkMenuPrivate *priv = gtk_menu_get_private (GTK_MENU (widget));
|
||||
|
||||
if (!menu_shell->ignore_enter)
|
||||
gtk_menu_handle_scrolling (GTK_MENU (widget), TRUE);
|
||||
|
||||
priv->seen_enter = TRUE;
|
||||
if (priv->seen_motion)
|
||||
{
|
||||
/* After having seen both a motion and an enter,
|
||||
* button releases should be interpreted as "activate".
|
||||
*/
|
||||
|
||||
GTK_MENU_SHELL (widget)->activate_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is a faked enter (see gtk_menu_motion_notify), 'widget'
|
||||
|
||||
+3
-2
@@ -502,7 +502,7 @@ gtk_menu_item_size_request (GtkWidget *widget,
|
||||
g_return_if_fail (requisition != NULL);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"horizontal padding", &horizontal_padding,
|
||||
"horizontal_padding", &horizontal_padding,
|
||||
NULL);
|
||||
|
||||
bin = GTK_BIN (widget);
|
||||
@@ -962,7 +962,8 @@ gtk_menu_item_select_timeout (gpointer data)
|
||||
|
||||
parent = GTK_WIDGET (menu_item)->parent;
|
||||
|
||||
if (parent && GTK_IS_MENU_SHELL (parent) && GTK_MENU_SHELL (parent)->active)
|
||||
if ((GTK_IS_MENU_SHELL (parent) && GTK_MENU_SHELL (parent)->active) ||
|
||||
(GTK_IS_MENU (parent) && GTK_MENU (parent)->torn_off))
|
||||
{
|
||||
gtk_menu_item_popup_submenu (data);
|
||||
if (menu_item->timer_from_keypress && menu_item->submenu)
|
||||
|
||||
+16
-24
@@ -454,9 +454,10 @@ gtk_menu_shell_button_press (GtkWidget *widget,
|
||||
(menu_item != menu_shell->active_menu_item))
|
||||
{
|
||||
if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
|
||||
g_object_set_data (G_OBJECT (menu_shell),
|
||||
"gtk-menushell-just-activated",
|
||||
GUINT_TO_POINTER (1));
|
||||
{
|
||||
menu_shell->activate_time = event->time;
|
||||
}
|
||||
|
||||
gtk_menu_shell_select_item (menu_shell, menu_item);
|
||||
}
|
||||
}
|
||||
@@ -488,8 +489,6 @@ gtk_menu_shell_button_release (GtkWidget *widget,
|
||||
menu_shell = GTK_MENU_SHELL (widget);
|
||||
if (menu_shell->active)
|
||||
{
|
||||
gboolean deactivate_immediately = FALSE;
|
||||
|
||||
if (menu_shell->button && (event->button != menu_shell->button))
|
||||
{
|
||||
menu_shell->button = 0;
|
||||
@@ -502,23 +501,8 @@ gtk_menu_shell_button_release (GtkWidget *widget,
|
||||
|
||||
deactivate = TRUE;
|
||||
|
||||
if (menu_item
|
||||
&& GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
|
||||
{
|
||||
if (g_object_get_data (G_OBJECT (menu_shell), "gtk-menushell-just-activated"))
|
||||
g_object_set_data (G_OBJECT (menu_shell), "gtk-menushell-just-activated", NULL);
|
||||
else
|
||||
deactivate_immediately = TRUE;
|
||||
}
|
||||
|
||||
if ((event->time - menu_shell->activate_time) > MENU_SHELL_TIMEOUT)
|
||||
{
|
||||
if (deactivate_immediately)
|
||||
{
|
||||
gtk_menu_shell_deactivate (menu_shell);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (menu_item && (menu_shell->active_menu_item == menu_item) &&
|
||||
_gtk_menu_item_is_selectable (menu_item))
|
||||
{
|
||||
@@ -528,8 +512,12 @@ gtk_menu_shell_button_release (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (menu_item && !_gtk_menu_item_is_selectable (menu_item))
|
||||
deactivate = FALSE;
|
||||
else if (menu_item &&
|
||||
!_gtk_menu_item_is_selectable (menu_item) &&
|
||||
GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement != GTK_TOP_BOTTOM)
|
||||
{
|
||||
deactivate = FALSE;
|
||||
}
|
||||
else if (menu_shell->parent_menu_shell)
|
||||
{
|
||||
menu_shell->active = TRUE;
|
||||
@@ -539,8 +527,11 @@ gtk_menu_shell_button_release (GtkWidget *widget,
|
||||
|
||||
/* If we ended up on an item with a submenu, leave the menu up.
|
||||
*/
|
||||
if (menu_item && (menu_shell->active_menu_item == menu_item))
|
||||
deactivate = FALSE;
|
||||
if (menu_item && (menu_shell->active_menu_item == menu_item) &&
|
||||
GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement != GTK_TOP_BOTTOM)
|
||||
{
|
||||
deactivate = FALSE;
|
||||
}
|
||||
}
|
||||
else /* a very fast press-release */
|
||||
{
|
||||
@@ -745,6 +736,7 @@ gtk_real_menu_shell_deactivate (GtkMenuShell *menu_shell)
|
||||
{
|
||||
menu_shell->button = 0;
|
||||
menu_shell->active = FALSE;
|
||||
menu_shell->activate_time = 0;
|
||||
|
||||
if (menu_shell->active_menu_item)
|
||||
{
|
||||
|
||||
+2
-1
@@ -100,7 +100,8 @@ const gchar *_gtk_get_data_prefix ();
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
gboolean _gtk_fnmatch (const char *pattern,
|
||||
const char *string);
|
||||
const char *string,
|
||||
gboolean no_leading_period);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1124,9 +1124,6 @@ _gtk_selection_request (GtkWidget *widget,
|
||||
if (initialize)
|
||||
gtk_selection_init ();
|
||||
|
||||
g_message ("max request sizes %ld %ld\n",
|
||||
XMaxRequestSize(GDK_DISPLAY_XDISPLAY(display)),
|
||||
XExtendedMaxRequestSize(GDK_DISPLAY_XDISPLAY(display)));
|
||||
selection_max_size = GTK_SELECTION_MAX_SIZE (display);
|
||||
|
||||
/* Check if we own selection */
|
||||
|
||||
+19
-2
@@ -35,6 +35,11 @@
|
||||
static GHashTable *stock_hash = NULL;
|
||||
static void init_stock_hash (void);
|
||||
|
||||
/* We use an unused modifier bit to mark stock items which
|
||||
* must be freed when they are removed from the hash table.
|
||||
*/
|
||||
#define NON_STATIC_MASK (1 << 29)
|
||||
|
||||
static void
|
||||
real_add (const GtkStockItem *items,
|
||||
guint n_items,
|
||||
@@ -52,14 +57,25 @@ real_add (const GtkStockItem *items,
|
||||
{
|
||||
gpointer old_key, old_value;
|
||||
const GtkStockItem *item = &items[i];
|
||||
|
||||
if (item->modifier & NON_STATIC_MASK)
|
||||
{
|
||||
g_warning ("Bit 29 set in stock accelerator.\n");
|
||||
copy = TRUE;
|
||||
}
|
||||
|
||||
if (copy)
|
||||
item = gtk_stock_item_copy (item);
|
||||
{
|
||||
item = gtk_stock_item_copy (item);
|
||||
((GtkStockItem *)item)->modifier |= NON_STATIC_MASK;
|
||||
}
|
||||
|
||||
if (g_hash_table_lookup_extended (stock_hash, item->stock_id,
|
||||
&old_key, &old_value))
|
||||
{
|
||||
g_hash_table_remove (stock_hash, old_key);
|
||||
gtk_stock_item_free (old_value);
|
||||
if (((GtkStockItem *)old_value)->modifier & NON_STATIC_MASK)
|
||||
gtk_stock_item_free (old_value);
|
||||
}
|
||||
|
||||
g_hash_table_insert (stock_hash,
|
||||
@@ -136,6 +152,7 @@ gtk_stock_lookup (const gchar *stock_id,
|
||||
if (found)
|
||||
{
|
||||
*item = *found;
|
||||
item->modifier &= ~NON_STATIC_MASK;
|
||||
if (item->label)
|
||||
item->label = dgettext (item->translation_domain, item->label);
|
||||
}
|
||||
|
||||
+12
-11
@@ -2013,11 +2013,12 @@ logical_to_physical (GtkToolbar *toolbar,
|
||||
* gtk_toolbar_set_drop_highlight_item:
|
||||
* @toolbar: a #GtkToolbar
|
||||
* @tool_item: a #GtkToolItem, or %NULL to turn of highlighting
|
||||
* @index: a position on @toolbar
|
||||
* @index_: a position on @toolbar
|
||||
*
|
||||
* Highlights @toolbar to give an idea of what it would look like
|
||||
* if @item was added to @toolbar at position indicated by @index. If @item
|
||||
* is %NULL, highlighting is turned off. In that case @index is ignored.
|
||||
* if @item was added to @toolbar at the position indicated by @index_.
|
||||
* If @item is %NULL, highlighting is turned off. In that case @index_
|
||||
* is ignored.
|
||||
*
|
||||
* The @tool_item passed to this function must not be part of any widget
|
||||
* hierarchy. When an item is set as drop highlight item it can not
|
||||
@@ -2029,7 +2030,7 @@ logical_to_physical (GtkToolbar *toolbar,
|
||||
void
|
||||
gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
||||
GtkToolItem *tool_item,
|
||||
gint index)
|
||||
gint index_)
|
||||
{
|
||||
ToolbarContent *content;
|
||||
GtkToolbarPrivate *priv;
|
||||
@@ -2060,8 +2061,8 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
||||
}
|
||||
|
||||
n_items = gtk_toolbar_get_n_items (toolbar);
|
||||
if (index < 0 || index > n_items)
|
||||
index = n_items;
|
||||
if (index_ < 0 || index_ > n_items)
|
||||
index_ = n_items;
|
||||
|
||||
if (tool_item != priv->highlight_tool_item)
|
||||
{
|
||||
@@ -2077,15 +2078,15 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
||||
GTK_WIDGET (toolbar));
|
||||
}
|
||||
|
||||
index = logical_to_physical (toolbar, index);
|
||||
index_ = logical_to_physical (toolbar, index_);
|
||||
|
||||
content = g_list_nth_data (priv->content, index);
|
||||
content = g_list_nth_data (priv->content, index_);
|
||||
|
||||
if (index > 0)
|
||||
if (index_ > 0)
|
||||
{
|
||||
ToolbarContent *prev_content;
|
||||
|
||||
prev_content = g_list_nth_data (priv->content, index - 1);
|
||||
prev_content = g_list_nth_data (priv->content, index_ - 1);
|
||||
|
||||
if (prev_content && toolbar_content_is_placeholder (prev_content))
|
||||
content = prev_content;
|
||||
@@ -2099,7 +2100,7 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
||||
|
||||
content = toolbar_content_new_tool_item (toolbar,
|
||||
GTK_TOOL_ITEM (placeholder),
|
||||
TRUE, index);
|
||||
TRUE, index_);
|
||||
gtk_widget_show (placeholder);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ gint gtk_toolbar_get_drop_index (GtkToolbar *toolbar,
|
||||
gint y);
|
||||
void gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
||||
GtkToolItem *tool_item,
|
||||
gint index);
|
||||
gint index_);
|
||||
|
||||
/* internal functions */
|
||||
gchar * _gtk_toolbar_elide_underscores (const gchar *original);
|
||||
|
||||
@@ -208,6 +208,8 @@ struct _GtkTreeViewPrivate
|
||||
/* interactive search */
|
||||
guint enable_search : 1;
|
||||
guint disable_popdown : 1;
|
||||
|
||||
guint hover_selection : 1;
|
||||
|
||||
gint selected_iter;
|
||||
gint search_column;
|
||||
@@ -317,6 +319,8 @@ void _gtk_tree_view_queue_draw_node (GtkTreeView *tree_v
|
||||
GtkRBTree *tree,
|
||||
GtkRBNode *node,
|
||||
GdkRectangle *clip_rect);
|
||||
void _gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
||||
gboolean hover);
|
||||
|
||||
void _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column);
|
||||
void _gtk_tree_view_column_unrealize_button (GtkTreeViewColumn *column);
|
||||
@@ -378,6 +382,7 @@ void _gtk_tree_view_column_get_neighbor_sizes (GtkTreeViewColumn *c
|
||||
gint *right);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -1243,6 +1243,7 @@ gtk_tree_selection_real_modify_range (GtkTreeSelection *selection,
|
||||
* @end_path: The final node of the range.
|
||||
*
|
||||
* Selects a range of nodes, determined by @start_path and @end_path inclusive.
|
||||
* @selection must be set to #GTK_SELECTION_MULTIPLE mode.
|
||||
**/
|
||||
void
|
||||
gtk_tree_selection_select_range (GtkTreeSelection *selection,
|
||||
@@ -1251,6 +1252,7 @@ gtk_tree_selection_select_range (GtkTreeSelection *selection,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TREE_SELECTION (selection));
|
||||
g_return_if_fail (selection->tree_view != NULL);
|
||||
g_return_if_fail (selection->type == GTK_SELECTION_MULTIPLE);
|
||||
|
||||
if (gtk_tree_selection_real_modify_range (selection, RANGE_SELECT, start_path, end_path))
|
||||
g_signal_emit (selection, tree_selection_signals[CHANGED], 0);
|
||||
|
||||
+128
-39
@@ -420,6 +420,11 @@ static GtkTreeViewColumn *gtk_tree_view_get_drop_column (GtkTreeView *tree
|
||||
GtkTreeViewColumn *column,
|
||||
gint drop_position);
|
||||
|
||||
static void gtk_tree_view_tree_window_to_tree_coords (GtkTreeView *tree_view,
|
||||
gint wx,
|
||||
gint wy,
|
||||
gint *tx,
|
||||
gint *ty);
|
||||
|
||||
static GtkContainerClass *parent_class = NULL;
|
||||
static guint tree_view_signals [LAST_SIGNAL] = { 0 };
|
||||
@@ -608,6 +613,17 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
|
||||
0,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkTreeView:fixed-height-mode:
|
||||
*
|
||||
* Setting the ::fixed-height-mode property to %TRUE speeds up
|
||||
* #GtkTreeView by assuming that all rows have the same height.
|
||||
* Only enable this option if all rows are the same height.
|
||||
* Please see gtk_tree_view_set_fixed_height_mode() for more
|
||||
* information on this option.
|
||||
*
|
||||
* Since: 2.4
|
||||
**/
|
||||
g_object_class_install_property (o_class,
|
||||
PROP_FIXED_HEIGHT_MODE,
|
||||
g_param_spec_boolean ("fixed_height_mode",
|
||||
@@ -615,7 +631,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
|
||||
P_("Speeds up GtkTreeView by assuming that all rows have the same height"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
|
||||
/* Style properties */
|
||||
#define _TREE_VIEW_EXPANDER_SIZE 10
|
||||
#define _TREE_VIEW_VERTICAL_SEPARATOR 2
|
||||
@@ -1082,7 +1098,9 @@ gtk_tree_view_init (GtkTreeView *tree_view)
|
||||
tree_view->priv->search_dialog_position_func = gtk_tree_view_search_position_func;
|
||||
tree_view->priv->search_equal_func = gtk_tree_view_search_equal_func;
|
||||
tree_view->priv->init_hadjust_value = TRUE;
|
||||
tree_view->priv->width = 0;
|
||||
tree_view->priv->width = 0;
|
||||
|
||||
tree_view->priv->hover_selection = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2679,6 +2697,44 @@ do_prelight (GtkTreeView *tree_view,
|
||||
_gtk_tree_view_queue_draw_node (tree_view, tree, node, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
prelight_or_select (GtkTreeView *tree_view,
|
||||
GtkRBTree *tree,
|
||||
GtkRBNode *node,
|
||||
/* these are in tree_window coords */
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GtkSelectionMode mode = gtk_tree_selection_get_mode (tree_view->priv->selection);
|
||||
|
||||
if (tree_view->priv->hover_selection &&
|
||||
(mode == GTK_SELECTION_SINGLE || mode == GTK_SELECTION_BROWSE) &&
|
||||
!(tree_view->priv->edited_column &&
|
||||
tree_view->priv->edited_column->editable_widget))
|
||||
{
|
||||
if (node)
|
||||
{
|
||||
if (!GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED))
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
path = _gtk_tree_view_find_path (tree_view, tree, node);
|
||||
gtk_tree_selection_select_path (tree_view->priv->selection, path);
|
||||
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED))
|
||||
{
|
||||
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
|
||||
gtk_tree_view_real_set_cursor (tree_view, path, FALSE, FALSE);
|
||||
}
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
}
|
||||
else if (mode == GTK_SELECTION_SINGLE)
|
||||
gtk_tree_selection_unselect_all (tree_view->priv->selection);
|
||||
}
|
||||
else
|
||||
do_prelight (tree_view, tree, node, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_unprelighted (GtkTreeView *tree_view)
|
||||
{
|
||||
@@ -3123,7 +3179,7 @@ gtk_tree_view_motion_bin_window (GtkWidget *widget,
|
||||
(tree_view->priv->button_pressed_node != node))
|
||||
node = NULL;
|
||||
|
||||
do_prelight (tree_view, tree, node, event->x, event->y);
|
||||
prelight_or_select (tree_view, tree, node, event->x, event->y);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -4105,7 +4161,7 @@ gtk_tree_view_enter_notify (GtkWidget *widget,
|
||||
new_y = 0;
|
||||
_gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
|
||||
|
||||
do_prelight (tree_view, tree, node, event->x, event->y);
|
||||
prelight_or_select (tree_view, tree, node, event->x, event->y);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -4128,7 +4184,9 @@ gtk_tree_view_leave_notify (GtkWidget *widget,
|
||||
tree_view->priv->prelight_node,
|
||||
NULL);
|
||||
|
||||
ensure_unprelighted (tree_view);
|
||||
prelight_or_select (tree_view,
|
||||
NULL, NULL,
|
||||
-1000, -1000); /* coords not possibly over an arrow */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -6093,8 +6151,10 @@ gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
||||
gboolean enable)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
enable = enable != FALSE;
|
||||
|
||||
if (tree_view->priv->fixed_height_mode && enable)
|
||||
if (enable == tree_view->priv->fixed_height_mode)
|
||||
return;
|
||||
|
||||
if (!enable)
|
||||
@@ -6104,29 +6164,30 @@ gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
||||
|
||||
/* force a revalidation */
|
||||
install_presize_handler (tree_view);
|
||||
return;
|
||||
}
|
||||
|
||||
/* make sure all columns are of type FIXED */
|
||||
for (l = tree_view->priv->columns; l; l = l->next)
|
||||
else
|
||||
{
|
||||
GtkTreeViewColumn *c = l->data;
|
||||
|
||||
g_return_if_fail (gtk_tree_view_column_get_sizing (c) == GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
/* make sure all columns are of type FIXED */
|
||||
for (l = tree_view->priv->columns; l; l = l->next)
|
||||
{
|
||||
GtkTreeViewColumn *c = l->data;
|
||||
|
||||
g_return_if_fail (gtk_tree_view_column_get_sizing (c) == GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
}
|
||||
|
||||
/* yes, we really have to do this is in a separate loop */
|
||||
for (l = tree_view->priv->columns; l; l = l->next)
|
||||
g_signal_connect (l->data, "notify::sizing",
|
||||
G_CALLBACK (column_sizing_notify), tree_view);
|
||||
|
||||
tree_view->priv->fixed_height_mode = 1;
|
||||
tree_view->priv->fixed_height = -1;
|
||||
|
||||
if (tree_view->priv->tree)
|
||||
initialize_fixed_height_mode (tree_view);
|
||||
}
|
||||
|
||||
/* yes, we really have to do this is in a separate loop */
|
||||
for (l = tree_view->priv->columns; l; l = l->next)
|
||||
g_signal_connect (l->data, "notify::sizing",
|
||||
G_CALLBACK (column_sizing_notify), tree_view);
|
||||
|
||||
tree_view->priv->fixed_height_mode = 1;
|
||||
tree_view->priv->fixed_height = -1;
|
||||
|
||||
if (!tree_view->priv->tree)
|
||||
return;
|
||||
|
||||
initialize_fixed_height_mode (tree_view);
|
||||
g_object_notify (G_OBJECT (tree_view), "fixed-height-mode");
|
||||
}
|
||||
|
||||
/* Returns TRUE if the focus is within the headers, after the focus operation is
|
||||
@@ -9526,7 +9587,7 @@ gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_scroll_to_cell
|
||||
* gtk_tree_view_scroll_to_cell:
|
||||
* @tree_view: A #GtkTreeView.
|
||||
* @path: The path of the row to move to, or %NULL.
|
||||
* @column: The #GtkTreeViewColumn to move horizontally to, or %NULL.
|
||||
@@ -9604,7 +9665,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
|
||||
gint dest_x, dest_y;
|
||||
|
||||
gtk_tree_view_get_cell_area (tree_view, path, column, &cell_rect);
|
||||
gtk_tree_view_widget_to_tree_coords (tree_view, cell_rect.x, cell_rect.y, &(cell_rect.x), &(cell_rect.y));
|
||||
gtk_tree_view_tree_window_to_tree_coords (tree_view, cell_rect.x, cell_rect.y, &(cell_rect.x), &(cell_rect.y));
|
||||
gtk_tree_view_get_visible_rect (tree_view, &vis_rect);
|
||||
|
||||
dest_x = vis_rect.x;
|
||||
@@ -10638,11 +10699,11 @@ gtk_tree_view_get_bin_window (GtkTreeView *tree_view)
|
||||
*
|
||||
* Finds the path at the point (@x, @y), relative to widget coordinates. That
|
||||
* is, @x and @y are relative to an events coordinates. @x and @y must come
|
||||
* from an event on the @tree_view only where event->window ==
|
||||
* gtk_tree_view_get_bin (). It is primarily for things like popup menus.
|
||||
* If @path is non-%NULL, then it will be filled with the #GtkTreePath at that
|
||||
* point. This path should be freed with gtk_tree_path_free(). If @column
|
||||
* is non-%NULL, then it will be filled with the column at that point.
|
||||
* from an event on the @tree_view only where <literal>event->window ==
|
||||
* gtk_tree_view_get_bin (<!-- -->)</literal>. It is primarily for things
|
||||
* like popup menus. If @path is non-%NULL, then it will be filled with the
|
||||
* #GtkTreePath at that point. This path should be freed with gtk_tree_path_free().
|
||||
* If @column is non-%NULL, then it will be filled with the column at that point.
|
||||
* @cell_x and @cell_y return the coordinates relative to the cell background
|
||||
* (i.e. the @background_area passed to gtk_cell_renderer_render()). This
|
||||
* function is only meaningful if @tree_view is realized.
|
||||
@@ -10761,7 +10822,7 @@ gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
|
||||
* fields will be filled with 0. The sum of all cell rects does not cover the
|
||||
* entire tree; there are extra pixels in between rows, for example. The
|
||||
* returned rectangle is equivalent to the @cell_area passed to
|
||||
* gtk_cell_renderer_render(). This function is only valid if #tree_view is
|
||||
* gtk_cell_renderer_render(). This function is only valid if @tree_view is
|
||||
* realized.
|
||||
**/
|
||||
void
|
||||
@@ -10808,7 +10869,8 @@ gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
|
||||
rect->y = CELL_FIRST_PIXEL (tree_view, tree, node, vertical_separator);
|
||||
rect->height = MAX (CELL_HEIGHT (node, vertical_separator), tree_view->priv->expander_size - vertical_separator);
|
||||
|
||||
if (gtk_tree_view_is_expander_column (tree_view, column) &&
|
||||
if (column &&
|
||||
gtk_tree_view_is_expander_column (tree_view, column) &&
|
||||
TREE_VIEW_DRAW_EXPANDERS (tree_view))
|
||||
{
|
||||
gint depth = gtk_tree_path_get_depth (path) - 1;
|
||||
@@ -10923,10 +10985,10 @@ gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_widget_to_tree_coords (GtkTreeView *tree_view,
|
||||
gint wx,
|
||||
gint wy,
|
||||
gint *tx,
|
||||
gint *ty)
|
||||
gint wx,
|
||||
gint wy,
|
||||
gint *tx,
|
||||
gint *ty)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
|
||||
|
||||
@@ -10936,6 +10998,21 @@ gtk_tree_view_widget_to_tree_coords (GtkTreeView *tree_view,
|
||||
*ty = wy + tree_view->priv->dy;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_tree_view_tree_window_to_tree_coords (GtkTreeView *tree_view,
|
||||
gint wx,
|
||||
gint wy,
|
||||
gint *tx,
|
||||
gint *ty)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
|
||||
|
||||
if (tx)
|
||||
*tx = wx;
|
||||
if (ty)
|
||||
*ty = wy + tree_view->priv->dy;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_tree_to_widget_coords:
|
||||
* @tree_view: a #GtkTreeView
|
||||
@@ -11978,7 +12055,8 @@ gtk_tree_view_search_init (GtkWidget *entry,
|
||||
if (len < 1)
|
||||
return;
|
||||
|
||||
gtk_tree_model_get_iter_first (model, &iter);
|
||||
if (!gtk_tree_model_get_iter_first (model, &iter))
|
||||
return;
|
||||
|
||||
ret = gtk_tree_view_search_iter (model, selection,
|
||||
&iter, text,
|
||||
@@ -12147,3 +12225,14 @@ gtk_tree_view_stop_editing (GtkTreeView *tree_view,
|
||||
|
||||
gtk_cell_editable_remove_widget (column->editable_widget);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
||||
gboolean hover)
|
||||
{
|
||||
hover = hover != FALSE;
|
||||
|
||||
tree_view->priv->hover_selection = hover;
|
||||
}
|
||||
|
||||
|
||||
+42
-29
@@ -690,6 +690,9 @@ gtk_ui_manager_get_accel_group (GtkUIManager *self)
|
||||
* the XML (e.g. <popup>) can be addressed by their XML element name
|
||||
* (e.g. "popup"). The root element ("/ui") can be omitted in the path.
|
||||
*
|
||||
* Note that the widget found by following a path that ends in a <menu>
|
||||
* element is the menuitem to which the menu is attached, not the menu itself.
|
||||
*
|
||||
* Return value: the widget found by following the path, or %NULL if no widget
|
||||
* was found.
|
||||
*
|
||||
@@ -708,6 +711,8 @@ gtk_ui_manager_get_widget (GtkUIManager *self,
|
||||
* widget */
|
||||
gtk_ui_manager_ensure_update (self);
|
||||
|
||||
if (strncmp ("/ui", path, 3) == 0)
|
||||
path += 3;
|
||||
node = get_node (self, path, NODE_TYPE_UNDECIDED, FALSE);
|
||||
|
||||
if (node == NULL)
|
||||
@@ -2560,7 +2565,7 @@ gtk_ui_manager_ensure_update (GtkUIManager *self)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
dirty_traverse_func (GNode *node,
|
||||
dirty_traverse_func (GNode *node,
|
||||
gpointer data)
|
||||
{
|
||||
NODE_INFO (node)->dirty = TRUE;
|
||||
@@ -2570,25 +2575,25 @@ dirty_traverse_func (GNode *node,
|
||||
static void
|
||||
dirty_all_nodes (GtkUIManager *self)
|
||||
{
|
||||
g_node_traverse (self->private_data->root_node,
|
||||
g_node_traverse (self->private_data->root_node,
|
||||
G_PRE_ORDER, G_TRAVERSE_ALL, -1,
|
||||
dirty_traverse_func, NULL);
|
||||
queue_update (self);
|
||||
}
|
||||
|
||||
static const gchar *open_tag_format[] = {
|
||||
"%*s<UNDECIDED>\n",
|
||||
"%*s<ui>\n",
|
||||
"%*s<menubar name=\"%s\">\n",
|
||||
"%*s<menu name=\"%s\" action=\"%s\">\n",
|
||||
"%*s<toolbar name=\"%s\">\n",
|
||||
"%*s<placeholder name=\"%s\">\n",
|
||||
"%*s<placeholder name=\"%s\">\n",
|
||||
"%*s<popup name=\"%s\">\n",
|
||||
"%*s<menuitem name=\"%s\" action=\"%s\"/>\n",
|
||||
"%*s<toolitem name=\"%s\" action=\"%s\"/>\n",
|
||||
"%*s<separator name=\"%s\"/>\n",
|
||||
"%*s<accelerator name=\"%s\" action=\"%s\"/>\n",
|
||||
"%*s<UNDECIDED",
|
||||
"%*s<ui",
|
||||
"%*s<menubar",
|
||||
"%*s<menu",
|
||||
"%*s<toolbar",
|
||||
"%*s<placeholder",
|
||||
"%*s<placeholder",
|
||||
"%*s<popup",
|
||||
"%*s<menuitem",
|
||||
"%*s<toolitem",
|
||||
"%*s<separator",
|
||||
"%*s<accelerator"
|
||||
};
|
||||
|
||||
static const gchar *close_tag_format[] = {
|
||||
@@ -2600,34 +2605,42 @@ static const gchar *close_tag_format[] = {
|
||||
"%*s</placeholder>\n",
|
||||
"%*s</placeholder>\n",
|
||||
"%*s</popup>\n",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static void
|
||||
print_node (GtkUIManager *self,
|
||||
GNode *node,
|
||||
print_node (GtkUIManager *self,
|
||||
GNode *node,
|
||||
gint indent_level,
|
||||
GString *buffer)
|
||||
{
|
||||
Node *mnode;
|
||||
Node *mnode;
|
||||
GNode *child;
|
||||
|
||||
mnode = node->data;
|
||||
|
||||
g_string_append_printf (buffer, open_tag_format[mnode->type],
|
||||
indent_level, "",
|
||||
mnode->name,
|
||||
g_quark_to_string (mnode->action_name));
|
||||
|
||||
for (child = node->children; child != NULL; child = child->next)
|
||||
print_node (self, child, indent_level + 2, buffer);
|
||||
|
||||
g_string_append_printf (buffer, close_tag_format[mnode->type],
|
||||
indent_level, "");
|
||||
|
||||
if (mnode->name)
|
||||
g_string_append_printf (buffer, " name=\"%s\"", mnode->name);
|
||||
|
||||
if (mnode->action_name)
|
||||
g_string_append_printf (buffer, " action=\"%s\"",
|
||||
g_quark_to_string (mnode->action_name));
|
||||
|
||||
g_string_append (buffer,
|
||||
close_tag_format[mnode->type] ? ">\n" : "/>\n");
|
||||
|
||||
for (child = node->children; child != NULL; child = child->next)
|
||||
print_node (self, child, indent_level + 2, buffer);
|
||||
|
||||
if (close_tag_format[mnode->type])
|
||||
g_string_append_printf (buffer, close_tag_format[mnode->type],
|
||||
indent_level, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+26
-2
@@ -3803,6 +3803,22 @@ gtk_widget_region_intersect (GtkWidget *widget,
|
||||
return dest;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gtk_widget_grab_notify:
|
||||
* @widget: a #GtkWidget
|
||||
* @was_grabbed: whether a grab is now in effect
|
||||
*
|
||||
* Emits the signal "grab_notify" on @widget.
|
||||
*
|
||||
* Since: 2.6
|
||||
**/
|
||||
void
|
||||
_gtk_widget_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed)
|
||||
{
|
||||
g_signal_emit (widget, widget_signals[GRAB_NOTIFY], 0, was_grabbed);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_grab_focus:
|
||||
* @widget: a #GtkWidget
|
||||
@@ -4237,10 +4253,18 @@ gtk_widget_set_parent (GtkWidget *widget,
|
||||
GtkStateData data;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (widget->parent == NULL);
|
||||
g_return_if_fail (!GTK_WIDGET_TOPLEVEL (widget));
|
||||
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||
g_return_if_fail (widget != parent);
|
||||
if (widget->parent != NULL)
|
||||
{
|
||||
g_warning ("Can't set a parent on widget which has a parent\n");
|
||||
return;
|
||||
}
|
||||
if (GTK_WIDGET_TOPLEVEL (widget))
|
||||
{
|
||||
g_warning ("Can't set a parent on a toplevel widget\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* keep this function in sync with gtk_menu_attach_to_widget()
|
||||
*/
|
||||
|
||||
@@ -775,6 +775,9 @@ void gtk_requisition_free (GtkRequisition *requisition);
|
||||
# define gtk_widget_unref gtk_object_unref
|
||||
#endif /* GTK_TRACE_OBJECTS && __GNUC__ */
|
||||
|
||||
void _gtk_widget_emit_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed);
|
||||
|
||||
GtkWidgetAuxInfo *_gtk_widget_get_aux_info (GtkWidget *widget,
|
||||
gboolean create);
|
||||
void _gtk_widget_propagate_hierarchy_changed (GtkWidget *widget,
|
||||
|
||||
+6
-4
@@ -2373,7 +2373,7 @@ typedef struct {
|
||||
GdkPixmap *mask;
|
||||
} ScreenIconInfo;
|
||||
|
||||
ScreenIconInfo *
|
||||
static ScreenIconInfo *
|
||||
get_screen_icon_info (GdkScreen *screen)
|
||||
{
|
||||
ScreenIconInfo *info = g_object_get_data (G_OBJECT (screen),
|
||||
@@ -3642,9 +3642,11 @@ gtk_window_show (GtkWidget *widget)
|
||||
* then we created it with widget->allocation anyhow.
|
||||
*/
|
||||
if (!was_realized)
|
||||
gdk_window_resize (widget->window,
|
||||
configure_request.width,
|
||||
configure_request.height);
|
||||
gdk_window_move_resize (widget->window,
|
||||
configure_request.x,
|
||||
configure_request.y,
|
||||
configure_request.width,
|
||||
configure_request.height);
|
||||
}
|
||||
|
||||
gtk_container_check_resize (container);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Thu May 27 15:30:07 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* Sync from upstream
|
||||
|
||||
Fri Apr 30 00:19:11 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* xdgmimemagic.c (_xdg_mime_magic_read_a_number): Make sure
|
||||
|
||||
+20
-19
@@ -168,7 +168,7 @@ _xdg_mime_magic_read_to_newline (FILE *magic_file,
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
{
|
||||
*end_of_file = TRUE;
|
||||
@@ -203,7 +203,7 @@ _xdg_mime_magic_read_a_number (FILE *magic_file,
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
|
||||
if (c == EOF)
|
||||
{
|
||||
@@ -247,7 +247,7 @@ _xdg_mime_magic_parse_header (FILE *magic_file, XdgMimeMagicMatch *match)
|
||||
assert (magic_file != NULL);
|
||||
assert (match != NULL);
|
||||
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
if (c != '[')
|
||||
@@ -259,7 +259,7 @@ _xdg_mime_magic_parse_header (FILE *magic_file, XdgMimeMagicMatch *match)
|
||||
if (match->priority == -1)
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
if (c != ':')
|
||||
@@ -292,7 +292,7 @@ _xdg_mime_magic_parse_error (FILE *magic_file)
|
||||
|
||||
while (1)
|
||||
{
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
if (c == '\n')
|
||||
@@ -317,7 +317,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
assert (magic_file != NULL);
|
||||
|
||||
/* Sniff the buffer to make sure it's a valid line */
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
else if (c == '[')
|
||||
@@ -338,7 +338,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
if (indent == -1)
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
_xdg_mime_magic_matchlet_free (matchlet);
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
}
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
{
|
||||
_xdg_mime_magic_matchlet_free (matchlet);
|
||||
@@ -373,7 +373,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
|
||||
/* Next two bytes determine how long the value is */
|
||||
matchlet->value_length = 0;
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
{
|
||||
_xdg_mime_magic_matchlet_free (matchlet);
|
||||
@@ -382,7 +382,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
matchlet->value_length = c & 0xFF;
|
||||
matchlet->value_length = matchlet->value_length << 8;
|
||||
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == EOF)
|
||||
{
|
||||
_xdg_mime_magic_matchlet_free (matchlet);
|
||||
@@ -408,7 +408,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
}
|
||||
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
if (c == '&')
|
||||
{
|
||||
matchlet->mask = malloc (matchlet->value_length);
|
||||
@@ -427,7 +427,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
else
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
}
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
}
|
||||
|
||||
if (c == '~')
|
||||
@@ -446,7 +446,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
_xdg_mime_magic_matchlet_free (matchlet);
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
}
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
}
|
||||
|
||||
if (c == '+')
|
||||
@@ -462,7 +462,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
||||
_xdg_mime_magic_matchlet_free (matchlet);
|
||||
return XDG_MIME_MAGIC_ERROR;
|
||||
}
|
||||
c = fgetc (magic_file);
|
||||
c = getc_unlocked (magic_file);
|
||||
}
|
||||
|
||||
|
||||
@@ -692,13 +692,13 @@ _xdg_mime_magic_matchlet_mirror (XdgMimeMagicMatchlet *matchlets)
|
||||
{
|
||||
XdgMimeMagicMatchlet *new_list;
|
||||
XdgMimeMagicMatchlet *tmp;
|
||||
|
||||
if ((matchlets == NULL) || (matchlets->next == NULL))
|
||||
|
||||
if ((matchlets == NULL) || (matchlets->next == NULL))
|
||||
return matchlets;
|
||||
|
||||
new_list = NULL;
|
||||
tmp = matchlets;
|
||||
while (tmp != NULL)
|
||||
while (tmp != NULL)
|
||||
{
|
||||
XdgMimeMagicMatchlet *matchlet;
|
||||
|
||||
@@ -709,7 +709,7 @@ _xdg_mime_magic_matchlet_mirror (XdgMimeMagicMatchlet *matchlets)
|
||||
}
|
||||
|
||||
return new_list;
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -733,7 +733,8 @@ _xdg_mime_magic_read_magic_file (XdgMimeMagic *mime_magic,
|
||||
break;
|
||||
case XDG_MIME_MAGIC_MAGIC:
|
||||
state = _xdg_mime_magic_parse_magic_line (magic_file, match);
|
||||
if (state == XDG_MIME_MAGIC_SECTION)
|
||||
if (state == XDG_MIME_MAGIC_SECTION ||
|
||||
(state == XDG_MIME_MAGIC_EOF && match->mime_type))
|
||||
{
|
||||
match->matchlet = _xdg_mime_magic_matchlet_mirror (match->matchlet);
|
||||
_xdg_mime_magic_insert_match (mime_magic, match);
|
||||
|
||||
@@ -1,367 +0,0 @@
|
||||
2004-03-20 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* all: Renamed GTK-Wimp to MS-Windows Engine
|
||||
|
||||
2004-03-11 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.5.4 ===
|
||||
|
||||
2004-03-10 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* configure.in: Bump version number (0.5.4)
|
||||
|
||||
2004-02-25 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Fix
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=135098
|
||||
http://sourceforge.net/tracker/index.php?func=detail&aid=895762&group_id=76416&atid=547655
|
||||
|
||||
2004-01-25 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.5.3 ===
|
||||
|
||||
2004-01-20 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Fix disappearing text in Gimp option menus.
|
||||
Fix background color on XP menus.
|
||||
|
||||
2004-01-20 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/xp_theme.h
|
||||
* src/xp_theme.c
|
||||
* src/wimp_style.c: Remove UXTHEME_HAS_LINES stuff. I played around
|
||||
with line drawing, and the results were absolutely dreadful.
|
||||
|
||||
2003-12-30 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c
|
||||
* src/xp_theme.c
|
||||
* src/xp_theme.h
|
||||
* src/xp_theme_defs.h: Toward 853775, get toolbar button borders correct
|
||||
|
||||
2003-12-30 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Fix bug 852354 to my liking
|
||||
|
||||
2003-12-01 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Fix coloration for the expander's +/- part. Was
|
||||
the wrong color when selected or selected+insensitive
|
||||
|
||||
2003-11-26 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Fix coloration for several GIMP widgets,
|
||||
specifically their own OptionMenu-like widget.
|
||||
|
||||
2003-11-24 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Get the coloration correct for menu bars (XP theme
|
||||
was showing white foreground instead of gray)
|
||||
|
||||
* configure.in: Post-release version number bump
|
||||
|
||||
2003-11-19 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.5.2 ===
|
||||
|
||||
2003-11-14 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Protect against buffer overflows when grabbing
|
||||
fonts and generating RC strings. Get the Progress and Status
|
||||
widget backgrounds to behave properly on themes like "Brick".
|
||||
|
||||
2003-11-05 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Toolbar steppers get drawn ETCHED_IN when
|
||||
pressed now. More consistent with Win32 behavior.
|
||||
|
||||
* src/Theme/gtk-2.0/gtkrc: Make menubars have shadow=NONE. More
|
||||
consistent with Win32 behavior, though Win32 apps tend to differ
|
||||
in this area. Setup menu and toolbar icon sizes to be compatible
|
||||
with win32
|
||||
|
||||
2003-11-04 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/xp_theme.c: Move Raymond's scrollbar work into wimp_style.c
|
||||
|
||||
* src/wimp_style.c: Get the colorations better for other windows
|
||||
schemes, such as brick. Based on some work by Jernej Simonèiè
|
||||
<jernej.simoncic@guest.arnes.si>
|
||||
|
||||
2003-11-01 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/xp_theme.c: Do not display XP scrollbar grippers on tiny
|
||||
scrollbars.
|
||||
|
||||
2003-10-23 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.5.1 ===
|
||||
|
||||
2003-10-23 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/xp_theme_defs.h: Update to include definitions for my latest
|
||||
work.
|
||||
|
||||
2003-10-22 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/*.[ch]: Code formatting & XP constants renaming.
|
||||
|
||||
2003-10-21 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Use theme colors, use theme metrics
|
||||
(disabled), use theme fonts, theme menu items, menu separators,
|
||||
draw status bar resize grips.
|
||||
|
||||
* src/xp_theme.c: Ditto.
|
||||
|
||||
2003-10-20 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: Added grippers to XP scrollbars.
|
||||
|
||||
2003-10-20 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* configure.in: Bump version to the next release number (0.5.1)
|
||||
|
||||
2003-10-18 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/Theme/gtk-2.0/gtkrc: "GtkToolBar" should read "GtkToolbar"
|
||||
|
||||
* src/*: Attempted to fix the grippers for the GNAT Programming
|
||||
System. Things behave a tiny bit better now. See #ifdef GNATS_HACK
|
||||
|
||||
2003-10-17 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: Horizontal/vertical scrollbars were mixed up,
|
||||
fixed.
|
||||
|
||||
2003-04-15 Arnaud Charlet <charlet@ACT-Europe.FR>
|
||||
|
||||
* src/*.c: The handling of selected radio button was broken.
|
||||
|
||||
* src/xp_theme_defs.h: When building with gcc, the tree expanders
|
||||
were inverted.
|
||||
|
||||
2003-10-08 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.5.0 ===
|
||||
|
||||
2003-10-07 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: Tabs not located on top of the notebook are
|
||||
now (again) no longer rendered using XP theming.
|
||||
|
||||
* src/xp_theme.c: Added a more lightweight method to cope with
|
||||
theme changes. Added a crude theme switch detection scheme in the
|
||||
case that GTK+ does not implement gdk_window_add_filter properly
|
||||
(GTK+ 2.2.0?).
|
||||
|
||||
2003-10-07 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* Added new mingw based build system, tidied up other missing bits
|
||||
|
||||
* src/xp_theme.c: Tidied up some return cases
|
||||
|
||||
2003-10-07 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/xp_theme.c: We now properly use IsThemeActive().
|
||||
|
||||
* src/xp_theme_defs.h: Renamed from xp_theme_dfns.h
|
||||
|
||||
2003-10-06 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style_main.c: Catch system settings changes, disable
|
||||
theme and color changes as they're too experimental
|
||||
|
||||
* src/wimp_style.[ch]: Export some things, make them accept 0 args
|
||||
|
||||
* src/xp_theme_dfns.h: New file. WinXP's UXTHEME constants, for
|
||||
building on platforms without them
|
||||
|
||||
* src/xp_theme.c: Should be able to build on Win32 != [WinXP,2k3]
|
||||
now
|
||||
|
||||
2003-10-03 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c wimp_style_main.c: Refactor how we're doing
|
||||
styles. Much faster, lower memory consumption
|
||||
|
||||
2003-10-03 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style_main.c: Catch theme and color changes. Needs more
|
||||
testing and fine-tuning
|
||||
|
||||
2003-10-02 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Deallocate used HDCs
|
||||
|
||||
2003-10-01 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Only set the delays if the param is
|
||||
installed. Silly gtk - installing those 3 params only in the
|
||||
menus...
|
||||
|
||||
2003-09-25 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Set a delay on popdown menus
|
||||
|
||||
2003-09-22 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/xp_theme.c: Make a string array const
|
||||
|
||||
2003-09-20 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.4.3 ===
|
||||
|
||||
* src/wimp_style.c: The Gaim buddy icons were missing due to
|
||||
recent tree expander changes, not the clipping area. Fixed.
|
||||
|
||||
* src/xp_theme.c: Re-enabled clipping area, I am confident it
|
||||
should not cause any problems now.
|
||||
|
||||
2003-09-18 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.4.2 ===
|
||||
|
||||
2003-09-16 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/xp_theme.c: Ignore cliprect for now
|
||||
|
||||
2003-09-15 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.4.1 ===
|
||||
|
||||
* src/wimp_style.c: Fixed typ-o (gtk-double-cliNk-time), adjusted
|
||||
cursor blink time to cope with Windows semantics (GTK+ uses cycle
|
||||
time), fixed clipping area computation. Fixed XP tree expanders to
|
||||
cope with clipping area, and made non-XP tree expanders look
|
||||
pixel-perfect.
|
||||
|
||||
2003-09-15 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Fix a few more console messages, implement
|
||||
caret blinking
|
||||
|
||||
* src/xp_theme.*: Stub out line drawing. Apparently, documented
|
||||
bits are missing from MS's implementation. Go figure...
|
||||
|
||||
2003-09-14 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: Fixed console message complaining about
|
||||
"default_border".
|
||||
|
||||
* src/wimp_style.c: Due to a bug lots of console message
|
||||
complaining about "unexpected keyword `fg'" occured, fixed.
|
||||
|
||||
2003-09-11 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/Theme/gtk-2.0/gtkrc: Remove unused cruft wrt GtkScrollbars
|
||||
|
||||
2003-09-11 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.4.0 ===
|
||||
|
||||
* src/wimp_style.c: Notebook tabs were no longer properly drawn,
|
||||
fixed.
|
||||
|
||||
2003-09-08 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Honor scrollbar sizes, radio/check button
|
||||
sizes, paned sizes
|
||||
|
||||
2003-09-03 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Honor tooltip color, font
|
||||
|
||||
2003-09-02 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: We now honor font preferences being bold or
|
||||
italic
|
||||
|
||||
2003-08-29 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/*.c: Theme GTK toolbar arrows to XP chevrons, once my GTK
|
||||
patch is committed.
|
||||
|
||||
* src/wimp_style.c: Enable proper fonts/sizes for menus, status
|
||||
bars. Tooltips are waiting for my GTK patches, though.
|
||||
|
||||
2003-08-28 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Change how we draw handle boxes in the non-XP
|
||||
case. This does not yet apply to GtkHandleBoxes
|
||||
|
||||
2003-08-26 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/*.c: Tooltips should do XP-style theming. Handle Boxes/Panes
|
||||
do XP style REBAR theming (TODO: non-XP version of the above for
|
||||
handleboxes). Toolbars should draw the REBAR part
|
||||
properly. Preparation for using the Toolbar class. Menubars and
|
||||
Toolbars now are etched-in to mimic Windows'
|
||||
behavior. HandleBoxes' shadow types should also be correct now,
|
||||
compared to OfficeXP applications.
|
||||
|
||||
2003-08-26 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.3.0 ===
|
||||
|
||||
2003-08-23 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/*.c: Merged Dom Lachowicz's patches, now tooltips and
|
||||
progress bars nicely adhere to the system colors as well.
|
||||
|
||||
* src/xp_theme.c: There was a mixup in drawing the proper checkbox
|
||||
state, fixed (Gaim bug #790305).
|
||||
|
||||
2003-08-20 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/Theme/gtk-2.0/gtkrc: Disabled the colored, alternating
|
||||
rules for GtkTreeViews to match the Windows behaviour.
|
||||
|
||||
* */Makefile.msc: Provided MS-VC++ make files.
|
||||
|
||||
* src/xp_theme.c: The open/close tree expander symbols were
|
||||
accidentally switched, fixed (Gaim bug #790300).
|
||||
|
||||
2003-08-11 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: The menu background color now follows XP's
|
||||
color scheme.
|
||||
|
||||
2003-08-07 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.2.0 ===
|
||||
|
||||
2003-08-06 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/*.c: Added XP theming support for progress bars.
|
||||
|
||||
2003-08-05 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/xp_theme.c: Internal redesign: extracted XP specific theming
|
||||
from wimp_style.c, improved code.
|
||||
|
||||
* src/wimp_style.c: Added XP theming support for list headers, and
|
||||
entry widgets.
|
||||
|
||||
2003-08-03 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: Improved system color handling, added XP
|
||||
theming support for option menus.
|
||||
|
||||
2003-04-15 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/wimp_style.c: Tabs not located on top of the notebook are
|
||||
not rendered properly using XP theming. Added fallback to non-XP
|
||||
theming behaviour if the tabs are not located on top (to be
|
||||
removed when full notebook support is in).
|
||||
|
||||
2003-04-15 Arnaud Charlet <charlet@ACT-Europe.FR>
|
||||
|
||||
* src/wimp_style.c: Add handling of expander. Fix colors for combo
|
||||
box items. Add native rendering of radio buttons. Fix handling of
|
||||
default buttons. Add native rendering of tree expanders.
|
||||
|
||||
2003-03-18 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* === Released 0.1.0 ===
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
SUBDIRS=Theme
|
||||
|
||||
EXTRA_DIST=Makefile.msc
|
||||
|
||||
INCLUDES=$(MSW_CFLAGS)
|
||||
|
||||
enginedir=$(libdir)/gtk-2.0/$(GTK_VERSION)/engines
|
||||
|
||||
engine_LTLIBRARIES = libms-windows-engine.la
|
||||
|
||||
libms_windows_engine_la_SOURCES = \
|
||||
msw_rc_style.c \
|
||||
msw_rc_style.h \
|
||||
msw_style.c \
|
||||
msw_style.h \
|
||||
msw_theme_main.c \
|
||||
xp_theme.c \
|
||||
xp_theme_defs.h \
|
||||
xp_theme.h
|
||||
|
||||
libms_windows_engine_la_LDFLAGS = \
|
||||
-avoid-version -module -no-undefined -export-dynamic
|
||||
|
||||
libms_windows_engine_la_LIBADD= $(MSW_LIBS)
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# Makefile.msc -- Makefile for MS-VC++ (-*- makefile -*-)
|
||||
#
|
||||
# Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
#
|
||||
# $Id$
|
||||
|
||||
!INCLUDE ../Makefile.msc.config
|
||||
|
||||
##
|
||||
# Target
|
||||
TARGET=libms-windows-engine.dll
|
||||
|
||||
OBJS = \
|
||||
msw_style.obj \
|
||||
msw_theme_main.obj \
|
||||
msw_rc_style.obj \
|
||||
xp_theme.obj
|
||||
|
||||
##
|
||||
# GTK
|
||||
#
|
||||
GTK_CFLAGS=\
|
||||
-I$(GTK_DIR)/include/gtk-2.0 \
|
||||
-I$(GTK_DIR)/lib/gtk-2.0/include \
|
||||
-I$(GTK_DIR)/include/atk-1.0 \
|
||||
-I$(GTK_DIR)/include/pango-1.0 \
|
||||
-I$(GTK_DIR)/include/glib-2.0 \
|
||||
-I$(GTK_DIR)/lib/glib-2.0/include
|
||||
|
||||
GTK_LDFLAGS=/libpath:$(GTK_DIR)/lib
|
||||
|
||||
GTK_LIBS= \
|
||||
gtk-win32-2.0.lib \
|
||||
gdk-win32-2.0.lib \
|
||||
atk-1.0.lib \
|
||||
gdk_pixbuf-2.0.lib \
|
||||
pangowin32-1.0.lib \
|
||||
pango-1.0.lib \
|
||||
gobject-2.0.lib \
|
||||
gmodule-2.0.lib \
|
||||
glib-2.0.lib \
|
||||
intl.lib \
|
||||
iconv.lib
|
||||
|
||||
##
|
||||
# WIN32
|
||||
#
|
||||
WIN32_LIBS = \
|
||||
gdi32.lib \
|
||||
user32.lib
|
||||
|
||||
WIN32_CFLAGS=-I"$(SDK_DIR)"
|
||||
WIN32_LDFLAGS=/DLL /SUBSYSTEM:WINDOWS
|
||||
|
||||
##
|
||||
# Target
|
||||
#
|
||||
LIBS=$(GTK_LIBS) $(WIN32_LIBS)
|
||||
CFLAGS=$(WIN32_CFLAGS) $(GTK_CFLAGS)
|
||||
LDFLAGS= $(WIN32_LDFLAGS) $(GTK_LDFLAGS)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
link $(LDFLAGS) $(LIBS) /OUT:$@ $(OBJS)
|
||||
|
||||
install: $(TARGET)
|
||||
copy $(TARGET) "$(INSTALL_DIR)"
|
||||
|
||||
clean:
|
||||
del *.obj *.dll *.exp *.lib
|
||||
@@ -1 +0,0 @@
|
||||
SUBDIRS=gtk-2.0
|
||||
@@ -1,4 +0,0 @@
|
||||
themedir = $(datadir)/themes/gtk-2.0
|
||||
theme_DATA=gtkrc
|
||||
|
||||
EXTRA_DIST=$(theme_DATA)
|
||||
@@ -1,21 +0,0 @@
|
||||
# TODO: we should probably obtain these from a Win32 IconMetrics struct
|
||||
gtk-icon-sizes="gtk-menu=16,16:gtk-small-toolbar=18,18:gtk-large-toolbar=24,24:gtk-dnd=32,32"
|
||||
|
||||
style "msw-default"
|
||||
{
|
||||
GtkWidget::interior_focus = 1
|
||||
GtkOptionMenu::indicator_size = { 9, 5 }
|
||||
GtkOptionMenu::indicator_spacing = { 7, 5, 2, 2 }
|
||||
GtkMenuBar::shadow-type = none
|
||||
GtkToolbar::shadow-type = etched-in
|
||||
GtkHandleBox::shadow-type = none
|
||||
GtkSpinButton::shadow-type = in
|
||||
|
||||
GtkTreeView::allow-rules = 0
|
||||
GtkTreeView::expander_size = 11
|
||||
|
||||
engine "ms-windows-engine"
|
||||
{
|
||||
}
|
||||
}
|
||||
class "*" style "msw-default"
|
||||
@@ -1,78 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
* Includes code adapted from redmond95 by Owen Taylor, and
|
||||
* gtk-nativewin by Evan Martin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "msw_style.h"
|
||||
#include "msw_rc_style.h"
|
||||
|
||||
static void msw_rc_style_init (MswRcStyle *style);
|
||||
static void msw_rc_style_class_init (MswRcStyleClass *klass);
|
||||
static GtkStyle *msw_rc_style_create_style (GtkRcStyle *rc_style);
|
||||
|
||||
static GtkRcStyleClass *parent_class;
|
||||
|
||||
GType msw_type_rc_style = 0;
|
||||
|
||||
void
|
||||
msw_rc_style_register_type (GTypeModule *module)
|
||||
{
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (MswRcStyleClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) msw_rc_style_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (MswRcStyle),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) msw_rc_style_init,
|
||||
};
|
||||
|
||||
msw_type_rc_style = g_type_module_register_type (module,
|
||||
GTK_TYPE_RC_STYLE,
|
||||
"MswRcStyle",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
msw_rc_style_init (MswRcStyle *style)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
msw_rc_style_class_init (MswRcStyleClass *klass)
|
||||
{
|
||||
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
rc_style_class->create_style = msw_rc_style_create_style;
|
||||
}
|
||||
|
||||
/* Create an empty style suitable to this RC style
|
||||
*/
|
||||
static GtkStyle *
|
||||
msw_rc_style_create_style (GtkRcStyle *rc_style)
|
||||
{
|
||||
return GTK_STYLE (g_object_new (MSW_TYPE_STYLE, NULL));
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
* Includes code adapted from redmond95 by Owen Taylor, and
|
||||
* gtk-nativewin by Evan Martin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef MSW_RC_STYLE_H
|
||||
#define MSW_RC_STYLE_H
|
||||
|
||||
#include <gtk/gtkrc.h>
|
||||
|
||||
typedef struct _MswRcStyle MswRcStyle;
|
||||
typedef struct _MswRcStyleClass MswRcStyleClass;
|
||||
|
||||
extern GType msw_type_rc_style;
|
||||
|
||||
#define MSW_TYPE_RC_STYLE msw_type_rc_style
|
||||
#define MSW_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MSW_TYPE_RC_STYLE, MswRcStyle))
|
||||
#define MSW_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSW_TYPE_RC_STYLE, MswRcStyleClass))
|
||||
#define MSW_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MSW_TYPE_RC_STYLE))
|
||||
#define MSW_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MSW_TYPE_RC_STYLE))
|
||||
#define MSW_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MSW_TYPE_RC_STYLE, MswRcStyleClass))
|
||||
|
||||
struct _MswRcStyle
|
||||
{
|
||||
GtkRcStyle parent_instance;
|
||||
|
||||
GList *img_list;
|
||||
};
|
||||
|
||||
struct _MswRcStyleClass
|
||||
{
|
||||
GtkRcStyleClass parent_class;
|
||||
};
|
||||
|
||||
void msw_rc_style_register_type (GTypeModule *module);
|
||||
|
||||
#endif /* MSW_TYPE_RC_STYLE */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,54 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
* Includes code adapted from redmond95 by Owen Taylor, and
|
||||
* gtk-nativewin by Evan Martin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef MSW_STYLE_H
|
||||
#define MSW_STYLE_H
|
||||
|
||||
#include <gtk/gtkstyle.h>
|
||||
|
||||
typedef struct _MswStyle MswStyle;
|
||||
typedef struct _MswStyleClass MswStyleClass;
|
||||
|
||||
extern GType msw_type_style;
|
||||
|
||||
#define MSW_TYPE_STYLE msw_type_style
|
||||
#define MSW_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MSW_TYPE_STYLE, MswStyle))
|
||||
#define MSW_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSW_TYPE_STYLE, MswStyleClass))
|
||||
#define MSW_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MSW_TYPE_STYLE))
|
||||
#define MSW_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MSW_TYPE_STYLE))
|
||||
#define MSW_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MSW_TYPE_STYLE, MswStyleClass))
|
||||
|
||||
struct _MswStyle
|
||||
{
|
||||
GtkStyle parent_instance;
|
||||
};
|
||||
|
||||
struct _MswStyleClass
|
||||
{
|
||||
GtkStyleClass parent_class;
|
||||
};
|
||||
|
||||
void msw_style_register_type (GTypeModule *module);
|
||||
void msw_style_init (void);
|
||||
void msw_style_setup_system_settings (void);
|
||||
|
||||
#endif /* MSW_TYPE_STYLE */
|
||||
@@ -1,102 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
* Includes code adapted from redmond95 by Owen Taylor, and
|
||||
* gtk-nativewin by Evan Martin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <gmodule.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "msw_style.h"
|
||||
#include "msw_rc_style.h"
|
||||
|
||||
#ifndef WM_THEMECHANGED
|
||||
#define WM_THEMECHANGED 0x031A /* winxp only */
|
||||
#endif
|
||||
|
||||
/* TODO - look into whether we need to handle these:
|
||||
*
|
||||
* WM_STYLECHANGED
|
||||
* WM_PALETTECHANGED
|
||||
*/
|
||||
static GdkFilterReturn
|
||||
global_filter_func (void *xevent,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
MSG *msg = (MSG *) xevent;
|
||||
|
||||
switch (msg->message)
|
||||
{
|
||||
#if ENABLE_THEME_CHANGING
|
||||
/* catch theme changes */
|
||||
case WM_THEMECHANGED:
|
||||
case WM_SYSCOLORCHANGE:
|
||||
xp_theme_reset ();
|
||||
msw_style_init ();
|
||||
|
||||
/* force all gtkwidgets to redraw */
|
||||
gtk_rc_reparse_all_for_settings (gtk_settings_get_default(), TRUE);
|
||||
return GDK_FILTER_REMOVE;
|
||||
#endif
|
||||
|
||||
case WM_SETTINGCHANGE:
|
||||
/* catch cursor blink, etc... changes */
|
||||
msw_style_setup_system_settings ();
|
||||
return GDK_FILTER_REMOVE;
|
||||
|
||||
default:
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
theme_init (GTypeModule *module)
|
||||
{
|
||||
msw_rc_style_register_type (module);
|
||||
msw_style_register_type (module);
|
||||
msw_style_init ();
|
||||
gdk_window_add_filter (NULL, global_filter_func, NULL);
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
theme_exit (void)
|
||||
{
|
||||
gdk_window_remove_filter (NULL, global_filter_func, NULL);
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT GtkRcStyle *
|
||||
theme_create_rc_style (void)
|
||||
{
|
||||
return GTK_RC_STYLE (g_object_new (MSW_TYPE_RC_STYLE, NULL));
|
||||
}
|
||||
|
||||
/* The following function will be called by GTK+ when the module
|
||||
* is loaded and checks to see if we are compatible with the
|
||||
* version of GTK+ that loads us.
|
||||
*/
|
||||
G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module);
|
||||
const gchar*
|
||||
g_module_check_init (GModule *module)
|
||||
{
|
||||
return gtk_check_version (GTK_MAJOR_VERSION,
|
||||
GTK_MINOR_VERSION,
|
||||
GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
|
||||
}
|
||||
@@ -1,787 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "xp_theme.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <gdk/gdkwin32.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef DONT_HAVE_UXTHEME_H
|
||||
#include "xp_theme_defs.h"
|
||||
#else
|
||||
#include <uxtheme.h>
|
||||
#include <tmschema.h>
|
||||
#endif
|
||||
|
||||
static const LPCWSTR class_descriptors[] =
|
||||
{
|
||||
L"Scrollbar", /* XP_THEME_CLASS_SCROLLBAR */
|
||||
L"Button", /* XP_THEME_CLASS_BUTTON */
|
||||
L"Header", /* XP_THEME_CLASS_HEADER */
|
||||
L"ComboBox", /* XP_THEME_CLASS_COMBOBOX */
|
||||
L"Tab", /* XP_THEME_CLASS_TAB */
|
||||
L"Edit", /* XP_THEME_CLASS_EDIT */
|
||||
L"TreeView", /* XP_THEME_CLASS_TREEVIEW */
|
||||
L"Spin", /* XP_THEME_CLASS_SPIN */
|
||||
L"Progress", /* XP_THEME_CLASS_PROGRESS */
|
||||
L"Tooltip", /* XP_THEME_CLASS_TOOLTIP */
|
||||
L"Rebar", /* XP_THEME_CLASS_REBAR */
|
||||
L"Toolbar", /* XP_THEME_CLASS_TOOLBAR */
|
||||
L"Globals", /* XP_THEME_CLASS_GLOBALS */
|
||||
L"Menu", /* XP_THEME_CLASS_MENU */
|
||||
L"Window", /* XP_THEME_CLASS_WINDOW */
|
||||
L"Status" /* XP_THEME_CLASS_STATUS */
|
||||
};
|
||||
|
||||
static const short element_part_map[]=
|
||||
{
|
||||
BP_CHECKBOX,
|
||||
BP_CHECKBOX,
|
||||
BP_PUSHBUTTON,
|
||||
HP_HEADERITEM,
|
||||
CP_DROPDOWNBUTTON,
|
||||
TABP_BODY,
|
||||
TABP_TABITEM,
|
||||
TABP_TABITEMLEFTEDGE,
|
||||
TABP_PANE,
|
||||
SBP_THUMBBTNHORZ,
|
||||
SBP_THUMBBTNVERT,
|
||||
SBP_ARROWBTN,
|
||||
SBP_ARROWBTN,
|
||||
SBP_ARROWBTN,
|
||||
SBP_ARROWBTN,
|
||||
SBP_GRIPPERHORZ,
|
||||
SBP_GRIPPERVERT,
|
||||
SBP_LOWERTRACKHORZ,
|
||||
SBP_LOWERTRACKVERT,
|
||||
EP_EDITTEXT,
|
||||
BP_PUSHBUTTON,
|
||||
SPNP_UP,
|
||||
SPNP_DOWN,
|
||||
BP_RADIOBUTTON,
|
||||
BP_RADIOBUTTON,
|
||||
TVP_GLYPH,
|
||||
TVP_GLYPH,
|
||||
PP_CHUNK,
|
||||
PP_CHUNKVERT,
|
||||
PP_BAR,
|
||||
PP_BARVERT,
|
||||
TTP_STANDARD,
|
||||
RP_BAND,
|
||||
RP_GRIPPER,
|
||||
RP_GRIPPERVERT,
|
||||
RP_CHEVRON,
|
||||
TP_BUTTON,
|
||||
MP_MENUITEM,
|
||||
MP_SEPARATOR,
|
||||
SP_GRIPPER,
|
||||
SP_PANE
|
||||
};
|
||||
|
||||
static HINSTANCE uxtheme_dll = NULL;
|
||||
static HTHEME open_themes[XP_THEME_CLASS__SIZEOF];
|
||||
|
||||
typedef HRESULT (FAR PASCAL *GetThemeSysFontFunc)
|
||||
(HTHEME hTheme, int iFontID, OUT LOGFONT *plf);
|
||||
typedef int (FAR PASCAL *GetThemeSysSizeFunc)
|
||||
(HTHEME hTheme, int iSizeId);
|
||||
typedef COLORREF (FAR PASCAL *GetThemeSysColorFunc)(HTHEME hTheme, int iColorID);
|
||||
typedef HTHEME (FAR PASCAL *OpenThemeDataFunc)
|
||||
(HWND hwnd, LPCWSTR pszClassList);
|
||||
typedef HRESULT (FAR PASCAL *CloseThemeDataFunc)(HTHEME theme);
|
||||
typedef HRESULT (FAR PASCAL *DrawThemeBackgroundFunc)
|
||||
(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
|
||||
const RECT *pRect, const RECT *pClipRect);
|
||||
typedef HRESULT (FAR PASCAL *EnableThemeDialogTextureFunc)(HWND hwnd, DWORD dwFlags);
|
||||
typedef BOOL (FAR PASCAL *IsThemeActiveFunc)(VOID);
|
||||
|
||||
static GetThemeSysFontFunc get_theme_sys_font_func = NULL;
|
||||
static GetThemeSysColorFunc get_theme_sys_color_func = NULL;
|
||||
static GetThemeSysSizeFunc get_theme_sys_metric_func = NULL;
|
||||
static OpenThemeDataFunc open_theme_data_func = NULL;
|
||||
static CloseThemeDataFunc close_theme_data_func = NULL;
|
||||
static DrawThemeBackgroundFunc draw_theme_background_func = NULL;
|
||||
static EnableThemeDialogTextureFunc enable_theme_dialog_texture_func = NULL;
|
||||
static IsThemeActiveFunc is_theme_active_func = NULL;
|
||||
|
||||
static gboolean was_theming_active = FALSE;
|
||||
|
||||
static void
|
||||
xp_theme_close_open_handles (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i < XP_THEME_CLASS__SIZEOF; i++)
|
||||
{
|
||||
if (open_themes[i])
|
||||
{
|
||||
close_theme_data_func (open_themes[i]);
|
||||
open_themes[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xp_theme_init (void)
|
||||
{
|
||||
if (uxtheme_dll)
|
||||
return;
|
||||
|
||||
memset(open_themes, 0, sizeof(open_themes));
|
||||
|
||||
uxtheme_dll = LoadLibrary("uxtheme.dll");
|
||||
if (!uxtheme_dll) {
|
||||
was_theming_active = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
is_theme_active_func = (IsThemeActiveFunc) GetProcAddress(uxtheme_dll, "IsThemeActive");
|
||||
open_theme_data_func = (OpenThemeDataFunc) GetProcAddress(uxtheme_dll, "OpenThemeData");
|
||||
close_theme_data_func = (CloseThemeDataFunc) GetProcAddress(uxtheme_dll, "CloseThemeData");
|
||||
draw_theme_background_func = (DrawThemeBackgroundFunc) GetProcAddress(uxtheme_dll, "DrawThemeBackground");
|
||||
enable_theme_dialog_texture_func = (EnableThemeDialogTextureFunc) GetProcAddress(uxtheme_dll, "EnableThemeDialogTexture");
|
||||
get_theme_sys_font_func = (GetThemeSysFontFunc) GetProcAddress(uxtheme_dll, "GetThemeSysFont");
|
||||
get_theme_sys_color_func = (GetThemeSysColorFunc) GetProcAddress(uxtheme_dll, "GetThemeSysColor");
|
||||
get_theme_sys_metric_func = (GetThemeSysSizeFunc) GetProcAddress(uxtheme_dll, "GetThemeSysSize");
|
||||
|
||||
if (is_theme_active_func)
|
||||
{
|
||||
was_theming_active = (*is_theme_active_func) ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xp_theme_reset (void)
|
||||
{
|
||||
xp_theme_close_open_handles ();
|
||||
was_theming_active = is_theme_active_func
|
||||
? (*is_theme_active_func) () : FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
xp_theme_exit (void)
|
||||
{
|
||||
if (! uxtheme_dll)
|
||||
return;
|
||||
|
||||
xp_theme_close_open_handles ();
|
||||
|
||||
FreeLibrary (uxtheme_dll);
|
||||
uxtheme_dll = NULL;
|
||||
|
||||
is_theme_active_func = NULL;
|
||||
open_theme_data_func = NULL;
|
||||
close_theme_data_func = NULL;
|
||||
draw_theme_background_func = NULL;
|
||||
enable_theme_dialog_texture_func = NULL;
|
||||
get_theme_sys_font_func = NULL;
|
||||
get_theme_sys_color_func = NULL;
|
||||
get_theme_sys_metric_func = NULL;
|
||||
}
|
||||
|
||||
static HTHEME
|
||||
xp_theme_get_handle_by_class (XpThemeClass klazz)
|
||||
{
|
||||
if (!open_themes[klazz] && open_theme_data_func)
|
||||
{
|
||||
open_themes[klazz] = open_theme_data_func(NULL, class_descriptors[klazz]);
|
||||
}
|
||||
return open_themes[klazz];
|
||||
}
|
||||
|
||||
static HTHEME
|
||||
xp_theme_get_handle_by_element (XpThemeElement element)
|
||||
{
|
||||
HTHEME ret = NULL;
|
||||
XpThemeClass klazz = XP_THEME_CLASS__SIZEOF;
|
||||
|
||||
switch(element)
|
||||
{
|
||||
case XP_THEME_ELEMENT_TOOLTIP:
|
||||
klazz = XP_THEME_CLASS_TOOLTIP;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_REBAR:
|
||||
case XP_THEME_ELEMENT_REBAR_GRIPPER_H:
|
||||
case XP_THEME_ELEMENT_REBAR_GRIPPER_V:
|
||||
case XP_THEME_ELEMENT_REBAR_CHEVRON:
|
||||
klazz = XP_THEME_CLASS_REBAR;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_STATUS_GRIPPER:
|
||||
case XP_THEME_ELEMENT_STATUS_PANE:
|
||||
klazz = XP_THEME_CLASS_STATUS;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TOOLBAR_BUTTON:
|
||||
klazz = XP_THEME_CLASS_TOOLBAR;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_MENU_ITEM:
|
||||
case XP_THEME_ELEMENT_MENU_SEPARATOR:
|
||||
klazz = XP_THEME_CLASS_MENU;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_PRESSED_CHECKBOX:
|
||||
case XP_THEME_ELEMENT_CHECKBOX:
|
||||
case XP_THEME_ELEMENT_BUTTON:
|
||||
case XP_THEME_ELEMENT_DEFAULT_BUTTON:
|
||||
case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON:
|
||||
case XP_THEME_ELEMENT_RADIO_BUTTON:
|
||||
klazz = XP_THEME_CLASS_BUTTON;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_LIST_HEADER:
|
||||
klazz = XP_THEME_CLASS_HEADER;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_COMBOBUTTON:
|
||||
klazz = XP_THEME_CLASS_COMBOBOX;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_BODY:
|
||||
case XP_THEME_ELEMENT_TAB_ITEM:
|
||||
case XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE:
|
||||
case XP_THEME_ELEMENT_TAB_PANE:
|
||||
klazz = XP_THEME_CLASS_TAB;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_SCROLLBAR_V:
|
||||
case XP_THEME_ELEMENT_SCROLLBAR_H:
|
||||
case XP_THEME_ELEMENT_ARROW_UP:
|
||||
case XP_THEME_ELEMENT_ARROW_DOWN:
|
||||
case XP_THEME_ELEMENT_ARROW_LEFT:
|
||||
case XP_THEME_ELEMENT_ARROW_RIGHT:
|
||||
case XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V:
|
||||
case XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H:
|
||||
case XP_THEME_ELEMENT_TROUGH_V:
|
||||
case XP_THEME_ELEMENT_TROUGH_H:
|
||||
klazz = XP_THEME_CLASS_SCROLLBAR;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_EDIT_TEXT:
|
||||
klazz = XP_THEME_CLASS_EDIT;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_SPIN_BUTTON_UP:
|
||||
case XP_THEME_ELEMENT_SPIN_BUTTON_DOWN:
|
||||
klazz = XP_THEME_CLASS_SPIN;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_PROGRESS_BAR_H:
|
||||
case XP_THEME_ELEMENT_PROGRESS_BAR_V:
|
||||
case XP_THEME_ELEMENT_PROGRESS_TROUGH_H:
|
||||
case XP_THEME_ELEMENT_PROGRESS_TROUGH_V:
|
||||
klazz = XP_THEME_CLASS_PROGRESS;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TREEVIEW_EXPANDER_OPENED:
|
||||
case XP_THEME_ELEMENT_TREEVIEW_EXPANDER_CLOSED:
|
||||
klazz = XP_THEME_CLASS_TREEVIEW;
|
||||
break;
|
||||
}
|
||||
|
||||
if (klazz != XP_THEME_CLASS__SIZEOF)
|
||||
{
|
||||
ret = xp_theme_get_handle_by_class (klazz);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
|
||||
{
|
||||
int ret;
|
||||
|
||||
switch(element)
|
||||
{
|
||||
case XP_THEME_ELEMENT_TOOLTIP:
|
||||
ret = TTSS_NORMAL;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_REBAR:
|
||||
case XP_THEME_ELEMENT_REBAR_GRIPPER_H:
|
||||
case XP_THEME_ELEMENT_REBAR_GRIPPER_V:
|
||||
ret = CHEVS_NORMAL;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_STATUS_GRIPPER:
|
||||
case XP_THEME_ELEMENT_STATUS_PANE:
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_REBAR_CHEVRON:
|
||||
switch (state)
|
||||
{
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = CHEVS_HOT;
|
||||
break;
|
||||
case GTK_STATE_SELECTED:
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = CHEVS_PRESSED;
|
||||
break;
|
||||
default:
|
||||
ret = CHEVS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TOOLBAR_BUTTON:
|
||||
switch (state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = TS_PRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = TS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = TS_DISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = TS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TAB_PANE:
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE:
|
||||
case XP_THEME_ELEMENT_TAB_ITEM:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = TIS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = TIS_DISABLED;
|
||||
break;
|
||||
case GTK_STATE_SELECTED:
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = TIS_NORMAL;
|
||||
break;
|
||||
default:
|
||||
ret = TIS_SELECTED;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_EDIT_TEXT:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = ETS_FOCUSED;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = ETS_READONLY;
|
||||
break;
|
||||
case GTK_STATE_SELECTED:
|
||||
case GTK_STATE_ACTIVE:
|
||||
default:
|
||||
ret = ETS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_SCROLLBAR_H:
|
||||
case XP_THEME_ELEMENT_SCROLLBAR_V:
|
||||
case XP_THEME_ELEMENT_TROUGH_H:
|
||||
case XP_THEME_ELEMENT_TROUGH_V:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_SELECTED:
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = SCRBS_PRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = SCRBS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = SCRBS_DISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = SCRBS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_ARROW_DOWN:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = ABS_DOWNPRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = ABS_DOWNHOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = ABS_DOWNDISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = ABS_DOWNNORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_ARROW_UP:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = ABS_UPPRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = ABS_UPHOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = ABS_UPDISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = ABS_UPNORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_ARROW_LEFT:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = ABS_LEFTPRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = ABS_LEFTHOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = ABS_LEFTDISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = ABS_LEFTNORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_ARROW_RIGHT:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = ABS_RIGHTPRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = ABS_RIGHTHOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = ABS_RIGHTDISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = ABS_RIGHTNORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_CHECKBOX:
|
||||
case XP_THEME_ELEMENT_RADIO_BUTTON:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_SELECTED:
|
||||
ret = CBS_UNCHECKEDPRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = CBS_UNCHECKEDHOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = CBS_UNCHECKEDDISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = CBS_UNCHECKEDNORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_PRESSED_CHECKBOX:
|
||||
case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_SELECTED:
|
||||
ret = CBS_CHECKEDPRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = CBS_CHECKEDHOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = CBS_CHECKEDDISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = CBS_CHECKEDNORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
XP_THEME_ELEMENT_DEFAULT_BUTTON:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = PBS_PRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = PBS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = PBS_DISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = PBS_DEFAULTED;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_SPIN_BUTTON_DOWN:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = DNS_PRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = DNS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = DNS_DISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = DNS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_SPIN_BUTTON_UP:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = UPS_PRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = UPS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = UPS_DISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = UPS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TREEVIEW_EXPANDER_OPENED:
|
||||
ret = GLPS_OPENED;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_TREEVIEW_EXPANDER_CLOSED:
|
||||
ret = GLPS_CLOSED;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_PROGRESS_BAR_H:
|
||||
case XP_THEME_ELEMENT_PROGRESS_BAR_V:
|
||||
case XP_THEME_ELEMENT_PROGRESS_TROUGH_H:
|
||||
case XP_THEME_ELEMENT_PROGRESS_TROUGH_V:
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
case XP_THEME_ELEMENT_MENU_ITEM:
|
||||
case XP_THEME_ELEMENT_MENU_SEPARATOR:
|
||||
switch(state) {
|
||||
case GTK_STATE_SELECTED:
|
||||
ret = MS_SELECTED;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = MS_DEMOTED;
|
||||
break;
|
||||
default:
|
||||
ret = MS_NORMAL;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
switch(state)
|
||||
{
|
||||
case GTK_STATE_ACTIVE:
|
||||
ret = PBS_PRESSED;
|
||||
break;
|
||||
case GTK_STATE_PRELIGHT:
|
||||
ret = PBS_HOT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
ret = PBS_DISABLED;
|
||||
break;
|
||||
default:
|
||||
ret = PBS_NORMAL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
|
||||
int x, int y, int width, int height,
|
||||
GtkStateType state_type, GdkRectangle *area)
|
||||
{
|
||||
HTHEME theme;
|
||||
RECT rect, clip, *pClip;
|
||||
int xoff, yoff, state;
|
||||
HDC dc;
|
||||
GdkDrawable *drawable;
|
||||
int part_state;
|
||||
|
||||
if (! xp_theme_is_drawable (element))
|
||||
return FALSE;
|
||||
|
||||
theme = xp_theme_get_handle_by_element(element);
|
||||
if (!theme)
|
||||
return FALSE;
|
||||
|
||||
/* FIXME: Recheck its function */
|
||||
enable_theme_dialog_texture_func(GDK_WINDOW_HWND(win), ETDT_ENABLETAB);
|
||||
|
||||
if (!GDK_IS_WINDOW(win))
|
||||
{
|
||||
xoff = 0;
|
||||
yoff = 0;
|
||||
drawable = win;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_get_internal_paint_info(win, &drawable, &xoff, &yoff);
|
||||
}
|
||||
rect.left = x - xoff;
|
||||
rect.top = y - yoff;
|
||||
rect.right = rect.left + width;
|
||||
rect.bottom = rect.top + height;
|
||||
|
||||
if (area)
|
||||
{
|
||||
clip.left = area->x - xoff;
|
||||
clip.top = area->y - yoff;
|
||||
clip.right = clip.left + area->width;
|
||||
clip.bottom = clip.top + area->height;
|
||||
|
||||
pClip = &clip;
|
||||
}
|
||||
else
|
||||
{
|
||||
pClip = NULL;
|
||||
}
|
||||
|
||||
gdk_gc_set_clip_rectangle (style->dark_gc[state_type], NULL);
|
||||
dc = gdk_win32_hdc_get(drawable, style->dark_gc[state_type], 0);
|
||||
if (!dc)
|
||||
return FALSE;
|
||||
|
||||
part_state = xp_theme_map_gtk_state(element, state_type);
|
||||
|
||||
#ifdef GNATS_HACK
|
||||
if (element == XP_THEME_ELEMENT_REBAR_GRIPPER_V
|
||||
|| element == XP_THEME_ELEMENT_REBAR_GRIPPER_H)
|
||||
{
|
||||
/* Hack alert: when XP draws a gripper, it does not seem to fill
|
||||
up the whole rectangle. It only fills the gripper line
|
||||
itself. Therefore we manually fill up the background here
|
||||
ourselves. I still have to look into this a bit further, as
|
||||
tests with GNAT Programming System show some awkward
|
||||
interference between this FillRect and the subsequent
|
||||
DrawThemeBackground(). */
|
||||
FillRect (dc, &rect, (HBRUSH) (COLOR_3DFACE+1));
|
||||
}
|
||||
#endif
|
||||
|
||||
draw_theme_background_func(theme, dc, element_part_map[element], part_state, &rect, pClip);
|
||||
gdk_win32_hdc_release(drawable, style->dark_gc[state_type], 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
xp_theme_is_drawable (XpThemeElement element)
|
||||
{
|
||||
if (is_theme_active_func)
|
||||
{
|
||||
gboolean active = (*is_theme_active_func) ();
|
||||
/* A bit of a hack, but it at least detects theme
|
||||
switches between XP and classic looks on systems
|
||||
using older GTK+ version (2.2.0-?) that do not
|
||||
support theme switch detection (gdk_window_add_filter). */
|
||||
if (active != was_theming_active)
|
||||
{
|
||||
xp_theme_reset ();
|
||||
}
|
||||
|
||||
if (active)
|
||||
{
|
||||
return (xp_theme_get_handle_by_element (element) != NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf)
|
||||
{
|
||||
int themeFont;
|
||||
|
||||
if (get_theme_sys_font_func != NULL)
|
||||
{
|
||||
HTHEME theme = xp_theme_get_handle_by_class(klazz);
|
||||
if (!theme)
|
||||
return FALSE;
|
||||
|
||||
switch (fontId)
|
||||
{
|
||||
case XP_THEME_FONT_CAPTION:
|
||||
themeFont = TMT_CAPTIONFONT; break;
|
||||
case XP_THEME_FONT_MENU:
|
||||
themeFont = TMT_MENUFONT; break;
|
||||
case XP_THEME_FONT_STATUS:
|
||||
themeFont = TMT_STATUSFONT; break;
|
||||
case XP_THEME_FONT_MESSAGE:
|
||||
default:
|
||||
themeFont = TMT_MSGBOXFONT; break;
|
||||
}
|
||||
/* if theme is NULL, it will just return the GetSystemFont() value */
|
||||
return ((*get_theme_sys_font_func)(theme, themeFont, lf) == S_OK);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor)
|
||||
{
|
||||
if (get_theme_sys_color_func != NULL)
|
||||
{
|
||||
HTHEME theme = xp_theme_get_handle_by_class(klazz);
|
||||
|
||||
/* if theme is NULL, it will just return the GetSystemColor() value */
|
||||
*pColor = (*get_theme_sys_color_func)(theme, colorId);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal)
|
||||
{
|
||||
if (get_theme_sys_metric_func != NULL)
|
||||
{
|
||||
HTHEME theme = xp_theme_get_handle_by_class(klazz);
|
||||
|
||||
/* if theme is NULL, it will just return the GetSystemMetrics() value */
|
||||
*pVal = (*get_theme_sys_metric_func)(theme, metricId);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef XP_THEME_H
|
||||
#define XP_THEME_H
|
||||
|
||||
#include <windows.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XP_THEME_CLASS_SCROLLBAR = 0,
|
||||
XP_THEME_CLASS_BUTTON,
|
||||
XP_THEME_CLASS_HEADER,
|
||||
XP_THEME_CLASS_COMBOBOX,
|
||||
XP_THEME_CLASS_TAB,
|
||||
XP_THEME_CLASS_EDIT,
|
||||
XP_THEME_CLASS_TREEVIEW,
|
||||
XP_THEME_CLASS_SPIN,
|
||||
XP_THEME_CLASS_PROGRESS,
|
||||
XP_THEME_CLASS_TOOLTIP,
|
||||
XP_THEME_CLASS_REBAR,
|
||||
XP_THEME_CLASS_TOOLBAR,
|
||||
XP_THEME_CLASS_GLOBALS,
|
||||
XP_THEME_CLASS_MENU,
|
||||
XP_THEME_CLASS_WINDOW,
|
||||
XP_THEME_CLASS_STATUS,
|
||||
XP_THEME_CLASS__SIZEOF
|
||||
} XpThemeClass;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XP_THEME_ELEMENT_PRESSED_CHECKBOX = 0,
|
||||
XP_THEME_ELEMENT_CHECKBOX,
|
||||
XP_THEME_ELEMENT_BUTTON,
|
||||
XP_THEME_ELEMENT_LIST_HEADER,
|
||||
XP_THEME_ELEMENT_COMBOBUTTON,
|
||||
XP_THEME_ELEMENT_BODY,
|
||||
XP_THEME_ELEMENT_TAB_ITEM,
|
||||
XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE,
|
||||
XP_THEME_ELEMENT_TAB_PANE,
|
||||
XP_THEME_ELEMENT_SCROLLBAR_H,
|
||||
XP_THEME_ELEMENT_SCROLLBAR_V,
|
||||
XP_THEME_ELEMENT_ARROW_UP,
|
||||
XP_THEME_ELEMENT_ARROW_DOWN,
|
||||
XP_THEME_ELEMENT_ARROW_LEFT,
|
||||
XP_THEME_ELEMENT_ARROW_RIGHT,
|
||||
XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H,
|
||||
XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V,
|
||||
XP_THEME_ELEMENT_TROUGH_H,
|
||||
XP_THEME_ELEMENT_TROUGH_V,
|
||||
XP_THEME_ELEMENT_EDIT_TEXT,
|
||||
XP_THEME_ELEMENT_DEFAULT_BUTTON,
|
||||
XP_THEME_ELEMENT_SPIN_BUTTON_UP,
|
||||
XP_THEME_ELEMENT_SPIN_BUTTON_DOWN,
|
||||
XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON,
|
||||
XP_THEME_ELEMENT_RADIO_BUTTON,
|
||||
XP_THEME_ELEMENT_TREEVIEW_EXPANDER_OPENED,
|
||||
XP_THEME_ELEMENT_TREEVIEW_EXPANDER_CLOSED,
|
||||
XP_THEME_ELEMENT_PROGRESS_BAR_H,
|
||||
XP_THEME_ELEMENT_PROGRESS_BAR_V,
|
||||
XP_THEME_ELEMENT_PROGRESS_TROUGH_H,
|
||||
XP_THEME_ELEMENT_PROGRESS_TROUGH_V,
|
||||
XP_THEME_ELEMENT_TOOLTIP,
|
||||
XP_THEME_ELEMENT_REBAR,
|
||||
XP_THEME_ELEMENT_REBAR_GRIPPER_H,
|
||||
XP_THEME_ELEMENT_REBAR_GRIPPER_V,
|
||||
XP_THEME_ELEMENT_REBAR_CHEVRON,
|
||||
XP_THEME_ELEMENT_TOOLBAR_BUTTON,
|
||||
XP_THEME_ELEMENT_MENU_ITEM,
|
||||
XP_THEME_ELEMENT_MENU_SEPARATOR,
|
||||
XP_THEME_ELEMENT_STATUS_GRIPPER,
|
||||
XP_THEME_ELEMENT_STATUS_PANE,
|
||||
XP_THEME_ELEMENT__SIZEOF
|
||||
} XpThemeElement;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XP_THEME_FONT_CAPTION,
|
||||
XP_THEME_FONT_MENU,
|
||||
XP_THEME_FONT_STATUS,
|
||||
XP_THEME_FONT_MESSAGE
|
||||
} XpThemeFont;
|
||||
|
||||
void xp_theme_init (void);
|
||||
void xp_theme_reset (void);
|
||||
void xp_theme_exit (void);
|
||||
gboolean xp_theme_draw (GdkWindow *win, XpThemeElement element,
|
||||
GtkStyle *style, int x, int y, int width,
|
||||
int height, GtkStateType state_type,
|
||||
GdkRectangle *area);
|
||||
gboolean xp_theme_is_drawable (XpThemeElement element);
|
||||
gboolean xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf);
|
||||
gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor);
|
||||
gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal);
|
||||
|
||||
#endif /* XP_THEME_H */
|
||||
@@ -1,177 +0,0 @@
|
||||
/* MS-Windows Engine (aka GTK-Wimp)
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Dom Lachowicz <cinamod@hotmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are the real values of these UXTHEME constants, provided so that we can
|
||||
* compile/link on Win32 platforms that aren't WinXP, and also build against
|
||||
* MinGW 1.0/1.1, which also doesn't have these things defined in its header files
|
||||
*/
|
||||
|
||||
#ifndef XP_THEME_DFNS_H
|
||||
#define XP_THEME_DFNS_H
|
||||
|
||||
typedef HANDLE HTHEME;
|
||||
|
||||
#define ETDT_ENABLE 0x00000002
|
||||
#define ETDT_USETABTEXTURE 0x00000004
|
||||
#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
|
||||
|
||||
#define BP_PUSHBUTTON 1
|
||||
#define BP_CHECKBOX 3
|
||||
|
||||
#define HP_HEADERITEM 1
|
||||
|
||||
#define CP_DROPDOWNBUTTON 1
|
||||
|
||||
#define TABP_TABITEM 1
|
||||
#define TABP_TABITEMLEFTEDGE 2
|
||||
#define TABP_PANE 9
|
||||
#define TABP_BODY 10
|
||||
|
||||
#define SBP_ARROWBTN 1
|
||||
#define SBP_THUMBBTNHORZ 2
|
||||
#define SBP_THUMBBTNVERT 3
|
||||
#define SBP_LOWERTRACKHORZ 5
|
||||
#define SBP_LOWERTRACKVERT 6
|
||||
#define SBP_GRIPPERHORZ 8
|
||||
#define SBP_GRIPPERVERT 9
|
||||
|
||||
#define EP_EDITTEXT 1
|
||||
|
||||
#define SPNP_UP 1
|
||||
#define SPNP_DOWN 2
|
||||
|
||||
#define BP_RADIOBUTTON 2
|
||||
|
||||
#define TVP_GLYPH 2
|
||||
|
||||
#define PP_BAR 1
|
||||
#define PP_BARVERT 2
|
||||
#define PP_CHUNK 3
|
||||
#define PP_CHUNKVERT 4
|
||||
|
||||
#define TTP_STANDARD 1
|
||||
|
||||
#define RP_GRIPPER 1
|
||||
#define RP_GRIPPERVERT 2
|
||||
#define RP_BAND 3
|
||||
#define RP_CHEVRON 4
|
||||
|
||||
#define TP_BUTTON 1
|
||||
#define TS_NORMAL 1
|
||||
#define TS_HOT 2
|
||||
#define TS_PRESSED 3
|
||||
#define TS_DISABLED 4
|
||||
|
||||
#define TTSS_NORMAL 1
|
||||
|
||||
#define CHEVS_NORMAL 1
|
||||
#define CHEVS_HOT 2
|
||||
#define CHEVS_PRESSED 3
|
||||
|
||||
#define TIS_NORMAL 1
|
||||
#define TIS_HOT 2
|
||||
#define TIS_SELECTED 3
|
||||
#define TIS_DISABLED 4
|
||||
|
||||
#define ETS_NORMAL 1
|
||||
#define ETS_FOCUSED 5
|
||||
#define ETS_READONLY 6
|
||||
|
||||
#define SCRBS_NORMAL 1
|
||||
#define SCRBS_HOT 2
|
||||
#define SCRBS_PRESSED 3
|
||||
#define SCRBS_DISABLED 4
|
||||
|
||||
#define ABS_UPNORMAL 1
|
||||
#define ABS_UPHOT 2
|
||||
#define ABS_UPPRESSED 3
|
||||
#define ABS_UPDISABLED 4
|
||||
#define ABS_DOWNNORMAL 5
|
||||
#define ABS_DOWNHOT 6
|
||||
#define ABS_DOWNPRESSED 7
|
||||
#define ABS_DOWNDISABLED 8
|
||||
#define ABS_LEFTNORMAL 9
|
||||
#define ABS_LEFTHOT 10
|
||||
#define ABS_LEFTPRESSED 11
|
||||
#define ABS_LEFTDISABLED 12
|
||||
#define ABS_RIGHTNORMAL 13
|
||||
#define ABS_RIGHTHOT 14
|
||||
#define ABS_RIGHTPRESSED 15
|
||||
#define ABS_RIGHTDISABLED 16
|
||||
|
||||
#define CBS_UNCHECKEDNORMAL 1
|
||||
#define CBS_UNCHECKEDHOT 2
|
||||
#define CBS_UNCHECKEDPRESSED 3
|
||||
#define CBS_UNCHECKEDDISABLED 4
|
||||
#define CBS_CHECKEDNORMAL 5
|
||||
#define CBS_CHECKEDHOT 6
|
||||
#define CBS_CHECKEDPRESSED 7
|
||||
#define CBS_CHECKEDDISABLED 8
|
||||
|
||||
#define PBS_NORMAL 1
|
||||
#define PBS_HOT 2
|
||||
#define PBS_PRESSED 3
|
||||
#define PBS_DISABLED 4
|
||||
#define PBS_DEFAULTED 5
|
||||
|
||||
#define DNS_NORMAL 1
|
||||
#define DNS_HOT 2
|
||||
#define DNS_PRESSED 3
|
||||
#define DNS_DISABLED 4
|
||||
|
||||
#define UPS_NORMAL 1
|
||||
#define UPS_HOT 2
|
||||
#define UPS_PRESSED 3
|
||||
#define UPS_DISABLED 4
|
||||
|
||||
#define GLPS_CLOSED 1
|
||||
#define GLPS_OPENED 2
|
||||
|
||||
#define MP_MENUITEM 1
|
||||
#define MP_SEPARATOR 6
|
||||
#define MS_NORMAL 1
|
||||
#define MS_SELECTED 2
|
||||
#define MS_DEMOTED 3
|
||||
|
||||
#define SP_PANE 1
|
||||
#define SP_GRIPPER 2
|
||||
|
||||
#define TMT_CAPTIONFONT 801
|
||||
#define TMT_MENUFONT 803
|
||||
#define TMT_STATUSFONT 804
|
||||
#define TMT_MSGBOXFONT 805
|
||||
|
||||
#if UXTHEME_HAS_LINES
|
||||
|
||||
#error unknown/undocumented uxtheme values
|
||||
|
||||
/* #define GP_LINEHORZ */
|
||||
/* #define GP_LINEVERT */
|
||||
/* #define LHS_RAISED */
|
||||
/* #define LHS_SUNKEN */
|
||||
/* #define LHS_FLAT */
|
||||
/* #define LVS_RAISED */
|
||||
/* #define LVS_SUNKEN */
|
||||
/* #define LHS_FLAT */
|
||||
|
||||
#endif /* UXTHEME_HAS_LINES */
|
||||
|
||||
#endif /* XP_THEME_DFNS_H */
|
||||
@@ -1,6 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
||||
@@ -1,271 +0,0 @@
|
||||
Thu Mar 18 10:07:15 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-draw.c (match_theme_image): Fix ./-> typo.
|
||||
(Federic Crozat)
|
||||
|
||||
Wed Mar 17 16:38:00 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-draw.c (match_theme_image): Fix problem with
|
||||
NULL details. (#112066, MINAMI Hirokazu, Matthias Clasen)
|
||||
|
||||
2003-07-15 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* pixbuf-render.c: make pixbuf_cache static to avoid
|
||||
possible symbol conflicts.
|
||||
|
||||
2003-03-02 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* Makefile.am: Use -no-undefined on Windows.
|
||||
|
||||
Fri Sep 6 20:32:45 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-draw.c: Account for the possibility of detail == NULL
|
||||
(#89561, Hongli Lai, Luca Barbato)
|
||||
|
||||
Sun Apr 21 14:10:04 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-rc-style.c pixbuf.h pixbuf-draw.c: Add a fake STEPPER
|
||||
function that is used for drawing scrollbar steppers,
|
||||
so that themes that want to draw the button and arrow
|
||||
separately can override the default handling.
|
||||
|
||||
* pixbuf-draw.c: Remove draw_polygon() since it was
|
||||
just a cut-and-paste of the default one. Remove
|
||||
some unused code.
|
||||
|
||||
2002-03-07 James Henstridge <james@daa.com.au>
|
||||
|
||||
* Makefile.am (libpixmap_la_LIBADD): link pixbuf engine against
|
||||
the gtk+ libraries, so that it can be used with programs that
|
||||
dlopen gtk+ without the RTLD_GLOBAL flag (such as scripting
|
||||
languages and mozilla).
|
||||
|
||||
Thu Feb 7 00:21:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-render.c (pixbuf_render): Add gradient
|
||||
rendering -- if the source width/height is zero,
|
||||
render a gradient from the surrounding values.
|
||||
|
||||
Mon Jan 28 15:34:43 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-render.c (compute_hint): Fix hint computation
|
||||
again.
|
||||
|
||||
Mon Jan 28 12:17:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-render.c (compute_hint): Fix problems in computing
|
||||
MISSING hint.
|
||||
|
||||
Sun Jan 27 23:58:13 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf-render.c (compute_hint): Optimize the case
|
||||
where a component is entirely transparent by skipping
|
||||
drawing it.
|
||||
|
||||
* pixbuf-rc-style.c (theme_parse_image): Catch case
|
||||
where background or overlay border/stretch are specified
|
||||
without a background image.
|
||||
|
||||
* pixbuf-render.c (theme_pixbuf_destroy): Actually free
|
||||
the structure and filename.
|
||||
|
||||
=================== Move back into gtk-engines ====================
|
||||
|
||||
Sat Jan 19 02:45:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/pixbuf-render.c (theme_pixbuf_compute_hints): Catch
|
||||
invalid borders, and warn.
|
||||
|
||||
Sat Jan 19 00:32:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* examples/*: Add an extrodinarily ugly example.
|
||||
|
||||
* src/pixbuf-draw.c (draw_simple_image): Never shape
|
||||
the window, even if we are allowed to. Shaping is
|
||||
ugly -- if the widget isn't NO_WINDOW (most are),
|
||||
you'll just have to draw it rectangular.
|
||||
|
||||
* src/pixbuf-render.c (pixbuf_render): Always use
|
||||
gdk_pixbuf_render_alpha() with FULL_ALPHA() as the
|
||||
type.
|
||||
|
||||
* pixbuf.h src/pixbuf-render.c (theme_pixbuf_compute_hints): To
|
||||
speed up scaling, cache whether pixbufs have constant rows
|
||||
or constant columns.
|
||||
|
||||
* src/pixbuf-render.c (pixbuf_render): Speed up scaling
|
||||
by using the hints from compute_hints().
|
||||
|
||||
Fri Jan 18 20:49:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use pkg-config to get the binray version
|
||||
of GTK+ that we use for an install path.
|
||||
|
||||
Fri Jan 18 18:14:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/pixbuf-draw.c (draw_focus): Fix for changes to draw_focus.
|
||||
|
||||
2001-09-21 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* src/pixbuf-rc-style-c : GtkRcStyle::parse has a GtkSettings
|
||||
parameter now. Pass it through theme_parse_file () to use it
|
||||
gtk_rc_find_pixmap_in_path ()
|
||||
|
||||
* src/pixbuf-draw.c : the font field from GtkStyle is private
|
||||
now, use accessor gtk_style_get_font ()
|
||||
|
||||
* makefile.msc : compile on win32, use it if you have a _real_
|
||||
fast computer or want to see gtk in slow motion :-)
|
||||
|
||||
Thu May 3 05:36:06 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixbuf.h: Fix trailing comma on enumeration. (#54071)
|
||||
|
||||
2001-03-05 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* src/pixbuf-draw.c: made the "parent_class" pointer static.
|
||||
|
||||
(Owen, I just commented out the draw methods which don't exist any
|
||||
more to make it compile).
|
||||
|
||||
2001-02-20 Sven Neumann <sven@convergence.de>
|
||||
|
||||
* src/pixbuf-draw.c (draw_vline): use draw_vline method of
|
||||
parent_class, not draw_hline
|
||||
|
||||
Wed Nov 15 21:56:28 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/pixbuf-*: A few updates for GTypePlugin.
|
||||
|
||||
Tue Jul 18 12:13:19 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Updates to work with GTK+-2.0 theme engine architecture.
|
||||
It won't even sort of work with GTK+-1.2 any more.
|
||||
|
||||
* configure.in src/Makefile.am: Look for GTK+-2.0,
|
||||
install engine into GTK+-2.0 location.
|
||||
|
||||
* src/pixbuf-style.h src/pixbuf-rc-style.[ch]: New
|
||||
files for GtkRcStyle and GtkStyle subclasses. Parsing,
|
||||
etc, moves to pixbuf-rc-style.[ch]
|
||||
|
||||
* src/pixbuf-draw.c: Chain up to parent implementation
|
||||
when images aren't found for a certain element.
|
||||
|
||||
Sun Jul 9 18:15:58 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in (ACLOCAL): Add -Wall for gcc.
|
||||
|
||||
* src/pixbuf-render.c (pixbuf_render): Fix problem
|
||||
using gdk_rectangle_intersect() from GTK+-1.2.
|
||||
|
||||
* src/pixbuf-render.c src/pixbuf-draw.c: Remove
|
||||
direct access to pixbuf internals.
|
||||
|
||||
Mon Mar 6 11:44:58 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* docs/gap-geometry.fig: Moved into docs/ subdir
|
||||
|
||||
* Makefile.am configure.in autogen.sh src/Makefile.am:
|
||||
automakify
|
||||
|
||||
* src/pixbuf.h src/pixbuf-render.c src/pixbuf-draw.c
|
||||
src/pixbuf-main.c: Move sources into subdir and
|
||||
rename.
|
||||
|
||||
Mon Mar 6 11:02:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_pixbuf.c: Handle drawing transparency without a
|
||||
mask correctly.
|
||||
|
||||
* pixmap_theme_main.c pixmap_theme_draw.c: Remove duplicate
|
||||
includes.
|
||||
|
||||
Sun Feb 6 21:34:30 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Started ChangeLog for pixbuf engine, check sources
|
||||
into CVS.
|
||||
|
||||
========== ChangeLog for pixmap engine ===================
|
||||
|
||||
1999-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* pixmap_theme_main.c (theme_duplicate_style): Really copy the
|
||||
`src_data->img_list', not just the pointer that points to it.
|
||||
|
||||
Tue Oct 5 15:13:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_draw.c (apply_theme_image): Don't set
|
||||
background pixmap on pixmaps.
|
||||
|
||||
1999-02-14 Raja R Harinath <harinath@cs.umn.edu>
|
||||
|
||||
* Theme/gtk/Makefile.am.in (Makefile.am): Handle the case when
|
||||
files are deleted.
|
||||
|
||||
Thu Feb 11 21:16:53 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_main.c (theme_data_unref): Free the
|
||||
theme data structure as well as the contents.
|
||||
|
||||
1999-02-03 Raja R Harinath <harinath@cs.umn.edu>
|
||||
|
||||
* Theme/gtk/Makefile.am.in: New file. Theme/gtk/Makefile.am is
|
||||
generated from this file when new *.png files are added.
|
||||
|
||||
1999-01-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* pixmap_theme_main.c (theme_init): Turn on pixmap cache.
|
||||
|
||||
Mon Jan 18 13:37:23 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Theme/gtk/gtkrc: Give buttons a gray background
|
||||
color so they look a little less funny when initially
|
||||
drawing.
|
||||
|
||||
Wed Jan 13 18:58:25 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_draw.c: Fixed pervasive mis-bracketing
|
||||
that was causing drawing if the drawn region and
|
||||
clipping region did NOT intersect, and a couple
|
||||
of errors in computing source and destination
|
||||
regions.
|
||||
|
||||
1998-11-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* pixmap_theme_draw.c: #include <math.h>
|
||||
|
||||
1998-11-07 Raja R Harinath <harinath@cs.umn.edu>
|
||||
|
||||
* Theme/gtk/Makefile.am (theme_DATA):
|
||||
Update to new directory contents.
|
||||
* configure.in: Remove.
|
||||
|
||||
Fri Nov 6 17:26:12 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_main.c: Removed some debugging
|
||||
printf's.
|
||||
|
||||
* Theme/gtk/notebook1.c Theme/gtk/menubar.png: new
|
||||
bigger pixmaps to reduce pixelation.
|
||||
|
||||
* Theme/gtk/gtkrc: Reorganized to use several styles
|
||||
instead of one huge style. Change clist backgrounds
|
||||
to be prettier.
|
||||
|
||||
Thu Nov 5 10:23:46 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_draw.c (draw_shadow_gap): Fixed hard-coded
|
||||
gap_side of '0'.
|
||||
|
||||
Mon Nov 2 14:46:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_draw.c (apply_theme_image_shadow_gap): Removed
|
||||
several hundred lines of duplicated code with a bit of
|
||||
reoriganization.
|
||||
|
||||
Wed Oct 28 16:18:04 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* pixmap_theme_main.c (theme_symbols): Removed lots
|
||||
and lots of white space.
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
if OS_WIN32
|
||||
no_undefined = -no-undefined
|
||||
endif
|
||||
|
||||
INCLUDES = $(GTK_CFLAGS)
|
||||
|
||||
enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines
|
||||
|
||||
engine_LTLIBRARIES = libpixmap.la
|
||||
|
||||
libpixmap_la_SOURCES = \
|
||||
pixbuf-draw.c \
|
||||
pixbuf-main.c \
|
||||
pixbuf-render.c \
|
||||
pixbuf-rc-style.c \
|
||||
pixbuf-rc-style.h \
|
||||
pixbuf-style.h \
|
||||
pixbuf.h
|
||||
|
||||
libpixmap_la_LDFLAGS = -avoid-version -module $(no_undefined)
|
||||
libpixmap_la_LIBADD = $(GTK_LIBS)
|
||||
|
||||
dist-hook:
|
||||
cp -pr examples $(distdir); \
|
||||
find $(distdir)/examples -name 'CVS' -print | xargs rm -rf
|
||||
@@ -1,17 +0,0 @@
|
||||
The code in this directory is a GTK+ theme engine based on the earlier
|
||||
pixmap theme engine.
|
||||
|
||||
The config files are meant to be compatible, but instead of rendering
|
||||
using Imlib, it renders using GdkPixbuf. This makes the memory
|
||||
management much more understandable, and also allows us to use
|
||||
GdkPixbuf's high quality scaling.
|
||||
|
||||
Most of the code was reworked/rewritten in the process to make it more
|
||||
understandable and maintainable.
|
||||
|
||||
There are lots of bugs here, a considersable number of bugs. But it's
|
||||
cleaned up a great deal from the older pixmap engine. Please don't
|
||||
make it uglier again.
|
||||
|
||||
Owen Taylor <otaylor@redhat.com>
|
||||
6 February 2000
|
||||
@@ -1,14 +0,0 @@
|
||||
gtk-2.0/triangle-background.png is copyright Owen Taylor, 1997
|
||||
and may be used without restriction as long as this attribution
|
||||
is reproduced.
|
||||
|
||||
images/bc.pnm images/bc-dark.pnm images/bc-light.png are
|
||||
from the BrushedMetalClean theme; I believe Tuomas Kuosmanen
|
||||
and Carsten Haitzler had something to do with the original
|
||||
BrushedMetal artwork.
|
||||
|
||||
This theme is truly hideous for a reason ... to demonstrate
|
||||
that alpha-compositing is going on.
|
||||
|
||||
Owen Taylor
|
||||
19 Jan 2002x
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 836 B |
Binary file not shown.
@@ -1,65 +0,0 @@
|
||||
style "default"
|
||||
{
|
||||
fg[NORMAL] = "#ffffff"
|
||||
fg[PRELIGHT] = "#ffffff"
|
||||
bg_pixmap[NORMAL] = "triangle_background.png"
|
||||
# bg_pixmap[NORMAL] = "bc.png"
|
||||
bg_pixmap[PRELIGHT] = "bc-light.png"
|
||||
bg_pixmap[ACTIVE] = "bc-dark.png" bg_pixmap[INSENSITIVE] = "bc.png"
|
||||
}
|
||||
|
||||
class "GtkWidget" style "default"
|
||||
|
||||
style "bubble-button"
|
||||
{
|
||||
engine "pixmap"
|
||||
{
|
||||
image
|
||||
{
|
||||
function = BOX
|
||||
file = "bubble-blue.png"
|
||||
border = { 8, 8, 8, 8 }
|
||||
stretch = TRUE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# common default
|
||||
class "GtkButton" style "bubble-button"
|
||||
|
||||
style "bubble-range"
|
||||
{
|
||||
GtkRange::slider_width = 16
|
||||
GtkRange::stepper_size = 16
|
||||
|
||||
engine "pixmap"
|
||||
{
|
||||
image
|
||||
{
|
||||
function = BOX
|
||||
file = "bubble-blue.png"
|
||||
border = { 8, 8, 8, 8 }
|
||||
stretch = TRUE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# common default
|
||||
class "GtkRange" style "bubble-range"
|
||||
|
||||
style "bubble-menuitem"
|
||||
{
|
||||
engine "pixmap"
|
||||
{
|
||||
image
|
||||
{
|
||||
function = BOX
|
||||
file = "bubble-blue.png"
|
||||
border = { 8, 8, 8, 8 }
|
||||
stretch = TRUE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# common default
|
||||
class "GtkMenuItem" style "bubble-menuitem"
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user