Compare commits
422 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb5e19ee6e | |||
| 6dfbc8d8a8 | |||
| a67a600ef0 | |||
| d36f24694e | |||
| 01ec5c12f4 | |||
| 454a02e23c | |||
| 33392c7cea | |||
| c4fc34bcac | |||
| 9991283b01 | |||
| 163af5fdd8 | |||
| 07ed18bf49 | |||
| 50cccdc0b8 | |||
| 44a6f7a773 | |||
| 4da9a3541c | |||
| 6487005fd5 | |||
| 1a0630d654 | |||
| 9c777969a0 | |||
| b34b9470a4 | |||
| 33b805ba1d | |||
| dd983a4f17 | |||
| 100e652711 | |||
| 61fa8ee0c7 | |||
| 19bf71f064 | |||
| 4a2ef11414 | |||
| 5520c08fb3 | |||
| b8b207d7d1 | |||
| b5796a17f5 | |||
| 989b254636 | |||
| 69d0f944a3 | |||
| aca50fd386 | |||
| 1b1d17dcfa | |||
| c098a03e31 | |||
| 25ba11ac50 | |||
| 3bd8ce6e16 | |||
| 449593fe6b | |||
| 1bd0239ef6 | |||
| d2d46af26a | |||
| 3fc2ebe388 | |||
| c10ada4a26 | |||
| 7f8f32df71 | |||
| 908b773c12 | |||
| d657db200d | |||
| b423e964ea | |||
| 69ee164fee | |||
| 1936dc99a7 | |||
| 9ae01e7f7d | |||
| fa8e83c42c | |||
| 4b9fdf8fcf | |||
| f5249206c5 | |||
| e72dd2d625 | |||
| 44db12e7ca | |||
| 6d2ffa0435 | |||
| db65dc6f84 | |||
| 3f41594aef | |||
| 42d669dced | |||
| a040aa76b8 | |||
| c8f7fb02e4 | |||
| 17e04c2d90 | |||
| 53567b754e | |||
| 811bb06548 | |||
| 2861291a26 | |||
| e7d602a2a8 | |||
| 316ff42f25 | |||
| bcccfb13b6 | |||
| 3d3dcfb761 | |||
| 46394d0631 | |||
| db4f2f6080 | |||
| 6b7b50e6e0 | |||
| 5e1f733d75 | |||
| 198d225950 | |||
| a12c1d3e1f | |||
| a98ecdfb4c | |||
| f58038c88f | |||
| 078dcb6fe1 | |||
| 113e639550 | |||
| 6b494f476b | |||
| d2c46f9c95 | |||
| 51d3b8dce3 | |||
| 38056de0ae | |||
| be9aef056c | |||
| a281fbb398 | |||
| d13987b8f6 | |||
| fc478c3bd8 | |||
| 916cc01caa | |||
| 660b45b988 | |||
| 6a3479037a | |||
| f135f99ce0 | |||
| 67baa8188b | |||
| fce09ac1be | |||
| e23b9104be | |||
| f4c0231b44 | |||
| 07634150a8 | |||
| 507f1c5620 | |||
| a2f2335b3c | |||
| 754063e465 | |||
| 7f98725ec8 | |||
| 466d95138d | |||
| 67b34c7a59 | |||
| 5ba73b21ae | |||
| 5e4035595f | |||
| eaf86d78bb | |||
| 3089bf69e5 | |||
| 8fb2838e19 | |||
| 9492ce6045 | |||
| f7a47e6f96 | |||
| 741f8d21dc | |||
| 7f92b2662f | |||
| fb9ae62626 | |||
| fc1fbaeb42 | |||
| 63d7cd1ae9 | |||
| e982a87be8 | |||
| a833049e4a | |||
| c7cf2e7f66 | |||
| 99c5433698 | |||
| c75bf4a1d7 | |||
| 08afc3b312 | |||
| 00c3b45902 | |||
| e3fc745939 | |||
| 54622f65fe | |||
| 705b81f415 | |||
| a158f66670 | |||
| 294f794445 | |||
| 1239da0ac0 | |||
| 6941c09946 | |||
| 0c8b37f9af | |||
| b6fc39dcbd | |||
| 7cfb9a26ce | |||
| 1c994d2862 | |||
| bda8b20d88 | |||
| b5220ef931 | |||
| 3091ba8857 | |||
| 769c845d95 | |||
| 8f17636f84 | |||
| ed6009324e | |||
| b8b82e07df | |||
| 6c63fc72d5 | |||
| 7abcb08b71 | |||
| 3541830336 | |||
| 9cd4e34be9 | |||
| 01f24bbe19 | |||
| d7f7046a5c | |||
| 4b223186ea | |||
| 043a19bfb1 | |||
| dd67027b32 | |||
| 9460c56aed | |||
| 4bc1b4036f | |||
| 0790613866 | |||
| 94d04f979b | |||
| d19337b53c | |||
| 7395fdc7b3 | |||
| 7f5d798a20 | |||
| 7aa1b22051 | |||
| bb82172ae9 | |||
| cc6aea1005 | |||
| 3e7d132880 | |||
| 61df6d30bc | |||
| 660b5b2cac | |||
| 93c054a31d | |||
| 81ce2f42bd | |||
| a2fc284631 | |||
| b693be6fc9 | |||
| 54c8982ae4 | |||
| 84995c213e | |||
| 05a9fd07a4 | |||
| 6a6c34ab63 | |||
| ed7c79ad30 | |||
| 446c67c19f | |||
| b3e330454e | |||
| afed8ee147 | |||
| 08bd23daa1 | |||
| d7a270020f | |||
| c2d702d625 | |||
| 34ccc9a06d | |||
| f42718d6fd | |||
| 2bc2998344 | |||
| c855572421 | |||
| af9968364c | |||
| 939538409f | |||
| 729c2cfa0a | |||
| d0457e6224 | |||
| 78d6672c1d | |||
| 1fc4da804f | |||
| 8ad2314da3 | |||
| 38fbbaad72 | |||
| 165b491846 | |||
| 9903b0e10a | |||
| 46e22ea38e | |||
| bf48fd123d | |||
| f71c706e82 | |||
| 114d36203e | |||
| 0e43758a99 | |||
| 5ad70e6ebe | |||
| c402e38fb2 | |||
| 3a00093197 | |||
| 6ffcb87abd | |||
| a76975388a | |||
| abffc3be79 | |||
| 54d50a276d | |||
| 6436dd8fab | |||
| defcd18bb2 | |||
| 8115123e21 | |||
| c1a26cf778 | |||
| c01b67e37a | |||
| f4373f4696 | |||
| 7afe19b46a | |||
| f3aa436d78 | |||
| cf2cb36329 | |||
| 3088eb6584 | |||
| c8decbce3c | |||
| 630e2087ab | |||
| fcdff95011 | |||
| 125c0281e7 | |||
| 30f4d86da4 | |||
| 90e4cf03ff | |||
| 802f750ca6 | |||
| 56fbfa6c95 | |||
| 373ba3ea35 | |||
| c44c9e0c4a | |||
| 9586e39ec4 | |||
| f726c3380e | |||
| e676512b76 | |||
| f8c66f8219 | |||
| fea601376c | |||
| 605bcdf3ed | |||
| ea35d2ca2e | |||
| 0a45289c32 | |||
| 9245a4eca6 | |||
| cb2fec0248 | |||
| c60f1996b6 | |||
| 5a177560b6 | |||
| 8c169ce529 | |||
| 1f37777588 | |||
| 0d90bfe851 | |||
| bb48a1efc7 | |||
| 418f80e294 | |||
| 9b8834d075 | |||
| 6cede96218 | |||
| 29a965afa8 | |||
| e445684813 | |||
| 680fc7c5d2 | |||
| 88f75cf309 | |||
| 8340b819fc | |||
| 31bca0f00c | |||
| ee8628b3a6 | |||
| c246b5f740 | |||
| 43c3c79029 | |||
| 775539ef1d | |||
| e1447f1f95 | |||
| a122c33eda | |||
| 8bf4caf83c | |||
| 26366d713d | |||
| 60d34ea94f | |||
| f06c2a4daa | |||
| 9daaf9022b | |||
| d0a6ca795c | |||
| 6b6cbd183d | |||
| 4001a629d7 | |||
| 9660d080a4 | |||
| 5956de6e07 | |||
| a9dcd9f0a9 | |||
| 11cfcef2b5 | |||
| 3f7a54b141 | |||
| 48a616d351 | |||
| 101a718279 | |||
| 34b99286d5 | |||
| 8620115255 | |||
| 84742b9f0b | |||
| 63ef81fdc9 | |||
| 80d2f3ffc8 | |||
| 124473aa06 | |||
| 6fc802603e | |||
| a8d1216f40 | |||
| 4f481fd16a | |||
| 14ae061932 | |||
| 1363f15ffb | |||
| 1f09278371 | |||
| d322b8ee97 | |||
| 510e51ec63 | |||
| c6d7d38bfd | |||
| 2a9b1d0ec8 | |||
| cf6bf669f0 | |||
| d2b4ac86a8 | |||
| b84cd44c43 | |||
| 4c63cd580b | |||
| 7a66a31427 | |||
| 0e21c332c9 | |||
| 76b94bdffa | |||
| bb517d5994 | |||
| 1b970b5d1b | |||
| 641da23dbc | |||
| 166287cfa7 | |||
| 5919606776 | |||
| 4a2b65ba47 | |||
| a162b00071 | |||
| 716cc206ab | |||
| 8e61150ee6 | |||
| 1643096a72 | |||
| 0777d8b0f8 | |||
| 642bc4ea02 | |||
| 40c8c6e7d1 | |||
| cc8974213b | |||
| c6b51549a6 | |||
| c3a804c24b | |||
| 69eec539a0 | |||
| e3ab5e9c55 | |||
| 953750da7f | |||
| a743b14354 | |||
| 72d3fbc7c9 | |||
| 57b08805e3 | |||
| 3e2a24892a | |||
| a1eb50a2ab | |||
| da05f10d2d | |||
| 40fd8e6cc3 | |||
| aa08e0d9cc | |||
| 5af3a64c9e | |||
| 4dc8359235 | |||
| 5087ef4102 | |||
| 174da39bc4 | |||
| c9b15d54f9 | |||
| f2775b533c | |||
| 4ea89f0897 | |||
| a193fda540 | |||
| 746aed53f8 | |||
| 6cd79b7b8f | |||
| 72146b2f04 | |||
| 894a2429b9 | |||
| b956599653 | |||
| 18ae687952 | |||
| 773873d9e7 | |||
| 24b3f069bf | |||
| d667d39aa2 | |||
| 2fc7eb5f8b | |||
| c7fd94f84d | |||
| be92f481e8 | |||
| fd08669049 | |||
| ed167226a0 | |||
| 791828790a | |||
| 66fa3d512e | |||
| 37da199d52 | |||
| eba91c5800 | |||
| 90fae608af | |||
| 84a0d8c855 | |||
| 1e78692f9f | |||
| 5555e27619 | |||
| 0a07b6b912 | |||
| dfd717aacd | |||
| efa03b3777 | |||
| 4c841fdbf3 | |||
| 661fa8a11a | |||
| 1c5403b23e | |||
| 676cf00c82 | |||
| 2c52434bee | |||
| d893111cd7 | |||
| fa466a8dba | |||
| 6bcfa449c3 | |||
| 41e5a93efa | |||
| 3b887ee70a | |||
| 16ad4f3158 | |||
| 63165f9e76 | |||
| 4381382c31 | |||
| 4592936719 | |||
| b910aefe38 | |||
| d8605bd70a | |||
| f7572cc6ec | |||
| 28310575d4 | |||
| 1d7fcdaf6c | |||
| 90038e9f1b | |||
| 2902ac2b7b | |||
| 13e73a97eb | |||
| ca6415e2e5 | |||
| 3bfbc93228 | |||
| 001078df1e | |||
| 34199573d7 | |||
| 3dc068d85e | |||
| d86048284d | |||
| 91afef3a6e | |||
| 8b1ac94b61 | |||
| 7b984a6b13 | |||
| 2ca3e82651 | |||
| 585efae27e | |||
| 4180f905ac | |||
| 67373466d0 | |||
| 64c0648248 | |||
| 44356c97a6 | |||
| a60bbbd8c5 | |||
| 8140a1f0d0 | |||
| 02c8458ba9 | |||
| c4b0735767 | |||
| e130d50bdf | |||
| a203bebe44 | |||
| c4474c62c4 | |||
| f06a9cb837 | |||
| b12c1748d8 | |||
| 1e04b9eb04 | |||
| a033828c62 | |||
| b72141606f | |||
| e0e8a51964 | |||
| aa3340afa1 | |||
| 2f080857e0 | |||
| 78789a5e0a | |||
| ced0be686f | |||
| a66016df2c | |||
| c3b3696b5c | |||
| 3d99a27f0e | |||
| dc91cce4c2 | |||
| 4f9d9ef3bd | |||
| 2b343d143f | |||
| 2b0c63edda | |||
| fc092f6f08 | |||
| 482f74d636 | |||
| 063ff75ae5 | |||
| fdf9274476 | |||
| 809358f3fa | |||
| 152cb78d4d | |||
| 67b2f9bdac | |||
| f9f34aef79 | |||
| 12382e191a | |||
| 8dc75116e1 | |||
| 153bfe9617 | |||
| e3a70e1790 | |||
| 87fb4e55ba | |||
| 53c0a2e9e1 |
@@ -4,7 +4,7 @@ Prerequisites
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, ATK and cairo libraries, available at the same
|
||||
location as GTK+. GTK+ 2.10.2 requires at least GLib 2.12,
|
||||
location as GTK+. GTK+ 2.10.7 requires at least GLib 2.12,
|
||||
Pango 1.13, ATK 1.9 and cairo 1.2.
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
@@ -18,8 +18,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.10.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.10.2 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.10.7.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.10.7 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK+
|
||||
[ Become root if necessary ]
|
||||
|
||||
@@ -1,3 +1,257 @@
|
||||
Overview of Changes from GTK+ 2.10.6 to 2.10.7
|
||||
==============================================
|
||||
|
||||
* GtkNotebook
|
||||
- Tab reordering is a less intrusive
|
||||
- Rendering fixes on win32
|
||||
|
||||
* GtkTreeView
|
||||
- Column resizing works correctly in right-to-left languages
|
||||
- Many scrolling bugs have been fixed
|
||||
|
||||
* GtkTextView:
|
||||
- Improved scrolling during DND.
|
||||
|
||||
* GtkRecentManager is more robust against bad URIs
|
||||
|
||||
* Print support:
|
||||
- The cups backend works with 'BrowseShortNames Off'
|
||||
in the cups configuration
|
||||
- Multi-valued options are properly passed to cups
|
||||
- Fix build with cups 1.3
|
||||
- A few IPP compliance issues have been fixed
|
||||
- Make the lpr backend work on BSD
|
||||
|
||||
* Input methods:
|
||||
- GtkEntryCompletion works with input methods
|
||||
- The Thai input method has been replace by a functional
|
||||
Thai and Lao input method based on libthai
|
||||
|
||||
* Accessibility support:
|
||||
- GtkMessageDialog sets accessible name role explicitly
|
||||
|
||||
* Theme support:
|
||||
- The semantics of the gtk-color-scheme setting has been
|
||||
slightly changed. Values from rc files are still merged
|
||||
together, but the X setting just overrides the prior table.
|
||||
|
||||
* GdkPixbuf:
|
||||
- gdk_pixbuf_loader_write() now closes the loader when
|
||||
returning FALSE, as documented
|
||||
- The BMP loader supports more BMP variants, including
|
||||
transparency and 10-bit channels.
|
||||
|
||||
* Bugs fixed:
|
||||
122688 modal dialog popup + drag in progress = mouse freeze
|
||||
315732 gnome-session crash on login
|
||||
335622 Click Description field causes Evolution to crash.
|
||||
357050 Crash replacing \n\n with \n or undoing after paste
|
||||
359537 printing custom page
|
||||
373466 crash in Text Editor:
|
||||
388041 crash in Open Folder: nada
|
||||
390873 crash in Text Editor: I had just opened it up ...
|
||||
367529 gtk_combo_box_set_model(combo, NULL) generates warning wh...
|
||||
381499 xdgmime requires getc_unlocked, darwin 6 lacks
|
||||
349119 GtkUIManager crashes on wrong action names in an XML file
|
||||
363437 gnome-panel crash to gtkrecentmanager code
|
||||
366782 GtkTreeView "expand_all" can crash if a node's children a...
|
||||
374378 Crash as GTK tries to blink cursor in defocused spinbutto...
|
||||
381236 apps crash when using a mouse cursor theme as icon theme
|
||||
320465 gtk_window_parse_geometry is almost completely broken
|
||||
355350 Page Setup, Range and Copy information ignored
|
||||
387170 Fairly large leak in gtk+
|
||||
390159 printing with BSD lpr does not work properly
|
||||
64998 GtkEntry - gtk_entry_set_text emits "changed" twice
|
||||
92387 unfriendly drag-n-drop in textview - scrolls too fast
|
||||
172188 io-bmp.c should sanity check the size given by the OffBit...
|
||||
304482 GtkComboBoxEntry editable entry should be centered vertic...
|
||||
315440 Problem with gtkpaned inside gtknotebook(mouse wheel over...
|
||||
317064 GtkTextBuffer signals documentation
|
||||
317080 Incorrect gtk.immodules might make GTK+ lose its translation
|
||||
330683 Changing selection by up/down does not move to top/bottom.
|
||||
335473 gtk_file_chooser_button_new_with_dialog() is too strict
|
||||
337261 about dialogue initial focus
|
||||
339752 Please use LOCALE_IFIRSTDAYOFWEEK for GtkCalendar on Windows
|
||||
339756 LANG and LC_* environment variables should affect the C r...
|
||||
349638 Cannot Compose (multi_key) polish l (or L) with stroke, "ł"
|
||||
350342 Alt+Left/Right reorders tabs if not swallowed by Gecko
|
||||
351678 Notebooks not with PositionType.Top drawn incorrectly
|
||||
351679 Notebooks drawn with extra line below tab in MS-Windows t...
|
||||
352276 Location of G_GNUC_INTERNAL breaks Solaris build
|
||||
352435 GtkProgressBar text rendering errors
|
||||
352738 gtk_tree_view_column_set_sort_indicator() fails to show a...
|
||||
352795 configure.in: Bug in "checking Whether to write dependenc...
|
||||
353438 Add tiny extra docs to gdk_beep
|
||||
353709 GtkEntry shift-click inside selected text can behave funny
|
||||
354495 Compose key doesn't work on location entry
|
||||
357578 No grid lines are drawn
|
||||
357974 Crashes (failed assertatin)
|
||||
359231 validate_visible_area() sometimes passes mismatches (tree...
|
||||
359542 scale capability for Unix print dialog box can not be set...
|
||||
359581 GtkCellView clobbers parent's GdkWindow on style-set
|
||||
360350 leak in gtk_radio_button_focus
|
||||
362439 gtkicontheme::pixbuf_supports_svg leaks GList
|
||||
362614 gtk_widget_show does not check for NULL arg
|
||||
363191 gtk_tree_view_set_cursor() does not make row fully visible
|
||||
364514 gtk leaks GDI objects on the win32 classic look and feel
|
||||
364866 CUPS http_t type is becoming opaque
|
||||
364868 GDI resource leak in GtkStatusIcon on win32
|
||||
365031 gedit crashes with .recently-used.xbel file
|
||||
365047 GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT is never used in Gt...
|
||||
365388 gdk-pixbuf/Makefile.am: pixbufloader_pcx.def is not distr...
|
||||
366548 Clicking removed Focus frame
|
||||
370395 leak in gtk_rc_parse_icon_source
|
||||
374420 symbolic colors not reset correctly
|
||||
376094 Add gtk-doc on GtkCellRendererText::edited
|
||||
376535 crashes in gtk_drag_source_info_destroy()
|
||||
377349 gtk_status_icon_position_menu is not implemented for Win32
|
||||
378852 Fixes for notebook tab detaching
|
||||
379503 possible crash in gtk_default_draw_flat_box
|
||||
379803 Bad g_return_if_fail in gdkinput-xfree.c
|
||||
380421 Enabling extension events stops GDK_2BUTTON_PRESS
|
||||
382314 gtkpagesetup leaks when setting new paper size
|
||||
382369 some builtin papers have wrong display names
|
||||
383373 child properties getter returns not-NULL array, but no sp...
|
||||
383407 gtk_entry_set_text does not check for completion->priv->c...
|
||||
383435 expose improvements to GtkNotebook
|
||||
384168 gdk x11 backend doesn't build on Darwin
|
||||
386694 set_active_iter is called on rows with children
|
||||
388123 _gtk_file_chooser_embed_set_delegate() docs typo.
|
||||
389183 Typo in API docs (s/expansive/expensive)
|
||||
389194 mem leaks in gtkpagesetupunixdialog
|
||||
390468 Unbreak GtkNotebook keybindings
|
||||
390872 Scroll timeout isn't removed when widget destroyed
|
||||
391229 gtkprintoperation-win32.c: windows.h with WIN32_LEAN_AND_...
|
||||
172584 32 bpp windows bitmap files with 10-11-10 RGB masks are d...
|
||||
323146 gtk_button_grab_notify clears button->in_button (shouldn't)
|
||||
340135 page switching with keynav 'stuck'
|
||||
341158 Gdk-pixbuf programs need glib, but are not linked with it
|
||||
343330 gdk_pixbuf_new has redundant size checks
|
||||
343956 drawing problem in gtkassistant
|
||||
345094 gtk_notebook_insert_page can return wrong position
|
||||
353962 Tabs are all the same height
|
||||
360112 Wrong documentation for gtk_file_chooser_set_select_multiple
|
||||
365364 gtksettings doesn't list printpreview settings
|
||||
371756 GtkTreeView cursor not easily moved when set to GTK_SELEC...
|
||||
378462 En Dash Compose Keystrokes Yield an Em Dash Character
|
||||
389581 The interactive search window disappears during typing
|
||||
358864 Shows "xterm" cursor when insensitive
|
||||
385672 calendars draw arrows pointing to the right sligthly misp...
|
||||
391523 IPP glitches in GtkPrint
|
||||
391725 gtkicontheme::load_themes attempts to open dir after ENOENT
|
||||
58389 Add some method of cancellation to GtkRange?
|
||||
81031 immodules for Thai
|
||||
152620 Small icon (hIconSm member)
|
||||
159764 handles of GtkHandleBox are always drawn vertically
|
||||
348108 Refleaks in gtk-demo
|
||||
392227 GtkEntry::recompute_idle_func operates on widget->window=...
|
||||
164494 Create folder text entry widget creates the folder when i...
|
||||
332604 GtkLabel cannot have an alignment and be ellipsized in 2....
|
||||
362406 Breakage from process_all_updates() in gtkwindow.c
|
||||
392191 GtkFileChooser outputs assertions when create folder butt...
|
||||
392315 gdk_drawable_get_size() call in unrealized GtkEntry
|
||||
392457 GtkAssistant sometimes forgets to reset current_page whil...
|
||||
392532 valgrindify use of XSendEvent
|
||||
332266 gdk_draw_layout fails for coordinates >= 2^21
|
||||
346616 Selected item not visible in the popup in list mode
|
||||
392646 Fix cross-compilation
|
||||
393124 misdrawing of tabs
|
||||
393166 background box of the "bin_window" not placed correctly
|
||||
|
||||
* Updated translations (ar,as,bn_IN,ca,en_CA,en_GB,
|
||||
es,et,fi,fr,gu,he,hi,hy,hu,ka,mk,ml,mr,nb,nl,
|
||||
or,pl,pt,si,sq,sv,ta,th)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.5 to 2.10.6
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
358931 2.10.5 build issue due to a typo
|
||||
357280 Compile crashes
|
||||
359053 Reduce relocations
|
||||
359052 gtk_print_settings_get_duplex() return wrong
|
||||
value for one of vertical setting
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.4 to 2.10.5
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
358405 gtk_file_chooser_button_new
|
||||
353736 crash in Document Viewer: I had just viewed the pr...
|
||||
354849 Unable to build gtk+ under Solaris 9
|
||||
357280 Compile crashes
|
||||
357454 leak in _gtk_menu_is_empty()
|
||||
357566 [x11] Invalid unref for input windows
|
||||
357791 gtk_tree_selection_get_selected_rows does not always fill model
|
||||
358351 expander with multi-line label doesn't properly respond to mouse
|
||||
|
||||
* Updated translations (dz,et,gl,ka)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.3 to 2.10.4
|
||||
==============================================
|
||||
|
||||
* GtkFileChooser works better with remote bookmarks
|
||||
|
||||
* Windows theme engine improvements
|
||||
|
||||
* Bugs fixed:
|
||||
116626 Use keyboard map contents to detect RTL groups
|
||||
353772 Add doc blurb for GtkWidget::parent-set
|
||||
353803 GtkEntry unneccesarily resets im context at commit
|
||||
353914 Leak of to_reset list from _gtk_settings_reset_rc_values
|
||||
354043 Renew the typeahead search timeout when using scrollwheel
|
||||
354687 PLT-reduction stuff not quite working
|
||||
354887 GtkFileChooserButton displays unnecessary authentication
|
||||
dialogs
|
||||
355308 gtk_tree_view_set_grid_lines notifies wrong property
|
||||
355732 Combobox leaks treeview in list mode
|
||||
355134 Type in string
|
||||
355961 Typo in documentation for GtkPrintContext
|
||||
340201 Enhancement of Wimp theme engine.
|
||||
357132 Setting an RGBA colormap using gtk_widget_set_colormap()
|
||||
on any widget at application start (before other widgets
|
||||
are used) causes the running app to revert to the stock
|
||||
icon theme
|
||||
|
||||
* Updated translations (bg,bn,bn_IN,de,dz,el,
|
||||
en_GB,et,fi,gu,hi,id,ka,lt,lv,mk,nb,nl,nn,or,
|
||||
ru,sl,sv,ta,th)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.2 to 2.10.3
|
||||
==============================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Fix several Win32-specific problems
|
||||
- Add automated tests for GtkFileSystem
|
||||
- Make overwrite confirmation work again
|
||||
|
||||
* Printing support:
|
||||
- Fix confusion between names and values in combo boxes
|
||||
- Poll for printer list updates in the cups backend
|
||||
|
||||
* Add an automatic scrolling example to gtk-demo
|
||||
|
||||
* Bugs fixed:
|
||||
354004 Use of g_warning("%s", NULL) after failing to
|
||||
open a display
|
||||
346751 symbolic colors can't be use in properties
|
||||
352264 gtk_status_icon_set_from_pixbuf leaks the old
|
||||
pixbuf
|
||||
352391 small link button leak
|
||||
353449 A break is missing in
|
||||
gtk_recent_chooser_menu_set_current_uri
|
||||
329604 do not scroll on copy to clipboard
|
||||
354035 Typo in the GtkWidget::drag-drop doc blurb
|
||||
|
||||
* Translation updates (ang,bn_IN,ca,de,dz,el,eu,fi,
|
||||
fr,hi,hu,it,ja,lt,ml,mr,nn,or,pl,pt_BR,ro,ru,sl,
|
||||
sr,sr@Latn,sv,ta,th,tr,vi,zh_CN,zh_HK,zh_TW)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.1 to 2.10.2
|
||||
==============================================
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.10.2. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.10.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.
|
||||
|
||||
+18
-10
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [10])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_micro_version], [7])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
m4_define([gtk_interface_age], [3])
|
||||
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
|
||||
@@ -370,7 +370,8 @@ AC_ARG_ENABLE(explicit-deps,
|
||||
AC_MSG_CHECKING([Whether to write dependencies into .pc files])
|
||||
case $enable_explicit_deps in
|
||||
auto)
|
||||
deplibs_check_method=`(./libtool --config; echo eval echo \\$deplibs_check_method) | sh`
|
||||
export SED
|
||||
deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
|
||||
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
|
||||
enable_explicit_deps=yes
|
||||
else
|
||||
@@ -402,7 +403,7 @@ if test "x$enable_rebuilds" = "xyes" && \
|
||||
fi
|
||||
AC_SUBST(REBUILD)
|
||||
|
||||
AC_CHECK_FUNCS(lstat mkstemp flockfile)
|
||||
AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
|
||||
|
||||
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
|
||||
AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
|
||||
@@ -469,7 +470,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 bn_IN 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 ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
|
||||
ALL_LINGUAS="af am ang ar as az az_IR be bg bn bn_IN br bs ca cs cy da de dz el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw si sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
@@ -728,6 +729,10 @@ fi
|
||||
AC_MSG_RESULT($gtk_uxtheme_h)
|
||||
|
||||
|
||||
# Checks for gdkspawn
|
||||
AC_CHECK_HEADERS(crt_externs.h)
|
||||
AC_CHECK_FUNCS(_NSGetEnviron)
|
||||
|
||||
##################################################
|
||||
# Checks for gdk-pixbuf
|
||||
##################################################
|
||||
@@ -1032,7 +1037,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
|
||||
if test $cross_compiling = yes; then
|
||||
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
|
||||
if test x$GDK_PIXBUF_CSOURCE = xno; then
|
||||
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
|
||||
if test x$GTK_UPDATE_ICON_CACHE = xno; then
|
||||
REBUILD_PNGS=#
|
||||
fi
|
||||
fi
|
||||
@@ -1042,7 +1048,7 @@ if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
|
||||
AC_MSG_ERROR([
|
||||
*** gtkbuiltincache.h is not in the tree, and cannot be built
|
||||
*** because you don't have libpng, or (when cross-compiling) you
|
||||
*** don't have a prebuilt gdk-pixbuf-csource on the host system.])
|
||||
*** don't have a prebuilt gtk-update-icon-cache on the build system.])
|
||||
fi
|
||||
|
||||
AC_SUBST(REBUILD_PNGS)
|
||||
@@ -1413,14 +1419,15 @@ if test "x$gdktarget" = "xdirectfb"; then
|
||||
DIRECTFB_REQUIRED_VERSION=0.9.24
|
||||
AC_MSG_CHECKING(for DirectFB)
|
||||
|
||||
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
|
||||
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb -a $PKG_CONFIG --exists cairo-directfb ; then
|
||||
AC_MSG_RESULT(found)
|
||||
GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
|
||||
GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest
|
||||
*** version of DirectFB is always available from http://www.directfb.org/.
|
||||
*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend
|
||||
*** are required. The latest version of DirectFB is always available
|
||||
*** from http://www.directfb.org/.
|
||||
])
|
||||
fi
|
||||
|
||||
@@ -1593,6 +1600,7 @@ CPPFLAGS="$gtk_save_cppflags"
|
||||
#
|
||||
# We are using gmodule-no-export now, but I'm leaving the stripping
|
||||
# code in place for now, since pango and atk still require gmodule.
|
||||
export SED
|
||||
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
|
||||
if test -n "$export_dynamic"; then
|
||||
GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
2007-01-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.7 ===
|
||||
|
||||
2006-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.6 ===
|
||||
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
@@ -31,6 +31,7 @@ demos = \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
textscroll.c \
|
||||
tree_store.c \
|
||||
ui_manager.c
|
||||
|
||||
|
||||
@@ -467,6 +467,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
"stock-id", GTK_STOCK_OPEN,
|
||||
NULL);
|
||||
gtk_action_group_add_action (action_group, open_action);
|
||||
g_object_unref (open_action);
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
window);
|
||||
|
||||
@@ -300,6 +300,8 @@ display_changed_cb (GtkTreeSelection *selection,
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (info->current_display)
|
||||
g_object_unref (info->current_display);
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
DISPLAY_COLUMN_DISPLAY, &info->current_display,
|
||||
@@ -320,6 +322,8 @@ screen_changed_cb (GtkTreeSelection *selection,
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (info->current_screen)
|
||||
g_object_unref (info->current_screen);
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
SCREEN_COLUMN_SCREEN, &info->current_screen,
|
||||
@@ -562,6 +566,14 @@ destroy_info (ChangeDisplayInfo *info)
|
||||
g_slist_free (tmp_list);
|
||||
|
||||
g_object_unref (info->size_group);
|
||||
g_object_unref (info->display_model);
|
||||
g_object_unref (info->screen_model);
|
||||
|
||||
if (info->current_display)
|
||||
g_object_unref (info->current_display);
|
||||
if (info->current_screen)
|
||||
g_object_unref (info->current_screen);
|
||||
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ create_stock_icon_store (void)
|
||||
PIXBUF_COL, pixbuf,
|
||||
TEXT_COL, label,
|
||||
-1);
|
||||
g_object_unref (pixbuf);
|
||||
g_free (label);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -218,6 +218,16 @@ checkerboard_expose (GtkWidget *da,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
close_window (void)
|
||||
{
|
||||
window = NULL;
|
||||
|
||||
if (pixmap)
|
||||
g_object_unref (pixmap);
|
||||
pixmap = NULL;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_drawingarea (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -233,7 +243,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
@@ -309,14 +319,9 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -243,6 +243,18 @@ home_clicked (GtkToolItem *item,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
static void close_window(void)
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
|
||||
g_object_unref (file_pixbuf);
|
||||
file_pixbuf = NULL;
|
||||
|
||||
g_object_unref (folder_pixbuf);
|
||||
folder_pixbuf = NULL;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_iconview (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -258,7 +270,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GtkIconView demo");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
G_CALLBACK (close_window), NULL);
|
||||
|
||||
error = NULL;
|
||||
if (!load_pixbufs (&error))
|
||||
|
||||
@@ -782,6 +782,8 @@ create_tree (void)
|
||||
|
||||
gtk_widget_grab_focus (tree_view);
|
||||
|
||||
g_object_unref (model);
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
@@ -865,7 +867,7 @@ main (int argc, char **argv)
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GTK+ Code Demos");
|
||||
g_signal_connect (window, "destroy",
|
||||
g_signal_connect_after (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
@@ -881,13 +883,15 @@ main (int argc, char **argv)
|
||||
create_text (&info_buffer, FALSE),
|
||||
gtk_label_new_with_mnemonic ("_Info"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title",
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
g_object_unref (info_buffer);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
create_text (&source_buffer, TRUE),
|
||||
gtk_label_new_with_mnemonic ("_Source"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title",
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
|
||||
tag = gtk_text_buffer_create_tag (source_buffer, "comment",
|
||||
"foreground", "DodgerBlue",
|
||||
@@ -910,6 +914,7 @@ main (int argc, char **argv)
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"foreground", "DarkGoldenrod4",
|
||||
NULL);
|
||||
g_object_unref (source_buffer);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
/* Text Widget/Automatic scrolling
|
||||
*
|
||||
* This example demonstrates how to use the gravity of
|
||||
* GtkTextMarks to keep a text view scrolled to the bottom
|
||||
* while appending text.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
/* Scroll to the end of the buffer.
|
||||
*/
|
||||
static gboolean
|
||||
scroll_to_end (GtkTextView *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GtkTextMark *mark;
|
||||
char *spaces;
|
||||
static int count;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (textview);
|
||||
|
||||
/* Get "end" mark. It's located at the end of buffer because
|
||||
* of right gravity
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "end");
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark);
|
||||
|
||||
/* and insert some text at its position, the iter will be
|
||||
* revalidated after insertion to point to the end of inserted text
|
||||
*/
|
||||
spaces = g_strnfill (count++, ' ');
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, spaces, -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Scroll to end scroll to end scroll "
|
||||
"to end scroll to end ",
|
||||
-1);
|
||||
g_free (spaces);
|
||||
|
||||
/* Now scroll the end mark onscreen.
|
||||
*/
|
||||
gtk_text_view_scroll_mark_onscreen (textview, mark);
|
||||
|
||||
/* Emulate typewriter behavior, shift to the left if we
|
||||
* are far enough to the right.
|
||||
*/
|
||||
if (count > 150)
|
||||
count = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Scroll to the bottom of the buffer.
|
||||
*/
|
||||
static gboolean
|
||||
scroll_to_bottom (GtkTextView *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GtkTextMark *mark;
|
||||
char *spaces;
|
||||
static int count;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (textview);
|
||||
|
||||
/* Get end iterator */
|
||||
gtk_text_buffer_get_end_iter (buffer, &iter);
|
||||
|
||||
/* and insert some text at it, the iter will be revalidated
|
||||
* after insertion to point to the end of inserted text
|
||||
*/
|
||||
spaces = g_strnfill (count++, ' ');
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, spaces, -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Scroll to bottom scroll to bottom scroll "
|
||||
"to bottom scroll to bottom",
|
||||
-1);
|
||||
g_free (spaces);
|
||||
|
||||
/* Move the iterator to the beginning of line, so we don't scroll
|
||||
* in horizontal direction
|
||||
*/
|
||||
gtk_text_iter_set_line_offset (&iter, 0);
|
||||
|
||||
/* and place the mark at iter. the mark will stay there after we
|
||||
* insert some text at the end because it has right gravity.
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "scroll");
|
||||
gtk_text_buffer_move_mark (buffer, mark, &iter);
|
||||
|
||||
/* Scroll the mark onscreen.
|
||||
*/
|
||||
gtk_text_view_scroll_mark_onscreen (textview, mark);
|
||||
|
||||
/* Shift text back if we got enough to the right.
|
||||
*/
|
||||
if (count > 40)
|
||||
count = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static guint
|
||||
setup_scroll (GtkTextView *textview,
|
||||
gboolean to_end)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (textview);
|
||||
gtk_text_buffer_get_end_iter (buffer, &iter);
|
||||
|
||||
if (to_end)
|
||||
{
|
||||
/* If we want to scroll to the end, including horizontal scrolling,
|
||||
* then we just create a mark with right gravity at the end of the
|
||||
* buffer. It will stay at the end unless explicitely moved with
|
||||
* gtk_text_buffer_move_mark.
|
||||
*/
|
||||
gtk_text_buffer_create_mark (buffer, "end", &iter, FALSE);
|
||||
|
||||
/* Add scrolling timeout. */
|
||||
return g_timeout_add (50, (GSourceFunc) scroll_to_end, textview);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we want to scroll to the bottom, but not scroll horizontally,
|
||||
* then an end mark won't do the job. Just create a mark so we can
|
||||
* use it with gtk_text_view_scroll_mark_onscreen, we'll position it
|
||||
* explicitely when needed. Use left gravity so the mark stays where
|
||||
* we put it after inserting new text.
|
||||
*/
|
||||
gtk_text_buffer_create_mark (buffer, "scroll", &iter, TRUE);
|
||||
|
||||
/* Add scrolling timeout. */
|
||||
return g_timeout_add (100, (GSourceFunc) scroll_to_bottom, textview);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
remove_timeout (GtkWidget *window,
|
||||
gpointer timeout)
|
||||
{
|
||||
g_source_remove (GPOINTER_TO_UINT (timeout));
|
||||
}
|
||||
|
||||
static void
|
||||
create_text_view (GtkWidget *hbox,
|
||||
gboolean to_end)
|
||||
{
|
||||
GtkWidget *swindow;
|
||||
GtkWidget *textview;
|
||||
guint timeout;
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_box_pack_start_defaults (GTK_BOX (hbox), swindow);
|
||||
textview = gtk_text_view_new ();
|
||||
gtk_container_add (GTK_CONTAINER (swindow), textview);
|
||||
|
||||
timeout = setup_scroll (GTK_TEXT_VIEW (textview), to_end);
|
||||
|
||||
/* Remove the timeout in destroy handler, so we don't try to
|
||||
* scroll destroyed widget.
|
||||
*/
|
||||
g_signal_connect (textview, "destroy",
|
||||
G_CALLBACK (remove_timeout),
|
||||
GUINT_TO_POINTER (timeout));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_textscroll (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *hbox;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
create_text_view (hbox, TRUE);
|
||||
create_text_view (hbox, FALSE);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -183,10 +183,12 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
|
||||
ui = gtk_ui_manager_new ();
|
||||
gtk_ui_manager_insert_action_group (ui, actions, 0);
|
||||
g_object_unref (actions);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_ui_manager_get_accel_group (ui));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "UI Manager");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
|
||||
if (!gtk_ui_manager_add_ui_from_string (ui, ui_info, -1, &error))
|
||||
{
|
||||
@@ -223,6 +225,7 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
gtk_widget_grab_default (button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
g_object_unref (ui);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
2007-01-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.7 ===
|
||||
|
||||
2006-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.6 ===
|
||||
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkprintcontext.sgml:
|
||||
* gtk/tmpl/gtkpagesetup.sgml: Apply a patch
|
||||
to fix some typos. (#355961, Claudio Saavedra)
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
2006-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/question_index.sgml: Rewrite the answer for
|
||||
automatic scrolling.
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
@@ -757,18 +757,21 @@ How do I make a text view scroll to the end of the buffer automatically ?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
The "insert" <link linkend="GtkTextMark">mark</link> marks the insertion point
|
||||
where gtk_text_buffer_insert() inserts new text into the buffer. The text is inserted
|
||||
<emphasis>before</emphasis> the "insert" mark, so that it generally stays
|
||||
at the end of the buffer. If it gets explicitly moved to some other position,
|
||||
e.g. when the user selects some text, use gtk_text_buffer_move_mark() to set it to
|
||||
the desired location before inserting more text. The "insert" mark of a buffer can be
|
||||
obtained with gtk_text_buffer_get_insert().
|
||||
A good way to keep a text buffer scrolled to the end is to place a
|
||||
<link linkend="GtkTextMark">mark</link> at the end of the buffer, and
|
||||
give it right gravity. The gravity has the effect that text inserted
|
||||
at the mark gets inserted <emphasis>before</emphasis>, keeping the mark
|
||||
at the end.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To ensure that the end of the buffer remains visible, use
|
||||
gtk_text_view_scroll_to_mark() to scroll to the "insert" mark after inserting new text.
|
||||
gtk_text_view_scroll_to_mark() to scroll to the mark after
|
||||
inserting new text.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The gtk-demo application contains an example of this technique.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
@@ -877,12 +877,78 @@ You may not attach these to signals created with the
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:do-overwrite-confirmation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:extra-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:file-system ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:file-system-backend ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:local-only ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:preview-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:preview-widget-active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:select-multiple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:show-hidden ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:use-preview-label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkFontFilterType ##### -->
|
||||
<para>
|
||||
A set of bit flags used to specify the filter being set
|
||||
@@ -1164,6 +1230,66 @@ after other user handlers and the default handler.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:limit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:local-only ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:recent-manager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:select-multiple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-icons ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-not-found ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-private ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-tips ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:sort-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkScrolledWindow:shadow ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -672,61 +672,6 @@ gtk_widget_destroy (chooser);
|
||||
|
||||
@filechooser: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:do-overwrite-confirmation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:extra-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:file-system-backend ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:local-only ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:preview-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:preview-widget-active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:select-multiple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:show-hidden ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:use-preview-label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GtkFileChooserAction ##### -->
|
||||
<para>
|
||||
Describes whether a #GtkFileChooser is being used to open
|
||||
|
||||
@@ -46,6 +46,7 @@ will be a popup menu allowing the users to switch pages.
|
||||
|
||||
@notebook: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkNotebook::focus-tab ##### -->
|
||||
<para>
|
||||
@@ -99,6 +100,7 @@ will be a popup menu allowing the users to switch pages.
|
||||
@notebook: the object which received the signal.
|
||||
@arg1:
|
||||
@Param3:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkNotebook::select-page ##### -->
|
||||
<para>
|
||||
|
||||
@@ -8,7 +8,7 @@ Stores page setup information
|
||||
<para>
|
||||
A GtkPageSetup object stores the page size, orientation and margins.
|
||||
The idea is that you can get one of these from the page setup dialog
|
||||
and then pass it to the #GtkPrittntOperation when printing.
|
||||
and then pass it to the #GtkPrintOperation when printing.
|
||||
The benefit of splitting this out of the #GtkPrintSettings is that
|
||||
these affect the actual layout of the page, and thus need to be set
|
||||
long before user prints.
|
||||
|
||||
@@ -29,7 +29,7 @@ draw_page (GtkPrintOperation *operation,
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
cr = gtk_print_context_get_cairo (context);
|
||||
cr = gtk_print_context_get_cairo_context (context);
|
||||
|
||||
/* Draw a red rectangle, as wide as the paper (inside the margins) */
|
||||
cairo_set_source_rgb (cr, 1.0, 0, 0);
|
||||
|
||||
@@ -45,56 +45,6 @@ Recently used files are supported since GTK+ 2.10.
|
||||
|
||||
@recentchooser: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:limit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:local-only ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:recent-manager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:select-multiple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-icons ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-not-found ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-private ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:show-tips ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkRecentChooser:sort-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GtkRecentChooserIface ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ only be accessed using the functions below.
|
||||
@scrolledwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### ARG GtkScrolledWindow:hadjustment ##### -->
|
||||
<para>
|
||||
|
||||
@@ -66,7 +66,6 @@ low-level functions for accessing the underlying windowing functions
|
||||
(Xlib in the case of the X windows system), and gdk-pixbuf, a library for
|
||||
client-side image manipulation.</para>
|
||||
|
||||
</para>
|
||||
<para>GTK is essentially an object oriented application programmers
|
||||
interface (API). Although written completely in C, it is implemented
|
||||
using the idea of classes and callback functions (pointers to
|
||||
|
||||
@@ -1,3 +1,83 @@
|
||||
2007-01-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.7 ===
|
||||
|
||||
2007-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-bmp.c (OneLine32): Fix a warning
|
||||
|
||||
2006-12-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-bmp.c (decode_bitmasks): Handle bmps
|
||||
with more than 8 bits per channel. (#172584,
|
||||
David Costanzo)
|
||||
|
||||
* io-bmp.c: Handle offsets more carefully. (#172188,
|
||||
David Costanzo)
|
||||
|
||||
* io-bmp.c: Handle v5 and OS/2 v2 bmps.
|
||||
|
||||
* io-bmp.c: Handle alpha masks in v4 and v5 bmps.
|
||||
|
||||
2006-12-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Emit
|
||||
the closed signal when closing the loader, pointed out
|
||||
by David Necas.
|
||||
|
||||
2006-12-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-gif.c (gif_get_lzw): Handle invalid gif animations
|
||||
a little bit more robustly. (#357974, Vassilis Pandis,
|
||||
patch by Felix Riemann)
|
||||
|
||||
* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
|
||||
* gdk-pixbuf.c (gdk_pixbuf_new): Remove redundant size
|
||||
checks, and document that width, height must be > 0.
|
||||
(#343330, Felix Riemann)
|
||||
|
||||
* Makefile.am: Link against GLib. (#341158, Alexey Rusakov)
|
||||
|
||||
2006-12-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't
|
||||
spew a warning if the printer is already closed.
|
||||
|
||||
2006-12-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Behave as
|
||||
documented and close the loader when returning FALSE.
|
||||
|
||||
2006-10-29 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* pixbufloader_*.def
|
||||
* Makefile.am (EXTRA_DIST): Remove pixbufloader_*.def, they are
|
||||
not used. (#365388) They were all identical, and exported just two
|
||||
symbols, so if somebody needs them for a MSVC build that doesn't
|
||||
use built-in modules it's trivial to hack makefile.msc to produce
|
||||
a common .def file for the loaders. The two symbols that need to
|
||||
be exported are fill_info and fill_vtable.
|
||||
|
||||
2006-10-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.6 ===
|
||||
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-pnm.c: Simplify and fix reading of ASCII images.
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
+4
-17
@@ -6,7 +6,7 @@ no_undefined = -no-undefined
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
gdk_pixbuf_def = $(srcdir)/gdk_pixbuf.def
|
||||
gdk_pixbuf_def = gdk_pixbuf.def
|
||||
gdk_pixbuf_symbols = -export-symbols $(gdk_pixbuf_def)
|
||||
|
||||
gdk_pixbuf_win32_res = gdk_pixbuf-win32-res.o
|
||||
@@ -50,7 +50,7 @@ gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
|
||||
$(PERL) $(srcdir)/makegdkpixbufalias.pl -def < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
|
||||
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
TESTS = abicheck.sh pltcheck.sh
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
@@ -273,7 +273,6 @@ INCLUDES = \
|
||||
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DGTK_VERSION=\"$(GTK_VERSION)\" \
|
||||
-DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGTK_PREFIX=\"$(prefix)\" \
|
||||
$(INCLUDED_LOADER_DEFINE) \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
@@ -281,7 +280,7 @@ INCLUDES = \
|
||||
-DGDK_PIXBUF_ENABLE_BACKEND
|
||||
|
||||
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
|
||||
LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la
|
||||
LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la $(GLIB_LIBS)
|
||||
|
||||
noinst_PROGRAMS = test-gdk-pixbuf
|
||||
test_gdk_pixbuf_LDADD = $(LDADDS)
|
||||
@@ -433,23 +432,11 @@ EXTRA_DIST = \
|
||||
gdk-pixbuf.symbols \
|
||||
makegdkpixbufalias.pl \
|
||||
abicheck.sh \
|
||||
pltcheck.sh \
|
||||
gdk_pixbuf.def \
|
||||
gdk_pixbuf.rc \
|
||||
gdk-pixbuf-marshal.c \
|
||||
gdk-pixbuf-marshal.list \
|
||||
pixbufloader_ico.def \
|
||||
pixbufloader_ani.def \
|
||||
pixbufloader_pnm.def \
|
||||
pixbufloader_xpm.def \
|
||||
pixbufloader_bmp.def \
|
||||
pixbufloader_jpeg.def \
|
||||
pixbufloader_ras.def \
|
||||
pixbufloader_gif.def \
|
||||
pixbufloader_png.def \
|
||||
pixbufloader_tiff.def \
|
||||
pixbufloader_wbmp.def \
|
||||
pixbufloader_xbm.def \
|
||||
pixbufloader_tga.def \
|
||||
gen-color-table.pl
|
||||
|
||||
if CROSS_COMPILING
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
cpp -DINCLUDE_VARIABLES -P -DALL_FILES ${srcdir:-.}/gdk-pixbuf.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
|
||||
nm -D -g --defined-only .libs/libgdk_pixbuf-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm expected-abi actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
|
||||
@@ -31,16 +31,16 @@
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_new_from_data:
|
||||
* @data: Image data in 8-bit/sample packed format.
|
||||
* @colorspace: Colorspace for the image data.
|
||||
* @has_alpha: Whether the data has an opacity channel.
|
||||
* @bits_per_sample: Number of bits per sample.
|
||||
* @width: Width of the image in pixels.
|
||||
* @height: Height of the image in pixels.
|
||||
* @rowstride: Distance in bytes between row starts.
|
||||
* @data: Image data in 8-bit/sample packed format
|
||||
* @colorspace: Colorspace for the image data
|
||||
* @has_alpha: Whether the data has an opacity channel
|
||||
* @bits_per_sample: Number of bits per sample
|
||||
* @width: Width of the image in pixels, must be > 0
|
||||
* @height: Height of the image in pixels, must be > 0
|
||||
* @rowstride: Distance in bytes between row starts
|
||||
* @destroy_fn: Function used to free the data when the pixbuf's reference count
|
||||
* drops to zero, or %NULL if the data should not be freed.
|
||||
* @destroy_fn_data: Closure data to pass to the destroy notification function.
|
||||
* drops to zero, or %NULL if the data should not be freed
|
||||
* @destroy_fn_data: Closure data to pass to the destroy notification function
|
||||
*
|
||||
* Creates a new #GdkPixbuf out of in-memory image data. Currently only RGB
|
||||
* images with 8 bits per sample are supported.
|
||||
|
||||
@@ -2277,7 +2277,3 @@ gdk_pixbuf_get_formats (void)
|
||||
|
||||
#define __GDK_PIXBUF_IO_C__
|
||||
#include "gdk-pixbuf-aliasdef.c"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -455,10 +455,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
|
||||
|
||||
eaten = gdk_pixbuf_loader_eat_header_write (loader, buf, count, error);
|
||||
if (eaten <= 0)
|
||||
{
|
||||
gdk_pixbuf_loader_ensure_error (loader, error);
|
||||
return FALSE;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
count -= eaten;
|
||||
buf += eaten;
|
||||
@@ -466,16 +463,27 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
|
||||
|
||||
if (count > 0 && priv->image_module->load_increment)
|
||||
{
|
||||
gboolean retval;
|
||||
retval = priv->image_module->load_increment (priv->context, buf, count,
|
||||
error);
|
||||
if (!retval)
|
||||
gdk_pixbuf_loader_ensure_error (loader, error);
|
||||
|
||||
return retval;
|
||||
if (!priv->image_module->load_increment (priv->context, buf, count,
|
||||
error))
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
fail:
|
||||
gdk_pixbuf_loader_ensure_error (loader, error);
|
||||
|
||||
priv->closed = TRUE;
|
||||
|
||||
if (priv->image_module && priv->holds_threadlock)
|
||||
{
|
||||
_gdk_pixbuf_unlock (priv->image_module);
|
||||
priv->holds_threadlock = FALSE;
|
||||
}
|
||||
|
||||
g_signal_emit (loader, pixbuf_loader_signals[CLOSED], 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -693,8 +701,8 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
|
||||
|
||||
priv = loader->priv;
|
||||
|
||||
/* we expect it's not closed */
|
||||
g_return_val_if_fail (priv->closed == FALSE, TRUE);
|
||||
if (priv->closed)
|
||||
return TRUE;
|
||||
|
||||
/* We have less the LOADER_HEADER_SIZE bytes in the image.
|
||||
* Flush it, and keep going.
|
||||
|
||||
+8
-14
@@ -30,6 +30,9 @@
|
||||
#define GDK_PIXBUF_COMPILATION
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-private.h"
|
||||
/* Include the marshallers */
|
||||
#include <glib-object.h>
|
||||
#include "gdk-pixbuf-marshal.c"
|
||||
#include "gdk-pixbuf-alias.h"
|
||||
|
||||
static void gdk_pixbuf_finalize (GObject *object);
|
||||
@@ -221,11 +224,11 @@ free_buffer (guchar *pixels, gpointer data)
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_new:
|
||||
* @colorspace: Color space for image.
|
||||
* @has_alpha: Whether the image should have transparency information.
|
||||
* @bits_per_sample: Number of bits per color sample.
|
||||
* @width: Width of image in pixels.
|
||||
* @height: Height of image in pixels.
|
||||
* @colorspace: Color space for image
|
||||
* @has_alpha: Whether the image should have transparency information
|
||||
* @bits_per_sample: Number of bits per color sample
|
||||
* @width: Width of image in pixels, must be > 0
|
||||
* @height: Height of image in pixels, must be > 0
|
||||
*
|
||||
* Creates a new #GdkPixbuf structure and allocates a buffer for it. The
|
||||
* buffer has an optimal rowstride. Note that the buffer is not cleared;
|
||||
@@ -251,9 +254,6 @@ gdk_pixbuf_new (GdkColorspace colorspace,
|
||||
g_return_val_if_fail (width > 0, NULL);
|
||||
g_return_val_if_fail (height > 0, NULL);
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
return NULL;
|
||||
|
||||
channels = has_alpha ? 4 : 3;
|
||||
rowstride = width * channels;
|
||||
if (rowstride / channels != width || rowstride + 3 < 0) /* overflow */
|
||||
@@ -753,11 +753,5 @@ gdk_pixbuf_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Include the marshallers */
|
||||
#include <glib-object.h>
|
||||
#include "gdk-pixbuf-marshal.c"
|
||||
|
||||
#define __GDK_PIXBUF_C__
|
||||
#include "gdk-pixbuf-aliasdef.c"
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include "gdk-pixdata.h"
|
||||
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixdata.h"
|
||||
#include "gdk-pixbuf-alias.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
+123
-19
@@ -159,6 +159,7 @@ struct bmp_progressive_state {
|
||||
|
||||
guchar *buff;
|
||||
guint BufferSize;
|
||||
guint BufferPadding;
|
||||
guint BufferDone;
|
||||
|
||||
guchar (*Colormap)[3];
|
||||
@@ -181,6 +182,7 @@ struct bmp_progressive_state {
|
||||
int r_mask, r_shift, r_bits;
|
||||
int g_mask, g_shift, g_bits;
|
||||
int b_mask, b_shift, b_bits;
|
||||
int a_mask, a_shift, a_bits;
|
||||
|
||||
GdkPixbuf *pixbuf; /* Our "target" */
|
||||
};
|
||||
@@ -245,6 +247,11 @@ static gboolean grow_buffer (struct bmp_progressive_state *State,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
decode_bitmasks (guchar *buf,
|
||||
struct bmp_progressive_state *State,
|
||||
GError **error);
|
||||
|
||||
static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
struct bmp_progressive_state *State,
|
||||
GError **error)
|
||||
@@ -252,7 +259,6 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
gint clrUsed;
|
||||
|
||||
/* FIXME this is totally unrobust against bogus image data. */
|
||||
|
||||
if (State->BufferSize < lsb_32 (&BIH[0]) + 14) {
|
||||
State->BufferSize = lsb_32 (&BIH[0]) + 14;
|
||||
if (!grow_buffer (State, error))
|
||||
@@ -265,17 +271,32 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
#endif
|
||||
|
||||
State->Header.size = lsb_32 (&BIH[0]);
|
||||
if (State->Header.size == 108) {
|
||||
if (State->Header.size == 124) {
|
||||
/* BMP v5 */
|
||||
State->Header.width = lsb_32 (&BIH[4]);
|
||||
State->Header.height = lsb_32 (&BIH[8]);
|
||||
State->Header.depth = lsb_16 (&BIH[14]);
|
||||
State->Compressed = lsb_32 (&BIH[16]);
|
||||
} else if (State->Header.size == 108) {
|
||||
/* BMP v4 */
|
||||
State->Header.width = lsb_32 (&BIH[4]);
|
||||
State->Header.height = lsb_32 (&BIH[8]);
|
||||
State->Header.depth = lsb_16 (&BIH[14]);
|
||||
State->Compressed = lsb_32 (&BIH[16]);
|
||||
} else if (State->Header.size == 64) {
|
||||
/* BMP OS/2 v2 */
|
||||
State->Header.width = lsb_32 (&BIH[4]);
|
||||
State->Header.height = lsb_32 (&BIH[8]);
|
||||
State->Header.depth = lsb_16 (&BIH[14]);
|
||||
State->Compressed = lsb_32 (&BIH[16]);
|
||||
} else if (State->Header.size == 40) {
|
||||
/* BMP v3 */
|
||||
State->Header.width = lsb_32 (&BIH[4]);
|
||||
State->Header.height = lsb_32 (&BIH[8]);
|
||||
State->Header.depth = lsb_16 (&BIH[14]);
|
||||
State->Compressed = lsb_32 (&BIH[16]);
|
||||
} else if (State->Header.size == 12) {
|
||||
/* BMP OS/2 */
|
||||
State->Header.width = lsb_16 (&BIH[4]);
|
||||
State->Header.height = lsb_16 (&BIH[6]);
|
||||
State->Header.depth = lsb_16 (&BIH[10]);
|
||||
@@ -297,9 +318,9 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
if (clrUsed != 0)
|
||||
State->Header.n_colors = clrUsed;
|
||||
else
|
||||
State->Header.n_colors = 1 << State->Header.depth;
|
||||
State->Header.n_colors = (1 << State->Header.depth);
|
||||
|
||||
if (State->Header.n_colors > 1 << State->Header.depth) {
|
||||
if (State->Header.n_colors > (1 << State->Header.depth)) {
|
||||
g_set_error (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
@@ -417,8 +438,19 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
|
||||
State->BufferDone = 0;
|
||||
if (State->Type <= 8) {
|
||||
gint samples;
|
||||
|
||||
State->read_state = READ_STATE_PALETTE;
|
||||
State->BufferSize = lsb_32 (&BFH[10]) - 14 - State->Header.size;
|
||||
|
||||
/* Allocate enough to hold the palette */
|
||||
samples = (State->Header.size == 12 ? 3 : 4);
|
||||
State->BufferSize = State->Header.n_colors * samples;
|
||||
|
||||
/* Skip over everything between the palette and the data.
|
||||
This protects us against a malicious BFH[10] value.
|
||||
*/
|
||||
State->BufferPadding = (lsb_32 (&BFH[10]) - 14 - State->Header.size) - State->BufferSize;
|
||||
|
||||
} else if (State->Compressed == BI_RGB) {
|
||||
if (State->BufferSize < lsb_32 (&BFH[10]))
|
||||
{
|
||||
@@ -433,8 +465,19 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
State->BufferSize = State->LineWidth;
|
||||
}
|
||||
} else if (State->Compressed == BI_BITFIELDS) {
|
||||
State->read_state = READ_STATE_BITMASKS;
|
||||
State->BufferSize = 12;
|
||||
if (State->Header.size == 108 || State->Header.size == 124)
|
||||
{
|
||||
/* v4 and v5 have the bitmasks in the header */
|
||||
if (!decode_bitmasks (&BIH[40], State, error)) {
|
||||
State->read_state = READ_STATE_ERROR;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
State->read_state = READ_STATE_BITMASKS;
|
||||
State->BufferSize = 12;
|
||||
}
|
||||
} else {
|
||||
g_set_error (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
@@ -511,12 +554,13 @@ find_bits (int n, int *lowest, int *n_set)
|
||||
}
|
||||
}
|
||||
|
||||
/* Decodes the 3 shorts that follow for the bitmasks for BI_BITFIELDS coding */
|
||||
/* Decodes the bitmasks for BI_BITFIELDS coding */
|
||||
static gboolean
|
||||
decode_bitmasks (guchar *buf,
|
||||
struct bmp_progressive_state *State,
|
||||
GError **error)
|
||||
{
|
||||
State->a_mask = State->a_shift = State->a_bits = 0;
|
||||
State->r_mask = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
|
||||
buf += 4;
|
||||
|
||||
@@ -529,17 +573,55 @@ decode_bitmasks (guchar *buf,
|
||||
find_bits (State->g_mask, &State->g_shift, &State->g_bits);
|
||||
find_bits (State->b_mask, &State->b_shift, &State->b_bits);
|
||||
|
||||
if (State->r_bits == 0 || State->g_bits == 0 || State->b_bits == 0) {
|
||||
State->r_mask = 0x7c00;
|
||||
State->r_shift = 10;
|
||||
State->g_mask = 0x03e0;
|
||||
State->g_shift = 5;
|
||||
State->b_mask = 0x001f;
|
||||
State->b_shift = 0;
|
||||
/* v4 and v5 have an alpha mask */
|
||||
if (State->Header.size == 108 || State->Header.size == 124) {
|
||||
buf += 4;
|
||||
State->a_mask = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
|
||||
find_bits (State->a_mask, &State->a_shift, &State->a_bits);
|
||||
}
|
||||
|
||||
State->r_bits = State->g_bits = State->b_bits = 5;
|
||||
if (State->r_bits == 0 || State->g_bits == 0 || State->b_bits == 0) {
|
||||
if (State->Type == 16) {
|
||||
State->r_mask = 0x7c00;
|
||||
State->r_shift = 10;
|
||||
State->g_mask = 0x03e0;
|
||||
State->g_shift = 5;
|
||||
State->b_mask = 0x001f;
|
||||
State->b_shift = 0;
|
||||
|
||||
State->r_bits = State->g_bits = State->b_bits = 5;
|
||||
}
|
||||
else {
|
||||
State->r_mask = 0x00ff0000;
|
||||
State->r_shift = 16;
|
||||
State->g_mask = 0x0000ff00;
|
||||
State->g_shift = 8;
|
||||
State->b_mask = 0x000000ff;
|
||||
State->b_shift = 0;
|
||||
State->a_mask = 0xff000000;
|
||||
State->a_shift = 24;
|
||||
|
||||
State->r_bits = State->g_bits = State->b_bits = State->a_bits = 8;
|
||||
}
|
||||
}
|
||||
|
||||
if (State->r_bits > 8) {
|
||||
State->r_shift += State->r_bits - 8;
|
||||
State->r_bits = 8;
|
||||
}
|
||||
if (State->g_bits > 8) {
|
||||
State->g_shift += State->g_bits - 8;
|
||||
State->g_bits = 8;
|
||||
}
|
||||
if (State->b_bits > 8) {
|
||||
State->b_shift += State->b_bits - 8;
|
||||
State->b_bits = 8;
|
||||
}
|
||||
if (State->a_bits > 8) {
|
||||
State->a_shift += State->a_bits - 8;
|
||||
State->a_bits = 8;
|
||||
}
|
||||
|
||||
State->read_state = READ_STATE_DATA;
|
||||
State->BufferDone = 0;
|
||||
State->BufferSize = State->LineWidth;
|
||||
@@ -573,6 +655,7 @@ gdk_pixbuf__bmp_image_begin_load(GdkPixbufModuleSizeFunc size_func,
|
||||
context->read_state = READ_STATE_HEADERS;
|
||||
|
||||
context->BufferSize = 26;
|
||||
context->BufferPadding = 0;
|
||||
context->buff = g_malloc(26);
|
||||
context->BufferDone = 0;
|
||||
/* 14 for the BitmapFileHeader, 12 for the BitmapImageHeader */
|
||||
@@ -644,28 +727,35 @@ static void OneLine32(struct bmp_progressive_state *context)
|
||||
int r_lshift, r_rshift;
|
||||
int g_lshift, g_rshift;
|
||||
int b_lshift, b_rshift;
|
||||
int a_lshift, a_rshift;
|
||||
|
||||
r_lshift = 8 - context->r_bits;
|
||||
g_lshift = 8 - context->g_bits;
|
||||
b_lshift = 8 - context->b_bits;
|
||||
a_lshift = 8 - context->a_bits;
|
||||
|
||||
r_rshift = context->r_bits - r_lshift;
|
||||
g_rshift = context->g_bits - g_lshift;
|
||||
b_rshift = context->b_bits - b_lshift;
|
||||
a_rshift = context->a_bits - a_lshift;
|
||||
|
||||
for (i = 0; i < context->Header.width; i++) {
|
||||
int v, r, g, b;
|
||||
int v, r, g, b, a;
|
||||
|
||||
v = src[0] | (src[1] << 8) | (src[2] << 16);
|
||||
v = src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
|
||||
|
||||
r = (v & context->r_mask) >> context->r_shift;
|
||||
g = (v & context->g_mask) >> context->g_shift;
|
||||
b = (v & context->b_mask) >> context->b_shift;
|
||||
a = (v & context->a_mask) >> context->a_shift;
|
||||
|
||||
*pixels++ = (r << r_lshift) | (r >> r_rshift);
|
||||
*pixels++ = (g << g_lshift) | (g >> g_rshift);
|
||||
*pixels++ = (b << b_lshift) | (b >> b_rshift);
|
||||
*pixels++ = 0xff;
|
||||
if (context->a_bits)
|
||||
*pixels++ = 0xff - ((a << a_lshift) | (a >> a_rshift));
|
||||
else
|
||||
*pixels++ = 0xff;
|
||||
|
||||
src += 4;
|
||||
}
|
||||
@@ -1078,6 +1168,7 @@ gdk_pixbuf__bmp_image_load_increment(gpointer data,
|
||||
(struct bmp_progressive_state *) data;
|
||||
|
||||
gint BytesToCopy;
|
||||
gint BytesToRemove;
|
||||
|
||||
if (context->read_state == READ_STATE_DONE)
|
||||
return TRUE;
|
||||
@@ -1103,6 +1194,19 @@ gdk_pixbuf__bmp_image_load_increment(gpointer data,
|
||||
break;
|
||||
}
|
||||
|
||||
/* context->buff is full. Now we discard all "padding" */
|
||||
if (context->BufferPadding != 0) {
|
||||
BytesToRemove = context->BufferPadding - size;
|
||||
if (BytesToRemove > size) {
|
||||
BytesToRemove = size;
|
||||
}
|
||||
size -= BytesToRemove;
|
||||
context->BufferPadding -= BytesToRemove;
|
||||
|
||||
if (context->BufferPadding != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
switch (context->read_state) {
|
||||
case READ_STATE_HEADERS:
|
||||
if (!DecodeHeader (context->buff,
|
||||
|
||||
@@ -908,6 +908,11 @@ gif_get_lzw (GifContext *context)
|
||||
|
||||
/* Only call prepare_func for the first frame */
|
||||
if (context->animation->frames->next == NULL) {
|
||||
if (context->animation->width == 0 )
|
||||
context->animation->width = gdk_pixbuf_get_width(context->frame->pixbuf);
|
||||
if (context->animation->height == 0)
|
||||
context->animation->height = gdk_pixbuf_get_height (context->frame->pixbuf);
|
||||
|
||||
if (context->prepare_func)
|
||||
(* context->prepare_func) (context->frame->pixbuf,
|
||||
GDK_PIXBUF_ANIMATION (context->animation),
|
||||
|
||||
+67
-82
@@ -527,109 +527,90 @@ pnm_read_raw_scanline (PnmLoaderContext *context)
|
||||
}
|
||||
|
||||
static gint
|
||||
pnm_read_ascii_scanline (PnmLoaderContext *context)
|
||||
pnm_read_ascii_mono_scanline (PnmLoaderContext *context)
|
||||
{
|
||||
PnmIOBuffer *inbuf;
|
||||
guint offset;
|
||||
guint value, numval, i;
|
||||
guchar data;
|
||||
guchar mask;
|
||||
guint value;
|
||||
gint retval;
|
||||
guchar *dptr;
|
||||
gint max_length;
|
||||
|
||||
if (context->type == PNM_FORMAT_PBM)
|
||||
max_length = 1;
|
||||
else
|
||||
max_length = -1;
|
||||
|
||||
inbuf = &context->inbuf;
|
||||
|
||||
context->dptr = context->pixels + context->output_row * context->rowstride;
|
||||
|
||||
dptr = context->dptr + context->output_col * 3;
|
||||
|
||||
while (TRUE) {
|
||||
retval = pnm_read_next_value (inbuf, max_length, &value, context->error);
|
||||
if (retval != PNM_OK)
|
||||
return retval;
|
||||
|
||||
if (context->type == PNM_FORMAT_PBM) {
|
||||
value = value ? 0 : 0xff;
|
||||
}
|
||||
else {
|
||||
/* scale the color up or down to an 8-bit color depth */
|
||||
if (value > context->maxval)
|
||||
value = 255;
|
||||
else
|
||||
value = (guchar)(255 * value / context->maxval);
|
||||
}
|
||||
|
||||
*dptr++ = value;
|
||||
*dptr++ = value;
|
||||
*dptr++ = value;
|
||||
|
||||
context->output_col++;
|
||||
|
||||
if (context->output_col == context->width) {
|
||||
context->output_col = 0;
|
||||
context->output_row++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return PNM_OK;
|
||||
}
|
||||
|
||||
static gint
|
||||
pnm_read_ascii_color_scanline (PnmLoaderContext *context)
|
||||
{
|
||||
PnmIOBuffer *inbuf;
|
||||
guint value, i;
|
||||
guchar *dptr;
|
||||
gint retval;
|
||||
gint max_length;
|
||||
|
||||
g_return_val_if_fail (context != NULL, PNM_FATAL_ERR);
|
||||
|
||||
data = mask = 0;
|
||||
|
||||
inbuf = &context->inbuf;
|
||||
|
||||
context->dptr = context->pixels + context->output_row * context->rowstride;
|
||||
|
||||
switch (context->type) {
|
||||
case PNM_FORMAT_PBM:
|
||||
max_length = 1;
|
||||
numval = MIN (8, context->width - context->output_col);
|
||||
offset = context->output_col / 8;
|
||||
break;
|
||||
case PNM_FORMAT_PGM:
|
||||
max_length = -1;
|
||||
numval = 1;
|
||||
offset = context->output_col;
|
||||
break;
|
||||
case PNM_FORMAT_PPM:
|
||||
max_length = -1;
|
||||
numval = 3;
|
||||
offset = context->output_col * 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_set_error (context->error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("PNM image format is invalid"));
|
||||
|
||||
return PNM_FATAL_ERR;
|
||||
}
|
||||
|
||||
dptr = context->dptr + offset + context->scan_state;
|
||||
dptr = context->dptr + context->output_col * 3 + context->scan_state;
|
||||
|
||||
while (TRUE) {
|
||||
if (context->type == PNM_FORMAT_PBM) {
|
||||
mask = 0x80;
|
||||
data = 0;
|
||||
numval = MIN (8, context->width - context->output_col);
|
||||
}
|
||||
|
||||
for (i = context->scan_state; i < numval; i++) {
|
||||
retval = pnm_read_next_value (inbuf, max_length,
|
||||
&value, context->error);
|
||||
for (i = context->scan_state; i < 3; i++) {
|
||||
retval = pnm_read_next_value (inbuf, -1, &value, context->error);
|
||||
if (retval != PNM_OK) {
|
||||
/* save state and return */
|
||||
context->scan_state = i;
|
||||
return retval;
|
||||
}
|
||||
|
||||
switch (context->type) {
|
||||
case PNM_FORMAT_PBM:
|
||||
if (value)
|
||||
data |= mask;
|
||||
mask >>= 1;
|
||||
|
||||
break;
|
||||
case PNM_FORMAT_PGM:
|
||||
case PNM_FORMAT_PPM:
|
||||
/* scale the color up or down to an 8-bit color depth */
|
||||
if (value > context->maxval)
|
||||
*dptr++ = 255;
|
||||
else
|
||||
*dptr++ = (guchar)(255 * value / context->maxval);
|
||||
break;
|
||||
default:
|
||||
g_set_error (context->error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("PNM image format is invalid"));
|
||||
return PNM_FATAL_ERR;
|
||||
break;
|
||||
}
|
||||
if (value > context->maxval)
|
||||
*dptr++ = 255;
|
||||
else
|
||||
*dptr++ = (guchar)(255 * value / context->maxval);
|
||||
}
|
||||
|
||||
context->scan_state = 0;
|
||||
|
||||
if (context->type == PNM_FORMAT_PBM) {
|
||||
*dptr++ = data;
|
||||
context->output_col += numval;
|
||||
} else {
|
||||
context->output_col++;
|
||||
}
|
||||
context->output_col++;
|
||||
|
||||
if (context->output_col == context->width) {
|
||||
if (context->type == PNM_FORMAT_PBM)
|
||||
explode_bitmap_into_buf (context);
|
||||
else if (context->type == PNM_FORMAT_PGM)
|
||||
explode_gray_into_buf (context);
|
||||
|
||||
context->output_col = 0;
|
||||
context->output_row++;
|
||||
break;
|
||||
@@ -659,8 +640,12 @@ pnm_read_scanline (PnmLoaderContext *context)
|
||||
break;
|
||||
case PNM_FORMAT_PBM:
|
||||
case PNM_FORMAT_PGM:
|
||||
retval = pnm_read_ascii_mono_scanline (context);
|
||||
if (retval != PNM_OK)
|
||||
return retval;
|
||||
break;
|
||||
case PNM_FORMAT_PPM:
|
||||
retval = pnm_read_ascii_scanline (context);
|
||||
retval = pnm_read_ascii_color_scanline (context);
|
||||
if (retval != PNM_OK)
|
||||
return retval;
|
||||
break;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
fill_vtable
|
||||
fill_info
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
LANG=C
|
||||
|
||||
status=0
|
||||
|
||||
if ! which readelf 2>/dev/null >/dev/null; then
|
||||
echo "'readelf' not found; skipping test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for so in .libs/libgdk_pixbuf*.so; do
|
||||
echo Checking $so for local PLT entries
|
||||
readelf -r $so | grep 'JU\?MP_SLOT' | grep 'gdk_pixbuf' && status=1
|
||||
done
|
||||
|
||||
exit $status
|
||||
+4
-4
@@ -16,7 +16,8 @@ EXTRA_DIST = \
|
||||
gdk.symbols \
|
||||
makegdkalias.pl \
|
||||
gdkaliasdef.c \
|
||||
abicheck.sh
|
||||
abicheck.sh \
|
||||
pltcheck.sh
|
||||
|
||||
INCLUDES = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
@@ -24,8 +25,7 @@ INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
@@ -202,7 +202,7 @@ gdkaliasdef.c: gdk.symbols
|
||||
$(PERL) $(srcdir)/makegdkalias.pl -def < $(srcdir)/gdk.symbols > gdkaliasdef.c
|
||||
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
TESTS = pltcheck.sh abicheck.sh
|
||||
endif
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
cpp -DINCLUDE_VARIABLES -P -DALL_FILES -DGDK_ENABLE_BROKEN -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
|
||||
nm -D -g --defined-only .libs/libgdk-x11-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm expected-abi actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
|
||||
@@ -328,7 +328,8 @@ gdk_init (int *argc, char ***argv)
|
||||
{
|
||||
if (!gdk_init_check (argc, argv))
|
||||
{
|
||||
g_warning ("cannot open display: %s", gdk_get_display_arg_name ());
|
||||
const char *display_name = gdk_get_display_arg_name ();
|
||||
g_warning ("cannot open display: %s", display_name ? display_name : "");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -137,15 +137,12 @@ gdk_threads_set_lock_functions
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_H__)
|
||||
#if IN_FILE(__GDK_INPUT_C__)
|
||||
#if IN_FILE(__GDK_EVENTS_C__)
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
gdk_input_add
|
||||
gdk_input_remove
|
||||
gdk_input_add_full
|
||||
#endif
|
||||
#ifdef GTK_COMPILATION
|
||||
gdk_input_add_full
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -642,9 +639,6 @@ gdk_window_clear_area
|
||||
gdk_window_clear_area_e
|
||||
gdk_window_constrain_size
|
||||
gdk_window_destroy
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
gdk_window_destroy_notify
|
||||
#endif
|
||||
gdk_window_end_paint
|
||||
gdk_window_foreign_new
|
||||
gdk_window_freeze_updates
|
||||
@@ -1091,6 +1085,12 @@ gdk_synthesize_window_state
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_PRIVATE_H__)
|
||||
#if IN_FILE(__GDK_WINDOW_X11_C__)
|
||||
gdk_window_destroy_notify
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#if IN_HEADER(__GDK_WIN32_H__)
|
||||
#if IN_FILE(__GDK_WIN32ID_C__)
|
||||
|
||||
+1
-1
@@ -305,7 +305,7 @@ gdk_keyboard_ungrab (guint32 time)
|
||||
/**
|
||||
* gdk_beep:
|
||||
*
|
||||
* Emits a short beep.
|
||||
* Emits a short beep on the default display.
|
||||
**/
|
||||
void
|
||||
gdk_beep (void)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "gdktypes.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
guint _gdk_debug_flags = 0;
|
||||
gint _gdk_error_code = 0;
|
||||
|
||||
+27
-4
@@ -28,9 +28,8 @@
|
||||
#include "gdkrgb.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
#include "gdkintl.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
#define GDK_INFO_KEY "gdk-info"
|
||||
|
||||
@@ -900,8 +899,22 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
|
||||
PangoMatrix tmp_matrix;
|
||||
|
||||
tmp_matrix = *matrix;
|
||||
tmp_matrix.x0 = x;
|
||||
tmp_matrix.y0 = y;
|
||||
tmp_matrix.x0 += x;
|
||||
tmp_matrix.y0 += y;
|
||||
pango_renderer_set_matrix (renderer, &tmp_matrix);
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
/* Fall back to introduce a matrix if the coords would scale out of range.
|
||||
* The x and y here will be added to in-layout coordinates. So we cannot
|
||||
* support the entire range here safely. So, we just accept the middle half
|
||||
* and use fallback for the rest. */
|
||||
else if (GDK_PANGO_UNITS_OVERFLOWS (x, y))
|
||||
{
|
||||
PangoMatrix tmp_matrix = PANGO_MATRIX_INIT;
|
||||
tmp_matrix.x0 += x;
|
||||
tmp_matrix.y0 += y;
|
||||
pango_renderer_set_matrix (renderer, &tmp_matrix);
|
||||
|
||||
x = 0;
|
||||
@@ -1021,6 +1034,16 @@ gdk_draw_layout_with_colors (GdkDrawable *drawable,
|
||||
tmp_matrix.y0 += y - rect.y;
|
||||
pango_renderer_set_matrix (renderer, &tmp_matrix);
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
else if (GDK_PANGO_UNITS_OVERFLOWS (x, y))
|
||||
{
|
||||
PangoMatrix tmp_matrix = PANGO_MATRIX_INIT;
|
||||
tmp_matrix.x0 = x;
|
||||
tmp_matrix.y0 = y;
|
||||
pango_renderer_set_matrix (renderer, &tmp_matrix);
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,16 @@ void gdk_synthesize_window_state (GdkWindow *window,
|
||||
GdkWindowState unset_flags,
|
||||
GdkWindowState set_flags);
|
||||
|
||||
/* Tests whether a pair of x,y may cause overflows when converted to Pango
|
||||
* units (multiplied by PANGO_SCALE). We don't allow the entire range, leave
|
||||
* some space for additions afterwards, to be safe...
|
||||
*/
|
||||
#define GDK_PANGO_UNITS_OVERFLOWS(x,y) (G_UNLIKELY ( \
|
||||
(y) >= PANGO_PIXELS (G_MAXINT-PANGO_SCALE)/2 || \
|
||||
(x) >= PANGO_PIXELS (G_MAXINT-PANGO_SCALE)/2 || \
|
||||
(y) <=-PANGO_PIXELS (G_MAXINT-PANGO_SCALE)/2 || \
|
||||
(x) <=-PANGO_PIXELS (G_MAXINT-PANGO_SCALE)/2))
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_PRIVATE_H__ */
|
||||
|
||||
+10
-1
@@ -218,7 +218,7 @@ _gdk_paintable_get_type (void)
|
||||
|
||||
if (!paintable_type)
|
||||
{
|
||||
static const GTypeInfo paintable_info =
|
||||
const GTypeInfo paintable_info =
|
||||
{
|
||||
sizeof (GdkPaintableIface), /* class_size */
|
||||
NULL, /* base_init */
|
||||
@@ -1738,6 +1738,15 @@ gdk_window_draw_glyphs_transformed (GdkDrawable *drawable,
|
||||
tmp_matrix.y0 -= y_offset;
|
||||
matrix = &tmp_matrix;
|
||||
}
|
||||
else if (GDK_PANGO_UNITS_OVERFLOWS (x_offset, y_offset))
|
||||
{
|
||||
PangoMatrix identity = PANGO_MATRIX_INIT;
|
||||
|
||||
tmp_matrix = identity;
|
||||
tmp_matrix.x0 -= x_offset;
|
||||
tmp_matrix.y0 -= y_offset;
|
||||
matrix = &tmp_matrix;
|
||||
}
|
||||
else
|
||||
{
|
||||
x -= x_offset * PANGO_SCALE;
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
LANG=C
|
||||
|
||||
status=0
|
||||
|
||||
if ! which readelf 2>/dev/null >/dev/null; then
|
||||
echo "'readelf' not found; skipping test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for so in .libs/lib*.so; do
|
||||
echo Checking $so for local PLT entries
|
||||
readelf -r $so | grep 'JU\?MP_SLOT' | grep -v 'gdk_pixbuf' | grep gdk && status=1
|
||||
done
|
||||
|
||||
exit $status
|
||||
+118
-39
@@ -421,7 +421,6 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon)
|
||||
HDC hdc;
|
||||
gchar *pixels, *bits, buf[32];
|
||||
gint rowstride, x, y, w, h;
|
||||
gboolean no_alpha;
|
||||
|
||||
if (!GDI_CALL (GetIconInfo, (hicon, &ii)))
|
||||
return NULL;
|
||||
@@ -435,55 +434,135 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon)
|
||||
memset (&bmi, 0, sizeof (bmi));
|
||||
bmi.bi.biSize = sizeof (bmi.bi);
|
||||
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmColor, 0, 1, NULL, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out1;
|
||||
|
||||
w = bmi.bi.biWidth;
|
||||
h = bmi.bi.biHeight;
|
||||
|
||||
bmi.bi.biBitCount = 32;
|
||||
bmi.bi.biCompression = BI_RGB;
|
||||
bmi.bi.biHeight = -h;
|
||||
|
||||
bits = g_malloc0 (4 * w * h);
|
||||
|
||||
/* color data */
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmColor, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out2;
|
||||
|
||||
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h);
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
no_alpha = TRUE;
|
||||
for (y = 0; y < h; y++)
|
||||
if (ii.hbmColor != NULL)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
pixels[2] = bits[(x+y*w) * 4];
|
||||
pixels[1] = bits[(x+y*w) * 4 + 1];
|
||||
pixels[0] = bits[(x+y*w) * 4 + 2];
|
||||
pixels[3] = bits[(x+y*w) * 4 + 3];
|
||||
if (no_alpha && pixels[3] > 0)
|
||||
no_alpha = FALSE;
|
||||
pixels += 4;
|
||||
}
|
||||
pixels += (w * 4 - rowstride);
|
||||
}
|
||||
/* Colour cursor */
|
||||
|
||||
/* mask */
|
||||
if (no_alpha &&
|
||||
GDI_CALL (GetDIBits, (hdc, ii.hbmMask, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
{
|
||||
gboolean no_alpha;
|
||||
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmColor, 0, 1, NULL, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out1;
|
||||
|
||||
w = bmi.bi.biWidth;
|
||||
h = bmi.bi.biHeight;
|
||||
|
||||
bmi.bi.biBitCount = 32;
|
||||
bmi.bi.biCompression = BI_RGB;
|
||||
bmi.bi.biHeight = -h;
|
||||
|
||||
bits = g_malloc0 (4 * w * h);
|
||||
|
||||
/* color data */
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmColor, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out2;
|
||||
|
||||
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h);
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
no_alpha = TRUE;
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
pixels[3] = 255 - bits[(x + y * w) * 4];
|
||||
pixels[2] = bits[(x+y*w) * 4];
|
||||
pixels[1] = bits[(x+y*w) * 4 + 1];
|
||||
pixels[0] = bits[(x+y*w) * 4 + 2];
|
||||
pixels[3] = bits[(x+y*w) * 4 + 3];
|
||||
if (no_alpha && pixels[3] > 0)
|
||||
no_alpha = FALSE;
|
||||
pixels += 4;
|
||||
}
|
||||
pixels += (w * 4 - rowstride);
|
||||
}
|
||||
|
||||
/* mask */
|
||||
if (no_alpha &&
|
||||
GDI_CALL (GetDIBits, (hdc, ii.hbmMask, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
{
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
pixels[3] = 255 - bits[(x + y * w) * 4];
|
||||
pixels += 4;
|
||||
}
|
||||
pixels += (w * 4 - rowstride);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* B&W cursor */
|
||||
|
||||
int bpl;
|
||||
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmMask, 0, 0, NULL, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out1;
|
||||
|
||||
w = bmi.bi.biWidth;
|
||||
h = ABS (bmi.bi.biHeight) / 2;
|
||||
|
||||
bits = g_malloc0 (4 * w * h);
|
||||
|
||||
/* masks */
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmMask, 0, h*2, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out2;
|
||||
|
||||
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h);
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
bpl = ((w-1)/32 + 1)*4;
|
||||
#if 0
|
||||
for (y = 0; y < h*2; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
const gint bit = 7 - (x % 8);
|
||||
printf ("%c ", ((bits[bpl*y+x/8])&(1<<bit)) ? ' ' : 'X');
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
const guchar *andp, *xorp;
|
||||
if (bmi.bi.biHeight < 0)
|
||||
{
|
||||
andp = bits + bpl*y;
|
||||
xorp = bits + bpl*(h+y);
|
||||
}
|
||||
else
|
||||
{
|
||||
andp = bits + bpl*(h-y-1);
|
||||
xorp = bits + bpl*(h+h-y-1);
|
||||
}
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
const gint bit = 7 - (x % 8);
|
||||
if ((*andp) & (1<<bit))
|
||||
{
|
||||
if ((*xorp) & (1<<bit))
|
||||
pixels[2] = pixels[1] = pixels[0] = 0xFF;
|
||||
else
|
||||
pixels[2] = pixels[1] = pixels[0] = 0;
|
||||
pixels[3] = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
pixels[2] = pixels[1] = pixels[0] = 0;
|
||||
pixels[3] = 0;
|
||||
}
|
||||
pixels += 4;
|
||||
if (bit == 0)
|
||||
{
|
||||
andp++;
|
||||
xorp++;
|
||||
}
|
||||
}
|
||||
pixels += (w * 4 - rowstride);
|
||||
}
|
||||
}
|
||||
|
||||
g_snprintf (buf, sizeof (buf), "%ld", ii.xHotspot);
|
||||
|
||||
+25
-13
@@ -368,6 +368,7 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
static ATOM klassCHILD = 0;
|
||||
static ATOM klassTEMP = 0;
|
||||
static HICON hAppIcon = NULL;
|
||||
static HICON hAppIconSm = NULL;
|
||||
static WNDCLASSEX wcl;
|
||||
ATOM klass = 0;
|
||||
|
||||
@@ -380,26 +381,37 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
wcl.cbWndExtra = 0;
|
||||
wcl.hInstance = _gdk_app_hmodule;
|
||||
wcl.hIcon = 0;
|
||||
wcl.hIconSm = 0;
|
||||
/* initialize once! */
|
||||
if (0 == hAppIcon)
|
||||
if (0 == hAppIcon && 0 == hAppIconSm)
|
||||
{
|
||||
gchar sLoc [MAX_PATH+1];
|
||||
|
||||
if (0 != GetModuleFileName (_gdk_app_hmodule, sLoc, MAX_PATH))
|
||||
{
|
||||
hAppIcon = ExtractIcon (_gdk_app_hmodule, sLoc, 0);
|
||||
if (0 == hAppIcon)
|
||||
{
|
||||
if (0 != GetModuleFileName (_gdk_dll_hinstance, sLoc, MAX_PATH))
|
||||
hAppIcon = ExtractIcon (_gdk_dll_hinstance, sLoc, 0);
|
||||
}
|
||||
}
|
||||
if (0 == hAppIcon)
|
||||
hAppIcon = LoadIcon (NULL, IDI_APPLICATION);
|
||||
{
|
||||
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
|
||||
if (0 == hAppIcon && 0 == hAppIconSm)
|
||||
{
|
||||
if (0 != GetModuleFileName (_gdk_dll_hinstance, sLoc, MAX_PATH))
|
||||
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
|
||||
}
|
||||
}
|
||||
if (0 == hAppIcon && 0 == hAppIconSm)
|
||||
{
|
||||
hAppIcon = LoadImage (NULL, IDI_APPLICATION, IMAGE_ICON,
|
||||
GetSystemMetrics (SM_CXICON),
|
||||
GetSystemMetrics (SM_CYICON), 0);
|
||||
hAppIconSm = LoadImage (NULL, IDI_APPLICATION, IMAGE_ICON,
|
||||
GetSystemMetrics (SM_CXSMICON),
|
||||
GetSystemMetrics (SM_CYSMICON), 0);
|
||||
}
|
||||
}
|
||||
if (0 == hAppIcon)
|
||||
hAppIcon = hAppIconSm;
|
||||
else if (0 == hAppIconSm)
|
||||
hAppIconSm = hAppIcon;
|
||||
|
||||
wcl.lpszMenuName = NULL;
|
||||
wcl.hIconSm = 0;
|
||||
|
||||
/* initialize once per class */
|
||||
/*
|
||||
@@ -409,7 +421,7 @@ RegisterGdkClass (GdkWindowType wtype)
|
||||
*/
|
||||
#define ONCE_PER_CLASS() \
|
||||
wcl.hIcon = CopyIcon (hAppIcon); \
|
||||
wcl.hIconSm = CopyIcon (hAppIcon); \
|
||||
wcl.hIconSm = CopyIcon (hAppIconSm); \
|
||||
wcl.hbrBackground = NULL; \
|
||||
wcl.hCursor = LoadCursor (NULL, IDC_ARROW);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <winver.h>
|
||||
|
||||
GTK_ICON ICON "gtk.ico"
|
||||
GTK_ICON ICON "@srcdir@/gtk.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @GTK_MAJOR_VERSION@,@GTK_MINOR_VERSION@,@GTK_MICRO_VERSION@,0
|
||||
|
||||
@@ -9,7 +9,6 @@ INCLUDES = \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
|
||||
+11
-10
@@ -785,7 +785,7 @@ gdk_display_x11_finalize (GObject *object)
|
||||
g_list_free (display_x11->input_devices);
|
||||
|
||||
/* input GdkWindow list */
|
||||
g_list_foreach (display_x11->input_windows, (GFunc) g_object_unref, NULL);
|
||||
g_list_foreach (display_x11->input_windows, (GFunc) g_free, NULL);
|
||||
g_list_free (display_x11->input_windows);
|
||||
|
||||
/* Free all GdkScreens */
|
||||
@@ -996,24 +996,25 @@ broadcast_xmessage (GdkDisplay *display,
|
||||
message_type_begin);
|
||||
|
||||
{
|
||||
XEvent xevent;
|
||||
XClientMessageEvent xclient;
|
||||
const char *src;
|
||||
const char *src_end;
|
||||
char *dest;
|
||||
char *dest_end;
|
||||
|
||||
xevent.xclient.type = ClientMessage;
|
||||
xevent.xclient.message_type = type_atom_begin;
|
||||
xevent.xclient.display =xdisplay;
|
||||
xevent.xclient.window = xwindow;
|
||||
xevent.xclient.format = 8;
|
||||
memset(&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.message_type = type_atom_begin;
|
||||
xclient.display =xdisplay;
|
||||
xclient.window = xwindow;
|
||||
xclient.format = 8;
|
||||
|
||||
src = message;
|
||||
src_end = message + strlen (message) + 1; /* +1 to include nul byte */
|
||||
|
||||
while (src != src_end)
|
||||
{
|
||||
dest = &xevent.xclient.data.b[0];
|
||||
dest = &xclient.data.b[0];
|
||||
dest_end = dest + 20;
|
||||
|
||||
while (dest != dest_end &&
|
||||
@@ -1034,9 +1035,9 @@ broadcast_xmessage (GdkDisplay *display,
|
||||
xroot_window,
|
||||
False,
|
||||
PropertyChangeMask,
|
||||
&xevent);
|
||||
(XEvent *)&xclient);
|
||||
|
||||
xevent.xclient.message_type = type_atom;
|
||||
xclient.message_type = type_atom;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-19
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* Modified by the GTK+ Team and others 1997-2007. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
@@ -176,15 +176,13 @@ _gdk_x11_events_init_screen (GdkScreen *screen)
|
||||
/* Keep a flag to avoid extra notifies that we don't need
|
||||
*/
|
||||
screen_x11->xsettings_in_init = TRUE;
|
||||
screen_x11->xsettings_client = xsettings_client_new (screen_x11->xdisplay,
|
||||
screen_x11->screen_num,
|
||||
gdk_xsettings_notify_cb,
|
||||
gdk_xsettings_watch_cb,
|
||||
screen);
|
||||
xsettings_client_set_grab_func (screen_x11->xsettings_client,
|
||||
refcounted_grab_server);
|
||||
xsettings_client_set_ungrab_func (screen_x11->xsettings_client,
|
||||
refcounted_ungrab_server);
|
||||
screen_x11->xsettings_client = xsettings_client_new_with_grab_funcs (screen_x11->xdisplay,
|
||||
screen_x11->screen_num,
|
||||
gdk_xsettings_notify_cb,
|
||||
gdk_xsettings_watch_cb,
|
||||
screen,
|
||||
refcounted_grab_server,
|
||||
refcounted_ungrab_server);
|
||||
screen_x11->xsettings_in_init = FALSE;
|
||||
}
|
||||
|
||||
@@ -2192,13 +2190,13 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
|
||||
!_gdk_x11_display_is_root_window (display,
|
||||
xevent->xclient.window))
|
||||
{
|
||||
XEvent xev = *xevent;
|
||||
XClientMessageEvent xclient = xevent->xclient;
|
||||
|
||||
xev.xclient.window = GDK_WINDOW_XROOTWIN (win);
|
||||
xclient.window = GDK_WINDOW_XROOTWIN (win);
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (win),
|
||||
xev.xclient.window,
|
||||
xclient.window,
|
||||
False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
|
||||
SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *)&xclient);
|
||||
|
||||
return GDK_FILTER_REMOVE;
|
||||
}
|
||||
@@ -3008,16 +3006,13 @@ gdk_xsettings_watch_cb (Window window,
|
||||
{
|
||||
if (!gdkwin)
|
||||
gdkwin = gdk_window_foreign_new_for_display (gdk_screen_get_display (screen), window);
|
||||
else
|
||||
g_object_ref (gdkwin);
|
||||
|
||||
gdk_window_add_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_assert (gdkwin);
|
||||
gdk_window_remove_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
|
||||
g_object_unref (gdkwin);
|
||||
if (gdkwin)
|
||||
gdk_window_remove_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,8 @@ gdk_font_name_hash_get (GdkDisplay *display)
|
||||
if (!result)
|
||||
{
|
||||
result = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
g_object_set_qdata (G_OBJECT (display), font_name_quark, result);
|
||||
g_object_set_qdata_full (G_OBJECT (display),
|
||||
font_name_quark, result, (GDestroyNotify) g_hash_table_destroy);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -87,7 +88,9 @@ gdk_fontset_name_hash_get (GdkDisplay *display)
|
||||
if (!result)
|
||||
{
|
||||
result = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
g_object_set_qdata (G_OBJECT (display), fontset_name_quark, result);
|
||||
|
||||
g_object_set_qdata_full (G_OBJECT (display),
|
||||
fontset_name_quark, result, (GDestroyNotify) g_hash_table_destroy);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "gdktypes.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
|
||||
Display *gdk_display = NULL;
|
||||
|
||||
@@ -579,6 +579,10 @@ _gdk_input_common_other_event (GdkEvent *event,
|
||||
event->button.state = gdk_input_translate_state(xdbe->state,xdbe->device_state);
|
||||
event->button.button = xdbe->button;
|
||||
|
||||
if (event->button.type == GDK_BUTTON_PRESS)
|
||||
_gdk_event_button_generate (gdk_drawable_get_display (event->button.window),
|
||||
event);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print ("button %s:\t\twindow: %ld device: %ld x,y: %f %f button: %d\n",
|
||||
(event->button.type == GDK_BUTTON_PRESS) ? "press" : "release",
|
||||
|
||||
@@ -150,7 +150,7 @@ _gdk_input_configure_event (XConfigureEvent *xevent,
|
||||
gint root_x, root_y;
|
||||
|
||||
input_window = _gdk_input_window_find(window);
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (input_window != NULL);
|
||||
|
||||
_gdk_input_get_root_relative_geometry(GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XWINDOW (window),
|
||||
@@ -168,7 +168,7 @@ _gdk_input_enter_event (XCrossingEvent *xevent,
|
||||
gint root_x, root_y;
|
||||
|
||||
input_window = _gdk_input_window_find (window);
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (input_window != NULL);
|
||||
|
||||
gdk_input_check_proximity(GDK_WINDOW_DISPLAY (window));
|
||||
|
||||
@@ -192,7 +192,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
GdkDisplayX11 *display_impl = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (window));
|
||||
|
||||
input_window = _gdk_input_window_find(window);
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
g_return_val_if_fail (input_window != NULL, FALSE);
|
||||
|
||||
/* This is a sort of a hack, as there isn't any XDeviceAnyEvent -
|
||||
but it's potentially faster than scanning through the types of
|
||||
|
||||
+14
-18
@@ -561,27 +561,23 @@ get_direction (XkbDescRec *xkb,
|
||||
|
||||
for (code = xkb->min_key_code; code <= xkb->max_key_code; code++)
|
||||
{
|
||||
gint width = XkbKeyGroupWidth (xkb, code, group);
|
||||
gint level;
|
||||
for (level = 0; level < width; level++)
|
||||
{
|
||||
KeySym sym = XkbKeySymEntry (xkb, code, level, group);
|
||||
PangoDirection dir = pango_unichar_direction (gdk_keyval_to_unicode (sym));
|
||||
gint level = 0;
|
||||
KeySym sym = XkbKeySymEntry (xkb, code, level, group);
|
||||
PangoDirection dir = pango_unichar_direction (gdk_keyval_to_unicode (sym));
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case PANGO_DIRECTION_RTL:
|
||||
rtl_minus_ltr++;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (dir)
|
||||
{
|
||||
case PANGO_DIRECTION_RTL:
|
||||
rtl_minus_ltr++;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (rtl_minus_ltr > 0)
|
||||
return PANGO_DIRECTION_RTL;
|
||||
else
|
||||
|
||||
@@ -804,7 +804,10 @@ _gdk_send_xevent (GdkDisplay *display,
|
||||
propagate, event_mask, event_send);
|
||||
XSync (GDK_DISPLAY_XDISPLAY (display), False);
|
||||
|
||||
return result && gdk_error_trap_pop() == Success;
|
||||
if (gdk_error_trap_pop ())
|
||||
return FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -22,13 +22,25 @@
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_CRT_EXTERNS_H
|
||||
#include <crt_externs.h> /* for _NSGetEnviron */
|
||||
#endif
|
||||
|
||||
#include "gdkspawn.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include "gdkalias.h"
|
||||
|
||||
#ifdef HAVE__NSGETENVIRON
|
||||
#define environ (*_NSGetEnviron())
|
||||
#else
|
||||
|
||||
/* According to the Single Unix Specification, environ is not in
|
||||
* any system header, although unistd.h often declares it.
|
||||
*/
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gdk_make_spawn_environment_for_screen:
|
||||
|
||||
+75
-77
@@ -1141,27 +1141,28 @@ _gdk_windowing_window_destroy_foreign (GdkWindow *window)
|
||||
* so reparent it to the root window, and then send
|
||||
* it a delete event, as if we were a WM
|
||||
*/
|
||||
XClientMessageEvent xevent;
|
||||
XClientMessageEvent xclient;
|
||||
|
||||
gdk_error_trap_push ();
|
||||
gdk_window_hide (window);
|
||||
gdk_window_reparent (window, NULL, 0, 0);
|
||||
|
||||
xevent.type = ClientMessage;
|
||||
xevent.window = GDK_WINDOW_XID (window);
|
||||
xevent.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
|
||||
memset (&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.window = GDK_WINDOW_XID (window);
|
||||
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
|
||||
"WM_PROTOCOLS");
|
||||
xevent.format = 32;
|
||||
xevent.data.l[0] = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
|
||||
xclient.format = 32;
|
||||
xclient.data.l[0] = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
|
||||
"WM_DELETE_WINDOW");
|
||||
xevent.data.l[1] = CurrentTime;
|
||||
xevent.data.l[2] = 0;
|
||||
xevent.data.l[3] = 0;
|
||||
xevent.data.l[4] = 0;
|
||||
xclient.data.l[1] = CurrentTime;
|
||||
xclient.data.l[2] = 0;
|
||||
xclient.data.l[3] = 0;
|
||||
xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window),
|
||||
False, 0, (XEvent *)&xevent);
|
||||
False, 0, (XEvent *)&xclient);
|
||||
gdk_display_sync (GDK_WINDOW_DISPLAY (window));
|
||||
gdk_error_trap_pop ();
|
||||
}
|
||||
@@ -2029,7 +2030,6 @@ move_to_current_desktop (GdkWindow *window)
|
||||
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
|
||||
gdk_atom_intern_static_string ("_NET_WM_DESKTOP")))
|
||||
{
|
||||
XEvent xev;
|
||||
Atom type;
|
||||
gint format;
|
||||
gulong nitems;
|
||||
@@ -2052,26 +2052,28 @@ move_to_current_desktop (GdkWindow *window)
|
||||
|
||||
if (type == XA_CARDINAL)
|
||||
{
|
||||
XClientMessageEvent xclient;
|
||||
current_desktop = (gulong *)data;
|
||||
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (window);
|
||||
xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP");
|
||||
xev.xclient.format = 32;
|
||||
memset (&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.serial = 0;
|
||||
xclient.send_event = True;
|
||||
xclient.window = GDK_WINDOW_XWINDOW (window);
|
||||
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP");
|
||||
xclient.format = 32;
|
||||
|
||||
xev.xclient.data.l[0] = *current_desktop;
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = 0;
|
||||
xev.xclient.data.l[3] = 0;
|
||||
xev.xclient.data.l[4] = 0;
|
||||
xclient.data.l[0] = *current_desktop;
|
||||
xclient.data.l[1] = 0;
|
||||
xclient.data.l[2] = 0;
|
||||
xclient.data.l[3] = 0;
|
||||
xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent (GDK_DISPLAY_XDISPLAY (display),
|
||||
GDK_WINDOW_XROOTWIN (window),
|
||||
False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
(XEvent *)&xclient);
|
||||
|
||||
XFree (current_desktop);
|
||||
}
|
||||
@@ -2103,24 +2105,23 @@ gdk_window_focus (GdkWindow *window,
|
||||
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
|
||||
gdk_atom_intern_static_string ("_NET_ACTIVE_WINDOW")))
|
||||
{
|
||||
XEvent xev;
|
||||
XClientMessageEvent xclient;
|
||||
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (window);
|
||||
xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display,
|
||||
memset (&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.window = GDK_WINDOW_XWINDOW (window);
|
||||
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display,
|
||||
"_NET_ACTIVE_WINDOW");
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = 1; /* requestor type; we're an app */
|
||||
xev.xclient.data.l[1] = timestamp;
|
||||
xev.xclient.data.l[2] = None; /* currently active window */
|
||||
xev.xclient.data.l[3] = 0;
|
||||
xev.xclient.data.l[4] = 0;
|
||||
xclient.format = 32;
|
||||
xclient.data.l[0] = 1; /* requestor type; we're an app */
|
||||
xclient.data.l[1] = timestamp;
|
||||
xclient.data.l[2] = None; /* currently active window */
|
||||
xclient.data.l[3] = 0;
|
||||
xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
(XEvent *)&xclient);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2366,27 +2367,26 @@ gdk_wmspec_change_state (gboolean add,
|
||||
GdkAtom state2)
|
||||
{
|
||||
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
|
||||
XEvent xev;
|
||||
XClientMessageEvent xclient;
|
||||
|
||||
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
|
||||
#define _NET_WM_STATE_ADD 1 /* add/set property */
|
||||
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
|
||||
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.window = GDK_WINDOW_XID (window);
|
||||
xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE");
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = add ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
|
||||
xev.xclient.data.l[1] = gdk_x11_atom_to_xatom_for_display (display, state1);
|
||||
xev.xclient.data.l[2] = gdk_x11_atom_to_xatom_for_display (display, state2);
|
||||
xev.xclient.data.l[3] = 0;
|
||||
xev.xclient.data.l[4] = 0;
|
||||
memset (&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.window = GDK_WINDOW_XID (window);
|
||||
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE");
|
||||
xclient.format = 32;
|
||||
xclient.data.l[0] = add ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
|
||||
xclient.data.l[1] = gdk_x11_atom_to_xatom_for_display (display, state1);
|
||||
xclient.data.l[2] = gdk_x11_atom_to_xatom_for_display (display, state2);
|
||||
xclient.data.l[3] = 0;
|
||||
xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XROOTWIN (window), False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
(XEvent *)&xclient);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4559,7 +4559,7 @@ gdk_window_stick (GdkWindow *window)
|
||||
* viewport. i.e. glue to the monitor glass in all cases.
|
||||
*/
|
||||
|
||||
XEvent xev;
|
||||
XClientMessageEvent xclient;
|
||||
|
||||
/* Request stick during viewport scroll */
|
||||
gdk_wmspec_change_state (TRUE, window,
|
||||
@@ -4567,24 +4567,23 @@ gdk_window_stick (GdkWindow *window)
|
||||
NULL);
|
||||
|
||||
/* Request desktop 0xFFFFFFFF */
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.window = GDK_WINDOW_XWINDOW (window);
|
||||
xev.xclient.display = GDK_WINDOW_XDISPLAY (window);
|
||||
xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
|
||||
memset (&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.window = GDK_WINDOW_XWINDOW (window);
|
||||
xclient.display = GDK_WINDOW_XDISPLAY (window);
|
||||
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
|
||||
"_NET_WM_DESKTOP");
|
||||
xev.xclient.format = 32;
|
||||
xclient.format = 32;
|
||||
|
||||
xev.xclient.data.l[0] = 0xFFFFFFFF;
|
||||
xev.xclient.data.l[1] = 0;
|
||||
xev.xclient.data.l[2] = 0;
|
||||
xev.xclient.data.l[3] = 0;
|
||||
xev.xclient.data.l[4] = 0;
|
||||
xclient.data.l[0] = 0xFFFFFFFF;
|
||||
xclient.data.l[1] = 0;
|
||||
xclient.data.l[2] = 0;
|
||||
xclient.data.l[3] = 0;
|
||||
xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XROOTWIN (window), False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
(XEvent *)&xclient);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5624,27 +5623,26 @@ wmspec_moveresize (GdkWindow *window,
|
||||
{
|
||||
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
|
||||
|
||||
XEvent xev;
|
||||
XClientMessageEvent xclient;
|
||||
|
||||
/* Release passive grab */
|
||||
gdk_display_pointer_ungrab (display, timestamp);
|
||||
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.window = GDK_WINDOW_XID (window);
|
||||
xev.xclient.message_type =
|
||||
memset (&xclient, 0, sizeof (xclient));
|
||||
xclient.type = ClientMessage;
|
||||
xclient.window = GDK_WINDOW_XID (window);
|
||||
xclient.message_type =
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_MOVERESIZE");
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = root_x;
|
||||
xev.xclient.data.l[1] = root_y;
|
||||
xev.xclient.data.l[2] = direction;
|
||||
xev.xclient.data.l[3] = 0;
|
||||
xev.xclient.data.l[4] = 0;
|
||||
xclient.format = 32;
|
||||
xclient.data.l[0] = root_x;
|
||||
xclient.data.l[1] = root_y;
|
||||
xclient.data.l[2] = direction;
|
||||
xclient.data.l[3] = 0;
|
||||
xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
(XEvent *)&xclient);
|
||||
}
|
||||
|
||||
typedef struct _MoveResizeData MoveResizeData;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2001 Red Hat, Inc.
|
||||
* Copyright © 2001, 2007 Red Hat, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
@@ -454,6 +454,19 @@ xsettings_client_new (Display *display,
|
||||
XSettingsNotifyFunc notify,
|
||||
XSettingsWatchFunc watch,
|
||||
void *cb_data)
|
||||
{
|
||||
return xsettings_client_new_with_grab_funcs (display, screen, notify, watch, cb_data,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
XSettingsClient *
|
||||
xsettings_client_new_with_grab_funcs (Display *display,
|
||||
int screen,
|
||||
XSettingsNotifyFunc notify,
|
||||
XSettingsWatchFunc watch,
|
||||
void *cb_data,
|
||||
XSettingsGrabFunc grab,
|
||||
XSettingsGrabFunc ungrab)
|
||||
{
|
||||
XSettingsClient *client;
|
||||
char buffer[256];
|
||||
@@ -469,8 +482,8 @@ xsettings_client_new (Display *display,
|
||||
client->notify = notify;
|
||||
client->watch = watch;
|
||||
client->cb_data = cb_data;
|
||||
client->grab = NULL;
|
||||
client->ungrab = NULL;
|
||||
client->grab = grab;
|
||||
client->ungrab = ungrab;
|
||||
|
||||
client->manager_window = None;
|
||||
client->settings = NULL;
|
||||
@@ -505,6 +518,7 @@ xsettings_client_new (Display *display,
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
xsettings_client_set_grab_func (XSettingsClient *client,
|
||||
XSettingsGrabFunc grab)
|
||||
@@ -571,7 +585,8 @@ xsettings_client_process_event (XSettingsClient *client,
|
||||
if (xev->xany.type == DestroyNotify)
|
||||
{
|
||||
check_manager_window (client);
|
||||
return True;
|
||||
/* let GDK do its cleanup */
|
||||
return False;
|
||||
}
|
||||
else if (xev->xany.type == PropertyNotify)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2001 Red Hat, Inc.
|
||||
* Copyright © 2001, 2007 Red Hat, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
@@ -54,6 +54,13 @@ XSettingsClient *xsettings_client_new (Display *display,
|
||||
XSettingsNotifyFunc notify,
|
||||
XSettingsWatchFunc watch,
|
||||
void *cb_data);
|
||||
XSettingsClient *xsettings_client_new_with_grab_funcs (Display *display,
|
||||
int screen,
|
||||
XSettingsNotifyFunc notify,
|
||||
XSettingsWatchFunc watch,
|
||||
void *cb_data,
|
||||
XSettingsGrabFunc grab,
|
||||
XSettingsGrabFunc ungrab);
|
||||
void xsettings_client_set_grab_func (XSettingsClient *client,
|
||||
XSettingsGrabFunc grab);
|
||||
void xsettings_client_set_ungrab_func (XSettingsClient *client,
|
||||
|
||||
@@ -33,6 +33,7 @@ extern "C" {
|
||||
#define xsettings_client_destroy _gdk_xsettings_client_destroy
|
||||
#define xsettings_client_get_setting _gdk_xsettings_client_get_setting
|
||||
#define xsettings_client_new _gdk_xsettings_client_new
|
||||
#define xsettings_client_new_with_grab_funcs _gdk_xsettings_client_new_with_grab_funcs
|
||||
#define xsettings_client_set_grab_func _gdk_xsettings_client_set_grab_func
|
||||
#define xsettings_client_set_ungrab_func _gdk_xsettings_client_set_ungrab_func
|
||||
#define xsettings_client_process_event _gdk_xsettings_client_process_event
|
||||
|
||||
+90
-49
@@ -33,7 +33,6 @@ INCLUDES = \
|
||||
-I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED \
|
||||
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
@@ -89,8 +88,15 @@ gtkalias.h: gtk.symbols
|
||||
gtkaliasdef.c: gtk.symbols
|
||||
$(PERL) $(srcdir)/makegtkalias.pl -def < $(srcdir)/gtk.symbols > gtkaliasdef.c
|
||||
|
||||
check-aliases:
|
||||
@$(TESTS_ENVIRONMENT) $(srcdir)/aliasfilescheck.sh
|
||||
|
||||
.PHONY: check-aliases
|
||||
|
||||
TESTS_ENVIRONMENT = srcdir="$(srcdir)" gtk_all_c_sources="$(gtk_all_c_sources)"
|
||||
TESTS = aliasfilescheck.sh
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
TESTS += abicheck.sh pltcheck.sh
|
||||
endif
|
||||
|
||||
# libtool stuff: set version and export symbols for resolving
|
||||
@@ -319,7 +325,7 @@ gtk_unix_print_public_h_sources = \
|
||||
|
||||
|
||||
# Installed header files without compatibility guarantees
|
||||
# that are not include in gtk/gtk.h
|
||||
# that are not included in gtk/gtk.h
|
||||
gtk_semi_private_h_sources = \
|
||||
gtktextlayout.h \
|
||||
gtkfilesystem.h
|
||||
@@ -336,7 +342,11 @@ gtk_private_h_sources = \
|
||||
gtkfilechooserutils.h \
|
||||
gtkfilesystemmodel.h \
|
||||
gtkfilesystemunix.h \
|
||||
gtkhsv.h \
|
||||
gtkiconcache.h \
|
||||
gtkintl.h \
|
||||
gtkkeyhash.h \
|
||||
gtkmnemonichash.h \
|
||||
gtkpathbar.h \
|
||||
gtkplugprivate.h \
|
||||
gtkprintoperation-private.h\
|
||||
@@ -348,6 +358,7 @@ gtk_private_h_sources = \
|
||||
gtksequence.h \
|
||||
gtksocketprivate.h \
|
||||
gtktextbtree.h \
|
||||
gtktextbufferserialize.h\
|
||||
gtktextchildprivate.h \
|
||||
gtktextiterprivate.h \
|
||||
gtktextmarkprivate.h \
|
||||
@@ -362,7 +373,7 @@ gtk_private_h_sources = \
|
||||
gtkwindow-decorate.h
|
||||
|
||||
# GTK+ C sources to build the library from
|
||||
gtk_c_sources = \
|
||||
gtk_base_c_sources = \
|
||||
fnmatch.c \
|
||||
gtkaboutdialog.c \
|
||||
gtkaccelgroup.c \
|
||||
@@ -440,7 +451,6 @@ gtk_c_sources = \
|
||||
gtkhscrollbar.c \
|
||||
gtkhseparator.c \
|
||||
gtkhsv.c \
|
||||
gtkhsv.h \
|
||||
gtkiconcache.c \
|
||||
gtkiconfactory.c \
|
||||
gtkicontheme.c \
|
||||
@@ -452,12 +462,10 @@ gtk_c_sources = \
|
||||
gtkimmodule.c \
|
||||
gtkimmulticontext.c \
|
||||
gtkinputdialog.c \
|
||||
gtkintl.h \
|
||||
gtkinvisible.c \
|
||||
gtkitem.c \
|
||||
gtkitemfactory.c \
|
||||
gtkkeyhash.c \
|
||||
gtkkeyhash.h \
|
||||
gtklabel.c \
|
||||
gtklayout.c \
|
||||
gtklinkbutton.c \
|
||||
@@ -475,7 +483,6 @@ gtk_c_sources = \
|
||||
gtkmessagedialog.c \
|
||||
gtkmisc.c \
|
||||
gtkmnemonichash.c \
|
||||
gtkmnemonichash.h \
|
||||
gtkmodules.c \
|
||||
gtknotebook.c \
|
||||
gtkobject.c \
|
||||
@@ -535,14 +542,11 @@ gtk_c_sources = \
|
||||
gtktextbuffer.c \
|
||||
gtktextbufferrichtext.c \
|
||||
gtktextbufferserialize.c\
|
||||
gtktextbufferserialize.h\
|
||||
gtktextchild.c \
|
||||
gtktextdisplay.c \
|
||||
gtktextiter.c \
|
||||
gtktextiterprivate.h \
|
||||
gtktextlayout.c \
|
||||
gtktextmark.c \
|
||||
gtktextmarkprivate.h \
|
||||
gtktextsegment.c \
|
||||
gtktexttag.c \
|
||||
gtktexttagtable.c \
|
||||
@@ -584,19 +588,11 @@ gtk_c_sources = \
|
||||
gtkwidget.c \
|
||||
gtkwindow-decorate.c \
|
||||
gtkwindow.c \
|
||||
xembed.h \
|
||||
$(gtk_clipboard_dnd_c_sources)
|
||||
gtk_c_sources = $(gtk_base_c_sources)
|
||||
gtk_all_c_sources = $(gtk_base_c_sources)
|
||||
|
||||
if OS_UNIX
|
||||
gtk_private_h_sources += \
|
||||
gtkfilesystemunix.h \
|
||||
gtkprintbackend.h \
|
||||
gtkprinter-private.h \
|
||||
gtkprinteroption.h \
|
||||
gtkprinteroptionset.h \
|
||||
gtkprinteroptionwidget.h
|
||||
|
||||
gtk_c_sources += \
|
||||
gtk_os_unix_c_sources = \
|
||||
gtkfilesystemunix.c \
|
||||
gtkpagesetupunixdialog.c \
|
||||
gtkprinter.c \
|
||||
@@ -607,30 +603,51 @@ gtk_c_sources += \
|
||||
gtkprintoperation-unix.c \
|
||||
gtkprintunixdialog.c \
|
||||
gtkprintbackend.c
|
||||
gtk_all_c_sources += $(gtk_os_unix_c_sources)
|
||||
if OS_UNIX
|
||||
gtk_private_h_sources += \
|
||||
gtkfilesystemunix.h \
|
||||
gtkprintbackend.h \
|
||||
gtkprinter-private.h \
|
||||
gtkprinteroption.h \
|
||||
gtkprinteroptionset.h \
|
||||
gtkprinteroptionwidget.h
|
||||
gtk_c_sources += $(gtk_os_unix_c_sources)
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
gtk_private_h_sources += gtkfilesystemwin32.h gtkprint-win32.h
|
||||
|
||||
gtk_c_sources += \
|
||||
gtk_os_win32_c_sources = \
|
||||
gtkfilesystemwin32.c \
|
||||
gtkprint-win32.c \
|
||||
gtkprintoperation-win32.c
|
||||
gtk_all_c_sources += $(gtk_os_win32_c_sources)
|
||||
if OS_WIN32
|
||||
gtk_private_h_sources += gtkfilesystemwin32.h gtkprint-win32.h
|
||||
gtk_c_sources += $(gtk_os_win32_c_sources)
|
||||
endif
|
||||
|
||||
if USE_X11
|
||||
gtk_private_h_sources += gtkxembed.h gtktrayicon.h
|
||||
gtk_c_sources += \
|
||||
gtk_use_x11_c_sources = \
|
||||
gtkplug-x11.c \
|
||||
gtksocket-x11.c \
|
||||
gtkxembed.c \
|
||||
gtktrayicon-x11.c
|
||||
gtk_use_win32_c_sources = \
|
||||
gtkplug-win32.c \
|
||||
gtksocket-win32.c \
|
||||
gtkwin32embed.c \
|
||||
gtkwin32embedwidget.c
|
||||
gtk_use_stuc_c_sources = \
|
||||
gtkplug-stub.c \
|
||||
gtksocket-stub.c
|
||||
gtk_all_c_sources += $(gtk_use_x11_c_sources) $(gtk_use_win32_c_sources) $(gtk_use_stuc_c_sources)
|
||||
if USE_X11
|
||||
gtk_private_h_sources += gtkxembed.h gtktrayicon.h xembed.h
|
||||
gtk_c_sources += $(gtk_use_x11_c_sources)
|
||||
else
|
||||
if USE_WIN32
|
||||
gtk_private_h_sources += gtkwin32embed.h gtkwin32embedwidget.h
|
||||
gtk_c_sources += gtkplug-win32.c gtksocket-win32.c gtkwin32embed.c gtkwin32embedwidget.c
|
||||
gtk_c_sources += $(gtk_use_win32_c_sources)
|
||||
else
|
||||
gtk_c_sources += gtkplug-stub.c gtksocket-stub.c
|
||||
gtk_c_sources += $(gtk_use_stub_c_sources)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -653,7 +670,7 @@ gtk_built_public_sources = \
|
||||
gtkmarshal.h \
|
||||
gtktypebuiltins.h
|
||||
|
||||
# built sources that don't get installed
|
||||
# built headers that don't get installed
|
||||
gtk_built_private_headers = \
|
||||
gtkalias.h \
|
||||
gtkmarshalers.h \
|
||||
@@ -663,7 +680,6 @@ gtk_built_sources = \
|
||||
gtkaliasdef.c \
|
||||
gtktypebuiltins.c \
|
||||
gtkmarshalers.c \
|
||||
gtkmarshalers.h \
|
||||
gtkmarshal.c \
|
||||
${gtk_built_private_headers} \
|
||||
${gtk_built_public_sources}
|
||||
@@ -717,7 +733,9 @@ stamp-gtkmarshalers.h: @REBUILD@ gtkmarshalers.list
|
||||
&& rm -f xgen-gmlh \
|
||||
&& echo timestamp > $(@F)
|
||||
gtkmarshalers.c: @REBUILD@ gtkmarshalers.list
|
||||
(echo "#include \"gtkalias.h\""; $(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \
|
||||
(echo "#include \"gtkmarshalers.h\""; \
|
||||
echo "#include \"gtkalias.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \
|
||||
&& cp xgen-gmlc gtkmarshalers.c \
|
||||
&& rm -f xgen-gmlc
|
||||
|
||||
@@ -731,7 +749,11 @@ stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list
|
||||
&& rm -f xgen-gmh \
|
||||
&& echo timestamp > $(@F)
|
||||
gtkmarshal.c: @REBUILD@ gtkmarshal.list
|
||||
(echo "#include \"gtkalias.h\""; $(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --body) >> xgen-gmc \
|
||||
(echo "#include \"gtkmarshal.h\""; \
|
||||
echo "#include \"gtkalias.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --body; \
|
||||
echo "#define __gtk_marshal_MARSHAL_C__"; \
|
||||
echo "#include \"gtkaliasdef.c\"") >> xgen-gmc \
|
||||
&& cp xgen-gmc gtkmarshal.c \
|
||||
&& rm -f xgen-gmc
|
||||
|
||||
@@ -1072,23 +1094,40 @@ stamp-icons: $(STOCK_ICONS)
|
||||
fi && \
|
||||
for i in 16 24; do \
|
||||
(cd stock-icons/$$i \
|
||||
&& $(LN_S) -f gtk-go-forward-ltr.png gtk-go-back-rtl.png \
|
||||
&& $(LN_S) -f gtk-go-back-ltr.png gtk-go-forward-rtl.png \
|
||||
&& $(LN_S) -f gtk-goto-last-ltr.png gtk-goto-first-rtl.png \
|
||||
&& $(LN_S) -f gtk-goto-first-ltr.png gtk-goto-last-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-rewind-ltr.png gtk-media-forward-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-previous-ltr.png gtk-media-next-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-next-ltr.png gtk-media-previous-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-forward-ltr.png gtk-media-rewind-rtl.png \
|
||||
&& $(LN_S) -f gtk-floppy.png gtk-save.png) \
|
||||
&& $(RM) gtk-go-back-rtl.png \
|
||||
&& $(LN_S) gtk-go-forward-ltr.png gtk-go-back-rtl.png \
|
||||
&& $(RM) gtk-go-forward-rtl.png \
|
||||
&& $(LN_S) gtk-go-back-ltr.png gtk-go-forward-rtl.png \
|
||||
&& $(RM) gtk-goto-first-rtl.png \
|
||||
&& $(LN_S) gtk-goto-last-ltr.png gtk-goto-first-rtl.png \
|
||||
&& $(RM) gtk-goto-last-rtl.png \
|
||||
&& $(LN_S) gtk-goto-first-ltr.png gtk-goto-last-rtl.png \
|
||||
&& $(RM) gtk-media-forward-rtl.png \
|
||||
&& $(LN_S) gtk-media-rewind-ltr.png gtk-media-forward-rtl.png \
|
||||
&& $(RM) gtk-media-next-rtl.png \
|
||||
&& $(LN_S) gtk-media-previous-ltr.png gtk-media-next-rtl.png \
|
||||
&& $(RM) gtk-media-previous-rtl.png \
|
||||
&& $(LN_S) gtk-media-next-ltr.png gtk-media-previous-rtl.png \
|
||||
&& $(RM) gtk-media-rewind-rtl.png \
|
||||
&& $(LN_S) gtk-media-forward-ltr.png gtk-media-rewind-rtl.png \
|
||||
&& $(RM) gtk-save.png \
|
||||
&& $(LN_S) gtk-floppy.png gtk-save.png) \
|
||||
done \
|
||||
&& touch stamp-icons
|
||||
|
||||
gtkbuiltincache.h: @REBUILD@ stamp-icons
|
||||
$(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache
|
||||
if CROSS_COMPILING
|
||||
gtk_update_icon_cache_program = $(GTK_UPDATE_ICON_CACHE)
|
||||
else
|
||||
gtk_update_icon_cache_program = \
|
||||
GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders \
|
||||
./gtk-update-icon-cache --force --ignore-theme-index \
|
||||
--source builtin_icons stock-icons > gtkbuiltincache.h
|
||||
./gtk-update-icon-cache
|
||||
endif
|
||||
|
||||
gtkbuiltincache.h: @REBUILD@ stamp-icons
|
||||
$(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
|
||||
$(gtk_update_icon_cache_program) --force --ignore-theme-index \
|
||||
--source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
|
||||
mv gtkbuiltincache.h.tmp gtkbuiltincache.h
|
||||
|
||||
EXTRA_DIST += \
|
||||
$(STOCK_ICONS) \
|
||||
@@ -1115,6 +1154,8 @@ EXTRA_DIST += \
|
||||
makefile.msc \
|
||||
makefile.msc.in \
|
||||
makegtkalias.pl \
|
||||
abicheck.sh
|
||||
abicheck.sh \
|
||||
aliasfilescheck.sh \
|
||||
pltcheck.sh
|
||||
|
||||
install-data-local:
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
cpp -DINCLUDE_VARIABLES -P -DG_OS_UNIX -DGTK_WINDOWING_X11 -DALL_FILES ${srcdir:-.}/gtk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' | sort > expected-abi
|
||||
nm -D -g --defined-only .libs/libgtk-x11-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm expected-abi actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test "x$gtk_all_c_sources" = x; then
|
||||
echo gtk_all_c_sources variable not defined
|
||||
exit 1
|
||||
fi
|
||||
|
||||
grep 'IN_FILE' ${srcdir-.}/gtk.symbols | sed 's/.*(//;s/).*//' | grep __ | sort -u > expected-files
|
||||
{ cd ${srcdir-.}; grep '^ *# *define __' $gtk_all_c_sources; } | sed 's/.*define //;s/ *$//' | sort > actual-files
|
||||
|
||||
diff expected-files actual-files && rm -f expected-files actual-files
|
||||
@@ -169,7 +169,10 @@ main (int argc, char *argv[])
|
||||
{
|
||||
if (names[i].suffix != -1)
|
||||
{
|
||||
j = names[i].suffix;
|
||||
j = i;
|
||||
do {
|
||||
j = names[j].suffix;
|
||||
} while (names[j].suffix != -1);
|
||||
names[i].offset = names[j].offset + names[j].len - names[i].len;
|
||||
}
|
||||
}
|
||||
@@ -185,7 +188,7 @@ main (int argc, char *argv[])
|
||||
printf ("#endif\n\n");
|
||||
|
||||
/* write strings */
|
||||
printf ("const char paper_names[] =");
|
||||
printf ("const char _gtk_paper_names[] =");
|
||||
for (i = 0; i < n_names; i++)
|
||||
{
|
||||
if (names[i].suffix == -1)
|
||||
@@ -201,7 +204,7 @@ main (int argc, char *argv[])
|
||||
" int display_name;\n"
|
||||
" int ppd_name;\n"
|
||||
"} PaperInfo;\n\n"
|
||||
"const PaperInfo standard_names_offsets[] = {\n");
|
||||
"const PaperInfo _gtk_standard_names_offsets[] = {\n");
|
||||
|
||||
for (i = 0; i < n_infos; i++)
|
||||
{
|
||||
@@ -224,7 +227,7 @@ main (int argc, char *argv[])
|
||||
printf ("const struct {\n"
|
||||
" int ppd_name;\n"
|
||||
" int standard_name;\n"
|
||||
"} extra_ppd_names_offsets[] = {\n");
|
||||
"} _gtk_extra_ppd_names_offsets[] = {\n");
|
||||
|
||||
for (i = 0; i < n_extra; i++)
|
||||
{
|
||||
|
||||
+26
-14
@@ -596,8 +596,8 @@ gtk_check_button_new_with_mnemonic
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_MENU_CHECK_ITEM_H__)
|
||||
#if IN_FILE(__GTK_MENU_CHECK_ITEM_C__)
|
||||
#if IN_HEADER(__GTK_CHECK_MENU_ITEM_H__)
|
||||
#if IN_FILE(__GTK_CHECK_MENU_ITEM_C__)
|
||||
gtk_check_menu_item_get_active
|
||||
gtk_check_menu_item_get_draw_as_radio
|
||||
gtk_check_menu_item_get_inconsistent
|
||||
@@ -884,8 +884,8 @@ gtk_container_unset_focus_chain
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__C_TREE_H__)
|
||||
#if IN_FILE(__G_TREE_C__)
|
||||
#if IN_HEADER(__GTK_CTREE_H__)
|
||||
#if IN_FILE(__GTK_CTREE_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_ctree_collapse
|
||||
gtk_ctree_collapse_recursive
|
||||
@@ -1431,6 +1431,7 @@ gtk_file_path_get_type G_GNUC_CONST
|
||||
gtk_file_paths_copy
|
||||
gtk_file_paths_free
|
||||
gtk_file_paths_sort
|
||||
gtk_file_system_create
|
||||
gtk_file_system_cancel_operation
|
||||
gtk_file_system_create_folder
|
||||
gtk_file_system_error_quark
|
||||
@@ -1477,7 +1478,6 @@ gtk_file_system_unix_new
|
||||
#ifdef G_OS_WIN32
|
||||
gtk_file_system_win32_get_type G_GNUC_CONST
|
||||
gtk_file_system_win32_new
|
||||
_gtk_file_system_win32_path_compare
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@@ -1537,8 +1537,8 @@ gtk_font_button_set_use_size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_FONSEL_H__)
|
||||
#if IN_FILE(__GTK_FONSEL_C__)
|
||||
#if IN_HEADER(__GTK_FONTSEL_H__)
|
||||
#if IN_FILE(__GTK_FONTSEL_C__)
|
||||
gtk_font_selection_dialog_get_font_name
|
||||
gtk_font_selection_dialog_get_preview_text
|
||||
gtk_font_selection_dialog_get_type G_GNUC_CONST
|
||||
@@ -1939,7 +1939,7 @@ gtk_item_toggle
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_ITEM__FACTORY_H__)
|
||||
#if IN_HEADER(__GTK_ITEM_FACTORY_H__)
|
||||
#if IN_FILE(__GTK_ITEM_FACTORY_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_item_factories_path_delete
|
||||
@@ -2189,6 +2189,7 @@ gtk_input_dialog_new
|
||||
|
||||
#if IN_HEADER(__gtk_marshal_MARSHAL_H__)
|
||||
#if IN_FILE(__gtk_marshal_MARSHAL_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_marshal_BOOLEAN__POINTER
|
||||
gtk_marshal_BOOLEAN__POINTER_INT_INT
|
||||
gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT
|
||||
@@ -2217,6 +2218,7 @@ gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM
|
||||
gtk_marshal_VOID__UINT_STRING
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_MENU_BAR_H__)
|
||||
#if IN_FILE(__GTK_MENU_BAR_C__)
|
||||
@@ -4371,19 +4373,21 @@ gtk_vbox_new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_VBUTTONBOX_H__)
|
||||
#if IN_FILE(__GTK_VBUTTONBOX_C__)
|
||||
#if IN_HEADER(__GTK_VBBOX_H__)
|
||||
#if IN_FILE(__GTK_VBBOX_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_vbutton_box_get_layout_default
|
||||
gtk_vbutton_box_get_spacing_default
|
||||
gtk_vbutton_box_get_type G_GNUC_CONST
|
||||
gtk_vbutton_box_new
|
||||
gtk_vbutton_box_set_layout_default
|
||||
gtk_vbutton_box_set_spacing_default
|
||||
#endif
|
||||
gtk_vbutton_box_get_type G_GNUC_CONST
|
||||
gtk_vbutton_box_new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_VIEPORT_H__)
|
||||
#if IN_FILE(__GTK_VIEPORT_C__)
|
||||
#if IN_HEADER(__GTK_VIEWPORT_H__)
|
||||
#if IN_FILE(__GTK_VIEWPORT_C__)
|
||||
gtk_viewport_get_hadjustment
|
||||
gtk_viewport_get_shadow_type
|
||||
gtk_viewport_get_type G_GNUC_CONST
|
||||
@@ -4687,6 +4691,14 @@ gtk_window_unstick
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_WIN32_EMBED_WIDGET_H__)
|
||||
#if IN_FILE(__GTK_WIN32_EMBED_WIDGET_C__)
|
||||
#ifdef G_OS_WIN32
|
||||
gtk_win32_embed_widget_get_type G_GNUC_CONST
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_VARIABLES
|
||||
gtk_binary_age
|
||||
gtk_interface_age
|
||||
|
||||
@@ -431,7 +431,7 @@ static void
|
||||
gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
{
|
||||
GtkAboutDialogPrivate *priv;
|
||||
GtkWidget *vbox, *hbox, *button, *image;
|
||||
GtkWidget *vbox, *hbox, *button, *close_button, *image;
|
||||
|
||||
/* Data */
|
||||
priv = GTK_ABOUT_DIALOG_GET_PRIVATE (about);
|
||||
@@ -496,7 +496,8 @@ gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* Add the OK button */
|
||||
gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL);
|
||||
close_button = gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE,
|
||||
GTK_RESPONSE_CANCEL);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CANCEL);
|
||||
|
||||
/* Add the credits button */
|
||||
@@ -527,6 +528,9 @@ gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
|
||||
gtk_widget_pop_composite_child ();
|
||||
|
||||
gtk_widget_grab_default (close_button);
|
||||
gtk_widget_grab_focus (close_button);
|
||||
|
||||
/* force defaults */
|
||||
gtk_about_dialog_set_name (about, NULL);
|
||||
gtk_about_dialog_set_logo (about, NULL);
|
||||
|
||||
@@ -95,7 +95,7 @@ gtk_action_group_get_type (void)
|
||||
|
||||
if (!type)
|
||||
{
|
||||
static const GTypeInfo type_info =
|
||||
const GTypeInfo type_info =
|
||||
{
|
||||
sizeof (GtkActionGroupClass),
|
||||
NULL, /* base_init */
|
||||
|
||||
+22
-3
@@ -678,6 +678,8 @@ gtk_assistant_init (GtkAssistant *assistant)
|
||||
|
||||
priv = assistant->priv = GTK_ASSISTANT_GET_PRIVATE (assistant);
|
||||
|
||||
gtk_container_set_reallocate_redraws (GTK_CONTAINER (assistant), TRUE);
|
||||
|
||||
gtk_widget_push_composite_child ();
|
||||
|
||||
/* Header */
|
||||
@@ -847,12 +849,29 @@ remove_page (GtkAssistant *assistant,
|
||||
{
|
||||
GtkAssistantPrivate *priv = assistant->priv;
|
||||
GtkAssistantPage *page_info;
|
||||
GList *page_node;
|
||||
|
||||
page_info = element->data;
|
||||
|
||||
/* If we are mapped and visible, we want to deal with changing the page. */
|
||||
if ((GTK_WIDGET_MAPPED (page_info->page)) && (page_info == priv->current_page))
|
||||
compute_next_step (assistant);
|
||||
/* If this is the current page, we need to switch away. */
|
||||
if (page_info == priv->current_page)
|
||||
{
|
||||
if (!compute_next_step (assistant))
|
||||
{
|
||||
/* The best we can do at this point is probably to pick the first
|
||||
* visible page.
|
||||
*/
|
||||
page_node = priv->pages;
|
||||
|
||||
while (page_node && !GTK_WIDGET_VISIBLE (((GtkAssistantPage *) page_node->data)->page))
|
||||
page_node = page_node->next;
|
||||
|
||||
if (page_node)
|
||||
priv->current_page = page_node->data;
|
||||
else
|
||||
priv->current_page = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
priv->pages = g_list_remove_link (priv->pages, element);
|
||||
priv->visited_pages = g_slist_remove_all (priv->visited_pages, page_info);
|
||||
|
||||
+8
-1
@@ -1936,11 +1936,18 @@ gtk_button_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed)
|
||||
{
|
||||
GtkButton *button = GTK_BUTTON (widget);
|
||||
gboolean save_in;
|
||||
|
||||
if (!was_grabbed)
|
||||
{
|
||||
button->in_button = FALSE;
|
||||
save_in = button->in_button;
|
||||
button->in_button = FALSE;
|
||||
gtk_real_button_released (button);
|
||||
if (save_in != button->in_button)
|
||||
{
|
||||
button->in_button = save_in;
|
||||
gtk_button_update_state (button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+26
-2
@@ -49,7 +49,6 @@
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkcalendar.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtkdnd.h"
|
||||
#include "gtkintl.h"
|
||||
@@ -699,6 +698,30 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
else if (strcmp (year_before, "calendar:MY") != 0)
|
||||
g_warning ("Whoever translated calendar:MY did so wrongly.\n");
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
priv->week_start = 0;
|
||||
week_start = NULL;
|
||||
|
||||
if (G_WIN32_HAVE_WIDECHAR_API ())
|
||||
{
|
||||
if (GetLocaleInfoW (GetThreadLocale (), LOCALE_IFIRSTDAYOFWEEK,
|
||||
wbuffer, G_N_ELEMENTS (wbuffer)))
|
||||
week_start = g_utf16_to_utf8 (wbuffer, -1, NULL, NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetLocaleInfoA (GetThreadLocale (),
|
||||
LOCALE_IFIRSTDAYOFWEEK | LOCALE_USE_CP_ACP,
|
||||
buffer, G_N_ELEMENTS (buffer)))
|
||||
week_start = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
if (week_start != NULL)
|
||||
{
|
||||
priv->week_start = (week_start[0] - '0' + 1) % 7;
|
||||
g_free(week_start);
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
|
||||
langinfo = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
|
||||
first_weekday = langinfo[0];
|
||||
@@ -729,6 +752,7 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
g_warning ("Whoever translated calendar:week_start:0 did so wrongly.\n");
|
||||
priv->week_start = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
calendar_compute_days (calendar);
|
||||
@@ -2310,7 +2334,7 @@ calendar_paint_arrow (GtkCalendar *calendar,
|
||||
gtk_paint_arrow (widget->style, window, state,
|
||||
GTK_SHADOW_OUT, NULL, widget, "calendar",
|
||||
GTK_ARROW_RIGHT, TRUE,
|
||||
width/2 - 2, height/2 - 4, 8, 8);
|
||||
width/2 - 4, height/2 - 4, 8, 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ gtk_cell_editable_get_type (void)
|
||||
|
||||
if (! cell_editable_type)
|
||||
{
|
||||
static const GTypeInfo cell_editable_info =
|
||||
const GTypeInfo cell_editable_info =
|
||||
{
|
||||
sizeof (GtkCellEditableIface), /* class_size */
|
||||
gtk_cell_editable_base_init, /* base_init */
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ gtk_cell_layout_get_type (void)
|
||||
|
||||
if (! cell_layout_type)
|
||||
{
|
||||
static const GTypeInfo cell_layout_info =
|
||||
const GTypeInfo cell_layout_info =
|
||||
{
|
||||
sizeof (GtkCellLayoutIface),
|
||||
NULL,
|
||||
|
||||
@@ -551,6 +551,14 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
P_("Ellipsize set"),
|
||||
P_("Whether this tag affects the ellipsize mode"));
|
||||
|
||||
/**
|
||||
* GtkCellRendererText::edited
|
||||
* @renderer: the object which received the signal.
|
||||
* @path: the path identifying the edited cell.
|
||||
* @new_text: the new text.
|
||||
*
|
||||
* This signal is emitted after @renderer has been edited.
|
||||
*/
|
||||
text_cell_renderer_signals [EDITED] =
|
||||
g_signal_new (I_("edited"),
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
@@ -1778,7 +1786,9 @@ gtk_cell_renderer_text_focus_out_event (GtkWidget *entry,
|
||||
if (priv->in_entry_menu)
|
||||
return FALSE;
|
||||
|
||||
gtk_cell_renderer_text_editing_done (GTK_CELL_EDITABLE (entry), data);
|
||||
GTK_ENTRY (entry)->editing_canceled = TRUE;
|
||||
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
|
||||
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
|
||||
|
||||
/* entry needs focus-out-event */
|
||||
return FALSE;
|
||||
|
||||
+1
-12
@@ -67,8 +67,6 @@ static void gtk_cell_view_set_property (GObject *obj
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gtk_cell_view_finalize (GObject *object);
|
||||
static void gtk_cell_view_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
static void gtk_cell_view_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_cell_view_size_allocate (GtkWidget *widget,
|
||||
@@ -135,7 +133,6 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
widget_class->expose_event = gtk_cell_view_expose;
|
||||
widget_class->size_allocate = gtk_cell_view_size_allocate;
|
||||
widget_class->size_request = gtk_cell_view_size_request;
|
||||
widget_class->style_set = gtk_cell_view_style_set;
|
||||
|
||||
/* properties */
|
||||
g_object_class_install_property (gobject_class,
|
||||
@@ -267,14 +264,6 @@ gtk_cell_view_init (GtkCellView *cellview)
|
||||
cellview->priv = GTK_CELL_VIEW_GET_PRIVATE (cellview);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_cell_view_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
if (previous_style && GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_set_background (widget->window,
|
||||
&widget->style->base[GTK_WIDGET_STATE (widget)]);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_cell_view_finalize (GObject *object)
|
||||
@@ -886,7 +875,7 @@ gtk_cell_view_set_model (GtkCellView *cell_view,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cell_view));
|
||||
g_return_if_fail (GTK_IS_TREE_MODEL (model));
|
||||
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
|
||||
|
||||
if (cell_view->priv->model)
|
||||
{
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
#include "gtkmain.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtktextbuffer.h"
|
||||
|
||||
#include "gtkquartz.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
enum {
|
||||
OWNER_CHANGE,
|
||||
@@ -153,7 +152,7 @@ gtk_clipboard_get_type (void)
|
||||
|
||||
if (!clipboard_type)
|
||||
{
|
||||
static const GTypeInfo clipboard_info =
|
||||
const GTypeInfo clipboard_info =
|
||||
{
|
||||
sizeof (GtkClipboardClass),
|
||||
NULL, /* base_init */
|
||||
|
||||
+18
-6
@@ -788,6 +788,7 @@ palette_change_color (GtkWidget *drawing_area,
|
||||
gdk_color.red = UNSCALE (color[0]);
|
||||
gdk_color.green = UNSCALE (color[1]);
|
||||
gdk_color.blue = UNSCALE (color[2]);
|
||||
gdk_color.pixel = 0;
|
||||
|
||||
x = 0;
|
||||
y = 0; /* Quiet GCC */
|
||||
@@ -1427,20 +1428,31 @@ get_screen_color (GtkWidget *button)
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (button));
|
||||
GdkCursor *picker_cursor;
|
||||
GdkGrabStatus grab_status;
|
||||
GtkWidget *grab_widget, *toplevel;
|
||||
|
||||
guint32 time = gtk_get_current_event_time ();
|
||||
|
||||
if (priv->dropper_grab_widget == NULL)
|
||||
{
|
||||
priv->dropper_grab_widget = gtk_invisible_new_for_screen (screen);
|
||||
grab_widget = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_screen (GTK_WINDOW (grab_widget), screen);
|
||||
gtk_window_resize (GTK_WINDOW (grab_widget), 1, 1);
|
||||
gtk_window_move (GTK_WINDOW (grab_widget), -100, -100);
|
||||
gtk_widget_show (grab_widget);
|
||||
|
||||
gtk_widget_add_events (priv->dropper_grab_widget,
|
||||
gtk_widget_add_events (grab_widget,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK);
|
||||
|
||||
gtk_widget_set_parent_window (priv->dropper_grab_widget,
|
||||
GTK_WIDGET (colorsel)->window);
|
||||
gtk_widget_show (priv->dropper_grab_widget);
|
||||
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (colorsel));
|
||||
|
||||
if (GTK_IS_WINDOW (toplevel))
|
||||
{
|
||||
if (GTK_WINDOW (toplevel)->group)
|
||||
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
|
||||
GTK_WINDOW (grab_widget));
|
||||
}
|
||||
|
||||
gdk_window_set_user_data (priv->dropper_grab_widget->window, colorsel);
|
||||
priv->dropper_grab_widget = grab_widget;
|
||||
}
|
||||
|
||||
if (gdk_keyboard_grab (priv->dropper_grab_widget->window,
|
||||
|
||||
+39
-20
@@ -1661,7 +1661,7 @@ void
|
||||
gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||
{
|
||||
gint x, y, width, height;
|
||||
GtkTreePath *path, *ppath;
|
||||
GtkTreePath *path = NULL, *ppath;
|
||||
GtkWidget *toplevel;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
@@ -1696,9 +1696,6 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||
if (gtk_tree_path_up (ppath))
|
||||
gtk_tree_view_expand_to_path (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
ppath);
|
||||
gtk_tree_view_set_cursor (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
path, NULL, FALSE);
|
||||
gtk_tree_path_free (path);
|
||||
gtk_tree_path_free (ppath);
|
||||
}
|
||||
gtk_tree_view_set_hover_expand (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
@@ -1707,6 +1704,13 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||
/* popup */
|
||||
gtk_widget_show (combo_box->priv->popup_window);
|
||||
|
||||
if (path)
|
||||
{
|
||||
gtk_tree_view_set_cursor (GTK_TREE_VIEW (combo_box->priv->tree_view),
|
||||
path, NULL, FALSE);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
gtk_widget_grab_focus (combo_box->priv->popup_window);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (combo_box->priv->button),
|
||||
TRUE);
|
||||
@@ -2113,7 +2117,7 @@ gtk_combo_box_unset_model (GtkComboBox *combo_box)
|
||||
}
|
||||
|
||||
if (combo_box->priv->cell_view)
|
||||
gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (combo_box->priv->cell_view), NULL);
|
||||
gtk_cell_view_set_model (GTK_CELL_VIEW (combo_box->priv->cell_view), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2643,10 +2647,9 @@ gtk_combo_box_menu_fill_level (GtkComboBox *combo_box,
|
||||
|
||||
gtk_combo_box_menu_fill_level (combo_box, submenu, &iter);
|
||||
}
|
||||
else
|
||||
g_signal_connect (item, "activate",
|
||||
G_CALLBACK (gtk_combo_box_menu_item_activate),
|
||||
combo_box);
|
||||
g_signal_connect (item, "activate",
|
||||
G_CALLBACK (gtk_combo_box_menu_item_activate),
|
||||
combo_box);
|
||||
}
|
||||
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
@@ -2840,7 +2843,10 @@ gtk_combo_box_menu_item_activate (GtkWidget *item,
|
||||
path = gtk_cell_view_get_displayed_row (GTK_CELL_VIEW (cell_view));
|
||||
|
||||
if (gtk_tree_model_get_iter (combo_box->priv->model, &iter, path))
|
||||
gtk_combo_box_set_active_iter (combo_box, &iter);
|
||||
{
|
||||
if (gtk_menu_item_get_submenu (GTK_MENU_ITEM (item)) == NULL)
|
||||
gtk_combo_box_set_active_iter (combo_box, &iter);
|
||||
}
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
@@ -3167,6 +3173,24 @@ gtk_combo_box_menu_row_deleted (GtkTreeModel *model,
|
||||
item = find_menu_by_path (combo_box->priv->popup_widget, path, FALSE);
|
||||
menu = gtk_widget_get_parent (item);
|
||||
gtk_container_remove (GTK_CONTAINER (menu), item);
|
||||
|
||||
if (gtk_tree_path_get_depth (path) > 1)
|
||||
{
|
||||
GtkTreePath *parent_path;
|
||||
GtkTreeIter iter;
|
||||
GtkWidget *parent;
|
||||
|
||||
parent_path = gtk_tree_path_copy (path);
|
||||
gtk_tree_path_up (parent_path);
|
||||
gtk_tree_model_get_iter (model, &iter, parent_path);
|
||||
|
||||
if (!gtk_tree_model_iter_has_child (model, &iter))
|
||||
{
|
||||
parent = find_menu_by_path (combo_box->priv->popup_widget,
|
||||
parent_path, FALSE);
|
||||
gtk_menu_item_remove_submenu (GTK_MENU_ITEM (parent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4667,20 +4691,15 @@ gtk_combo_box_set_model (GtkComboBox *combo_box,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
|
||||
if (!model)
|
||||
{
|
||||
gtk_combo_box_unset_model (combo_box);
|
||||
return;
|
||||
}
|
||||
|
||||
g_return_if_fail (GTK_IS_TREE_MODEL (model));
|
||||
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
|
||||
|
||||
if (model == combo_box->priv->model)
|
||||
return;
|
||||
|
||||
if (combo_box->priv->model)
|
||||
gtk_combo_box_unset_model (combo_box);
|
||||
gtk_combo_box_unset_model (combo_box);
|
||||
|
||||
if (model == NULL)
|
||||
return;
|
||||
|
||||
combo_box->priv->model = model;
|
||||
g_object_ref (combo_box->priv->model);
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ gtk_container_get_type (void)
|
||||
|
||||
if (!container_type)
|
||||
{
|
||||
static const GTypeInfo container_info =
|
||||
const GTypeInfo container_info =
|
||||
{
|
||||
sizeof (GtkContainerClass),
|
||||
(GBaseInitFunc) gtk_container_base_class_init,
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ gtk_curve_get_type (void)
|
||||
|
||||
if (!curve_type)
|
||||
{
|
||||
static const GTypeInfo curve_info =
|
||||
const GTypeInfo curve_info =
|
||||
{
|
||||
sizeof (GtkCurveClass),
|
||||
NULL, /* base_init */
|
||||
|
||||
+1
-2
@@ -43,9 +43,8 @@
|
||||
#include "gtkstock.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include "gtkquartz.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gdk/quartz/gdkquartz.h"
|
||||
|
||||
typedef struct _GtkDragSourceSite GtkDragSourceSite;
|
||||
|
||||
+45
-15
@@ -43,6 +43,7 @@
|
||||
#include "gtkstock.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkdndcursors.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
static GSList *source_widgets = NULL;
|
||||
@@ -284,6 +285,9 @@ static gboolean gtk_drag_key_cb (GtkWidget *widget,
|
||||
static gboolean gtk_drag_grab_broken_event_cb (GtkWidget *widget,
|
||||
GdkEventGrabBroken *event,
|
||||
gpointer data);
|
||||
static void gtk_drag_grab_notify_cb (GtkWidget *widget,
|
||||
gboolean was_grabbed,
|
||||
gpointer data);
|
||||
static gboolean gtk_drag_button_release_cb (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data);
|
||||
@@ -300,8 +304,6 @@ static void set_icon_stock_pixbuf (GdkDragContext *context,
|
||||
* Cursor and Icon data *
|
||||
************************/
|
||||
|
||||
#include "gtkdndcursors.h"
|
||||
|
||||
static struct {
|
||||
GdkDragAction action;
|
||||
const gchar *name;
|
||||
@@ -2332,6 +2334,8 @@ gtk_drag_begin_internal (GtkWidget *widget,
|
||||
|
||||
g_signal_connect (info->ipc_widget, "grab_broken_event",
|
||||
G_CALLBACK (gtk_drag_grab_broken_event_cb), info);
|
||||
g_signal_connect (info->ipc_widget, "grab_notify",
|
||||
G_CALLBACK (gtk_drag_grab_notify_cb), info);
|
||||
g_signal_connect (info->ipc_widget, "button_release_event",
|
||||
G_CALLBACK (gtk_drag_button_release_cb), info);
|
||||
g_signal_connect (info->ipc_widget, "motion_notify_event",
|
||||
@@ -3749,19 +3753,17 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
|
||||
gtk_drag_remove_icon (info);
|
||||
|
||||
if (info->icon_pixbuf)
|
||||
g_object_unref (info->icon_pixbuf);
|
||||
|
||||
if (!info->proxy_dest)
|
||||
g_signal_emit_by_name (info->widget, "drag_end",
|
||||
info->context);
|
||||
|
||||
if (info->widget)
|
||||
g_object_unref (info->widget);
|
||||
|
||||
{
|
||||
g_object_unref (info->icon_pixbuf);
|
||||
info->icon_pixbuf = NULL;
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_by_func (info->ipc_widget,
|
||||
gtk_drag_grab_broken_event_cb,
|
||||
info);
|
||||
g_signal_handlers_disconnect_by_func (info->ipc_widget,
|
||||
gtk_drag_grab_notify_cb,
|
||||
info);
|
||||
g_signal_handlers_disconnect_by_func (info->ipc_widget,
|
||||
gtk_drag_button_release_cb,
|
||||
info);
|
||||
@@ -3775,6 +3777,13 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
|
||||
gtk_drag_selection_get,
|
||||
info);
|
||||
|
||||
if (!info->proxy_dest)
|
||||
g_signal_emit_by_name (info->widget, "drag_end",
|
||||
info->context);
|
||||
|
||||
if (info->widget)
|
||||
g_object_unref (info->widget);
|
||||
|
||||
gtk_selection_remove_all (info->ipc_widget);
|
||||
g_object_set_data (G_OBJECT (info->ipc_widget), I_("gtk-info"), NULL);
|
||||
source_widgets = g_slist_remove (source_widgets, info->ipc_widget);
|
||||
@@ -3919,13 +3928,12 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
|
||||
|
||||
info->have_grab = FALSE;
|
||||
|
||||
gdk_display_pointer_ungrab (display, time);
|
||||
gdk_display_keyboard_ungrab (display, time);
|
||||
gtk_grab_remove (info->ipc_widget);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (info->ipc_widget,
|
||||
gtk_drag_grab_broken_event_cb,
|
||||
info);
|
||||
g_signal_handlers_disconnect_by_func (info->ipc_widget,
|
||||
gtk_drag_grab_notify_cb,
|
||||
info);
|
||||
g_signal_handlers_disconnect_by_func (info->ipc_widget,
|
||||
gtk_drag_button_release_cb,
|
||||
info);
|
||||
@@ -3936,6 +3944,10 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
|
||||
gtk_drag_key_cb,
|
||||
info);
|
||||
|
||||
gdk_display_pointer_ungrab (display, time);
|
||||
gdk_display_keyboard_ungrab (display, time);
|
||||
gtk_grab_remove (info->ipc_widget);
|
||||
|
||||
/* Send on a release pair to the original
|
||||
* widget to convince it to release its grab. We need to
|
||||
* call gtk_propagate_event() here, instead of
|
||||
@@ -4118,6 +4130,24 @@ gtk_drag_grab_broken_event_cb (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_drag_grab_notify_cb (GtkWidget *widget,
|
||||
gboolean was_grabbed,
|
||||
gpointer data)
|
||||
{
|
||||
GtkDragSourceInfo *info = (GtkDragSourceInfo *)data;
|
||||
|
||||
if (!was_grabbed)
|
||||
{
|
||||
/* We have to block callbacks to avoid recursion here, because
|
||||
gtk_drag_cancel calls gtk_grab_remove (via gtk_drag_end) */
|
||||
g_signal_handlers_block_by_func (widget, gtk_drag_grab_notify_cb, data);
|
||||
gtk_drag_cancel (info, gtk_get_current_event_time ());
|
||||
g_signal_handlers_unblock_by_func (widget, gtk_drag_grab_notify_cb, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* gtk_drag_button_release_cb:
|
||||
* "button_release_event" callback during drag.
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ gtk_editable_get_type (void)
|
||||
|
||||
if (!editable_type)
|
||||
{
|
||||
static const GTypeInfo editable_info =
|
||||
const GTypeInfo editable_info =
|
||||
{
|
||||
sizeof (GtkEditableClass), /* class_size */
|
||||
gtk_editable_base_init, /* base_init */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user