Compare commits
231 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21b6ed0024 | |||
| f0470f324f | |||
| a513619a93 | |||
| a7c6f4b12f | |||
| cb6fc02331 | |||
| b12b6a1c0c | |||
| 35f2ae1b04 | |||
| caf17bae51 | |||
| 4e83fe3789 | |||
| e25fac892f | |||
| d3558f7ed0 | |||
| 03928c314d | |||
| 0c1868687b | |||
| dfe3abc6bb | |||
| 592d066f47 | |||
| 96469e5c58 | |||
| a60f34aa64 | |||
| 7c559c84bd | |||
| 6659bc7689 | |||
| 856280b3a2 | |||
| 9ea1a43096 | |||
| 4b2738a1f9 | |||
| 76f0399c32 | |||
| 35da76eb76 | |||
| e2db438a36 | |||
| b3a1c4cdb7 | |||
| fa490ed236 | |||
| 828f8f1790 | |||
| 9e33d2fdb2 | |||
| 9a48d49800 | |||
| ef3d6268cb | |||
| 18c9a83f6a | |||
| 6c34731239 | |||
| a30defcfb7 | |||
| 1cc736c580 | |||
| a7b56ed43a | |||
| 0c5a240d95 | |||
| 7bff1ab7f1 | |||
| 5e70dc2195 | |||
| d4dd35cc91 | |||
| a0dd1f6422 | |||
| d25d08df51 | |||
| 60a234502d | |||
| 4aebc900bf | |||
| a57007f3dc | |||
| 3e2b7e6e73 | |||
| 1e5c150247 | |||
| 29a894798f | |||
| fe44a57d85 | |||
| 8fbbb83346 | |||
| 16ce403888 | |||
| 458838db34 | |||
| d3600de92b | |||
| 4e8c9fd5f8 | |||
| b57b98d90a | |||
| 93e373f0b4 | |||
| 38cdac231c | |||
| 14355e7c80 | |||
| 012d8d6db4 | |||
| 1df7de983e | |||
| 141e5c5822 | |||
| a74a80316c | |||
| 3c1fc24f61 | |||
| 72ccf58edd | |||
| e127a96aec | |||
| ea9d754c98 | |||
| 0e041a4ec8 | |||
| 08575ff7da | |||
| 82e6e840eb | |||
| e71e55d9a4 | |||
| 0f7f6be8e9 | |||
| 0339de7d61 | |||
| 24fec1aa10 | |||
| b4f7784a84 | |||
| ea93a69ab0 | |||
| b9200e9fc5 | |||
| 6562773a5a | |||
| f5562e56e0 | |||
| 5480e6df2f | |||
| e34eab22da | |||
| 1caa77bff2 | |||
| f6acde711b | |||
| ad8b4aa0a3 | |||
| 1cd1200389 | |||
| 52d4111e05 | |||
| 029c0c57fb | |||
| b14bb6fab7 | |||
| 2765a5dc29 | |||
| 69f8c2e191 | |||
| fdf7779855 | |||
| 8336011a85 | |||
| 5c99c4191d | |||
| af408222c8 | |||
| d4cc6b28e3 | |||
| 3b055b39f2 | |||
| 3c7e718b50 | |||
| 61d98323eb | |||
| f681b064bf | |||
| 85b1a31c26 | |||
| 1f8e9d3940 | |||
| 8bca0c3613 | |||
| 38ed5b667b | |||
| cd718e6e36 | |||
| f1585b7a71 | |||
| 49cbd0eed8 | |||
| f6fbddcfe9 | |||
| 2c3c209251 | |||
| 298c435472 | |||
| 730f0f6f3c | |||
| 4fc5f91b8b | |||
| 61a352d098 | |||
| 283bfba565 | |||
| 45029c6757 | |||
| 3dac77f834 | |||
| 4f17bf78b3 | |||
| d11badd3e7 | |||
| 55a7c31665 | |||
| 8d0574f9cf | |||
| 2216c39e7b | |||
| d28b8f4088 | |||
| fd5394784a | |||
| eed718e4e6 | |||
| db1593b8be | |||
| 9f3677418b | |||
| 9c4dd6ae2d | |||
| 46136af6dc | |||
| 96d8e1a1bf | |||
| 68e7f35d09 | |||
| e85e700956 | |||
| 115784bb38 | |||
| d097228c65 | |||
| e5a2f7918b | |||
| 75732772a8 | |||
| baace30f74 | |||
| ab468d6f14 | |||
| 25715c3e29 | |||
| 88de2b3ec7 | |||
| ca488d49a1 | |||
| a7f47a40cf | |||
| e735139d68 | |||
| b3aa6a8cac | |||
| 8fb41e93d3 | |||
| 1b7d3176f5 | |||
| 596dbc3ce8 | |||
| cd90db1183 | |||
| 897cf3b056 | |||
| 099eec9a9f | |||
| 834e201312 | |||
| 3504894d6e | |||
| 0d74b72f3e | |||
| 8ef635d70f | |||
| 1cfa260e5f | |||
| 9fe8aa7720 | |||
| 2a0d8d75d6 | |||
| 77ddd7a36c | |||
| 10e0f1987d | |||
| 8c4c96adc7 | |||
| 61011d78f4 | |||
| 59bfd418f8 | |||
| 76759f3410 | |||
| 74da02e12e | |||
| e4c92bc39d | |||
| bd3c57680e | |||
| e02da6db6e | |||
| 18f28738c3 | |||
| 44a2993b28 | |||
| d479089f90 | |||
| 6648dc472c | |||
| 22ee9e6c58 | |||
| d18a438c0c | |||
| 878c63a65f | |||
| 51c6946dfb | |||
| bd327b904e | |||
| 922f4b758d | |||
| 10b0e1f552 | |||
| 477dc904aa | |||
| afb3753cee | |||
| 2220844829 | |||
| b308f4bb7f | |||
| dd82bb711d | |||
| 8e4ed16d9d | |||
| 7d5a80c6e6 | |||
| 3ddd8080e4 | |||
| 18f9b50665 | |||
| b3549a7813 | |||
| 73060c73fa | |||
| 3500552ac9 | |||
| 4e0391e73f | |||
| e2573ade4f | |||
| 01635ceb4b | |||
| d64ae9b682 | |||
| b45279ee5b | |||
| b199e7e7de | |||
| 38aec4a63e | |||
| 9dfc161c87 | |||
| 1c705dd477 | |||
| c9e6506fa0 | |||
| be1977f4ea | |||
| 7e6a27464a | |||
| fd065333eb | |||
| 3d74f1d64b | |||
| 17267663ad | |||
| 48817f35e3 | |||
| 6823afb03d | |||
| 3d52e58cdd | |||
| f16215fd66 | |||
| 1d1b02b9a4 | |||
| 9d6836145a | |||
| 3ed761f3ba | |||
| 20816d91eb | |||
| 47daaa2e88 | |||
| bd60a8f839 | |||
| 767cd6abd9 | |||
| 045b188be0 | |||
| 84db15f503 | |||
| 2feb926544 | |||
| a915d5b34d | |||
| 017eceaad2 | |||
| 15a7fbbb12 | |||
| b9e87239a8 | |||
| a37a5febe8 | |||
| 50221cc0ea | |||
| c8c087e2fe | |||
| 4586870479 | |||
| 1dd674cfbb | |||
| 86c3f0ed56 | |||
| b33b49d6fb | |||
| 3c0ca31948 | |||
| 70bce53b8e | |||
| ebc47dba8d | |||
| 1cfd18662b |
@@ -1,3 +1,978 @@
|
||||
2005-11-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.7 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
|
||||
leak. (#321032, Peter Zelezny)
|
||||
|
||||
2005-11-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkselection.c (gtk_selection_data_set_uris): Don't
|
||||
leak result. (#321441, Tommi Komulainen)
|
||||
|
||||
2005-11-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
|
||||
Don't crash if there is no builtin icon.
|
||||
|
||||
2005-11-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkcolor.c (gdk_color_parse): Documentation
|
||||
improvements. (#321338)
|
||||
|
||||
* gtk/gtktextiter.c (gtk_text_iter_forward_search): Make
|
||||
limit an inclusive boundary. (#321299)
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
2005-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c: Make it compile.
|
||||
|
||||
2005-11-12 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
|
||||
theme's handling of toolbars, handleboxes, and menubars more in-line
|
||||
with Microsoft's IE style.
|
||||
* modules/engines/ms-windows/*.c: Indentation cleanups
|
||||
|
||||
2005-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Make builtin icons work in gtk_window_set_icon_name()
|
||||
(#321046, Maxim Udushlivy)
|
||||
|
||||
* gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
|
||||
Also check builtin icons.
|
||||
|
||||
2005-11-12 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (filename_get_info): Don't hide
|
||||
dotfiles, no such convention on Win32. Just hide files with the
|
||||
hidden attribute. (#314627)
|
||||
|
||||
2005-11-11 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
|
||||
the base path of the volume if it is mounted.
|
||||
|
||||
2005-11-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_motion_resize_column): Remove
|
||||
another erroneous semicolon.
|
||||
|
||||
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get): Remove an erroneous
|
||||
semicolon.
|
||||
|
||||
Don't corrupt odd keymaps (#316638, Kean Johnston)
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
|
||||
handle frobbing keymaps with odd numbers of syms/code.
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
|
||||
frob the keymap.
|
||||
|
||||
Improve navigation to parent folders. (#318444, Andrei Yurkevich)
|
||||
|
||||
* gtk/gtkpathbar.[hc]: Add a child_path argument to
|
||||
the path_clicked signal.
|
||||
* gtk/gtkfilechooserdefault.c (path_bar_clicked): Select the
|
||||
child_path, if it is provided.
|
||||
* gtk/marshalers.list (path_bar_clicked): Add the necessary
|
||||
glue.
|
||||
|
||||
* gtk/gtktreeview.c: Implement a getter for headers-clickable.
|
||||
(#163851, Richard Hult)
|
||||
|
||||
2005-11-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c
|
||||
(_gdk_win32_get_adjusted_client_rect): Remove this two-line
|
||||
function which was used only in one place.
|
||||
|
||||
(get_outer_rect): Use _gdk_win32_adjust_client_rect().
|
||||
|
||||
(gdk_window_set_geometry_hints): If we have identical minimum and
|
||||
maximum size hints, remove the resize and maximize
|
||||
decorations/functions. (#104514)
|
||||
|
||||
If we have a maximum size hint, remove the maximize
|
||||
decoration/function but ensure the resize decoration/function is
|
||||
available. Otherwise ensure both resize and maximize
|
||||
decorations/functions are there.
|
||||
|
||||
(set_or_clear_style_bits): Factored out common code from
|
||||
gdk_window_set_decorations() and gdk_window_set_functions().
|
||||
|
||||
Hack the window style setting once more: Only touch the window
|
||||
style bits corresponding to the GdkWMDecoration or GdkWMFunction
|
||||
parameter bitmasks. Hopefully this finally is the correct thing to
|
||||
do. We used to clear all other bits than those that were being
|
||||
set, or set all other bits than those that were being cleared.
|
||||
|
||||
Take into account that adding or removing decorations leaves the
|
||||
window's outer size unchanged, i.e., the client area's size and
|
||||
position change. This is apparently not what we want, so change
|
||||
also the window's (outer) position and size appropriately so that
|
||||
the client area's position and size stay constant.
|
||||
|
||||
gtk-demo's color selector dialog is now non-resizable like on X11
|
||||
(I tested with metacity in GNOME). Torn off menus are shrinkable
|
||||
vertically but have a maximum size, and are not maximizable or
|
||||
minimizable, like on X11.
|
||||
|
||||
(gdk_window_set_decorations, gdk_window_set_functions): Let
|
||||
set_or_clear_decorations() do most of the job.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Remove declaration of
|
||||
_gdk_win32_get_adjusted_client_rect().
|
||||
|
||||
2005-11-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.
|
||||
(gdk_window_set_geometry_hints): Remove code that has been
|
||||
permanently ifdeffed out for two years.
|
||||
|
||||
2005-11-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkgc.c (gdk_gc_finalize): Unref tile and stipple when
|
||||
finalizing a gc. (#320789, Nickolay V. Shmyrev)
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Ignore
|
||||
icons if they would make the request large enough to cause
|
||||
Xlib to loose the connection. (#320909, Claudio Saavedra)
|
||||
|
||||
2005-11-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (shortcuts_reorder): Don't
|
||||
loose the bookmark label when reordering. (#320720, Jeremy Cook)
|
||||
|
||||
* gtk/gtkpathbar.[hc]: Set focus-on-click to FALSE for all buttons.
|
||||
Don't grab focus when a slider button is pressed, instead, use
|
||||
a bit in the pathbar struct to determine whether to scroll up
|
||||
or down. (#314486, Carlos Garnacho)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
|
||||
Shift-G to go to the previous match, like firefox. (#320061,
|
||||
Christian Neumair)
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup):
|
||||
Don't popup the completions if the focus has already been
|
||||
moved somewhere else. (#319914, Christian Persch)
|
||||
|
||||
* gtk/gtktoolitem.c (_gtk_tool_item_toolbar_reconfigured):
|
||||
Raise the drag_window after reconfiguring the
|
||||
toolbar. (#320803, Christian Persch)
|
||||
|
||||
* gtk/gtkrbtree.c: Plug a small memory leak. (#320777,
|
||||
Antonio Sacchi)
|
||||
|
||||
2005-11-07 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
|
||||
Correct the calculation of maskstride. (#320152, Peter Zelezny)
|
||||
|
||||
2005-11-06 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
|
||||
the Win32 backend, check that GdkDisplay* parameters are equal to
|
||||
_gdk_display instead of using the unnecessarily general
|
||||
GDK_IS_DISPLAY().
|
||||
(pixbuf_to_hbitmaps_alpha_winxp): Rename the variables for the
|
||||
color bitmap to have "color" in their name, for similarity with
|
||||
pixbuf_to_hbitmaps_normal(). Create an 1-bit mask bitmap (DIB
|
||||
section) using create_color_bitmap(), not CreateBitmap().
|
||||
Initialize the mask bitmap with ones for those pixels in the color
|
||||
bitmap where the alpha is zero, zeros for other pixels. Although
|
||||
the docs claim otherwise, using an unitialized bitmap for the mask
|
||||
together with a color bitmap that has alpha did not work if the
|
||||
color bitmap had zero alpha everywhere, like the blank icon used
|
||||
in gtktrayicon.c.
|
||||
(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
|
||||
G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
|
||||
setting the G_WIN32_PRETEND_WIN9X environment variable.
|
||||
|
||||
2005-11-06 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Make icon masks work on Win98 (#320152, Peter Zelezny)
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
|
||||
parameter for the depth of the bitmap, so that this function can
|
||||
be used to create 1-bit bitmaps, too.
|
||||
(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
|
||||
and initialize it properly.
|
||||
|
||||
2005-11-04 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): applied patch
|
||||
from maemo-gtk that changes the mtime check for rc files from
|
||||
'>' to '!=', otherwise theme changes go unnoticed when turning
|
||||
back the clock (Tommi Komulainen).
|
||||
|
||||
2005-11-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkcolor-win32.c
|
||||
* gdk/win32/gdkscreen-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Whitespace consistency
|
||||
fixes. Remove superfluous test for GdkWindow* parameters being
|
||||
non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
|
||||
GdkScreen and one GdkDisplay in the Win32 backend, use those
|
||||
variables instead of the getter functions. For GdkDisplay* and
|
||||
GdkScreen* parameters, check that they are equal to the
|
||||
corresponding singleton variables instead of the more general
|
||||
GDK_IS_DISPLAY() or GDK_IS_SCREEN().
|
||||
|
||||
2005-11-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c: Remove some g_return_if_fail() from
|
||||
static functions, replace some others by g_assert().
|
||||
|
||||
* gtk/gtktextview.c (selection_motion_event_handler)
|
||||
(gtk_text_view_start_selection_drag): Keep track of the original
|
||||
selection boundaries during a drag selection, in order to correctly
|
||||
decide when to extend or shrink the selection. (#320167,
|
||||
reported by Arvind S N, patch by Paolo Borelli)
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
|
||||
* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Replace
|
||||
manual offset calculations by g_utf8_offset_to_pointer().
|
||||
(#320360, Paolo Borelli)
|
||||
|
||||
2005-11-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h
|
||||
* gdk/win32/gdkglobals-win32.c
|
||||
* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
|
||||
pre-interned GdkAtoms and pre-registered clipboard formats. Sort
|
||||
their declarations, definitions and assignments into a more
|
||||
logical and consistent order.
|
||||
|
||||
* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
|
||||
CF_ prefix for the predefined clipboard format names. Put quotes
|
||||
around registered format names to distinguish them.
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
|
||||
immediately with a warning if the property type is STRING, TEXT,
|
||||
COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
|
||||
should never pretend to handle on Win32. Handle only UTF8_STRING
|
||||
here, other formats with delayed rendering. Use \uc1 instead of
|
||||
\uc0 when generating Rich Text Format for easier testability on
|
||||
XP, where WordPad misinterprets \uc0 encoded characters. Add more
|
||||
GDK_NOTE debugging output for Clipboard operations.
|
||||
|
||||
* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
|
||||
(gdk_selection_convert): Don't pretent to handle STRING, just
|
||||
UTF8_STRING. Streamline error handling, don't unnecessarily have a
|
||||
GError which then isn't used for anything anyway if it gets set.
|
||||
(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
|
||||
COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
|
||||
|
||||
* configure.in: Don't look for X_PACKAGES unless building for
|
||||
X11. (#313986, John Ehresman)
|
||||
|
||||
2005-10-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Add the popup
|
||||
window to the toplevels window group. (#319912, Christian Persch)
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_get_cursor): Fix the anchor of the default
|
||||
drag cursors. (#319200, Federico Mena Quintero)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
|
||||
Shift-G to go to the previous match, like firefox. (#320061, Christian
|
||||
Neumair)
|
||||
|
||||
* gtk/gtkaboutdialog.c (gtk_about_dialog_init): Add the little
|
||||
stars. (#319985, Bastien Nocera)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): Return
|
||||
FALSE, so we don't flush repeatedly. (#319151, Alexander Larsson)
|
||||
|
||||
2005-10-27 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkthemes.c (gtk_theme_engine_load): fix typo
|
||||
(G_MODUE_BIND_LAZY -> G_MODULE_BIND_LAZY).
|
||||
|
||||
2005-10-27 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fix bug #319974:
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
|
||||
make sure that setting any of pixbuf/stock-id/icon-name resets the
|
||||
others because they are mutually exclusive, and that unsetting any
|
||||
of them only resets the pixbuf and nothing else. Also added
|
||||
some missing g_object_notify().
|
||||
|
||||
(gtk_cell_renderer_pixbuf_get_property): simplified calls to
|
||||
g_value_set_object().
|
||||
|
||||
(gtk_cell_renderer_pixbuf_create_stock_pixbuf)
|
||||
(gtk_cell_renderer_pixbuf_create_named_icon_pixbuf): added
|
||||
g_object_notify ("pixbuf").
|
||||
|
||||
2005-10-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
|
||||
careful about initializing cell_area. (#319382, Tommi
|
||||
Komulainen)
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
|
||||
Ctrl-PageUp/PageDown. (#318670, Christian Neumair)
|
||||
|
||||
* demos/gtk-demo/clipboard.c (paste_received): Only set the
|
||||
text if it is not NULL. (#319930, Thomas Klausner)
|
||||
|
||||
* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
|
||||
loader before trying to get the pixbuf. (#319930, Thomas Klausner)
|
||||
|
||||
2005-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilesystem.c (gtk_file_system_module_load):
|
||||
* gtk/gtkthemes.c (gtk_theme_engine_load):
|
||||
* gtk/gtkimmodule.c (gtk_im_module_load): Use G_MODULE_BIND_LAZY
|
||||
when dlopening modules. (#319557, Laszlo Peter)
|
||||
|
||||
2005-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text
|
||||
segments when determining text direction. (#319065, Tommi Komulainen)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't crash
|
||||
on duplicate destroy. (#318953, Gustavo Carneiro)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new_with_dialog):
|
||||
Point out that destroy-with-parent is a bad idea for the dialog
|
||||
passed to this function. (#318943, Christian Persch)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (open_dialog): Add the dialog to the
|
||||
window group, if necessary (#318943, Christian Persch)
|
||||
|
||||
* */Makefile.am: use $(GLIB_MKENUMS) instead of
|
||||
glib-mkenums. (#318582, Damien Carbery)
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Clarify
|
||||
docs. (#317682, Christian - Manny Calavera - Neumair)
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Remove an extra const which doesn't
|
||||
seem to affect the placement of the data in the readonly
|
||||
section, and causes problems with some compilers. (#317844)
|
||||
|
||||
2005-10-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
|
||||
Fix some issues with background drawing in RTL. (#318781,
|
||||
Eric Cazeaux)
|
||||
|
||||
* gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Add some
|
||||
more docs. (#319722, Paolo Borelli)
|
||||
|
||||
* gdk/x11/gdkxftdefaults.c (init_xft_settings): Make the
|
||||
initialization of screen_x11->xft_rgba more explicit. (#319627,
|
||||
Bogdan Nicula)
|
||||
|
||||
2005-10-22 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
|
||||
widget being realized, in addition to being visible, to avoid
|
||||
running into precondition check in gtk_tree_view_get_cell_area().
|
||||
(approved by Kris).
|
||||
|
||||
2005-10-22 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style):
|
||||
Experimentally, scrollbar steppers can shrink to 8 pixels on
|
||||
Win32. Reflect that in the theme.
|
||||
* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Experimentally,
|
||||
there is a 1-pixel border between a scrollbar and its child
|
||||
in ScrolledWindows on Win32. Reflect that in the theme.
|
||||
|
||||
2005-10-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstock.c: Define GTK_STOCK_[DIS]CONNECT here,
|
||||
and not only in the header. String addition. (#318939,
|
||||
Richard Hult)
|
||||
|
||||
2005-10-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconview.c: Apply a patch from Ross Burton
|
||||
to fix compiler warnings. (#318762)
|
||||
|
||||
2005-10-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fixes bug #317999:
|
||||
|
||||
* tests/autotestfilechooser.c
|
||||
(test_button_folder_states_for_action): Test that we have either
|
||||
$cwd or the explicitly-set folder.
|
||||
(test_reload_sequence): Likewise.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c
|
||||
(gtk_file_chooser_default_get_current_folder): If our reload_state
|
||||
is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
|
||||
|
||||
2005-10-14 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
|
||||
It didn't really do anything useful, and was just confusing and
|
||||
incomplete. Comments claimed we don't do delayed rendering, but in
|
||||
fact we do, for images. (The delayed rendering code has other
|
||||
problems, though, see #168173.) The clipboard viewer code was
|
||||
probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
|
||||
the message when necessary). It was just test code, it said so in
|
||||
a comment. Add something similar back later if necessary.
|
||||
|
||||
(_win32_on_clipboard_change,
|
||||
_gdk_win32_register_clipboard_notification): Remove.
|
||||
|
||||
(gdk_display_supports_selection_notification,
|
||||
gdk_display_request_selection_notification): Always just return
|
||||
FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
|
||||
|
||||
2005-10-13 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
|
||||
Alt-Enter specially. It does not have any special meaning and
|
||||
should be passed on to the application. (#318378, Tim Evans)
|
||||
|
||||
2005-10-13 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Set visual depth to 24 for 32 bits-per-pixel devices on
|
||||
Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
|
||||
optimized composite_0888() function rather than the slower image
|
||||
dithering functions to draw pixbufs (#313993, John Ehresman)
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
|
||||
_gdk_windowing_get_bits_for_depth() to initialize
|
||||
GdkImage::bits_per_pixel.
|
||||
(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
|
||||
_gdk_windowing_get_bits_for_depth() to initialize
|
||||
BITMAPINFOHEADER::biBitCount.
|
||||
|
||||
* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
|
||||
GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
|
||||
32.
|
||||
|
||||
2005-10-12 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* demos/gtk-demo/appwindow.c: (about_cb):
|
||||
use PACKAGE_VERSION,bump year (#318654)
|
||||
|
||||
2005-10-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_btree_delete): Try to match an off
|
||||
toggle here with the matching on toggle if it immediately follows.
|
||||
This is a common case, and handling it here prevents quadratic blowup
|
||||
in cleanup_line() below. (#317125)
|
||||
|
||||
* gtk/gtktextsegment.h:
|
||||
* gtk/gtktextsegment.c (_gtk_char_segment_new_from_two_strings): Pass
|
||||
the character counts into this function instead of computing them
|
||||
again.
|
||||
|
||||
2005-10-07 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fixes bug #317999:
|
||||
|
||||
* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder):
|
||||
Clarify the documentation on when this can return NULL.
|
||||
(gtk_file_chooser_get_current_folder_uri): Likewise.
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (struct
|
||||
_GtkFileChooserButtonPrivate): Added a folder_has_been_set flag;
|
||||
we use it to keep track of whether a folder has been set.
|
||||
(gtk_file_chooser_button_map): Implement. If no folder has been
|
||||
loaded before, we at least try to load $cwd here.
|
||||
(gtk_file_chooser_button_constructor): If the construct-time
|
||||
dialog already has a folder set, turn on our folder_has_been_set
|
||||
flag.
|
||||
(dialog_current_folder_changed_cb): Turn on our
|
||||
folder_has_been_set flag.
|
||||
|
||||
2005-10-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktexttag.c (gtk_text_attributes_ref): Use
|
||||
g_return_val_if_fail(), not g_return_if_fail(). (#318412,
|
||||
Kazuki Iwamoto)
|
||||
|
||||
2005-10-04 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkpathbar.c (get_dir_name): Don't special-case Home and
|
||||
Desktop; just use their real names on the file system for the
|
||||
user-visible names.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c
|
||||
(shortcuts_append_home): Don't special-case the name of "Home";
|
||||
just use the folder name.
|
||||
|
||||
2005-10-04 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Make it compile without
|
||||
HAVE__NL_TIME_FIRST_WEEKDAY. (#317910, Mathias Hasselmann)
|
||||
|
||||
2005-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.6 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_clear_realized_style): Revert the change
|
||||
from yesterday, since it leads to assertion failures. (#317879,
|
||||
Sebastian Bacher)
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Call
|
||||
calendar_compute_days() after setting priv->week_start.
|
||||
|
||||
2005-10-03 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Don't reload the current folder unnecessarily on ::map().
|
||||
|
||||
* gtk/gtkfilechooserprivate.h (ReloadState): New enum to represent
|
||||
the reloading state.
|
||||
(struct _GtkFileChooserDefault): Added a "reload_state" field.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
|
||||
Initialize impl->reload_state.
|
||||
(gtk_file_chooser_default_map): Check the impl->reload_state; load
|
||||
a default folder if no folder has been set, or reload the current
|
||||
one only if we had been unmapped first.
|
||||
(gtk_file_chooser_default_update_current_folder): Set the
|
||||
reload_state to RELOAD_HAS_FOLDER.
|
||||
(gtk_file_chooser_default_unmap): Implement, and set the
|
||||
reload_state to RELOAD_WAS_UNMAPPED.
|
||||
(shortcuts_model_create): Don't call shortcuts_add_bookmarks()
|
||||
here; they'll get (re)loaded on ::map() anyway.
|
||||
|
||||
* gtk/gtkfilechooserwidget.c
|
||||
(gtk_file_chooser_widget_constructor): Don't set a default folder here.
|
||||
|
||||
* tests/autotestfilechooser.c (test_action_widgets): Don't take in
|
||||
a dialog; build it ourselves.
|
||||
(test_reload): New test to ensure that we don't load the default
|
||||
folder more than once, and that we reload it when
|
||||
unmapping/remapping.
|
||||
(get_impl_from_dialog): New utility function.
|
||||
(test_widgets_for_current_action): Use get_impl_from_dialog().
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.5 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_clear_realized_style): Unref the style when
|
||||
removing it from the hash table. (#314696, Benjamin Berg)
|
||||
|
||||
2005-10-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap): In case
|
||||
BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
|
||||
is that the the desktop isn't visible because the session has been
|
||||
switched, the screen is locked, or a terminal server session
|
||||
disconnected, so no error message necessary. (#137796)
|
||||
|
||||
It is of course remotely possible that BitBlt() failing with
|
||||
ERROR_INVALID_HANDLE might also be caused by some other
|
||||
problem. We could strive for perfection and track whether the
|
||||
desktop is visible by using WTSRegisterSessionNotification() and
|
||||
handling WM_WTSESSION_CHANGE. I think that's overdoing it just for
|
||||
this issue, though. If we would track desktop visibility, we
|
||||
should then avoid even trying to update the display at all while
|
||||
the desktop isn't visible.
|
||||
|
||||
2005-09-30 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Another attempt
|
||||
to correct the calculations for the first week day. We may
|
||||
just have to remove this code if too many locales turn out
|
||||
to have broken data.
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
|
||||
some cases. (#317611, Tommi Komulainen)
|
||||
|
||||
* gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
|
||||
Prevent overflow when storing size hints in an unsigned
|
||||
short variable. Tracked down by Ray Strode and Søren Sandmann.
|
||||
|
||||
2005-09-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_set_image): Check arguments. (#317491,
|
||||
Paolo Borelli)
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_grab_notify): Stop drags when being
|
||||
grab shadowed. (#317332)
|
||||
|
||||
2005-09-29 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk-zip.sh.in: DLLs are always in bin nowadays, no need to test.
|
||||
|
||||
* gtk/gtkmain.c (_gtk_get_localedir): The locale directory is
|
||||
passed to bindtextdomain() which isn't UTF-8-aware, so convert to
|
||||
system codepage using g_win32_locale_filename_from_utf8().
|
||||
(#317457, Kazuki Iwamoto)
|
||||
|
||||
2005-09-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkselection.c (_gtk_selection_request): Free mult_atoms
|
||||
here. (#317039, Paolo Borelli)
|
||||
|
||||
* gtk/gtktexttag.h:
|
||||
* gtk/gtktexttag.c (gtk_text_attributes_ref): Return the attributes
|
||||
to make this function work as boxed copy function. (#317455,
|
||||
Gustavo Carneiro)
|
||||
|
||||
* gtk/gtkclipboard.c (request_image_received_func): Don't unref
|
||||
NULL. (#316828, Tor Lillqvist)
|
||||
|
||||
2005-09-28 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* modules/input/imime.c: Include <config.h>. (#317444, Kazuki
|
||||
Iwamoto)
|
||||
|
||||
2005-09-27 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Do not create the save mode-specific widgets in the open modes, so
|
||||
that we don't carry their baggage around.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c
|
||||
(gtk_file_chooser_default_constructor): Don't create the
|
||||
save_widgets here.
|
||||
(save_widgets_create): Set the impl->save_widgets directly here,
|
||||
instead of passing the widgets back to the caller. Also, pack
|
||||
them into the impl's box.
|
||||
(update_appearance): Create or destroy the save widgets as
|
||||
appropriate. Set the action of the save_file_name_entry here.
|
||||
(shortcuts_add_current_folder): Set the active item in the
|
||||
save_folder_combo only if it exists.
|
||||
(gtk_file_chooser_default_set_property): Don't set the action of
|
||||
the save_file_name_entry here.
|
||||
(gtk_file_chooser_default_update_current_folder): Set the base
|
||||
folder of the save_file_name_entry only if the entry exists.
|
||||
(shortcuts_drag_data_received_cb): Cast the selection_data->data
|
||||
to (const char *) since that's what shortcuts_drop_uris() expects.
|
||||
(file_list_drag_data_received_cb): Likewise, for
|
||||
g_uri_list_extract_uris().
|
||||
|
||||
2005-09-27 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (update_chooser_entry): If the
|
||||
selection is empty, clear the file name entry only if we are in
|
||||
CREATE_FOLDER mode. In SAVE mode, nothing will be selected when
|
||||
the user starts typeahead in the treeview, and we don't want to
|
||||
clear the file name entry in that case --- the user could be
|
||||
typing-ahead to look for a folder name. Fixes bug #308332, patch
|
||||
by Jürg Billeter.
|
||||
|
||||
2005-09-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.4 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
Pop below the entry if there's more free space below the entry
|
||||
than above. (#316948, Tommi Komulainen)
|
||||
|
||||
2005-09-26 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
|
||||
the shaped flag here, too. (#316871)
|
||||
(gdk_window_shape_combine_region): Currently unimplemented, so
|
||||
don't do anything to the shaped flag here.
|
||||
|
||||
2005-09-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Fix #316871, reported by Dan Winship:
|
||||
|
||||
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
|
||||
(gdk_window_shape_combine_region): Set it here.
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
|
||||
remove the child area for shaped windows.
|
||||
|
||||
2005-09-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_finalize):
|
||||
Don't leak expander pixbufs. (#316946, Tommi Komulainen)
|
||||
|
||||
2005-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_class_init): Fix the documentation
|
||||
for the grab-broken-event signal, noticed by Damon Chaplin.
|
||||
|
||||
2005-09-21 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkselection-win32.c (gdk_selection_convert,
|
||||
gdk_text_property_to_text_list_for_display,
|
||||
gdk_text_property_to_utf8_list_for_display,
|
||||
gdk_win32_selection_add_targets,
|
||||
_gdk_win32_selection_convert_to_dib): Free return value from
|
||||
gdk_atom_name().
|
||||
(gdk_text_property_to_text_list_for_display): Drop GError variable
|
||||
that isn't actually used after being set.
|
||||
|
||||
2005-09-20 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkselection-win32.c
|
||||
(gdk_selection_owner_get_for_display): Do return the correct owner
|
||||
for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
|
||||
a window GDK knows about). The reason to return NULL seems to have
|
||||
gone when in the fix for bug #163702 the artificial
|
||||
GDK_SELECTION_CLEAR event generation was removed from
|
||||
gdk_selection_send_notify_for_display(). Fixes bug #316552.
|
||||
|
||||
2005-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconview.c: Use g_list_nth_data() instead of g_list_nth()->data
|
||||
in multiple places to avoid segfaults if the index is out of range.
|
||||
(#316422, Guillaume Cottenceau)
|
||||
(gtk_icon_view_set_drag_dest_item):
|
||||
(gtk_icon_view_scroll_to_path): Fix a typo in the docs. (#316419,
|
||||
#316424, Guillaume Cottenceau)
|
||||
|
||||
Fri Sep 16 14:00:20 2005 Tim Janik <timj@imendio.com>
|
||||
|
||||
* gtk/gtkwindow.c: fix bug #316180.
|
||||
gtk_window_map_event(): new function to work around lost unmap requests.
|
||||
|
||||
2005-09-16 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c (draw_extension,
|
||||
draw_box_gap): Check whether the widget actually is a GtkNotebook
|
||||
before treating it as such. Drop some unneeded local variables,
|
||||
use parameter with same information instead. (#316412)
|
||||
|
||||
2005-09-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c (foreach_remove_func): Fix
|
||||
a use-after-free bug. (#316256, Alexander Nedotsukov)
|
||||
|
||||
2005-09-13 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: Turn off profiling for the stable
|
||||
branch (#undef PROFILE_FILE_CHOOSER).
|
||||
|
||||
2005-09-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconview.c (gtk_icon_view_class_init):
|
||||
(gtk_icon_view_get_dest_item_at_pos): Fix typos in the
|
||||
docs. (#316008, #316027, #316121, Guillaume Cottenceau)
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_set_icon_name): Fix a copy-and-paste
|
||||
mistake in the docs. (#315993, Guillaume Cottenceau)
|
||||
|
||||
* tests/testentrycompletion.c (create_simple_completion_model): Add
|
||||
some strings containing multibyte characters.
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
|
||||
Fix prefix insertion for multibyte characters. (#316095,
|
||||
Tommi Komulainen)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
|
||||
* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
|
||||
return NULL if the widget is not realized. (#316023,
|
||||
Guillaume Cottenceau)
|
||||
|
||||
2005-09-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_button_event):
|
||||
Make drag reordering work properly for columns other than the
|
||||
first. (#315054, Dan Winship)
|
||||
|
||||
* gtk/gtkfontbutton.c (gtk_font_button_update_font_info): Handle
|
||||
invalid fontnames better. (#315187, Ed Catmur)
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_set_font_name): Handle
|
||||
invalid fontnames better. (#136926, Michael R. Walton)
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
|
||||
Use connect_after to connect to the focus_out event. This
|
||||
ensures that the entry has already stopped blinking by the time
|
||||
we emit the edited signal. (#315229, Thomas Leonard)
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set
|
||||
unsigned ints to -1. (#315481, Kjartan Maraas)
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative
|
||||
to week_1stday, not to Sunday. Gotta love the ISO 14652 guys...
|
||||
(#314473, Stanislav Brabec)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_visible_range): Document
|
||||
memory handling. (#314975, Torsten Schoenfeld)
|
||||
|
||||
2005-09-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
|
||||
display name. There is only one GdkDisplay on Win32, and
|
||||
constructing the display name isn't entirely trivial, so cacheing
|
||||
is probably worth it. For instance GIMP calls this function a lot.
|
||||
(gdk_display_open): Call gdk_display_get_name() to prime the
|
||||
cached name.
|
||||
(gdk_display_get_n_screens, gdk_display_get_screen,
|
||||
gdk_display_get_default_screen): Verify parameter correctness like
|
||||
the X11 backend does.
|
||||
|
||||
* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
|
||||
Return a freshly allocated string, as the API specifies. Fixes a
|
||||
heap corruption problem that caused random errors and crashes in
|
||||
GIMP, for instance.
|
||||
|
||||
2005-09-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaction.c (connect_proxy): Set the label of a button
|
||||
if it has no child. (#315253, John Finlay)
|
||||
|
||||
2005-09-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_destroy): Disconnect idle handlers
|
||||
on destroy to avoid problems when they are called on a destroyed
|
||||
widget. (#315135, John Cupitt)
|
||||
|
||||
* gtk/gtkmain.c (gtk_get_event_widget): If the window is destroyed,
|
||||
we still need to deliver the destroy event. (#314980, Chris Lahey)
|
||||
|
||||
2005-09-02 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
|
||||
(shortcuts_activate_volume):
|
||||
Handle base_path being null in the rest of the cases (#310270)
|
||||
|
||||
2005-09-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
|
||||
cursor position also in root window coordinates. Prune out
|
||||
superfluous WM_MOUSEMOVE events even earlier, based on root window
|
||||
coordinates. Windows sends WM_MOUSEMOVE messages after a new
|
||||
window has ben mapped below the cursor even if the mouse doesn't
|
||||
move. We used to generate GDK_MOTION_NOTIFY in these cases. This
|
||||
confused at least gtk_menu_motion_notify(). (#314995)
|
||||
|
||||
* gtk/gtkintl.h: No need to include config.h here. It caused
|
||||
warnings about GTK_LOCALEDIR being redefined on Win32 when
|
||||
compiling files where gtkintl.h is included after gtkprivate.h
|
||||
(which #undefines and re-#defines GTK_LOCALEDIR on Win32).
|
||||
|
||||
2005-09-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaction.c (gtk_action_get_accel_closure): Fix doc
|
||||
typo. (#314921, Guillaume Cottenceau)
|
||||
|
||||
2005-08-31 Baris Cicek <baris@teamforce.name.tr>
|
||||
|
||||
* configure.in: Added ku to ALL_LINGUAS
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.3 ===
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_grab_notify): Only cancel if the menu
|
||||
was active. (#314298, Christian Persch, analysis by Mark McLoughlin)
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon): Remove an
|
||||
accidentally leftover duplicate pixbuf creation. (#314700,
|
||||
Kjartan Maraas)
|
||||
|
||||
* gtk/gtksettings.c (settings_update_cursor_theme): Don't
|
||||
leak the cursor theme name. (#314693, Kjartan Maraas)
|
||||
|
||||
* gdk/x11/gdkasync.c (_gdk_x11_get_window_child_info): Free
|
||||
state.children in all cases. (#313862, Kjartan Maraas)
|
||||
|
||||
2005-08-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_class_init): Fix the default
|
||||
value of the ui property. (#314532, Yong Wang)
|
||||
|
||||
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Don't warn
|
||||
when G_MAXLONG is passed as length.
|
||||
|
||||
2005-08-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c: Add a separate --ignore-theme-index option
|
||||
to avoid overloading --force. (JP Rosevaar)
|
||||
|
||||
* gtk/gtkicontheme.c (theme_lookup_icon): Avoid an uninitialized
|
||||
variable warning, pointed out by Colin Walters. (#314585)
|
||||
|
||||
2005-08-26 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkfilesystemwin32.c: Remove some ifdeffed out debugging
|
||||
printouts.
|
||||
(gtk_file_system_win32_parse): Don't mishandle UNC paths. (#314519)
|
||||
|
||||
2005-08-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Fix the calculation
|
||||
of week_start. (#314473, JP Rosevaar)
|
||||
|
||||
2005-08-25 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* gtk/gtkfilesystemmodel.c (idle_finished_loading_cb): Acquire GDK
|
||||
lock. (#314533, Thomas Fitzsimmons)
|
||||
|
||||
2005-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle
|
||||
NULL gracefully. (#314523, Ed Catmur)
|
||||
|
||||
2005-08-25 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
|
||||
Handle theme == NULL.
|
||||
|
||||
2005-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
|
||||
y offset into account when positioning the popup. (#314470,
|
||||
Christian Persch)
|
||||
|
||||
2005-08-25 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
|
||||
as instance_init, not base_init! (#314452, Fix from Frederic
|
||||
Crozat, reported by Joe Marcus Clarke). Trivial cleanup: use -1.
|
||||
rather than 1 for a negative flag value.
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
||||
@@ -1,3 +1,978 @@
|
||||
2005-11-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.7 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
|
||||
leak. (#321032, Peter Zelezny)
|
||||
|
||||
2005-11-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkselection.c (gtk_selection_data_set_uris): Don't
|
||||
leak result. (#321441, Tommi Komulainen)
|
||||
|
||||
2005-11-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
|
||||
Don't crash if there is no builtin icon.
|
||||
|
||||
2005-11-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkcolor.c (gdk_color_parse): Documentation
|
||||
improvements. (#321338)
|
||||
|
||||
* gtk/gtktextiter.c (gtk_text_iter_forward_search): Make
|
||||
limit an inclusive boundary. (#321299)
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
2005-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c: Make it compile.
|
||||
|
||||
2005-11-12 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
|
||||
theme's handling of toolbars, handleboxes, and menubars more in-line
|
||||
with Microsoft's IE style.
|
||||
* modules/engines/ms-windows/*.c: Indentation cleanups
|
||||
|
||||
2005-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Make builtin icons work in gtk_window_set_icon_name()
|
||||
(#321046, Maxim Udushlivy)
|
||||
|
||||
* gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
|
||||
Also check builtin icons.
|
||||
|
||||
2005-11-12 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (filename_get_info): Don't hide
|
||||
dotfiles, no such convention on Win32. Just hide files with the
|
||||
hidden attribute. (#314627)
|
||||
|
||||
2005-11-11 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
|
||||
the base path of the volume if it is mounted.
|
||||
|
||||
2005-11-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_motion_resize_column): Remove
|
||||
another erroneous semicolon.
|
||||
|
||||
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get): Remove an erroneous
|
||||
semicolon.
|
||||
|
||||
Don't corrupt odd keymaps (#316638, Kean Johnston)
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
|
||||
handle frobbing keymaps with odd numbers of syms/code.
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
|
||||
frob the keymap.
|
||||
|
||||
Improve navigation to parent folders. (#318444, Andrei Yurkevich)
|
||||
|
||||
* gtk/gtkpathbar.[hc]: Add a child_path argument to
|
||||
the path_clicked signal.
|
||||
* gtk/gtkfilechooserdefault.c (path_bar_clicked): Select the
|
||||
child_path, if it is provided.
|
||||
* gtk/marshalers.list (path_bar_clicked): Add the necessary
|
||||
glue.
|
||||
|
||||
* gtk/gtktreeview.c: Implement a getter for headers-clickable.
|
||||
(#163851, Richard Hult)
|
||||
|
||||
2005-11-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c
|
||||
(_gdk_win32_get_adjusted_client_rect): Remove this two-line
|
||||
function which was used only in one place.
|
||||
|
||||
(get_outer_rect): Use _gdk_win32_adjust_client_rect().
|
||||
|
||||
(gdk_window_set_geometry_hints): If we have identical minimum and
|
||||
maximum size hints, remove the resize and maximize
|
||||
decorations/functions. (#104514)
|
||||
|
||||
If we have a maximum size hint, remove the maximize
|
||||
decoration/function but ensure the resize decoration/function is
|
||||
available. Otherwise ensure both resize and maximize
|
||||
decorations/functions are there.
|
||||
|
||||
(set_or_clear_style_bits): Factored out common code from
|
||||
gdk_window_set_decorations() and gdk_window_set_functions().
|
||||
|
||||
Hack the window style setting once more: Only touch the window
|
||||
style bits corresponding to the GdkWMDecoration or GdkWMFunction
|
||||
parameter bitmasks. Hopefully this finally is the correct thing to
|
||||
do. We used to clear all other bits than those that were being
|
||||
set, or set all other bits than those that were being cleared.
|
||||
|
||||
Take into account that adding or removing decorations leaves the
|
||||
window's outer size unchanged, i.e., the client area's size and
|
||||
position change. This is apparently not what we want, so change
|
||||
also the window's (outer) position and size appropriately so that
|
||||
the client area's position and size stay constant.
|
||||
|
||||
gtk-demo's color selector dialog is now non-resizable like on X11
|
||||
(I tested with metacity in GNOME). Torn off menus are shrinkable
|
||||
vertically but have a maximum size, and are not maximizable or
|
||||
minimizable, like on X11.
|
||||
|
||||
(gdk_window_set_decorations, gdk_window_set_functions): Let
|
||||
set_or_clear_decorations() do most of the job.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Remove declaration of
|
||||
_gdk_win32_get_adjusted_client_rect().
|
||||
|
||||
2005-11-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.
|
||||
(gdk_window_set_geometry_hints): Remove code that has been
|
||||
permanently ifdeffed out for two years.
|
||||
|
||||
2005-11-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkgc.c (gdk_gc_finalize): Unref tile and stipple when
|
||||
finalizing a gc. (#320789, Nickolay V. Shmyrev)
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Ignore
|
||||
icons if they would make the request large enough to cause
|
||||
Xlib to loose the connection. (#320909, Claudio Saavedra)
|
||||
|
||||
2005-11-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (shortcuts_reorder): Don't
|
||||
loose the bookmark label when reordering. (#320720, Jeremy Cook)
|
||||
|
||||
* gtk/gtkpathbar.[hc]: Set focus-on-click to FALSE for all buttons.
|
||||
Don't grab focus when a slider button is pressed, instead, use
|
||||
a bit in the pathbar struct to determine whether to scroll up
|
||||
or down. (#314486, Carlos Garnacho)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
|
||||
Shift-G to go to the previous match, like firefox. (#320061,
|
||||
Christian Neumair)
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup):
|
||||
Don't popup the completions if the focus has already been
|
||||
moved somewhere else. (#319914, Christian Persch)
|
||||
|
||||
* gtk/gtktoolitem.c (_gtk_tool_item_toolbar_reconfigured):
|
||||
Raise the drag_window after reconfiguring the
|
||||
toolbar. (#320803, Christian Persch)
|
||||
|
||||
* gtk/gtkrbtree.c: Plug a small memory leak. (#320777,
|
||||
Antonio Sacchi)
|
||||
|
||||
2005-11-07 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
|
||||
Correct the calculation of maskstride. (#320152, Peter Zelezny)
|
||||
|
||||
2005-11-06 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
|
||||
the Win32 backend, check that GdkDisplay* parameters are equal to
|
||||
_gdk_display instead of using the unnecessarily general
|
||||
GDK_IS_DISPLAY().
|
||||
(pixbuf_to_hbitmaps_alpha_winxp): Rename the variables for the
|
||||
color bitmap to have "color" in their name, for similarity with
|
||||
pixbuf_to_hbitmaps_normal(). Create an 1-bit mask bitmap (DIB
|
||||
section) using create_color_bitmap(), not CreateBitmap().
|
||||
Initialize the mask bitmap with ones for those pixels in the color
|
||||
bitmap where the alpha is zero, zeros for other pixels. Although
|
||||
the docs claim otherwise, using an unitialized bitmap for the mask
|
||||
together with a color bitmap that has alpha did not work if the
|
||||
color bitmap had zero alpha everywhere, like the blank icon used
|
||||
in gtktrayicon.c.
|
||||
(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
|
||||
G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
|
||||
setting the G_WIN32_PRETEND_WIN9X environment variable.
|
||||
|
||||
2005-11-06 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Make icon masks work on Win98 (#320152, Peter Zelezny)
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
|
||||
parameter for the depth of the bitmap, so that this function can
|
||||
be used to create 1-bit bitmaps, too.
|
||||
(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
|
||||
and initialize it properly.
|
||||
|
||||
2005-11-04 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): applied patch
|
||||
from maemo-gtk that changes the mtime check for rc files from
|
||||
'>' to '!=', otherwise theme changes go unnoticed when turning
|
||||
back the clock (Tommi Komulainen).
|
||||
|
||||
2005-11-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkcolor-win32.c
|
||||
* gdk/win32/gdkscreen-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Whitespace consistency
|
||||
fixes. Remove superfluous test for GdkWindow* parameters being
|
||||
non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
|
||||
GdkScreen and one GdkDisplay in the Win32 backend, use those
|
||||
variables instead of the getter functions. For GdkDisplay* and
|
||||
GdkScreen* parameters, check that they are equal to the
|
||||
corresponding singleton variables instead of the more general
|
||||
GDK_IS_DISPLAY() or GDK_IS_SCREEN().
|
||||
|
||||
2005-11-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c: Remove some g_return_if_fail() from
|
||||
static functions, replace some others by g_assert().
|
||||
|
||||
* gtk/gtktextview.c (selection_motion_event_handler)
|
||||
(gtk_text_view_start_selection_drag): Keep track of the original
|
||||
selection boundaries during a drag selection, in order to correctly
|
||||
decide when to extend or shrink the selection. (#320167,
|
||||
reported by Arvind S N, patch by Paolo Borelli)
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
|
||||
* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Replace
|
||||
manual offset calculations by g_utf8_offset_to_pointer().
|
||||
(#320360, Paolo Borelli)
|
||||
|
||||
2005-11-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h
|
||||
* gdk/win32/gdkglobals-win32.c
|
||||
* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
|
||||
pre-interned GdkAtoms and pre-registered clipboard formats. Sort
|
||||
their declarations, definitions and assignments into a more
|
||||
logical and consistent order.
|
||||
|
||||
* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
|
||||
CF_ prefix for the predefined clipboard format names. Put quotes
|
||||
around registered format names to distinguish them.
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
|
||||
immediately with a warning if the property type is STRING, TEXT,
|
||||
COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
|
||||
should never pretend to handle on Win32. Handle only UTF8_STRING
|
||||
here, other formats with delayed rendering. Use \uc1 instead of
|
||||
\uc0 when generating Rich Text Format for easier testability on
|
||||
XP, where WordPad misinterprets \uc0 encoded characters. Add more
|
||||
GDK_NOTE debugging output for Clipboard operations.
|
||||
|
||||
* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
|
||||
(gdk_selection_convert): Don't pretent to handle STRING, just
|
||||
UTF8_STRING. Streamline error handling, don't unnecessarily have a
|
||||
GError which then isn't used for anything anyway if it gets set.
|
||||
(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
|
||||
COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
|
||||
|
||||
* configure.in: Don't look for X_PACKAGES unless building for
|
||||
X11. (#313986, John Ehresman)
|
||||
|
||||
2005-10-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Add the popup
|
||||
window to the toplevels window group. (#319912, Christian Persch)
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_get_cursor): Fix the anchor of the default
|
||||
drag cursors. (#319200, Federico Mena Quintero)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
|
||||
Shift-G to go to the previous match, like firefox. (#320061, Christian
|
||||
Neumair)
|
||||
|
||||
* gtk/gtkaboutdialog.c (gtk_about_dialog_init): Add the little
|
||||
stars. (#319985, Bastien Nocera)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): Return
|
||||
FALSE, so we don't flush repeatedly. (#319151, Alexander Larsson)
|
||||
|
||||
2005-10-27 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkthemes.c (gtk_theme_engine_load): fix typo
|
||||
(G_MODUE_BIND_LAZY -> G_MODULE_BIND_LAZY).
|
||||
|
||||
2005-10-27 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fix bug #319974:
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
|
||||
make sure that setting any of pixbuf/stock-id/icon-name resets the
|
||||
others because they are mutually exclusive, and that unsetting any
|
||||
of them only resets the pixbuf and nothing else. Also added
|
||||
some missing g_object_notify().
|
||||
|
||||
(gtk_cell_renderer_pixbuf_get_property): simplified calls to
|
||||
g_value_set_object().
|
||||
|
||||
(gtk_cell_renderer_pixbuf_create_stock_pixbuf)
|
||||
(gtk_cell_renderer_pixbuf_create_named_icon_pixbuf): added
|
||||
g_object_notify ("pixbuf").
|
||||
|
||||
2005-10-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
|
||||
careful about initializing cell_area. (#319382, Tommi
|
||||
Komulainen)
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
|
||||
Ctrl-PageUp/PageDown. (#318670, Christian Neumair)
|
||||
|
||||
* demos/gtk-demo/clipboard.c (paste_received): Only set the
|
||||
text if it is not NULL. (#319930, Thomas Klausner)
|
||||
|
||||
* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
|
||||
loader before trying to get the pixbuf. (#319930, Thomas Klausner)
|
||||
|
||||
2005-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilesystem.c (gtk_file_system_module_load):
|
||||
* gtk/gtkthemes.c (gtk_theme_engine_load):
|
||||
* gtk/gtkimmodule.c (gtk_im_module_load): Use G_MODULE_BIND_LAZY
|
||||
when dlopening modules. (#319557, Laszlo Peter)
|
||||
|
||||
2005-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text
|
||||
segments when determining text direction. (#319065, Tommi Komulainen)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't crash
|
||||
on duplicate destroy. (#318953, Gustavo Carneiro)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new_with_dialog):
|
||||
Point out that destroy-with-parent is a bad idea for the dialog
|
||||
passed to this function. (#318943, Christian Persch)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (open_dialog): Add the dialog to the
|
||||
window group, if necessary (#318943, Christian Persch)
|
||||
|
||||
* */Makefile.am: use $(GLIB_MKENUMS) instead of
|
||||
glib-mkenums. (#318582, Damien Carbery)
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Clarify
|
||||
docs. (#317682, Christian - Manny Calavera - Neumair)
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Remove an extra const which doesn't
|
||||
seem to affect the placement of the data in the readonly
|
||||
section, and causes problems with some compilers. (#317844)
|
||||
|
||||
2005-10-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
|
||||
Fix some issues with background drawing in RTL. (#318781,
|
||||
Eric Cazeaux)
|
||||
|
||||
* gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Add some
|
||||
more docs. (#319722, Paolo Borelli)
|
||||
|
||||
* gdk/x11/gdkxftdefaults.c (init_xft_settings): Make the
|
||||
initialization of screen_x11->xft_rgba more explicit. (#319627,
|
||||
Bogdan Nicula)
|
||||
|
||||
2005-10-22 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
|
||||
widget being realized, in addition to being visible, to avoid
|
||||
running into precondition check in gtk_tree_view_get_cell_area().
|
||||
(approved by Kris).
|
||||
|
||||
2005-10-22 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style):
|
||||
Experimentally, scrollbar steppers can shrink to 8 pixels on
|
||||
Win32. Reflect that in the theme.
|
||||
* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Experimentally,
|
||||
there is a 1-pixel border between a scrollbar and its child
|
||||
in ScrolledWindows on Win32. Reflect that in the theme.
|
||||
|
||||
2005-10-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstock.c: Define GTK_STOCK_[DIS]CONNECT here,
|
||||
and not only in the header. String addition. (#318939,
|
||||
Richard Hult)
|
||||
|
||||
2005-10-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconview.c: Apply a patch from Ross Burton
|
||||
to fix compiler warnings. (#318762)
|
||||
|
||||
2005-10-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fixes bug #317999:
|
||||
|
||||
* tests/autotestfilechooser.c
|
||||
(test_button_folder_states_for_action): Test that we have either
|
||||
$cwd or the explicitly-set folder.
|
||||
(test_reload_sequence): Likewise.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c
|
||||
(gtk_file_chooser_default_get_current_folder): If our reload_state
|
||||
is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
|
||||
|
||||
2005-10-14 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
|
||||
It didn't really do anything useful, and was just confusing and
|
||||
incomplete. Comments claimed we don't do delayed rendering, but in
|
||||
fact we do, for images. (The delayed rendering code has other
|
||||
problems, though, see #168173.) The clipboard viewer code was
|
||||
probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
|
||||
the message when necessary). It was just test code, it said so in
|
||||
a comment. Add something similar back later if necessary.
|
||||
|
||||
(_win32_on_clipboard_change,
|
||||
_gdk_win32_register_clipboard_notification): Remove.
|
||||
|
||||
(gdk_display_supports_selection_notification,
|
||||
gdk_display_request_selection_notification): Always just return
|
||||
FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
|
||||
|
||||
2005-10-13 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
|
||||
Alt-Enter specially. It does not have any special meaning and
|
||||
should be passed on to the application. (#318378, Tim Evans)
|
||||
|
||||
2005-10-13 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Set visual depth to 24 for 32 bits-per-pixel devices on
|
||||
Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
|
||||
optimized composite_0888() function rather than the slower image
|
||||
dithering functions to draw pixbufs (#313993, John Ehresman)
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
|
||||
_gdk_windowing_get_bits_for_depth() to initialize
|
||||
GdkImage::bits_per_pixel.
|
||||
(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
|
||||
_gdk_windowing_get_bits_for_depth() to initialize
|
||||
BITMAPINFOHEADER::biBitCount.
|
||||
|
||||
* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
|
||||
GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
|
||||
32.
|
||||
|
||||
2005-10-12 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* demos/gtk-demo/appwindow.c: (about_cb):
|
||||
use PACKAGE_VERSION,bump year (#318654)
|
||||
|
||||
2005-10-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_btree_delete): Try to match an off
|
||||
toggle here with the matching on toggle if it immediately follows.
|
||||
This is a common case, and handling it here prevents quadratic blowup
|
||||
in cleanup_line() below. (#317125)
|
||||
|
||||
* gtk/gtktextsegment.h:
|
||||
* gtk/gtktextsegment.c (_gtk_char_segment_new_from_two_strings): Pass
|
||||
the character counts into this function instead of computing them
|
||||
again.
|
||||
|
||||
2005-10-07 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Fixes bug #317999:
|
||||
|
||||
* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder):
|
||||
Clarify the documentation on when this can return NULL.
|
||||
(gtk_file_chooser_get_current_folder_uri): Likewise.
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (struct
|
||||
_GtkFileChooserButtonPrivate): Added a folder_has_been_set flag;
|
||||
we use it to keep track of whether a folder has been set.
|
||||
(gtk_file_chooser_button_map): Implement. If no folder has been
|
||||
loaded before, we at least try to load $cwd here.
|
||||
(gtk_file_chooser_button_constructor): If the construct-time
|
||||
dialog already has a folder set, turn on our folder_has_been_set
|
||||
flag.
|
||||
(dialog_current_folder_changed_cb): Turn on our
|
||||
folder_has_been_set flag.
|
||||
|
||||
2005-10-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktexttag.c (gtk_text_attributes_ref): Use
|
||||
g_return_val_if_fail(), not g_return_if_fail(). (#318412,
|
||||
Kazuki Iwamoto)
|
||||
|
||||
2005-10-04 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkpathbar.c (get_dir_name): Don't special-case Home and
|
||||
Desktop; just use their real names on the file system for the
|
||||
user-visible names.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c
|
||||
(shortcuts_append_home): Don't special-case the name of "Home";
|
||||
just use the folder name.
|
||||
|
||||
2005-10-04 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Make it compile without
|
||||
HAVE__NL_TIME_FIRST_WEEKDAY. (#317910, Mathias Hasselmann)
|
||||
|
||||
2005-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.6 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_clear_realized_style): Revert the change
|
||||
from yesterday, since it leads to assertion failures. (#317879,
|
||||
Sebastian Bacher)
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Call
|
||||
calendar_compute_days() after setting priv->week_start.
|
||||
|
||||
2005-10-03 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Don't reload the current folder unnecessarily on ::map().
|
||||
|
||||
* gtk/gtkfilechooserprivate.h (ReloadState): New enum to represent
|
||||
the reloading state.
|
||||
(struct _GtkFileChooserDefault): Added a "reload_state" field.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
|
||||
Initialize impl->reload_state.
|
||||
(gtk_file_chooser_default_map): Check the impl->reload_state; load
|
||||
a default folder if no folder has been set, or reload the current
|
||||
one only if we had been unmapped first.
|
||||
(gtk_file_chooser_default_update_current_folder): Set the
|
||||
reload_state to RELOAD_HAS_FOLDER.
|
||||
(gtk_file_chooser_default_unmap): Implement, and set the
|
||||
reload_state to RELOAD_WAS_UNMAPPED.
|
||||
(shortcuts_model_create): Don't call shortcuts_add_bookmarks()
|
||||
here; they'll get (re)loaded on ::map() anyway.
|
||||
|
||||
* gtk/gtkfilechooserwidget.c
|
||||
(gtk_file_chooser_widget_constructor): Don't set a default folder here.
|
||||
|
||||
* tests/autotestfilechooser.c (test_action_widgets): Don't take in
|
||||
a dialog; build it ourselves.
|
||||
(test_reload): New test to ensure that we don't load the default
|
||||
folder more than once, and that we reload it when
|
||||
unmapping/remapping.
|
||||
(get_impl_from_dialog): New utility function.
|
||||
(test_widgets_for_current_action): Use get_impl_from_dialog().
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.5 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_clear_realized_style): Unref the style when
|
||||
removing it from the hash table. (#314696, Benjamin Berg)
|
||||
|
||||
2005-10-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap): In case
|
||||
BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
|
||||
is that the the desktop isn't visible because the session has been
|
||||
switched, the screen is locked, or a terminal server session
|
||||
disconnected, so no error message necessary. (#137796)
|
||||
|
||||
It is of course remotely possible that BitBlt() failing with
|
||||
ERROR_INVALID_HANDLE might also be caused by some other
|
||||
problem. We could strive for perfection and track whether the
|
||||
desktop is visible by using WTSRegisterSessionNotification() and
|
||||
handling WM_WTSESSION_CHANGE. I think that's overdoing it just for
|
||||
this issue, though. If we would track desktop visibility, we
|
||||
should then avoid even trying to update the display at all while
|
||||
the desktop isn't visible.
|
||||
|
||||
2005-09-30 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Another attempt
|
||||
to correct the calculations for the first week day. We may
|
||||
just have to remove this code if too many locales turn out
|
||||
to have broken data.
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
|
||||
some cases. (#317611, Tommi Komulainen)
|
||||
|
||||
* gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
|
||||
Prevent overflow when storing size hints in an unsigned
|
||||
short variable. Tracked down by Ray Strode and Søren Sandmann.
|
||||
|
||||
2005-09-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c (gtk_button_set_image): Check arguments. (#317491,
|
||||
Paolo Borelli)
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_grab_notify): Stop drags when being
|
||||
grab shadowed. (#317332)
|
||||
|
||||
2005-09-29 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk-zip.sh.in: DLLs are always in bin nowadays, no need to test.
|
||||
|
||||
* gtk/gtkmain.c (_gtk_get_localedir): The locale directory is
|
||||
passed to bindtextdomain() which isn't UTF-8-aware, so convert to
|
||||
system codepage using g_win32_locale_filename_from_utf8().
|
||||
(#317457, Kazuki Iwamoto)
|
||||
|
||||
2005-09-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkselection.c (_gtk_selection_request): Free mult_atoms
|
||||
here. (#317039, Paolo Borelli)
|
||||
|
||||
* gtk/gtktexttag.h:
|
||||
* gtk/gtktexttag.c (gtk_text_attributes_ref): Return the attributes
|
||||
to make this function work as boxed copy function. (#317455,
|
||||
Gustavo Carneiro)
|
||||
|
||||
* gtk/gtkclipboard.c (request_image_received_func): Don't unref
|
||||
NULL. (#316828, Tor Lillqvist)
|
||||
|
||||
2005-09-28 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* modules/input/imime.c: Include <config.h>. (#317444, Kazuki
|
||||
Iwamoto)
|
||||
|
||||
2005-09-27 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
Do not create the save mode-specific widgets in the open modes, so
|
||||
that we don't carry their baggage around.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c
|
||||
(gtk_file_chooser_default_constructor): Don't create the
|
||||
save_widgets here.
|
||||
(save_widgets_create): Set the impl->save_widgets directly here,
|
||||
instead of passing the widgets back to the caller. Also, pack
|
||||
them into the impl's box.
|
||||
(update_appearance): Create or destroy the save widgets as
|
||||
appropriate. Set the action of the save_file_name_entry here.
|
||||
(shortcuts_add_current_folder): Set the active item in the
|
||||
save_folder_combo only if it exists.
|
||||
(gtk_file_chooser_default_set_property): Don't set the action of
|
||||
the save_file_name_entry here.
|
||||
(gtk_file_chooser_default_update_current_folder): Set the base
|
||||
folder of the save_file_name_entry only if the entry exists.
|
||||
(shortcuts_drag_data_received_cb): Cast the selection_data->data
|
||||
to (const char *) since that's what shortcuts_drop_uris() expects.
|
||||
(file_list_drag_data_received_cb): Likewise, for
|
||||
g_uri_list_extract_uris().
|
||||
|
||||
2005-09-27 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (update_chooser_entry): If the
|
||||
selection is empty, clear the file name entry only if we are in
|
||||
CREATE_FOLDER mode. In SAVE mode, nothing will be selected when
|
||||
the user starts typeahead in the treeview, and we don't want to
|
||||
clear the file name entry in that case --- the user could be
|
||||
typing-ahead to look for a folder name. Fixes bug #308332, patch
|
||||
by Jürg Billeter.
|
||||
|
||||
2005-09-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.4 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
Pop below the entry if there's more free space below the entry
|
||||
than above. (#316948, Tommi Komulainen)
|
||||
|
||||
2005-09-26 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
|
||||
the shaped flag here, too. (#316871)
|
||||
(gdk_window_shape_combine_region): Currently unimplemented, so
|
||||
don't do anything to the shaped flag here.
|
||||
|
||||
2005-09-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Fix #316871, reported by Dan Winship:
|
||||
|
||||
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
|
||||
(gdk_window_shape_combine_region): Set it here.
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
|
||||
remove the child area for shaped windows.
|
||||
|
||||
2005-09-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_finalize):
|
||||
Don't leak expander pixbufs. (#316946, Tommi Komulainen)
|
||||
|
||||
2005-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_class_init): Fix the documentation
|
||||
for the grab-broken-event signal, noticed by Damon Chaplin.
|
||||
|
||||
2005-09-21 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkselection-win32.c (gdk_selection_convert,
|
||||
gdk_text_property_to_text_list_for_display,
|
||||
gdk_text_property_to_utf8_list_for_display,
|
||||
gdk_win32_selection_add_targets,
|
||||
_gdk_win32_selection_convert_to_dib): Free return value from
|
||||
gdk_atom_name().
|
||||
(gdk_text_property_to_text_list_for_display): Drop GError variable
|
||||
that isn't actually used after being set.
|
||||
|
||||
2005-09-20 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkselection-win32.c
|
||||
(gdk_selection_owner_get_for_display): Do return the correct owner
|
||||
for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
|
||||
a window GDK knows about). The reason to return NULL seems to have
|
||||
gone when in the fix for bug #163702 the artificial
|
||||
GDK_SELECTION_CLEAR event generation was removed from
|
||||
gdk_selection_send_notify_for_display(). Fixes bug #316552.
|
||||
|
||||
2005-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconview.c: Use g_list_nth_data() instead of g_list_nth()->data
|
||||
in multiple places to avoid segfaults if the index is out of range.
|
||||
(#316422, Guillaume Cottenceau)
|
||||
(gtk_icon_view_set_drag_dest_item):
|
||||
(gtk_icon_view_scroll_to_path): Fix a typo in the docs. (#316419,
|
||||
#316424, Guillaume Cottenceau)
|
||||
|
||||
Fri Sep 16 14:00:20 2005 Tim Janik <timj@imendio.com>
|
||||
|
||||
* gtk/gtkwindow.c: fix bug #316180.
|
||||
gtk_window_map_event(): new function to work around lost unmap requests.
|
||||
|
||||
2005-09-16 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c (draw_extension,
|
||||
draw_box_gap): Check whether the widget actually is a GtkNotebook
|
||||
before treating it as such. Drop some unneeded local variables,
|
||||
use parameter with same information instead. (#316412)
|
||||
|
||||
2005-09-14 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c (foreach_remove_func): Fix
|
||||
a use-after-free bug. (#316256, Alexander Nedotsukov)
|
||||
|
||||
2005-09-13 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: Turn off profiling for the stable
|
||||
branch (#undef PROFILE_FILE_CHOOSER).
|
||||
|
||||
2005-09-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconview.c (gtk_icon_view_class_init):
|
||||
(gtk_icon_view_get_dest_item_at_pos): Fix typos in the
|
||||
docs. (#316008, #316027, #316121, Guillaume Cottenceau)
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_set_icon_name): Fix a copy-and-paste
|
||||
mistake in the docs. (#315993, Guillaume Cottenceau)
|
||||
|
||||
* tests/testentrycompletion.c (create_simple_completion_model): Add
|
||||
some strings containing multibyte characters.
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
|
||||
Fix prefix insertion for multibyte characters. (#316095,
|
||||
Tommi Komulainen)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
|
||||
* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
|
||||
return NULL if the widget is not realized. (#316023,
|
||||
Guillaume Cottenceau)
|
||||
|
||||
2005-09-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_button_event):
|
||||
Make drag reordering work properly for columns other than the
|
||||
first. (#315054, Dan Winship)
|
||||
|
||||
* gtk/gtkfontbutton.c (gtk_font_button_update_font_info): Handle
|
||||
invalid fontnames better. (#315187, Ed Catmur)
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_set_font_name): Handle
|
||||
invalid fontnames better. (#136926, Michael R. Walton)
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
|
||||
Use connect_after to connect to the focus_out event. This
|
||||
ensures that the entry has already stopped blinking by the time
|
||||
we emit the edited signal. (#315229, Thomas Leonard)
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set
|
||||
unsigned ints to -1. (#315481, Kjartan Maraas)
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative
|
||||
to week_1stday, not to Sunday. Gotta love the ISO 14652 guys...
|
||||
(#314473, Stanislav Brabec)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_visible_range): Document
|
||||
memory handling. (#314975, Torsten Schoenfeld)
|
||||
|
||||
2005-09-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
|
||||
display name. There is only one GdkDisplay on Win32, and
|
||||
constructing the display name isn't entirely trivial, so cacheing
|
||||
is probably worth it. For instance GIMP calls this function a lot.
|
||||
(gdk_display_open): Call gdk_display_get_name() to prime the
|
||||
cached name.
|
||||
(gdk_display_get_n_screens, gdk_display_get_screen,
|
||||
gdk_display_get_default_screen): Verify parameter correctness like
|
||||
the X11 backend does.
|
||||
|
||||
* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
|
||||
Return a freshly allocated string, as the API specifies. Fixes a
|
||||
heap corruption problem that caused random errors and crashes in
|
||||
GIMP, for instance.
|
||||
|
||||
2005-09-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaction.c (connect_proxy): Set the label of a button
|
||||
if it has no child. (#315253, John Finlay)
|
||||
|
||||
2005-09-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_destroy): Disconnect idle handlers
|
||||
on destroy to avoid problems when they are called on a destroyed
|
||||
widget. (#315135, John Cupitt)
|
||||
|
||||
* gtk/gtkmain.c (gtk_get_event_widget): If the window is destroyed,
|
||||
we still need to deliver the destroy event. (#314980, Chris Lahey)
|
||||
|
||||
2005-09-02 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
|
||||
(shortcuts_activate_volume):
|
||||
Handle base_path being null in the rest of the cases (#310270)
|
||||
|
||||
2005-09-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
|
||||
cursor position also in root window coordinates. Prune out
|
||||
superfluous WM_MOUSEMOVE events even earlier, based on root window
|
||||
coordinates. Windows sends WM_MOUSEMOVE messages after a new
|
||||
window has ben mapped below the cursor even if the mouse doesn't
|
||||
move. We used to generate GDK_MOTION_NOTIFY in these cases. This
|
||||
confused at least gtk_menu_motion_notify(). (#314995)
|
||||
|
||||
* gtk/gtkintl.h: No need to include config.h here. It caused
|
||||
warnings about GTK_LOCALEDIR being redefined on Win32 when
|
||||
compiling files where gtkintl.h is included after gtkprivate.h
|
||||
(which #undefines and re-#defines GTK_LOCALEDIR on Win32).
|
||||
|
||||
2005-09-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaction.c (gtk_action_get_accel_closure): Fix doc
|
||||
typo. (#314921, Guillaume Cottenceau)
|
||||
|
||||
2005-08-31 Baris Cicek <baris@teamforce.name.tr>
|
||||
|
||||
* configure.in: Added ku to ALL_LINGUAS
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.8.3 ===
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_grab_notify): Only cancel if the menu
|
||||
was active. (#314298, Christian Persch, analysis by Mark McLoughlin)
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon): Remove an
|
||||
accidentally leftover duplicate pixbuf creation. (#314700,
|
||||
Kjartan Maraas)
|
||||
|
||||
* gtk/gtksettings.c (settings_update_cursor_theme): Don't
|
||||
leak the cursor theme name. (#314693, Kjartan Maraas)
|
||||
|
||||
* gdk/x11/gdkasync.c (_gdk_x11_get_window_child_info): Free
|
||||
state.children in all cases. (#313862, Kjartan Maraas)
|
||||
|
||||
2005-08-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (gtk_ui_manager_class_init): Fix the default
|
||||
value of the ui property. (#314532, Yong Wang)
|
||||
|
||||
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Don't warn
|
||||
when G_MAXLONG is passed as length.
|
||||
|
||||
2005-08-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c: Add a separate --ignore-theme-index option
|
||||
to avoid overloading --force. (JP Rosevaar)
|
||||
|
||||
* gtk/gtkicontheme.c (theme_lookup_icon): Avoid an uninitialized
|
||||
variable warning, pointed out by Colin Walters. (#314585)
|
||||
|
||||
2005-08-26 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkfilesystemwin32.c: Remove some ifdeffed out debugging
|
||||
printouts.
|
||||
(gtk_file_system_win32_parse): Don't mishandle UNC paths. (#314519)
|
||||
|
||||
2005-08-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Fix the calculation
|
||||
of week_start. (#314473, JP Rosevaar)
|
||||
|
||||
2005-08-25 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* gtk/gtkfilesystemmodel.c (idle_finished_loading_cb): Acquire GDK
|
||||
lock. (#314533, Thomas Fitzsimmons)
|
||||
|
||||
2005-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle
|
||||
NULL gracefully. (#314523, Ed Catmur)
|
||||
|
||||
2005-08-25 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
|
||||
Handle theme == NULL.
|
||||
|
||||
2005-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
|
||||
y offset into account when positioning the popup. (#314470,
|
||||
Christian Persch)
|
||||
|
||||
2005-08-25 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
|
||||
as instance_init, not base_init! (#314452, Fix from Frederic
|
||||
Crozat, reported by Joe Marcus Clarke). Trivial cleanup: use -1.
|
||||
rather than 1 for a negative flag value.
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
||||
@@ -18,8 +18,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.8.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.8.2 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.8.7.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.8.7 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
|
||||
@@ -1,3 +1,134 @@
|
||||
Overview of Changes from GTK+ 2.8.6 to GTK+ 2.8.7
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Don't special-case the names of Home and Desktop
|
||||
[Federico Mena Quintero]
|
||||
- Avoid loading more than one directory initially.
|
||||
[Federico]
|
||||
- Make the file chooser work better with window
|
||||
groups [Christian Persch]
|
||||
- Improve keynav in the pathbar [Carlos Garnacho,
|
||||
Andrei Yurkevich]
|
||||
- Don't access unmounted volumes [Federico]
|
||||
* GtkTextView
|
||||
- Avoid quadratic blowup when deleting text with
|
||||
lots of tags [Matthias Clasen]
|
||||
- Fix drag-selection corner cases [Arvind S N,
|
||||
Paolo Borelli]
|
||||
* GtkEntry
|
||||
- Add the entry completion popup to the window
|
||||
group [Christian Persch]
|
||||
* GtkTreeView
|
||||
- Fix background drawing in RTL locales [Eric Cazeaux]
|
||||
- Handle Shift-G for going back in typeahead
|
||||
search [Christian Neumair]
|
||||
* GtkComboBox
|
||||
- Leave Ctrl-PageUp/PageDown to applications
|
||||
[Christian Neumair]
|
||||
* Fix compilation problems with gtkcalendar.c
|
||||
[Matthias Hasselmann]
|
||||
* Add labels for GTK_STOCK_CONNECT and
|
||||
GTK_STOCK_DISCONNECT items [Richard Hult]
|
||||
* Resolve symbols in dlopened modules lazily [Laszlo
|
||||
Peter]
|
||||
* GDK
|
||||
- Don't try to set overlarge window icons [Claudio
|
||||
Saavedra]
|
||||
- Improve handling of odd keymaps [Kean Johnston]
|
||||
* Win32 changes
|
||||
- Speed up compositing [John Ehresman]
|
||||
- Improve handling of clipboard [Tor Lillqvist]
|
||||
- Improve visuals of scrollbars, toolbars, handleboxes
|
||||
and menubars in the ms-windows theme [Dom Lachowicz]
|
||||
- Make icon masks work on Win98 [Peter Zelezny]
|
||||
- Hide resize and maximize buttons on non-resizable
|
||||
windows [Tor]
|
||||
- Don't hide dotfiles [Tor]
|
||||
* Bug fixes [Kazuki Iwamoto, Ross Burton, Michael
|
||||
Natterer, Bogdan Nicula, Damien Carbery, Gustavo
|
||||
Carneiro, Tommi Komulainen, Thomas Klausner,
|
||||
Alexander Larsson, Bastien Nocera, Federico
|
||||
Mena Quintero, John Ehresman, Paolo Borelli,
|
||||
Antonio Sacchi, Christian Persch, Carlos
|
||||
Garnacho, Jeremy Cook, Nickolay V. Shmyrev,
|
||||
Richard Hult, Maxim Udushlivy, Peter Zelezny]
|
||||
* Documentation improvements [Paolo Borelli,
|
||||
Christian Neumair, Christian Persch
|
||||
|
||||
Overview of Changes from GTK+ 2.8.5 to GTK+ 2.8.6
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Don't reload the current folder unnecessarily on map [Federico
|
||||
Mena Quintero]
|
||||
* Revert a change from 2.8.5 that could lead to assertion
|
||||
failures when finalizing GtkStyles [Matthias Clasen]
|
||||
* Remove context prefixes from Portugese translations [Duarte
|
||||
Henriques]
|
||||
|
||||
Overview of Changes from GTK+ 2.8.4 to GTK+ 2.8.5
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Don't clear the file name entry too often when
|
||||
in SAVE mode. [Jürg Billeter]
|
||||
- Reduce the startup time in OPEN mode [Federico
|
||||
Mena Quintero]
|
||||
* Stop drag in GtkPaned when grab shadowed [Matthias Clasen]
|
||||
* Correct the calculation for the first weekday
|
||||
in GtkCalendar [Matthias Clasen]
|
||||
* Use a larger buffer when determining the image
|
||||
format in gdk-pixbuf [Sebastian Bacher, Dom Lachowicz]
|
||||
* Win32 bug fixes [Kazuki Iwamoto, Tor Lillqvist]
|
||||
* Other bug fixes [Tor Lillqvist, Gustavo Carneiro,
|
||||
Paolo Borelli, Ray Strode, Søren Sandmann, Tommi Komulainen,
|
||||
Benjamin Berg]
|
||||
|
||||
Overview of Changes from GTK+ 2.8.3 to GTK+ 2.8.4
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Turn off the profiling code [Federico Mena Quintero]
|
||||
* GtkEntryCompletion
|
||||
- Make completion work with multibyte characters
|
||||
[Tommi Komulainen]
|
||||
- Improve positioning of large popups [Tommi Komulainen]
|
||||
* GtkTreeView
|
||||
- Make column reordering by DND work better [Dan
|
||||
Winship]
|
||||
* GtkCalendar
|
||||
- Correctly determine the first weekday from
|
||||
nl_langinfo() [Stanislav Brabec]
|
||||
* GtkFontSel, GtkFontButton
|
||||
- Handle invalid font names better [Michael R. Walton,
|
||||
Ed Catmur]
|
||||
* Deliver destroy events [Chris Lahey]
|
||||
* Fix redrawing of widgets in the the presence
|
||||
of shaped child windows [Dan Winship]
|
||||
* Win32 changes
|
||||
- Prune unnecessary mouse events [Tor Lillqvist]
|
||||
- Fix memory corruption when using display
|
||||
names [Tor Lillqvist]
|
||||
* Other bug fixes [Alexander Larsson, John Cupitt,
|
||||
John Finlay, Kjartan Maraas, Thomas Leonard,
|
||||
Guillaume Cottenceau, Alexander Nedotsukov, Tim Janik,
|
||||
Tor Lillqvist, Tommi Komulainen
|
||||
* Documentation improvements [Guillaume Cottenceau,
|
||||
Torsten Schoenfeld, Damon Chaplin, Vincent Untz,
|
||||
Tommi Komulainen, Federico Mena Quintero
|
||||
* New and updated translations (bg,bn,et,eu,fr,gl,hi,it,
|
||||
ku,ru,sr,sv,tr,vi)
|
||||
|
||||
Overview of Changes from GTK+ 2.8.2 to GTK+ 2.8.3
|
||||
=================================================
|
||||
* Fix problems with the handling of initial settings
|
||||
for font options and cursor themes [Frederic Crozat,
|
||||
Joe Markus Clarke, Owen Taylor, Kjartan Maraas]
|
||||
* Add a --ignore-theme-index option to
|
||||
gtk-update-icon-cache [JP Rosevaar]
|
||||
* Other bug fixes [Christian Persch, Owen Taylor,
|
||||
Ed Catmur, Thomas Fitzsimmons, JP Rosevaar, Tor
|
||||
Lillqvist, Colin Walters, Yong Wang, Matthias,
|
||||
Kjartan Maraas, Christian Persch, Mark McLoughlin]
|
||||
* Updated translations (ca,es,fr,pt_BR)
|
||||
|
||||
Overview of Changes from GTK+ 2.8.1 to GTK+ 2.8.2
|
||||
=================================================
|
||||
* Fix a crash with custom icon themes, which affected
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.8.2. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.8.7. 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.
|
||||
|
||||
+8
-5
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [8])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_micro_version], [7])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
m4_define([gtk_interface_age], [2])
|
||||
m4_define([gtk_interface_age], [7])
|
||||
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
|
||||
@@ -433,7 +433,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 az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta te th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
|
||||
ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ko ku li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta te th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
@@ -1388,9 +1388,12 @@ fi
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
GDK_PACKAGES="$PANGO_PACKAGES $X_PACKAGES"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES"
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES"
|
||||
fi
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $X_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
|
||||
|
||||
#
|
||||
# If we aren't writing explicit dependencies, then don't put the extra libraries we need
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
2005-11-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.7 ===
|
||||
|
||||
2005-10-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib-2.0.pc.in (Requires): Require
|
||||
gmodule-no-export-2.0 instead of gmodule-2.0
|
||||
|
||||
2005-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.6 ===
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.5 ===
|
||||
|
||||
2005-09-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.4 ===
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.3 ===
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
||||
@@ -6,6 +6,6 @@ includedir=@includedir@
|
||||
Name: GdkPixbuf Xlib
|
||||
Description: GdkPixbuf rendering for Xlib
|
||||
Version: @VERSION@
|
||||
Requires: gobject-2.0,gmodule-2.0,gdk-pixbuf-2.0
|
||||
Requires: gobject-2.0,gmodule-no-export-2.0,gdk-pixbuf-2.0
|
||||
Libs: -L${libdir} -lgdk_pixbuf_xlib-@GTK_API_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
@@ -132,8 +133,8 @@ about_cb (GtkAction *action,
|
||||
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"name", "GTK+ Code Demos",
|
||||
"version", "2.4.3",
|
||||
"copyright", "(C) 1997-2004 The GTK+ Team",
|
||||
"version", PACKAGE_VERSION,
|
||||
"copyright", "(C) 1997-2005 The GTK+ Team",
|
||||
"license", license,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ functions.",
|
||||
|
||||
@@ -41,7 +41,8 @@ paste_received (GtkClipboard *clipboard,
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Set the entry text */
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
if(text)
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,3 +1,46 @@
|
||||
2005-11-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.7 ===
|
||||
|
||||
2005-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.6 ===
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.5 ===
|
||||
|
||||
2005-09-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.4 ===
|
||||
|
||||
2005-09-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/tmpl/gtkfilechooser.sgml: List all the default key bindings.
|
||||
Fix the documentation for the "location-popup" binding signal; its
|
||||
"path" argument was not listed. Mention a tip to have a crude
|
||||
form of bookmarks accessible through key bindings.
|
||||
|
||||
2005-09-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkeditable.sgml: Clarify docs
|
||||
for ::insert-text signal. (#316094, Tommi
|
||||
Komulainen)
|
||||
|
||||
2005-09-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkpaned.sgml: Fix some typos.
|
||||
(#315208, Vincent Untz)
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.3 ===
|
||||
|
||||
2005-08-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk-update-icon-cache.xml:
|
||||
* gtk/gtk-update-icon-cache.1: Updates.
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
|
||||
.\" Instead of manually editing it, you probably should edit the DocBook XML
|
||||
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
|
||||
.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/23/2005" "" ""
|
||||
.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/26/2005" "" ""
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
@@ -11,7 +11,7 @@
|
||||
gtk\-update\-icon\-cache \- Icon theme caching utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP 22
|
||||
\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-quiet] {iconpath}
|
||||
\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-ignore\-theme\-index] [\-\-quiet] {iconpath}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBgtk\-update\-icon\-cache\fR
|
||||
@@ -31,6 +31,11 @@ to avoid a lot of system call and disk seek overhead when the application starts
|
||||
\-\-force, \-f
|
||||
Overwrite an existing cache file even if it appears to be uptodate.
|
||||
.TP
|
||||
\-\-ignore\-theme\-index, \-t
|
||||
Don't check for the existence of 'index.theme' in the icon theme directory. Without this option,
|
||||
\fBgtk\-update\-icon\-cache\fR
|
||||
refuses to create an icon cache in a directory which does not appear to be the toplevel directory of an icon theme.
|
||||
.TP
|
||||
\-\-index\-only, \-i
|
||||
Don't include image data in the cache.
|
||||
.TP
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<command>gtk-update-icon-cache</command>
|
||||
<arg choice="opt">--force</arg>
|
||||
<arg choice="opt">--index-only</arg>
|
||||
<arg choice="opt">--ignore-theme-index</arg>
|
||||
<arg choice="opt">--quiet</arg>
|
||||
<arg choice="req">iconpath</arg>
|
||||
</cmdsynopsis>
|
||||
@@ -47,6 +48,16 @@ multiple applications, the overall memory consumption is reduced as well.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>--ignore-theme-index</term>
|
||||
<term>-t</term>
|
||||
<listitem><para>Don't check for the existence of 'index.theme' in the icon theme
|
||||
directory. Without this option, <command>gtk-update-icon-cache</command> refuses
|
||||
to create an icon cache in a directory which does not appear to be the toplevel
|
||||
directory of an icon theme.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>--index-only</term>
|
||||
<term>-i</term>
|
||||
|
||||
@@ -125,11 +125,12 @@ it from being inserted entirely.
|
||||
|
||||
@editable: the object which received the signal.
|
||||
@new_text: the new text to insert.
|
||||
@new_text_length: the length of the new text.
|
||||
@position: the position at which to insert the new text.
|
||||
this is an in-out paramter. After the signal
|
||||
emission is finished, it should point after
|
||||
the newly inserted text.
|
||||
@new_text_length: the length of the new text, in bytes,
|
||||
or -1 if new_text is nul-terminated
|
||||
@position: the position, in characters, at which to insert
|
||||
the new text. this is an in-out parameter.
|
||||
After the signal emission is finished, it should
|
||||
point after the newly inserted text.
|
||||
|
||||
<!-- ##### FUNCTION gtk_editable_select_region ##### -->
|
||||
<para>
|
||||
|
||||
@@ -204,15 +204,27 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Signal name</entry>
|
||||
<entry>Key</entry>
|
||||
<entry>Default key combinations</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>location-popup</entry>
|
||||
<entry><keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo></entry>
|
||||
<entry>
|
||||
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>;
|
||||
<keycap>/</keycap>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>up-folder</entry>
|
||||
<entry><keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo></entry>
|
||||
<entry>
|
||||
<keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo><footnote>
|
||||
<para>
|
||||
Both the individual Up key and the numeric
|
||||
keypad's Up key are supported.
|
||||
</para>
|
||||
</footnote>
|
||||
;
|
||||
<keycap>Backspace</keycap>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>down-folder</entry>
|
||||
@@ -227,16 +239,14 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
|
||||
</informaltable>
|
||||
|
||||
<para>
|
||||
To change these defaults to something else, you could
|
||||
include the following fragment in your
|
||||
<filename>.gtkrc-2.0</filename> file:
|
||||
You can change these defaults to something else. For
|
||||
example, to add a <keycap>Shift</keycap> modifier to a few
|
||||
of the default bindings, you can include the following
|
||||
fragment in your <filename>.gtkrc-2.0</filename> file:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
binding "my-own-gtkfilechooser-bindings" {
|
||||
bind "<Alt><Shift>l" {
|
||||
"location-popup" ()
|
||||
}
|
||||
bind "<Alt><Shift>Up" {
|
||||
"up-folder" ()
|
||||
}
|
||||
@@ -244,7 +254,7 @@ binding "my-own-gtkfilechooser-bindings" {
|
||||
"down-folder" ()
|
||||
}
|
||||
bind "<Alt><Shift>Home" {
|
||||
"home-folder-folder" ()
|
||||
"home-folder" ()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,14 +267,22 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
|
||||
|
||||
<programlisting>
|
||||
void user_function (GtkFileChooserDefault *chooser,
|
||||
const char *path,
|
||||
<link linkend="gpointer">gpointer</link> user_data);
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
This is used to make the file chooser show a "Location"
|
||||
dialog which the user can use to manually type the name of
|
||||
the file he wishes to select. By default this is bound to
|
||||
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>.
|
||||
the file he wishes to select. The
|
||||
<parameter>path</parameter> argument is a string that gets
|
||||
put in the text entry for the file name. By default this is bound to
|
||||
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
|
||||
with a <parameter>path</parameter> string of "" (the empty
|
||||
string); it is also bound to <keycap>/</keycap> with a
|
||||
<parameter>path</parameter> string of "<literal>/</literal>"
|
||||
(a slash): this lets you type <keycap>/</keycap> and
|
||||
immediately type a path name.
|
||||
</para>
|
||||
|
||||
<variablelist role="params">
|
||||
@@ -276,6 +294,14 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
default contents for the text entry for the file name
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>user_data</parameter> :</term>
|
||||
<listitem>
|
||||
@@ -285,6 +311,30 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<tip>
|
||||
<para>
|
||||
You can create your own bindings for the
|
||||
<symbol>location-popup</symbol> signal with custom
|
||||
<parameter>path</parameter> strings, and have a crude form
|
||||
of easily-to-type bookmarks. For example, say you access
|
||||
the path <filename>/home/username/misc</filename> very
|
||||
frequently. You could then create an <keycombo>
|
||||
<keycap>Alt</keycap> <keycap>M</keycap> </keycombo>
|
||||
shortcut by including the following in your
|
||||
<filename>.gtkrc-2.0</filename>:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
binding "misc-shortcut" {
|
||||
bind "<Alt>M" {
|
||||
"location-popup" ("/home/username/misc")
|
||||
}
|
||||
}
|
||||
|
||||
class "GtkFileChooserDefault" binding "misc-shortcut"
|
||||
</programlisting>
|
||||
</tip>
|
||||
</refsect3>
|
||||
|
||||
<refsect3 id="GtkFileChooserDefault-up-folder">
|
||||
@@ -298,8 +348,9 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
|
||||
<para>
|
||||
This is used to make the file chooser go to the parent of
|
||||
the current folder in the file hierarchy. By default this
|
||||
is bound to
|
||||
<keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>.
|
||||
is bound to <keycap>Backspace</keycap> and
|
||||
<keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>
|
||||
(the Up key in the numeric keypad also works).
|
||||
</para>
|
||||
|
||||
<variablelist role="params">
|
||||
@@ -338,7 +389,8 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
|
||||
"/foo/<emphasis>bar/</emphasis>baz", then this will cause
|
||||
the file chooser to switch to the "baz" subfolder. By
|
||||
default this is bound to
|
||||
<keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>.
|
||||
<keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>
|
||||
(the Down key in the numeric keypad also works).
|
||||
</para>
|
||||
|
||||
<variablelist role="params">
|
||||
@@ -372,7 +424,8 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
|
||||
<para>
|
||||
This is used to make the file chooser show the user's home
|
||||
folder in the file list. By default this is bound to
|
||||
<keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>.
|
||||
<keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>
|
||||
(the Home key in the numeric keypad also works).
|
||||
</para>
|
||||
|
||||
<variablelist role="params">
|
||||
|
||||
@@ -201,7 +201,7 @@ Adds a child to the top or left pane.
|
||||
@paned: a paned widget
|
||||
@child: the child to add
|
||||
@resize: should this child expand when the paned widget is resized.
|
||||
@shrink: can this child be made smaller than its requsition.
|
||||
@shrink: can this child be made smaller than its requisition.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_paned_pack2 ##### -->
|
||||
@@ -212,7 +212,7 @@ Adds a child to the bottom or right pane.
|
||||
@paned: a paned widget
|
||||
@child: the child to add
|
||||
@resize: should this child expand when the paned widget is resized.
|
||||
@shrink: can this child be made smaller than its requsition.
|
||||
@shrink: can this child be made smaller than its requisition.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_paned_get_child1 ##### -->
|
||||
|
||||
@@ -510,5 +510,6 @@ modified directly.
|
||||
</para>
|
||||
|
||||
@values:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,42 @@
|
||||
2005-11-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.7 ===
|
||||
|
||||
2005-11-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-xpm.c: Fix several integer overflows which have been
|
||||
reported as CVE-2005-3186 and CVE-2005-2975.
|
||||
|
||||
2005-10-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call
|
||||
gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589,
|
||||
Bogdan Nicula)
|
||||
|
||||
2005-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.6 ===
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.5 ===
|
||||
|
||||
2005-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
|
||||
* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
|
||||
* gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats,
|
||||
instead of 128 or 256 bytes. (#317225, Sebastien Bacher,
|
||||
Dom Lachowicz)
|
||||
|
||||
2005-09-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.4 ===
|
||||
|
||||
2005-08-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.3 ===
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
||||
@@ -370,7 +370,7 @@ gdk-pixbuf-enum-types.h: s-enum-types-h
|
||||
@true
|
||||
|
||||
s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
|
||||
( cd $(srcdir) && glib-mkenums \
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#ifndef __GDK_PIXBUF_ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
|
||||
--fprod "/* enumerations from \"@filename@\" */\n" \
|
||||
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
|
||||
@@ -387,7 +387,7 @@ MAINTAINERCLEANFILES += s-enum-types-h
|
||||
# gdk-pixbuf-enum-types.c
|
||||
#
|
||||
gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
|
||||
(cd $(srcdir) && glib-mkenums \
|
||||
(cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#include <gdk-pixbuf/gdk-pixbuf.h>\n#include \"gdk-pixbuf-alias.h\"\n" \
|
||||
--fprod "\n/* enumerations from \"@filename@\" */" \
|
||||
--ftail "\n#define __GDK_PIXBUF_ENUM_TYPES_C__\n#include \"gdk-pixbuf-aliasdef.c\"" \
|
||||
|
||||
@@ -136,7 +136,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
|
||||
GdkPixbufAnimation *animation;
|
||||
int size;
|
||||
FILE *f;
|
||||
guchar buffer [128];
|
||||
guchar buffer [1024];
|
||||
GdkPixbufModule *image_module;
|
||||
gchar *display_name;
|
||||
gboolean locked = FALSE;
|
||||
|
||||
@@ -839,7 +839,7 @@ gdk_pixbuf_new_from_file (const char *filename,
|
||||
GdkPixbuf *pixbuf;
|
||||
int size;
|
||||
FILE *f;
|
||||
guchar buffer[256];
|
||||
guchar buffer[1024];
|
||||
GdkPixbufModule *image_module;
|
||||
gchar *display_name;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
/* Internal data */
|
||||
|
||||
#define LOADER_HEADER_SIZE 128
|
||||
#define LOADER_HEADER_SIZE 1024
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -485,7 +485,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
|
||||
/* we expect it's not to be closed */
|
||||
g_return_val_if_fail (priv->closed == FALSE, FALSE);
|
||||
|
||||
if (priv->image_module == NULL)
|
||||
if (count > 0 && priv->image_module == NULL)
|
||||
{
|
||||
gint eaten;
|
||||
|
||||
@@ -727,7 +727,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
|
||||
/* we expect it's not closed */
|
||||
g_return_val_if_fail (priv->closed == FALSE, TRUE);
|
||||
|
||||
/* We have less the 128 bytes in the image. Flush it, and keep going. */
|
||||
/* We have less the LOADER_HEADER_SIZE bytes in the image.
|
||||
* Flush it, and keep going.
|
||||
*/
|
||||
if (priv->image_module == NULL)
|
||||
{
|
||||
GError *tmp = NULL;
|
||||
|
||||
+5
-2
@@ -405,7 +405,8 @@ file_buffer (enum buf_op op, gpointer handle)
|
||||
/* Fall through to the xpm_read_string. */
|
||||
|
||||
case op_body:
|
||||
xpm_read_string (h->infile, &h->buffer, &h->buffer_size);
|
||||
if(!xpm_read_string (h->infile, &h->buffer, &h->buffer_size))
|
||||
return NULL;
|
||||
return h->buffer;
|
||||
|
||||
default:
|
||||
@@ -500,7 +501,9 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
|
||||
_("XPM has invalid number of chars per pixel"));
|
||||
return NULL;
|
||||
}
|
||||
if (n_col <= 0 || n_col >= G_MAXINT / (cpp + 1)) {
|
||||
if (n_col <= 0 ||
|
||||
n_col >= G_MAXINT / (cpp + 1) ||
|
||||
n_col >= G_MAXINT / sizeof (XPMColor)) {
|
||||
g_set_error (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
|
||||
+2
-2
@@ -234,7 +234,7 @@ BUILT_SOURCES = \
|
||||
gdkenumtypes.h: stamp-gdkenumtypes.h
|
||||
@true
|
||||
stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
|
||||
( cd $(srcdir) && glib-mkenums \
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#ifndef __GDK_ENUM_TYPES_H__\n#define __GDK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
|
||||
--fprod "/* enumerations from \"@filename@\" */\n" \
|
||||
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
|
||||
@@ -244,7 +244,7 @@ stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
|
||||
&& rm -f xgen-geth \
|
||||
&& echo timestamp > $(@F)
|
||||
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) Makefile
|
||||
( cd $(srcdir) && glib-mkenums \
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#define GDK_ENABLE_BROKEN\n#include \"gdk.h\"\n#include \"gdkalias.h\"\n" \
|
||||
--fprod "\n/* enumerations from \"@filename@\" */" \
|
||||
--ftail "\n#define __GDK_ENUM_TYPES_C__\n#include \"gdkaliasdef.c\"\n" \
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ gdk_color_get_type (void)
|
||||
* by <function>XParseColor</function>; these include
|
||||
* name for a color from <filename>rgb.txt</filename>, such as
|
||||
* <literal>DarkSlateGray</literal>, or a hex specification
|
||||
* such as <literal>305050</literal>.
|
||||
* such as <literal>#3050b2</literal> or <literal>#35b</literal>.
|
||||
*
|
||||
* Return value: %TRUE if the parsing succeeded.
|
||||
**/
|
||||
|
||||
@@ -188,6 +188,10 @@ gdk_gc_finalize (GObject *object)
|
||||
gdk_region_destroy (priv->clip_region);
|
||||
if (gc->colormap)
|
||||
g_object_unref (gc->colormap);
|
||||
if (priv->tile)
|
||||
g_object_unref (priv->tile);
|
||||
if (priv->stipple)
|
||||
g_object_unref (priv->stipple);
|
||||
|
||||
G_OBJECT_CLASS (gdk_gc_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
+5
-5
@@ -53,14 +53,14 @@ gdk_screen_get_type (void)
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkScreenClass),
|
||||
(GBaseInitFunc) gdk_screen_init,
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gdk_screen_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GdkScreen),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) NULL,
|
||||
(GInstanceInitFunc) gdk_screen_init,
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
@@ -103,7 +103,7 @@ gdk_screen_class_init (GdkScreenClass *klass)
|
||||
static void
|
||||
gdk_screen_init (GdkScreen *screen)
|
||||
{
|
||||
screen->resolution = -1;
|
||||
screen->resolution = -1.;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -407,7 +407,7 @@ gdk_screen_set_resolution_libgtk_only (GdkScreen *screen,
|
||||
if (dpi >= 0)
|
||||
screen->resolution = dpi;
|
||||
else
|
||||
screen->resolution = -1;
|
||||
screen->resolution = -1.;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -423,7 +423,7 @@ gdk_screen_set_resolution_libgtk_only (GdkScreen *screen,
|
||||
gdouble
|
||||
gdk_screen_get_resolution_libgtk_only (GdkScreen *screen)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1.);
|
||||
|
||||
return screen->resolution;
|
||||
}
|
||||
|
||||
+1
-1
@@ -2450,7 +2450,7 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
|
||||
child_region = gdk_region_rectangle (&child_rect);
|
||||
|
||||
/* remove child area from the invalid area of the parent */
|
||||
if (GDK_WINDOW_IS_MAPPED (child))
|
||||
if (GDK_WINDOW_IS_MAPPED (child) && !child->shaped)
|
||||
gdk_region_subtract (visible_region, child_region);
|
||||
|
||||
if (child_func && (*child_func) ((GdkWindow *)child, user_data))
|
||||
|
||||
@@ -287,6 +287,7 @@ struct _GdkWindowObject
|
||||
|
||||
guint accept_focus : 1;
|
||||
guint focus_on_map : 1;
|
||||
guint shaped : 1;
|
||||
|
||||
GdkEventMask event_mask;
|
||||
};
|
||||
|
||||
@@ -599,6 +599,8 @@ gdk_screen_get_system_colormap (GdkScreen *screen)
|
||||
static GdkColormap *colormap = NULL;
|
||||
GdkColormapPrivateWin32 *private;
|
||||
|
||||
g_return_val_if_fail (screen == _gdk_screen, NULL);
|
||||
|
||||
if (!colormap)
|
||||
{
|
||||
colormap = g_object_new (gdk_colormap_get_type (), NULL);
|
||||
@@ -652,7 +654,7 @@ gdk_colormap_change (GdkColormap *colormap,
|
||||
PALETTEENTRY *pe;
|
||||
int i;
|
||||
|
||||
g_return_if_fail (colormap != NULL);
|
||||
g_return_if_fail (GDK_IS_COLORMAP (colormap));
|
||||
|
||||
cmapp = GDK_WIN32_COLORMAP_DATA (colormap);
|
||||
|
||||
@@ -694,7 +696,7 @@ gdk_colors_alloc (GdkColormap *colormap,
|
||||
gint return_val;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), 0);
|
||||
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), FALSE);
|
||||
|
||||
private = GDK_WIN32_COLORMAP_DATA (colormap);
|
||||
|
||||
@@ -1143,6 +1145,7 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
|
||||
|
||||
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), FALSE);
|
||||
g_return_val_if_fail (colors != NULL, FALSE);
|
||||
g_return_val_if_fail (success != NULL, ncolors);
|
||||
|
||||
private = GDK_WIN32_COLORMAP_DATA (colormap);
|
||||
|
||||
@@ -1301,8 +1304,8 @@ gdk_colormap_match_color (GdkColormap *cmap,
|
||||
GdkScreen*
|
||||
gdk_colormap_get_screen (GdkColormap *cmap)
|
||||
{
|
||||
g_return_val_if_fail (cmap != NULL, NULL);
|
||||
g_return_val_if_fail (GDK_IS_COLORMAP (cmap), NULL);
|
||||
|
||||
return gdk_screen_get_default ();
|
||||
return _gdk_screen;
|
||||
}
|
||||
|
||||
|
||||
+91
-46
@@ -136,7 +136,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
{
|
||||
HCURSOR hcursor;
|
||||
|
||||
g_return_val_if_fail (display == gdk_display_get_default (), NULL);
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
|
||||
hcursor = _gdk_win32_data_to_wcursor (cursor_type);
|
||||
|
||||
@@ -365,7 +365,7 @@ gdk_cursor_new_from_name (GdkDisplay *display,
|
||||
HCURSOR hcursor = NULL;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS(_default_cursors); i++)
|
||||
{
|
||||
@@ -520,7 +520,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
|
||||
{
|
||||
HCURSOR hcursor;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
|
||||
g_return_val_if_fail (0 <= x && x < gdk_pixbuf_get_width (pixbuf), NULL);
|
||||
g_return_val_if_fail (0 <= y && y < gdk_pixbuf_get_height (pixbuf), NULL);
|
||||
@@ -534,7 +534,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
|
||||
gboolean
|
||||
gdk_display_supports_cursor_alpha (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
g_return_val_if_fail (display == _gdk_display, FALSE);
|
||||
|
||||
return _gdk_win32_pixbuf_to_hicon_supports_alpha ();
|
||||
}
|
||||
@@ -542,7 +542,7 @@ gdk_display_supports_cursor_alpha (GdkDisplay *display)
|
||||
gboolean
|
||||
gdk_display_supports_cursor_color (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
g_return_val_if_fail (display == _gdk_display, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -550,7 +550,7 @@ gdk_display_supports_cursor_color (GdkDisplay *display)
|
||||
guint
|
||||
gdk_display_get_default_cursor_size (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
|
||||
g_return_val_if_fail (display == _gdk_display, 0);
|
||||
|
||||
return MIN (GetSystemMetrics (SM_CXCURSOR), GetSystemMetrics (SM_CYCURSOR));
|
||||
}
|
||||
@@ -560,7 +560,7 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
g_return_if_fail (display == _gdk_display);
|
||||
|
||||
if (width)
|
||||
*width = GetSystemMetrics (SM_CXCURSOR);
|
||||
@@ -613,19 +613,32 @@ create_alpha_bitmap (gint width, gint height, guchar **outdata)
|
||||
}
|
||||
|
||||
static HBITMAP
|
||||
create_color_bitmap (gint width, gint height, guchar **outdata)
|
||||
create_color_bitmap (gint width,
|
||||
gint height,
|
||||
guchar **outdata,
|
||||
gint bits)
|
||||
{
|
||||
BITMAPV4HEADER bi;
|
||||
struct {
|
||||
BITMAPV4HEADER bmiHeader;
|
||||
RGBQUAD bmiColors[2];
|
||||
} bmi;
|
||||
HDC hdc;
|
||||
HBITMAP hBitmap;
|
||||
|
||||
ZeroMemory (&bi, sizeof (BITMAPV4HEADER));
|
||||
bi.bV4Size = sizeof (BITMAPV4HEADER);
|
||||
bi.bV4Width = width;
|
||||
bi.bV4Height = height;
|
||||
bi.bV4Planes = 1;
|
||||
bi.bV4BitCount = 24;
|
||||
bi.bV4V4Compression = BI_RGB;
|
||||
ZeroMemory (&bmi, sizeof (bmi));
|
||||
bmi.bmiHeader.bV4Size = sizeof (BITMAPV4HEADER);
|
||||
bmi.bmiHeader.bV4Width = width;
|
||||
bmi.bmiHeader.bV4Height = height;
|
||||
bmi.bmiHeader.bV4Planes = 1;
|
||||
bmi.bmiHeader.bV4BitCount = bits;
|
||||
bmi.bmiHeader.bV4V4Compression = BI_RGB;
|
||||
|
||||
/* when bits is 1, these will be used.
|
||||
* bmiColors[0] already zeroed from ZeroMemory()
|
||||
*/
|
||||
bmi.bmiColors[1].rgbBlue = 0xFF;
|
||||
bmi.bmiColors[1].rgbGreen = 0xFF;
|
||||
bmi.bmiColors[1].rgbRed = 0xFF;
|
||||
|
||||
hdc = GetDC (NULL);
|
||||
if (!hdc)
|
||||
@@ -633,7 +646,7 @@ create_color_bitmap (gint width, gint height, guchar **outdata)
|
||||
WIN32_GDI_FAILED ("GetDC");
|
||||
return NULL;
|
||||
}
|
||||
hBitmap = CreateDIBSection (hdc, (BITMAPINFO *)&bi, DIB_RGB_COLORS,
|
||||
hBitmap = CreateDIBSection (hdc, (BITMAPINFO *)&bmi, DIB_RGB_COLORS,
|
||||
(PVOID *) outdata, NULL, (DWORD)0);
|
||||
if (hBitmap == NULL)
|
||||
WIN32_GDI_FAILED ("CreateDIBSection");
|
||||
@@ -652,40 +665,55 @@ pixbuf_to_hbitmaps_alpha_winxp (GdkPixbuf *pixbuf,
|
||||
*/
|
||||
HBITMAP hColorBitmap, hMaskBitmap;
|
||||
guchar *indata, *inrow;
|
||||
guchar *outdata, *outrow;
|
||||
guchar *colordata, *colorrow, *maskdata, *maskbyte;
|
||||
gint width, height, i, j, rowstride;
|
||||
guint maskstride, mask_bit;
|
||||
|
||||
width = gdk_pixbuf_get_width (pixbuf); /* width of icon */
|
||||
height = gdk_pixbuf_get_height (pixbuf); /* height of icon */
|
||||
|
||||
hColorBitmap = create_alpha_bitmap (width, height, &outdata);
|
||||
hColorBitmap = create_alpha_bitmap (width, height, &colordata);
|
||||
if (!hColorBitmap)
|
||||
return FALSE;
|
||||
hMaskBitmap = CreateBitmap (width, height, 1, 1, NULL);
|
||||
hMaskBitmap = create_color_bitmap (width, height, &maskdata, 1);
|
||||
if (!hMaskBitmap)
|
||||
{
|
||||
DeleteObject (hColorBitmap);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* rows are always aligned on 4-byte boundarys, but here our pixels are always 4 bytes */
|
||||
/* MSDN says mask rows are aligned to "LONG" boundaries */
|
||||
maskstride = (((width + 31) & ~31) >> 3);
|
||||
|
||||
indata = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
for (j=0; j<height; j++)
|
||||
{
|
||||
outrow = outdata + 4*j*width;
|
||||
inrow = indata + (height-j-1)*rowstride;
|
||||
colorrow = colordata + 4*j*width;
|
||||
maskbyte = maskdata + j*maskstride;
|
||||
mask_bit = 0x80;
|
||||
inrow = indata + (height-j-1)*rowstride;
|
||||
for (i=0; i<width; i++)
|
||||
{
|
||||
outrow[4*i+0] = inrow[4*i+2];
|
||||
outrow[4*i+1] = inrow[4*i+1];
|
||||
outrow[4*i+2] = inrow[4*i+0];
|
||||
outrow[4*i+3] = inrow[4*i+3];
|
||||
colorrow[4*i+0] = inrow[4*i+2];
|
||||
colorrow[4*i+1] = inrow[4*i+1];
|
||||
colorrow[4*i+2] = inrow[4*i+0];
|
||||
colorrow[4*i+3] = inrow[4*i+3];
|
||||
if (inrow[4*i+3] == 0)
|
||||
maskbyte[0] |= mask_bit; /* turn ON bit */
|
||||
else
|
||||
maskbyte[0] &= ~mask_bit; /* turn OFF bit */
|
||||
mask_bit >>= 1;
|
||||
if (mask_bit == 0)
|
||||
{
|
||||
mask_bit = 0x80;
|
||||
maskbyte++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) *color = hColorBitmap;
|
||||
if (mask) *mask = hMaskBitmap;
|
||||
*color = hColorBitmap;
|
||||
*mask = hMaskBitmap;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -700,17 +728,18 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
|
||||
*/
|
||||
HBITMAP hColorBitmap, hMaskBitmap;
|
||||
guchar *indata, *inrow;
|
||||
guchar *colordata, *colorrow, *maskdata, *maskrow;
|
||||
guchar *colordata, *colorrow, *maskdata, *maskbyte;
|
||||
gint width, height, i, j, rowstride, nc, bmstride;
|
||||
gboolean has_alpha;
|
||||
guint maskstride, mask_bit;
|
||||
|
||||
width = gdk_pixbuf_get_width (pixbuf); /* width of icon */
|
||||
height = gdk_pixbuf_get_height (pixbuf); /* height of icon */
|
||||
|
||||
hColorBitmap = create_color_bitmap (width, height, &colordata);
|
||||
hColorBitmap = create_color_bitmap (width, height, &colordata, 24);
|
||||
if (!hColorBitmap)
|
||||
return FALSE;
|
||||
hMaskBitmap = create_color_bitmap (width, height, &maskdata);
|
||||
hMaskBitmap = create_color_bitmap (width, height, &maskdata, 1);
|
||||
if (!hMaskBitmap)
|
||||
{
|
||||
DeleteObject (hColorBitmap);
|
||||
@@ -722,6 +751,9 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
|
||||
if (bmstride % 4 != 0)
|
||||
bmstride += 4 - (bmstride % 4);
|
||||
|
||||
/* MSDN says mask rows are aligned to "LONG" boundaries */
|
||||
maskstride = (((width + 31) & ~31) >> 3);
|
||||
|
||||
indata = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
nc = gdk_pixbuf_get_n_channels (pixbuf);
|
||||
@@ -730,27 +762,34 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
|
||||
for (j=0; j<height; j++)
|
||||
{
|
||||
colorrow = colordata + j*bmstride;
|
||||
maskrow = maskdata + j*bmstride;
|
||||
inrow = indata + (height-j-1)*rowstride;
|
||||
maskbyte = maskdata + j*maskstride;
|
||||
mask_bit = 0x80;
|
||||
inrow = indata + (height-j-1)*rowstride;
|
||||
for (i=0; i<width; i++)
|
||||
{
|
||||
if (has_alpha && inrow[nc*i+3] < 128)
|
||||
{
|
||||
colorrow[3*i+0] = colorrow[3*i+1] = colorrow[3*i+2] = 0;
|
||||
maskrow[3*i+0] = maskrow[3*i+1] = maskrow[3*i+2] = 255;
|
||||
maskbyte[0] |= mask_bit; /* turn ON bit */
|
||||
}
|
||||
else
|
||||
{
|
||||
colorrow[3*i+0] = inrow[nc*i+2];
|
||||
colorrow[3*i+1] = inrow[nc*i+1];
|
||||
colorrow[3*i+2] = inrow[nc*i+0];
|
||||
maskrow[3*i+0] = maskrow[3*i+1] = maskrow[3*i+2] = 0;
|
||||
maskbyte[0] &= ~mask_bit; /* turn OFF bit */
|
||||
}
|
||||
mask_bit >>= 1;
|
||||
if (mask_bit == 0)
|
||||
{
|
||||
mask_bit = 0x80;
|
||||
maskbyte++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (color) *color = hColorBitmap;
|
||||
if (mask) *mask = hMaskBitmap;
|
||||
*color = hColorBitmap;
|
||||
*mask = hMaskBitmap;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -806,15 +845,21 @@ _gdk_win32_pixbuf_to_hicon_supports_alpha (void)
|
||||
|
||||
if (!is_win_xp_checked)
|
||||
{
|
||||
OSVERSIONINFO version;
|
||||
|
||||
is_win_xp_checked = TRUE;
|
||||
memset (&version, 0, sizeof (version));
|
||||
version.dwOSVersionInfoSize = sizeof (version);
|
||||
is_win_xp = GetVersionEx (&version)
|
||||
&& version.dwPlatformId == VER_PLATFORM_WIN32_NT
|
||||
&& (version.dwMajorVersion > 5
|
||||
|| (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
|
||||
|
||||
if (!G_WIN32_IS_NT_BASED ())
|
||||
is_win_xp = FALSE;
|
||||
else
|
||||
{
|
||||
OSVERSIONINFO version;
|
||||
|
||||
memset (&version, 0, sizeof (version));
|
||||
version.dwOSVersionInfoSize = sizeof (version);
|
||||
is_win_xp = GetVersionEx (&version)
|
||||
&& version.dwPlatformId == VER_PLATFORM_WIN32_NT
|
||||
&& (version.dwMajorVersion > 5
|
||||
|| (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
|
||||
}
|
||||
}
|
||||
return is_win_xp;
|
||||
}
|
||||
|
||||
+22
-129
@@ -236,6 +236,9 @@ gdk_display_open (const gchar *display_name)
|
||||
_gdk_input_init (_gdk_display);
|
||||
_gdk_dnd_init ();
|
||||
|
||||
/* Precalculate display name */
|
||||
(void) gdk_display_get_name (_gdk_display);
|
||||
|
||||
g_signal_emit_by_name (gdk_display_manager_get (),
|
||||
"display_opened", _gdk_display);
|
||||
|
||||
@@ -253,9 +256,13 @@ gdk_display_get_name (GdkDisplay *display)
|
||||
HWINSTA hwinsta = GetProcessWindowStation ();
|
||||
char *window_station_name;
|
||||
DWORD n;
|
||||
DWORD session_id;
|
||||
char *display_name;
|
||||
const char *retval;
|
||||
static const char *display_name_cache = NULL;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
if (display_name_cache != NULL)
|
||||
return display_name_cache;
|
||||
|
||||
n = 0;
|
||||
GetUserObjectInformation (hdesk, UOI_NAME, &dummy, 0, &n);
|
||||
@@ -285,22 +292,22 @@ gdk_display_get_name (GdkDisplay *display)
|
||||
window_station_name = "WinSta0";
|
||||
}
|
||||
|
||||
display_name = g_strdup_printf ("%ld\\%s\\%s",
|
||||
display_name = g_strdup_printf ("%d\\%s\\%s",
|
||||
get_session_id (), window_station_name,
|
||||
desktop_name);
|
||||
|
||||
retval = g_quark_to_string (g_quark_from_string (display_name));
|
||||
GDK_NOTE (MISC, g_print ("gdk_display_get_name: %s\n", display_name));
|
||||
|
||||
g_free (display_name);
|
||||
display_name_cache = display_name;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_display_get_name: %s\n", retval));
|
||||
|
||||
return retval;
|
||||
return display_name_cache;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_display_get_n_screens (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -308,12 +315,17 @@ GdkScreen *
|
||||
gdk_display_get_screen (GdkDisplay *display,
|
||||
gint screen_num)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
g_return_val_if_fail (screen_num == 0, NULL);
|
||||
|
||||
return _gdk_screen;
|
||||
}
|
||||
|
||||
GdkScreen *
|
||||
gdk_display_get_default_screen (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
return _gdk_screen;
|
||||
}
|
||||
|
||||
@@ -332,133 +344,15 @@ gdk_display_supports_selection_notification (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static HWND _hwnd_next_viewer = NULL;
|
||||
|
||||
/*
|
||||
* maybe this should be integrated with the default message loop - or maybe not ;-)
|
||||
*/
|
||||
static LRESULT CALLBACK
|
||||
_win32_on_clipboard_change (HWND hwnd,
|
||||
UINT message,
|
||||
WPARAM wparam,
|
||||
LPARAM lparam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_DESTROY : /* remove us from chain */
|
||||
{
|
||||
ChangeClipboardChain (hwnd, _hwnd_next_viewer);
|
||||
return 0;
|
||||
}
|
||||
case WM_CHANGECBCHAIN :
|
||||
{
|
||||
HWND hwndRemove = (HWND) wparam; /* handle of window being removed */
|
||||
HWND hwndNext = (HWND) lparam; /* handle of next window in chain */
|
||||
if (hwndRemove == _hwnd_next_viewer)
|
||||
_hwnd_next_viewer = hwndNext == hwnd ? NULL : hwndNext;
|
||||
return 0;
|
||||
}
|
||||
case WM_DRAWCLIPBOARD :
|
||||
{
|
||||
/* Create the appropriate gdk events */
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if ((_gdk_debug_flags & GDK_DEBUG_DND) &&
|
||||
OpenClipboard (hwnd))
|
||||
{
|
||||
HWND hwndOwner = GetClipboardOwner ();
|
||||
UINT nFormat = 0;
|
||||
|
||||
g_print ("WM_DRAWCLIPBOARD: owner:%p formats: ", hwndOwner);
|
||||
for (; 0 != (nFormat = EnumClipboardFormats (nFormat));)
|
||||
{
|
||||
g_print ("%s ", _gdk_win32_cf_to_string (nFormat));
|
||||
}
|
||||
g_print ("\n");
|
||||
CloseClipboard ();
|
||||
}
|
||||
#endif
|
||||
/* XXX: generate the apropriate GdkEventOwnerChange ... */
|
||||
|
||||
/* don't break the chain */
|
||||
return PostMessage (_hwnd_next_viewer, message, wparam, lparam);
|
||||
}
|
||||
default :
|
||||
return DefWindowProc (hwnd, message, wparam, lparam);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a hidden window and adds it to the clipboard chain
|
||||
*/
|
||||
HWND
|
||||
_gdk_win32_register_clipboard_notification (void)
|
||||
{
|
||||
WNDCLASS wclass;
|
||||
HWND hwnd;
|
||||
ATOM klass;
|
||||
|
||||
memset (&wclass, 0, sizeof(WNDCLASS));
|
||||
wclass.lpszClassName = "GdkClipboardNotification";
|
||||
wclass.lpfnWndProc = _win32_on_clipboard_change;
|
||||
wclass.hInstance = _gdk_app_hmodule;
|
||||
|
||||
klass = RegisterClass (&wclass);
|
||||
if (!klass)
|
||||
return NULL;
|
||||
|
||||
hwnd = CreateWindow (MAKEINTRESOURCE(klass),
|
||||
NULL, WS_POPUP,
|
||||
0, 0, 0, 0, NULL, NULL,
|
||||
_gdk_app_hmodule, NULL);
|
||||
if (!hwnd)
|
||||
{
|
||||
UnregisterClass (MAKEINTRESOURCE(klass), _gdk_app_hmodule);
|
||||
return NULL;
|
||||
}
|
||||
_hwnd_next_viewer = SetClipboardViewer (hwnd);
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
/*
|
||||
* The whole function would only make sense if the gdk/win32 clipboard
|
||||
* model is rewritten to do delayed rendering. Currently this is only
|
||||
* testcode and as noted in
|
||||
* http://mail.gnome.org/archives/gtk-devel-list/2004-May/msg00113.html
|
||||
* probably not worth bothering ;)
|
||||
*/
|
||||
gboolean
|
||||
gdk_display_request_selection_notification (GdkDisplay *display,
|
||||
GdkAtom selection)
|
||||
|
||||
{
|
||||
static HWND hwndViewer = NULL;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_print ("gdk_display_request_selection_notification (..., %s)",
|
||||
gdk_atom_name (selection)));
|
||||
|
||||
if (GDK_SELECTION_CLIPBOARD == selection)
|
||||
{
|
||||
if (!hwndViewer)
|
||||
{
|
||||
hwndViewer = _gdk_win32_register_clipboard_notification ();
|
||||
GDK_NOTE (DND, g_print (" registered"));
|
||||
}
|
||||
ret = (hwndViewer != NULL);
|
||||
}
|
||||
else if (GDK_SELECTION_PRIMARY == selection)
|
||||
{
|
||||
/* seems to work by default ? */
|
||||
GDK_NOTE (DND, g_print (" by default"));
|
||||
ret = TRUE;
|
||||
}
|
||||
GDK_NOTE (DND, g_print (" -> %s\n", ret ? "TRUE" : "FALSE"));
|
||||
return ret;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -474,5 +368,4 @@ gdk_display_store_clipboard (GdkDisplay *display,
|
||||
GdkAtom *targets,
|
||||
gint n_targets)
|
||||
{
|
||||
/* XXX: implement it (or maybe not as long as we don't support delayed rendering?) */
|
||||
}
|
||||
|
||||
@@ -1592,8 +1592,10 @@ blit_from_pixmap (gboolean use_fg_bg,
|
||||
}
|
||||
|
||||
if (ok)
|
||||
GDI_CALL (BitBlt, (hdc, xdest, ydest, width, height,
|
||||
srcdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2)));
|
||||
if (!BitBlt (hdc, xdest, ydest, width, height,
|
||||
srcdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2)) &&
|
||||
GetLastError () != ERROR_INVALID_HANDLE)
|
||||
WIN32_GDI_FAILED ("BitBlt");
|
||||
|
||||
/* Restore source's color table if necessary */
|
||||
if (ok && newtable_size > 0 && oldtable_size > 0)
|
||||
|
||||
+16
-14
@@ -140,6 +140,7 @@ GPollFD event_poll_fd;
|
||||
|
||||
static GdkWindow *current_window = NULL;
|
||||
static gint current_x, current_y;
|
||||
static gint current_root_x, current_root_y;
|
||||
static UINT msh_mousewheel;
|
||||
static UINT client_message;
|
||||
|
||||
@@ -2420,13 +2421,12 @@ gdk_event_translate (MSG *msg,
|
||||
!(HIWORD (msg->lParam) & KF_ALTDOWN))
|
||||
break;
|
||||
|
||||
/* Let the system handle Alt-Tab, Alt-Space, Alt-Enter and
|
||||
* Alt-F4 unless the keyboard is grabbed.
|
||||
/* Let the system handle Alt-Tab, Alt-Space and Alt-F4 unless
|
||||
* the keyboard is grabbed.
|
||||
*/
|
||||
if (k_grab_window == NULL &&
|
||||
(msg->wParam == VK_TAB ||
|
||||
msg->wParam == VK_SPACE ||
|
||||
msg->wParam == VK_RETURN ||
|
||||
msg->wParam == VK_F4))
|
||||
break;
|
||||
|
||||
@@ -2731,6 +2731,17 @@ gdk_event_translate (MSG *msg,
|
||||
msg->wParam,
|
||||
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
|
||||
|
||||
/* If we haven't moved, don't create any GDK event. Windows
|
||||
* sends WM_MOUSEMOVE messages after a new window is shows under
|
||||
* the mouse, even if the mouse hasn't moved. This disturbs gtk.
|
||||
*/
|
||||
if (msg->pt.x + _gdk_offset_x == current_root_x &&
|
||||
msg->pt.y + _gdk_offset_y == current_root_y)
|
||||
break;
|
||||
|
||||
current_root_x = msg->pt.x + _gdk_offset_x;
|
||||
current_root_y = msg->pt.y + _gdk_offset_y;
|
||||
|
||||
assign_object (&window, find_window_for_mouse_event (window, msg));
|
||||
|
||||
if (p_grab_window != NULL)
|
||||
@@ -2757,15 +2768,6 @@ gdk_event_translate (MSG *msg,
|
||||
if (window != orig_window)
|
||||
translate_mouse_coords (orig_window, window, msg);
|
||||
|
||||
/* If we haven't moved, don't create any event.
|
||||
* Windows sends WM_MOUSEMOVE messages after button presses
|
||||
* even if the mouse doesn't move. This disturbs gtk.
|
||||
*/
|
||||
if (window == current_window &&
|
||||
GET_X_LPARAM (msg->lParam) == current_x &&
|
||||
GET_Y_LPARAM (msg->lParam) == current_y)
|
||||
break;
|
||||
|
||||
event = gdk_event_new (GDK_MOTION_NOTIFY);
|
||||
event->motion.window = window;
|
||||
event->motion.time = _gdk_win32_get_next_tick (msg->time);
|
||||
@@ -2774,8 +2776,8 @@ gdk_event_translate (MSG *msg,
|
||||
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||
event->motion.x += xoffset;
|
||||
event->motion.y += yoffset;
|
||||
event->motion.x_root = msg->pt.x + _gdk_offset_x;
|
||||
event->motion.y_root = msg->pt.y + _gdk_offset_y;
|
||||
event->motion.x_root = current_root_x;
|
||||
event->motion.y_root = current_root_y;
|
||||
event->motion.axes = NULL;
|
||||
event->motion.state = build_pointer_event_state (msg);
|
||||
event->motion.is_hint = FALSE;
|
||||
|
||||
@@ -48,10 +48,15 @@ UINT _gdk_input_codepage;
|
||||
|
||||
WORD _cf_rtf;
|
||||
WORD _cf_utf8_string;
|
||||
WORD _cf_image_bmp;
|
||||
|
||||
GdkAtom _utf8_string;
|
||||
GdkAtom _gdk_selection_property;
|
||||
GdkAtom _wm_transient_for;
|
||||
GdkAtom _targets;
|
||||
|
||||
GdkAtom _save_targets;
|
||||
GdkAtom _utf8_string;
|
||||
GdkAtom _text;
|
||||
GdkAtom _compound_text;
|
||||
GdkAtom _text_uri_list;
|
||||
GdkAtom _image_bmp;
|
||||
|
||||
@@ -59,10 +64,6 @@ GdkAtom _local_dnd;
|
||||
GdkAtom _gdk_win32_dropfiles;
|
||||
GdkAtom _gdk_ole2_dnd;
|
||||
|
||||
GdkAtom _gdk_selection_property;
|
||||
|
||||
GdkAtom _wm_transient_for;
|
||||
|
||||
gint _gdk_input_ignore_wintab = FALSE;
|
||||
gint _gdk_max_colors = 0;
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ _gdk_win32_new_image (GdkVisual *visual,
|
||||
image->width = width;
|
||||
image->height = height;
|
||||
image->depth = depth;
|
||||
image->bits_per_pixel = _gdk_windowing_get_bits_for_depth (gdk_display_get_default (), depth);
|
||||
switch (depth)
|
||||
{
|
||||
case 1:
|
||||
@@ -142,7 +143,7 @@ _gdk_win32_new_image (GdkVisual *visual,
|
||||
image->bpp = 2;
|
||||
break;
|
||||
case 24:
|
||||
image->bpp = 3;
|
||||
image->bpp = image->bits_per_pixel / 8;
|
||||
break;
|
||||
case 32:
|
||||
image->bpp = 4;
|
||||
@@ -157,7 +158,6 @@ _gdk_win32_new_image (GdkVisual *visual,
|
||||
image->bpl = ((width - 1)/8 + 1)*4;
|
||||
else
|
||||
image->bpl = ((width*image->bpp - 1)/4 + 1)*4;
|
||||
image->bits_per_pixel = image->depth;
|
||||
image->mem = bits;
|
||||
|
||||
return image;
|
||||
@@ -423,8 +423,6 @@ _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
|
||||
return 16;
|
||||
|
||||
case 24:
|
||||
return 24;
|
||||
|
||||
case 32:
|
||||
return 32;
|
||||
}
|
||||
|
||||
@@ -110,10 +110,15 @@ _gdk_windowing_init (void)
|
||||
|
||||
_cf_rtf = RegisterClipboardFormat ("Rich Text Format");
|
||||
_cf_utf8_string = RegisterClipboardFormat ("UTF8_STRING");
|
||||
_cf_image_bmp = RegisterClipboardFormat ("image/bmp");
|
||||
|
||||
_utf8_string = gdk_atom_intern ("UTF8_STRING", FALSE);
|
||||
_gdk_selection_property = gdk_atom_intern ("GDK_SELECTION", FALSE);
|
||||
_wm_transient_for = gdk_atom_intern ("WM_TRANSIENT_FOR", FALSE);
|
||||
_targets = gdk_atom_intern ("TARGETS", FALSE);
|
||||
|
||||
_save_targets = gdk_atom_intern ("SAVE_TARGETS", FALSE);
|
||||
_utf8_string = gdk_atom_intern ("UTF8_STRING", FALSE);
|
||||
_text = gdk_atom_intern ("TEXT", FALSE);
|
||||
_compound_text = gdk_atom_intern ("COMPOUND_TEXT", FALSE);
|
||||
_text_uri_list = gdk_atom_intern ("text/uri-list", FALSE);
|
||||
_image_bmp = gdk_atom_intern ("image/bmp", FALSE);
|
||||
|
||||
@@ -121,10 +126,6 @@ _gdk_windowing_init (void)
|
||||
_gdk_win32_dropfiles = gdk_atom_intern ("DROPFILES_DND", FALSE);
|
||||
_gdk_ole2_dnd = gdk_atom_intern ("OLE2_DND", FALSE);
|
||||
|
||||
_gdk_selection_property = gdk_atom_intern ("GDK_SELECTION", FALSE);
|
||||
|
||||
_wm_transient_for = gdk_atom_intern ("WM_TRANSIENT_FOR", FALSE);
|
||||
|
||||
_gdk_win32_selection_init ();
|
||||
}
|
||||
|
||||
@@ -932,7 +933,7 @@ _gdk_win32_cf_to_string (UINT format)
|
||||
|
||||
switch (format)
|
||||
{
|
||||
#define CASE(x) case CF_##x: return #x
|
||||
#define CASE(x) case CF_##x: return "CF_" #x
|
||||
CASE (BITMAP);
|
||||
CASE (DIB);
|
||||
#ifdef CF_DIBV5
|
||||
@@ -965,7 +966,7 @@ _gdk_win32_cf_to_string (UINT format)
|
||||
format <= CF_PRIVATELAST)
|
||||
return static_printf ("CF_PRIVATE%d", format - CF_PRIVATEFIRST);
|
||||
if (GetClipboardFormatName (format, buf, sizeof (buf)))
|
||||
return static_printf ("%s", buf);
|
||||
return static_printf ("'%s'", buf);
|
||||
else
|
||||
return static_printf ("unk-%#lx", format);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ gdk_pixmap_new (GdkDrawable *drawable,
|
||||
case 1:
|
||||
case 24:
|
||||
case 32:
|
||||
bmi.bmiHeader.biBitCount = depth;
|
||||
bmi.bmiHeader.biBitCount = _gdk_windowing_get_bits_for_depth (gdk_display_get_default (), depth);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
@@ -356,9 +356,6 @@ HRGN _gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
|
||||
void _gdk_win32_adjust_client_rect (GdkWindow *window,
|
||||
RECT *RECT);
|
||||
|
||||
void _gdk_win32_get_adjusted_client_rect (GdkWindow *window,
|
||||
RECT *RECT);
|
||||
|
||||
void _gdk_selection_property_delete (GdkWindow *);
|
||||
|
||||
void _gdk_dropfiles_store (gchar *data);
|
||||
@@ -472,11 +469,16 @@ extern guint _scancode_rshift;
|
||||
/* Registered clipboard formats */
|
||||
extern WORD _cf_rtf;
|
||||
extern WORD _cf_utf8_string;
|
||||
extern WORD _cf_image_bmp;
|
||||
|
||||
/* GdkAtoms: targets */
|
||||
extern GdkAtom _utf8_string;
|
||||
/* GdkAtoms: properties, targets and types */
|
||||
extern GdkAtom _gdk_selection_property;
|
||||
extern GdkAtom _wm_transient_for;
|
||||
extern GdkAtom _targets;
|
||||
|
||||
extern GdkAtom _save_targets;
|
||||
extern GdkAtom _utf8_string;
|
||||
extern GdkAtom _text;
|
||||
extern GdkAtom _compound_text;
|
||||
extern GdkAtom _text_uri_list;
|
||||
extern GdkAtom _image_bmp;
|
||||
|
||||
@@ -485,10 +487,6 @@ extern GdkAtom _local_dnd;
|
||||
extern GdkAtom _gdk_win32_dropfiles;
|
||||
extern GdkAtom _gdk_ole2_dnd;
|
||||
|
||||
extern GdkAtom _gdk_selection_property;
|
||||
|
||||
extern GdkAtom _wm_transient_for;
|
||||
|
||||
/* Options */
|
||||
extern gboolean _gdk_input_ignore_wintab;
|
||||
extern gint _gdk_max_colors;
|
||||
|
||||
@@ -278,12 +278,17 @@ gdk_property_change (GdkWindow *window,
|
||||
g_free (prop_name),
|
||||
g_free (type_name)));
|
||||
|
||||
/* We should never come here for these types */
|
||||
g_return_if_fail (type != GDK_TARGET_STRING);
|
||||
g_return_if_fail (type != _text);
|
||||
g_return_if_fail (type != _compound_text);
|
||||
g_return_if_fail (type != _save_targets);
|
||||
|
||||
if (property == _gdk_selection_property
|
||||
&& format == 8
|
||||
&& mode == GDK_PROP_MODE_REPLACE)
|
||||
{
|
||||
if ((type == GDK_TARGET_STRING && GetACP () == 1252) ||
|
||||
type == _utf8_string)
|
||||
if (type == _utf8_string)
|
||||
{
|
||||
if (!OpenClipboard (GDK_WINDOW_HWND (window)))
|
||||
{
|
||||
@@ -291,29 +296,17 @@ gdk_property_change (GdkWindow *window,
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == _utf8_string)
|
||||
{
|
||||
/* Check if only ASCII */
|
||||
for (i = 0; i < nelements; i++)
|
||||
if (data[i] >= 0200)
|
||||
break;
|
||||
}
|
||||
else /* if (type == GDK_TARGET_STRING) */
|
||||
{
|
||||
/* Check that no 0200..0240 chars present, as they
|
||||
* differ between ISO-8859-1 and CP1252.
|
||||
*/
|
||||
for (i = 0; i < nelements; i++)
|
||||
if (data[i] >= 0200 && data[i] < 0240)
|
||||
break;
|
||||
}
|
||||
nchars = g_utf8_strlen (data, nelements);
|
||||
|
||||
/* Check if only ASCII */
|
||||
for (i = 0; i < nelements; i++)
|
||||
if (data[i] >= 0200)
|
||||
break;
|
||||
|
||||
if (i == nelements)
|
||||
{
|
||||
/* If UTF-8 and only ASCII, or if STRING (ISO-8859-1)
|
||||
* and system codepage is CP1252, use CF_TEXT and the
|
||||
* data as such.
|
||||
/* If UTF-8 and only ASCII, use CF_TEXT and the data as
|
||||
* such.
|
||||
*/
|
||||
method = SYSTEM_CODEPAGE;
|
||||
size = nelements;
|
||||
@@ -351,8 +344,16 @@ gdk_property_change (GdkWindow *window,
|
||||
|
||||
const guchar *p = data;
|
||||
|
||||
/* WordPad on XP, at least, doesn't seem to grok \uc0
|
||||
* -encoded Unicode characters. Oh well, use \uc1 then,
|
||||
* with a question mark as the "ANSI" stand-in for each
|
||||
* non-ASCII Unicode character. (WordPad for XP? This
|
||||
* code path is for Win9x! Yes, but I don't have Win9x,
|
||||
* so I use XP to test, using the G_WIN32_PRETEND_WIN9X
|
||||
* environment variable.)
|
||||
*/
|
||||
method = RICH_TEXT;
|
||||
rtf = g_string_new ("{\\rtf1\\uc0 ");
|
||||
rtf = g_string_new ("{\\rtf1\\uc1 ");
|
||||
|
||||
while (p < data + nelements)
|
||||
{
|
||||
@@ -374,11 +375,11 @@ gdk_property_change (GdkWindow *window,
|
||||
guchar *q;
|
||||
gint n;
|
||||
|
||||
rtf = g_string_append (rtf, "\\uNNNNN ");
|
||||
rtf->len -= 6; /* five digits and a space */
|
||||
rtf = g_string_append (rtf, "\\uNNNNN ?");
|
||||
rtf->len -= 7; /* five digits a space and a question mark */
|
||||
q = rtf->str + rtf->len;
|
||||
n = g_sprintf (q, "%d ", g_utf8_get_char (p));
|
||||
g_assert (n <= 6);
|
||||
n = g_sprintf (q, "%d ?", g_utf8_get_char (p));
|
||||
g_assert (n <= 7);
|
||||
rtf->len += n;
|
||||
|
||||
p = g_utf8_next_char (p);
|
||||
@@ -435,8 +436,10 @@ gdk_property_change (GdkWindow *window,
|
||||
lcidptr = GlobalLock (hlcid);
|
||||
*lcidptr = lcid;
|
||||
GlobalUnlock (hlcid);
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_LOCALE,%p)\n",
|
||||
hlcid));
|
||||
if (!SetClipboardData (CF_LOCALE, hlcid))
|
||||
WIN32_API_FAILED ("SetClipboardData (CF_LOCALE)"), ok = FALSE;
|
||||
WIN32_API_FAILED ("SetClipboardData(CF_LOCALE)"), ok = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -455,8 +458,10 @@ gdk_property_change (GdkWindow *window,
|
||||
guchar *utf8ptr = GlobalLock (hutf8);
|
||||
memmove (utf8ptr, data, nelements);
|
||||
GlobalUnlock (hutf8);
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData('UTF8_STRING',%p)\n",
|
||||
hutf8));
|
||||
if (!SetClipboardData (_cf_utf8_string, hutf8))
|
||||
WIN32_API_FAILED ("SetClipboardData (UTF8_STRING)");
|
||||
WIN32_API_FAILED ("SetClipboardData('UTF8_STRING')");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -465,6 +470,8 @@ gdk_property_change (GdkWindow *window,
|
||||
}
|
||||
|
||||
GlobalUnlock (hdata);
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(%s,%p)\n",
|
||||
_gdk_win32_cf_to_string (cf), hdata));
|
||||
if (ok && !SetClipboardData (cf, hdata))
|
||||
WIN32_API_FAILED ("SetClipboardData"), ok = FALSE;
|
||||
|
||||
@@ -473,6 +480,7 @@ gdk_property_change (GdkWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
GDK_NOTE (DND, g_print ("... delayed rendering\n"));
|
||||
/* Delayed Rendering. We can't assign hdata to the clipboard
|
||||
* here as type may be "image/png", "image/jpg", etc. In
|
||||
* this case there's a further conversion afterwards.
|
||||
|
||||
@@ -47,7 +47,7 @@ gdk_screen_set_default_colormap (GdkScreen *screen,
|
||||
{
|
||||
GdkColormap *old_colormap;
|
||||
|
||||
g_return_if_fail (GDK_IS_SCREEN (screen));
|
||||
g_return_if_fail (screen == _gdk_screen);
|
||||
g_return_if_fail (GDK_IS_COLORMAP (colormap));
|
||||
|
||||
old_colormap = default_colormap;
|
||||
@@ -61,7 +61,7 @@ gdk_screen_set_default_colormap (GdkScreen *screen,
|
||||
gint
|
||||
gdk_screen_get_n_monitors (GdkScreen *screen)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
|
||||
g_return_val_if_fail (screen == _gdk_screen, 0);
|
||||
|
||||
return _gdk_num_monitors;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
gint num_monitor,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_SCREEN (screen));
|
||||
g_return_if_fail (screen == _gdk_screen);
|
||||
g_return_if_fail (num_monitor < _gdk_num_monitors);
|
||||
g_return_if_fail (num_monitor >= 0);
|
||||
|
||||
@@ -81,7 +81,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
GdkColormap *
|
||||
gdk_screen_get_rgba_colormap (GdkScreen *screen)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||
g_return_val_if_fail (screen == _gdk_screen, NULL);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ gdk_screen_get_rgba_colormap (GdkScreen *screen)
|
||||
GdkVisual *
|
||||
gdk_screen_get_rgba_visual (GdkScreen *screen)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||
g_return_val_if_fail (screen == _gdk_screen, NULL);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ gdk_screen_get_rgba_visual (GdkScreen *screen)
|
||||
gint
|
||||
gdk_screen_get_number (GdkScreen *screen)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
|
||||
g_return_val_if_fail (screen == _gdk_screen, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -115,5 +115,5 @@ _gdk_windowing_substitute_screen_number (const gchar *display_name,
|
||||
gchar *
|
||||
gdk_screen_make_display_name (GdkScreen *screen)
|
||||
{
|
||||
return gdk_display_get_name (_gdk_display);
|
||||
return g_strdup (gdk_display_get_name (_gdk_display));
|
||||
}
|
||||
|
||||
+160
-98
@@ -201,17 +201,22 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
|
||||
{
|
||||
HWND hwnd;
|
||||
GdkEvent tmp_event;
|
||||
gchar *sel_name;
|
||||
|
||||
g_return_val_if_fail (display == _gdk_display, FALSE);
|
||||
g_return_val_if_fail (selection != GDK_NONE, FALSE);
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
g_print ("gdk_selection_owner_set: %p %#x (%s)\n",
|
||||
(owner ? GDK_WINDOW_HWND (owner) : NULL),
|
||||
(guint) selection, sel_name),
|
||||
g_free (sel_name)));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
gchar *sel_name;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
g_print ("gdk_selection_owner_set_for_display: %p %#x (%s)\n",
|
||||
(owner ? GDK_WINDOW_HWND (owner) : NULL),
|
||||
(guint) selection, sel_name),
|
||||
g_free (sel_name)));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (selection != GDK_SELECTION_CLIPBOARD)
|
||||
{
|
||||
@@ -237,6 +242,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
|
||||
return FALSE;
|
||||
|
||||
_ignore_destroy_clipboard = TRUE;
|
||||
GDK_NOTE (DND, g_print ("... EmptyClipboard()\n"));
|
||||
if (!API_CALL (EmptyClipboard, ()))
|
||||
{
|
||||
_ignore_destroy_clipboard = FALSE;
|
||||
@@ -275,28 +281,34 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
|
||||
GdkAtom selection)
|
||||
{
|
||||
GdkWindow *window;
|
||||
gchar *sel_name;
|
||||
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
g_return_val_if_fail (selection != GDK_NONE, NULL);
|
||||
|
||||
/* Return NULL for CLIPBOARD, because otherwise cut&paste inside the
|
||||
* same application doesn't work. We must pretend to gtk that we
|
||||
* don't have the selection, so that we always fetch it from the
|
||||
* Windows clipboard. See also comments in
|
||||
* gdk_selection_send_notify().
|
||||
*/
|
||||
if (selection == GDK_SELECTION_CLIPBOARD)
|
||||
return NULL;
|
||||
{
|
||||
HWND owner = GetClipboardOwner ();
|
||||
|
||||
if (owner == NULL)
|
||||
return NULL;
|
||||
|
||||
return gdk_win32_handle_table_lookup ((GdkNativeWindow) owner);
|
||||
}
|
||||
|
||||
window = gdk_window_lookup ((GdkNativeWindow) g_hash_table_lookup (sel_owner_table, selection));
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
g_print ("gdk_selection_owner_get: %#x (%s) = %p\n",
|
||||
(guint) selection, sel_name,
|
||||
(window ? GDK_WINDOW_HWND (window) : NULL)),
|
||||
g_free (sel_name)));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
gchar *sel_name;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
g_print ("gdk_selection_owner_get: %#x (%s) = %p\n",
|
||||
(guint) selection, sel_name,
|
||||
(window ? GDK_WINDOW_HWND (window) : NULL)),
|
||||
g_free (sel_name)));
|
||||
}
|
||||
#endif
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -330,8 +342,6 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
{
|
||||
HGLOBAL hdata;
|
||||
GdkAtom property = _gdk_selection_property;
|
||||
gchar *sel_name, *tgt_name;
|
||||
GError *error = NULL;
|
||||
|
||||
g_return_if_fail (selection != GDK_NONE);
|
||||
g_return_if_fail (requestor != NULL);
|
||||
@@ -339,15 +349,21 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
if (GDK_WINDOW_DESTROYED (requestor))
|
||||
return;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
tgt_name = gdk_atom_name (target),
|
||||
g_print ("gdk_selection_convert: %p %#x (%s) %#x (%s)\n",
|
||||
GDK_WINDOW_HWND (requestor),
|
||||
(guint) selection, sel_name,
|
||||
(guint) target, tgt_name),
|
||||
g_free (sel_name),
|
||||
g_free (tgt_name)));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
gchar *sel_name, *tgt_name;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
tgt_name = gdk_atom_name (target),
|
||||
g_print ("gdk_selection_convert: %p %#x (%s) %#x (%s)\n",
|
||||
GDK_WINDOW_HWND (requestor),
|
||||
(guint) selection, sel_name,
|
||||
(guint) target, tgt_name),
|
||||
g_free (sel_name),
|
||||
g_free (tgt_name)));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (selection == GDK_SELECTION_CLIPBOARD && target == _targets)
|
||||
{
|
||||
@@ -400,16 +416,14 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
data[i++] = _image_bmp;
|
||||
|
||||
if (i > 0)
|
||||
_gdk_selection_property_store (requestor, GDK_SELECTION_TYPE_ATOM,
|
||||
32, (guchar *) data, i * sizeof (GdkAtom));
|
||||
_gdk_selection_property_store (requestor, GDK_SELECTION_TYPE_ATOM,
|
||||
32, (guchar *) data, i * sizeof (GdkAtom));
|
||||
else
|
||||
property = GDK_NONE;
|
||||
|
||||
API_CALL (CloseClipboard, ());
|
||||
}
|
||||
else if (selection == GDK_SELECTION_CLIPBOARD &&
|
||||
(target == GDK_TARGET_STRING ||
|
||||
target == _utf8_string))
|
||||
else if (selection == GDK_SELECTION_CLIPBOARD && target == _utf8_string)
|
||||
{
|
||||
/* Converting the CLIPBOARD selection means he wants the
|
||||
* contents of the clipboard. Get the clipboard data, and store
|
||||
@@ -447,14 +461,10 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
p++;
|
||||
}
|
||||
|
||||
data = g_utf16_to_utf8 (wcs, wclen, NULL, NULL, &error);
|
||||
data = g_utf16_to_utf8 (wcs, wclen, NULL, NULL, NULL);
|
||||
g_free (wcs);
|
||||
|
||||
if (!data)
|
||||
{
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
if (data)
|
||||
_gdk_selection_property_store (requestor, target, 8,
|
||||
data, strlen (data) + 1);
|
||||
GlobalUnlock (hdata);
|
||||
@@ -531,12 +541,10 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
}
|
||||
g_free (wcs);
|
||||
|
||||
data = g_utf16_to_utf8 (wcs2, wclen2, NULL, &length, &error);
|
||||
data = g_utf16_to_utf8 (wcs2, wclen2, NULL, &length, NULL);
|
||||
g_free (wcs2);
|
||||
|
||||
if (!data)
|
||||
g_error_free (error);
|
||||
else
|
||||
if (data)
|
||||
_gdk_selection_property_store (requestor, target, 8,
|
||||
data, length + 1);
|
||||
GlobalUnlock (hdata);
|
||||
@@ -547,14 +555,13 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
|
||||
API_CALL (CloseClipboard, ());
|
||||
}
|
||||
else if (selection == GDK_SELECTION_CLIPBOARD &&
|
||||
target == _image_bmp)
|
||||
else if (selection == GDK_SELECTION_CLIPBOARD && target == _image_bmp)
|
||||
{
|
||||
guchar *data;
|
||||
|
||||
if (!API_CALL (OpenClipboard, (GDK_WINDOW_HWND (requestor))))
|
||||
return;
|
||||
if ((hdata = GetClipboardData (RegisterClipboardFormat ("image/bmp"))) != NULL)
|
||||
if ((hdata = GetClipboardData (_cf_image_bmp)) != NULL)
|
||||
{
|
||||
/* "image/bmp" is the first choice. */
|
||||
guchar *ptr;
|
||||
@@ -613,11 +620,14 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
}
|
||||
else if (selection == GDK_SELECTION_CLIPBOARD)
|
||||
{
|
||||
const char *targetname = gdk_atom_name (target);
|
||||
char *target_name;
|
||||
UINT fmt = 0;
|
||||
|
||||
if (!API_CALL (OpenClipboard, (GDK_WINDOW_HWND (requestor))))
|
||||
return;
|
||||
|
||||
target_name = gdk_atom_name (target);
|
||||
|
||||
/* Check if it's available. In fact, we can simply call
|
||||
* GetClipboardData (RegisterClipboardFormat (targetname)), but
|
||||
* the global custom format ID space is limited,
|
||||
@@ -629,7 +639,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
char sFormat[80];
|
||||
|
||||
if (GetClipboardFormatName (fmt, sFormat, 80) > 0 &&
|
||||
strcmp (sFormat, targetname) == 0)
|
||||
strcmp (sFormat, target_name) == 0)
|
||||
{
|
||||
if ((hdata = GetClipboardData (fmt)) != NULL)
|
||||
{
|
||||
@@ -641,7 +651,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
{
|
||||
length = GlobalSize (hdata);
|
||||
|
||||
GDK_NOTE (DND, g_print ("... %s: %d bytes\n", targetname, length));
|
||||
GDK_NOTE (DND, g_print ("... %s: %d bytes\n", target_name, length));
|
||||
|
||||
_gdk_selection_property_store (requestor, target, 8,
|
||||
g_memdup (ptr, length), length);
|
||||
@@ -651,6 +661,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
}
|
||||
}
|
||||
}
|
||||
g_free (target_name);
|
||||
API_CALL (CloseClipboard, ());
|
||||
}
|
||||
else if (selection == _gdk_win32_dropfiles)
|
||||
@@ -746,22 +757,26 @@ gdk_selection_send_notify_for_display (GdkDisplay *display,
|
||||
GdkAtom property,
|
||||
guint32 time)
|
||||
{
|
||||
gchar *sel_name, *tgt_name, *prop_name;
|
||||
|
||||
g_return_if_fail (display == _gdk_display);
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
tgt_name = gdk_atom_name (target),
|
||||
prop_name = gdk_atom_name (property),
|
||||
g_print ("gdk_selection_send_notify: %#x %#x (%s) %#x (%s) %#x (%s)\n",
|
||||
requestor,
|
||||
(guint) selection, sel_name,
|
||||
(guint) target, tgt_name,
|
||||
(guint) property, prop_name),
|
||||
g_free (sel_name),
|
||||
g_free (tgt_name),
|
||||
g_free (prop_name)));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
gchar *sel_name, *tgt_name, *prop_name;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(sel_name = gdk_atom_name (selection),
|
||||
tgt_name = gdk_atom_name (target),
|
||||
prop_name = gdk_atom_name (property),
|
||||
g_print ("gdk_selection_send_notify_for_display: %p %#x (%s) %#x (%s) %#x (%s)\n",
|
||||
(gpointer) requestor,
|
||||
(guint) selection, sel_name,
|
||||
(guint) target, tgt_name,
|
||||
(guint) property, prop_name),
|
||||
g_free (sel_name),
|
||||
g_free (tgt_name),
|
||||
g_free (prop_name)));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* It's hard to say whether implementing this actually is of any use
|
||||
@@ -776,38 +791,41 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
|
||||
gint length,
|
||||
gchar ***list)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gchar *enc_name;
|
||||
gchar *result;
|
||||
const gchar *charset;
|
||||
const gchar *source_charset = NULL;
|
||||
gchar *source_charset;
|
||||
|
||||
g_return_val_if_fail (display == _gdk_display, 0);
|
||||
|
||||
GDK_NOTE (DND, (enc_name = gdk_atom_name (encoding),
|
||||
g_print ("gdk_text_property_to_text_list: %s %d %.20s %d\n",
|
||||
enc_name, format, text, length),
|
||||
g_free (enc_name)));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
gchar *enc_name;
|
||||
|
||||
GDK_NOTE (DND, (enc_name = gdk_atom_name (encoding),
|
||||
g_print ("gdk_text_property_to_text_list_for_display: %s %d %.20s %d\n",
|
||||
enc_name, format, text, length),
|
||||
g_free (enc_name)));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!list)
|
||||
return 0;
|
||||
|
||||
if (encoding == GDK_TARGET_STRING)
|
||||
source_charset = "ISO-8859-1";
|
||||
source_charset = g_strdup ("ISO-8859-1");
|
||||
else if (encoding == _utf8_string)
|
||||
source_charset = "UTF-8";
|
||||
source_charset = g_strdup ("UTF-8");
|
||||
else
|
||||
source_charset = gdk_atom_name (encoding);
|
||||
|
||||
g_get_charset (&charset);
|
||||
|
||||
result = g_convert (text, length, charset, source_charset,
|
||||
NULL, NULL, &error);
|
||||
NULL, NULL, NULL);
|
||||
g_free (source_charset);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
g_error_free (error);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
*list = g_new (gchar *, 1);
|
||||
**list = result;
|
||||
@@ -915,7 +933,10 @@ gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", gdk_atom_name (encoding));
|
||||
gchar *enc_name = gdk_atom_name (encoding);
|
||||
|
||||
g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", enc_name);
|
||||
g_free (enc_name);
|
||||
|
||||
if (list)
|
||||
*list = NULL;
|
||||
@@ -1008,12 +1029,32 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
GdkAtom *targets)
|
||||
{
|
||||
HWND hwnd;
|
||||
const gchar *target_name;
|
||||
guint formatid;
|
||||
gint i;
|
||||
GSList *convertable_formats, *format;
|
||||
gboolean has_set_dib = FALSE, has_real_dib = FALSE;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (_gdk_debug_flags & GDK_DEBUG_DND)
|
||||
{
|
||||
gchar *sel_name = gdk_atom_name (selection);
|
||||
|
||||
g_print ("gdk_win32_selection_add_targets: %p: %s: ",
|
||||
owner ? GDK_WINDOW_HWND (owner) : NULL,
|
||||
sel_name);
|
||||
g_free (sel_name);
|
||||
|
||||
for (i = 0; i < n_targets; i++)
|
||||
{
|
||||
gchar *tgt_name = gdk_atom_name (targets[i]);
|
||||
|
||||
g_print ("%s ", tgt_name);
|
||||
g_free (tgt_name);
|
||||
}
|
||||
g_print ("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (selection != GDK_SELECTION_CLIPBOARD)
|
||||
return;
|
||||
|
||||
@@ -1030,16 +1071,28 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
convertable_formats = gdk_pixbuf_get_formats ();
|
||||
for (i = 0; i < n_targets; ++i)
|
||||
{
|
||||
if (targets[i] == _utf8_string)
|
||||
gchar *target_name;
|
||||
|
||||
if (targets[i] == _utf8_string ||
|
||||
targets[i] == GDK_TARGET_STRING ||
|
||||
targets[i] == _text ||
|
||||
targets[i] == _compound_text ||
|
||||
targets[i] == _save_targets)
|
||||
continue;
|
||||
|
||||
target_name = gdk_atom_name (targets[i]);
|
||||
if (!(formatid = RegisterClipboardFormat (target_name))) {
|
||||
WIN32_API_FAILED ("RegisterClipboardFormat");
|
||||
API_CALL (CloseClipboard, ());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(formatid = RegisterClipboardFormat (target_name)))
|
||||
{
|
||||
WIN32_API_FAILED ("RegisterClipboardFormat");
|
||||
API_CALL (CloseClipboard, ());
|
||||
g_free (target_name);
|
||||
return;
|
||||
}
|
||||
g_hash_table_replace (_format_atom_table, GINT_TO_POINTER (formatid), targets[i]);
|
||||
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(%s,NULL)\n",
|
||||
_gdk_win32_cf_to_string (formatid)));
|
||||
SetClipboardData (formatid, NULL);
|
||||
|
||||
/* We should replace the previous image format associated with
|
||||
@@ -1054,11 +1107,14 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
g_hash_table_replace (_format_atom_table,
|
||||
GINT_TO_POINTER (CF_DIB),
|
||||
targets[i]);
|
||||
if (!has_set_dib) {
|
||||
SetClipboardData (CF_DIB, NULL);
|
||||
has_set_dib = TRUE;
|
||||
}
|
||||
if (!has_set_dib)
|
||||
{
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_DIB,NULL)\n"));
|
||||
SetClipboardData (CF_DIB, NULL);
|
||||
has_set_dib = TRUE;
|
||||
}
|
||||
has_real_dib = TRUE;
|
||||
g_free (target_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1074,12 +1130,14 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
g_hash_table_replace (_format_atom_table,
|
||||
GINT_TO_POINTER (CF_DIB),
|
||||
targets[i]);
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_DIB,NULL)\n"));
|
||||
SetClipboardData (CF_DIB, NULL);
|
||||
has_set_dib = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
g_free (target_name);
|
||||
}
|
||||
g_slist_free (convertable_formats);
|
||||
|
||||
@@ -1096,7 +1154,7 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
|
||||
{
|
||||
GdkPixbufLoader *loader;
|
||||
GdkPixbuf *pixbuf;
|
||||
const gchar *target_name;
|
||||
gchar *target_name;
|
||||
guchar *ptr;
|
||||
gchar *bmp_buf;
|
||||
gsize size;
|
||||
@@ -1115,14 +1173,16 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
|
||||
/* No conversion is needed, just strip the BITMAPFILEHEADER */
|
||||
HGLOBAL hdatanew;
|
||||
|
||||
g_free (target_name);
|
||||
size = GlobalSize (hdata) - 1 - sizeof (BITMAPFILEHEADER);
|
||||
ptr = GlobalLock (hdata);
|
||||
memmove (ptr, ptr + sizeof (BITMAPFILEHEADER), size);
|
||||
GlobalUnlock (hdata);
|
||||
if (!(hdatanew = GlobalReAlloc (hdata, size, 0))) {
|
||||
WIN32_API_FAILED ("GlobalReAlloc");
|
||||
GlobalFree (hdata); /* the old hdata is not freed if error */
|
||||
}
|
||||
if (!(hdatanew = GlobalReAlloc (hdata, size, 0)))
|
||||
{
|
||||
WIN32_API_FAILED ("GlobalReAlloc");
|
||||
GlobalFree (hdata); /* the old hdata is not freed if error */
|
||||
}
|
||||
return hdatanew;
|
||||
}
|
||||
|
||||
@@ -1133,8 +1193,10 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
|
||||
if (!(loader = gdk_pixbuf_loader_new_with_mime_type (target_name, NULL)))
|
||||
{
|
||||
GlobalFree (hdata);
|
||||
g_free (target_name);
|
||||
return NULL;
|
||||
}
|
||||
g_free (target_name);
|
||||
|
||||
ptr = GlobalLock (hdata);
|
||||
ok = gdk_pixbuf_loader_write (loader, ptr, GlobalSize (hdata) - 1, NULL) &&
|
||||
|
||||
@@ -246,6 +246,7 @@ _gdk_visual_init (void)
|
||||
}
|
||||
else if (bitspixel == 24 || bitspixel == 32)
|
||||
{
|
||||
bitspixel = 24;
|
||||
system_visual->type = GDK_VISUAL_TRUE_COLOR;
|
||||
system_visual->red_mask = 0x00FF0000;
|
||||
system_visual->green_mask = 0x0000FF00;
|
||||
|
||||
+141
-215
@@ -32,16 +32,12 @@
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define WINVER _WIN32_WINNT
|
||||
|
||||
#include "gdk.h" /* gdk_rectangle_intersect */
|
||||
#include "gdkevents.h"
|
||||
#include "gdkpixmap.h"
|
||||
#include "gdkwindow.h"
|
||||
#include "gdkdisplay.h"
|
||||
#include "gdk.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
#include "gdkinput-win32.h"
|
||||
|
||||
#if defined(_MSC_VER) && (WINVER < 0x0500)
|
||||
#define GetAncestor(hwnd,what) _gdk_win32_get_ancestor_parent(hwnd)
|
||||
#define GetAncestor(hwnd,what) _gdk_win32_get_ancestor_parent (hwnd)
|
||||
|
||||
static HWND
|
||||
_gdk_win32_get_ancestor_parent (HWND hwnd)
|
||||
@@ -208,14 +204,6 @@ _gdk_win32_adjust_client_rect (GdkWindow *window,
|
||||
API_CALL (AdjustWindowRectEx, (rect, style, FALSE, exstyle));
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_win32_get_adjusted_client_rect (GdkWindow *window,
|
||||
RECT *rect)
|
||||
{
|
||||
GetClientRect (GDK_WINDOW_HWND (window), rect);
|
||||
_gdk_win32_adjust_client_rect (window, rect);
|
||||
}
|
||||
|
||||
static GdkColormap*
|
||||
gdk_window_impl_win32_get_colormap (GdkDrawable *drawable)
|
||||
{
|
||||
@@ -228,8 +216,7 @@ gdk_window_impl_win32_get_colormap (GdkDrawable *drawable)
|
||||
if (!((GdkWindowObject *) drawable_impl->wrapper)->input_only &&
|
||||
drawable_impl->colormap == NULL)
|
||||
{
|
||||
drawable_impl->colormap =
|
||||
gdk_screen_get_system_colormap (gdk_drawable_get_screen (drawable));
|
||||
drawable_impl->colormap = gdk_screen_get_system_colormap (_gdk_screen);
|
||||
g_object_ref (drawable_impl->colormap);
|
||||
}
|
||||
|
||||
@@ -254,7 +241,7 @@ gdk_window_impl_win32_set_colormap (GdkDrawable *drawable,
|
||||
if (cmap)
|
||||
{
|
||||
/* XXX */
|
||||
g_print("gdk_window_impl_win32_set_colormap: XXX\n");
|
||||
g_print ("gdk_window_impl_win32_set_colormap: XXX\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +324,7 @@ _gdk_windowing_window_init (void)
|
||||
|
||||
draw_impl->handle = GetDesktopWindow ();
|
||||
draw_impl->wrapper = GDK_DRAWABLE (private);
|
||||
draw_impl->colormap = gdk_colormap_get_system ();
|
||||
draw_impl->colormap = gdk_screen_get_default_colormap (_gdk_screen);
|
||||
g_object_ref (draw_impl->colormap);
|
||||
|
||||
private->window_type = GDK_WINDOW_ROOT;
|
||||
@@ -430,7 +417,7 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
{
|
||||
wcl.lpszClassName = "gdkWindowToplevel";
|
||||
|
||||
ONCE_PER_CLASS();
|
||||
ONCE_PER_CLASS ();
|
||||
klassTOPLEVEL = RegisterClassEx (&wcl);
|
||||
}
|
||||
klass = klassTOPLEVEL;
|
||||
@@ -442,7 +429,7 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
wcl.lpszClassName = "gdkWindowChild";
|
||||
|
||||
wcl.style |= CS_PARENTDC; /* MSDN: ... enhances system performance. */
|
||||
ONCE_PER_CLASS();
|
||||
ONCE_PER_CLASS ();
|
||||
klassCHILD = RegisterClassEx (&wcl);
|
||||
}
|
||||
klass = klassCHILD;
|
||||
@@ -453,7 +440,7 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
{
|
||||
wcl.lpszClassName = "gdkWindowDialog";
|
||||
wcl.style |= CS_SAVEBITS;
|
||||
ONCE_PER_CLASS();
|
||||
ONCE_PER_CLASS ();
|
||||
klassDIALOG = RegisterClassEx (&wcl);
|
||||
}
|
||||
klass = klassDIALOG;
|
||||
@@ -464,7 +451,7 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
{
|
||||
wcl.lpszClassName = "gdkWindowTemp";
|
||||
wcl.style |= CS_SAVEBITS;
|
||||
ONCE_PER_CLASS();
|
||||
ONCE_PER_CLASS ();
|
||||
klassTEMP = RegisterClassEx (&wcl);
|
||||
}
|
||||
klass = klassTEMP;
|
||||
@@ -499,7 +486,6 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplWin32 *impl;
|
||||
GdkDrawableImplWin32 *draw_impl;
|
||||
GdkScreen *screen;
|
||||
GdkVisual *visual;
|
||||
const gchar *title;
|
||||
char *mbtitle;
|
||||
@@ -509,12 +495,7 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
g_return_val_if_fail (attributes != NULL, NULL);
|
||||
|
||||
if (!parent)
|
||||
{
|
||||
screen = gdk_screen_get_default ();
|
||||
parent = _gdk_root;
|
||||
}
|
||||
else
|
||||
screen = gdk_drawable_get_screen (parent);
|
||||
parent = _gdk_root;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (parent), NULL);
|
||||
|
||||
@@ -598,7 +579,7 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_impl->colormap = gdk_screen_get_system_colormap (screen);
|
||||
draw_impl->colormap = gdk_screen_get_system_colormap (_gdk_screen);
|
||||
g_object_ref (draw_impl->colormap);
|
||||
}
|
||||
}
|
||||
@@ -607,7 +588,7 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
dwExStyle = WS_EX_TRANSPARENT;
|
||||
private->depth = 0;
|
||||
private->input_only = TRUE;
|
||||
draw_impl->colormap = gdk_screen_get_system_colormap (screen);
|
||||
draw_impl->colormap = gdk_screen_get_system_colormap (_gdk_screen);
|
||||
g_object_ref (draw_impl->colormap);
|
||||
GDK_NOTE (MISC, g_print ("... GDK_INPUT_ONLY, system colormap"));
|
||||
}
|
||||
@@ -696,7 +677,7 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
mbtitle = g_locale_from_utf8 (title, -1, NULL, NULL, NULL);
|
||||
|
||||
hwndNew = CreateWindowEx (dwExStyle,
|
||||
MAKEINTRESOURCE(klass),
|
||||
MAKEINTRESOURCE (klass),
|
||||
mbtitle,
|
||||
dwStyle,
|
||||
((attributes_mask & GDK_WA_X) ?
|
||||
@@ -709,9 +690,9 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
window);
|
||||
if (GDK_WINDOW_HWND (window) != hwndNew)
|
||||
{
|
||||
g_warning("gdk_window_new: gdk_event_translate::WM_CREATE (%p, %p) HWND mismatch.",
|
||||
GDK_WINDOW_HWND (window),
|
||||
hwndNew);
|
||||
g_warning ("gdk_window_new: gdk_event_translate::WM_CREATE (%p, %p) HWND mismatch.",
|
||||
GDK_WINDOW_HWND (window),
|
||||
hwndNew);
|
||||
|
||||
/* HB: IHMO due to a race condition the handle was increased by
|
||||
* one, which causes much trouble. Because I can't find the
|
||||
@@ -781,7 +762,7 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
|
||||
RECT rect;
|
||||
POINT point;
|
||||
|
||||
g_return_val_if_fail (display == gdk_display_get_default (), NULL);
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
|
||||
window = g_object_new (GDK_TYPE_WINDOW, NULL);
|
||||
private = (GdkWindowObject *)window;
|
||||
@@ -884,7 +865,6 @@ _gdk_windowing_window_destroy_foreign (GdkWindow *window)
|
||||
void
|
||||
gdk_window_destroy_notify (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
@@ -894,7 +874,7 @@ gdk_window_destroy_notify (GdkWindow *window)
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
{
|
||||
if (GDK_WINDOW_TYPE(window) != GDK_WINDOW_FOREIGN)
|
||||
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
|
||||
g_warning ("window %p unexpectedly destroyed",
|
||||
GDK_WINDOW_HWND (window));
|
||||
|
||||
@@ -911,16 +891,11 @@ get_outer_rect (GdkWindow *window,
|
||||
gint height,
|
||||
RECT *rect)
|
||||
{
|
||||
LONG style, exstyle;
|
||||
|
||||
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
rect->left = rect->top = 0;
|
||||
rect->right = width;
|
||||
rect->bottom = height;
|
||||
|
||||
API_CALL (AdjustWindowRectEx, (rect, style, FALSE, exstyle));
|
||||
_gdk_win32_adjust_client_rect (window, rect);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1123,7 +1098,7 @@ gdk_window_hide (GdkWindow *window)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = (GdkWindowObject*) window;
|
||||
if (private->destroyed)
|
||||
@@ -1160,7 +1135,7 @@ gdk_window_withdraw (GdkWindow *window)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = (GdkWindowObject*) window;
|
||||
if (private->destroyed)
|
||||
@@ -1181,7 +1156,6 @@ gdk_window_move (GdkWindow *window,
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
GdkWindowImplWin32 *impl;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1228,7 +1202,6 @@ gdk_window_resize (GdkWindow *window,
|
||||
GdkWindowObject *private = (GdkWindowObject*) window;
|
||||
GdkWindowImplWin32 *impl;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1252,6 +1225,7 @@ gdk_window_resize (GdkWindow *window,
|
||||
else
|
||||
{
|
||||
RECT outer_rect;
|
||||
|
||||
get_outer_rect (window, width, height, &outer_rect);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,0,0,%ld,%ld,"
|
||||
@@ -1279,7 +1253,6 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
GdkWindowObject *private = (GdkWindowObject*) window;
|
||||
GdkWindowImplWin32 *impl;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1337,7 +1310,6 @@ gdk_window_reparent (GdkWindow *window,
|
||||
gboolean was_toplevel;
|
||||
LONG style;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (new_parent == NULL || GDK_IS_WINDOW (new_parent));
|
||||
g_return_if_fail (window != _gdk_root);
|
||||
@@ -1436,7 +1408,6 @@ _gdk_windowing_window_clear_area (GdkWindow *window,
|
||||
{
|
||||
GdkWindowImplWin32 *impl;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
|
||||
@@ -1467,7 +1438,6 @@ _gdk_windowing_window_clear_area_e (GdkWindow *window,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1491,7 +1461,6 @@ _gdk_windowing_window_clear_area_e (GdkWindow *window,
|
||||
void
|
||||
gdk_window_raise (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1506,7 +1475,6 @@ gdk_window_raise (GdkWindow *window)
|
||||
void
|
||||
gdk_window_lower (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1537,7 +1505,6 @@ gdk_window_set_hints (GdkWindow *window,
|
||||
|
||||
GdkWindowImplWin32 *impl;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1600,13 +1567,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
GdkWindowHints geom_mask)
|
||||
{
|
||||
GdkWindowImplWin32 *impl;
|
||||
#if 0
|
||||
WINDOWPLACEMENT size_hints;
|
||||
RECT rect;
|
||||
gint new_width = 0, new_height = 0;
|
||||
#endif
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1627,92 +1588,39 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("... MIN_SIZE: %dx%d\n",
|
||||
geometry->min_width, geometry->min_height));
|
||||
|
||||
#if 0
|
||||
/* Check if the current size of the window is in bounds */
|
||||
GetClientRect (GDK_WINDOW_HWND (window), &rect);
|
||||
|
||||
if (rect.right < geometry->min_width &&
|
||||
rect.bottom < geometry->min_height)
|
||||
{
|
||||
new_width = geometry->min_width;
|
||||
new_height = geometry->min_height;
|
||||
}
|
||||
else if (rect.right < geometry->min_width)
|
||||
{
|
||||
new_width = geometry->min_width;
|
||||
new_height = rect.bottom;
|
||||
}
|
||||
else if (rect.bottom < geometry->min_height)
|
||||
{
|
||||
new_width = rect.right;
|
||||
new_height = geometry->min_height;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (geom_mask & GDK_HINT_MAX_SIZE)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("... MAX_SIZE: %dx%d\n",
|
||||
geometry->max_width, geometry->max_height));
|
||||
|
||||
#if 0
|
||||
/* Check if the current size of the window is in bounds */
|
||||
GetClientRect (GDK_WINDOW_HWND (window), &rect);
|
||||
|
||||
if (rect.right > geometry->max_width &&
|
||||
rect.bottom > geometry->max_height)
|
||||
{
|
||||
new_width = geometry->max_width;
|
||||
new_height = geometry->max_height;
|
||||
}
|
||||
else if (rect.right > geometry->max_width)
|
||||
{
|
||||
new_width = geometry->max_width;
|
||||
new_height = rect.bottom;
|
||||
}
|
||||
else if (rect.bottom > geometry->max_height)
|
||||
{
|
||||
new_width = rect.right;
|
||||
new_height = geometry->max_height;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Apply new size constraints */
|
||||
if (new_width != 0 && new_height != 0)
|
||||
gdk_window_resize (window, new_width, new_height);
|
||||
#endif
|
||||
if ((geom_mask & GDK_HINT_MIN_SIZE) &&
|
||||
(geom_mask & GDK_HINT_MAX_SIZE) &&
|
||||
geometry->min_width == geometry->max_width &&
|
||||
geometry->min_height == geometry->max_height)
|
||||
gdk_window_set_decorations (window,
|
||||
GDK_DECOR_ALL |
|
||||
GDK_DECOR_RESIZEH |
|
||||
GDK_DECOR_MAXIMIZE);
|
||||
else if (geom_mask & GDK_HINT_MAX_SIZE)
|
||||
{
|
||||
gdk_window_set_decorations (window,
|
||||
GDK_DECOR_ALL |
|
||||
GDK_DECOR_MAXIMIZE);
|
||||
gdk_window_set_decorations (window,
|
||||
GDK_DECOR_RESIZEH);
|
||||
}
|
||||
else
|
||||
gdk_window_set_decorations (window,
|
||||
GDK_DECOR_RESIZEH |
|
||||
GDK_DECOR_MAXIMIZE);
|
||||
|
||||
if (geom_mask & GDK_HINT_BASE_SIZE)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("... BASE_SIZE: %dx%d\n",
|
||||
geometry->base_width, geometry->base_height));
|
||||
|
||||
#if 0
|
||||
size_hints.length = sizeof (size_hints);
|
||||
|
||||
if (API_CALL (GetWindowPlacement, (GDK_WINDOW_HWND (window), &size_hints)))
|
||||
{
|
||||
GDK_NOTE (MISC,
|
||||
g_print ("... rcNormalPosition: (%ld,%ld)--(%ld,%ld)\n",
|
||||
size_hints.rcNormalPosition.left,
|
||||
size_hints.rcNormalPosition.top,
|
||||
size_hints.rcNormalPosition.right,
|
||||
size_hints.rcNormalPosition.bottom));
|
||||
size_hints.rcNormalPosition.right =
|
||||
size_hints.rcNormalPosition.left + geometry->base_width;
|
||||
size_hints.rcNormalPosition.bottom =
|
||||
size_hints.rcNormalPosition.top + geometry->base_height;
|
||||
GDK_NOTE (MISC, g_print ("... setting: rcNormal: (%ld,%ld)--(%ld,%ld)\n",
|
||||
size_hints.rcNormalPosition.left,
|
||||
size_hints.rcNormalPosition.top,
|
||||
size_hints.rcNormalPosition.right,
|
||||
size_hints.rcNormalPosition.bottom));
|
||||
API_CALL (SetWindowPlacement, (GDK_WINDOW_HWND (window), &size_hints));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (geom_mask & GDK_HINT_RESIZE_INC)
|
||||
@@ -1768,7 +1676,6 @@ void
|
||||
gdk_window_set_role (GdkWindow *window,
|
||||
const gchar *role)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_role: %p: %s\n",
|
||||
@@ -1783,7 +1690,6 @@ gdk_window_set_transient_for (GdkWindow *window,
|
||||
{
|
||||
HWND window_id, parent_id;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_transient_for: %p: %p\n",
|
||||
@@ -1819,7 +1725,6 @@ gdk_window_set_background (GdkWindow *window,
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_background: %p: %s\n",
|
||||
@@ -1844,7 +1749,6 @@ gdk_window_set_back_pixmap (GdkWindow *window,
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (pixmap == NULL || !parent_relative);
|
||||
g_return_if_fail (pixmap == NULL || gdk_drawable_get_depth (window) == gdk_drawable_get_depth (pixmap));
|
||||
@@ -1889,7 +1793,6 @@ gdk_window_set_cursor (GdkWindow *window,
|
||||
HCURSOR hcursor;
|
||||
HCURSOR hprevcursor;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
|
||||
@@ -1961,7 +1864,7 @@ gdk_window_set_cursor (GdkWindow *window,
|
||||
*/
|
||||
if (hprevcursor != NULL)
|
||||
{
|
||||
if (GetCursor() == hprevcursor)
|
||||
if (GetCursor () == hprevcursor)
|
||||
{
|
||||
/* Look for a suitable cursor to use instead */
|
||||
hcursor = NULL;
|
||||
@@ -2063,7 +1966,7 @@ gdk_window_get_origin (GdkWindow *window,
|
||||
gint tx = 0;
|
||||
gint ty = 0;
|
||||
|
||||
g_return_val_if_fail (window != NULL, 0);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
{
|
||||
@@ -2238,11 +2141,10 @@ _gdk_windowing_get_pointer (GdkDisplay *display,
|
||||
gint *y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkScreen *default_screen = gdk_display_get_default_screen (display);
|
||||
GdkWindow *root_window = gdk_screen_get_root_window (default_screen);
|
||||
g_return_if_fail (display == _gdk_display);
|
||||
|
||||
*screen = default_screen;
|
||||
_gdk_windowing_window_get_pointer (display, root_window, x, y, mask);
|
||||
*screen = _gdk_screen;
|
||||
_gdk_windowing_window_get_pointer (_gdk_display, _gdk_root, x, y, mask);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2251,7 +2153,10 @@ gdk_display_warp_pointer (GdkDisplay *display,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
SetCursorPos (x, y);
|
||||
g_return_if_fail (display == _gdk_display);
|
||||
g_return_if_fail (screen == _gdk_screen);
|
||||
|
||||
SetCursorPos (x - _gdk_offset_x, y - _gdk_offset_y);
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
@@ -2304,7 +2209,6 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
|
||||
GdkEventMask
|
||||
gdk_window_get_events (GdkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (window != NULL, 0);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2317,7 +2221,6 @@ void
|
||||
gdk_window_set_events (GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2335,7 +2238,8 @@ gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
GdkBitmap *mask,
|
||||
gint x, gint y)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (!mask)
|
||||
@@ -2343,6 +2247,8 @@ gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_shape_combine_mask: %p: none\n",
|
||||
GDK_WINDOW_HWND (window)));
|
||||
SetWindowRgn (GDK_WINDOW_HWND (window), NULL, TRUE);
|
||||
|
||||
private->shaped = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2356,7 +2262,8 @@ gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
GDK_WINDOW_HWND (window),
|
||||
GDK_WINDOW_HWND (mask)));
|
||||
|
||||
_gdk_win32_get_adjusted_client_rect (window, &rect);
|
||||
GetClientRect (GDK_WINDOW_HWND (window), &rect);
|
||||
_gdk_win32_adjust_client_rect (window, &rect);
|
||||
|
||||
OffsetRgn (hrgn, -rect.left, -rect.top);
|
||||
OffsetRgn (hrgn, x, y);
|
||||
@@ -2370,6 +2277,8 @@ gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
}
|
||||
|
||||
SetWindowRgn (GDK_WINDOW_HWND (window), hrgn, TRUE);
|
||||
|
||||
private->shaped = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2377,7 +2286,6 @@ void
|
||||
gdk_window_set_override_redirect (GdkWindow *window,
|
||||
gboolean override_redirect)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
g_warning ("gdk_window_set_override_redirect not implemented");
|
||||
@@ -2388,7 +2296,7 @@ gdk_window_set_accept_focus (GdkWindow *window,
|
||||
gboolean accept_focus)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = (GdkWindowObject *)window;
|
||||
@@ -2404,7 +2312,7 @@ gdk_window_set_focus_on_map (GdkWindow *window,
|
||||
gboolean focus_on_map)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = (GdkWindowObject *)window;
|
||||
@@ -2463,8 +2371,8 @@ gdk_window_set_icon_list (GdkWindow *window,
|
||||
big_i = i;
|
||||
}
|
||||
|
||||
dw = ABS(w - small_w);
|
||||
dh = ABS(h - small_h);
|
||||
dw = ABS (w - small_w);
|
||||
dh = ABS (h - small_h);
|
||||
diff = dw*dw + dh*dh;
|
||||
if (small_pixbuf == NULL || diff < small_diff)
|
||||
{
|
||||
@@ -2502,7 +2410,6 @@ gdk_window_set_icon (GdkWindow *window,
|
||||
GdkPixmap *pixmap,
|
||||
GdkBitmap *mask)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
/* do nothing, use gdk_window_set_icon_list instead */
|
||||
@@ -2512,13 +2419,22 @@ void
|
||||
gdk_window_set_icon_name (GdkWindow *window,
|
||||
const gchar *name)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
#if 0
|
||||
/* This is not the correct thing to do. We should keep both the
|
||||
* "normal" window title, and the icon name. When the window is
|
||||
* minimized, call SetWindowText() with the icon name, and when the
|
||||
* window is restored, with the normal window title. Also, the name
|
||||
* is in UTF-8, so we should do the normal conversion to either wide
|
||||
* chars or system codepage, and use either the W or A version of
|
||||
* SetWindowText(), depending on Windows version.
|
||||
*/
|
||||
API_CALL (SetWindowText, (GDK_WINDOW_HWND (window), name));
|
||||
#endif
|
||||
}
|
||||
|
||||
GdkWindow *
|
||||
@@ -2539,10 +2455,9 @@ void
|
||||
gdk_window_set_group (GdkWindow *window,
|
||||
GdkWindow *leader)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (leader != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (leader));
|
||||
g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD);
|
||||
g_return_if_fail (leader == NULL || GDK_IS_WINDOW (leader));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) || GDK_WINDOW_DESTROYED (leader))
|
||||
return;
|
||||
@@ -2550,19 +2465,54 @@ gdk_window_set_group (GdkWindow *window,
|
||||
g_warning ("gdk_window_set_group not implemented");
|
||||
}
|
||||
|
||||
static void
|
||||
set_or_clear_style_bits (GdkWindow *window,
|
||||
gboolean clear_bits,
|
||||
int bits)
|
||||
{
|
||||
LONG style, exstyle;
|
||||
RECT rect, before, after;
|
||||
|
||||
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
GetClientRect (GDK_WINDOW_HWND (window), &before);
|
||||
after = before;
|
||||
AdjustWindowRectEx (&before, style, FALSE, exstyle);
|
||||
|
||||
if (clear_bits)
|
||||
style &= ~bits;
|
||||
else
|
||||
style |= bits;
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
|
||||
|
||||
AdjustWindowRectEx (&after, style, FALSE, exstyle);
|
||||
|
||||
GetWindowRect (GDK_WINDOW_HWND (window), &rect);
|
||||
rect.left += after.left - before.left;
|
||||
rect.top += after.top - before.top;
|
||||
rect.right += after.right - before.right;
|
||||
rect.bottom += after.bottom - before.bottom;
|
||||
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||
SWP_NOREPOSITION | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_decorations (GdkWindow *window,
|
||||
GdkWMDecoration decorations)
|
||||
{
|
||||
LONG style, bits;
|
||||
const LONG settable_bits = WS_BORDER|WS_THICKFRAME|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX;
|
||||
int bits;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_decorations: %p: %s%s%s%s%s%s%s\n",
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_decorations: %p: %s %s%s%s%s%s%s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
(decorations & GDK_DECOR_ALL ? "ALL " : ""),
|
||||
(decorations & GDK_DECOR_ALL ? "clearing" : "setting"),
|
||||
(decorations & GDK_DECOR_BORDER ? "BORDER " : ""),
|
||||
(decorations & GDK_DECOR_RESIZEH ? "RESIZEH " : ""),
|
||||
(decorations & GDK_DECOR_TITLE ? "TITLE " : ""),
|
||||
@@ -2570,8 +2520,6 @@ gdk_window_set_decorations (GdkWindow *window,
|
||||
(decorations & GDK_DECOR_MINIMIZE ? "MINIMIZE " : ""),
|
||||
(decorations & GDK_DECOR_MAXIMIZE ? "MAXIMIZE " : "")));
|
||||
|
||||
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
|
||||
bits = 0;
|
||||
|
||||
if (decorations & GDK_DECOR_BORDER)
|
||||
@@ -2587,24 +2535,18 @@ gdk_window_set_decorations (GdkWindow *window,
|
||||
if (decorations & GDK_DECOR_MAXIMIZE)
|
||||
bits |= WS_MAXIMIZEBOX;
|
||||
|
||||
if (decorations & GDK_DECOR_ALL)
|
||||
style |= settable_bits, style &= ~bits;
|
||||
else
|
||||
style &= ~settable_bits, style |= bits;
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
|
||||
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
set_or_clear_style_bits (window, (decorations & GDK_DECOR_ALL), bits);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_window_get_decorations(GdkWindow *window,
|
||||
GdkWMDecoration *decorations)
|
||||
gdk_window_get_decorations (GdkWindow *window,
|
||||
GdkWMDecoration *decorations)
|
||||
{
|
||||
LONG style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
LONG style;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
*decorations = 0;
|
||||
|
||||
if (style & WS_BORDER)
|
||||
@@ -2627,23 +2569,19 @@ void
|
||||
gdk_window_set_functions (GdkWindow *window,
|
||||
GdkWMFunction functions)
|
||||
{
|
||||
LONG style, bits;
|
||||
const LONG settable_bits = (WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU);
|
||||
int bits;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_functions: %p: %s%s%s%s%s%s\n",
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_functions: %p: %s %s%s%s%s%s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
(functions & GDK_FUNC_ALL ? "ALL " : ""),
|
||||
(functions & GDK_FUNC_ALL ? "clearing" : "setting"),
|
||||
(functions & GDK_FUNC_RESIZE ? "RESIZE " : ""),
|
||||
(functions & GDK_FUNC_MOVE ? "MOVE " : ""),
|
||||
(functions & GDK_FUNC_MINIMIZE ? "MINIMIZE " : ""),
|
||||
(functions & GDK_FUNC_MAXIMIZE ? "MAXIMIZE " : ""),
|
||||
(functions & GDK_FUNC_CLOSE ? "CLOSE " : "")));
|
||||
|
||||
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
|
||||
bits = 0;
|
||||
|
||||
if (functions & GDK_FUNC_RESIZE)
|
||||
@@ -2657,16 +2595,7 @@ gdk_window_set_functions (GdkWindow *window,
|
||||
if (functions & GDK_FUNC_CLOSE)
|
||||
bits |= WS_SYSMENU;
|
||||
|
||||
if (functions & GDK_FUNC_ALL)
|
||||
style |= settable_bits, style &= ~bits;
|
||||
else
|
||||
style &= ~settable_bits, style |= bits;
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
|
||||
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
set_or_clear_style_bits (window, (functions & GDK_FUNC_ALL), bits);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2743,7 +2672,6 @@ gdk_propagate_shapes (HANDLE win,
|
||||
void
|
||||
gdk_window_set_child_shapes (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2755,7 +2683,6 @@ gdk_window_set_child_shapes (GdkWindow *window)
|
||||
void
|
||||
gdk_window_merge_child_shapes (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2768,7 +2695,6 @@ gboolean
|
||||
gdk_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
return !use_static;
|
||||
@@ -2793,13 +2719,15 @@ gdk_window_begin_resize_drag (GdkWindow *window,
|
||||
* the left pointer button was clicked in the suitable edge or corner. This
|
||||
* will only work if the button is down when this function is called, and
|
||||
* will only work with button 1 (left), since Windows only allows window
|
||||
* dragging using the left mouse button */
|
||||
* dragging using the left mouse button.
|
||||
*/
|
||||
if (button != 1)
|
||||
return;
|
||||
|
||||
/* Must break the automatic grab that occured when the button was pressed,
|
||||
* otherwise it won't work */
|
||||
gdk_display_pointer_ungrab (gdk_display_get_default (), 0);
|
||||
/* Must break the automatic grab that occured when the button was
|
||||
* pressed, otherwise it won't work.
|
||||
*/
|
||||
gdk_display_pointer_ungrab (_gdk_display, 0);
|
||||
|
||||
switch (edge)
|
||||
{
|
||||
@@ -2838,7 +2766,7 @@ gdk_window_begin_resize_drag (GdkWindow *window,
|
||||
}
|
||||
|
||||
DefWindowProc (GDK_WINDOW_HWND (window), WM_NCLBUTTONDOWN, winedge,
|
||||
MAKELPARAM (root_x - _gdk_offset_x, root_y - _gdk_offset_y));
|
||||
MAKELPARAM (root_x - _gdk_offset_x, root_y - _gdk_offset_y));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2857,16 +2785,18 @@ gdk_window_begin_move_drag (GdkWindow *window,
|
||||
* the left pointer button was clicked in the titlebar. This will only work
|
||||
* if the button is down when this function is called, and will only work
|
||||
* with button 1 (left), since Windows only allows window dragging using the
|
||||
* left mouse button */
|
||||
* left mouse button.
|
||||
*/
|
||||
if (button != 1)
|
||||
return;
|
||||
|
||||
/* Must break the automatic grab that occured when the button was pressed,
|
||||
* otherwise it won't work */
|
||||
gdk_display_pointer_ungrab (gdk_display_get_default (), 0);
|
||||
* otherwise it won't work.
|
||||
*/
|
||||
gdk_display_pointer_ungrab (_gdk_display, 0);
|
||||
|
||||
DefWindowProc (GDK_WINDOW_HWND (window), WM_NCLBUTTONDOWN, HTCAPTION,
|
||||
MAKELPARAM (root_x - _gdk_offset_x, root_y - _gdk_offset_y));
|
||||
MAKELPARAM (root_x - _gdk_offset_x, root_y - _gdk_offset_y));
|
||||
}
|
||||
|
||||
|
||||
@@ -2878,7 +2808,6 @@ gdk_window_iconify (GdkWindow *window)
|
||||
{
|
||||
HWND old_active_window;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2906,7 +2835,6 @@ gdk_window_iconify (GdkWindow *window)
|
||||
void
|
||||
gdk_window_deiconify (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -3044,7 +2972,7 @@ gdk_window_unfullscreen (GdkWindow *window)
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
fi = g_object_get_data (G_OBJECT(window), "fullscreen-info");
|
||||
fi = g_object_get_data (G_OBJECT (window), "fullscreen-info");
|
||||
if (fi)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
|
||||
@@ -3131,7 +3059,6 @@ gdk_window_set_modal_hint (GdkWindow *window,
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -3201,7 +3128,6 @@ void
|
||||
gdk_window_set_type_hint (GdkWindow *window,
|
||||
GdkWindowTypeHint hint)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -3262,7 +3188,7 @@ gdk_window_shape_combine_region (GdkWindow *window,
|
||||
GdkWindow *
|
||||
gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
|
||||
{
|
||||
g_return_val_if_fail (display == gdk_display_get_default(), NULL);
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
|
||||
return gdk_window_lookup (anid);
|
||||
}
|
||||
|
||||
+8
-1
@@ -626,6 +626,9 @@ _gdk_x11_get_window_child_info (GdkDisplay *display,
|
||||
else
|
||||
wm_state_atom = None;
|
||||
|
||||
state.children = NULL;
|
||||
state.nchildren = 0;
|
||||
|
||||
gdk_error_trap_push ();
|
||||
result = list_children_and_wm_state (dpy, window,
|
||||
win_has_wm_state ? wm_state_atom : None,
|
||||
@@ -633,12 +636,16 @@ _gdk_x11_get_window_child_info (GdkDisplay *display,
|
||||
&state.children, &state.nchildren);
|
||||
gdk_error_trap_pop ();
|
||||
if (!result)
|
||||
return FALSE;
|
||||
{
|
||||
g_free (state.children);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (has_wm_state)
|
||||
{
|
||||
if (win_has_wm_state)
|
||||
*win_has_wm_state = TRUE;
|
||||
g_free (state.children);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1371,7 +1371,7 @@ gdkx_colormap_get (Colormap xcolormap)
|
||||
GdkColormap *colormap;
|
||||
|
||||
if (xcolormap == DefaultColormap (GDK_SCREEN_XDISPLAY (screen),
|
||||
GDK_SCREEN_XNUMBER (screen)));
|
||||
GDK_SCREEN_XNUMBER (screen)))
|
||||
return g_object_ref (gdk_screen_get_system_colormap (screen));
|
||||
|
||||
colormap = gdk_colormap_lookup (screen, xcolormap);
|
||||
|
||||
@@ -446,7 +446,8 @@ update_cursor (gpointer key,
|
||||
/**
|
||||
* gdk_x11_display_set_cursor_theme:
|
||||
* @display: a #GdkDisplay
|
||||
* @theme: the name of the cursor theme to use
|
||||
* @theme: the name of the cursor theme to use, or %NULL to unset
|
||||
* a previously set value
|
||||
* @size: the cursor size to use
|
||||
*
|
||||
* Sets the cursor theme from which the images for cursor
|
||||
@@ -481,8 +482,9 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
|
||||
old_theme = XcursorGetTheme (xdisplay);
|
||||
old_size = XcursorGetDefaultSize (xdisplay);
|
||||
|
||||
if (old_size == size &&
|
||||
old_theme && strcmp (old_theme, theme) == 0)
|
||||
if (old_size == size &&
|
||||
(old_theme == theme ||
|
||||
(old_theme && theme && strcmp (old_theme, theme) == 0)))
|
||||
return;
|
||||
|
||||
theme_serial++;
|
||||
|
||||
@@ -136,7 +136,7 @@ static GList *contexts;
|
||||
const static struct {
|
||||
const char *atom_name;
|
||||
GdkFilterFunc func;
|
||||
} const xdnd_filters[] = {
|
||||
} xdnd_filters[] = {
|
||||
{ "XdndEnter", xdnd_enter_filter },
|
||||
{ "XdndLeave", xdnd_leave_filter },
|
||||
{ "XdndPosition", xdnd_position_filter },
|
||||
|
||||
+21
-5
@@ -244,12 +244,28 @@ get_symbol (const KeySym *syms,
|
||||
gint index;
|
||||
|
||||
index = KEYSYM_INDEX(keymap_x11, group, level);
|
||||
if (index > keymap_x11->keysyms_per_keycode)
|
||||
if (index >= keymap_x11->keysyms_per_keycode)
|
||||
return NoSymbol;
|
||||
|
||||
return syms[index];
|
||||
}
|
||||
|
||||
static void
|
||||
set_symbol (KeySym *syms,
|
||||
GdkKeymapX11 *keymap_x11,
|
||||
gint group,
|
||||
gint level,
|
||||
KeySym sym)
|
||||
{
|
||||
gint index;
|
||||
|
||||
index = KEYSYM_INDEX(keymap_x11, group, level);
|
||||
if (index >= keymap_x11->keysyms_per_keycode)
|
||||
return;
|
||||
|
||||
syms[index] = sym;
|
||||
}
|
||||
|
||||
static void
|
||||
update_keymaps (GdkKeymapX11 *keymap_x11)
|
||||
{
|
||||
@@ -295,7 +311,7 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
|
||||
for (i = 0 ; i < 2 ; i++)
|
||||
{
|
||||
if (get_symbol (syms, keymap_x11, i, 0) == GDK_Tab)
|
||||
syms[KEYSYM_INDEX (keymap_x11, i, 1)] = GDK_ISO_Left_Tab;
|
||||
set_symbol (syms, keymap_x11, i, 1, GDK_ISO_Left_Tab);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -310,8 +326,8 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
|
||||
gdk_keyval_convert_case (get_symbol (syms, keymap_x11, 0, 0), &lower, &upper);
|
||||
if (lower != upper)
|
||||
{
|
||||
syms[KEYSYM_INDEX (keymap_x11, 0, 0)] = lower;
|
||||
syms[KEYSYM_INDEX (keymap_x11, 0, 1)] = upper;
|
||||
set_symbol (syms, keymap_x11, 0, 0, lower);
|
||||
set_symbol (syms, keymap_x11, 0, 1, upper);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1103,7 +1119,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
|
||||
|
||||
/* ---- End stuff GDK adds to the original Xlib version ---- */
|
||||
|
||||
return (syms[col]!=NoSymbol);
|
||||
return (syms[col] != NoSymbol);
|
||||
}
|
||||
#endif /* HAVE_XKB */
|
||||
|
||||
|
||||
@@ -530,11 +530,8 @@ gdk_property_get (GdkWindow *window,
|
||||
*/
|
||||
get_length = length + 3;
|
||||
if (get_length > G_MAXLONG)
|
||||
{
|
||||
g_warning ("gdk_property_get(): length value has wrapped in calculation "
|
||||
"(did you pass G_MAXLONG?)");
|
||||
get_length = G_MAXLONG;
|
||||
}
|
||||
get_length = G_MAXLONG;
|
||||
|
||||
/* To fail, either the user passed 0 or G_MAXULONG */
|
||||
get_length = get_length / 4;
|
||||
if (get_length == 0)
|
||||
|
||||
+28
-4
@@ -3685,6 +3685,7 @@ gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
GdkBitmap *mask,
|
||||
gint x, gint y)
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
Pixmap pixmap;
|
||||
gint xoffset, yoffset;
|
||||
|
||||
@@ -3707,12 +3708,16 @@ gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
if (mask)
|
||||
{
|
||||
pixmap = GDK_PIXMAP_XID (mask);
|
||||
|
||||
private->shaped = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
pixmap = None;
|
||||
|
||||
private->shaped = FALSE;
|
||||
}
|
||||
|
||||
XShapeCombineMask (GDK_WINDOW_XDISPLAY (window),
|
||||
@@ -3754,7 +3759,8 @@ gdk_window_shape_combine_region (GdkWindow *window,
|
||||
GdkRegion *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y)
|
||||
{
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
gint xoffset, yoffset;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
@@ -3783,6 +3789,8 @@ gdk_window_shape_combine_region (GdkWindow *window,
|
||||
gint n_rects = 0;
|
||||
XRectangle *xrects = NULL;
|
||||
|
||||
private->shaped = TRUE;
|
||||
|
||||
_gdk_region_get_xrectangles (shape_region,
|
||||
0, 0,
|
||||
&xrects, &n_rects);
|
||||
@@ -3959,6 +3967,12 @@ gdk_x11_window_set_user_time (GdkWindow *window,
|
||||
toplevel->user_time = timestamp_long;
|
||||
}
|
||||
|
||||
#define GDK_SELECTION_MAX_SIZE(display) \
|
||||
MIN(262144, \
|
||||
XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) == 0 \
|
||||
? XMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100 \
|
||||
: XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100)
|
||||
|
||||
/**
|
||||
* gdk_window_set_icon_list:
|
||||
* @window: The #GdkWindow toplevel window to set the icon of.
|
||||
@@ -3987,6 +4001,7 @@ gdk_window_set_icon_list (GdkWindow *window,
|
||||
gint x, y;
|
||||
gint n_channels;
|
||||
GdkDisplay *display;
|
||||
gint n;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@@ -3997,7 +4012,7 @@ gdk_window_set_icon_list (GdkWindow *window,
|
||||
|
||||
l = pixbufs;
|
||||
size = 0;
|
||||
|
||||
n = 0;
|
||||
while (l)
|
||||
{
|
||||
pixbuf = l->data;
|
||||
@@ -4006,8 +4021,16 @@ gdk_window_set_icon_list (GdkWindow *window,
|
||||
width = gdk_pixbuf_get_width (pixbuf);
|
||||
height = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
/* silently ignore overlarge icons */
|
||||
if (size + 2 + width * height > GDK_SELECTION_MAX_SIZE(display))
|
||||
{
|
||||
g_warning ("gdk_window_set_icon_list: icons too large");
|
||||
break;
|
||||
}
|
||||
|
||||
n++;
|
||||
size += 2 + width * height;
|
||||
|
||||
|
||||
l = g_list_next (l);
|
||||
}
|
||||
|
||||
@@ -4015,7 +4038,7 @@ gdk_window_set_icon_list (GdkWindow *window,
|
||||
|
||||
l = pixbufs;
|
||||
p = data;
|
||||
while (l)
|
||||
while (l && n > 0)
|
||||
{
|
||||
pixbuf = l->data;
|
||||
|
||||
@@ -4048,6 +4071,7 @@ gdk_window_set_icon_list (GdkWindow *window,
|
||||
}
|
||||
|
||||
l = g_list_next (l);
|
||||
n--;
|
||||
}
|
||||
|
||||
if (size > 0)
|
||||
|
||||
@@ -201,9 +201,9 @@ init_xft_settings (GdkScreen *screen)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
screen_x11->xft_rgba = subpixel;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!get_double_default (xdisplay, "dpi", &dpi_double))
|
||||
|
||||
+3
-6
@@ -7,17 +7,14 @@ DEVZIP=/tmp/gtk+-dev-@GTK_VERSION@-`date +%Y%m%d`.zip
|
||||
cd @prefix@
|
||||
rm $ZIP
|
||||
|
||||
DLLDIR=lib
|
||||
[ -f bin/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll ] && DLLDIR=bin
|
||||
|
||||
zip $ZIP -@ <<EOF
|
||||
COPYING.LIB-2
|
||||
etc/gtk-2.0/gdk-pixbuf.loaders
|
||||
etc/gtk-2.0/gtkrc
|
||||
etc/gtk-2.0/gtk.immodules
|
||||
$DLLDIR/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
|
||||
$DLLDIR/libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
|
||||
$DLLDIR/libgtk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
|
||||
bin/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
|
||||
bin/libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
|
||||
bin/libgtk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
|
||||
EOF
|
||||
|
||||
zip $ZIP lib/gtk-2.0/@GTK_BINARY_VERSION@/loaders/*.dll lib/gtk-2.0/@GTK_BINARY_VERSION@/immodules/*.dll lib/gtk-2.0/@GTK_BINARY_VERSION@/engines/*.dll
|
||||
|
||||
+2
-2
@@ -636,7 +636,7 @@ gtkmarshal.c: @REBUILD@ gtkmarshal.list
|
||||
gtktypebuiltins.h: stamp-gtktypebuiltins.h
|
||||
@true
|
||||
stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
|
||||
( cd $(srcdir) && glib-mkenums \
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#ifndef __GTK_TYPE_BUILTINS_H__\n#define __GTK_TYPE_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
|
||||
--fprod "/* enumerations from \"@filename@\" */\n" \
|
||||
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
|
||||
@@ -646,7 +646,7 @@ stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
|
||||
&& rm -f xgen-gtbh \
|
||||
&& echo timestamp > $(@F)
|
||||
gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) Makefile
|
||||
( cd $(srcdir) && glib-mkenums \
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"\n#include \"gtkalias.h\"\n" \
|
||||
--ftail "#define __GTK_TYPE_BUILTINS_C__\n#include \"gtkaliasdef.c\"\n" \
|
||||
--fprod "\n/* enumerations from \"@filename@\" */" \
|
||||
|
||||
@@ -438,7 +438,7 @@ static void
|
||||
gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
{
|
||||
GtkAboutDialogPrivate *priv;
|
||||
GtkWidget *vbox, *hbox, *button;
|
||||
GtkWidget *vbox, *hbox, *button, *image;
|
||||
|
||||
/* Data */
|
||||
priv = GTK_ABOUT_DIALOG_GET_PRIVATE (about);
|
||||
@@ -506,7 +506,9 @@ gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CLOSE);
|
||||
|
||||
/* Add the credits button */
|
||||
button = gtk_button_new_from_stock (_("C_redits"));
|
||||
button = gtk_button_new_with_mnemonic (_("C_redits"));
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_button_set_image (GTK_BUTTON (button), image);
|
||||
gtk_widget_set_no_show_all (button, TRUE);
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about)->action_area),
|
||||
button, FALSE, TRUE, 0);
|
||||
|
||||
+3
-2
@@ -955,7 +955,8 @@ connect_proxy (GtkAction *action,
|
||||
G_CALLBACK (gtk_action_sync_button_stock_id),
|
||||
proxy, 0);
|
||||
}
|
||||
else if (GTK_IS_LABEL(GTK_BIN(proxy)->child))
|
||||
else if (GTK_BIN (proxy)->child == NULL ||
|
||||
GTK_IS_LABEL (GTK_BIN (proxy)->child))
|
||||
{
|
||||
/* synchronise the label */
|
||||
g_object_set (proxy,
|
||||
@@ -1500,7 +1501,7 @@ gtk_action_get_accel_path (GtkAction *action)
|
||||
* Since: 2.8
|
||||
*
|
||||
* Returns: the accel closure for this action. The returned closure is
|
||||
* owned by GTK+ must and not be unrefed or modified.
|
||||
* owned by GTK+ and must not be unreffed or modified.
|
||||
*/
|
||||
GClosure *
|
||||
gtk_action_get_accel_closure (GtkAction *action)
|
||||
|
||||
+6
-1
@@ -1845,8 +1845,13 @@ void
|
||||
gtk_button_set_image (GtkButton *button,
|
||||
GtkWidget *image)
|
||||
{
|
||||
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button);
|
||||
GtkButtonPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_BUTTON (button));
|
||||
g_return_if_fail (image == NULL || GTK_IS_WIDGET (image));
|
||||
|
||||
priv = GTK_BUTTON_GET_PRIVATE (button);
|
||||
|
||||
priv->image = image;
|
||||
priv->image_is_stock = (image == NULL);
|
||||
|
||||
|
||||
+22
-5
@@ -565,8 +565,15 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
time_t tmp_time;
|
||||
GtkCalendarPrivate *priv;
|
||||
gchar *year_before;
|
||||
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
|
||||
gchar *langinfo;
|
||||
gint week_1stday = 0;
|
||||
gint first_weekday = 1;
|
||||
guint week_origin;
|
||||
#else
|
||||
gchar *week_start;
|
||||
|
||||
#endif
|
||||
|
||||
priv = calendar->priv = G_TYPE_INSTANCE_GET_PRIVATE (calendar,
|
||||
GTK_TYPE_CALENDAR,
|
||||
GtkCalendarPrivate);
|
||||
@@ -595,8 +602,6 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
calendar->month = tm->tm_mon;
|
||||
calendar->year = 1900 + tm->tm_year;
|
||||
|
||||
calendar_compute_days (calendar);
|
||||
|
||||
for (i=0;i<31;i++)
|
||||
calendar->marked_date[i] = FALSE;
|
||||
calendar->num_marked_dates = 0;
|
||||
@@ -651,8 +656,18 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
g_warning ("Whoever translated calendar:MY did so wrongly.\n");
|
||||
|
||||
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
|
||||
week_start = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
|
||||
priv->week_start = *((unsigned char *) week_start) % 7 - 1;
|
||||
langinfo = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
|
||||
first_weekday = langinfo[0];
|
||||
langinfo = nl_langinfo (_NL_TIME_WEEK_1STDAY);
|
||||
week_origin = GPOINTER_TO_INT (langinfo);
|
||||
if (week_origin == 19971130) /* Sunday */
|
||||
week_1stday = 0;
|
||||
else if (week_origin == 19971201) /* Monday */
|
||||
week_1stday = 1;
|
||||
else
|
||||
g_warning ("Unknown value of _NL_TIME_WEEK_1STDAY.\n");
|
||||
|
||||
priv->week_start = (week_1stday + first_weekday - 1) % 7;
|
||||
#else
|
||||
/* Translate to calendar:week_start:0 if you want Sunday to be the
|
||||
* first day of the week to calendar:week_start:1 if you want Monday
|
||||
@@ -671,6 +686,8 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
priv->week_start = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
calendar_compute_days (calendar);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+64
-31
@@ -238,6 +238,10 @@ gtk_cell_renderer_pixbuf_finalize (GObject *object)
|
||||
|
||||
if (cellpixbuf->pixbuf)
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
if (cellpixbuf->pixbuf_expander_open)
|
||||
g_object_unref (cellpixbuf->pixbuf_expander_open);
|
||||
if (cellpixbuf->pixbuf_expander_closed)
|
||||
g_object_unref (cellpixbuf->pixbuf_expander_closed);
|
||||
|
||||
g_free (priv->stock_id);
|
||||
g_free (priv->stock_detail);
|
||||
@@ -260,16 +264,13 @@ gtk_cell_renderer_pixbuf_get_property (GObject *object,
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_PIXBUF:
|
||||
g_value_set_object (value,
|
||||
cellpixbuf->pixbuf ? G_OBJECT (cellpixbuf->pixbuf) : NULL);
|
||||
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf));
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_OPEN:
|
||||
g_value_set_object (value,
|
||||
cellpixbuf->pixbuf_expander_open ? G_OBJECT (cellpixbuf->pixbuf_expander_open) : NULL);
|
||||
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf_expander_open));
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_CLOSED:
|
||||
g_value_set_object (value,
|
||||
cellpixbuf->pixbuf_expander_closed ? G_OBJECT (cellpixbuf->pixbuf_expander_closed) : NULL);
|
||||
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf_expander_closed));
|
||||
break;
|
||||
case PROP_STOCK_ID:
|
||||
g_value_set_string (value, priv->stock_id);
|
||||
@@ -299,7 +300,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkCellRendererPixbuf *cellpixbuf = GTK_CELL_RENDERER_PIXBUF (object);
|
||||
GtkCellRendererPixbufPrivate *priv;
|
||||
|
||||
@@ -308,28 +308,34 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_PIXBUF:
|
||||
pixbuf = (GdkPixbuf*) g_value_get_object (value);
|
||||
if (pixbuf)
|
||||
g_object_ref (pixbuf);
|
||||
if (cellpixbuf->pixbuf)
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = pixbuf;
|
||||
cellpixbuf->pixbuf = (GdkPixbuf*) g_value_dup_object (value);
|
||||
if (cellpixbuf->pixbuf)
|
||||
{
|
||||
if (priv->stock_id)
|
||||
{
|
||||
g_free (priv->stock_id);
|
||||
priv->stock_id = NULL;
|
||||
g_object_notify (object, "stock-id");
|
||||
}
|
||||
if (priv->icon_name)
|
||||
{
|
||||
g_free (priv->icon_name);
|
||||
priv->icon_name = NULL;
|
||||
g_object_notify (object, "icon-name");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_OPEN:
|
||||
pixbuf = (GdkPixbuf*) g_value_get_object (value);
|
||||
if (pixbuf)
|
||||
g_object_ref (pixbuf);
|
||||
if (cellpixbuf->pixbuf_expander_open)
|
||||
g_object_unref (cellpixbuf->pixbuf_expander_open);
|
||||
cellpixbuf->pixbuf_expander_open = pixbuf;
|
||||
cellpixbuf->pixbuf_expander_open = (GdkPixbuf*) g_value_dup_object (value);
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_CLOSED:
|
||||
pixbuf = (GdkPixbuf*) g_value_get_object (value);
|
||||
if (pixbuf)
|
||||
g_object_ref (pixbuf);
|
||||
if (cellpixbuf->pixbuf_expander_closed)
|
||||
g_object_unref (cellpixbuf->pixbuf_expander_closed);
|
||||
cellpixbuf->pixbuf_expander_closed = pixbuf;
|
||||
cellpixbuf->pixbuf_expander_closed = (GdkPixbuf*) g_value_dup_object (value);
|
||||
break;
|
||||
case PROP_STOCK_ID:
|
||||
if (priv->stock_id)
|
||||
@@ -338,12 +344,26 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
{
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = NULL;
|
||||
g_object_notify (object, "pixbuf");
|
||||
}
|
||||
g_free (priv->stock_id);
|
||||
g_free (priv->icon_name);
|
||||
priv->icon_name = NULL;
|
||||
}
|
||||
priv->stock_id = g_strdup (g_value_get_string (value));
|
||||
priv->stock_id = g_value_dup_string (value);
|
||||
if (priv->stock_id)
|
||||
{
|
||||
if (cellpixbuf->pixbuf)
|
||||
{
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = NULL;
|
||||
g_object_notify (object, "pixbuf");
|
||||
}
|
||||
if (priv->icon_name)
|
||||
{
|
||||
g_free (priv->icon_name);
|
||||
priv->icon_name = NULL;
|
||||
g_object_notify (object, "icon-name");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PROP_STOCK_SIZE:
|
||||
priv->stock_size = g_value_get_uint (value);
|
||||
@@ -351,7 +371,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
case PROP_STOCK_DETAIL:
|
||||
if (priv->stock_detail)
|
||||
g_free (priv->stock_detail);
|
||||
priv->stock_detail = g_strdup (g_value_get_string (value));
|
||||
priv->stock_detail = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_ICON_NAME:
|
||||
if (priv->icon_name)
|
||||
@@ -360,11 +380,26 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
{
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = NULL;
|
||||
g_object_notify (object, "pixbuf");
|
||||
}
|
||||
g_free (priv->stock_id);
|
||||
g_free (priv->icon_name);
|
||||
}
|
||||
priv->icon_name = g_strdup (g_value_get_string (value));
|
||||
priv->icon_name = g_value_dup_string (value);
|
||||
if (priv->icon_name)
|
||||
{
|
||||
if (cellpixbuf->pixbuf)
|
||||
{
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = NULL;
|
||||
g_object_notify (object, "pixbuf");
|
||||
}
|
||||
if (priv->stock_id)
|
||||
{
|
||||
g_free (priv->stock_id);
|
||||
priv->stock_id = NULL;
|
||||
g_object_notify (object, "stock-id");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PROP_FOLLOW_STATE:
|
||||
priv->follow_state = g_value_get_boolean (value);
|
||||
@@ -373,12 +408,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
|
||||
if (cellpixbuf->pixbuf && priv->stock_id)
|
||||
{
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -415,6 +444,8 @@ gtk_cell_renderer_pixbuf_create_stock_pixbuf (GtkCellRendererPixbuf *cellpixbuf,
|
||||
priv->stock_id,
|
||||
priv->stock_size,
|
||||
priv->stock_detail);
|
||||
|
||||
g_object_notify (G_OBJECT (cellpixbuf), "pixbuf");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -454,6 +485,8 @@ gtk_cell_renderer_pixbuf_create_named_icon_pixbuf (GtkCellRendererPixbuf *cellpi
|
||||
g_warning ("could not load image: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (cellpixbuf), "pixbuf");
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
|
||||
@@ -1822,9 +1822,9 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
|
||||
"editing_done",
|
||||
G_CALLBACK (gtk_cell_renderer_text_editing_done),
|
||||
celltext);
|
||||
priv->focus_out_id = g_signal_connect (priv->entry, "focus_out_event",
|
||||
G_CALLBACK (gtk_cell_renderer_text_focus_out_event),
|
||||
celltext);
|
||||
priv->focus_out_id = g_signal_connect_after (priv->entry, "focus_out_event",
|
||||
G_CALLBACK (gtk_cell_renderer_text_focus_out_event),
|
||||
celltext);
|
||||
priv->populate_popup_id =
|
||||
g_signal_connect (priv->entry, "populate_popup",
|
||||
G_CALLBACK (gtk_cell_renderer_text_populate_popup),
|
||||
|
||||
+2
-1
@@ -1032,7 +1032,8 @@ request_image_received_func (GtkClipboard *clipboard,
|
||||
|
||||
info->callback (clipboard, result, info->user_data);
|
||||
g_free (info);
|
||||
g_object_unref (result);
|
||||
if (result)
|
||||
g_object_unref (result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3495,6 +3495,9 @@ gtk_combo_box_key_press (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (state != 0)
|
||||
return FALSE;
|
||||
|
||||
switch (event->keyval)
|
||||
{
|
||||
case GDK_Down:
|
||||
|
||||
+2
-2
@@ -609,7 +609,7 @@ gtk_drag_get_cursor (GdkDisplay *display,
|
||||
if (!cursor_pixbuf)
|
||||
{
|
||||
cursor_pixbuf = g_object_ref (drag_cursors[i].pixbuf);
|
||||
icon_anchor = GTK_ANCHOR_NORTH;
|
||||
icon_anchor = GTK_ANCHOR_NORTH_WEST;
|
||||
icon_x = icon_y = -2;
|
||||
}
|
||||
else
|
||||
@@ -3011,7 +3011,7 @@ gtk_drag_set_icon_pixmap (GdkDragContext *context,
|
||||
* @hot_x: the X offset of the hotspot within the icon
|
||||
* @hot_y: the Y offset of the hotspot within the icon
|
||||
*
|
||||
* Sets the icon for the window from a named themed icon. See
|
||||
* Sets the icon for a given drag from a named themed icon. See
|
||||
* the docs for #GtkIconTheme for more details. Note that the
|
||||
* size of the icon depends on the icon theme (the icon is
|
||||
* loaded at the symbolic size #GTK_ICON_SIZE_DND), thus
|
||||
|
||||
@@ -1049,6 +1049,18 @@ gtk_entry_destroy (GtkObject *object)
|
||||
gtk_entry_reset_im_context (entry);
|
||||
gtk_entry_reset_layout (entry);
|
||||
|
||||
if (entry->blink_timeout)
|
||||
{
|
||||
g_source_remove (entry->blink_timeout);
|
||||
entry->blink_timeout = 0;
|
||||
}
|
||||
|
||||
if (entry->recompute_idle)
|
||||
{
|
||||
g_source_remove (entry->recompute_idle);
|
||||
entry->recompute_idle = 0;
|
||||
}
|
||||
|
||||
if (!entry->visible)
|
||||
{
|
||||
/* We want to trash the text here because the entry might be leaked. */
|
||||
|
||||
@@ -1387,7 +1387,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
else if (x + popup_req.width > monitor.x + monitor.width)
|
||||
x = monitor.x + monitor.width - popup_req.width;
|
||||
|
||||
if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height)
|
||||
if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height ||
|
||||
y - monitor.y < (monitor.y + monitor.height) - (y + entry_req.height))
|
||||
{
|
||||
y += entry_req.height;
|
||||
above = FALSE;
|
||||
@@ -1416,6 +1417,7 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
{
|
||||
GtkTreeViewColumn *column;
|
||||
GList *renderers;
|
||||
GtkWidget *toplevel;
|
||||
|
||||
if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
|
||||
return;
|
||||
@@ -1423,6 +1425,9 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
if (!GTK_WIDGET_MAPPED (completion->priv->entry))
|
||||
return;
|
||||
|
||||
if (!GTK_WIDGET_HAS_FOCUS (completion->priv->entry))
|
||||
return;
|
||||
|
||||
completion->priv->ignore_enter = TRUE;
|
||||
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0);
|
||||
@@ -1437,6 +1442,11 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
|
||||
_gtk_entry_completion_resize_popup (completion);
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (completion->priv->entry);
|
||||
if (GTK_IS_WINDOW (toplevel))
|
||||
gtk_window_group_add_window (_gtk_window_get_group (GTK_WINDOW (toplevel)),
|
||||
GTK_WINDOW (completion->priv->popup_window));
|
||||
|
||||
gtk_widget_show (completion->priv->popup_window);
|
||||
|
||||
gtk_grab_add (completion->priv->popup_window);
|
||||
@@ -1552,7 +1562,7 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion,
|
||||
gint pos = prefix_len;
|
||||
|
||||
gtk_editable_insert_text (GTK_EDITABLE (completion->priv->entry),
|
||||
prefix + key_len, -1, &pos);
|
||||
prefix + strlen (key), -1, &pos);
|
||||
gtk_editable_select_region (GTK_EDITABLE (completion->priv->entry),
|
||||
key_len, prefix_len);
|
||||
|
||||
|
||||
+19
-6
@@ -260,7 +260,16 @@ gtk_file_chooser_class_init (gpointer g_iface)
|
||||
P_("Whether the hidden files and folders should be displayed"),
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
|
||||
/**
|
||||
* GtkFileChooser:do-overwrite-confirmation:
|
||||
*
|
||||
* Whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE
|
||||
* will present an overwrite confirmation dialog if the user
|
||||
* selects a file name that already exists.
|
||||
*
|
||||
* Since: 2.8
|
||||
*/
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("do-overwrite-confirmation",
|
||||
P_("Do overwrite confirmation"),
|
||||
@@ -691,9 +700,11 @@ gtk_file_chooser_set_current_folder (GtkFileChooser *chooser,
|
||||
* Gets the current folder of @chooser as a local filename.
|
||||
* See gtk_file_chooser_set_current_folder().
|
||||
*
|
||||
* Return value: the full path of the current folder, or %NULL
|
||||
* if the current path cannot be represented as a local filename.
|
||||
* Free with g_free().
|
||||
* Return value: the full path of the current folder, or %NULL if the current
|
||||
* path cannot be represented as a local filename. Free with g_free(). This
|
||||
* function will also return %NULL if the file chooser was unable to load the
|
||||
* last folder that was requested from it; for example, as would be for calling
|
||||
* gtk_file_chooser_set_current_folder() on a nonexistent folder.
|
||||
*
|
||||
* Since: 2.4
|
||||
**/
|
||||
@@ -1010,8 +1021,10 @@ gtk_file_chooser_set_current_folder_uri (GtkFileChooser *chooser,
|
||||
* Gets the current folder of @chooser as an URI.
|
||||
* See gtk_file_chooser_set_current_folder_uri().
|
||||
*
|
||||
* Return value: the URI for the current folder.
|
||||
* Free with g_free().
|
||||
* Return value: the URI for the current folder. Free with g_free(). This
|
||||
* function will also return %NULL if the file chooser was unable to load the
|
||||
* last folder that was requested from it; for example, as would be for calling
|
||||
* gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
|
||||
@@ -155,6 +155,9 @@ struct _GtkFileChooserButtonPrivate
|
||||
|
||||
/* Used for hiding/showing the dialog when the button is hidden */
|
||||
guint8 active : 1;
|
||||
|
||||
/* Used to track whether we need to set a default current folder on ::map() */
|
||||
guint8 folder_has_been_set : 1;
|
||||
};
|
||||
|
||||
|
||||
@@ -211,6 +214,7 @@ static void gtk_file_chooser_button_show_all (GtkWidget *wi
|
||||
static void gtk_file_chooser_button_hide_all (GtkWidget *widget);
|
||||
static void gtk_file_chooser_button_show (GtkWidget *widget);
|
||||
static void gtk_file_chooser_button_hide (GtkWidget *widget);
|
||||
static void gtk_file_chooser_button_map (GtkWidget *widget);
|
||||
static gboolean gtk_file_chooser_button_mnemonic_activate (GtkWidget *widget,
|
||||
gboolean group_cycling);
|
||||
static void gtk_file_chooser_button_style_set (GtkWidget *widget,
|
||||
@@ -322,6 +326,7 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
|
||||
widget_class->hide_all = gtk_file_chooser_button_hide_all;
|
||||
widget_class->show = gtk_file_chooser_button_show;
|
||||
widget_class->hide = gtk_file_chooser_button_hide;
|
||||
widget_class->map = gtk_file_chooser_button_map;
|
||||
widget_class->style_set = gtk_file_chooser_button_style_set;
|
||||
widget_class->screen_changed = gtk_file_chooser_button_screen_changed;
|
||||
widget_class->mnemonic_activate = gtk_file_chooser_button_mnemonic_activate;
|
||||
@@ -593,6 +598,7 @@ gtk_file_chooser_button_constructor (GType type,
|
||||
GObject *object;
|
||||
GtkFileChooserButtonPrivate *priv;
|
||||
GSList *list;
|
||||
char *current_folder;
|
||||
|
||||
object = (*G_OBJECT_CLASS (gtk_file_chooser_button_parent_class)->constructor) (type,
|
||||
n_params,
|
||||
@@ -627,6 +633,13 @@ gtk_file_chooser_button_constructor (GType type,
|
||||
-1);
|
||||
}
|
||||
|
||||
current_folder = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (priv->dialog));
|
||||
if (current_folder != NULL)
|
||||
{
|
||||
priv->folder_has_been_set = TRUE;
|
||||
g_free (current_folder);
|
||||
}
|
||||
|
||||
g_free (priv->backend);
|
||||
priv->backend = NULL;
|
||||
|
||||
@@ -1013,6 +1026,28 @@ gtk_file_chooser_button_hide (GtkWidget *widget)
|
||||
(*GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->hide) (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_chooser_button_map (GtkWidget *widget)
|
||||
{
|
||||
GtkFileChooserButtonPrivate *priv;
|
||||
|
||||
priv = GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE (widget);
|
||||
|
||||
if (!priv->folder_has_been_set)
|
||||
{
|
||||
char *current_working_dir;
|
||||
|
||||
current_working_dir = g_get_current_dir ();
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (widget), current_working_dir);
|
||||
g_free (current_working_dir);
|
||||
|
||||
priv->folder_has_been_set = TRUE;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map)
|
||||
(*GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map) (widget);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_file_chooser_button_mnemonic_activate (GtkWidget *widget,
|
||||
gboolean group_cycling)
|
||||
@@ -1959,10 +1994,21 @@ open_dialog (GtkFileChooserButton *button)
|
||||
|
||||
if (GTK_WIDGET_TOPLEVEL (toplevel) && GTK_IS_WINDOW (toplevel))
|
||||
{
|
||||
if (GTK_WINDOW (toplevel) != gtk_window_get_transient_for (GTK_WINDOW (priv->dialog)))
|
||||
gtk_window_set_transient_for (GTK_WINDOW (priv->dialog),
|
||||
GTK_WINDOW (toplevel));
|
||||
GtkWindow *transient_parent = gtk_window_get_transient_for (GTK_WINDOW (priv->dialog));
|
||||
|
||||
if (GTK_WINDOW (toplevel) != transient_parent)
|
||||
{
|
||||
if (transient_parent && transient_parent->group)
|
||||
gtk_window_group_remove_window (transient_parent->group,
|
||||
GTK_WINDOW (priv->dialog));
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (priv->dialog),
|
||||
GTK_WINDOW (toplevel));
|
||||
if (GTK_WINDOW (toplevel)->group)
|
||||
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
|
||||
GTK_WINDOW (priv->dialog));
|
||||
}
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (priv->dialog),
|
||||
gtk_window_get_modal (GTK_WINDOW (toplevel)));
|
||||
}
|
||||
@@ -2064,7 +2110,15 @@ static void
|
||||
dialog_current_folder_changed_cb (GtkFileChooser *dialog,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_signal_emit_by_name (user_data, "current-folder-changed");
|
||||
GtkFileChooserButton *button;
|
||||
GtkFileChooserButtonPrivate *priv;
|
||||
|
||||
button = GTK_FILE_CHOOSER_BUTTON (user_data);
|
||||
priv = GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE (button);
|
||||
|
||||
priv->folder_has_been_set = TRUE;
|
||||
|
||||
g_signal_emit_by_name (button, "current-folder-changed");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2267,7 +2321,7 @@ gtk_file_chooser_button_new_with_backend (const gchar *title,
|
||||
*
|
||||
* Creates a #GtkFileChooserButton widget which uses @dialog as it's
|
||||
* file-picking window. Note that @dialog must be a #GtkFileChooserDialog (or
|
||||
* subclass).
|
||||
* subclass) and must not have %GTK_DIALOG_DESTROY_WITH_PARENT set.
|
||||
*
|
||||
* Returns: a new button widget.
|
||||
*
|
||||
|
||||
+148
-32
@@ -83,7 +83,7 @@
|
||||
|
||||
/* Profiling stuff */
|
||||
|
||||
#define PROFILE_FILE_CHOOSER
|
||||
#undef PROFILE_FILE_CHOOSER
|
||||
#ifdef PROFILE_FILE_CHOOSER
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@@ -152,6 +152,12 @@ typedef enum {
|
||||
LOAD_FINISHED /* Model is fully loaded and inserted into the tree */
|
||||
} LoadState;
|
||||
|
||||
typedef enum {
|
||||
RELOAD_EMPTY, /* No folder has been set */
|
||||
RELOAD_HAS_FOLDER, /* We have a folder, although it may not be completely loaded yet; no need to reload */
|
||||
RELOAD_WAS_UNMAPPED /* We had a folder but got unmapped; reload is needed */
|
||||
} ReloadState;
|
||||
|
||||
#define MAX_LOADING_TIME 500
|
||||
|
||||
struct _GtkFileChooserDefaultClass
|
||||
@@ -206,6 +212,7 @@ struct _GtkFileChooserDefault
|
||||
GtkTreeModelSort *sort_model;
|
||||
|
||||
LoadState load_state;
|
||||
ReloadState reload_state;
|
||||
guint load_timeout_id;
|
||||
|
||||
GSList *pending_select_paths;
|
||||
@@ -373,6 +380,7 @@ static void gtk_file_chooser_default_get_property (GObject *ob
|
||||
static void gtk_file_chooser_default_dispose (GObject *object);
|
||||
static void gtk_file_chooser_default_show_all (GtkWidget *widget);
|
||||
static void gtk_file_chooser_default_map (GtkWidget *widget);
|
||||
static void gtk_file_chooser_default_unmap (GtkWidget *widget);
|
||||
static void gtk_file_chooser_default_hierarchy_changed (GtkWidget *widget,
|
||||
GtkWidget *previous_toplevel);
|
||||
static void gtk_file_chooser_default_style_set (GtkWidget *widget,
|
||||
@@ -480,6 +488,7 @@ static void select_func (GtkFileSystemModel *model,
|
||||
|
||||
static void path_bar_clicked (GtkPathBar *path_bar,
|
||||
GtkFilePath *file_path,
|
||||
GtkFilePath *child_path,
|
||||
gboolean child_is_hidden,
|
||||
GtkFileChooserDefault *impl);
|
||||
|
||||
@@ -615,6 +624,7 @@ gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
|
||||
|
||||
widget_class->show_all = gtk_file_chooser_default_show_all;
|
||||
widget_class->map = gtk_file_chooser_default_map;
|
||||
widget_class->unmap = gtk_file_chooser_default_unmap;
|
||||
widget_class->hierarchy_changed = gtk_file_chooser_default_hierarchy_changed;
|
||||
widget_class->style_set = gtk_file_chooser_default_style_set;
|
||||
widget_class->screen_changed = gtk_file_chooser_default_screen_changed;
|
||||
@@ -745,6 +755,7 @@ gtk_file_chooser_default_init (GtkFileChooserDefault *impl)
|
||||
impl->show_hidden = FALSE;
|
||||
impl->icon_size = FALLBACK_ICON_SIZE;
|
||||
impl->load_state = LOAD_EMPTY;
|
||||
impl->reload_state = RELOAD_EMPTY;
|
||||
impl->pending_select_paths = NULL;
|
||||
|
||||
gtk_box_set_spacing (GTK_BOX (impl), 12);
|
||||
@@ -1420,7 +1431,7 @@ shortcuts_append_home (GtkFileChooserDefault *impl)
|
||||
home_path = gtk_file_system_filename_to_path (impl->file_system, home);
|
||||
|
||||
error = NULL;
|
||||
impl->has_home = shortcuts_insert_path (impl, -1, FALSE, NULL, home_path, _("Home"), FALSE, &error);
|
||||
impl->has_home = shortcuts_insert_path (impl, -1, FALSE, NULL, home_path, NULL, FALSE, &error);
|
||||
if (!impl->has_home)
|
||||
error_getting_info_dialog (impl, home_path, error);
|
||||
|
||||
@@ -1616,14 +1627,22 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
|
||||
|
||||
if (impl->local_only)
|
||||
{
|
||||
GtkFilePath *base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
|
||||
gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
|
||||
gtk_file_path_free (base_path);
|
||||
|
||||
if (!is_local)
|
||||
if (gtk_file_system_volume_get_is_mounted (impl->file_system, volume))
|
||||
{
|
||||
gtk_file_system_volume_free (impl->file_system, volume);
|
||||
continue;
|
||||
GtkFilePath *base_path;
|
||||
|
||||
base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
|
||||
if (base_path != NULL)
|
||||
{
|
||||
gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
|
||||
gtk_file_path_free (base_path);
|
||||
|
||||
if (!is_local)
|
||||
{
|
||||
gtk_file_system_volume_free (impl->file_system, volume);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1798,7 +1817,7 @@ shortcuts_add_current_folder (GtkFileChooserDefault *impl)
|
||||
impl->shortcuts_current_folder_active = success;
|
||||
}
|
||||
|
||||
if (success)
|
||||
if (success && impl->save_folder_combo != NULL)
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (impl->save_folder_combo), pos);
|
||||
}
|
||||
|
||||
@@ -1859,7 +1878,6 @@ shortcuts_model_create (GtkFileChooserDefault *impl)
|
||||
shortcuts_append_home (impl);
|
||||
shortcuts_append_desktop (impl);
|
||||
shortcuts_add_volumes (impl);
|
||||
shortcuts_add_bookmarks (impl);
|
||||
}
|
||||
|
||||
impl->shortcuts_filter_model = shortcuts_model_filter_new (impl,
|
||||
@@ -2888,6 +2906,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
|
||||
const GtkFilePath *file_path;
|
||||
GtkFilePath *file_path_copy;
|
||||
GError *error;
|
||||
gchar *name;
|
||||
|
||||
/* Get the selected path */
|
||||
|
||||
@@ -2903,12 +2922,13 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
|
||||
g_assert (old_position >= 0 && old_position < impl->num_bookmarks);
|
||||
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), &iter,
|
||||
SHORTCUTS_COL_NAME, &name,
|
||||
SHORTCUTS_COL_DATA, &col_data,
|
||||
SHORTCUTS_COL_IS_VOLUME, &is_volume,
|
||||
-1);
|
||||
g_assert (col_data != NULL);
|
||||
g_assert (!is_volume);
|
||||
|
||||
|
||||
file_path = col_data;
|
||||
file_path_copy = gtk_file_path_copy (file_path); /* removal below will free file_path, so we need a copy */
|
||||
|
||||
@@ -2922,7 +2942,10 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
|
||||
|
||||
error = NULL;
|
||||
if (gtk_file_system_remove_bookmark (impl->file_system, file_path_copy, &error))
|
||||
shortcuts_add_bookmark_from_path (impl, file_path_copy, new_position);
|
||||
{
|
||||
shortcuts_add_bookmark_from_path (impl, file_path_copy, new_position);
|
||||
gtk_file_system_set_bookmark_label (impl->file_system, file_path_copy, name);
|
||||
}
|
||||
else
|
||||
error_adding_bookmark_dialog (impl, file_path_copy, error);
|
||||
|
||||
@@ -3905,6 +3928,7 @@ file_pane_create (GtkFileChooserDefault *impl,
|
||||
|
||||
return vbox;
|
||||
}
|
||||
|
||||
/* Callback used when the "Browse for more folders" expander is toggled */
|
||||
static void
|
||||
expander_changed_cb (GtkExpander *expander,
|
||||
@@ -3968,7 +3992,7 @@ save_folder_combo_create (GtkFileChooserDefault *impl)
|
||||
}
|
||||
|
||||
/* Creates the widgets specific to Save mode */
|
||||
static GtkWidget *
|
||||
static void
|
||||
save_widgets_create (GtkFileChooserDefault *impl)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
@@ -3976,6 +4000,9 @@ save_widgets_create (GtkFileChooserDefault *impl)
|
||||
GtkWidget *widget;
|
||||
GtkWidget *alignment;
|
||||
|
||||
if (impl->save_widgets != NULL)
|
||||
return;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
@@ -4033,7 +4060,25 @@ save_widgets_create (GtkFileChooserDefault *impl)
|
||||
impl);
|
||||
gtk_widget_show_all (alignment);
|
||||
|
||||
return vbox;
|
||||
impl->save_widgets = vbox;
|
||||
gtk_box_pack_start (GTK_BOX (impl), impl->save_widgets, FALSE, FALSE, 0);
|
||||
gtk_box_reorder_child (GTK_BOX (impl), impl->save_widgets, 0);
|
||||
gtk_widget_show (impl->save_widgets);
|
||||
}
|
||||
|
||||
/* Destroys the widgets specific to Save mode */
|
||||
static void
|
||||
save_widgets_destroy (GtkFileChooserDefault *impl)
|
||||
{
|
||||
if (impl->save_widgets == NULL)
|
||||
return;
|
||||
|
||||
gtk_widget_destroy (impl->save_widgets);
|
||||
impl->save_widgets = NULL;
|
||||
impl->save_file_name_entry = NULL;
|
||||
impl->save_folder_label = NULL;
|
||||
impl->save_folder_combo = NULL;
|
||||
impl->save_expander = NULL;
|
||||
}
|
||||
|
||||
/* Creates the main hpaned with the widgets shared by Open and Save mode */
|
||||
@@ -4086,10 +4131,6 @@ gtk_file_chooser_default_constructor (GType type,
|
||||
|
||||
shortcuts_model_create (impl);
|
||||
|
||||
/* Widgets for Save mode */
|
||||
impl->save_widgets = save_widgets_create (impl);
|
||||
gtk_box_pack_start (GTK_BOX (impl), impl->save_widgets, FALSE, FALSE, 0);
|
||||
|
||||
/* The browse widgets */
|
||||
impl->browse_widgets = browse_widgets_create (impl);
|
||||
gtk_box_pack_start (GTK_BOX (impl), impl->browse_widgets, TRUE, TRUE, 0);
|
||||
@@ -4278,7 +4319,7 @@ update_appearance (GtkFileChooserDefault *impl)
|
||||
{
|
||||
const char *text;
|
||||
|
||||
gtk_widget_show (impl->save_widgets);
|
||||
save_widgets_create (impl);
|
||||
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
||||
text = _("Save in _folder:");
|
||||
@@ -4287,6 +4328,8 @@ update_appearance (GtkFileChooserDefault *impl)
|
||||
|
||||
gtk_label_set_text_with_mnemonic (GTK_LABEL (impl->save_folder_label), text);
|
||||
|
||||
_gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), impl->action);
|
||||
|
||||
if (gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
|
||||
{
|
||||
gtk_widget_set_sensitive (impl->save_folder_label, FALSE);
|
||||
@@ -4312,7 +4355,7 @@ update_appearance (GtkFileChooserDefault *impl)
|
||||
else if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||
impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||
{
|
||||
gtk_widget_hide (impl->save_widgets);
|
||||
save_widgets_destroy (impl);
|
||||
gtk_widget_show (impl->browse_widgets);
|
||||
}
|
||||
|
||||
@@ -4321,6 +4364,9 @@ update_appearance (GtkFileChooserDefault *impl)
|
||||
else
|
||||
gtk_widget_show (impl->browse_new_folder_button);
|
||||
|
||||
/* This *is* needed; we need to redraw the file list because the "sensitivity"
|
||||
* of files may change depending whether we are in a file or folder-only mode.
|
||||
*/
|
||||
gtk_widget_queue_draw (impl->browse_files_tree_view);
|
||||
|
||||
g_signal_emit_by_name (impl, "default-size-changed");
|
||||
@@ -4356,10 +4402,6 @@ gtk_file_chooser_default_set_property (GObject *object,
|
||||
impl->action = action;
|
||||
update_appearance (impl);
|
||||
}
|
||||
|
||||
if (impl->save_file_name_entry)
|
||||
_gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry),
|
||||
action);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4724,6 +4766,7 @@ static void
|
||||
gtk_file_chooser_default_map (GtkWidget *widget)
|
||||
{
|
||||
GtkFileChooserDefault *impl;
|
||||
char *current_working_dir;
|
||||
|
||||
profile_start ("start", NULL);
|
||||
|
||||
@@ -4731,10 +4774,29 @@ gtk_file_chooser_default_map (GtkWidget *widget)
|
||||
|
||||
GTK_WIDGET_CLASS (parent_class)->map (widget);
|
||||
|
||||
if (impl->current_folder)
|
||||
switch (impl->reload_state)
|
||||
{
|
||||
case RELOAD_EMPTY:
|
||||
/* The user didn't explicitly give us a folder to display, so we'll use the cwd */
|
||||
current_working_dir = g_get_current_dir ();
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (impl), current_working_dir);
|
||||
g_free (current_working_dir);
|
||||
break;
|
||||
|
||||
case RELOAD_HAS_FOLDER:
|
||||
/* Nothing; we are already loading or loaded, so we don't need to reload */
|
||||
break;
|
||||
|
||||
case RELOAD_WAS_UNMAPPED:
|
||||
/* Just reload the current folder */
|
||||
g_assert (impl->current_folder != NULL);
|
||||
|
||||
pending_select_paths_store_selection (impl);
|
||||
change_folder_and_display_error (impl, impl->current_folder);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
bookmarks_changed_cb (impl->file_system, impl);
|
||||
@@ -4742,6 +4804,19 @@ gtk_file_chooser_default_map (GtkWidget *widget)
|
||||
profile_end ("end", NULL);
|
||||
}
|
||||
|
||||
/* GtkWidget::unmap method */
|
||||
static void
|
||||
gtk_file_chooser_default_unmap (GtkWidget *widget)
|
||||
{
|
||||
GtkFileChooserDefault *impl;
|
||||
|
||||
impl = GTK_FILE_CHOOSER_DEFAULT (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
|
||||
|
||||
impl->reload_state = RELOAD_WAS_UNMAPPED;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
list_model_filter_func (GtkFileSystemModel *model,
|
||||
GtkFilePath *path,
|
||||
@@ -5268,7 +5343,14 @@ update_chooser_entry (GtkFileChooserDefault *impl)
|
||||
|
||||
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
{
|
||||
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), "");
|
||||
/* If nothing is selected, we only reset the file name entry if we are in
|
||||
* CREATE_FOLDER mode. In SAVE mode, nothing will be selected when the
|
||||
* user starts typeahead in the treeview, and we don't want to clear the
|
||||
* file name entry in that case --- the user could be typing-ahead to look
|
||||
* for a folder name. See http://bugzilla.gnome.org/show_bug.cgi?id=308332
|
||||
*/
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
|
||||
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), "");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5340,6 +5422,8 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
|
||||
gtk_file_path_free (impl->current_folder);
|
||||
|
||||
impl->current_folder = gtk_file_path_copy (path);
|
||||
|
||||
impl->reload_state = RELOAD_HAS_FOLDER;
|
||||
}
|
||||
|
||||
/* Update the widgets that may trigger a folder change themselves. */
|
||||
@@ -5355,8 +5439,9 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
|
||||
|
||||
/* Set the folder on the save entry */
|
||||
|
||||
_gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry),
|
||||
impl->current_folder);
|
||||
if (impl->save_file_name_entry)
|
||||
_gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry),
|
||||
impl->current_folder);
|
||||
|
||||
/* Create a new list model. This is slightly evil; we store the result value
|
||||
* but perform more actions rather than returning immediately even if it
|
||||
@@ -5384,6 +5469,21 @@ gtk_file_chooser_default_get_current_folder (GtkFileChooser *chooser)
|
||||
{
|
||||
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
|
||||
|
||||
if (impl->reload_state == RELOAD_EMPTY)
|
||||
{
|
||||
char *current_working_dir;
|
||||
GtkFilePath *path;
|
||||
|
||||
/* We are unmapped, or we had an error while loading the last folder. We'll return
|
||||
* the $cwd since once we get (re)mapped, we'll load $cwd anyway unless the caller
|
||||
* explicitly calls set_current_folder() on us.
|
||||
*/
|
||||
current_working_dir = g_get_current_dir ();
|
||||
path = gtk_file_system_filename_to_path (impl->file_system, current_working_dir);
|
||||
g_free (current_working_dir);
|
||||
return path;
|
||||
}
|
||||
|
||||
return gtk_file_path_copy (impl->current_folder);
|
||||
}
|
||||
|
||||
@@ -6335,7 +6435,7 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
else if (current_focus == impl->save_file_name_entry)
|
||||
else if ((impl->save_file_name_entry != NULL) && (current_focus == impl->save_file_name_entry))
|
||||
{
|
||||
GtkFilePath *path;
|
||||
gboolean is_well_formed, is_empty, is_file_part_empty;
|
||||
@@ -6645,8 +6745,11 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
|
||||
}
|
||||
|
||||
path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
|
||||
change_folder_and_display_error (impl, path);
|
||||
gtk_file_path_free (path);
|
||||
if (path != NULL)
|
||||
{
|
||||
change_folder_and_display_error (impl, path);
|
||||
gtk_file_path_free (path);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
@@ -6832,6 +6935,7 @@ list_row_activated (GtkTreeView *tree_view,
|
||||
static void
|
||||
path_bar_clicked (GtkPathBar *path_bar,
|
||||
GtkFilePath *file_path,
|
||||
GtkFilePath *child_path,
|
||||
gboolean child_is_hidden,
|
||||
GtkFileChooserDefault *impl)
|
||||
{
|
||||
@@ -6844,6 +6948,18 @@ path_bar_clicked (GtkPathBar *path_bar,
|
||||
*/
|
||||
if (child_is_hidden)
|
||||
g_object_set (impl, "show-hidden", TRUE, NULL);
|
||||
|
||||
/* Say we have "/foo/bar/baz" and the user clicks on "bar". We should then
|
||||
* focus the "baz" entry in the files list - the reason for this is that
|
||||
* if user furst changed to /foo/bar/baz from /foo/bar unintentionally instead
|
||||
* of /foo/bar/baz1, it will take quite some time to scroll to baz1 in the file
|
||||
* list, especially if this directory contains lots of folders
|
||||
*/
|
||||
if (child_path != NULL)
|
||||
{
|
||||
gtk_file_chooser_default_select_path (impl, child_path, NULL);
|
||||
browse_files_center_selected_row (impl);
|
||||
}
|
||||
}
|
||||
|
||||
static const GtkFileInfo *
|
||||
|
||||
@@ -144,7 +144,6 @@ gtk_file_chooser_widget_constructor (GType type,
|
||||
{
|
||||
GtkFileChooserWidgetPrivate *priv;
|
||||
GObject *object;
|
||||
gchar *current_folder;
|
||||
|
||||
object = parent_class->constructor (type,
|
||||
n_construct_properties,
|
||||
@@ -158,10 +157,6 @@ gtk_file_chooser_widget_constructor (GType type,
|
||||
gtk_box_pack_start (GTK_BOX (object), priv->impl, TRUE, TRUE, 0);
|
||||
gtk_widget_show (priv->impl);
|
||||
|
||||
current_folder = g_get_current_dir ();
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (priv->impl), current_folder);
|
||||
g_free (current_folder);
|
||||
|
||||
_gtk_file_chooser_set_delegate (GTK_FILE_CHOOSER (object),
|
||||
GTK_FILE_CHOOSER (priv->impl));
|
||||
|
||||
|
||||
+1
-1
@@ -1074,7 +1074,7 @@ gtk_file_system_module_load (GTypeModule *module)
|
||||
{
|
||||
GtkFileSystemModule *fs_module = GTK_FILE_SYSTEM_MODULE (module);
|
||||
|
||||
fs_module->library = g_module_open (fs_module->path, 0);
|
||||
fs_module->library = g_module_open (fs_module->path, G_MODULE_BIND_LAZY);
|
||||
if (!fs_module->library)
|
||||
{
|
||||
g_warning (g_module_error());
|
||||
|
||||
@@ -685,11 +685,15 @@ root_folder_finished_loading_cb (GtkFileFolder *folder,
|
||||
static gboolean
|
||||
idle_finished_loading_cb (GtkFileSystemModel *model)
|
||||
{
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
g_signal_emit (model, file_system_model_signals[FINISHED_LOADING], 0);
|
||||
|
||||
g_source_destroy (model->idle_finished_loading_source);
|
||||
model->idle_finished_loading_source = NULL;
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+35
-34
@@ -291,9 +291,6 @@ check_volumes (gpointer data)
|
||||
|
||||
g_return_val_if_fail (system_win32, FALSE);
|
||||
|
||||
#if 0
|
||||
printf("check_volumes: system_win32=%p\n", system_win32);
|
||||
#endif
|
||||
if (system_win32->drives != GetLogicalDrives())
|
||||
g_signal_emit_by_name (system_win32, "volumes-changed", 0);
|
||||
|
||||
@@ -303,10 +300,6 @@ check_volumes (gpointer data)
|
||||
static void
|
||||
gtk_file_system_win32_init (GtkFileSystemWin32 *system_win32)
|
||||
{
|
||||
#if 0
|
||||
printf("gtk_file_system_win32_init: %p\n", system_win32);
|
||||
#endif
|
||||
|
||||
/* set up an idle handler for volume changes, every second should be enough */
|
||||
system_win32->timeout = g_timeout_add_full (0, 1000, check_volumes, system_win32, NULL);
|
||||
|
||||
@@ -320,10 +313,6 @@ gtk_file_system_win32_finalize (GObject *object)
|
||||
|
||||
system_win32 = GTK_FILE_SYSTEM_WIN32 (object);
|
||||
|
||||
#if 0
|
||||
printf("gtk_file_system_win32_finalize: %p\n", system_win32);
|
||||
#endif
|
||||
|
||||
g_source_remove (system_win32->timeout);
|
||||
|
||||
/* FIXME: assert that the hash is empty? */
|
||||
@@ -726,7 +715,9 @@ gtk_file_system_win32_get_parent (GtkFileSystem *file_system,
|
||||
*parent = filename_to_path (parent_filename);
|
||||
g_free (parent_filename);
|
||||
}
|
||||
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf ("%s: %s => %s\n", __FUNCTION__, (char*)path, (*parent)?(char*)*parent:"NULL"), fflush(stdout);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -762,8 +753,8 @@ canonicalize_filename (gchar *filename)
|
||||
gchar *past_root;
|
||||
gboolean last_was_slash = FALSE;
|
||||
|
||||
#if 0
|
||||
printf("canonicalize_filename: %s ", filename);
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf("%s: %s ", __FUNCTION__, filename), fflush (stdout);
|
||||
#endif
|
||||
|
||||
past_root = (gchar *) g_path_skip_root (filename);
|
||||
@@ -775,7 +766,7 @@ canonicalize_filename (gchar *filename)
|
||||
if (G_IS_DIR_SEPARATOR (*p))
|
||||
{
|
||||
if (!last_was_slash)
|
||||
*q++ = G_DIR_SEPARATOR;
|
||||
*q++ = '\\';
|
||||
|
||||
last_was_slash = TRUE;
|
||||
}
|
||||
@@ -828,8 +819,9 @@ canonicalize_filename (gchar *filename)
|
||||
q--;
|
||||
|
||||
*q = '\0';
|
||||
#if 0
|
||||
printf(" => %s\n", filename);
|
||||
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf(" => %s\n", filename), fflush (stdout);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -845,15 +837,15 @@ gtk_file_system_win32_parse (GtkFileSystem *file_system,
|
||||
gchar *last_backslash, *last_slash;
|
||||
gboolean result = FALSE;
|
||||
|
||||
#if 0
|
||||
printf("gtk_file_system_win32_parse: base_path=%s str=%s\n",(char*)base_path,str);
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf("%s: base_path=%s str=%s\n",__FUNCTION__,(char*)base_path,str),fflush(stdout);
|
||||
#endif
|
||||
|
||||
base_filename = gtk_file_path_get_string (base_path);
|
||||
g_return_val_if_fail (base_filename != NULL, FALSE);
|
||||
g_return_val_if_fail (g_path_is_absolute (base_filename), FALSE);
|
||||
|
||||
last_backslash = strrchr (str, G_DIR_SEPARATOR);
|
||||
last_backslash = strrchr (str, '\\');
|
||||
last_slash = strrchr (str, '/');
|
||||
if (last_slash == NULL ||
|
||||
(last_backslash != NULL && last_backslash > last_slash))
|
||||
@@ -874,18 +866,25 @@ gtk_file_system_win32_parse (GtkFileSystem *file_system,
|
||||
{
|
||||
if (g_ascii_isalpha (base_filename[0]) &&
|
||||
base_filename[1] == ':')
|
||||
folder_part = g_strdup_printf ("%c:" G_DIR_SEPARATOR_S, base_filename[0]);
|
||||
folder_part = g_strdup_printf ("%c:\\", base_filename[0]);
|
||||
else
|
||||
folder_part = g_strdup (G_DIR_SEPARATOR_S);
|
||||
folder_part = g_strdup ("\\");
|
||||
}
|
||||
else if (g_ascii_isalpha (str[0]) &&
|
||||
str[1] == ':' &&
|
||||
G_IS_DIR_SEPARATOR (str[2]))
|
||||
last_slash == str + 2)
|
||||
folder_part = g_strndup (str, last_slash - str + 1);
|
||||
#if 0
|
||||
/* Hmm, what the heck was this case supposed to do? It splits up
|
||||
* \\server\share\foo\bar into folder_part
|
||||
* \\server\share\foo\bar and file_path bar. Not good. As far as
|
||||
* I can see, this isn't needed.
|
||||
*/
|
||||
else if (G_IS_DIR_SEPARATOR (str[0]) &&
|
||||
G_IS_DIR_SEPARATOR (str[1]) &&
|
||||
(!str[2] || !G_IS_DIR_SEPARATOR (str[2])))
|
||||
folder_part = g_strdup (str);
|
||||
#endif
|
||||
else
|
||||
folder_part = g_strndup (str, last_slash - str);
|
||||
|
||||
@@ -909,8 +908,8 @@ gtk_file_system_win32_parse (GtkFileSystem *file_system,
|
||||
result = TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
printf("gtk_file_system_win32_parse:returning folder=%s file_part=%s\n",(*folder?(char*)*folder:"NULL"),*file_part);
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf ("%s:returning folder=%s file_part=%s\n", __FUNCTION__, (*folder?(char*)*folder:"NULL"), *file_part), fflush(stdout);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
@@ -936,6 +935,11 @@ gtk_file_system_win32_uri_to_path (GtkFileSystem *file_system,
|
||||
{
|
||||
GtkFilePath *path = NULL;
|
||||
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
|
||||
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf ("%s: %s -> %s\n", __FUNCTION__, uri, filename?filename:"NULL"), fflush (stdout);
|
||||
#endif
|
||||
|
||||
if (filename)
|
||||
{
|
||||
path = filename_to_path (filename);
|
||||
@@ -1422,6 +1426,11 @@ gtk_file_folder_win32_list_children (GtkFileFolder *folder,
|
||||
*children = NULL;
|
||||
|
||||
dir = g_dir_open (folder_win32->filename, 0, error);
|
||||
|
||||
#if DEBUGGING_OUTPUT
|
||||
printf ("%s: %s: %s\n", __FUNCTION__, folder_win32->filename, dir?"OK":"FAIL"), fflush (stdout);
|
||||
#endif
|
||||
|
||||
if (!dir)
|
||||
return FALSE;
|
||||
|
||||
@@ -1516,9 +1525,7 @@ filename_get_info (const gchar *filename,
|
||||
|
||||
if (types & GTK_FILE_INFO_IS_HIDDEN)
|
||||
{
|
||||
/* Unix dot convention or the Windows hidden attribute */
|
||||
gboolean is_hidden = basename[0] == '.' ||
|
||||
!!(wfad.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN);
|
||||
gboolean is_hidden = !!(wfad.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN);
|
||||
gtk_file_info_set_is_hidden (info, is_hidden);
|
||||
}
|
||||
|
||||
@@ -1654,14 +1661,8 @@ filename_is_server_share (const char *filename)
|
||||
static gboolean
|
||||
filename_is_some_root (const char *filename)
|
||||
{
|
||||
#if 0
|
||||
return ((G_IS_DIR_SEPARATOR (filename[0]) && filename[1] == '\0') ||
|
||||
filename_is_server_share (filename) ||
|
||||
filename_is_drive_root (filename));
|
||||
#else
|
||||
return (g_path_is_absolute (filename) &&
|
||||
*(g_path_skip_root (filename)) == '\0');
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
+1
-1
@@ -869,7 +869,7 @@ gtk_font_button_update_font_info (GtkFontButton *font_button)
|
||||
#endif
|
||||
|
||||
style = NULL;
|
||||
if (font_button->priv->show_style)
|
||||
if (font_button->priv->show_style && family)
|
||||
{
|
||||
PangoFontFamily **families;
|
||||
PangoFontFace **faces;
|
||||
|
||||
+7
-2
@@ -1198,13 +1198,18 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
|
||||
GtkTreeIter iter;
|
||||
GtkTreeIter match_iter;
|
||||
gboolean valid;
|
||||
const gchar *new_family_name;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_FONT_SELECTION (fontsel), FALSE);
|
||||
|
||||
new_desc = pango_font_description_from_string (fontname);
|
||||
|
||||
/* Check to make sure that this is in the list of allowed fonts */
|
||||
new_family_name = pango_font_description_get_family (new_desc);
|
||||
if (!new_family_name)
|
||||
return FALSE;
|
||||
|
||||
/* Check to make sure that this is in the list of allowed fonts
|
||||
*/
|
||||
model = gtk_tree_view_get_model (GTK_TREE_VIEW (fontsel->family_list));
|
||||
for (valid = gtk_tree_model_get_iter_first (model, &iter);
|
||||
valid;
|
||||
@@ -1215,7 +1220,7 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
|
||||
gtk_tree_model_get (model, &iter, FAMILY_COLUMN, &family, -1);
|
||||
|
||||
if (g_ascii_strcasecmp (pango_font_family_get_name (family),
|
||||
pango_font_description_get_family (new_desc)) == 0)
|
||||
new_family_name) == 0)
|
||||
new_family = family;
|
||||
|
||||
g_object_unref (family);
|
||||
|
||||
@@ -378,8 +378,6 @@ _gtk_icon_cache_get_icon (GtkIconCache *cache,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pixbuf = gdk_pixbuf_from_pixdata (&pixdata, FALSE, &error);
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_data (pixdata.pixel_data, GDK_COLORSPACE_RGB,
|
||||
(pixdata.pixdata_type & GDK_PIXDATA_COLOR_TYPE_MASK) == GDK_PIXDATA_COLOR_TYPE_RGBA,
|
||||
8, pixdata.width, pixdata.height, pixdata.rowstride,
|
||||
|
||||
+16
-1
@@ -1484,6 +1484,21 @@ gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme,
|
||||
}
|
||||
}
|
||||
|
||||
if (icon_theme_builtin_icons)
|
||||
{
|
||||
GList *icons;
|
||||
|
||||
icons = g_hash_table_lookup (icon_theme_builtin_icons, icon_name);
|
||||
|
||||
while (icons)
|
||||
{
|
||||
BuiltinIcon *icon = icons->data;
|
||||
|
||||
g_hash_table_insert (sizes, GINT_TO_POINTER (icon->size), NULL);
|
||||
icons = icons->next;
|
||||
}
|
||||
}
|
||||
|
||||
r = result = g_new0 (gint, g_hash_table_size (sizes) + 1);
|
||||
|
||||
g_hash_table_foreach (sizes, add_size, &r);
|
||||
@@ -1893,7 +1908,7 @@ theme_lookup_icon (IconTheme *theme,
|
||||
if (min_dir)
|
||||
{
|
||||
GtkIconInfo *icon_info = icon_info_new ();
|
||||
gboolean has_icon_file;
|
||||
gboolean has_icon_file = FALSE;
|
||||
|
||||
suffix = theme_dir_get_icon_suffix (min_dir, icon_name, &has_icon_file);
|
||||
suffix = best_suffix (suffix, allow_svg);
|
||||
|
||||
+33
-28
@@ -697,10 +697,10 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkIconView:orientation:
|
||||
* GtkIconView:reorderable:
|
||||
*
|
||||
* The reorderable property specifies if the items can be reordered
|
||||
* by DND.
|
||||
* by drag-and-drop.
|
||||
*
|
||||
* Since: 2.8
|
||||
*/
|
||||
@@ -1734,7 +1734,7 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
||||
GtkCellRenderer *cell,
|
||||
gboolean start_editing)
|
||||
{
|
||||
GtkIconViewItem *item;
|
||||
GtkIconViewItem *item = NULL;
|
||||
GtkIconViewCellInfo *info = NULL;
|
||||
GList *l;
|
||||
gint i, cell_pos;
|
||||
@@ -1746,8 +1746,8 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
||||
gtk_icon_view_stop_editing (icon_view, TRUE);
|
||||
|
||||
if (gtk_tree_path_get_depth (path) == 1)
|
||||
item = g_list_nth (icon_view->priv->items,
|
||||
gtk_tree_path_get_indices(path)[0])->data;
|
||||
item = g_list_nth_data (icon_view->priv->items,
|
||||
gtk_tree_path_get_indices(path)[0]);
|
||||
|
||||
if (!item)
|
||||
return;
|
||||
@@ -3930,7 +3930,7 @@ gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
|
||||
* @path: The path of the item to move to.
|
||||
* @use_align: whether to use alignment arguments, or %FALSE.
|
||||
* @row_align: The vertical alignment of the item specified by @path.
|
||||
* @col_align: The horizontal alignment of the item specified by @column.
|
||||
* @col_align: The horizontal alignment of the item specified by @path.
|
||||
*
|
||||
* Moves the alignments of @icon_view to the position specified by @path.
|
||||
* @row_align determines where the row is placed, and @col_align determines where
|
||||
@@ -3988,7 +3988,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
||||
|
||||
if (use_align)
|
||||
{
|
||||
gint x, y, width, height;
|
||||
gint x, y;
|
||||
gint focus_width;
|
||||
gfloat offset, value;
|
||||
|
||||
@@ -4457,7 +4457,6 @@ gtk_icon_view_get_visible_range (GtkIconView *icon_view,
|
||||
{
|
||||
gint start_index = -1;
|
||||
gint end_index = -1;
|
||||
GtkIconViewItem *item;
|
||||
GList *icons;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
|
||||
@@ -5074,8 +5073,8 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
||||
g_return_if_fail (icon_view->priv->model != NULL);
|
||||
g_return_if_fail (path != NULL);
|
||||
|
||||
item = g_list_nth (icon_view->priv->items,
|
||||
gtk_tree_path_get_indices(path)[0])->data;
|
||||
item = g_list_nth_data (icon_view->priv->items,
|
||||
gtk_tree_path_get_indices(path)[0]);
|
||||
|
||||
if (!item)
|
||||
return;
|
||||
@@ -5207,8 +5206,8 @@ gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
||||
g_return_val_if_fail (icon_view->priv->model != NULL, FALSE);
|
||||
g_return_val_if_fail (path != NULL, FALSE);
|
||||
|
||||
item = g_list_nth (icon_view->priv->items,
|
||||
gtk_tree_path_get_indices(path)[0])->data;
|
||||
item = g_list_nth_data (icon_view->priv->items,
|
||||
gtk_tree_path_get_indices(path)[0]);
|
||||
|
||||
if (!item)
|
||||
return FALSE;
|
||||
@@ -6480,7 +6479,7 @@ gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view)
|
||||
* gtk_icon_view_set_drag_dest_item:
|
||||
* @icon_view: a #GtkIconView
|
||||
* @path: The path of the item to highlight, or %NULL.
|
||||
* @pos: Specifies whether to drop, relative to the item
|
||||
* @pos: Specifies where to drop, relative to the item
|
||||
*
|
||||
* Sets the item that is highlighted for feedback.
|
||||
*
|
||||
@@ -6569,7 +6568,7 @@ gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
|
||||
* @icon_view: a #GtkIconView
|
||||
* @drag_x: the position to determine the destination item for
|
||||
* @drag_y: the position to determine the destination item for
|
||||
* @path: Return location for the path of the highlighted item, or %NULL.
|
||||
* @path: Return location for the path of the item, or %NULL.
|
||||
* @pos: Return location for the drop position, or %NULL
|
||||
*
|
||||
* Determines the destination item for a given position.
|
||||
@@ -6651,8 +6650,14 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
||||
gint index;
|
||||
GdkRectangle area;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
|
||||
widget = GTK_WIDGET (icon_view);
|
||||
|
||||
if (!GTK_WIDGET_REALIZED (widget))
|
||||
return NULL;
|
||||
|
||||
index = gtk_tree_path_get_indices (path)[0];
|
||||
|
||||
for (l = icon_view->priv->items; l; l = l->next)
|
||||
@@ -7135,6 +7140,7 @@ gtk_icon_view_item_accessible_text_get_character_at_offset (AtkText *text,
|
||||
return unichar;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
get_pango_text_offsets (PangoLayout *layout,
|
||||
GtkTextBuffer *buffer,
|
||||
@@ -7257,6 +7263,7 @@ get_pango_text_offsets (PangoLayout *layout,
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, start_iter, *start_offset);
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, end_iter, *end_offset);
|
||||
}
|
||||
#endif
|
||||
|
||||
static gchar*
|
||||
gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText *text,
|
||||
@@ -7612,9 +7619,11 @@ gtk_icon_view_item_accessible_text_get_character_extents (AtkText *text,
|
||||
{
|
||||
GtkIconViewItemAccessible *item;
|
||||
GtkIconView *icon_view;
|
||||
#if 0
|
||||
PangoRectangle char_rect;
|
||||
const gchar *item_text;
|
||||
gint index;
|
||||
#endif
|
||||
|
||||
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
|
||||
|
||||
@@ -7650,10 +7659,12 @@ gtk_icon_view_item_accessible_text_get_offset_at_point (AtkText *text,
|
||||
{
|
||||
GtkIconViewItemAccessible *item;
|
||||
GtkIconView *icon_view;
|
||||
gint offset = -1;
|
||||
#if 0
|
||||
const gchar *item_text;
|
||||
gint index;
|
||||
gint offset;
|
||||
gint l_x, l_y;
|
||||
#endif
|
||||
|
||||
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
|
||||
|
||||
@@ -8469,7 +8480,6 @@ gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model,
|
||||
GtkIconView *icon_view;
|
||||
GtkIconViewItemAccessible *item;
|
||||
GList *items;
|
||||
GList *tmp_list;
|
||||
AtkObject *atk_obj;
|
||||
|
||||
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
|
||||
@@ -8478,14 +8488,12 @@ gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model,
|
||||
priv = gtk_icon_view_accessible_get_priv (atk_obj);
|
||||
|
||||
items = priv->items;
|
||||
tmp_list = NULL;
|
||||
while (items)
|
||||
{
|
||||
info = items->data;
|
||||
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (info->item);
|
||||
info->index = new_order[info->index];
|
||||
tmp_list = g_list_nth (icon_view->priv->items, info->index);
|
||||
item->item = tmp_list->data;
|
||||
item->item = g_list_nth_data (icon_view->priv->items, info->index);
|
||||
items = items->next;
|
||||
}
|
||||
priv->items = g_list_sort (priv->items,
|
||||
@@ -8752,7 +8760,6 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
|
||||
GtkWidget *widget;
|
||||
GtkIconView *icon_view;
|
||||
GtkIconViewItem *item;
|
||||
GList *l;
|
||||
|
||||
widget = GTK_ACCESSIBLE (selection)->widget;
|
||||
if (widget == NULL)
|
||||
@@ -8760,11 +8767,11 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
|
||||
|
||||
icon_view = GTK_ICON_VIEW (widget);
|
||||
|
||||
l = g_list_nth (icon_view->priv->items, i);
|
||||
if (!l)
|
||||
item = g_list_nth_data (icon_view->priv->items, i);
|
||||
|
||||
if (!item)
|
||||
return FALSE;
|
||||
|
||||
item = l->data;
|
||||
gtk_icon_view_select_item (icon_view, item);
|
||||
|
||||
return TRUE;
|
||||
@@ -8855,18 +8862,16 @@ gtk_icon_view_accessible_is_child_selected (AtkSelection *selection,
|
||||
GtkWidget *widget;
|
||||
GtkIconView *icon_view;
|
||||
GtkIconViewItem *item;
|
||||
GList *l;
|
||||
|
||||
widget = GTK_ACCESSIBLE (selection)->widget;
|
||||
if (widget == NULL)
|
||||
return FALSE;
|
||||
|
||||
icon_view = GTK_ICON_VIEW (widget);
|
||||
l = g_list_nth (icon_view->priv->items, i);
|
||||
if (!l)
|
||||
return FALSE;
|
||||
|
||||
item = l->data;
|
||||
item = g_list_nth_data (icon_view->priv->items, i);
|
||||
if (!item)
|
||||
return FALSE;
|
||||
|
||||
return item->selected;
|
||||
}
|
||||
|
||||
+14
-16
@@ -1774,22 +1774,17 @@ gtk_image_expose (GtkWidget *widget,
|
||||
}
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
gdk_draw_pixbuf (widget->window,
|
||||
widget->style->black_gc,
|
||||
pixbuf,
|
||||
image_bound.x - x,
|
||||
image_bound.y - y,
|
||||
image_bound.x,
|
||||
image_bound.y,
|
||||
image_bound.width,
|
||||
image_bound.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
0, 0);
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = NULL;
|
||||
}
|
||||
gdk_draw_pixbuf (widget->window,
|
||||
widget->style->black_gc,
|
||||
pixbuf,
|
||||
image_bound.x - x,
|
||||
image_bound.y - y,
|
||||
image_bound.x,
|
||||
image_bound.y,
|
||||
image_bound.width,
|
||||
image_bound.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1830,6 +1825,9 @@ gtk_image_expose (GtkWidget *widget,
|
||||
gdk_gc_set_clip_mask (widget->style->black_gc, NULL);
|
||||
gdk_gc_set_clip_origin (widget->style->black_gc, 0, 0);
|
||||
}
|
||||
|
||||
if (pixbuf)
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
} /* if widget is drawable */
|
||||
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ gtk_im_module_load (GTypeModule *module)
|
||||
{
|
||||
GtkIMModule *im_module = GTK_IM_MODULE (module);
|
||||
|
||||
im_module->library = g_module_open (im_module->path, 0);
|
||||
im_module->library = g_module_open (im_module->path, G_MODULE_BIND_LAZY);
|
||||
if (!im_module->library)
|
||||
{
|
||||
g_warning (g_module_error());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef __GTKINTL_H__
|
||||
#define __GTKINTL_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
+13
-4
@@ -297,9 +297,18 @@ _gtk_get_localedir (void)
|
||||
{
|
||||
static char *gtk_localedir = NULL;
|
||||
if (gtk_localedir == NULL)
|
||||
gtk_localedir = g_win32_get_package_installation_subdirectory
|
||||
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
|
||||
{
|
||||
gchar *temp;
|
||||
|
||||
temp = g_win32_get_package_installation_subdirectory
|
||||
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
|
||||
|
||||
/* gtk_localedir is passed to bindtextdomain() which isn't
|
||||
* UTF-8-aware.
|
||||
*/
|
||||
gtk_localedir = g_win32_locale_filename_from_utf8 (temp);
|
||||
g_free (temp);
|
||||
}
|
||||
return gtk_localedir;
|
||||
}
|
||||
|
||||
@@ -1256,7 +1265,7 @@ gtk_main_do_event (GdkEvent *event)
|
||||
* in the user_data field of GdkWindow's.
|
||||
* Ignore the event if we don't have a widget for it, except
|
||||
* for GDK_PROPERTY_NOTIFY events which are handled specialy.
|
||||
* Though this happens rarely, bogus events can occour
|
||||
* Though this happens rarely, bogus events can occur
|
||||
* for e.g. destroyed GdkWindows.
|
||||
*/
|
||||
event_widget = gtk_get_event_widget (event);
|
||||
@@ -2044,7 +2053,7 @@ gtk_get_event_widget (GdkEvent *event)
|
||||
|
||||
widget = NULL;
|
||||
if (event && event->any.window &&
|
||||
!GDK_WINDOW_DESTROYED (event->any.window))
|
||||
(event->type == GDK_DESTROY || !GDK_WINDOW_DESTROYED (event->any.window)))
|
||||
gdk_window_get_user_data (event->any.window, (void**) &widget);
|
||||
|
||||
return widget;
|
||||
|
||||
@@ -88,6 +88,7 @@ VOID:OBJECT,STRING
|
||||
VOID:POINTER
|
||||
VOID:POINTER,INT
|
||||
VOID:POINTER,BOOLEAN
|
||||
VOID:POINTER,POINTER,BOOLEAN
|
||||
VOID:POINTER,POINTER,POINTER
|
||||
VOID:POINTER,UINT
|
||||
VOID:STRING
|
||||
|
||||
+1
-1
@@ -4419,7 +4419,7 @@ gtk_menu_grab_notify (GtkWidget *widget,
|
||||
|
||||
if (!was_grabbed)
|
||||
{
|
||||
if (!GTK_IS_MENU_SHELL (grab))
|
||||
if (GTK_MENU_SHELL (widget)->active && !GTK_IS_MENU_SHELL (grab))
|
||||
gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,6 +307,7 @@ menu_position_func (GtkMenu *menu,
|
||||
{
|
||||
gdk_window_get_origin (widget->window, x, y);
|
||||
*x += widget->allocation.x;
|
||||
*y += widget->allocation.y;
|
||||
|
||||
if (direction == GTK_TEXT_DIR_LTR)
|
||||
*x += MAX (widget->allocation.width - menu_req.width, 0);
|
||||
|
||||
+25
-5
@@ -130,6 +130,8 @@ static gboolean gtk_paned_cancel_position (GtkPaned *paned);
|
||||
static gboolean gtk_paned_toggle_handle_focus (GtkPaned *paned);
|
||||
|
||||
static GType gtk_paned_child_type (GtkContainer *container);
|
||||
static void gtk_paned_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed);
|
||||
|
||||
static GtkContainerClass *parent_class = NULL;
|
||||
|
||||
@@ -223,6 +225,7 @@ gtk_paned_class_init (GtkPanedClass *class)
|
||||
widget_class->button_release_event = gtk_paned_button_release;
|
||||
widget_class->motion_notify_event = gtk_paned_motion;
|
||||
widget_class->grab_broken_event = gtk_paned_grab_broken;
|
||||
widget_class->grab_notify = gtk_paned_grab_notify;
|
||||
|
||||
container_class->add = gtk_paned_add;
|
||||
container_class->remove = gtk_paned_remove;
|
||||
@@ -925,6 +928,26 @@ gtk_paned_grab_broken (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
stop_drag (GtkPaned *paned)
|
||||
{
|
||||
paned->in_drag = FALSE;
|
||||
paned->drag_pos = -1;
|
||||
paned->position_set = TRUE;
|
||||
gdk_display_pointer_ungrab (gtk_widget_get_display (GTK_WIDGET (paned)),
|
||||
paned->priv->grab_time);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_paned_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed)
|
||||
{
|
||||
GtkPaned *paned = GTK_PANED (widget);
|
||||
|
||||
if (!was_grabbed && paned->in_drag)
|
||||
stop_drag (paned);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_paned_button_release (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
@@ -933,11 +956,8 @@ gtk_paned_button_release (GtkWidget *widget,
|
||||
|
||||
if (paned->in_drag && (event->button == 1))
|
||||
{
|
||||
paned->in_drag = FALSE;
|
||||
paned->drag_pos = -1;
|
||||
paned->position_set = TRUE;
|
||||
gdk_display_pointer_ungrab (gtk_widget_get_display (widget),
|
||||
paned->priv->grab_time);
|
||||
stop_drag (paned);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
+25
-19
@@ -127,6 +127,7 @@ get_slider_button (GtkPathBar *path_bar,
|
||||
gtk_widget_push_composite_child ();
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_focus_on_click (button, FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_arrow_new (arrow_type, GTK_SHADOW_OUT));
|
||||
gtk_container_add (GTK_CONTAINER (path_bar), button);
|
||||
gtk_widget_show_all (button);
|
||||
@@ -192,8 +193,9 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (GtkPathBarClass, path_clicked),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__POINTER_BOOLEAN,
|
||||
G_TYPE_NONE, 2,
|
||||
_gtk_marshal_VOID__POINTER_POINTER_BOOLEAN,
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_POINTER,
|
||||
G_TYPE_POINTER,
|
||||
G_TYPE_BOOLEAN);
|
||||
}
|
||||
@@ -732,9 +734,9 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
|
||||
|
||||
if (path_bar->timer)
|
||||
{
|
||||
if (GTK_WIDGET_HAS_FOCUS (path_bar->up_slider_button))
|
||||
if (path_bar->scrolling_up)
|
||||
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
|
||||
else if (GTK_WIDGET_HAS_FOCUS (path_bar->down_slider_button))
|
||||
else
|
||||
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
|
||||
|
||||
if (path_bar->need_timer)
|
||||
@@ -772,18 +774,21 @@ gtk_path_bar_slider_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
GtkPathBar *path_bar)
|
||||
{
|
||||
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
if (event->type != GDK_BUTTON_PRESS || event->button != 1)
|
||||
return FALSE;
|
||||
|
||||
path_bar->ignore_click = FALSE;
|
||||
|
||||
if (widget == path_bar->up_slider_button)
|
||||
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
|
||||
else if (widget == path_bar->down_slider_button)
|
||||
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
|
||||
{
|
||||
path_bar->scrolling_up = TRUE;
|
||||
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
|
||||
}
|
||||
else if (widget == path_bar->down_slider_button)
|
||||
{
|
||||
path_bar->scrolling_up = FALSE;
|
||||
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
|
||||
}
|
||||
|
||||
if (!path_bar->timer)
|
||||
{
|
||||
@@ -940,17 +945,23 @@ button_clicked_cb (GtkWidget *button,
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
|
||||
GtkFilePath *child_path;
|
||||
if (button_list->prev)
|
||||
{
|
||||
ButtonData *child_data;
|
||||
|
||||
child_data = BUTTON_DATA (button_list->prev->data);
|
||||
child_path = child_data->path;
|
||||
child_is_hidden = child_data->file_is_hidden;
|
||||
}
|
||||
else
|
||||
child_is_hidden = FALSE;
|
||||
{
|
||||
child_path = NULL;
|
||||
child_is_hidden = FALSE;
|
||||
}
|
||||
|
||||
g_signal_emit (path_bar, path_bar_signals [PATH_CLICKED], 0, button_data->path, child_is_hidden);
|
||||
g_signal_emit (path_bar, path_bar_signals [PATH_CLICKED], 0,
|
||||
button_data->path, child_path, child_is_hidden);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
@@ -1016,13 +1027,7 @@ button_data_free (ButtonData *button_data)
|
||||
static const char *
|
||||
get_dir_name (ButtonData *button_data)
|
||||
{
|
||||
if (button_data->type == HOME_BUTTON)
|
||||
return _("Home");
|
||||
else if (button_data->type == DESKTOP_BUTTON)
|
||||
return _("Desktop");
|
||||
else
|
||||
return button_data->dir_name;
|
||||
|
||||
return button_data->dir_name;
|
||||
}
|
||||
|
||||
/* We always want to request the same size for the label, whether
|
||||
@@ -1155,6 +1160,7 @@ make_directory_button (GtkPathBar *path_bar,
|
||||
|
||||
button_data->type = find_button_type (path_bar, path);
|
||||
button_data->button = gtk_toggle_button_new ();
|
||||
gtk_button_set_focus_on_click (button_data->button, FALSE);
|
||||
|
||||
switch (button_data->type)
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ struct _GtkPathBar
|
||||
guint slider_visible : 1;
|
||||
guint need_timer : 1;
|
||||
guint ignore_click : 1;
|
||||
guint scrolling_up : 1;
|
||||
};
|
||||
|
||||
struct _GtkPathBarClass
|
||||
@@ -71,6 +72,7 @@ struct _GtkPathBarClass
|
||||
|
||||
void (* path_clicked) (GtkPathBar *path_bar,
|
||||
GtkFilePath *file_path,
|
||||
GtkFilePath *child_path,
|
||||
gboolean child_is_hidden);
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -259,7 +259,7 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
|
||||
|
||||
/**
|
||||
* _gtk_plug_send_delete_event:
|
||||
* widget: a #GtkWidget
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Send a GDK_DELETE event to the @widget and destroy it if
|
||||
* necessary. Internal GTK function, called from this file or the
|
||||
|
||||
+1
-1
@@ -472,7 +472,7 @@ _gtk_rbtree_free (GtkRBTree *tree)
|
||||
if (tree->parent_node &&
|
||||
tree->parent_node->children == tree)
|
||||
tree->parent_node->children = NULL;
|
||||
_gtk_rbnode_free (tree->nil);
|
||||
g_free (tree->nil);
|
||||
g_free (tree);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1464,7 +1464,7 @@ gtk_rc_reparse_all_for_settings (GtkSettings *settings,
|
||||
if (!rc_file->is_string)
|
||||
{
|
||||
if (!g_lstat (rc_file->name, &statbuf) &&
|
||||
(statbuf.st_mtime > rc_file->mtime))
|
||||
(statbuf.st_mtime != rc_file->mtime))
|
||||
{
|
||||
mtime_modified = TRUE;
|
||||
break;
|
||||
|
||||
+10
-6
@@ -1415,16 +1415,16 @@ gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data)
|
||||
{
|
||||
loader = gdk_pixbuf_loader_new ();
|
||||
|
||||
if (gdk_pixbuf_loader_write (loader,
|
||||
selection_data->data,
|
||||
selection_data->length,
|
||||
NULL))
|
||||
result = gdk_pixbuf_loader_get_pixbuf (loader);
|
||||
gdk_pixbuf_loader_write (loader,
|
||||
selection_data->data,
|
||||
selection_data->length,
|
||||
NULL);
|
||||
gdk_pixbuf_loader_close (loader, NULL);
|
||||
result = gdk_pixbuf_loader_get_pixbuf (loader);
|
||||
|
||||
if (result)
|
||||
g_object_ref (result);
|
||||
|
||||
gdk_pixbuf_loader_close (loader, NULL);
|
||||
g_object_unref (loader);
|
||||
}
|
||||
|
||||
@@ -1475,6 +1475,8 @@ gtk_selection_data_set_uris (GtkSelectionData *selection_data,
|
||||
gtk_selection_data_set (selection_data,
|
||||
text_uri_list_atom,
|
||||
8, (guchar *)result, length);
|
||||
|
||||
g_free (result);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1831,6 +1833,8 @@ _gtk_selection_request (GtkWidget *widget,
|
||||
info->conversions[i].property = gdk_x11_xatom_to_atom_for_display (display,
|
||||
((glong *)mult_atoms)[2*i + 1]);
|
||||
}
|
||||
|
||||
g_free (mult_atoms);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -1371,6 +1371,8 @@ settings_update_cursor_theme (GtkSettings *settings)
|
||||
NULL);
|
||||
|
||||
gdk_x11_display_set_cursor_theme (display, theme, size);
|
||||
|
||||
g_free (theme);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+4
-4
@@ -97,13 +97,13 @@ _gtk_socket_windowing_size_request (GtkSocket *socket)
|
||||
{
|
||||
if (hints.flags & PMinSize)
|
||||
{
|
||||
socket->request_width = hints.min_width;
|
||||
socket->request_height = hints.min_height;
|
||||
socket->request_width = MAX (hints.min_width, 1);
|
||||
socket->request_height = MAX (hints.min_height, 1);
|
||||
}
|
||||
else if (hints.flags & PBaseSize)
|
||||
{
|
||||
socket->request_width = hints.base_width;
|
||||
socket->request_height = hints.base_height;
|
||||
socket->request_width = MAX (hints.base_width, 1);
|
||||
socket->request_height = MAX (hints.base_height, 1);
|
||||
}
|
||||
}
|
||||
socket->have_size = TRUE;
|
||||
|
||||
@@ -321,10 +321,12 @@ static const GtkStockItem builtin_items [] =
|
||||
{ GTK_STOCK_CDROM, N_("_CD-Rom"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_CLEAR, N_("_Clear"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_CLOSE, N_("_Close"), GDK_CONTROL_MASK, 'w', GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_CONNECT, N_("C_onnect"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_CONVERT, N_("_Convert"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_COPY, N_("_Copy"), GDK_CONTROL_MASK, 'c', GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_CUT, N_("Cu_t"), GDK_CONTROL_MASK, 'x', GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_DELETE, N_("_Delete"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_DISCONNECT, N_("_Disconnect"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_EXECUTE, N_("_Execute"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_EDIT, N_("_Edit"), 0, 0, GETTEXT_PACKAGE },
|
||||
{ GTK_STOCK_FIND, N_("_Find"), GDK_CONTROL_MASK, 'f', GETTEXT_PACKAGE },
|
||||
|
||||
+35
-19
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gtktextbtree.c --
|
||||
* Gtktextbtree.c --
|
||||
*
|
||||
* This file contains code that manages the B-tree representation
|
||||
* of text for the text buffer and implements character and
|
||||
@@ -589,7 +589,7 @@ gtk_text_btree_resolve_bidi (GtkTextIter *start,
|
||||
|
||||
while (seg)
|
||||
{
|
||||
if (seg->byte_count > 0)
|
||||
if (seg->type == >k_text_char_type && seg->byte_count > 0)
|
||||
{
|
||||
PangoDirection pango_dir;
|
||||
|
||||
@@ -732,7 +732,7 @@ _gtk_text_btree_delete (GtkTextIter *start,
|
||||
* of the deletion range. */
|
||||
GtkTextLineSegment *last_seg; /* The segment just after the end
|
||||
* of the deletion range. */
|
||||
GtkTextLineSegment *seg, *next;
|
||||
GtkTextLineSegment *seg, *next, *next2;
|
||||
GtkTextLine *curline;
|
||||
GtkTextBTreeNode *curnode, *node;
|
||||
GtkTextBTree *tree;
|
||||
@@ -885,12 +885,29 @@ _gtk_text_btree_delete (GtkTextIter *start,
|
||||
seg->next = start_line->segments;
|
||||
start_line->segments = seg;
|
||||
}
|
||||
else
|
||||
{
|
||||
else if (prev_seg->next &&
|
||||
seg->type == >k_text_toggle_off_type &&
|
||||
prev_seg->next->type == >k_text_toggle_on_type &&
|
||||
seg->body.toggle.info == prev_seg->next->body.toggle.info)
|
||||
{
|
||||
/* Try to match an off toggle with the matching on toggle
|
||||
* if it immediately follows. This is a common case, and
|
||||
* handling it here prevents quadratic blowup in
|
||||
* cleanup_line() below. See bug 317125.
|
||||
*/
|
||||
next2 = prev_seg->next->next;
|
||||
g_free ((char *)prev_seg->next);
|
||||
prev_seg->next = next2;
|
||||
g_free ((char *)seg);
|
||||
seg = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
seg->next = prev_seg->next;
|
||||
prev_seg->next = seg;
|
||||
}
|
||||
if (seg->type->leftGravity)
|
||||
|
||||
if (seg && seg->type->leftGravity)
|
||||
{
|
||||
prev_seg = seg;
|
||||
}
|
||||
@@ -4140,16 +4157,11 @@ _gtk_text_line_char_to_byte_offsets (GtkTextLine *line,
|
||||
|
||||
if (seg->type == >k_text_char_type)
|
||||
{
|
||||
*seg_byte_offset = 0;
|
||||
while (offset > 0)
|
||||
{
|
||||
gint bytes;
|
||||
const char * start = seg->body.chars + *seg_byte_offset;
|
||||
const char *p;
|
||||
|
||||
bytes = g_utf8_next_char (start) - start;
|
||||
*seg_byte_offset += bytes;
|
||||
offset -= 1;
|
||||
}
|
||||
p = g_utf8_offset_to_pointer (seg->body.chars, offset);
|
||||
|
||||
*seg_byte_offset = p - seg->body.chars;
|
||||
|
||||
g_assert (*seg_byte_offset < seg->byte_count);
|
||||
|
||||
@@ -4731,16 +4743,20 @@ cleanup_line (GtkTextLine *line)
|
||||
while (changed)
|
||||
{
|
||||
changed = FALSE;
|
||||
for (prev_p = &line->segments, seg = *prev_p;
|
||||
seg != NULL;
|
||||
prev_p = &(*prev_p)->next, seg = *prev_p)
|
||||
prev_p = &line->segments;
|
||||
for (seg = *prev_p; seg != NULL; seg = *prev_p)
|
||||
{
|
||||
if (seg->type->cleanupFunc != NULL)
|
||||
{
|
||||
*prev_p = (*seg->type->cleanupFunc)(seg, line);
|
||||
if (seg != *prev_p)
|
||||
changed = TRUE;
|
||||
{
|
||||
changed = TRUE;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
prev_p = &(*prev_p)->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-10
@@ -2394,19 +2394,14 @@ gtk_text_iter_backward_chars (GtkTextIter *iter, gint count)
|
||||
|
||||
if (real->line_byte_offset >= 0)
|
||||
{
|
||||
const char *p;
|
||||
gint new_byte_offset;
|
||||
gint i;
|
||||
|
||||
new_byte_offset = 0;
|
||||
i = 0;
|
||||
while (i < real->segment_char_offset)
|
||||
{
|
||||
const char * start = real->segment->body.chars + new_byte_offset;
|
||||
new_byte_offset += g_utf8_next_char (start) - start;
|
||||
|
||||
++i;
|
||||
}
|
||||
p = g_utf8_offset_to_pointer (real->segment->body.chars,
|
||||
real->segment_char_offset);
|
||||
|
||||
new_byte_offset = p - real->segment->body.chars;
|
||||
real->line_byte_offset -= (real->segment_byte_offset - new_byte_offset);
|
||||
real->segment_byte_offset = new_byte_offset;
|
||||
}
|
||||
@@ -4690,7 +4685,7 @@ gtk_text_iter_forward_search (const GtkTextIter *iter,
|
||||
{
|
||||
if (limit == NULL ||
|
||||
(limit &&
|
||||
gtk_text_iter_compare (&end, limit) < 0))
|
||||
gtk_text_iter_compare (&end, limit) <= 0))
|
||||
{
|
||||
retval = TRUE;
|
||||
|
||||
|
||||
+13
-7
@@ -211,8 +211,12 @@ _gtk_char_segment_new (const gchar *text, guint len)
|
||||
}
|
||||
|
||||
GtkTextLineSegment*
|
||||
_gtk_char_segment_new_from_two_strings (const gchar *text1, guint len1,
|
||||
const gchar *text2, guint len2)
|
||||
_gtk_char_segment_new_from_two_strings (const gchar *text1,
|
||||
guint len1,
|
||||
guint chars1,
|
||||
const gchar *text2,
|
||||
guint len2,
|
||||
guint chars2)
|
||||
{
|
||||
GtkTextLineSegment *seg;
|
||||
|
||||
@@ -227,9 +231,7 @@ _gtk_char_segment_new_from_two_strings (const gchar *text1, guint len1,
|
||||
memcpy (seg->body.chars + len1, text2, len2);
|
||||
seg->body.chars[len1+len2] = '\0';
|
||||
|
||||
/* In principle this function could probably take chars1 and chars2
|
||||
as args, since it's typically used to merge two char segments */
|
||||
seg->char_count = g_utf8_strlen (seg->body.chars, seg->byte_count);
|
||||
seg->char_count = chars1 + chars2;
|
||||
|
||||
if (gtk_debug_flags & GTK_DEBUG_TEXT)
|
||||
char_segment_self_check (seg);
|
||||
@@ -326,8 +328,12 @@ char_segment_cleanup_func (segPtr, line)
|
||||
}
|
||||
|
||||
newPtr =
|
||||
_gtk_char_segment_new_from_two_strings (segPtr->body.chars, segPtr->byte_count,
|
||||
segPtr2->body.chars, segPtr2->byte_count);
|
||||
_gtk_char_segment_new_from_two_strings (segPtr->body.chars,
|
||||
segPtr->byte_count,
|
||||
segPtr->char_count,
|
||||
segPtr2->body.chars,
|
||||
segPtr2->byte_count,
|
||||
segPtr2->char_count);
|
||||
|
||||
newPtr->next = segPtr2->next;
|
||||
|
||||
|
||||
@@ -158,8 +158,10 @@ GtkTextLineSegment *_gtk_char_segment_new (const gchar *text
|
||||
guint len);
|
||||
GtkTextLineSegment *_gtk_char_segment_new_from_two_strings (const gchar *text1,
|
||||
guint len1,
|
||||
guint chars1,
|
||||
const gchar *text2,
|
||||
guint len2);
|
||||
guint len2,
|
||||
guint chars2);
|
||||
GtkTextLineSegment *_gtk_toggle_segment_new (GtkTextTagInfo *info,
|
||||
gboolean on);
|
||||
|
||||
|
||||
+6
-2
@@ -2041,13 +2041,17 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
|
||||
* @values: a #GtkTextAttributes
|
||||
*
|
||||
* Increments the reference count on @values.
|
||||
*
|
||||
* Returns: the #GtkTextAttributes that were passed in
|
||||
**/
|
||||
void
|
||||
GtkTextAttributes*
|
||||
gtk_text_attributes_ref (GtkTextAttributes *values)
|
||||
{
|
||||
g_return_if_fail (values != NULL);
|
||||
g_return_val_if_fail (values != NULL, NULL);
|
||||
|
||||
values->refcount += 1;
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user