Compare commits
277 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aabdff2f3e | |||
| bde4a0dff6 | |||
| d3b1bf506e | |||
| c26ddd9507 | |||
| 43dc7832eb | |||
| 3f7f13181e | |||
| f7a735e375 | |||
| 9a8041290c | |||
| 85cf815d3d | |||
| 09c82800bd | |||
| fb1b211b45 | |||
| f3b4148361 | |||
| 538f6213fb | |||
| 371f08d027 | |||
| ade7eeac8c | |||
| 60f8794d7e | |||
| efd52319a5 | |||
| c762310578 | |||
| ed816e6283 | |||
| 676565ae1a | |||
| 926f82e52e | |||
| d93d777d99 | |||
| 3e624869d5 | |||
| 83c990238a | |||
| d99581f49c | |||
| 781909fc9b | |||
| 1d0ca716a1 | |||
| 305568f70b | |||
| fe0a4aed27 | |||
| 4b7eab187c | |||
| 8419f894d6 | |||
| 8605fcf2d9 | |||
| 1378d6e073 | |||
| 5ecf734226 | |||
| 244ac50e98 | |||
| 8986d5b064 | |||
| d5e257d1e4 | |||
| 4331ff2939 | |||
| 7fc1fcde1e | |||
| d80a44eb3b | |||
| 5d218939a3 | |||
| 322c4e1698 | |||
| 53ee00f790 | |||
| 5d5651a51f | |||
| 85fb4c1c0a | |||
| 78b8192408 | |||
| b700ce0429 | |||
| 6aec92607f | |||
| 9ba7278e7c | |||
| c3696f7adb | |||
| 12d5e7d1f2 | |||
| b3506ede35 | |||
| b8b61514a0 | |||
| 8f3d613f79 | |||
| 444fcaffc0 | |||
| 0443756f0f | |||
| 6c192a8856 | |||
| 385b7ae0c8 | |||
| 39ea2982fc | |||
| 4accef4d14 | |||
| f83878c904 | |||
| 964adb2a68 | |||
| eb0f600785 | |||
| d4032f80ce | |||
| cc3bc75402 | |||
| f7b0b523ac | |||
| 427287bea4 | |||
| d7c628124c | |||
| 4bf28f8a3b | |||
| 8c6222e54d | |||
| b0d34de0c0 | |||
| d9405627f1 | |||
| 67630cb374 | |||
| 7988bd8aea | |||
| 809c27e5d8 | |||
| 2b734bbbb5 | |||
| 9790fc0bce | |||
| 2558ed9022 | |||
| 01238dd8ae | |||
| a311eb6468 | |||
| e3fb59f88c | |||
| 5c9c3ccbd0 | |||
| ec1f393545 | |||
| e0d74c64ef | |||
| ab3cec3701 | |||
| 7d6bdb325c | |||
| d5aa2e9e39 | |||
| 62b9c4f817 | |||
| 5f2f4b14b5 | |||
| 60d155ddcb | |||
| 81a287478a | |||
| affd6e7073 | |||
| 0395cf917b | |||
| 45b3c553a9 | |||
| 1aa5f92784 | |||
| e96c689aa1 | |||
| 75bd5a313e | |||
| f74c55fb51 | |||
| c9f370a13f | |||
| 2cbc2972ea | |||
| abac82a83c | |||
| 9e7e9817c9 | |||
| 66772d30d1 | |||
| ef1c911306 | |||
| 6c17438492 | |||
| df4472f64a | |||
| 09727d7a62 | |||
| 7859628b22 | |||
| 77149833e9 | |||
| 3fb435666e | |||
| 3971b14779 | |||
| b79b4e95a7 | |||
| eefbb8aee4 | |||
| bdfa6ebc2b | |||
| 895c8db5da | |||
| 8b261439d4 | |||
| b325d0a98a | |||
| 0682094e81 | |||
| 462240b9fc | |||
| 6790837f47 | |||
| 55f9dd9907 | |||
| c8c2e4e110 | |||
| 448e72d9ff | |||
| 19c39742c7 | |||
| 0b5d6138c7 | |||
| 74228e0ead | |||
| cad27e76dd | |||
| e981730fc0 | |||
| 3c0d60702e | |||
| db3c824c5c | |||
| 14119f985d | |||
| 863abe697e | |||
| 53e734f2b3 | |||
| c8153e7f83 | |||
| 43f8719a53 | |||
| 10729e4589 | |||
| 9cdb0bb8b1 | |||
| d368b396d4 | |||
| 438f2f1ba5 | |||
| f8b24884b5 | |||
| 049eb3f769 | |||
| 8de0d15d8a | |||
| a0c2ae4709 | |||
| c52c4f94d5 | |||
| 9db511f677 | |||
| 21b0a3c8fe | |||
| 8662985ebb | |||
| 48fa89f979 | |||
| f3e1c088a7 | |||
| 0adf040152 | |||
| 41bed12fe0 | |||
| 3f1e8c6883 | |||
| dec6e119af | |||
| ba6934366d | |||
| 1e30fe1c3b | |||
| bd3ea23655 | |||
| 386303ec66 | |||
| 1d3f93f277 | |||
| ed692f9a0b | |||
| a1a0ead018 | |||
| b71d2864c8 | |||
| f16292ea02 | |||
| 80a362c3c3 | |||
| edff6fa652 | |||
| 0099b0820d | |||
| 15cf978d5a | |||
| 2d1a793d57 | |||
| 7be06688ff | |||
| 9a7c95234c | |||
| 91a91b69b9 | |||
| 511bd4fee7 | |||
| 0dc66f5125 | |||
| a875a84846 | |||
| e0f951a76a | |||
| 3c331ba78d | |||
| 040a209031 | |||
| 2e09bddb41 | |||
| 9883f592b0 | |||
| e33f4b1fef | |||
| ebf4ac8a5b | |||
| ac823cf070 | |||
| afb6265530 | |||
| d1dda37f8c | |||
| 80ae3fe6f2 | |||
| 0358fd0b33 | |||
| 1266d15c4b | |||
| 9062a835a0 | |||
| 94476c3c86 | |||
| d38c29f48b | |||
| c9b69f7c39 | |||
| 08db197af2 | |||
| bfdff24b10 | |||
| 088d3449ca | |||
| a4448b7578 | |||
| 8c8ed3e778 | |||
| 1b58cd10a9 | |||
| 3a53352afe | |||
| ea449a032a | |||
| a78f4d5444 | |||
| b31132971d | |||
| bfedc3bafe | |||
| d49c1cdcf4 | |||
| 90dd285c22 | |||
| 276e9be383 | |||
| e135358ed0 | |||
| 1d464fca3c | |||
| 633b08cc8a | |||
| 1536710dba | |||
| cf51c4f6db | |||
| 2a95ab1828 | |||
| 13f680d11a | |||
| b94ef83239 | |||
| 4b7611bd93 | |||
| 879630b832 | |||
| 4cdec89bc4 | |||
| 05a46f629d | |||
| 9a0d236609 | |||
| dae857a94d | |||
| 680295587c | |||
| a950b5357a | |||
| d8597e3177 | |||
| 06c7079758 | |||
| 0a3f686cef | |||
| fb8c947091 | |||
| 390c1119ed | |||
| e29b911396 | |||
| 132b776e1f | |||
| 7f42eee250 | |||
| 57e592629b | |||
| d23fccd4a2 | |||
| 6b6fbc73de | |||
| 3c54eb4c6e | |||
| 1f2069c55c | |||
| 1435d8c148 | |||
| bb40d64cb4 | |||
| 929c5ae2f3 | |||
| db4837c607 | |||
| 4c675d08a8 | |||
| c1ae56dfa8 | |||
| e67abe8758 | |||
| ddeab4dfda | |||
| c5631dfc9c | |||
| 396215615b | |||
| 577fb25b00 | |||
| 3f7095c36e | |||
| 50737f4e6b | |||
| 343fafbc30 | |||
| 8bb36ed031 | |||
| 0b773e6704 | |||
| e1afa087af | |||
| 4c833b21c8 | |||
| df687b5930 | |||
| 40f5a35a69 | |||
| 9356cb8ea1 | |||
| c344d6dc17 | |||
| 0a97d05258 | |||
| 17ea79f33a | |||
| 1ed442180d | |||
| 8342724022 | |||
| 78a59caed9 | |||
| 5d70f4bd44 | |||
| c1b1e41ddb | |||
| a8dc876e02 | |||
| 7394270efa | |||
| cbc8d4a88a | |||
| da2f672c11 | |||
| ca9440c21e | |||
| bd46d285d3 | |||
| 3b0056ae1a | |||
| d19b3d2c74 | |||
| 47cee3521a | |||
| b06cb4b9d1 | |||
| f561bdb3eb | |||
| d4e644ec52 | |||
| ee856fd30d | |||
| b9d4591949 | |||
| e1ec1497a8 |
@@ -1,3 +1,174 @@
|
||||
Overview of Changes in GTK+ 3.18.9
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
677329 Missing focus-in events
|
||||
761474 x11: Scaling factor is applied twice on screen work area
|
||||
762468 wayland: Switching between fullscreen and unfullscreen too fast...
|
||||
762907 gnome-shell crashes after undocking
|
||||
763017 tooltip text is not shown
|
||||
|
||||
* Translation updates:
|
||||
Scottish Gaelic
|
||||
Slovenian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.18.8
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
756751 Keypad decimal point patch prevents entry of comma in german key...
|
||||
761026 Pressing ESC in a file chooser dialog doesn't dismiss it
|
||||
761552 Warnings in filechooser when typing-to-search in Recent
|
||||
761757 Crash in GtkFileChooserWidget
|
||||
761838 Editing widgets may be drawn off the visible area if the column ...
|
||||
762315 Assistant pages have no padding which looks weird
|
||||
762319 issues with randr 1.5
|
||||
Fix Quartz clipboard image retrieval
|
||||
Fix Quartz Full Screen Crash
|
||||
box: Fix rtl allocation with center widget
|
||||
|
||||
* Translation updates:
|
||||
French
|
||||
Scottish Gaelic
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.18.7
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
688524 Expose gtk-primary-button-warps-slider as an X setting
|
||||
722937 problem rendering asymmetric borders with dotted style
|
||||
728344 Collate setting in Print Dialog does not override PPD setting for...
|
||||
754868 visual anomaly in gtk path bar
|
||||
757147 gdk_pixbuf_get_from_window() doesn't honor device scale
|
||||
758908 The app chooser dialog uses a non standard icon and doesn't wrap ...
|
||||
758929 GtkEntryCompletion should allow for changing the popdown delay
|
||||
759079 GtkComboBox triggers segmentation fault in update_menu_sensitivit...
|
||||
759081 Add 'nullable' to return type of gtk_cell_layout_get_area.
|
||||
759091 notebook tab stays hovered if mouse leaves slowly
|
||||
759260 [Adwaita:dark] menus on GtkTreeView barely visible because menu s...
|
||||
759757 Flow box redraws all children on hover
|
||||
760141 New gdk_cursor_new_from_name() fallback breaks behavior expected...
|
||||
760169 GtkColorButton sensitive and insensitive appearances are barely d...
|
||||
760416 broadwayd --help shows translated characters as question marks on...
|
||||
760445 regression: openQA no longer able to press ctrl-alt-del to get to...
|
||||
760615 GTK FTBFS with MinGW-w64
|
||||
760680 Emitting "shutdown" signal twice leads to a crash
|
||||
760891 GtkTreeView Cannot expand/collapse rows by mouse
|
||||
760897 A few clean ups to the shm handling code
|
||||
760964 hardcodes temp dir to /tmp
|
||||
761005 GtkColorChooser: make set_rgba work in editor mode
|
||||
761095 wayland: use shm_open instead of open in tmpdir
|
||||
|
||||
* Translation updates
|
||||
Arabic
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
German
|
||||
Hungarian
|
||||
Indonesian
|
||||
Lithuanian
|
||||
Polish
|
||||
Portuguese
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.18.6
|
||||
==================================
|
||||
|
||||
* Bugs fixed:
|
||||
539944 Add GtkScaleButton API so struct fields can be marked as private
|
||||
732742 Infinite recursion on GdkDevice disposal
|
||||
735847 move animatable cursors' current frame info into GdkCursor
|
||||
746745 Window suddenly always on top
|
||||
747295 shared memory leak when creating/destroying widgets
|
||||
748904 wayland: map real modifiers to virtual modifiers
|
||||
757358 single touch devices are not detected as touch devices
|
||||
758025 cursor flickering
|
||||
758072 [Wayland] additional mouse buttons don't work
|
||||
758175 Fix character entity
|
||||
758327 gnome-disks segfault in gdkwayland get_popup_parent - dereference...
|
||||
758367 GTK+ 3 does not respect bold in org.gnome.desktop.interface font-name
|
||||
758407 Could not send the search request \ GDBus.Error:org.freedesktop...
|
||||
758483 GDK W32: Incorrectly uses SetWindowLong() to set/unset WS_EX_TOPMOST
|
||||
758484 GDK W32: Some calls to W32 routines are rather unclear
|
||||
758660 Copy and paste doesn't work in wayland session
|
||||
758661 every second right-click to window header is ignored (CSD-related?)
|
||||
758698 Bug backward search + case insensitive + preceding multi-byte character
|
||||
758790 A few stylistic icon-browser patches
|
||||
|
||||
* Translation updates:
|
||||
Polish
|
||||
|
||||
Overview of Changes in GTK+ 3.18.5
|
||||
==================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Make sure external drives show up either in the sidebar or the places view
|
||||
- Ignore double-click events
|
||||
|
||||
* Avoid some crashes in CSS parsing error handling
|
||||
|
||||
Overview of Changes in GTK+ 3.18.4
|
||||
==================================
|
||||
|
||||
* Revert a GtkTextBuffer change that broke binding API
|
||||
|
||||
* Properly refresh styles when widget names change
|
||||
|
||||
Overview of Changes in GTK+ 3.18.3
|
||||
==================================
|
||||
|
||||
* Bug fixes:
|
||||
735341 Fix/improve gtk_text_buffer_get_iter_at_*() functions
|
||||
753992 im-quartz discard_preedit segmentation fault
|
||||
755654 mmc/sd drive does not appear in Nautilus
|
||||
756160 Crash/segfault when dragging tabs (after 2nd/3rd/4th+ drag)
|
||||
756385 No more content in Anjuta project wizard
|
||||
756449 GtkTextHandle artifacts under Wayland
|
||||
756496 wayland: Make it possible to use a window type hint to map as a subsurface
|
||||
756505 Entering a dot removes all other characters from input
|
||||
756568 Some improvements to gtkplacesview
|
||||
756589 Improve the heuristics for external drives
|
||||
756625 segfault in captured_event_cb
|
||||
756751 Keypad decimal point patch prevents entry of comma in german keypad layout
|
||||
756780 wayland: Fix GtkTreeView's search window
|
||||
756886 The GtkWindow patch here is necessary to make transparent terminals work...
|
||||
757147 gdk_pixbuf_get_from_window() doesn't honor device scale
|
||||
757221 Memory leak in gtk-3.0.m4
|
||||
757298 nautilus crashes on drag'n'drop over 'side bar'
|
||||
757303 Vertically align path labels in Other Locations view
|
||||
757324 win32: handle WM_DISPLAYCHANGE globally
|
||||
757358 single touch devices are not detected as touch devices
|
||||
757377 settings.ini is only loaded from first XDG_CONFIG_DIRS entry
|
||||
757544 GtkHeaderBar subclass template and <child type="title"> does not work
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Czech
|
||||
Icelandic
|
||||
Norwegian bokmål
|
||||
Slovak
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.18.2
|
||||
==================================
|
||||
|
||||
* Bug fixes:
|
||||
753371 Bad focus order in GtkFlowBox
|
||||
755413 Bug in _gtk_text_btree_get_iter_at_last_toggle()
|
||||
755791 GtkSwitch: unclip css box-shadow on the slider
|
||||
755927 Occasional "stuck key" after closing window using keyboard shortcut...
|
||||
755988 gtk printer dialog won't print jobs with names exceeding 255 charac...
|
||||
756042 GtkAssistant: Segfault after g_object_run_dispose(page)
|
||||
756195 GtkColorChooser: Plus/checkmark icons are blurry in hidpi
|
||||
756338 applications segfaults on 3.18.1 when using external themes
|
||||
|
||||
* Translation updates:
|
||||
Finnish
|
||||
German
|
||||
|
||||
Overview of Changes in GTK+ 3.18.1
|
||||
==================================
|
||||
|
||||
|
||||
@@ -43,8 +43,12 @@ EXTRA_DIST += \
|
||||
gdk-3.vcxproj.filtersin \
|
||||
gtk-3.vcxprojin \
|
||||
gtk-3.vcxproj.filtersin \
|
||||
gtk-builder-tool.vcxproj \
|
||||
gtk-builder-tool.vcxproj.filters \
|
||||
gtk-encode-symbolic-svg.vcxproj \
|
||||
gtk-encode-symbolic-svg.vcxproj.filters \
|
||||
gtk-update-icon-cache.vcxproj \
|
||||
gtk-update-icon-cache.vcxproj.filters \
|
||||
gtk3-demo.vcxprojin \
|
||||
gtk3-demo.vcxproj.filtersin \
|
||||
gtk3-demo-application.vcxprojin \
|
||||
|
||||
@@ -22,6 +22,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-encode-symbolic-svg", "
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil-3", "gailutil-3.vcxproj", "{A1FCED61-4E51-4015-A70C-5373404D1BA0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-update-icon-cache", "gtk-update-icon-cache.vcxproj", "{FC98AF16-4C68-42DF-906B-93A6804C198A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-builder-tool", "gtk-builder-tool.vcxproj", "{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcxproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
|
||||
EndProject
|
||||
Global
|
||||
@@ -220,6 +224,38 @@ Global
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.Build.0 = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.Build.0 = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.ActiveCfg = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.Build.0 = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.ActiveCfg = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.Build.0 = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.Build.0 = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.ActiveCfg = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.Build.0 = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.Build.0 = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
|
||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="gdk-3.vcxproj">
|
||||
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk-3.vcxproj">
|
||||
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Sources">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Headers">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c"><Filter>Sources</Filter></ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
|
||||
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gtk\updateiconcache.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="gtk3-prebuild.vcxproj">
|
||||
<Project>{b98fbe68-b03c-48e3-8f32-c3c010720d30}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Sources">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Headers">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gtk\updateiconcache.c"><Filter>Sources</Filter></ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -107,6 +107,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
@@ -151,6 +152,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
@@ -96,6 +96,31 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
@@ -120,30 +145,6 @@
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -165,6 +166,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
@@ -155,6 +156,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
@@ -32,6 +32,12 @@ copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
|
||||
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
|
||||
goto DONE_BIN
|
||||
|
||||
:DO_BROADWAY_BIN
|
||||
@@ -55,6 +61,12 @@ copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
|
||||
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
|
||||
|
||||
goto DONE_BIN
|
||||
|
||||
@@ -73,6 +85,12 @@ copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
|
||||
|
||||
:DONE_BIN
|
||||
</GtkDoInstallBin>
|
||||
@@ -108,8 +126,12 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
|
||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Compiling gsettings XML Files..."
|
||||
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Generating icon cache......"
|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
</GtkDoInstall>
|
||||
<GtkDoInstallBroadwayHeaders>
|
||||
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
|
||||
|
||||
@@ -215,6 +215,18 @@
|
||||
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
|
||||
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk-builder-tool.vcxproj">
|
||||
<Project>{7d2397cf-4c25-45bc-a1bb-cb4b6e154bbd}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk-query-settings.vcxproj">
|
||||
<Project>{9f22107a-3ef7-4b52-b269-747b65307f36}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -10,8 +10,12 @@ EXTRA_DIST += \
|
||||
gdk-3.vcxproj.filters \
|
||||
gtk-3.vcxproj \
|
||||
gtk-3.vcxproj.filters \
|
||||
gtk-builder-tool.vcxproj \
|
||||
gtk-builder-tool.vcxproj.filters \
|
||||
gtk-encode-symbolic-svg.vcxproj \
|
||||
gtk-encode-symbolic-svg.vcxproj.filters \
|
||||
gtk-update-icon-cache.vcxproj \
|
||||
gtk-update-icon-cache.vcxproj.filters \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
|
||||
@@ -10,8 +10,12 @@ EXTRA_DIST += \
|
||||
gdk-3.vcxproj.filters \
|
||||
gtk-3.vcxproj \
|
||||
gtk-3.vcxproj.filters \
|
||||
gtk-builder-tool.vcxproj \
|
||||
gtk-builder-tool.vcxproj.filters \
|
||||
gtk-encode-symbolic-svg.vcxproj \
|
||||
gtk-encode-symbolic-svg.vcxproj.filters \
|
||||
gtk-update-icon-cache.vcxproj \
|
||||
gtk-update-icon-cache.vcxproj.filters \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
|
||||
@@ -10,8 +10,12 @@ EXTRA_DIST += \
|
||||
gdk-3.vcxproj.filters \
|
||||
gtk-3.vcxproj \
|
||||
gtk-3.vcxproj.filters \
|
||||
gtk-builder-tool.vcxproj \
|
||||
gtk-builder-tool.vcxproj.filters \
|
||||
gtk-encode-symbolic-svg.vcxproj \
|
||||
gtk-encode-symbolic-svg.vcxproj.filters \
|
||||
gtk-update-icon-cache.vcxproj \
|
||||
gtk-update-icon-cache.vcxproj.filters \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
|
||||
@@ -27,7 +27,9 @@ EXTRA_DIST += \
|
||||
gdk3-win32.vcprojin \
|
||||
gdk-3.vcprojin \
|
||||
gtk-3.vcprojin \
|
||||
gtk-builder-tool.vcproj \
|
||||
gtk-encode-symbolic-svg.vcproj \
|
||||
gtk-update-icon-cache.vcproj \
|
||||
gtk3-demo.vcprojin \
|
||||
gtk3-demo-application.vcprojin \
|
||||
gtk3-icon-browser.vcprojin \
|
||||
|
||||
@@ -57,6 +57,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil-3", "gailutil-3.vc
|
||||
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-update-icon-cache", "gtk-update-icon-cache.vcproj", "{FC98AF16-4C68-42DF-906B-93A6804C198A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B98FBE68-B03C-48E3-8F32-C3C010720D30} = {B98FBE68-B03C-48E3-8F32-C3C010720D30}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-builder-tool", "gtk-builder-tool.vcproj", "{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
|
||||
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
|
||||
@@ -67,6 +78,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
|
||||
{343333C4-D46C-4C97-A986-959CCA6F1DE0} = {343333C4-D46C-4C97-A986-959CCA6F1DE0}
|
||||
{E9687D21-E214-4A0C-9EB4-8B38EBB783E5} = {E9687D21-E214-4A0C-9EB4-8B38EBB783E5}
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB} = {F280BF1A-777A-4FB5-8005-DFBE04621EDB}
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A} = {FC98AF16-4C68-42DF-906B-93A6804C198A}
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD} = {7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
@@ -257,6 +270,38 @@ Global
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.Build.0 = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.Build.0 = Debug|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.ActiveCfg = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.Build.0 = Debug|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.ActiveCfg = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.Build.0 = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.Build.0 = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.ActiveCfg = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.Build.0 = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.Build.0 = Debug|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gtk-builder-tool"
|
||||
ProjectGUID="{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
|
||||
RootNamespace="gtkbuildertool"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions=""
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions=""
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Sources"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gtk\gtk-builder-tool.c" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Headers"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gtk-update-icon-cache"
|
||||
ProjectGUID="{FC98AF16-4C68-42DF-906B-93A6804C198A}"
|
||||
RootNamespace="gtkupdateiconcache"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions=""
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions=""
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Sources"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gtk\updateiconcache.c" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Headers"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -31,6 +31,12 @@ copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\b
|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin

|
||||
goto DONE_BIN

|
||||
|
||||
:DO_BROADWAY_BIN

|
||||
@@ -54,6 +60,12 @@ copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
&#x
|
||||
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin

|
||||
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin

|
||||
goto DONE_BIN

|
||||
|
||||
:DO_BROADWAY_DEBUG

|
||||
@@ -71,6 +83,12 @@ copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin

|
||||
:DONE_BIN

|
||||
"
|
||||
/>
|
||||
@@ -112,7 +130,10 @@ copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\s
|
||||
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
|
||||
echo "Compiling gsettings XML Files..."

|
||||
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas

|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas

|
||||
|
||||
echo "Generating icon cache..."

|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [18])
|
||||
m4_define([gtk_micro_version], [1])
|
||||
m4_define([gtk_interface_age], [1])
|
||||
m4_define([gtk_micro_version], [9])
|
||||
m4_define([gtk_interface_age], [9])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
|
||||
@@ -148,16 +148,14 @@
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="row-spacing">18</property>
|
||||
<property name="column-spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -174,8 +172,6 @@
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -192,8 +188,6 @@
|
||||
<child>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -210,8 +204,6 @@
|
||||
<child>
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -228,8 +220,6 @@
|
||||
<child>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -244,11 +234,9 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">16x16</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">16×16</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
@@ -261,11 +249,9 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">24x24</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">24×24</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
@@ -278,11 +264,9 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">32x32</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">32×32</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
@@ -295,11 +279,9 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">48x48</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">48×48</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
@@ -312,11 +294,9 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">64x64</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">64×64</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
@@ -434,6 +435,8 @@ main (int argc, char *argv[])
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
context = g_option_context_new ("[:DISPLAY] - broadway display daemon");
|
||||
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
|
||||
@@ -253,6 +253,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
* -  "default"
|
||||
* -  "help"
|
||||
* -  "pointer"
|
||||
* -  "context-menu"
|
||||
* -  "progress"
|
||||
* -  "wait"
|
||||
* -  "cell"
|
||||
|
||||
+28
-19
@@ -63,6 +63,7 @@ enum {
|
||||
static guint signals [LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
static void gdk_device_finalize (GObject *object);
|
||||
static void gdk_device_dispose (GObject *object);
|
||||
static void gdk_device_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
@@ -99,6 +100,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gdk_device_finalize;
|
||||
object_class->dispose = gdk_device_dispose;
|
||||
object_class->set_property = gdk_device_set_property;
|
||||
object_class->get_property = gdk_device_get_property;
|
||||
@@ -299,37 +301,44 @@ gdk_device_init (GdkDevice *device)
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_device_dispose (GObject *object)
|
||||
gdk_device_finalize (GObject *object)
|
||||
{
|
||||
GdkDevice *device = GDK_DEVICE (object);
|
||||
|
||||
if (device->type == GDK_DEVICE_TYPE_SLAVE)
|
||||
_gdk_device_remove_slave (device->associated, device);
|
||||
|
||||
if (device->associated)
|
||||
{
|
||||
if (device->type == GDK_DEVICE_TYPE_MASTER)
|
||||
_gdk_device_set_associated_device (device->associated, NULL);
|
||||
|
||||
g_object_unref (device->associated);
|
||||
device->associated = NULL;
|
||||
}
|
||||
|
||||
if (device->axes)
|
||||
{
|
||||
g_array_free (device->axes, TRUE);
|
||||
device->axes = NULL;
|
||||
}
|
||||
|
||||
g_free (device->name);
|
||||
g_free (device->keys);
|
||||
|
||||
device->name = NULL;
|
||||
device->keys = NULL;
|
||||
|
||||
g_clear_pointer (&device->name, g_free);
|
||||
g_clear_pointer (&device->keys, g_free);
|
||||
g_clear_pointer (&device->vendor_id, g_free);
|
||||
g_clear_pointer (&device->product_id, g_free);
|
||||
|
||||
G_OBJECT_CLASS (gdk_device_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_device_dispose (GObject *object)
|
||||
{
|
||||
GdkDevice *device = GDK_DEVICE (object);
|
||||
GdkDevice *associated = device->associated;
|
||||
|
||||
if (associated && device->type == GDK_DEVICE_TYPE_SLAVE)
|
||||
_gdk_device_remove_slave (associated, device);
|
||||
|
||||
if (associated)
|
||||
{
|
||||
device->associated = NULL;
|
||||
|
||||
if (device->type == GDK_DEVICE_TYPE_MASTER &&
|
||||
associated->associated == device)
|
||||
_gdk_device_set_associated_device (associated, NULL);
|
||||
|
||||
g_object_unref (associated);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
||||
+35
-4
@@ -2145,12 +2145,32 @@ _gdk_event_button_generate (GdkDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
static GList *
|
||||
gdk_get_pending_window_state_event_link (GdkWindow *window)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GList *tmp_list;
|
||||
|
||||
for (tmp_list = display->queued_events; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
GdkEventPrivate *event = tmp_list->data;
|
||||
|
||||
if (event->event.type == GDK_WINDOW_STATE &&
|
||||
event->event.window_state.window == window)
|
||||
return tmp_list;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_set_window_state (GdkWindow *window,
|
||||
GdkWindowState new_state)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkEvent temp_event;
|
||||
GdkWindowState old;
|
||||
GList *pending_event_link;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
@@ -2159,11 +2179,22 @@ _gdk_set_window_state (GdkWindow *window,
|
||||
temp_event.window_state.send_event = FALSE;
|
||||
temp_event.window_state.new_window_state = new_state;
|
||||
|
||||
old = window->state;
|
||||
|
||||
if (temp_event.window_state.new_window_state == old)
|
||||
if (temp_event.window_state.new_window_state == window->state)
|
||||
return; /* No actual work to do, nothing changed. */
|
||||
|
||||
pending_event_link = gdk_get_pending_window_state_event_link (window);
|
||||
if (pending_event_link)
|
||||
{
|
||||
old = window->old_state;
|
||||
_gdk_event_queue_remove_link (display, pending_event_link);
|
||||
g_list_free_1 (pending_event_link);
|
||||
}
|
||||
else
|
||||
{
|
||||
old = window->state;
|
||||
window->old_state = old;
|
||||
}
|
||||
|
||||
temp_event.window_state.changed_mask = new_state ^ old;
|
||||
|
||||
/* Actually update the field in GdkWindow, this is sort of an odd
|
||||
@@ -2185,7 +2216,7 @@ _gdk_set_window_state (GdkWindow *window,
|
||||
{
|
||||
case GDK_WINDOW_TOPLEVEL:
|
||||
case GDK_WINDOW_TEMP: /* ? */
|
||||
gdk_display_put_event (gdk_window_get_display (window), &temp_event);
|
||||
gdk_display_put_event (display, &temp_event);
|
||||
break;
|
||||
case GDK_WINDOW_FOREIGN:
|
||||
case GDK_WINDOW_ROOT:
|
||||
|
||||
@@ -310,6 +310,7 @@ struct _GdkWindow
|
||||
/* We store the old expose areas to support buffer-age optimizations */
|
||||
cairo_region_t *old_updated_area[2];
|
||||
|
||||
GdkWindowState old_state;
|
||||
GdkWindowState state;
|
||||
|
||||
guint8 alpha;
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
* @window: Source window
|
||||
* @src_x: Source X coordinate within @window
|
||||
* @src_y: Source Y coordinate within @window
|
||||
* @width: Width in pixels of region to get
|
||||
* @height: Height in pixels of region to get
|
||||
* @width: Width in logical pixels of region to get
|
||||
* @height: Height in logical pixels of region to get
|
||||
*
|
||||
* Transfers image data from a #GdkWindow and converts it to an RGB(A)
|
||||
* representation inside a #GdkPixbuf. In other words, copies
|
||||
@@ -56,8 +56,9 @@
|
||||
* This allows you to efficiently read individual pixels on the client side.
|
||||
*
|
||||
* This function will create an RGB pixbuf with 8 bits per channel with
|
||||
* the same size specified by the @width and @height arguments. The pixbuf
|
||||
* will contain an alpha channel if the @window contains one.
|
||||
* the size specified by the @width and @height arguments scaled by the
|
||||
* scale factor of @window. The pixbuf will contain an alpha channel if
|
||||
* the @window contains one.
|
||||
*
|
||||
* If the window is off the screen, then there is no image data in the
|
||||
* obscured/offscreen regions to be placed in the pixbuf. The contents of
|
||||
@@ -87,11 +88,16 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
|
||||
gint height)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
cairo_surface_t *copy;
|
||||
cairo_t *cr;
|
||||
GdkPixbuf *dest;
|
||||
gint scale;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (src), NULL);
|
||||
g_return_val_if_fail (gdk_window_is_viewable (src), NULL);
|
||||
|
||||
scale = gdk_window_get_scale_factor (src);
|
||||
|
||||
surface = _gdk_window_ref_cairo_surface (src);
|
||||
|
||||
/* We do not know what happened to this surface outside of GDK.
|
||||
@@ -101,9 +107,22 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
|
||||
*/
|
||||
cairo_surface_mark_dirty (surface);
|
||||
|
||||
dest = gdk_pixbuf_get_from_surface (surface,
|
||||
src_x, src_y,
|
||||
width, height);
|
||||
if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA)
|
||||
copy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width * scale, height * scale);
|
||||
else
|
||||
copy = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width * scale, height * scale);
|
||||
|
||||
cairo_surface_set_device_scale (copy, scale, scale);
|
||||
|
||||
cr = cairo_create (copy);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_set_source_surface (cr, surface, -src_x, -src_y);
|
||||
cairo_paint (cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
dest = gdk_pixbuf_get_from_surface (copy, 0, 0, width * scale, height * scale);
|
||||
|
||||
cairo_surface_destroy (copy);
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
return dest;
|
||||
|
||||
+1
-1
@@ -366,7 +366,7 @@ gdk_rgba_to_string (const GdkRGBA *rgba)
|
||||
{
|
||||
gchar alpha[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
|
||||
g_ascii_dtostr (alpha, G_ASCII_DTOSTR_BUF_SIZE, CLAMP (rgba->alpha, 0, 1));
|
||||
g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%g", CLAMP (rgba->alpha, 0, 1));
|
||||
|
||||
return g_strdup_printf ("rgba(%d,%d,%d,%s)",
|
||||
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
|
||||
|
||||
+1
-1
@@ -1095,7 +1095,7 @@ gdk_screen_get_setting (GdkScreen *screen,
|
||||
* on very high density outputs this can be a higher value (often 2).
|
||||
*
|
||||
* This can be used if you want to create pixel based data for a
|
||||
* particula monitor, but most of the time you’re drawing to a window
|
||||
* particular monitor, but most of the time you’re drawing to a window
|
||||
* where it is better to use gdk_window_get_scale_factor() instead.
|
||||
*
|
||||
* Since: 3.10
|
||||
|
||||
@@ -392,6 +392,7 @@ typedef enum
|
||||
* @GDK_SCROLL_MASK: receive scroll events
|
||||
* @GDK_TOUCH_MASK: receive touch events. Since 3.4
|
||||
* @GDK_SMOOTH_SCROLL_MASK: receive smooth scrolling events. Since 3.4
|
||||
@GDK_TOUCHPAD_GESTURE_MASK: receive touchpad gesture events. Since 3.18
|
||||
* @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
||||
*
|
||||
* A set of bit-flags to indicate which events a window is to receive.
|
||||
|
||||
+17
-7
@@ -5761,11 +5761,16 @@ gdk_window_move_resize_internal (GdkWindow *window,
|
||||
if (gdk_window_is_viewable (window) &&
|
||||
!window->input_only)
|
||||
{
|
||||
GdkRectangle r;
|
||||
|
||||
expose = TRUE;
|
||||
|
||||
old_region = cairo_region_copy (window->clip_region);
|
||||
/* Adjust regions to parent window coords */
|
||||
cairo_region_translate (old_region, window->x, window->y);
|
||||
r.x = window->x;
|
||||
r.y = window->y;
|
||||
r.width = window->width;
|
||||
r.height = window->height;
|
||||
|
||||
old_region = cairo_region_create_rectangle (&r);
|
||||
}
|
||||
|
||||
/* Set the new position and size */
|
||||
@@ -5801,9 +5806,14 @@ gdk_window_move_resize_internal (GdkWindow *window,
|
||||
|
||||
if (expose)
|
||||
{
|
||||
new_region = cairo_region_copy (window->clip_region);
|
||||
/* Adjust region to parent window coords */
|
||||
cairo_region_translate (new_region, window->x, window->y);
|
||||
GdkRectangle r;
|
||||
|
||||
r.x = window->x;
|
||||
r.y = window->y;
|
||||
r.width = window->width;
|
||||
r.height = window->height;
|
||||
|
||||
new_region = cairo_region_create_rectangle (&r);
|
||||
|
||||
cairo_region_union (new_region, old_region);
|
||||
|
||||
@@ -5940,7 +5950,7 @@ gdk_window_scroll (GdkWindow *window,
|
||||
|
||||
move_native_children (window);
|
||||
|
||||
gdk_window_invalidate_region_full (window, window->clip_region, TRUE);
|
||||
gdk_window_invalidate_rect_full (window, NULL, TRUE);
|
||||
|
||||
_gdk_synthesize_crossing_events_for_geometry_change (window);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
|
||||
@implementation GdkQuartzNSWindow
|
||||
|
||||
- (void)windowWillClose:(NSNotification*)notification
|
||||
{
|
||||
// Clears the delegate when window is going to be closed; since EL
|
||||
// Capitan it is possible that the methods of delegate would get
|
||||
// called after the window has been closed.
|
||||
[self setDelegate:nil];
|
||||
}
|
||||
|
||||
-(BOOL)windowShouldClose:(id)sender
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
|
||||
@@ -662,7 +662,7 @@
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
|
||||
NSRect rect;
|
||||
|
||||
if (!impl->toplevel)
|
||||
if (!impl || !impl->toplevel)
|
||||
return;
|
||||
|
||||
if (trackingRect)
|
||||
|
||||
@@ -87,17 +87,23 @@ static const struct {
|
||||
const gchar *css_name, *traditional_name;
|
||||
} name_map[] = {
|
||||
{ "default", "left_ptr" },
|
||||
{ "help", "left_ptr" },
|
||||
{ "context-menu", "left_ptr" },
|
||||
{ "pointer", "hand" },
|
||||
{ "progress", "left_ptr_watch" },
|
||||
{ "wait", "watch" },
|
||||
{ "cell", "crosshair" },
|
||||
{ "crosshair", "cross" },
|
||||
{ "text", "xterm" },
|
||||
{ "vertical-text","xterm" },
|
||||
{ "alias", "dnd-link" },
|
||||
{ "copy", "dnd-copy" },
|
||||
{ "move", "dnd-move" },
|
||||
{ "no-drop", "dnd-none" },
|
||||
{ "not-allowed", "crossed_circle" },
|
||||
{ "grab", "hand2" },
|
||||
{ "grabbing", "hand2" },
|
||||
{ "all-scroll", "left_ptr" },
|
||||
{ "col-resize", "h_double_arrow" },
|
||||
{ "row-resize", "v_double_arrow" },
|
||||
{ "n-resize", "top_side" },
|
||||
@@ -112,6 +118,8 @@ static const struct {
|
||||
{ "ns-resize", "v_double_arrow" },
|
||||
{ "nesw-resize", "fd_double_arrow" },
|
||||
{ "nwse-resize", "bd_double_arrow" },
|
||||
{ "zoom-in", "left_ptr" },
|
||||
{ "zoom-out", "left_ptr" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -126,7 +134,7 @@ name_fallback (const gchar *name)
|
||||
return name_map[i].traditional_name;
|
||||
}
|
||||
|
||||
return "left_ptr";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -144,17 +152,22 @@ _gdk_wayland_cursor_update (GdkWaylandDisplay *wayland_display,
|
||||
cursor->scale);
|
||||
c = wl_cursor_theme_get_cursor (theme, cursor->name);
|
||||
if (!c)
|
||||
c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
|
||||
{
|
||||
const char *fallback;
|
||||
|
||||
fallback = name_fallback (cursor->name);
|
||||
if (fallback)
|
||||
{
|
||||
c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
|
||||
if (!c)
|
||||
c = wl_cursor_theme_get_cursor (theme, "left_ptr");
|
||||
}
|
||||
}
|
||||
|
||||
if (!c)
|
||||
{
|
||||
g_warning (G_STRLOC ": Unable to load %s from the cursor theme", cursor->name);
|
||||
|
||||
/* return the left_ptr cursor as a fallback */
|
||||
c = wl_cursor_theme_get_cursor (theme, "left_ptr");
|
||||
|
||||
if (!c)
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cursor->wl_cursor = c;
|
||||
|
||||
@@ -33,9 +33,13 @@
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */
|
||||
|
||||
typedef struct _GdkWaylandTouchData GdkWaylandTouchData;
|
||||
|
||||
struct _GdkWaylandTouchData
|
||||
@@ -91,7 +95,6 @@ struct _GdkWaylandDeviceData
|
||||
guint32 repeat_count;
|
||||
GSettings *keyboard_settings;
|
||||
|
||||
GdkCursor *grab_cursor;
|
||||
guint cursor_timeout_id;
|
||||
guint cursor_image_index;
|
||||
guint cursor_image_delay;
|
||||
@@ -200,12 +203,7 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
|
||||
guint next_image_index, next_image_delay;
|
||||
gboolean retval = G_SOURCE_REMOVE;
|
||||
|
||||
if (wd->grab_cursor)
|
||||
{
|
||||
buffer = _gdk_wayland_cursor_get_buffer (wd->grab_cursor, 0,
|
||||
&x, &y, &w, &h, &scale);
|
||||
}
|
||||
else if (wd->cursor)
|
||||
if (wd->cursor)
|
||||
{
|
||||
buffer = _gdk_wayland_cursor_get_buffer (wd->cursor, wd->cursor_image_index,
|
||||
&x, &y, &w, &h, &scale);
|
||||
@@ -219,23 +217,27 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
|
||||
if (!wd->wl_pointer)
|
||||
return retval;
|
||||
|
||||
wl_pointer_set_cursor (wd->wl_pointer,
|
||||
wd->enter_serial,
|
||||
wd->pointer_surface,
|
||||
x, y);
|
||||
if (buffer)
|
||||
{
|
||||
wl_surface_attach (wd->pointer_surface, buffer, 0, 0);
|
||||
wl_surface_set_buffer_scale (wd->pointer_surface, scale);
|
||||
wl_surface_damage (wd->pointer_surface, 0, 0, w, h);
|
||||
wl_surface_commit (wd->pointer_surface);
|
||||
}
|
||||
|
||||
if (wd->grab_cursor)
|
||||
wl_pointer_set_cursor (wd->wl_pointer,
|
||||
wd->enter_serial,
|
||||
wd->pointer_surface,
|
||||
x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We admit only static icons during drags so far */
|
||||
gdk_wayland_device_stop_window_cursor_animation (wd);
|
||||
return retval;
|
||||
wl_pointer_set_cursor (wd->wl_pointer,
|
||||
wd->enter_serial,
|
||||
NULL,
|
||||
0, 0);
|
||||
|
||||
wl_surface_attach (wd->pointer_surface, NULL, 0, 0);
|
||||
wl_surface_commit (wd->pointer_surface);
|
||||
}
|
||||
|
||||
next_image_index =
|
||||
@@ -496,10 +498,10 @@ gdk_wayland_device_grab (GdkDevice *device,
|
||||
wayland_device->wl_seat,
|
||||
time_);
|
||||
|
||||
g_clear_object (&wayland_device->grab_cursor);
|
||||
g_clear_object (&wayland_device->cursor);
|
||||
|
||||
if (cursor)
|
||||
wayland_device->grab_cursor = g_object_ref (cursor);
|
||||
wayland_device->cursor = g_object_ref (cursor);
|
||||
|
||||
gdk_wayland_device_update_window_cursor (wayland_device);
|
||||
}
|
||||
@@ -538,7 +540,6 @@ gdk_wayland_device_ungrab (GdkDevice *device,
|
||||
else
|
||||
{
|
||||
/* Device is a pointer */
|
||||
g_clear_object (&wayland_device->grab_cursor);
|
||||
gdk_wayland_device_update_window_cursor (wayland_device);
|
||||
|
||||
if (wayland_device->pointer_grab_window)
|
||||
@@ -881,7 +882,7 @@ pointer_handle_enter (void *data,
|
||||
event->crossing.subwindow = NULL;
|
||||
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
|
||||
event->crossing.mode = GDK_CROSSING_NORMAL;
|
||||
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
|
||||
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
|
||||
event->crossing.focus = TRUE;
|
||||
event->crossing.state = 0;
|
||||
|
||||
@@ -928,7 +929,7 @@ pointer_handle_leave (void *data,
|
||||
event->crossing.subwindow = NULL;
|
||||
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
|
||||
event->crossing.mode = GDK_CROSSING_NORMAL;
|
||||
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
|
||||
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
|
||||
event->crossing.focus = TRUE;
|
||||
event->crossing.state = 0;
|
||||
|
||||
@@ -1018,14 +1019,18 @@ pointer_handle_button (void *data,
|
||||
|
||||
switch (button)
|
||||
{
|
||||
case 273:
|
||||
gdk_button = 3;
|
||||
case BTN_LEFT:
|
||||
gdk_button = GDK_BUTTON_PRIMARY;
|
||||
break;
|
||||
case 274:
|
||||
gdk_button = 2;
|
||||
case BTN_MIDDLE:
|
||||
gdk_button = GDK_BUTTON_MIDDLE;
|
||||
break;
|
||||
case BTN_RIGHT:
|
||||
gdk_button = GDK_BUTTON_SECONDARY;
|
||||
break;
|
||||
default:
|
||||
gdk_button = button - 271;
|
||||
/* For compatibility reasons, all additional buttons go after the old 4-7 scroll ones */
|
||||
gdk_button = button - BUTTON_BASE + 4;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1191,15 +1196,14 @@ keyboard_handle_leave (void *data,
|
||||
GdkEvent *event;
|
||||
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
|
||||
|
||||
if (!surface)
|
||||
return;
|
||||
|
||||
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
|
||||
return;
|
||||
|
||||
if (!device->keyboard_focus)
|
||||
return;
|
||||
|
||||
/* gdk_window_is_destroyed() might already return TRUE for
|
||||
* device->keyboard_focus here, which would happen if we destroyed the
|
||||
* window before loosing keyboard focus.
|
||||
*/
|
||||
|
||||
stop_key_repeat (device);
|
||||
|
||||
_gdk_wayland_display_update_serial (display, serial);
|
||||
@@ -2155,8 +2159,6 @@ pointer_surface_update_scale (GdkWaylandDeviceData *device)
|
||||
|
||||
device->current_output_scale = scale;
|
||||
|
||||
if (device->grab_cursor)
|
||||
_gdk_wayland_cursor_set_scale (device->grab_cursor, scale);
|
||||
if (device->cursor)
|
||||
_gdk_wayland_cursor_set_scale (device->cursor, scale);
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/memfd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include "gdkwayland.h"
|
||||
@@ -975,41 +977,37 @@ static const struct wl_buffer_listener buffer_listener = {
|
||||
|
||||
static struct wl_shm_pool *
|
||||
create_shm_pool (struct wl_shm *shm,
|
||||
int width,
|
||||
int height,
|
||||
int size,
|
||||
size_t *buf_length,
|
||||
void **data_out)
|
||||
{
|
||||
char filename[] = "/tmp/wayland-shm-XXXXXX";
|
||||
struct wl_shm_pool *pool;
|
||||
int fd, size, stride;
|
||||
int ret, fd;
|
||||
void *data;
|
||||
|
||||
fd = mkstemp (filename);
|
||||
if (fd < 0)
|
||||
ret = syscall (__NR_memfd_create, "gdk-wayland", MFD_CLOEXEC);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
g_critical (G_STRLOC ": Unable to create temporary file (%s): %s",
|
||||
filename, g_strerror (errno));
|
||||
g_critical (G_STRLOC ": creating shared memory file failed: %s",
|
||||
g_strerror (-ret));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
stride = width * 4;
|
||||
size = stride * height;
|
||||
fd = ret;
|
||||
|
||||
if (ftruncate (fd, size) < 0)
|
||||
{
|
||||
g_critical (G_STRLOC ": Truncating temporary file failed: %s",
|
||||
g_strerror (errno));
|
||||
g_critical (G_STRLOC ": Truncating shared memory file failed: %m");
|
||||
close (fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
unlink (filename);
|
||||
|
||||
if (data == MAP_FAILED)
|
||||
{
|
||||
g_critical (G_STRLOC ": mmap'ping temporary file failed: %s",
|
||||
g_strerror (errno));
|
||||
g_critical (G_STRLOC ": mmap'ping shared memory file failed: %m");
|
||||
close (fd);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1056,10 +1054,10 @@ _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
|
||||
data->scale = scale;
|
||||
data->busy = FALSE;
|
||||
|
||||
stride = width * 4;
|
||||
stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width*scale);
|
||||
|
||||
data->pool = create_shm_pool (display->shm,
|
||||
width*scale, height*scale,
|
||||
height*scale*stride,
|
||||
&data->buf_length,
|
||||
&data->buf);
|
||||
|
||||
@@ -1067,11 +1065,11 @@ _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
|
||||
CAIRO_FORMAT_ARGB32,
|
||||
width*scale,
|
||||
height*scale,
|
||||
stride*scale);
|
||||
stride);
|
||||
|
||||
data->buffer = wl_shm_pool_create_buffer (data->pool, 0,
|
||||
width*scale, height*scale,
|
||||
stride*scale, WL_SHM_FORMAT_ARGB8888);
|
||||
stride, WL_SHM_FORMAT_ARGB8888);
|
||||
wl_buffer_add_listener (data->buffer, &buffer_listener, surface);
|
||||
|
||||
cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
|
||||
|
||||
@@ -264,6 +264,12 @@ get_xkb_modifiers (struct xkb_keymap *xkb_keymap,
|
||||
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_LOGO);
|
||||
if (state & GDK_MOD5_MASK)
|
||||
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5");
|
||||
if (state & GDK_SUPER_MASK)
|
||||
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Super");
|
||||
if (state & GDK_HYPER_MASK)
|
||||
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Hyper");
|
||||
if (state & GDK_META_MASK)
|
||||
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Meta");
|
||||
|
||||
return mods;
|
||||
}
|
||||
@@ -290,6 +296,12 @@ get_gdk_modifiers (struct xkb_keymap *xkb_keymap,
|
||||
state |= GDK_MOD4_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5")))
|
||||
state |= GDK_MOD5_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Super")))
|
||||
state |= GDK_SUPER_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Hyper")))
|
||||
state |= GDK_HYPER_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Meta")))
|
||||
state |= GDK_META_MASK;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ init_settings (GdkScreen *screen)
|
||||
if (g_hash_table_lookup (screen_wayland->settings, (gpointer)translations[i].schema) != NULL)
|
||||
continue;
|
||||
|
||||
schema = g_settings_schema_source_lookup (source, translations[i].schema, FALSE);
|
||||
schema = g_settings_schema_source_lookup (source, translations[i].schema, TRUE);
|
||||
if (schema != NULL)
|
||||
{
|
||||
settings = g_settings_new_full (schema, NULL, NULL);
|
||||
|
||||
@@ -69,7 +69,6 @@ struct _DataOfferData
|
||||
{
|
||||
struct wl_data_offer *offer;
|
||||
GList *targets; /* List of GdkAtom */
|
||||
GdkAtom requested_target;
|
||||
};
|
||||
|
||||
struct _AsyncWriteData
|
||||
@@ -97,6 +96,7 @@ struct _GdkWaylandSelection
|
||||
/* Source-side data */
|
||||
StoredSelection stored_selection;
|
||||
GArray *source_targets;
|
||||
GdkAtom requested_target;
|
||||
|
||||
struct wl_data_source *clipboard_source;
|
||||
GdkWindow *clipboard_owner;
|
||||
@@ -657,7 +657,6 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
|
||||
GdkAtom target,
|
||||
gint fd)
|
||||
{
|
||||
DataOfferData *offer;
|
||||
GdkAtom selection;
|
||||
|
||||
if (wayland_selection->clipboard_owner == window)
|
||||
@@ -667,10 +666,8 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
offer = selection_lookup_offer_by_atom (wayland_selection, selection);
|
||||
|
||||
if (wayland_selection->stored_selection.fd == fd &&
|
||||
offer->requested_target == target)
|
||||
wayland_selection->requested_target == target)
|
||||
return FALSE;
|
||||
|
||||
/* If we didn't issue gdk_wayland_selection_check_write() yet
|
||||
@@ -681,7 +678,7 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
|
||||
close (wayland_selection->stored_selection.fd);
|
||||
|
||||
wayland_selection->stored_selection.fd = fd;
|
||||
offer->requested_target = target;
|
||||
wayland_selection->requested_target = target;
|
||||
|
||||
if (window &&
|
||||
gdk_wayland_selection_source_handles_target (wayland_selection, target))
|
||||
@@ -782,9 +779,9 @@ data_source_send (void *data,
|
||||
|
||||
if (context)
|
||||
{
|
||||
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
|
||||
_gdk_wayland_drag_context_emit_event (context, GDK_DROP_FINISHED,
|
||||
GDK_CURRENT_TIME);
|
||||
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,6 +792,7 @@ data_source_cancelled (void *data,
|
||||
GdkWaylandSelection *wayland_selection = data;
|
||||
GdkDragContext *context;
|
||||
GdkDisplay *display;
|
||||
GdkAtom atom;
|
||||
|
||||
g_debug (G_STRLOC ": %s source = %p",
|
||||
G_STRFUNC, source);
|
||||
@@ -802,16 +800,22 @@ data_source_cancelled (void *data,
|
||||
display = gdk_display_get_default ();
|
||||
|
||||
if (source == wayland_selection->dnd_source)
|
||||
{
|
||||
gdk_wayland_selection_unset_data_source (display, atoms[ATOM_DND]);
|
||||
atom = atoms[ATOM_DND];
|
||||
else if (source == wayland_selection->clipboard_source)
|
||||
atom = atoms[ATOM_CLIPBOARD];
|
||||
else
|
||||
return;
|
||||
|
||||
gdk_wayland_selection_unset_data_source (display, atom);
|
||||
gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
|
||||
|
||||
if (source == wayland_selection->dnd_source)
|
||||
{
|
||||
context = gdk_wayland_drag_context_lookup_by_data_source (source);
|
||||
|
||||
if (context)
|
||||
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
|
||||
}
|
||||
else if (source == wayland_selection->clipboard_source)
|
||||
gdk_wayland_selection_unset_data_source (display, atoms[ATOM_CLIPBOARD]);
|
||||
}
|
||||
|
||||
static const struct wl_data_source_listener data_source_listener = {
|
||||
@@ -864,15 +868,9 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner,
|
||||
wayland_selection);
|
||||
|
||||
if (is_clipboard)
|
||||
{
|
||||
wayland_selection->clipboard_source = source;
|
||||
wayland_selection->clipboard_owner = owner;
|
||||
}
|
||||
wayland_selection->clipboard_source = source;
|
||||
else
|
||||
{
|
||||
wayland_selection->dnd_source = source;
|
||||
wayland_selection->dnd_owner = owner;
|
||||
}
|
||||
wayland_selection->dnd_source = source;
|
||||
|
||||
return source;
|
||||
}
|
||||
@@ -892,7 +890,6 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
|
||||
device = gdk_device_manager_get_client_pointer (device_manager);
|
||||
|
||||
gdk_wayland_device_set_selection (device, NULL);
|
||||
wayland_selection->clipboard_owner = NULL;
|
||||
|
||||
if (wayland_selection->clipboard_source)
|
||||
{
|
||||
@@ -902,7 +899,6 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
|
||||
}
|
||||
else if (selection == atoms[ATOM_DND])
|
||||
{
|
||||
wayland_selection->dnd_owner = NULL;
|
||||
wayland_selection->dnd_source = NULL;
|
||||
}
|
||||
}
|
||||
@@ -1189,6 +1185,7 @@ gdk_wayland_selection_clear_targets (GdkDisplay *display,
|
||||
{
|
||||
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
|
||||
|
||||
wayland_selection->requested_target = GDK_NONE;
|
||||
g_array_set_size (wayland_selection->source_targets, 0);
|
||||
gdk_wayland_selection_unset_data_source (display, selection);
|
||||
}
|
||||
|
||||
+128
-28
@@ -888,9 +888,6 @@ gdk_wayland_window_create_subsurface (GdkWindow *window)
|
||||
GdkWindowImplWayland *impl, *parent_impl = NULL;
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
|
||||
return;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
if (!impl->surface)
|
||||
@@ -1209,13 +1206,87 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
|
||||
static gboolean
|
||||
should_be_mapped (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
/* Don't map crazy temp that GTK+ uses for internal X11 shenanigans. */
|
||||
if (window->window_type == GDK_WINDOW_TEMP && window->x < 0 && window->y < 0)
|
||||
return FALSE;
|
||||
|
||||
if (impl->hint == GDK_WINDOW_TYPE_HINT_DND)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_map_as_subsurface (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
|
||||
return TRUE;
|
||||
|
||||
switch (impl->hint)
|
||||
{
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
|
||||
return TRUE;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_map_as_popup (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
switch (impl->hint)
|
||||
{
|
||||
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_COMBO:
|
||||
return TRUE;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TEMP)
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Get the window that can be used as a parent for a popup, i.e. a xdg_surface
|
||||
* or xdg_popup. If the window is not, traverse up the transiency parents until
|
||||
* we find one.
|
||||
*/
|
||||
static GdkWindow *
|
||||
get_popup_parent (GdkWindow *window)
|
||||
{
|
||||
while (window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
if (impl->xdg_popup || impl->xdg_surface)
|
||||
return window;
|
||||
|
||||
window = impl->transient_for;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_map (GdkWindow *window)
|
||||
{
|
||||
@@ -1225,8 +1296,22 @@ gdk_wayland_window_map (GdkWindow *window)
|
||||
if (!should_be_mapped (window))
|
||||
return;
|
||||
|
||||
if (!impl->mapped && !impl->use_custom_surface)
|
||||
if (impl->mapped || impl->use_custom_surface)
|
||||
return;
|
||||
|
||||
if (should_map_as_subsurface (window))
|
||||
{
|
||||
if (impl->transient_for)
|
||||
gdk_wayland_window_create_subsurface (window);
|
||||
else
|
||||
g_warning ("Couldn't map as window %p as susburface yet because it doesn't have a parent",
|
||||
window);
|
||||
}
|
||||
else if (should_map_as_popup (window))
|
||||
{
|
||||
gboolean create_fallback = FALSE;
|
||||
struct wl_seat *grab_input_seat;
|
||||
|
||||
/* Popup menus can appear without a transient parent, which means they
|
||||
* cannot be positioned properly on Wayland. This attempts to guess the
|
||||
* surface they should be positioned with by finding the surface beneath
|
||||
@@ -1265,7 +1350,7 @@ gdk_wayland_window_map (GdkWindow *window)
|
||||
}
|
||||
|
||||
if (transient_for)
|
||||
transient_for = gdk_window_get_toplevel (transient_for);
|
||||
transient_for = get_popup_parent (gdk_window_get_toplevel (transient_for));
|
||||
|
||||
/* If the position was not explicitly set, start the popup at the
|
||||
* position of the device that holds the grab.
|
||||
@@ -1276,31 +1361,45 @@ gdk_wayland_window_map (GdkWindow *window)
|
||||
&window->x, &window->y, NULL);
|
||||
}
|
||||
else
|
||||
transient_for = impl->transient_for;
|
||||
transient_for = get_popup_parent (impl->transient_for);
|
||||
|
||||
if (transient_for &&
|
||||
GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
|
||||
if (!transient_for)
|
||||
{
|
||||
struct wl_seat *grab_input_seat = find_grab_input_seat (window, transient_for);
|
||||
if (grab_input_seat &&
|
||||
(impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
|
||||
impl->hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
|
||||
impl->hint == GDK_WINDOW_TYPE_HINT_COMBO))
|
||||
g_warning ("Couldn't map as window %p as popup because it doesn't have a parent",
|
||||
window);
|
||||
|
||||
create_fallback = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
grab_input_seat = find_grab_input_seat (window, transient_for);
|
||||
|
||||
if (!grab_input_seat)
|
||||
{
|
||||
gdk_wayland_window_create_xdg_popup (window,
|
||||
transient_for,
|
||||
grab_input_seat);
|
||||
goto mapped;
|
||||
g_warning ("Couldn't map window %p as popup because no grabbed seat found",
|
||||
window);
|
||||
|
||||
create_fallback = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (impl->hint != GDK_WINDOW_TYPE_HINT_DND &&
|
||||
GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
|
||||
gdk_wayland_window_create_xdg_surface (window);
|
||||
|
||||
mapped:
|
||||
impl->mapped = TRUE;
|
||||
if (!create_fallback)
|
||||
{
|
||||
gdk_wayland_window_create_xdg_popup (window,
|
||||
transient_for,
|
||||
grab_input_seat);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_wayland_window_create_xdg_surface (window);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_wayland_window_create_xdg_surface (window);
|
||||
}
|
||||
|
||||
impl->mapped = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1312,9 +1411,6 @@ gdk_wayland_window_show (GdkWindow *window,
|
||||
if (!impl->surface)
|
||||
gdk_wayland_window_create_surface (window);
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
|
||||
gdk_wayland_window_create_subsurface (window);
|
||||
|
||||
gdk_wayland_window_map (window);
|
||||
|
||||
_gdk_make_event (window, GDK_MAP, NULL, FALSE);
|
||||
@@ -1673,7 +1769,11 @@ gdk_wayland_window_destroy (GdkWindow *window,
|
||||
gdk_wayland_window_hide_surface (window);
|
||||
|
||||
if (impl->cairo_surface)
|
||||
cairo_surface_finish (impl->cairo_surface);
|
||||
{
|
||||
cairo_surface_finish (impl->cairo_surface);
|
||||
cairo_surface_destroy (impl->cairo_surface);
|
||||
impl->cairo_surface = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1846,7 +1946,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
|
||||
|
||||
gdk_wayland_window_sync_parent (window);
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE &&
|
||||
if (should_map_as_subsurface (window) &&
|
||||
parent && gdk_window_is_visible (window))
|
||||
gdk_wayland_window_create_subsurface (window);
|
||||
}
|
||||
|
||||
@@ -266,10 +266,9 @@ gdk_device_virtual_grab (GdkDevice *device,
|
||||
{
|
||||
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
|
||||
SetCursor (NULL);
|
||||
g_clear_object (&_gdk_win32_grab_cursor);
|
||||
}
|
||||
|
||||
_gdk_win32_grab_cursor = cursor;
|
||||
g_set_object (&_gdk_win32_grab_cursor, cursor);
|
||||
|
||||
if (_gdk_win32_grab_cursor != NULL)
|
||||
SetCursor (GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor);
|
||||
@@ -303,9 +302,8 @@ gdk_device_virtual_ungrab (GdkDevice *device,
|
||||
{
|
||||
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
|
||||
SetCursor (NULL);
|
||||
g_clear_object (&_gdk_win32_grab_cursor);
|
||||
}
|
||||
_gdk_win32_grab_cursor = NULL;
|
||||
g_clear_object (&_gdk_win32_grab_cursor);
|
||||
|
||||
ReleaseCapture ();
|
||||
}
|
||||
|
||||
@@ -26,10 +26,12 @@
|
||||
#include "gdkwin32window.h"
|
||||
#include "gdkwin32.h"
|
||||
|
||||
static int debug_indent = 0;
|
||||
|
||||
/**
|
||||
* gdk_win32_display_set_cursor_theme:
|
||||
* @display: (type GdkWin32Display): a #GdkDisplay
|
||||
* @theme: (allow-none) the name of the cursor theme to use, or %NULL to unset
|
||||
* @name: (allow-none): the name of the cursor theme to use, or %NULL to unset
|
||||
* a previously set value
|
||||
* @size: the cursor size to use, or 0 to keep the previous size
|
||||
*
|
||||
@@ -242,6 +244,81 @@ _gdk_monitor_init (void)
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK
|
||||
inner_display_change_window_procedure (HWND hwnd,
|
||||
UINT message,
|
||||
WPARAM wparam,
|
||||
LPARAM lparam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_DESTROY:
|
||||
{
|
||||
PostQuitMessage (0);
|
||||
return 0;
|
||||
}
|
||||
case WM_DISPLAYCHANGE:
|
||||
{
|
||||
_gdk_monitor_init ();
|
||||
_gdk_root_window_size_init ();
|
||||
g_signal_emit_by_name (_gdk_screen, "size_changed");
|
||||
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
/* Otherwise call DefWindowProcW(). */
|
||||
GDK_NOTE (EVENTS, g_print (" DefWindowProcW"));
|
||||
return DefWindowProc (hwnd, message, wparam, lparam);
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK
|
||||
display_change_window_procedure (HWND hwnd,
|
||||
UINT message,
|
||||
WPARAM wparam,
|
||||
LPARAM lparam)
|
||||
{
|
||||
LRESULT retval;
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("%s%*s%s %p",
|
||||
(debug_indent > 0 ? "\n" : ""),
|
||||
debug_indent, "",
|
||||
_gdk_win32_message_to_string (message), hwnd));
|
||||
debug_indent += 2;
|
||||
retval = inner_display_change_window_procedure (hwnd, message, wparam, lparam);
|
||||
debug_indent -= 2;
|
||||
|
||||
GDK_NOTE (EVENTS, g_print (" => %" G_GINT64_FORMAT "%s", (gint64) retval, (debug_indent == 0 ? "\n" : "")));
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Use a hidden window to be notified about display changes */
|
||||
static void
|
||||
register_display_change_notification (GdkDisplay *display)
|
||||
{
|
||||
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
|
||||
WNDCLASS wclass = { 0, };
|
||||
ATOM klass;
|
||||
|
||||
wclass.lpszClassName = "GdkDisplayChange";
|
||||
wclass.lpfnWndProc = display_change_window_procedure;
|
||||
wclass.hInstance = _gdk_app_hmodule;
|
||||
|
||||
klass = RegisterClass (&wclass);
|
||||
if (klass)
|
||||
{
|
||||
display_win32->hwnd = CreateWindow (MAKEINTRESOURCE (klass),
|
||||
NULL, WS_POPUP,
|
||||
0, 0, 0, 0, NULL, NULL,
|
||||
_gdk_app_hmodule, NULL);
|
||||
if (!display_win32->hwnd)
|
||||
{
|
||||
UnregisterClass (MAKEINTRESOURCE (klass), _gdk_app_hmodule);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GdkDisplay *
|
||||
_gdk_win32_display_open (const gchar *display_name)
|
||||
{
|
||||
@@ -276,6 +353,8 @@ _gdk_win32_display_open (const gchar *display_name)
|
||||
/* Precalculate display name */
|
||||
(void) gdk_display_get_name (_gdk_display);
|
||||
|
||||
register_display_change_notification (_gdk_display);
|
||||
|
||||
g_signal_emit_by_name (_gdk_display, "opened");
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n"));
|
||||
@@ -376,7 +455,6 @@ gdk_win32_display_supports_selection_notification (GdkDisplay *display)
|
||||
}
|
||||
|
||||
static HWND _hwnd_next_viewer = NULL;
|
||||
static int debug_indent = 0;
|
||||
|
||||
/*
|
||||
* maybe this should be integrated with the default message loop - or maybe not ;-)
|
||||
@@ -619,7 +697,6 @@ gdk_win32_display_flush (GdkDisplay * display)
|
||||
GdiFlush ();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gdk_win32_display_sync (GdkDisplay * display)
|
||||
{
|
||||
@@ -631,6 +708,15 @@ gdk_win32_display_sync (GdkDisplay * display)
|
||||
static void
|
||||
gdk_win32_display_dispose (GObject *object)
|
||||
{
|
||||
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
|
||||
|
||||
if (display_win32->hwnd != NULL)
|
||||
{
|
||||
DestroyWindow (display_win32->hwnd);
|
||||
display_win32->hwnd = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gdk_win32_display_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -639,6 +725,7 @@ gdk_win32_display_finalize (GObject *object)
|
||||
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
|
||||
|
||||
_gdk_win32_display_finalize_cursors (display_win32);
|
||||
_gdk_win32_dnd_exit ();
|
||||
|
||||
G_OBJECT_CLASS (gdk_win32_display_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ struct _GdkWin32Display
|
||||
int cursor_theme_size;
|
||||
GHashTable *cursor_cache;
|
||||
|
||||
HWND hwnd;
|
||||
|
||||
/* WGL/OpenGL Items */
|
||||
guint have_wgl : 1;
|
||||
guint gl_version;
|
||||
|
||||
@@ -1569,6 +1569,8 @@ add_format (GArray *fmts,
|
||||
void
|
||||
_gdk_dnd_init (void)
|
||||
{
|
||||
CoInitializeEx (NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
if (getenv ("GDK_WIN32_USE_EXPERIMENTAL_OLE2_DND"))
|
||||
use_ole2_dnd = TRUE;
|
||||
|
||||
@@ -1615,6 +1617,8 @@ _gdk_win32_dnd_exit (void)
|
||||
{
|
||||
OleUninitialize ();
|
||||
}
|
||||
|
||||
CoUninitialize ();
|
||||
}
|
||||
|
||||
/* Source side */
|
||||
|
||||
+138
-94
@@ -1611,14 +1611,6 @@ sync_timer_proc (HWND hwnd,
|
||||
KillTimer (hwnd, sync_timer);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_display_change (void)
|
||||
{
|
||||
_gdk_monitor_init ();
|
||||
_gdk_root_window_size_init ();
|
||||
g_signal_emit_by_name (_gdk_screen, "size_changed");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
handle_nchittest (HWND hwnd,
|
||||
GdkWindow *window,
|
||||
@@ -1687,35 +1679,72 @@ generate_button_event (GdkEventType type,
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by the stacking functions to see if a window
|
||||
* should be always on top.
|
||||
* Restacking is only done if both windows are either ontop
|
||||
* or not ontop.
|
||||
*/
|
||||
static gboolean
|
||||
should_window_be_always_on_top (GdkWindow *window)
|
||||
{
|
||||
DWORD exstyle;
|
||||
|
||||
if ((GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) ||
|
||||
(window->state & GDK_WINDOW_STATE_ABOVE))
|
||||
return TRUE;
|
||||
|
||||
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
if (exstyle & WS_EX_TOPMOST)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_stacking_on_unminimize (MSG *msg)
|
||||
{
|
||||
HWND rover;
|
||||
HWND lowest_transient = NULL;
|
||||
GdkWindow *msg_window;
|
||||
gboolean window_ontop = FALSE;
|
||||
|
||||
rover = msg->hwnd;
|
||||
while ((rover = GetNextWindow (rover, GW_HWNDNEXT)))
|
||||
msg_window = gdk_win32_handle_table_lookup (msg->hwnd);
|
||||
|
||||
if (msg_window)
|
||||
window_ontop = should_window_be_always_on_top (msg_window);
|
||||
|
||||
for (rover = GetNextWindow (msg->hwnd, GW_HWNDNEXT);
|
||||
rover;
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT))
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkWindowImplWin32 *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw)
|
||||
{
|
||||
GdkWindowImplWin32 *rover_impl =
|
||||
GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
if (rover_gdkw == NULL)
|
||||
continue;
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL))
|
||||
{
|
||||
lowest_transient = rover;
|
||||
}
|
||||
}
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL) &&
|
||||
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
|
||||
{
|
||||
lowest_transient = rover;
|
||||
}
|
||||
}
|
||||
|
||||
if (lowest_transient != NULL)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" restacking: %p", lowest_transient));
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" restacking %p above %p",
|
||||
msg->hwnd, lowest_transient));
|
||||
SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
@@ -1727,52 +1756,61 @@ ensure_stacking_on_window_pos_changing (MSG *msg,
|
||||
{
|
||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
WINDOWPOS *windowpos = (WINDOWPOS *) msg->lParam;
|
||||
HWND rover;
|
||||
gboolean restacking;
|
||||
gboolean window_ontop;
|
||||
|
||||
if (GetActiveWindow () == msg->hwnd &&
|
||||
impl->type_hint != GDK_WINDOW_TYPE_HINT_UTILITY &&
|
||||
impl->type_hint != GDK_WINDOW_TYPE_HINT_DIALOG &&
|
||||
impl->transient_owner == NULL)
|
||||
if (GetActiveWindow () != msg->hwnd ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
impl->transient_owner != NULL)
|
||||
return FALSE;
|
||||
|
||||
/* Make sure the window stays behind any transient-type windows
|
||||
* of the same window group.
|
||||
*
|
||||
* If the window is not active and being activated, we let
|
||||
* Windows bring it to the top and rely on the WM_ACTIVATEAPP
|
||||
* handling to bring any utility windows on top of it.
|
||||
*/
|
||||
|
||||
window_ontop = should_window_be_always_on_top (window);
|
||||
|
||||
for (rover = windowpos->hwndInsertAfter, restacking = FALSE;
|
||||
rover;
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT))
|
||||
{
|
||||
/* Make sure the window stays behind any transient-type windows
|
||||
* of the same window group.
|
||||
*
|
||||
* If the window is not active and being activated, we let
|
||||
* Windows bring it to the top and rely on the WM_ACTIVATEAPP
|
||||
* handling to bring any utility windows on top of it.
|
||||
*/
|
||||
HWND rover;
|
||||
gboolean restacking;
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkWindowImplWin32 *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
rover = windowpos->hwndInsertAfter;
|
||||
restacking = FALSE;
|
||||
while (rover)
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
/* Checking window group not implemented yet */
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw)
|
||||
{
|
||||
GdkWindowImplWin32 *rover_impl =
|
||||
GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
if (rover_gdkw == NULL)
|
||||
continue;
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL))
|
||||
{
|
||||
restacking = TRUE;
|
||||
windowpos->hwndInsertAfter = rover;
|
||||
}
|
||||
}
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT);
|
||||
}
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
|
||||
if (restacking)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" restacking: %p", windowpos->hwndInsertAfter));
|
||||
return TRUE;
|
||||
}
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL) &&
|
||||
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
|
||||
{
|
||||
restacking = TRUE;
|
||||
windowpos->hwndInsertAfter = rover;
|
||||
}
|
||||
}
|
||||
|
||||
if (restacking)
|
||||
{
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" letting Windows restack %p above %p",
|
||||
msg->hwnd, windowpos->hwndInsertAfter));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1781,6 +1819,8 @@ ensure_stacking_on_activate_app (MSG *msg,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
HWND rover;
|
||||
gboolean window_ontop;
|
||||
|
||||
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
@@ -1791,38 +1831,46 @@ ensure_stacking_on_activate_app (MSG *msg,
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsWindowVisible (msg->hwnd) &&
|
||||
msg->hwnd == GetActiveWindow ())
|
||||
if (!IsWindowVisible (msg->hwnd) ||
|
||||
msg->hwnd != GetActiveWindow ())
|
||||
return;
|
||||
|
||||
|
||||
/* This window is not a transient-type window and it is the
|
||||
* activated window. Make sure this window is as visible as
|
||||
* possible, just below the lowest transient-type window of this
|
||||
* app.
|
||||
*/
|
||||
|
||||
window_ontop = should_window_be_always_on_top (window);
|
||||
|
||||
for (rover = GetNextWindow (msg->hwnd, GW_HWNDPREV);
|
||||
rover;
|
||||
rover = GetNextWindow (rover, GW_HWNDPREV))
|
||||
{
|
||||
/* This window is not a transient-type window and it is the
|
||||
* activated window. Make sure this window is as visible as
|
||||
* possible, just below the lowest transient-type window of this
|
||||
* app.
|
||||
*/
|
||||
HWND rover;
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkWindowImplWin32 *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
rover = msg->hwnd;
|
||||
while ((rover = GetNextWindow (rover, GW_HWNDPREV)))
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw == NULL)
|
||||
continue;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw)
|
||||
{
|
||||
GdkWindowImplWin32 *rover_impl =
|
||||
GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL))
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" restacking: %p", rover));
|
||||
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL) &&
|
||||
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
|
||||
{
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" restacking %p above %p",
|
||||
msg->hwnd, rover));
|
||||
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3202,10 +3250,6 @@ gdk_event_translate (MSG *msg,
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
||||
case WM_DISPLAYCHANGE:
|
||||
handle_display_change ();
|
||||
break;
|
||||
|
||||
case WM_DWMCOMPOSITIONCHANGED:
|
||||
_gdk_win32_window_enable_transparency (window);
|
||||
break;
|
||||
|
||||
@@ -97,8 +97,6 @@ _gdk_win32_windowing_init (void)
|
||||
GDK_NOTE (EVENTS, g_print ("input_locale:%p, codepage:%d\n",
|
||||
_gdk_input_locale, _gdk_input_codepage));
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
_gdk_selection = gdk_atom_intern_static_string ("GDK_SELECTION");
|
||||
_wm_transient_for = gdk_atom_intern_static_string ("WM_TRANSIENT_FOR");
|
||||
_targets = gdk_atom_intern_static_string ("TARGETS");
|
||||
|
||||
@@ -52,7 +52,7 @@ GType gdk_win32_display_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
void gdk_win32_display_set_cursor_theme (GdkDisplay *display,
|
||||
const gchar *theme,
|
||||
const gchar *name,
|
||||
gint size);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
+64
-17
@@ -60,6 +60,13 @@ struct _FullscreenInfo
|
||||
LONG style;
|
||||
};
|
||||
|
||||
/* Use this for hWndInsertAfter (2nd argument to SetWindowPos()) if
|
||||
* SWP_NOZORDER flag is used. Otherwise it's unobvious why a particular
|
||||
* argument is used. Using NULL is misleading, because
|
||||
* NULL is equivalent to HWND_TOP.
|
||||
*/
|
||||
#define SWP_NOZORDER_SPECIFIED HWND_TOP
|
||||
|
||||
static void update_style_bits (GdkWindow *window);
|
||||
static gboolean _gdk_window_get_functions (GdkWindow *window,
|
||||
GdkWMFunction *functions);
|
||||
@@ -694,7 +701,8 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
||||
/* Now we know the initial position, move to actually specified position */
|
||||
if (real_x != x || real_y != y)
|
||||
{
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
real_x, real_y, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
|
||||
}
|
||||
@@ -1027,7 +1035,8 @@ show_window_internal (GdkWindow *window,
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || !focus_on_map)
|
||||
flags |= SWP_NOACTIVATE;
|
||||
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0, flags);
|
||||
SetWindowPos (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED, 0, 0, 0, 0, flags);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1097,7 +1106,8 @@ show_window_internal (GdkWindow *window,
|
||||
y = center_on_rect.top + ((center_on_rect.bottom - center_on_rect.top) - (window_rect.bottom - window_rect.top)) / 2;
|
||||
}
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
x, y, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
|
||||
}
|
||||
@@ -1146,7 +1156,8 @@ show_window_internal (GdkWindow *window,
|
||||
}
|
||||
|
||||
if (x != window_rect.left || y != window_rect.top)
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
window_rect.left, window_rect.top, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
|
||||
}
|
||||
@@ -1218,9 +1229,12 @@ gdk_win32_window_hide (GdkWindow *window)
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
|
||||
ShowOwnedPopups (GDK_WINDOW_HWND (window), FALSE);
|
||||
|
||||
/* Use SetWindowPos to hide transparent windows so automatic redraws
|
||||
* in other windows can be suppressed.
|
||||
*/
|
||||
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
|
||||
{
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM,
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), SWP_NOZORDER_SPECIFIED,
|
||||
0, 0, 0, 0,
|
||||
SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
@@ -1279,7 +1293,8 @@ gdk_win32_window_move (GdkWindow *window,
|
||||
GDK_WINDOW_HWND (window),
|
||||
x - _gdk_offset_x, y - _gdk_offset_y));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
x - _gdk_offset_x, y - _gdk_offset_y, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
|
||||
}
|
||||
@@ -1321,7 +1336,8 @@ gdk_win32_window_resize (GdkWindow *window,
|
||||
outer_rect.right - outer_rect.left,
|
||||
outer_rect.bottom - outer_rect.top));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
0, 0,
|
||||
outer_rect.right - outer_rect.left,
|
||||
outer_rect.bottom - outer_rect.top,
|
||||
@@ -1373,7 +1389,8 @@ gdk_win32_window_move_resize_internal (GdkWindow *window,
|
||||
outer_rect.right - outer_rect.left,
|
||||
outer_rect.bottom - outer_rect.top));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
x - _gdk_offset_x, y - _gdk_offset_y,
|
||||
outer_rect.right - outer_rect.left,
|
||||
outer_rect.bottom - outer_rect.top,
|
||||
@@ -2402,6 +2419,10 @@ update_style_bits (GdkWindow *window)
|
||||
LONG old_style, new_style, old_exstyle, new_exstyle;
|
||||
gboolean all;
|
||||
RECT rect, before, after;
|
||||
gboolean was_topmost;
|
||||
gboolean will_be_topmost;
|
||||
HWND insert_after;
|
||||
UINT flags;
|
||||
|
||||
if (window->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
return;
|
||||
@@ -2413,15 +2434,27 @@ update_style_bits (GdkWindow *window)
|
||||
after = before;
|
||||
AdjustWindowRectEx (&before, old_style, FALSE, old_exstyle);
|
||||
|
||||
was_topmost = (old_exstyle & WS_EX_TOPMOST) ? TRUE : FALSE;
|
||||
will_be_topmost = was_topmost;
|
||||
|
||||
old_exstyle &= ~WS_EX_TOPMOST;
|
||||
|
||||
new_style = old_style;
|
||||
new_exstyle = old_exstyle;
|
||||
|
||||
if (window->window_type == GDK_WINDOW_TEMP)
|
||||
new_exstyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
|
||||
{
|
||||
new_exstyle |= WS_EX_TOOLWINDOW;
|
||||
will_be_topmost = TRUE;
|
||||
}
|
||||
else if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
|
||||
new_exstyle |= WS_EX_TOOLWINDOW ;
|
||||
{
|
||||
new_exstyle |= WS_EX_TOOLWINDOW;
|
||||
}
|
||||
else
|
||||
new_exstyle &= ~WS_EX_TOOLWINDOW;
|
||||
{
|
||||
new_exstyle &= ~WS_EX_TOOLWINDOW;
|
||||
}
|
||||
|
||||
if (get_effective_window_decorations (window, &decorations))
|
||||
{
|
||||
@@ -2469,12 +2502,26 @@ update_style_bits (GdkWindow *window)
|
||||
rect.right += after.right - before.right;
|
||||
rect.bottom += after.bottom - before.bottom;
|
||||
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||
SWP_NOREPOSITION | SWP_NOZORDER);
|
||||
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION;
|
||||
|
||||
if (will_be_topmost && !was_topmost)
|
||||
{
|
||||
insert_after = HWND_TOPMOST;
|
||||
}
|
||||
else if (was_topmost && !will_be_topmost)
|
||||
{
|
||||
insert_after = HWND_NOTOPMOST;
|
||||
}
|
||||
else
|
||||
{
|
||||
flags |= SWP_NOZORDER;
|
||||
insert_after = SWP_NOZORDER_SPECIFIED;
|
||||
}
|
||||
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), insert_after,
|
||||
0, 0,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
flags);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3057,7 +3104,7 @@ gdk_win32_window_set_skip_taskbar_hint (GdkWindow *window,
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
|
||||
GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE) & ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU));
|
||||
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), SWP_NOZORDER_SPECIFIED,
|
||||
0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
|
||||
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
|
||||
+20
-4
@@ -611,17 +611,23 @@ static const struct {
|
||||
const gchar *css_name, *traditional_name;
|
||||
} name_map[] = {
|
||||
{ "default", "left_ptr" },
|
||||
{ "help", "left_ptr" },
|
||||
{ "context-menu", "left_ptr" },
|
||||
{ "pointer", "hand" },
|
||||
{ "progress", "left_ptr_watch" },
|
||||
{ "wait", "watch" },
|
||||
{ "cell", "crosshair" },
|
||||
{ "crosshair", "cross" },
|
||||
{ "text", "xterm" },
|
||||
{ "vertical-text","xterm" },
|
||||
{ "alias", "dnd-link" },
|
||||
{ "copy", "dnd-copy" },
|
||||
{ "move", "dnd-move" },
|
||||
{ "no-drop", "dnd-none" },
|
||||
{ "not-allowed", "crossed_circle" },
|
||||
{ "grab", "hand2" },
|
||||
{ "grabbing", "hand2" },
|
||||
{ "all-scroll", "left_ptr" },
|
||||
{ "col-resize", "h_double_arrow" },
|
||||
{ "row-resize", "v_double_arrow" },
|
||||
{ "n-resize", "top_side" },
|
||||
@@ -636,6 +642,8 @@ static const struct {
|
||||
{ "ns-resize", "v_double_arrow" },
|
||||
{ "nesw-resize", "fd_double_arrow" },
|
||||
{ "nwse-resize", "bd_double_arrow" },
|
||||
{ "zoom-in", "left_ptr" },
|
||||
{ "zoom-out", "left_ptr" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -650,7 +658,7 @@ name_fallback (const gchar *name)
|
||||
return name_map[i].traditional_name;
|
||||
}
|
||||
|
||||
return "left_ptr";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
@@ -683,9 +691,17 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay *display,
|
||||
xdisplay = GDK_DISPLAY_XDISPLAY (display);
|
||||
xcursor = XcursorLibraryLoadCursor (xdisplay, name);
|
||||
if (xcursor == None)
|
||||
xcursor = XcursorLibraryLoadCursor (xdisplay, name_fallback (name));
|
||||
if (xcursor == None)
|
||||
xcursor = XcursorLibraryLoadCursor (xdisplay, "left_ptr");
|
||||
{
|
||||
const char *fallback;
|
||||
|
||||
fallback = name_fallback (name);
|
||||
if (fallback)
|
||||
{
|
||||
xcursor = XcursorLibraryLoadCursor (xdisplay, fallback);
|
||||
if (xcursor == None)
|
||||
xcursor = XcursorLibraryLoadCursor (xdisplay, "left_ptr");
|
||||
}
|
||||
}
|
||||
if (xcursor == None)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -807,6 +807,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
int mode)
|
||||
{
|
||||
GdkToplevelX11 *toplevel;
|
||||
GdkX11Screen *x11_screen;
|
||||
gboolean had_focus;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
@@ -828,6 +829,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
return;
|
||||
|
||||
had_focus = HAS_FOCUS (toplevel);
|
||||
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
|
||||
|
||||
switch (detail)
|
||||
{
|
||||
@@ -841,6 +843,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
* has_focus_window case.
|
||||
*/
|
||||
if (toplevel->has_pointer &&
|
||||
!x11_screen->wmspec_check_window &&
|
||||
mode != NotifyGrab &&
|
||||
#ifdef XINPUT_2
|
||||
mode != XINotifyPassiveGrab &&
|
||||
@@ -871,7 +874,8 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
* but the pointer focus is ignored while a
|
||||
* grab is in effect
|
||||
*/
|
||||
if (mode != NotifyGrab &&
|
||||
if (!x11_screen->wmspec_check_window &&
|
||||
mode != NotifyGrab &&
|
||||
#ifdef XINPUT_2
|
||||
mode != XINotifyPassiveGrab &&
|
||||
mode != XINotifyPassiveUngrab &&
|
||||
|
||||
@@ -301,6 +301,39 @@ is_touch_device (XIAnyClassInfo **classes,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
has_abs_axes (GdkDisplay *display,
|
||||
XIAnyClassInfo **classes,
|
||||
guint n_classes)
|
||||
{
|
||||
gboolean has_x = FALSE, has_y = FALSE;
|
||||
Atom abs_x, abs_y;
|
||||
guint i;
|
||||
|
||||
abs_x = gdk_x11_get_xatom_by_name_for_display (display, "Abs X");
|
||||
abs_y = gdk_x11_get_xatom_by_name_for_display (display, "Abs Y");
|
||||
|
||||
for (i = 0; i < n_classes; i++)
|
||||
{
|
||||
XIValuatorClassInfo *class = (XIValuatorClassInfo *) classes[i];
|
||||
|
||||
if (class->type != XIValuatorClass)
|
||||
continue;
|
||||
if (class->mode != XIModeAbsolute)
|
||||
continue;
|
||||
|
||||
if (class->label == abs_x)
|
||||
has_x = TRUE;
|
||||
else if (class->label == abs_y)
|
||||
has_y = TRUE;
|
||||
|
||||
if (has_x && has_y)
|
||||
break;
|
||||
}
|
||||
|
||||
return (has_x && has_y);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
get_device_ids (GdkDisplay *display,
|
||||
XIDeviceInfo *info,
|
||||
@@ -393,6 +426,13 @@ create_device (GdkDeviceManager *device_manager,
|
||||
else if (strstr (tmp_name, "wacom") ||
|
||||
strstr (tmp_name, "pen"))
|
||||
input_source = GDK_SOURCE_PEN;
|
||||
else if (!strstr (tmp_name, "mouse") &&
|
||||
!strstr (tmp_name, "pointer") &&
|
||||
!strstr (tmp_name, "qemu usb tablet") &&
|
||||
!strstr (tmp_name, "spice vdagent tablet") &&
|
||||
!strstr (tmp_name, "virtualbox usb tablet") &&
|
||||
has_abs_axes (display, dev->classes, dev->num_classes))
|
||||
input_source = GDK_SOURCE_TOUCHSCREEN;
|
||||
else
|
||||
input_source = GDK_SOURCE_MOUSE;
|
||||
|
||||
|
||||
+18
-11
@@ -1342,6 +1342,7 @@ gdk_x11_display_init_input (GdkDisplay *display)
|
||||
GdkDeviceManager *device_manager;
|
||||
GdkDevice *device;
|
||||
GList *list, *l;
|
||||
gint pass;
|
||||
|
||||
display_x11 = GDK_X11_DISPLAY (display);
|
||||
device_manager = gdk_display_get_device_manager (display);
|
||||
@@ -1365,25 +1366,31 @@ gdk_x11_display_init_input (GdkDisplay *display)
|
||||
g_list_free (list);
|
||||
|
||||
/* Now set "core" pointer to the first
|
||||
* master device that is a pointer.
|
||||
* master device that is a pointer,
|
||||
* preferring mice over touchscreens.
|
||||
*/
|
||||
list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
for (pass = 0; pass < 2; pass++)
|
||||
{
|
||||
device = l->data;
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
device = l->data;
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
|
||||
continue;
|
||||
if ((pass == 0 && gdk_device_get_source (device) == GDK_SOURCE_MOUSE) ||
|
||||
(pass == 1 && gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN))
|
||||
{
|
||||
display->core_pointer = device;
|
||||
|
||||
display->core_pointer = device;
|
||||
break;
|
||||
/* Add the core pointer to the devices list */
|
||||
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
|
||||
g_object_ref (display->core_pointer));
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the core pointer to the devices list */
|
||||
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
|
||||
g_object_ref (display->core_pointer));
|
||||
|
||||
out:
|
||||
g_list_free (list);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,11 +132,16 @@ static void
|
||||
handle_focus_change (GdkEventCrossing *event)
|
||||
{
|
||||
GdkToplevelX11 *toplevel;
|
||||
GdkX11Screen *x11_screen;
|
||||
gboolean focus_in, had_focus;
|
||||
|
||||
toplevel = _gdk_x11_window_get_toplevel (event->window);
|
||||
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (event->window));
|
||||
focus_in = (event->type == GDK_ENTER_NOTIFY);
|
||||
|
||||
if (x11_screen->wmspec_check_window)
|
||||
return;
|
||||
|
||||
if (!toplevel || event->detail == GDK_NOTIFY_INFERIOR)
|
||||
return;
|
||||
|
||||
|
||||
+139
-89
@@ -328,8 +328,8 @@ get_work_area (GdkScreen *screen,
|
||||
/* Defaults in case of error */
|
||||
area->x = 0;
|
||||
area->y = 0;
|
||||
area->width = gdk_screen_get_width (screen) / x11_screen->window_scale;
|
||||
area->height = gdk_screen_get_height (screen) / x11_screen->window_scale;
|
||||
area->width = gdk_screen_get_width (screen);
|
||||
area->height = gdk_screen_get_height (screen);
|
||||
|
||||
if (!gdk_x11_screen_supports_net_wm_hint (screen,
|
||||
gdk_atom_intern_static_string ("_NET_WORKAREA")))
|
||||
@@ -503,7 +503,7 @@ check_is_composited (GdkDisplay *display,
|
||||
|
||||
static void
|
||||
init_monitor_geometry (GdkX11Monitor *monitor,
|
||||
int x, int y, int width, int height)
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
monitor->geometry.x = x;
|
||||
monitor->geometry.y = y;
|
||||
@@ -613,22 +613,30 @@ monitor_compare_function (GdkX11Monitor *monitor1,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RANDR15
|
||||
static gboolean
|
||||
init_randr15 (GdkScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_RANDR15
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
XRRMonitorInfo *rr_monitors;
|
||||
int num_rr_monitors;
|
||||
XRRScreenResources *resources;
|
||||
RROutput primary_output = None;
|
||||
RROutput first_output = None;
|
||||
int i;
|
||||
GArray *monitors;
|
||||
XID primary_output = None;
|
||||
gboolean randr12_compat = FALSE;
|
||||
XRRMonitorInfo *rr_monitors;
|
||||
int num_rr_monitors;
|
||||
|
||||
if (!display_x11->have_randr15)
|
||||
return FALSE;
|
||||
|
||||
resources = XRRGetScreenResourcesCurrent (x11_screen->xdisplay,
|
||||
x11_screen->xroot_window);
|
||||
if (!resources)
|
||||
return FALSE;
|
||||
|
||||
rr_monitors = XRRGetMonitors (x11_screen->xdisplay,
|
||||
x11_screen->xroot_window,
|
||||
True,
|
||||
@@ -636,11 +644,34 @@ init_randr15 (GdkScreen *screen)
|
||||
if (!rr_monitors)
|
||||
return FALSE;
|
||||
|
||||
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor),
|
||||
num_rr_monitors);
|
||||
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor), num_rr_monitors);
|
||||
|
||||
for (i = 0; i < num_rr_monitors; i++)
|
||||
{
|
||||
RROutput output = rr_monitors[i].outputs[0];
|
||||
XRROutputInfo *output_info;
|
||||
GdkX11Monitor monitor;
|
||||
|
||||
gdk_x11_display_error_trap_push (display);
|
||||
output_info = XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
|
||||
if (gdk_x11_display_error_trap_pop (display))
|
||||
continue;
|
||||
|
||||
if (output_info == NULL)
|
||||
continue;
|
||||
|
||||
/* Non RandR1.2+ X driver have output name "default" */
|
||||
randr12_compat |= !g_strcmp0 (output_info->name, "default");
|
||||
|
||||
if (output_info->connection == RR_Disconnected)
|
||||
{
|
||||
XRRFreeOutputInfo (output_info);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (first_output == None)
|
||||
first_output = output;
|
||||
|
||||
init_monitor_geometry (&monitor,
|
||||
rr_monitors[i].x,
|
||||
rr_monitors[i].y,
|
||||
@@ -649,34 +680,62 @@ init_randr15 (GdkScreen *screen)
|
||||
|
||||
monitor.width_mm = rr_monitors[i].mwidth;
|
||||
monitor.height_mm = rr_monitors[i].mheight;
|
||||
monitor.output = rr_monitors[i].outputs[0];
|
||||
monitor.output = output;
|
||||
monitor.output_name = g_strndup (output_info->name, output_info->nameLen);
|
||||
|
||||
if (rr_monitors[i].primary)
|
||||
primary_output = monitor.output;
|
||||
|
||||
g_array_append_val (monitors, monitor);
|
||||
XRRFreeOutputInfo (output_info);
|
||||
}
|
||||
XRRFreeMonitors (rr_monitors);
|
||||
|
||||
g_array_sort (monitors,
|
||||
(GCompareFunc) monitor_compare_function);
|
||||
XRRFreeMonitors (rr_monitors);
|
||||
XRRFreeScreenResources (resources);
|
||||
|
||||
/* non RandR 1.2+ X driver doesn't return any usable multihead data */
|
||||
if (randr12_compat)
|
||||
{
|
||||
guint n_monitors = monitors->len;
|
||||
|
||||
free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE), n_monitors);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_array_sort (monitors, (GCompareFunc) monitor_compare_function);
|
||||
|
||||
x11_screen->n_monitors = monitors->len;
|
||||
x11_screen->monitors = (GdkX11Monitor *) g_array_free (monitors, FALSE);
|
||||
|
||||
x11_screen->primary_monitor = 0;
|
||||
|
||||
for (i = 0; i < x11_screen->n_monitors; i++)
|
||||
for (i = 0; i < x11_screen->n_monitors; ++i)
|
||||
{
|
||||
if (x11_screen->monitors[i].output == primary_output)
|
||||
{
|
||||
x11_screen->primary_monitor = i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* No RandR1.3+ available or no primary set, fall back to prefer LVDS as primary if present */
|
||||
if (primary_output == None &&
|
||||
g_ascii_strncasecmp (x11_screen->monitors[i].output_name, "LVDS", 4) == 0)
|
||||
{
|
||||
x11_screen->primary_monitor = i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* No primary specified and no LVDS found */
|
||||
if (x11_screen->monitors[i].output == first_output)
|
||||
x11_screen->primary_monitor = i;
|
||||
}
|
||||
|
||||
return x11_screen->n_monitors > 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
init_randr13 (GdkScreen *screen)
|
||||
{
|
||||
@@ -684,9 +743,8 @@ init_randr13 (GdkScreen *screen)
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
Display *dpy = GDK_SCREEN_XDISPLAY (screen);
|
||||
XRRScreenResources *resources;
|
||||
RROutput primary_output;
|
||||
RROutput primary_output = None;
|
||||
RROutput first_output = None;
|
||||
int i;
|
||||
GArray *monitors;
|
||||
@@ -696,50 +754,44 @@ init_randr13 (GdkScreen *screen)
|
||||
return FALSE;
|
||||
|
||||
resources = XRRGetScreenResourcesCurrent (x11_screen->xdisplay,
|
||||
x11_screen->xroot_window);
|
||||
x11_screen->xroot_window);
|
||||
if (!resources)
|
||||
return FALSE;
|
||||
|
||||
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor),
|
||||
resources->noutput);
|
||||
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor), resources->noutput);
|
||||
|
||||
for (i = 0; i < resources->noutput; ++i)
|
||||
{
|
||||
XRROutputInfo *output =
|
||||
XRRGetOutputInfo (dpy, resources, resources->outputs[i]);
|
||||
RROutput output = resources->outputs[i];
|
||||
XRROutputInfo *output_info =
|
||||
XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
|
||||
|
||||
/* Non RandR1.2 X driver have output name "default" */
|
||||
randr12_compat |= !g_strcmp0 (output->name, "default");
|
||||
/* Non RandR1.2+ X driver have output name "default" */
|
||||
randr12_compat |= !g_strcmp0 (output_info->name, "default");
|
||||
|
||||
if (output->connection == RR_Disconnected)
|
||||
if (output_info->connection == RR_Disconnected)
|
||||
{
|
||||
XRRFreeOutputInfo (output);
|
||||
XRRFreeOutputInfo (output_info);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (output->crtc)
|
||||
if (output_info->crtc)
|
||||
{
|
||||
GdkX11Monitor monitor;
|
||||
XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, output->crtc);
|
||||
XRRCrtcInfo *crtc = XRRGetCrtcInfo (x11_screen->xdisplay, resources, output_info->crtc);
|
||||
|
||||
monitor.geometry.x = crtc->x;
|
||||
monitor.geometry.y = crtc->y;
|
||||
monitor.geometry.width = crtc->width;
|
||||
monitor.geometry.height = crtc->height;
|
||||
|
||||
monitor.output = resources->outputs[i];
|
||||
monitor.width_mm = output->mm_width;
|
||||
monitor.height_mm = output->mm_height;
|
||||
monitor.output_name = g_strdup (output->name);
|
||||
/* FIXME: need EDID parser */
|
||||
monitor.manufacturer = NULL;
|
||||
init_monitor_geometry (&monitor, crtc->x, crtc->y, crtc->width, crtc->height);
|
||||
monitor.output = output;
|
||||
monitor.width_mm = output_info->mm_width;
|
||||
monitor.height_mm = output_info->mm_height;
|
||||
monitor.output_name = g_strndup (output_info->name, output_info->nameLen);
|
||||
|
||||
g_array_append_val (monitors, monitor);
|
||||
|
||||
XRRFreeCrtcInfo (crtc);
|
||||
}
|
||||
|
||||
XRRFreeOutputInfo (output);
|
||||
XRRFreeOutputInfo (output_info);
|
||||
}
|
||||
|
||||
if (resources->noutput > 0)
|
||||
@@ -747,19 +799,18 @@ init_randr13 (GdkScreen *screen)
|
||||
|
||||
XRRFreeScreenResources (resources);
|
||||
|
||||
/* non RandR 1.2 X driver doesn't return any usable multihead data */
|
||||
/* non RandR 1.2+ X driver doesn't return any usable multihead data */
|
||||
if (randr12_compat)
|
||||
{
|
||||
guint n_monitors = monitors->len;
|
||||
|
||||
free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE),
|
||||
n_monitors);
|
||||
free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE), n_monitors);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_array_sort (monitors,
|
||||
(GCompareFunc) monitor_compare_function);
|
||||
g_array_sort (monitors, (GCompareFunc) monitor_compare_function);
|
||||
|
||||
x11_screen->n_monitors = monitors->len;
|
||||
x11_screen->monitors = (GdkX11Monitor *)g_array_free (monitors, FALSE);
|
||||
|
||||
@@ -771,22 +822,22 @@ init_randr13 (GdkScreen *screen)
|
||||
for (i = 0; i < x11_screen->n_monitors; ++i)
|
||||
{
|
||||
if (x11_screen->monitors[i].output == primary_output)
|
||||
{
|
||||
x11_screen->primary_monitor = i;
|
||||
break;
|
||||
}
|
||||
{
|
||||
x11_screen->primary_monitor = i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* No RandR1.3+ available or no primary set, fall back to prefer LVDS as primary if present */
|
||||
if (primary_output == None &&
|
||||
g_ascii_strncasecmp (x11_screen->monitors[i].output_name, "LVDS", 4) == 0)
|
||||
{
|
||||
x11_screen->primary_monitor = i;
|
||||
break;
|
||||
}
|
||||
{
|
||||
x11_screen->primary_monitor = i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* No primary specified and no LVDS found */
|
||||
if (x11_screen->monitors[i].output == first_output)
|
||||
x11_screen->primary_monitor = i;
|
||||
x11_screen->primary_monitor = i;
|
||||
}
|
||||
|
||||
return x11_screen->n_monitors > 0;
|
||||
@@ -807,7 +858,12 @@ init_solaris_xinerama (GdkScreen *screen)
|
||||
gint result;
|
||||
int n_monitors;
|
||||
int i;
|
||||
|
||||
int opcode, firstevent, firsterror;
|
||||
|
||||
if (!XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
|
||||
&opcode, &firstevent, &firsterror))
|
||||
return FALSE;
|
||||
|
||||
if (!XineramaGetState (dpy, screen_no))
|
||||
return FALSE;
|
||||
|
||||
@@ -847,7 +903,12 @@ init_xfree_xinerama (GdkScreen *screen)
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
XineramaScreenInfo *monitors;
|
||||
int i, n_monitors;
|
||||
|
||||
int opcode, firstevent, firsterror;
|
||||
|
||||
if (!XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
|
||||
&opcode, &firstevent, &firsterror))
|
||||
return FALSE;
|
||||
|
||||
if (!XineramaIsActive (dpy))
|
||||
return FALSE;
|
||||
|
||||
@@ -1107,42 +1168,10 @@ compare_monitors (GdkX11Monitor *monitors1, gint n_monitors1,
|
||||
}
|
||||
|
||||
static void
|
||||
init_multihead (GdkScreen *screen)
|
||||
init_no_multihead (GdkScreen *screen)
|
||||
{
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
int opcode, firstevent, firsterror;
|
||||
|
||||
/* There are four different implementations of multihead support:
|
||||
*
|
||||
* 1. Fake Xinerama for debugging purposes
|
||||
* 2. RandR 1.2
|
||||
* 3. Solaris Xinerama
|
||||
* 4. XFree86/Xorg Xinerama
|
||||
*
|
||||
* We use them in that order.
|
||||
*/
|
||||
if (init_fake_xinerama (screen))
|
||||
return;
|
||||
|
||||
#ifdef HAVE_RANDR15
|
||||
if (init_randr15 (screen))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (init_randr13 (screen))
|
||||
return;
|
||||
|
||||
if (XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
|
||||
&opcode, &firstevent, &firsterror))
|
||||
{
|
||||
if (init_solaris_xinerama (screen))
|
||||
return;
|
||||
|
||||
if (init_xfree_xinerama (screen))
|
||||
return;
|
||||
}
|
||||
|
||||
/* No multihead support of any kind for this screen */
|
||||
x11_screen->n_monitors = 1;
|
||||
x11_screen->monitors = g_new0 (GdkX11Monitor, 1);
|
||||
x11_screen->primary_monitor = 0;
|
||||
@@ -1152,6 +1181,27 @@ init_multihead (GdkScreen *screen)
|
||||
HeightOfScreen (x11_screen->xscreen));
|
||||
}
|
||||
|
||||
static void
|
||||
init_multihead (GdkScreen *screen)
|
||||
{
|
||||
if (init_fake_xinerama (screen))
|
||||
return;
|
||||
|
||||
if (init_randr15 (screen))
|
||||
return;
|
||||
|
||||
if (init_randr13 (screen))
|
||||
return;
|
||||
|
||||
if (init_solaris_xinerama (screen))
|
||||
return;
|
||||
|
||||
if (init_xfree_xinerama (screen))
|
||||
return;
|
||||
|
||||
init_no_multihead (screen);
|
||||
}
|
||||
|
||||
static void
|
||||
update_bounding_box (GdkScreen *screen)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,7 @@ static const struct {
|
||||
{"Gtk/TitlebarRightClick", "gtk-titlebar-right-click"},
|
||||
{"Gtk/DialogsUseHeader", "gtk-dialogs-use-header"},
|
||||
{"Gtk/EnablePrimaryPaste", "gtk-enable-primary-paste"},
|
||||
{"Gtk/PrimaryButtonWarpsSlider", "gtk-primary-button-warps-slider"},
|
||||
{"Gtk/RecentFilesMaxAge", "gtk-recent-files-max-age"},
|
||||
{"Gtk/RecentFilesEnabled", "gtk-recent-files-enabled"},
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ In order to edit any composite classes in GTK+, startup Glade
|
||||
in the following way, example:
|
||||
|
||||
cd /path/to/gtk+/
|
||||
GLADE_CATALOG_SEARCH_PATH=`pwd`/gtk/glade glade gtk/gtkfilechooserdefault.ui
|
||||
GLADE_CATALOG_SEARCH_PATH=`pwd`/gtk/glade glade gtk/ui/gtkfilechooserwidget.ui
|
||||
|
||||
Documentation for updating this catalog can be found here:
|
||||
https://developer.gnome.org/gladeui/stable/
|
||||
|
||||
@@ -596,8 +596,7 @@ gtk_application_startup (GApplication *g_application)
|
||||
{
|
||||
GtkApplication *application = GTK_APPLICATION (g_application);
|
||||
|
||||
G_APPLICATION_CLASS (gtk_application_parent_class)
|
||||
->startup (g_application);
|
||||
G_APPLICATION_CLASS (gtk_application_parent_class)->startup (g_application);
|
||||
|
||||
gtk_action_muxer_insert (application->priv->muxer, "app", G_ACTION_GROUP (application));
|
||||
|
||||
@@ -614,6 +613,9 @@ gtk_application_shutdown (GApplication *g_application)
|
||||
{
|
||||
GtkApplication *application = GTK_APPLICATION (g_application);
|
||||
|
||||
if (application->priv->impl == NULL)
|
||||
return;
|
||||
|
||||
gtk_application_impl_shutdown (application->priv->impl);
|
||||
g_clear_object (&application->priv->impl);
|
||||
|
||||
@@ -627,8 +629,7 @@ gtk_application_shutdown (GApplication *g_application)
|
||||
/* Synchronize the recent manager singleton */
|
||||
_gtk_recent_manager_sync ();
|
||||
|
||||
G_APPLICATION_CLASS (gtk_application_parent_class)
|
||||
->shutdown (g_application);
|
||||
G_APPLICATION_CLASS (gtk_application_parent_class)->shutdown (g_application);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
+10
-15
@@ -88,6 +88,7 @@ struct _GtkAssistantPage
|
||||
|
||||
gchar *title;
|
||||
|
||||
GtkWidget *box;
|
||||
GtkWidget *page;
|
||||
GtkWidget *regular_title;
|
||||
GtkWidget *current_title;
|
||||
@@ -184,7 +185,7 @@ static void on_assistant_cancel (GtkWidget *wid
|
||||
GtkAssistant *assistant);
|
||||
static void on_assistant_last (GtkWidget *widget,
|
||||
GtkAssistant *assistant);
|
||||
static void assistant_remove_page_cb (GtkNotebook *notebook,
|
||||
static void assistant_remove_page_cb (GtkContainer *container,
|
||||
GtkWidget *page,
|
||||
GtkAssistant *assistant);
|
||||
|
||||
@@ -1113,7 +1114,7 @@ on_page_notify_visibility (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static void
|
||||
assistant_remove_page_cb (GtkNotebook *notebook,
|
||||
assistant_remove_page_cb (GtkContainer *container,
|
||||
GtkWidget *page,
|
||||
GtkAssistant *assistant)
|
||||
{
|
||||
@@ -1122,15 +1123,6 @@ assistant_remove_page_cb (GtkNotebook *notebook,
|
||||
GList *page_node;
|
||||
GList *element;
|
||||
|
||||
if (GTK_IS_BOX (page))
|
||||
{
|
||||
GList *children;
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (page));
|
||||
page = GTK_WIDGET (children->data);
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
element = find_page (assistant, page);
|
||||
if (!element)
|
||||
return;
|
||||
@@ -1367,7 +1359,7 @@ find_page (GtkAssistant *assistant,
|
||||
while (child)
|
||||
{
|
||||
GtkAssistantPage *page_info = child->data;
|
||||
if (page_info->page == page)
|
||||
if (page_info->page == page || page_info->box == page)
|
||||
return child;
|
||||
|
||||
child = child->next;
|
||||
@@ -1474,8 +1466,8 @@ gtk_assistant_remove (GtkContainer *container,
|
||||
assistant->priv->content != NULL &&
|
||||
gtk_widget_get_parent (box) == assistant->priv->content)
|
||||
{
|
||||
container = (GtkContainer *) assistant->priv->content;
|
||||
gtk_container_remove (container, box);
|
||||
gtk_container_remove (GTK_CONTAINER (box), page);
|
||||
gtk_container_remove (GTK_CONTAINER (assistant->priv->content), box);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1816,9 +1808,12 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
|
||||
gtk_widget_show (box);
|
||||
gtk_box_pack_start (GTK_BOX (box), page, TRUE, TRUE, 0);
|
||||
g_object_set (box, "margin", 12, NULL);
|
||||
g_signal_connect (box, "remove", G_CALLBACK (assistant_remove_page_cb), assistant);
|
||||
|
||||
gtk_notebook_insert_page (GTK_NOTEBOOK (priv->content), box, NULL, position);
|
||||
|
||||
page_info->box = box;
|
||||
|
||||
if (gtk_widget_get_mapped (GTK_WIDGET (assistant)))
|
||||
{
|
||||
update_buttons_state (assistant);
|
||||
@@ -2415,7 +2410,7 @@ gtk_assistant_set_page_has_padding (GtkAssistant *assistant,
|
||||
{
|
||||
page_info->has_padding = has_padding;
|
||||
|
||||
g_object_set (gtk_widget_get_parent (page),
|
||||
g_object_set (page_info->box,
|
||||
"margin", has_padding ? 12 : 0,
|
||||
NULL);
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* published by the Free Software Foundation; either version 2.1 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Federico Mena Quintero <federico@gnome.org>
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* published by the Free Software Foundation; either version 2.1 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Federico Mena Quintero <federico@gnome.org>
|
||||
|
||||
+14
-10
@@ -1058,7 +1058,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
{
|
||||
child_allocation.y = allocation->y;
|
||||
child_allocation.height = MAX (1, allocation->height);
|
||||
if (packing == GTK_PACK_START)
|
||||
if ((packing == GTK_PACK_START && direction == GTK_TEXT_DIR_LTR) ||
|
||||
(packing == GTK_PACK_END && direction == GTK_TEXT_DIR_RTL))
|
||||
x = allocation->x;
|
||||
else
|
||||
x = allocation->x + allocation->width;
|
||||
@@ -1105,7 +1106,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
child_allocation.x = x + (child_size - child_allocation.width) / 2;
|
||||
}
|
||||
|
||||
if (packing == GTK_PACK_START)
|
||||
if ((packing == GTK_PACK_START && direction == GTK_TEXT_DIR_LTR) ||
|
||||
(packing == GTK_PACK_END && direction == GTK_TEXT_DIR_RTL))
|
||||
{
|
||||
x += child_size + priv->spacing;
|
||||
}
|
||||
@@ -1114,10 +1116,6 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
x -= child_size + priv->spacing;
|
||||
child_allocation.x -= child_size;
|
||||
}
|
||||
|
||||
if (direction == GTK_TEXT_DIR_RTL)
|
||||
child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
|
||||
|
||||
}
|
||||
else /* (private->orientation == GTK_ORIENTATION_VERTICAL) */
|
||||
{
|
||||
@@ -1159,10 +1157,16 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
else
|
||||
center_pos = allocation->y + (box_size - center_size) / 2;
|
||||
|
||||
if (center_pos < side[GTK_PACK_START])
|
||||
center_pos = side[GTK_PACK_START];
|
||||
else if (center_pos + center_size > side[GTK_PACK_END])
|
||||
center_pos = side[GTK_PACK_END] - center_size;
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
|
||||
direction == GTK_TEXT_DIR_RTL)
|
||||
packing = GTK_PACK_END;
|
||||
else
|
||||
packing = GTK_PACK_START;
|
||||
|
||||
if (center_pos < side[packing])
|
||||
center_pos = side[packing];
|
||||
else if (center_pos + center_size > side[1 - packing])
|
||||
center_pos = side[1 - packing] - center_size;
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
|
||||
+18
-19
@@ -333,6 +333,7 @@ parse_object (GMarkupParseContext *context,
|
||||
|
||||
object_info = g_slice_new0 (ObjectInfo);
|
||||
object_info->type = object_type;
|
||||
object_info->oclass = g_type_class_ref (object_type);
|
||||
object_info->id = (internal_id) ? internal_id : g_strdup (object_id);
|
||||
object_info->constructor = g_strdup (constructor);
|
||||
state_push (data, object_info);
|
||||
@@ -439,6 +440,7 @@ parse_template (GMarkupParseContext *context,
|
||||
|
||||
object_info = g_slice_new0 (ObjectInfo);
|
||||
object_info->type = parsed_type;
|
||||
object_info->oclass = g_type_class_ref (parsed_type);
|
||||
object_info->id = g_strdup (object_class);
|
||||
object_info->object = gtk_builder_get_object (data->builder, object_class);
|
||||
state_push (data, object_info);
|
||||
@@ -465,6 +467,7 @@ static void
|
||||
free_object_info (ObjectInfo *info)
|
||||
{
|
||||
/* Do not free the signal items, which GtkBuilder takes ownership of */
|
||||
g_type_class_unref (info->oclass);
|
||||
g_slist_free (info->signals);
|
||||
g_slist_free_full (info->properties, (GDestroyNotify)free_property_info);
|
||||
g_free (info->constructor);
|
||||
@@ -546,8 +549,7 @@ parse_property (ParserData *data,
|
||||
gboolean translatable = FALSE;
|
||||
ObjectInfo *object_info;
|
||||
GParamSpec *pspec = NULL;
|
||||
GObjectClass *oclass;
|
||||
gchar *canonical;
|
||||
gint line, col;
|
||||
|
||||
object_info = state_peek_info (data, ObjectInfo);
|
||||
if (!object_info ||
|
||||
@@ -572,13 +574,7 @@ parse_property (ParserData *data,
|
||||
return;
|
||||
}
|
||||
|
||||
oclass = g_type_class_ref (object_info->type);
|
||||
canonical = g_strdelimit (g_strdup (name), "_", '-');
|
||||
|
||||
g_assert (oclass != NULL);
|
||||
pspec = g_object_class_find_property (oclass, canonical);
|
||||
g_type_class_unref (oclass);
|
||||
g_free (canonical);
|
||||
pspec = g_object_class_find_property (object_info->oclass, name);
|
||||
|
||||
if (!pspec)
|
||||
{
|
||||
@@ -620,16 +616,19 @@ parse_property (ParserData *data,
|
||||
return;
|
||||
}
|
||||
|
||||
info = g_slice_new0 (PropertyInfo);
|
||||
g_markup_parse_context_get_position (data->ctx, &line, &col);
|
||||
|
||||
info = g_slice_new (PropertyInfo);
|
||||
info->tag.name = element_name;
|
||||
info->pspec = pspec;
|
||||
info->text = g_string_new ("");
|
||||
info->translatable = translatable;
|
||||
info->bound = (bind_source && bind_property);
|
||||
info->context = g_strdup (context);
|
||||
info->text = g_string_new ("");
|
||||
state_push (data, info);
|
||||
info->line = line;
|
||||
info->col = col;
|
||||
|
||||
info->tag.name = element_name;
|
||||
g_markup_parse_context_get_position (data->ctx, &info->line, &info->col);
|
||||
state_push (data, info);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1147,11 +1146,11 @@ end_element (GMarkupParseContext *context,
|
||||
/* Called for character data */
|
||||
/* text is not nul-terminated */
|
||||
static void
|
||||
text (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
text (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
ParserData *data = (ParserData*)user_data;
|
||||
CommonInfo *info;
|
||||
|
||||
@@ -32,6 +32,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
TagInfo tag;
|
||||
GType type;
|
||||
GObjectClass *oclass;
|
||||
gchar *id;
|
||||
gchar *constructor;
|
||||
GSList *properties;
|
||||
|
||||
+2
-1
@@ -600,7 +600,8 @@ gtk_cell_layout_get_cells (GtkCellLayout *cell_layout)
|
||||
* if called on a #GtkCellArea or might be %NULL if no #GtkCellArea
|
||||
* is used by @cell_layout.
|
||||
*
|
||||
* Returns: (transfer none): the cell area used by @cell_layout.
|
||||
* Returns: (transfer none) (nullable): the cell area used by @cell_layout,
|
||||
* or %NULL in case no cell area is used.
|
||||
*
|
||||
* Since: 3.0
|
||||
*/
|
||||
|
||||
+57
-62
@@ -142,7 +142,7 @@ static GtkClipboard *clipboard_peek (GdkDisplay *display,
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
if (self)
|
||||
{
|
||||
clipboard = aClipboard;
|
||||
setting_same_owner = FALSE;
|
||||
@@ -164,7 +164,7 @@ GType
|
||||
gtk_clipboard_get_type (void)
|
||||
{
|
||||
static GType clipboard_type = 0;
|
||||
|
||||
|
||||
if (!clipboard_type)
|
||||
{
|
||||
const GTypeInfo clipboard_info =
|
||||
@@ -179,11 +179,11 @@ gtk_clipboard_get_type (void)
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) NULL,
|
||||
};
|
||||
|
||||
|
||||
clipboard_type = g_type_register_static (G_TYPE_OBJECT, I_("GtkClipboard"),
|
||||
&clipboard_info, 0);
|
||||
}
|
||||
|
||||
|
||||
return clipboard_type;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ gtk_clipboard_class_init (GtkClipboardClass *class)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
|
||||
gobject_class->finalize = gtk_clipboard_finalize;
|
||||
|
||||
class->owner_change = gtk_clipboard_owner_change;
|
||||
@@ -227,7 +227,7 @@ gtk_clipboard_finalize (GObject *object)
|
||||
g_warning ("GtkClipboard prematurely finalized");
|
||||
|
||||
clipboard_unset (clipboard);
|
||||
|
||||
|
||||
clipboards = g_object_get_data (G_OBJECT (clipboard->display), "gtk-clipboard-list");
|
||||
clipboards = g_slist_remove (clipboards, clipboard);
|
||||
g_object_set_data (G_OBJECT (clipboard->display), I_("gtk-clipboard-list"), clipboards);
|
||||
@@ -312,7 +312,7 @@ clipboard_owner_destroyed (gpointer data)
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
|
||||
g_slist_free (clipboards);
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ clipboard_add_owner_notify (GtkClipboard *clipboard)
|
||||
{
|
||||
if (!clipboards_owned_key_id)
|
||||
clipboards_owned_key_id = g_quark_from_static_string (clipboards_owned_key);
|
||||
|
||||
|
||||
if (clipboard->have_owner)
|
||||
g_object_set_qdata_full (clipboard->user_data, clipboards_owned_key_id,
|
||||
g_slist_prepend (g_object_steal_qdata (clipboard->user_data,
|
||||
@@ -502,12 +502,12 @@ clipboard_unset (GtkClipboard *clipboard)
|
||||
gpointer old_data;
|
||||
gboolean old_have_owner;
|
||||
gint old_n_storable_targets;
|
||||
|
||||
|
||||
old_clear_func = clipboard->clear_func;
|
||||
old_data = clipboard->user_data;
|
||||
old_have_owner = clipboard->have_owner;
|
||||
old_n_storable_targets = clipboard->n_storable_targets;
|
||||
|
||||
|
||||
if (old_have_owner)
|
||||
{
|
||||
clipboard_remove_owner_notify (clipboard);
|
||||
@@ -522,7 +522,7 @@ clipboard_unset (GtkClipboard *clipboard)
|
||||
clipboard->get_func = NULL;
|
||||
clipboard->clear_func = NULL;
|
||||
clipboard->user_data = NULL;
|
||||
|
||||
|
||||
if (old_clear_func)
|
||||
old_clear_func (clipboard, old_data);
|
||||
|
||||
@@ -548,7 +548,7 @@ gtk_clipboard_clear (GtkClipboard *clipboard)
|
||||
[clipboard->pasteboard declareTypes:nil owner:nil];
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
text_get_func (GtkClipboard *clipboard,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
@@ -557,14 +557,14 @@ text_get_func (GtkClipboard *clipboard,
|
||||
gtk_selection_data_set_text (selection_data, data, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
text_clear_func (GtkClipboard *clipboard,
|
||||
gpointer data)
|
||||
{
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
gtk_clipboard_set_text (GtkClipboard *clipboard,
|
||||
const gchar *text,
|
||||
gint len)
|
||||
@@ -573,11 +573,11 @@ gtk_clipboard_set_text (GtkClipboard *clipboard,
|
||||
|
||||
g_return_if_fail (clipboard != NULL);
|
||||
g_return_if_fail (text != NULL);
|
||||
|
||||
|
||||
if (len < 0)
|
||||
len = strlen (text);
|
||||
|
||||
gtk_clipboard_set_with_data (clipboard,
|
||||
|
||||
gtk_clipboard_set_with_data (clipboard,
|
||||
&target, 1,
|
||||
text_get_func, text_clear_func,
|
||||
g_strndup (text, len));
|
||||
@@ -585,7 +585,7 @@ gtk_clipboard_set_text (GtkClipboard *clipboard,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
static void
|
||||
pixbuf_get_func (GtkClipboard *clipboard,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
@@ -594,7 +594,7 @@ pixbuf_get_func (GtkClipboard *clipboard,
|
||||
gtk_selection_data_set_pixbuf (selection_data, data);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pixbuf_clear_func (GtkClipboard *clipboard,
|
||||
gpointer data)
|
||||
{
|
||||
@@ -624,7 +624,7 @@ gtk_clipboard_set_image (GtkClipboard *clipboard,
|
||||
targets[i].target = gdk_atom_name (pair->target);
|
||||
}
|
||||
|
||||
gtk_clipboard_set_with_data (clipboard,
|
||||
gtk_clipboard_set_with_data (clipboard,
|
||||
targets, n_targets,
|
||||
pixbuf_get_func, pixbuf_clear_func,
|
||||
g_object_ref (pixbuf));
|
||||
@@ -643,7 +643,7 @@ gtk_clipboard_set_image (GtkClipboard *clipboard,
|
||||
* @callback: (scope async):
|
||||
* @user_data:
|
||||
*/
|
||||
void
|
||||
void
|
||||
gtk_clipboard_request_contents (GtkClipboard *clipboard,
|
||||
GdkAtom target,
|
||||
GtkClipboardReceivedFunc callback,
|
||||
@@ -664,7 +664,7 @@ gtk_clipboard_request_contents (GtkClipboard *clipboard,
|
||||
* @callback: (scope async):
|
||||
* @user_data:
|
||||
*/
|
||||
void
|
||||
void
|
||||
gtk_clipboard_request_text (GtkClipboard *clipboard,
|
||||
GtkClipboardTextReceivedFunc callback,
|
||||
gpointer user_data)
|
||||
@@ -718,7 +718,7 @@ gtk_clipboard_wait_for_rich_text (GtkClipboard *clipboard,
|
||||
* @callback: (scope async):
|
||||
* @user_data:
|
||||
*/
|
||||
void
|
||||
void
|
||||
gtk_clipboard_request_image (GtkClipboard *clipboard,
|
||||
GtkClipboardImageReceivedFunc callback,
|
||||
gpointer user_data)
|
||||
@@ -737,7 +737,7 @@ gtk_clipboard_request_image (GtkClipboard *clipboard,
|
||||
* @callback: (scope async):
|
||||
* @user_data:
|
||||
*/
|
||||
void
|
||||
void
|
||||
gtk_clipboard_request_uris (GtkClipboard *clipboard,
|
||||
GtkClipboardURIReceivedFunc callback,
|
||||
gpointer user_data)
|
||||
@@ -755,7 +755,7 @@ gtk_clipboard_request_uris (GtkClipboard *clipboard,
|
||||
* @callback: (scope async):
|
||||
* @user_data:
|
||||
*/
|
||||
void
|
||||
void
|
||||
gtk_clipboard_request_targets (GtkClipboard *clipboard,
|
||||
GtkClipboardTargetsReceivedFunc callback,
|
||||
gpointer user_data)
|
||||
@@ -788,7 +788,7 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
|
||||
clipboard->change_count = [clipboard->pasteboard changeCount];
|
||||
}
|
||||
|
||||
if (target == gdk_atom_intern_static_string ("TARGETS"))
|
||||
if (target == gdk_atom_intern_static_string ("TARGETS"))
|
||||
{
|
||||
NSArray *types = [clipboard->pasteboard types];
|
||||
int i, length;
|
||||
@@ -841,7 +841,7 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
|
||||
GtkSelectionData *data;
|
||||
gchar *result;
|
||||
|
||||
data = gtk_clipboard_wait_for_contents (clipboard,
|
||||
data = gtk_clipboard_wait_for_contents (clipboard,
|
||||
gdk_atom_intern_static_string ("UTF8_STRING"));
|
||||
|
||||
result = (gchar *)gtk_selection_data_get_text (data);
|
||||
@@ -860,23 +860,18 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
|
||||
GdkPixbuf *
|
||||
gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
|
||||
{
|
||||
const gchar *priority[] = { "image/png", "image/tiff", "image/jpeg", "image/gif", "image/bmp" };
|
||||
GdkAtom target = gdk_atom_intern_static_string("image/tiff");
|
||||
int i;
|
||||
GtkSelectionData *data;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (priority); i++)
|
||||
{
|
||||
data = gtk_clipboard_wait_for_contents (clipboard, gdk_atom_intern_static_string (priority[i]));
|
||||
data = gtk_clipboard_wait_for_contents (clipboard, target);
|
||||
|
||||
if (data)
|
||||
{
|
||||
GdkPixbuf *pixbuf = gtk_selection_data_get_pixbuf (data);
|
||||
|
||||
gtk_selection_data_free (data);
|
||||
|
||||
return pixbuf;
|
||||
}
|
||||
}
|
||||
if (data && data->data)
|
||||
{
|
||||
GdkPixbuf *pixbuf = gtk_selection_data_get_pixbuf (data);
|
||||
gtk_selection_data_free (data);
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -901,7 +896,7 @@ gtk_clipboard_wait_for_uris (GtkClipboard *clipboard)
|
||||
gtk_selection_data_free (data);
|
||||
|
||||
return uris;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -962,7 +957,7 @@ gtk_clipboard_wait_is_image_available (GtkClipboard *clipboard)
|
||||
GtkSelectionData *data;
|
||||
gboolean result = FALSE;
|
||||
|
||||
data = gtk_clipboard_wait_for_contents (clipboard,
|
||||
data = gtk_clipboard_wait_for_contents (clipboard,
|
||||
gdk_atom_intern_static_string ("TARGETS"));
|
||||
if (data)
|
||||
{
|
||||
@@ -979,7 +974,7 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
|
||||
GtkSelectionData *data;
|
||||
gboolean result = FALSE;
|
||||
|
||||
data = gtk_clipboard_wait_for_contents (clipboard,
|
||||
data = gtk_clipboard_wait_for_contents (clipboard,
|
||||
gdk_atom_intern_static_string ("TARGETS"));
|
||||
if (data)
|
||||
{
|
||||
@@ -997,13 +992,13 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
|
||||
* @n_targets: (out):
|
||||
*/
|
||||
gboolean
|
||||
gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
|
||||
gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
|
||||
GdkAtom **targets,
|
||||
gint *n_targets)
|
||||
{
|
||||
GtkSelectionData *data;
|
||||
gboolean result = FALSE;
|
||||
|
||||
|
||||
g_return_val_if_fail (clipboard != NULL, FALSE);
|
||||
|
||||
/* If the display supports change notification we cache targets */
|
||||
@@ -1012,19 +1007,19 @@ gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
|
||||
{
|
||||
if (n_targets)
|
||||
*n_targets = clipboard->n_cached_targets;
|
||||
|
||||
|
||||
if (targets)
|
||||
*targets = g_memdup (clipboard->cached_targets,
|
||||
clipboard->n_cached_targets * sizeof (GdkAtom));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (n_targets)
|
||||
*n_targets = 0;
|
||||
|
||||
|
||||
if (targets)
|
||||
*targets = NULL;
|
||||
*targets = NULL;
|
||||
|
||||
data = gtk_clipboard_wait_for_contents (clipboard, gdk_atom_intern_static_string ("TARGETS"));
|
||||
|
||||
@@ -1032,24 +1027,24 @@ gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
|
||||
{
|
||||
GdkAtom *tmp_targets;
|
||||
gint tmp_n_targets;
|
||||
|
||||
|
||||
result = gtk_selection_data_get_targets (data, &tmp_targets, &tmp_n_targets);
|
||||
|
||||
|
||||
if (gdk_display_supports_selection_notification (gtk_clipboard_get_display (clipboard)))
|
||||
{
|
||||
clipboard->n_cached_targets = tmp_n_targets;
|
||||
clipboard->cached_targets = g_memdup (tmp_targets,
|
||||
tmp_n_targets * sizeof (GdkAtom));
|
||||
}
|
||||
|
||||
|
||||
if (n_targets)
|
||||
*n_targets = tmp_n_targets;
|
||||
|
||||
|
||||
if (targets)
|
||||
*targets = tmp_targets;
|
||||
else
|
||||
g_free (tmp_targets);
|
||||
|
||||
|
||||
gtk_selection_data_free (data);
|
||||
}
|
||||
|
||||
@@ -1057,7 +1052,7 @@ gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
|
||||
}
|
||||
|
||||
static GtkClipboard *
|
||||
clipboard_peek (GdkDisplay *display,
|
||||
clipboard_peek (GdkDisplay *display,
|
||||
GdkAtom selection,
|
||||
gboolean only_if_exists)
|
||||
{
|
||||
@@ -1086,13 +1081,13 @@ clipboard_peek (GdkDisplay *display,
|
||||
NSString *pasteboard_name;
|
||||
clipboard = g_object_new (GTK_TYPE_CLIPBOARD, NULL);
|
||||
|
||||
if (selection == GDK_SELECTION_CLIPBOARD)
|
||||
if (selection == GDK_SELECTION_CLIPBOARD)
|
||||
pasteboard_name = NSGeneralPboard;
|
||||
else
|
||||
else
|
||||
{
|
||||
char *atom_string = gdk_atom_name (selection);
|
||||
|
||||
pasteboard_name = [NSString stringWithFormat:@"_GTK_%@",
|
||||
pasteboard_name = [NSString stringWithFormat:@"_GTK_%@",
|
||||
[NSString stringWithUTF8String:atom_string]];
|
||||
g_free (atom_string);
|
||||
}
|
||||
@@ -1111,7 +1106,7 @@ clipboard_peek (GdkDisplay *display,
|
||||
G_CALLBACK (clipboard_display_closed), clipboard);
|
||||
gdk_display_request_selection_notification (display, selection);
|
||||
}
|
||||
|
||||
|
||||
return clipboard;
|
||||
}
|
||||
|
||||
@@ -1133,7 +1128,7 @@ gtk_clipboard_wait_is_target_available (GtkClipboard *clipboard,
|
||||
GdkAtom *targets;
|
||||
gint i, n_targets;
|
||||
gboolean retval = FALSE;
|
||||
|
||||
|
||||
if (!gtk_clipboard_wait_for_targets (clipboard, &targets, &n_targets))
|
||||
return FALSE;
|
||||
|
||||
@@ -1147,11 +1142,11 @@ gtk_clipboard_wait_is_target_available (GtkClipboard *clipboard,
|
||||
}
|
||||
|
||||
g_free (targets);
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
_gtk_clipboard_handle_event (GdkEventOwnerChange *event)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -111,10 +111,14 @@ select_swatch (GtkColorChooserWidget *cc,
|
||||
gtk_widget_queue_draw (GTK_WIDGET (cc->priv->current));
|
||||
|
||||
gtk_color_swatch_get_rgba (swatch, &color);
|
||||
|
||||
g_settings_set (cc->priv->settings, "selected-color", "(bdddd)",
|
||||
TRUE, color.red, color.green, color.blue, color.alpha);
|
||||
|
||||
g_object_notify (G_OBJECT (cc), "rgba");
|
||||
if (gtk_widget_get_visible (GTK_WIDGET (cc->priv->editor)))
|
||||
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (cc->priv->editor), &color);
|
||||
else
|
||||
g_object_notify (G_OBJECT (cc), "rgba");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+18
-12
@@ -118,6 +118,7 @@ swatch_draw (GtkWidget *widget,
|
||||
GtkBorder border, padding;
|
||||
GdkRectangle rect;
|
||||
GtkIconInfo *icon_info = NULL;
|
||||
gint scale;
|
||||
|
||||
theme = gtk_icon_theme_get_default ();
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
@@ -168,11 +169,13 @@ swatch_draw (GtkWidget *widget,
|
||||
|
||||
gtk_render_frame (context, cr, 0, 0, width, height);
|
||||
|
||||
scale = gtk_widget_get_scale_factor (widget);
|
||||
if (swatch->priv->icon)
|
||||
{
|
||||
icon_info = gtk_icon_theme_lookup_icon (theme, swatch->priv->icon, PIXBUF_SIZE,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK
|
||||
| GTK_ICON_LOOKUP_USE_BUILTIN);
|
||||
icon_info = gtk_icon_theme_lookup_icon_for_scale (theme, swatch->priv->icon, PIXBUF_SIZE,
|
||||
scale,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK
|
||||
| GTK_ICON_LOOKUP_USE_BUILTIN);
|
||||
}
|
||||
else if ((state & GTK_STATE_FLAG_SELECTED) != 0)
|
||||
{
|
||||
@@ -182,9 +185,10 @@ swatch_draw (GtkWidget *widget,
|
||||
/* fallback for themes that don't have object-select-symbolic */
|
||||
g_themed_icon_append_name (G_THEMED_ICON (gicon), "gtk-apply");
|
||||
|
||||
icon_info = gtk_icon_theme_lookup_by_gicon (theme, gicon, PIXBUF_SIZE,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK
|
||||
| GTK_ICON_LOOKUP_USE_BUILTIN);
|
||||
icon_info = gtk_icon_theme_lookup_by_gicon_for_scale (theme, gicon, PIXBUF_SIZE,
|
||||
scale,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK
|
||||
| GTK_ICON_LOOKUP_USE_BUILTIN);
|
||||
g_object_unref (gicon);
|
||||
}
|
||||
|
||||
@@ -206,14 +210,16 @@ swatch_draw (GtkWidget *widget,
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, context,
|
||||
NULL, NULL);
|
||||
|
||||
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, context, NULL, NULL);
|
||||
if (pixbuf != NULL)
|
||||
{
|
||||
gtk_render_icon (context, cr, pixbuf,
|
||||
rect.x + (rect.width - gdk_pixbuf_get_width (pixbuf)) / 2,
|
||||
rect.y + (rect.height - gdk_pixbuf_get_height (pixbuf)) / 2);
|
||||
cairo_surface_t *surface;
|
||||
|
||||
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale, gtk_widget_get_window (widget));
|
||||
gtk_render_icon_surface (context, cr, surface,
|
||||
rect.x + (rect.width - (gdk_pixbuf_get_width (pixbuf) / scale)) / 2,
|
||||
rect.y + (rect.height - (gdk_pixbuf_get_height (pixbuf) / scale)) / 2);
|
||||
cairo_surface_destroy (surface);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
|
||||
+2
-10
@@ -2082,7 +2082,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
|
||||
{
|
||||
GtkComboBoxPrivate *priv = combo_box->priv;
|
||||
GList *children, *child;
|
||||
GtkWidget *item, *submenu, *separator;
|
||||
GtkWidget *item, *submenu;
|
||||
GtkWidget *cell_view;
|
||||
gboolean sensitive;
|
||||
|
||||
@@ -2108,15 +2108,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
|
||||
else
|
||||
{
|
||||
sensitive = cell_layout_is_sensitive (GTK_CELL_LAYOUT (cell_view));
|
||||
|
||||
if (menu != priv->popup_widget && child == children)
|
||||
{
|
||||
separator = GTK_WIDGET (child->next->data);
|
||||
g_object_set (item, "visible", sensitive, NULL);
|
||||
g_object_set (separator, "visible", sensitive, NULL);
|
||||
}
|
||||
else
|
||||
gtk_widget_set_sensitive (item, sensitive);
|
||||
gtk_widget_set_sensitive (item, sensitive);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -481,9 +481,9 @@ _gtk_css_font_weight_value_try_parse (GtkCssParser *parser)
|
||||
}
|
||||
/* special cases go here */
|
||||
if (_gtk_css_parser_try (parser, "400", TRUE))
|
||||
return _gtk_css_value_ref (&font_weight_values[3]);
|
||||
return _gtk_css_value_ref (&font_weight_values[5]);
|
||||
if (_gtk_css_parser_try (parser, "700", TRUE))
|
||||
return _gtk_css_value_ref (&font_weight_values[6]);
|
||||
return _gtk_css_value_ref (&font_weight_values[8]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
|
||||
/* When these change we do a full restyling. Otherwise we try to figure out
|
||||
* if we need to change things. */
|
||||
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
|
||||
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_ID | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
|
||||
|
||||
G_DEFINE_TYPE (GtkCssNode, gtk_css_node, G_TYPE_OBJECT)
|
||||
|
||||
|
||||
+25
-7
@@ -1740,7 +1740,11 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
|
||||
val->section,
|
||||
val->section != NULL ? gtk_css_section_get_file (val->section) : NULL,
|
||||
val->value);
|
||||
if (!val->section)
|
||||
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_VALUE);
|
||||
found = _gtk_css_style_funcs_parse_value (value, scanner->parser);
|
||||
if (!val->section)
|
||||
gtk_css_scanner_pop_section (scanner, GTK_CSS_SECTION_VALUE);
|
||||
gtk_css_scanner_destroy (scanner);
|
||||
break;
|
||||
}
|
||||
@@ -1939,6 +1943,9 @@ gtk_css_provider_error (GtkCssProvider *provider,
|
||||
GError *error;
|
||||
va_list args;
|
||||
|
||||
gtk_internal_return_if_fail (GTK_IS_CSS_PROVIDER (provider));
|
||||
gtk_internal_return_if_fail (scanner != NULL);
|
||||
|
||||
va_start (args, format);
|
||||
error = g_error_new_valist (domain, code, format, args);
|
||||
va_end (args);
|
||||
@@ -2721,21 +2728,32 @@ gtk_css_provider_load_internal (GtkCssProvider *css_provider,
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkCssSection *section;
|
||||
|
||||
if (parent)
|
||||
section = gtk_css_section_ref (parent->section);
|
||||
if (parent == NULL)
|
||||
{
|
||||
scanner = gtk_css_scanner_new (css_provider,
|
||||
parent,
|
||||
parent ? parent->section : NULL,
|
||||
file,
|
||||
"");
|
||||
|
||||
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_DOCUMENT);
|
||||
}
|
||||
else
|
||||
section = _gtk_css_section_new_for_file (GTK_CSS_SECTION_DOCUMENT, file);
|
||||
scanner = parent;
|
||||
|
||||
gtk_css_provider_error (css_provider,
|
||||
parent,
|
||||
scanner,
|
||||
GTK_CSS_PROVIDER_ERROR,
|
||||
GTK_CSS_PROVIDER_ERROR_IMPORT,
|
||||
"Failed to import: %s",
|
||||
load_error->message);
|
||||
|
||||
gtk_css_section_unref (section);
|
||||
if (parent == NULL)
|
||||
{
|
||||
gtk_css_scanner_pop_section (scanner, GTK_CSS_SECTION_DOCUMENT);
|
||||
|
||||
gtk_css_scanner_destroy (scanner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,9 +46,12 @@ gtk_css_static_style_get_value (GtkCssStyle *style,
|
||||
{
|
||||
GtkCssStaticStyle *sstyle = GTK_CSS_STATIC_STYLE (style);
|
||||
|
||||
if (sstyle->values == NULL ||
|
||||
id >= sstyle->values->len)
|
||||
return NULL;
|
||||
if (G_UNLIKELY (id >= GTK_CSS_PROPERTY_N_PROPERTIES))
|
||||
{
|
||||
GtkCssStyleProperty *prop = _gtk_css_style_property_lookup_by_id (id);
|
||||
|
||||
return _gtk_css_style_property_get_initial_value (prop);
|
||||
}
|
||||
|
||||
return g_ptr_array_index (sstyle->values, id);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/* When these change we do a full restyling. Otherwise we try to figure out
|
||||
* if we need to change things. */
|
||||
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
|
||||
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_ID | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
|
||||
|
||||
G_DEFINE_TYPE (GtkCssWidgetNode, gtk_css_widget_node, GTK_TYPE_CSS_NODE)
|
||||
|
||||
|
||||
+12
-10
@@ -4778,9 +4778,11 @@ gtk_entry_obscure_mouse_cursor (GtkEntry *entry)
|
||||
if (priv->mouse_cursor_obscured)
|
||||
return;
|
||||
|
||||
set_invisible_cursor (priv->text_area);
|
||||
|
||||
priv->mouse_cursor_obscured = TRUE;
|
||||
if (priv->text_area)
|
||||
{
|
||||
set_invisible_cursor (priv->text_area);
|
||||
priv->mouse_cursor_obscured = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -8808,7 +8810,7 @@ gtk_entry_get_icon_activatable (GtkEntry *entry,
|
||||
* method will work regardless of whether the icon was set using a
|
||||
* #GdkPixbuf, a #GIcon, a stock item, or an icon name.
|
||||
*
|
||||
* Returns: (transfer none): A #GdkPixbuf, or %NULL if no icon is
|
||||
* Returns: (transfer none) (nullable): A #GdkPixbuf, or %NULL if no icon is
|
||||
* set for this position.
|
||||
*
|
||||
* Since: 2.16
|
||||
@@ -8850,7 +8852,7 @@ gtk_entry_get_icon_pixbuf (GtkEntry *entry,
|
||||
* no icon or if the icon was set by some other method (e.g., by
|
||||
* stock, pixbuf, or icon name).
|
||||
*
|
||||
* Returns: (transfer none): A #GIcon, or %NULL if no icon is set
|
||||
* Returns: (transfer none) (nullable): A #GIcon, or %NULL if no icon is set
|
||||
* or if the icon is not a #GIcon
|
||||
*
|
||||
* Since: 2.16
|
||||
@@ -8918,7 +8920,7 @@ gtk_entry_get_icon_stock (GtkEntry *entry,
|
||||
* no icon or if the icon was set by some other method (e.g., by
|
||||
* pixbuf, stock or gicon).
|
||||
*
|
||||
* Returns: An icon name, or %NULL if no icon is set or if the icon
|
||||
* Returns: (nullable): An icon name, or %NULL if no icon is set or if the icon
|
||||
* wasn’t set from an icon name
|
||||
*
|
||||
* Since: 2.16
|
||||
@@ -10529,7 +10531,7 @@ gtk_entry_get_completion (GtkEntry *entry)
|
||||
/**
|
||||
* gtk_entry_set_cursor_hadjustment:
|
||||
* @entry: a #GtkEntry
|
||||
* @adjustment: an adjustment which should be adjusted when the cursor
|
||||
* @adjustment: (nullable): an adjustment which should be adjusted when the cursor
|
||||
* is moved, or %NULL
|
||||
*
|
||||
* Hooks up an adjustment to the cursor position in an entry, so that when
|
||||
@@ -10566,7 +10568,7 @@ gtk_entry_set_cursor_hadjustment (GtkEntry *entry,
|
||||
* Retrieves the horizontal cursor adjustment for the entry.
|
||||
* See gtk_entry_set_cursor_hadjustment().
|
||||
*
|
||||
* Returns: (transfer none): the horizontal cursor adjustment, or %NULL
|
||||
* Returns: (transfer none) (nullable): the horizontal cursor adjustment, or %NULL
|
||||
* if none has been set.
|
||||
*
|
||||
* Since: 2.12
|
||||
@@ -10828,7 +10830,7 @@ gtk_entry_progress_pulse (GtkEntry *entry)
|
||||
/**
|
||||
* gtk_entry_set_placeholder_text:
|
||||
* @entry: a #GtkEntry
|
||||
* @text: a string to be displayed when @entry is empty an unfocused, or %NULL
|
||||
* @text: (nullable): a string to be displayed when @entry is empty an unfocused, or %NULL
|
||||
*
|
||||
* Sets text to be displayed in @entry when it is empty and unfocused.
|
||||
* This can be used to give a visual hint of the expected contents of
|
||||
@@ -11092,7 +11094,7 @@ gtk_entry_set_attributes (GtkEntry *entry,
|
||||
* Gets the attribute list that was set on the entry using
|
||||
* gtk_entry_set_attributes(), if any.
|
||||
*
|
||||
* Returns: (transfer none): the attribute list, or %NULL
|
||||
* Returns: (transfer none) (nullable): the attribute list, or %NULL
|
||||
* if none was set.
|
||||
*
|
||||
* Since: 3.6
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define PAGE_STEP 14
|
||||
#define COMPLETION_TIMEOUT 300
|
||||
#define COMPLETION_TIMEOUT 100
|
||||
|
||||
/* signals */
|
||||
enum
|
||||
@@ -1654,15 +1654,18 @@ gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
|
||||
gtk_widget_show (completion->priv->popup_window);
|
||||
|
||||
gtk_device_grab_add (completion->priv->popup_window, completion->priv->device, TRUE);
|
||||
gdk_device_grab (completion->priv->device, gtk_widget_get_window (completion->priv->popup_window),
|
||||
GDK_OWNERSHIP_WINDOW, TRUE,
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK,
|
||||
NULL, GDK_CURRENT_TIME);
|
||||
if (completion->priv->device)
|
||||
{
|
||||
gtk_device_grab_add (completion->priv->popup_window, completion->priv->device, TRUE);
|
||||
gdk_device_grab (completion->priv->device, gtk_widget_get_window (completion->priv->popup_window),
|
||||
GDK_OWNERSHIP_WINDOW, TRUE,
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK,
|
||||
NULL, GDK_CURRENT_TIME);
|
||||
|
||||
completion->priv->has_grab = TRUE;
|
||||
completion->priv->has_grab = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -225,6 +225,8 @@ static void gtk_file_chooser_dialog_notify (GObject *obj
|
||||
|
||||
static void gtk_file_chooser_dialog_map (GtkWidget *widget);
|
||||
static void gtk_file_chooser_dialog_unmap (GtkWidget *widget);
|
||||
static void gtk_file_chooser_dialog_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void file_chooser_widget_file_activated (GtkFileChooser *chooser,
|
||||
GtkFileChooserDialog *dialog);
|
||||
static void file_chooser_widget_default_size_changed (GtkWidget *widget,
|
||||
@@ -256,6 +258,7 @@ gtk_file_chooser_dialog_class_init (GtkFileChooserDialogClass *class)
|
||||
|
||||
widget_class->map = gtk_file_chooser_dialog_map;
|
||||
widget_class->unmap = gtk_file_chooser_dialog_unmap;
|
||||
widget_class->size_allocate = gtk_file_chooser_dialog_size_allocate;
|
||||
|
||||
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_FILE_CHOOSER);
|
||||
|
||||
@@ -618,6 +621,7 @@ save_dialog_geometry (GtkFileChooserDialog *dialog)
|
||||
{
|
||||
GtkWindow *window;
|
||||
GSettings *settings;
|
||||
int old_x, old_y, old_width, old_height;
|
||||
int x, y, width, height;
|
||||
|
||||
settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (dialog));
|
||||
@@ -627,8 +631,15 @@ save_dialog_geometry (GtkFileChooserDialog *dialog)
|
||||
gtk_window_get_position (window, &x, &y);
|
||||
gtk_window_get_size (window, &width, &height);
|
||||
|
||||
g_settings_set (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", x, y);
|
||||
g_settings_set (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", width, height);
|
||||
g_settings_get (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", &old_x, &old_y);
|
||||
if (old_x != x || old_y != y)
|
||||
g_settings_set (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", x, y);
|
||||
|
||||
g_settings_get (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", &old_width, &old_height);
|
||||
if (old_width != width || old_height != height)
|
||||
g_settings_set (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", width, height);
|
||||
|
||||
g_settings_apply (settings);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -641,6 +652,16 @@ gtk_file_chooser_dialog_unmap (GtkWidget *widget)
|
||||
GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->unmap (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_chooser_dialog_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->size_allocate (widget, allocation);
|
||||
|
||||
if (gtk_widget_is_drawable (widget))
|
||||
save_dialog_geometry (GTK_FILE_CHOOSER_DIALOG (widget));
|
||||
}
|
||||
|
||||
/* We do a signal connection here rather than overriding the method in
|
||||
* class_init because GtkDialog::response is a RUN_LAST signal. We want *our*
|
||||
* handler to be run *first*, regardless of whether the user installs response
|
||||
|
||||
+32
-18
@@ -108,7 +108,8 @@ static void set_complete_on_load (GtkFileChooserEntry *chooser_entry,
|
||||
gboolean complete_on_load);
|
||||
static void refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry);
|
||||
static void set_completion_folder (GtkFileChooserEntry *chooser_entry,
|
||||
GFile *folder);
|
||||
GFile *folder,
|
||||
char *dir_part);
|
||||
static void finished_loading_cb (GtkFileSystemModel *model,
|
||||
GError *error,
|
||||
GtkFileChooserEntry *chooser_entry);
|
||||
@@ -248,7 +249,7 @@ gtk_file_chooser_entry_dispose (GObject *object)
|
||||
{
|
||||
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object);
|
||||
|
||||
set_completion_folder (chooser_entry, NULL);
|
||||
set_completion_folder (chooser_entry, NULL, NULL);
|
||||
|
||||
G_OBJECT_CLASS (_gtk_file_chooser_entry_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -276,6 +277,8 @@ match_selected_callback (GtkEntryCompletion *completion,
|
||||
-1,
|
||||
&pos);
|
||||
|
||||
gtk_editable_set_position (GTK_EDITABLE (chooser_entry), pos);
|
||||
|
||||
g_free (path);
|
||||
|
||||
return TRUE;
|
||||
@@ -374,7 +377,7 @@ explicitly_complete (GtkFileChooserEntry *chooser_entry)
|
||||
{
|
||||
char *completion, *text;
|
||||
gsize completion_len, text_len;
|
||||
|
||||
|
||||
text = gtk_file_chooser_entry_get_completion_text (chooser_entry);
|
||||
text_len = strlen (text);
|
||||
completion = gtk_entry_completion_compute_prefix (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)), text);
|
||||
@@ -523,11 +526,11 @@ completion_store_set (GtkFileSystemModel *model,
|
||||
if (_gtk_file_info_consider_as_directory (info))
|
||||
suffix = G_DIR_SEPARATOR_S;
|
||||
|
||||
g_value_take_string (value, g_strconcat (
|
||||
prefix,
|
||||
g_file_info_get_display_name (info),
|
||||
suffix,
|
||||
NULL));
|
||||
g_value_take_string (value,
|
||||
g_strconcat (prefix,
|
||||
g_file_info_get_display_name (info),
|
||||
suffix,
|
||||
NULL));
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
@@ -598,24 +601,31 @@ finished_loading_cb (GtkFileSystemModel *model,
|
||||
|
||||
static void
|
||||
set_completion_folder (GtkFileChooserEntry *chooser_entry,
|
||||
GFile *folder_file)
|
||||
GFile *folder_file,
|
||||
char *dir_part)
|
||||
{
|
||||
if (folder_file &&
|
||||
chooser_entry->local_only
|
||||
&& !_gtk_file_has_native_path (folder_file))
|
||||
folder_file = NULL;
|
||||
|
||||
if ((chooser_entry->current_folder_file
|
||||
&& folder_file
|
||||
&& g_file_equal (folder_file, chooser_entry->current_folder_file))
|
||||
|| chooser_entry->current_folder_file == folder_file)
|
||||
return;
|
||||
if (((chooser_entry->current_folder_file
|
||||
&& folder_file
|
||||
&& g_file_equal (folder_file, chooser_entry->current_folder_file))
|
||||
|| chooser_entry->current_folder_file == folder_file)
|
||||
&& g_strcmp0 (dir_part, chooser_entry->dir_part) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (chooser_entry->current_folder_file)
|
||||
{
|
||||
g_object_unref (chooser_entry->current_folder_file);
|
||||
chooser_entry->current_folder_file = NULL;
|
||||
}
|
||||
|
||||
g_free (chooser_entry->dir_part);
|
||||
chooser_entry->dir_part = g_strdup (dir_part);
|
||||
|
||||
chooser_entry->current_folder_loaded = FALSE;
|
||||
|
||||
@@ -633,29 +643,33 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry)
|
||||
{
|
||||
GFile *folder_file;
|
||||
char *text, *last_slash, *old_file_part;
|
||||
char *dir_part;
|
||||
|
||||
old_file_part = chooser_entry->file_part;
|
||||
g_free (chooser_entry->dir_part);
|
||||
|
||||
text = gtk_file_chooser_entry_get_completion_text (chooser_entry);
|
||||
|
||||
last_slash = strrchr (text, G_DIR_SEPARATOR);
|
||||
if (last_slash)
|
||||
{
|
||||
chooser_entry->dir_part = g_strndup (text, last_slash - text + 1);
|
||||
dir_part = g_strndup (text, last_slash - text + 1);
|
||||
chooser_entry->file_part = g_strdup (last_slash + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
chooser_entry->dir_part = g_strdup ("");
|
||||
dir_part = g_strdup ("");
|
||||
chooser_entry->file_part = g_strdup (text);
|
||||
}
|
||||
|
||||
folder_file = gtk_file_chooser_get_directory_for_text (chooser_entry, text);
|
||||
set_completion_folder (chooser_entry, folder_file);
|
||||
|
||||
set_completion_folder (chooser_entry, folder_file, dir_part);
|
||||
|
||||
if (folder_file)
|
||||
g_object_unref (folder_file);
|
||||
|
||||
g_free (dir_part);
|
||||
|
||||
if (chooser_entry->completion_store &&
|
||||
(g_strcmp0 (old_file_part, chooser_entry->file_part) != 0))
|
||||
{
|
||||
|
||||
+28
-10
@@ -1278,13 +1278,16 @@ key_is_left_or_right (GdkEventKey *event)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_trigger_location_entry (GtkWidget *widget,
|
||||
GdkEventKey *event)
|
||||
should_trigger_location_entry (GtkFileChooserWidget *impl,
|
||||
GdkEventKey *event)
|
||||
{
|
||||
GdkModifierType no_text_input_mask;
|
||||
|
||||
if (impl->priv->operation_mode == OPERATION_MODE_SEARCH)
|
||||
return FALSE;
|
||||
|
||||
no_text_input_mask =
|
||||
gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_NO_TEXT_INPUT);
|
||||
gtk_widget_get_modifier_mask (GTK_WIDGET (impl), GDK_MODIFIER_INTENT_NO_TEXT_INPUT);
|
||||
|
||||
if ((event->keyval == GDK_KEY_slash
|
||||
|| event->keyval == GDK_KEY_KP_Divide
|
||||
@@ -1310,7 +1313,7 @@ browse_files_key_press_event_cb (GtkWidget *widget,
|
||||
GtkFileChooserWidget *impl = (GtkFileChooserWidget *) data;
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
|
||||
if (should_trigger_location_entry (widget, event) &&
|
||||
if (should_trigger_location_entry (impl, event) &&
|
||||
(priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER))
|
||||
{
|
||||
@@ -1370,7 +1373,7 @@ gtk_file_chooser_widget_key_press_event (GtkWidget *widget,
|
||||
GtkFileChooserWidget *impl = (GtkFileChooserWidget *) widget;
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
|
||||
if (should_trigger_location_entry (widget, event))
|
||||
if (should_trigger_location_entry (impl, event))
|
||||
{
|
||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||
@@ -2400,6 +2403,7 @@ list_button_press_event_cb (GtkWidget *widget,
|
||||
get_selection_modifiers (widget, event, &modify, &extend);
|
||||
if (!is_touchscreen &&
|
||||
!modify && !extend &&
|
||||
event->type == GDK_BUTTON_PRESS &&
|
||||
event->button == GDK_BUTTON_PRIMARY &&
|
||||
gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->browse_files_tree_view),
|
||||
event->x, event->y,
|
||||
@@ -2554,6 +2558,9 @@ static void
|
||||
location_entry_changed_cb (GtkEditable *editable,
|
||||
GtkFileChooserWidget *impl)
|
||||
{
|
||||
if (impl->priv->operation_mode == OPERATION_MODE_SEARCH)
|
||||
operation_mode_set (impl, OPERATION_MODE_BROWSE);
|
||||
|
||||
if (impl->priv->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||
reset_location_timeout (impl);
|
||||
}
|
||||
@@ -2600,7 +2607,12 @@ location_entry_create (GtkFileChooserWidget *impl)
|
||||
|
||||
if (!priv->location_entry)
|
||||
{
|
||||
priv->location_entry = _gtk_file_chooser_entry_new (TRUE, TRUE);
|
||||
gboolean eat_escape;
|
||||
|
||||
eat_escape = priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
|
||||
|
||||
priv->location_entry = _gtk_file_chooser_entry_new (TRUE, eat_escape);
|
||||
location_entry_setup (impl);
|
||||
}
|
||||
}
|
||||
@@ -6247,10 +6259,11 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl,
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeIter iter;
|
||||
GFileInfo *info;
|
||||
GtkTreeModel *model;
|
||||
|
||||
g_assert (!priv->select_multiple);
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
|
||||
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
{
|
||||
*had_selection = FALSE;
|
||||
return NULL;
|
||||
@@ -6258,7 +6271,7 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl,
|
||||
|
||||
*had_selection = TRUE;
|
||||
|
||||
info = _gtk_file_system_model_get_info (priv->browse_files_model, &iter);
|
||||
info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (model), &iter);
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -6470,7 +6483,11 @@ name_entry_get_parent_info_cb (GCancellable *cancellable,
|
||||
if (info)
|
||||
{
|
||||
parent_is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
parent_is_accessible = g_file_info_has_attribute (info, "access::can-execute") &&
|
||||
|
||||
/* Some gvfs backends do not set executable attribute, let's assume that
|
||||
* the folder is accessible even if the attribute is not set.
|
||||
*/
|
||||
parent_is_accessible = !g_file_info_has_attribute (info, "access::can-execute") ||
|
||||
g_file_info_get_attribute_boolean (info, "access::can-execute");
|
||||
}
|
||||
|
||||
@@ -7317,7 +7334,8 @@ search_start_query (GtkFileChooserWidget *impl,
|
||||
|
||||
_gtk_search_engine_start (priv->search_engine);
|
||||
|
||||
if (_gtk_file_consider_as_remote (gtk_query_get_location (priv->search_query)))
|
||||
if (gtk_query_get_location (priv->search_query) &&
|
||||
_gtk_file_consider_as_remote (gtk_query_get_location (priv->search_query)))
|
||||
gtk_widget_show (priv->remote_warning_bar);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of the
|
||||
* published by the Free Software Foundation; either version 2.1 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful, but
|
||||
@@ -12,7 +12,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Matthias Clasen
|
||||
|
||||
+4
-1
@@ -947,7 +947,10 @@ _gtk_file_consider_as_remote (GFile *file)
|
||||
const gchar *type;
|
||||
|
||||
type = g_file_info_get_attribute_string (info, "filesystem::type");
|
||||
is_remote = g_strv_contains (remote_types, type);
|
||||
if (type != NULL)
|
||||
is_remote = g_strv_contains (remote_types, type);
|
||||
else
|
||||
is_remote = FALSE;
|
||||
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
+56
-38
@@ -292,6 +292,23 @@ gtk_flow_box_child_focus (GtkWidget *widget,
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||
|
||||
/* Without "can-focus" flag try to pass the focus to the child immediately */
|
||||
if (!gtk_widget_get_can_focus (widget))
|
||||
{
|
||||
if (child)
|
||||
{
|
||||
if (gtk_widget_child_focus (child, direction))
|
||||
{
|
||||
GtkFlowBox *box;
|
||||
box = gtk_flow_box_child_get_box (GTK_FLOW_BOX_CHILD (widget));
|
||||
if (box)
|
||||
gtk_flow_box_update_cursor (box, GTK_FLOW_BOX_CHILD (widget));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_object_get (widget, "has-focus", &had_focus, NULL);
|
||||
if (had_focus)
|
||||
{
|
||||
@@ -765,7 +782,6 @@ struct _GtkFlowBoxPrivate {
|
||||
guint row_spacing;
|
||||
guint column_spacing;
|
||||
|
||||
GtkFlowBoxChild *prelight_child;
|
||||
GtkFlowBoxChild *cursor_child;
|
||||
GtkFlowBoxChild *selected_child;
|
||||
|
||||
@@ -883,19 +899,6 @@ gtk_flow_box_find_child_at_pos (GtkFlowBox *box,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_flow_box_update_prelight (GtkFlowBox *box,
|
||||
GtkFlowBoxChild *child)
|
||||
{
|
||||
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
|
||||
|
||||
if (child != priv->prelight_child)
|
||||
{
|
||||
priv->prelight_child = child;
|
||||
gtk_widget_queue_draw (GTK_WIDGET (box));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_flow_box_update_active (GtkFlowBox *box,
|
||||
GtkFlowBoxChild *child)
|
||||
@@ -2706,7 +2709,6 @@ autoscroll_cb (GtkWidget *widget,
|
||||
|
||||
child = gtk_flow_box_find_child_at_pos (box, x, y);
|
||||
|
||||
gtk_flow_box_update_prelight (box, child);
|
||||
gtk_flow_box_update_active (box, child);
|
||||
|
||||
if (child != NULL)
|
||||
@@ -2809,7 +2811,6 @@ gtk_flow_box_enter_notify_event (GtkWidget *widget,
|
||||
return FALSE;
|
||||
|
||||
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
|
||||
gtk_flow_box_update_prelight (box, child);
|
||||
gtk_flow_box_update_active (box, child);
|
||||
|
||||
return FALSE;
|
||||
@@ -2830,7 +2831,6 @@ gtk_flow_box_leave_notify_event (GtkWidget *widget,
|
||||
else
|
||||
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
|
||||
|
||||
gtk_flow_box_update_prelight (box, child);
|
||||
gtk_flow_box_update_active (box, child);
|
||||
|
||||
return FALSE;
|
||||
@@ -2903,7 +2903,6 @@ gtk_flow_box_motion_notify_event (GtkWidget *widget,
|
||||
}
|
||||
|
||||
child = gtk_flow_box_find_child_at_pos (box, relative_x, relative_y);
|
||||
gtk_flow_box_update_prelight (box, child);
|
||||
gtk_flow_box_update_active (box, child);
|
||||
|
||||
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->motion_notify_event (widget, event);
|
||||
@@ -3141,8 +3140,6 @@ gtk_flow_box_remove (GtkContainer *container,
|
||||
was_visible = child_is_visible (GTK_WIDGET (child));
|
||||
was_selected = CHILD_PRIV (child)->selected;
|
||||
|
||||
if (child == priv->prelight_child)
|
||||
priv->prelight_child = NULL;
|
||||
if (child == priv->active_child)
|
||||
priv->active_child = NULL;
|
||||
if (child == priv->selected_child)
|
||||
@@ -3193,6 +3190,12 @@ gtk_flow_box_focus (GtkWidget *widget,
|
||||
GSequenceIter *iter;
|
||||
GtkFlowBoxChild *next_focus_child;
|
||||
|
||||
/* Without "can-focus" flag fall back to the default behavior immediately */
|
||||
if (!gtk_widget_get_can_focus (widget))
|
||||
{
|
||||
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->focus (widget, direction);
|
||||
}
|
||||
|
||||
focus_child = gtk_container_get_focus_child (GTK_CONTAINER (box));
|
||||
next_focus_child = NULL;
|
||||
|
||||
@@ -3313,7 +3316,7 @@ gtk_flow_box_toggle_cursor_child (GtkFlowBox *box)
|
||||
gtk_flow_box_select_and_activate (box, priv->cursor_child);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
GtkMovementStep step,
|
||||
gint count)
|
||||
@@ -3331,6 +3334,10 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
GtkAdjustment *adjustment;
|
||||
gboolean vertical;
|
||||
|
||||
/* Without "can-focus" flag fall back to the default behavior immediately */
|
||||
if (!gtk_widget_get_can_focus (GTK_WIDGET (box)))
|
||||
return FALSE;
|
||||
|
||||
vertical = priv->orientation == GTK_ORIENTATION_VERTICAL;
|
||||
|
||||
if (vertical)
|
||||
@@ -3479,17 +3486,25 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
|
||||
if (!gtk_widget_keynav_failed (GTK_WIDGET (box), direction))
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box));
|
||||
|
||||
if (toplevel)
|
||||
gtk_widget_child_focus (toplevel,
|
||||
direction == GTK_DIR_UP ?
|
||||
GTK_DIR_TAB_BACKWARD :
|
||||
GTK_DIR_TAB_FORWARD);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* If the child has its "can-focus" property set to FALSE then it will
|
||||
* not grab the focus. We must pass the focus to its child directly.
|
||||
*/
|
||||
if (!gtk_widget_get_can_focus (GTK_WIDGET (child)))
|
||||
{
|
||||
GtkWidget *subchild;
|
||||
|
||||
subchild = gtk_bin_get_child (GTK_BIN (child));
|
||||
if (subchild)
|
||||
{
|
||||
GtkDirectionType direction = count < 0 ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
|
||||
gtk_widget_child_focus (subchild, direction);
|
||||
}
|
||||
}
|
||||
|
||||
get_current_selection_modifiers (GTK_WIDGET (box), &modify, &extend);
|
||||
@@ -3497,6 +3512,7 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
gtk_flow_box_update_cursor (box, child);
|
||||
if (!modify)
|
||||
gtk_flow_box_update_selection (box, child, FALSE, extend);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Selection {{{2 */
|
||||
@@ -3845,8 +3861,6 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
|
||||
* The ::move-cursor signal is a
|
||||
* [keybinding signal][GtkBindingSignal]
|
||||
* which gets emitted when the user initiates a cursor movement.
|
||||
* If the cursor is not visible in @text_view, this signal causes
|
||||
* the viewport to be moved instead.
|
||||
*
|
||||
* Applications should not connect to it, but may emit it with
|
||||
* g_signal_emit_by_name() if they need to control the cursor
|
||||
@@ -3859,14 +3873,17 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
|
||||
* - Arrow keys move by individual children
|
||||
* - Home/End keys move to the ends of the box
|
||||
* - PageUp/PageDown keys move vertically by pages
|
||||
*
|
||||
* Returns: %TRUE to stop other handlers from being invoked for the event.
|
||||
* %FALSE to propagate the event further.
|
||||
*/
|
||||
signals[MOVE_CURSOR] = g_signal_new (I_("move-cursor"),
|
||||
GTK_TYPE_FLOW_BOX,
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||
G_STRUCT_OFFSET (GtkFlowBoxClass, move_cursor),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__ENUM_INT,
|
||||
G_TYPE_NONE, 2,
|
||||
_gtk_marshal_BOOLEAN__ENUM_INT,
|
||||
G_TYPE_BOOLEAN, 2,
|
||||
GTK_TYPE_MOVEMENT_STEP, G_TYPE_INT);
|
||||
/**
|
||||
* GtkFlowBox::select-all:
|
||||
@@ -4152,8 +4169,9 @@ gtk_flow_box_insert (GtkFlowBox *box,
|
||||
*
|
||||
* Gets the nth child in the @box.
|
||||
*
|
||||
* Returns: (transfer none): the child widget, which will
|
||||
* always be a #GtkFlowBoxChild
|
||||
* Returns: (transfer none) (nullable): the child widget, which will
|
||||
* always be a #GtkFlowBoxChild or %NULL in case no child widget
|
||||
* with the given index exists.
|
||||
*
|
||||
* Since: 3.12
|
||||
*/
|
||||
@@ -4932,8 +4950,8 @@ gtk_flow_box_invalidate_filter (GtkFlowBox *box)
|
||||
* gtk_flow_box_child_changed()) and when gtk_flow_box_invalidate_sort()
|
||||
* is called.
|
||||
*
|
||||
* + * Note that using a sort function is incompatible with using a model
|
||||
* + * (see gtk_list_box_bind_model()).
|
||||
* Note that using a sort function is incompatible with using a model
|
||||
* (see gtk_flow_box_bind_model()).
|
||||
*
|
||||
* Since: 3.12
|
||||
*/
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@ struct _GtkFlowBoxClass
|
||||
void (*selected_children_changed) (GtkFlowBox *box);
|
||||
void (*activate_cursor_child) (GtkFlowBox *box);
|
||||
void (*toggle_cursor_child) (GtkFlowBox *box);
|
||||
void (*move_cursor) (GtkFlowBox *box,
|
||||
gboolean (*move_cursor) (GtkFlowBox *box,
|
||||
GtkMovementStep step,
|
||||
gint count);
|
||||
void (*select_all) (GtkFlowBox *box);
|
||||
@@ -107,7 +107,7 @@ struct _GtkFlowBoxChildClass
|
||||
* Called for flow boxes that are bound to a #GListModel with
|
||||
* gtk_flow_box_bind_model() for each item that gets added to the model.
|
||||
*
|
||||
* Returns: a #GtkWidget that represents @item
|
||||
* Returns: (transfer full): a #GtkWidget that represents @item
|
||||
*
|
||||
* Since: 3.18
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1240,7 +1240,7 @@ gtk_gesture_get_sequences (GtkGesture *gesture)
|
||||
*
|
||||
* Returns the #GdkEventSequence that was last updated on @gesture.
|
||||
*
|
||||
* Returns: The last updated sequence
|
||||
* Returns: (nullable): The last updated sequence
|
||||
*
|
||||
* Since: 3.14
|
||||
**/
|
||||
@@ -1263,7 +1263,7 @@ gtk_gesture_get_last_updated_sequence (GtkGesture *gesture)
|
||||
*
|
||||
* Returns the last event that was processed for @sequence.
|
||||
*
|
||||
* Returns: (transfer none): The last event from @sequence
|
||||
* Returns: (transfer none) (nullable): The last event from @sequence
|
||||
**/
|
||||
const GdkEvent *
|
||||
gtk_gesture_get_last_event (GtkGesture *gesture,
|
||||
|
||||
@@ -510,7 +510,7 @@ gtk_gesture_single_get_current_button (GtkGestureSingle *gesture)
|
||||
* Returns the event sequence currently interacting with @gesture.
|
||||
* This is only meaningful if gtk_gesture_is_active() returns %TRUE.
|
||||
*
|
||||
* Returns: the current sequence
|
||||
* Returns: (nullable): the current sequence
|
||||
*
|
||||
* Since: 3.14
|
||||
**/
|
||||
|
||||
+1
-1
@@ -1951,7 +1951,7 @@ gtk_grid_attach_next_to (GtkGrid *grid,
|
||||
* Gets the child of @grid whose area covers the grid
|
||||
* cell whose upper left corner is at @left, @top.
|
||||
*
|
||||
* Returns: (transfer none): the child at the given position, or %NULL
|
||||
* Returns: (transfer none) (nullable): the child at the given position, or %NULL
|
||||
*
|
||||
* Since: 3.2
|
||||
*/
|
||||
|
||||
+36
-1
@@ -1391,6 +1391,40 @@ gtk_header_bar_get_custom_title (GtkHeaderBar *bar)
|
||||
return priv->custom_title;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_header_bar_destroy (GtkWidget *widget)
|
||||
{
|
||||
GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (GTK_HEADER_BAR (widget));
|
||||
|
||||
if (priv->custom_title)
|
||||
{
|
||||
gtk_widget_unparent (priv->custom_title);
|
||||
priv->custom_title = NULL;
|
||||
}
|
||||
|
||||
if (priv->label_box)
|
||||
{
|
||||
gtk_widget_unparent (priv->label_box);
|
||||
priv->label_box = NULL;
|
||||
}
|
||||
|
||||
if (priv->titlebar_start_box)
|
||||
{
|
||||
gtk_widget_unparent (priv->titlebar_start_box);
|
||||
priv->titlebar_start_box = NULL;
|
||||
priv->titlebar_start_separator = NULL;
|
||||
}
|
||||
|
||||
if (priv->titlebar_end_box)
|
||||
{
|
||||
gtk_widget_unparent (priv->titlebar_end_box);
|
||||
priv->titlebar_end_box = NULL;
|
||||
priv->titlebar_end_separator = NULL;
|
||||
}
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_header_bar_parent_class)->destroy (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_header_bar_finalize (GObject *object)
|
||||
{
|
||||
@@ -1844,6 +1878,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
|
||||
object_class->get_property = gtk_header_bar_get_property;
|
||||
object_class->set_property = gtk_header_bar_set_property;
|
||||
|
||||
widget_class->destroy = gtk_header_bar_destroy;
|
||||
widget_class->size_allocate = gtk_header_bar_size_allocate;
|
||||
widget_class->get_preferred_width = gtk_header_bar_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_header_bar_get_preferred_height;
|
||||
@@ -1897,7 +1932,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
|
||||
P_("Custom Title"),
|
||||
P_("Custom title widget to display"),
|
||||
GTK_TYPE_WIDGET,
|
||||
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS);
|
||||
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS);
|
||||
|
||||
header_bar_props[PROP_SPACING] =
|
||||
g_param_spec_int ("spacing",
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
|
||||
/* Bug 660730: _fstat32 is only defined in msvcrt80.dll+/VS 2005+ */
|
||||
/* or possibly in the msvcrt.dll linked to by the Windows DDK */
|
||||
/* (will need to check on the Windows DDK part later) */
|
||||
#if (_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800)
|
||||
#if ((_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800) || defined (__MINGW64_VERSION_MAJOR)) && !defined(_WIN64)
|
||||
#undef fstat /* Just in case */
|
||||
#define fstat _fstat32
|
||||
#endif
|
||||
|
||||
+33
-2
@@ -1087,18 +1087,33 @@ static const gchar builtin_hicolor_index[] =
|
||||
"[Icon Theme]\n"
|
||||
"Name=Hicolor\n"
|
||||
"Hidden=True\n"
|
||||
"Directories=16x16/actions,22x22/actions,24x24/actions,32x32/actions\n"
|
||||
"Directories=16x16/actions,16x16/status,22x22/actions,24x24/actions,24x24/status,32x32/actions,32x32/status,48x48/status,64x64/actions\n"
|
||||
"[16x16/actions]\n"
|
||||
"Size=16\n"
|
||||
"Type=Threshold\n"
|
||||
"[16x16/status]\n"
|
||||
"Size=16\n"
|
||||
"Type=Threshold\n"
|
||||
"[22x22/actions]\n"
|
||||
"Size=22\n"
|
||||
"Type=Threshold\n"
|
||||
"[24x24/actions]\n"
|
||||
"Size=24\n"
|
||||
"Type=Threshold\n"
|
||||
"[24x24/status]\n"
|
||||
"Size=24\n"
|
||||
"Type=Threshold\n"
|
||||
"[32x32/actions]\n"
|
||||
"Size=32\n"
|
||||
"Type=Threshold\n"
|
||||
"[32x32/status]\n"
|
||||
"Size=32\n"
|
||||
"Type=Threshold\n"
|
||||
"[48x48/status]\n"
|
||||
"Size=48\n"
|
||||
"Type=Threshold\n"
|
||||
"[64x64/actions]\n"
|
||||
"Size=64\n"
|
||||
"Type=Threshold\n";
|
||||
|
||||
static void
|
||||
@@ -1995,6 +2010,12 @@ choose_icon (GtkIconTheme *icon_theme,
|
||||
* can then be rendered into a pixbuf using
|
||||
* gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
|
||||
* combines these two steps if all you need is the pixbuf.)
|
||||
*
|
||||
* When rendering on displays with high pixel densities you should not
|
||||
* use a @size multiplied by the scaling factor returned by functions
|
||||
* like gdk_window_get_scale_factor(). Instead, you should use
|
||||
* gtk_icon_theme_lookup_icon_for_scale(), as the assets loaded
|
||||
* for a given scaling factor may be different.
|
||||
*
|
||||
* Returns: (nullable) (transfer full): a #GtkIconInfo object
|
||||
* containing information about the icon, or %NULL if the
|
||||
@@ -4441,7 +4462,11 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo *icon_info,
|
||||
return NULL;
|
||||
|
||||
if (!icon_info_ensure_scale_and_pixbuf (icon_info))
|
||||
return NULL;
|
||||
{
|
||||
g_propagate_error (error, icon_info->load_error);
|
||||
icon_info->load_error = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (icon_info->symbolic_width == 0 ||
|
||||
icon_info->symbolic_height == 0)
|
||||
@@ -5373,6 +5398,12 @@ find_builtin_icon (const gchar *icon_name,
|
||||
* such as the filename of the icon. The icon can then be rendered
|
||||
* into a pixbuf using gtk_icon_info_load_icon().
|
||||
*
|
||||
* When rendering on displays with high pixel densities you should not
|
||||
* use a @size multiplied by the scaling factor returned by functions
|
||||
* like gdk_window_get_scale_factor(). Instead, you should use
|
||||
* gtk_icon_theme_lookup_by_gicon_for_scale(), as the assets loaded
|
||||
* for a given scaling factor may be different.
|
||||
*
|
||||
* Returns: (nullable) (transfer full): a #GtkIconInfo containing
|
||||
* information about the icon, or %NULL if the icon wasn’t
|
||||
* found. Unref with g_object_unref()
|
||||
|
||||
+35
-2
@@ -966,6 +966,36 @@ gtk_image_set_from_file (GtkImage *image,
|
||||
g_object_thaw_notify (G_OBJECT (image));
|
||||
}
|
||||
|
||||
#ifndef GDK_PIXBUF_MAGIC_NUMBER
|
||||
#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50) /* 'GdkP' */
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
resource_is_pixdata (const gchar *resource_path)
|
||||
{
|
||||
const guint8 *stream;
|
||||
guint32 magic;
|
||||
gsize data_size;
|
||||
GBytes *bytes;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
bytes = g_resources_lookup_data (resource_path, 0, NULL);
|
||||
if (bytes == NULL)
|
||||
return FALSE;
|
||||
|
||||
stream = g_bytes_get_data (bytes, &data_size);
|
||||
if (data_size < sizeof(guint32))
|
||||
goto out;
|
||||
|
||||
magic = (stream[0] << 24) + (stream[1] << 16) + (stream[2] << 8) + stream[3];
|
||||
if (magic == GDK_PIXBUF_MAGIC_NUMBER)
|
||||
ret = TRUE;
|
||||
|
||||
out:
|
||||
g_bytes_unref (bytes);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_image_set_from_resource:
|
||||
* @image: a #GtkImage
|
||||
@@ -979,7 +1009,7 @@ gtk_image_set_from_resource (GtkImage *image,
|
||||
{
|
||||
GtkImagePrivate *priv;
|
||||
GdkPixbufAnimation *animation;
|
||||
gint scale_factor;
|
||||
gint scale_factor = 1;
|
||||
|
||||
g_return_if_fail (GTK_IS_IMAGE (image));
|
||||
|
||||
@@ -995,7 +1025,10 @@ gtk_image_set_from_resource (GtkImage *image,
|
||||
return;
|
||||
}
|
||||
|
||||
animation = load_scalable_with_loader (image, NULL, resource_path, &scale_factor);
|
||||
if (resource_is_pixdata (resource_path))
|
||||
animation = gdk_pixbuf_animation_new_from_resource (resource_path, NULL);
|
||||
else
|
||||
animation = load_scalable_with_loader (image, NULL, resource_path, &scale_factor);
|
||||
|
||||
if (animation == NULL)
|
||||
{
|
||||
|
||||
+28
-20
@@ -651,7 +651,7 @@ gtk_list_box_get_selected_row (GtkListBox *box)
|
||||
* If @_index is negative or larger than the number of items in the
|
||||
* list, %NULL is returned.
|
||||
*
|
||||
* Returns: (transfer none): the child #GtkWidget or %NULL
|
||||
* Returns: (transfer none) (nullable): the child #GtkWidget or %NULL
|
||||
*
|
||||
* Since: 3.10
|
||||
*/
|
||||
@@ -670,6 +670,23 @@ gtk_list_box_get_row_at_index (GtkListBox *box,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
row_y_cmp_func (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data)
|
||||
{
|
||||
int y = GPOINTER_TO_INT (b);
|
||||
GtkListBoxRowPrivate *row_priv = ROW_PRIV (a);
|
||||
|
||||
|
||||
if (y < row_priv->y)
|
||||
return 1;
|
||||
else if (y >= row_priv->y + row_priv->height)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_list_box_get_row_at_y:
|
||||
* @box: a #GtkListBox
|
||||
@@ -677,7 +694,8 @@ gtk_list_box_get_row_at_index (GtkListBox *box,
|
||||
*
|
||||
* Gets the row at the @y position.
|
||||
*
|
||||
* Returns: (transfer none): the row
|
||||
* Returns: (transfer none) (nullable): the row or %NULL
|
||||
* in case no row exists for the given y coordinate.
|
||||
*
|
||||
* Since: 3.10
|
||||
*/
|
||||
@@ -685,29 +703,19 @@ GtkListBoxRow *
|
||||
gtk_list_box_get_row_at_y (GtkListBox *box,
|
||||
gint y)
|
||||
{
|
||||
GtkListBoxRow *row, *found_row;
|
||||
GtkListBoxRowPrivate *row_priv;
|
||||
GSequenceIter *iter;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST_BOX (box), NULL);
|
||||
|
||||
/* TODO: This should use g_sequence_search */
|
||||
iter = g_sequence_lookup (BOX_PRIV (box)->children,
|
||||
GINT_TO_POINTER (y),
|
||||
row_y_cmp_func,
|
||||
NULL);
|
||||
|
||||
found_row = NULL;
|
||||
for (iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children);
|
||||
!g_sequence_iter_is_end (iter);
|
||||
iter = g_sequence_iter_next (iter))
|
||||
{
|
||||
row = (GtkListBoxRow*) g_sequence_get (iter);
|
||||
row_priv = ROW_PRIV (row);
|
||||
if (y >= row_priv->y && y < (row_priv->y + row_priv->height))
|
||||
{
|
||||
found_row = row;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (iter)
|
||||
return GTK_LIST_BOX_ROW (g_sequence_get (iter));
|
||||
|
||||
return found_row;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3324,7 +3332,7 @@ gtk_list_box_row_changed (GtkListBoxRow *row)
|
||||
* in a #GtkListBoxUpdateHeaderFunc to see if there is a header
|
||||
* set already, and if so to update the state of it.
|
||||
*
|
||||
* Returns: (transfer none): the current header, or %NULL if none
|
||||
* Returns: (transfer none) (nullable): the current header, or %NULL if none
|
||||
*
|
||||
* Since: 3.10
|
||||
*/
|
||||
|
||||
+7
-1
@@ -698,6 +698,8 @@ static void
|
||||
do_post_parse_initialization (int *argc,
|
||||
char ***argv)
|
||||
{
|
||||
GdkDisplayManager *display_manager;
|
||||
|
||||
if (gtk_initialized)
|
||||
return;
|
||||
|
||||
@@ -737,7 +739,11 @@ do_post_parse_initialization (int *argc,
|
||||
_gtk_modules_init (argc, argv, NULL);
|
||||
}
|
||||
|
||||
g_signal_connect (gdk_display_manager_get (), "notify::default-display",
|
||||
display_manager = gdk_display_manager_get ();
|
||||
if (gdk_display_manager_get_default_display (display_manager) != NULL)
|
||||
_gtk_accessibility_init ();
|
||||
|
||||
g_signal_connect (display_manager, "notify::default-display",
|
||||
G_CALLBACK (default_display_notify_cb),
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -134,8 +134,6 @@ static void gtk_menu_shell_screen_changed (GtkWidget *widget,
|
||||
GdkScreen *previous_screen);
|
||||
static gboolean gtk_menu_shell_grab_broken (GtkWidget *widget,
|
||||
GdkEventGrabBroken *event);
|
||||
static gboolean gtk_menu_shell_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
static void gtk_menu_shell_add (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_menu_shell_remove (GtkContainer *container,
|
||||
@@ -201,7 +199,6 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
|
||||
widget_class->enter_notify_event = gtk_menu_shell_enter_notify;
|
||||
widget_class->leave_notify_event = gtk_menu_shell_leave_notify;
|
||||
widget_class->screen_changed = gtk_menu_shell_screen_changed;
|
||||
widget_class->draw = gtk_menu_shell_draw;
|
||||
|
||||
container_class->add = gtk_menu_shell_add;
|
||||
container_class->remove = gtk_menu_shell_remove;
|
||||
@@ -617,18 +614,6 @@ gtk_menu_shell_realize (GtkWidget *widget)
|
||||
gtk_widget_register_window (widget, window);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_menu_shell_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
gtk_render_background (gtk_widget_get_style_context (widget), cr,
|
||||
0, 0,
|
||||
gtk_widget_get_allocated_width (widget),
|
||||
gtk_widget_get_allocated_height (widget));
|
||||
|
||||
return GTK_WIDGET_CLASS (gtk_menu_shell_parent_class)->draw (widget, cr);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_shell_activate (GtkMenuShell *menu_shell)
|
||||
{
|
||||
|
||||
@@ -440,6 +440,7 @@ gtk_message_dialog_constructed (GObject *object)
|
||||
gtk_widget_show (box);
|
||||
gtk_widget_set_size_request (box, -1, 16);
|
||||
label = gtk_label_new ("");
|
||||
gtk_widget_set_no_show_all (label, TRUE);
|
||||
gtk_widget_set_margin_top (label, 6);
|
||||
gtk_widget_set_margin_bottom (label, 6);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (label), "title");
|
||||
|
||||
+8
-6
@@ -2837,8 +2837,8 @@ gtk_notebook_arrow_button_press (GtkNotebook *notebook,
|
||||
static gboolean
|
||||
get_widget_coordinates (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gint *x,
|
||||
gint *y)
|
||||
gdouble *x,
|
||||
gdouble *y)
|
||||
{
|
||||
GdkWindow *window = ((GdkEventAny *)event)->window;
|
||||
gdouble tx, ty;
|
||||
@@ -2869,7 +2869,9 @@ get_widget_coordinates (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static GList*
|
||||
get_tab_at_pos (GtkNotebook *notebook, gint x, gint y)
|
||||
get_tab_at_pos (GtkNotebook *notebook,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
GtkNotebookPage *page;
|
||||
@@ -2903,7 +2905,7 @@ gtk_notebook_button_press (GtkWidget *widget,
|
||||
GtkNotebookPage *page;
|
||||
GList *tab;
|
||||
GtkNotebookArrow arrow;
|
||||
gint x, y;
|
||||
gdouble x, y;
|
||||
|
||||
if (event->type != GDK_BUTTON_PRESS || !priv->children ||
|
||||
priv->button)
|
||||
@@ -3282,7 +3284,7 @@ tab_prelight (GtkNotebook *notebook,
|
||||
{
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
GList *tab;
|
||||
gint x, y;
|
||||
gdouble x, y;
|
||||
|
||||
if (get_widget_coordinates (GTK_WIDGET (notebook), (GdkEvent *)event, &x, &y))
|
||||
{
|
||||
@@ -3313,7 +3315,7 @@ gtk_notebook_leave_notify (GtkWidget *widget,
|
||||
{
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
gint x, y;
|
||||
gdouble x, y;
|
||||
|
||||
if (get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
|
||||
{
|
||||
|
||||
+8
-15
@@ -1484,9 +1484,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (priv->child1 && gtk_widget_get_visible (priv->child1))
|
||||
{
|
||||
gtk_paned_set_child_visible (paned, 0, TRUE);
|
||||
if (priv->child2)
|
||||
gtk_paned_set_child_visible (paned, 1, FALSE);
|
||||
gtk_paned_set_child_visible (paned, CHILD1, TRUE);
|
||||
gtk_paned_set_child_visible (paned, CHILD2, FALSE);
|
||||
|
||||
gtk_paned_child_allocate (priv->child1,
|
||||
priv->child1_window,
|
||||
@@ -1495,9 +1494,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
else if (priv->child2 && gtk_widget_get_visible (priv->child2))
|
||||
{
|
||||
gtk_paned_set_child_visible (paned, 1, TRUE);
|
||||
if (priv->child1)
|
||||
gtk_paned_set_child_visible (paned, 0, FALSE);
|
||||
gtk_paned_set_child_visible (paned, CHILD1, FALSE);
|
||||
gtk_paned_set_child_visible (paned, CHILD2, TRUE);
|
||||
|
||||
gtk_paned_child_allocate (priv->child2,
|
||||
priv->child2_window,
|
||||
@@ -1506,10 +1504,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (priv->child1)
|
||||
gtk_paned_set_child_visible (paned, 0, FALSE);
|
||||
if (priv->child2)
|
||||
gtk_paned_set_child_visible (paned, 1, FALSE);
|
||||
gtk_paned_set_child_visible (paned, CHILD1, FALSE);
|
||||
gtk_paned_set_child_visible (paned, CHILD2, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2212,11 +2208,8 @@ gtk_paned_calc_position (GtkPaned *paned,
|
||||
&priv->min_position, &priv->max_position,
|
||||
&priv->child1_size);
|
||||
|
||||
if (priv->child1)
|
||||
gtk_paned_set_child_visible (paned, 0, priv->child1_size != 0);
|
||||
|
||||
if (priv->child2)
|
||||
gtk_paned_set_child_visible (paned, 1, priv->child1_size != allocation);
|
||||
gtk_paned_set_child_visible (paned, CHILD1, priv->child1_size != 0);
|
||||
gtk_paned_set_child_visible (paned, CHILD2, priv->child1_size != allocation);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (paned));
|
||||
if (priv->child1_size != old_position)
|
||||
|
||||
+3
-3
@@ -526,7 +526,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
GList *list, *first_button;
|
||||
gint width;
|
||||
gint allocation_width;
|
||||
gboolean need_sliders = FALSE;
|
||||
gboolean need_sliders = TRUE;
|
||||
gint up_slider_offset = 0;
|
||||
gint down_slider_offset = 0;
|
||||
GtkRequisition child_requisition;
|
||||
@@ -584,7 +584,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
else
|
||||
first_button = path_bar->priv->button_list;
|
||||
need_sliders = TRUE;
|
||||
|
||||
|
||||
/* To see how much space we have, and how many buttons we can display.
|
||||
* We start at the first button, count forward until hit the new
|
||||
* button, then count backwards.
|
||||
@@ -742,7 +742,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
needs_reorder |= gtk_widget_get_child_visible (path_bar->priv->up_slider_button) == TRUE;
|
||||
gtk_widget_set_child_visible (path_bar->priv->up_slider_button, FALSE);
|
||||
}
|
||||
|
||||
|
||||
if (need_sliders)
|
||||
{
|
||||
child_allocation.width = path_bar->priv->slider_width;
|
||||
|
||||
+27
-34
@@ -1,27 +1,24 @@
|
||||
/*
|
||||
* GtkPlacesSidebar - sidebar widget for places in the filesystem
|
||||
/* GtkPlacesSidebar - sidebar widget for places in the filesystem
|
||||
*
|
||||
* This code comes from Nautilus, GNOME’s file manager.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
|
||||
* Cosimo Cecchi <cosimoc@gnome.org>
|
||||
* Federico Mena Quintero <federico@gnome.org>
|
||||
* Carlos Soriano <csoriano@gnome.org>
|
||||
* This code is originally from Nautilus.
|
||||
*
|
||||
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
|
||||
* Cosimo Cecchi <cosimoc@gnome.org>
|
||||
* Federico Mena Quintero <federico@gnome.org>
|
||||
* Carlos Soriano <csoriano@gnome.org>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -823,33 +820,29 @@ out:
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_removable_volume (GVolume *volume)
|
||||
is_external_volume (GVolume *volume)
|
||||
{
|
||||
gboolean is_removable;
|
||||
gboolean is_external;
|
||||
GDrive *drive;
|
||||
GMount *mount;
|
||||
gchar *id;
|
||||
|
||||
drive = g_volume_get_drive (volume);
|
||||
mount = g_volume_get_mount (volume);
|
||||
id = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_CLASS);
|
||||
|
||||
is_removable = g_volume_can_eject (volume);
|
||||
is_external = g_volume_can_eject (volume);
|
||||
|
||||
/* NULL volume identifier only happens on removable devices */
|
||||
is_removable |= !id;
|
||||
is_external |= !id;
|
||||
|
||||
if (drive)
|
||||
is_removable |= g_drive_can_eject (drive);
|
||||
|
||||
if (mount)
|
||||
is_removable |= (g_mount_can_eject (mount) && !g_mount_can_unmount (mount));
|
||||
is_external |= g_drive_can_eject (drive) ||
|
||||
g_drive_is_media_removable (drive) ||
|
||||
g_drive_can_stop (drive);
|
||||
|
||||
g_clear_object (&drive);
|
||||
g_clear_object (&mount);
|
||||
g_free (id);
|
||||
|
||||
return is_removable;
|
||||
return is_external;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -988,7 +981,7 @@ update_places (GtkPlacesSidebar *sidebar)
|
||||
}
|
||||
g_free (identifier);
|
||||
|
||||
if (sidebar->show_other_locations && !is_removable_volume (volume))
|
||||
if (sidebar->show_other_locations && !is_external_volume (volume))
|
||||
{
|
||||
g_object_unref (volume);
|
||||
continue;
|
||||
@@ -1092,7 +1085,7 @@ update_places (GtkPlacesSidebar *sidebar)
|
||||
}
|
||||
g_free (identifier);
|
||||
|
||||
if (sidebar->show_other_locations && !is_removable_volume (volume))
|
||||
if (sidebar->show_other_locations && !is_external_volume (volume))
|
||||
{
|
||||
g_object_unref (volume);
|
||||
continue;
|
||||
@@ -1712,7 +1705,7 @@ build_file_list_from_uris (const gchar **uris)
|
||||
gint i;
|
||||
|
||||
result = NULL;
|
||||
for (i = 0; uris[i]; i++)
|
||||
for (i = 0; uris && uris[i]; i++)
|
||||
{
|
||||
GFile *file;
|
||||
|
||||
|
||||
+14
-17
@@ -1,27 +1,24 @@
|
||||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
||||
|
||||
/*
|
||||
* GtkPlacesSidebar - sidebar widget for places in the filesystem
|
||||
/* GtkPlacesSidebar - sidebar widget for places in the filesystem
|
||||
*
|
||||
* This code comes from Nautilus, GNOME’s file manager.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
|
||||
* Federico Mena Quintero <federico@gnome.org>
|
||||
* This code comes from Nautilus, GNOME’s file manager.
|
||||
*
|
||||
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
|
||||
* Federico Mena Quintero <federico@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __GTK_PLACES_SIDEBAR_H__
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of the
|
||||
* published by the Free Software Foundation; either version 2.1 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful, but
|
||||
@@ -12,7 +12,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Carlos Soriano <csoriano@gnome.org>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user