Compare commits
234 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 67e038a486 | |||
| ca49aea29b | |||
| b3767a5080 | |||
| 63a7a8ad83 | |||
| ad6d485f88 | |||
| 6fa923b503 | |||
| c75ef6e0ee | |||
| 24dd121179 | |||
| 8e1cd68e22 | |||
| 909691814e | |||
| 9e002c2b06 | |||
| 03de1d4c6f | |||
| 8777926359 | |||
| 271ae0f284 | |||
| c969a05855 | |||
| 6456347141 | |||
| 4f8ad6994a | |||
| f1f648fd84 | |||
| 72a3dcacaa | |||
| 0d0c286696 | |||
| 96f8688f7a | |||
| ad803b4a77 | |||
| cc9fa7ff07 | |||
| 35ea47ed4d | |||
| d722067aa3 | |||
| fbcd10e70d | |||
| 34129708e6 | |||
| c7ef15ae59 | |||
| f8ad6207ce | |||
| 9d4106324b | |||
| efef397102 | |||
| 3942cc014a | |||
| 6a5e88fc11 | |||
| 0563c5fa4b | |||
| 2b51b61d2d | |||
| 9d56f11cae | |||
| 35f0b5c9fb | |||
| 938f523e4c | |||
| 1d9b58bdb2 | |||
| 90e88b44f8 | |||
| 701a975cb2 | |||
| 78763bfa46 | |||
| 92a68ba55a | |||
| 2f87fff729 | |||
| ee3d46d81c | |||
| 152cfa36ce | |||
| 3c92289371 | |||
| 7dda05ca8a | |||
| 5f0594d675 | |||
| 0586e1159b | |||
| c8ed73d818 | |||
| 3f2474a0d4 | |||
| d0ba0322a6 | |||
| 2e7a5371ee | |||
| 641996dfd6 | |||
| eccc91a994 | |||
| aa8cae655a | |||
| 9ce8d8a683 | |||
| 549e96bd41 | |||
| 7fa8ece199 | |||
| 1e51aec065 | |||
| 1b393f5fa0 | |||
| d019b714ca | |||
| 40dc168114 | |||
| f9947ebb34 | |||
| 27da2ad464 | |||
| 7130f157d1 | |||
| b7023fafa0 | |||
| 885a47c57d | |||
| 541bdbdb12 | |||
| ce87d9d300 | |||
| 6658142dfb | |||
| 039a7e52ee | |||
| 7c568f8dd0 | |||
| 0410444101 | |||
| 034edd2ef4 | |||
| 8f344cf163 | |||
| 7cb26450d4 | |||
| 97874d93a4 | |||
| ff0ec9fabb | |||
| 75bcafa983 | |||
| 05b9007c59 | |||
| 05b4d62854 | |||
| 3313fffcbb | |||
| 0efafccca2 | |||
| 154318504b | |||
| 3a93de7e16 | |||
| f5a3a0a32e | |||
| c48d156ee5 | |||
| 8b1a98a84f | |||
| a424f4ded9 | |||
| 861efd5085 | |||
| b14f1a69dd | |||
| 958bd2c5e0 | |||
| 83f1beccb0 | |||
| 33a3ebcfcf | |||
| b16bdfa56b | |||
| fa596e5552 | |||
| 80936f6072 | |||
| c662b8563c | |||
| 654b81af1c | |||
| 0868642d33 | |||
| f709557372 | |||
| e693824435 | |||
| a666f55012 | |||
| 5b16fcc396 | |||
| 1959fc875e | |||
| 606222f819 | |||
| fa932f5e06 | |||
| 4bc5fd4028 | |||
| 0619940a7f | |||
| b01062ec91 | |||
| 2da67f5c85 | |||
| 0140d8ec47 | |||
| 5eba4f208a | |||
| 15942580aa | |||
| 3470dfa0f8 | |||
| 76b8be3ec1 | |||
| 89e5ad5197 | |||
| 56b8b42d9c | |||
| f5e4abd61e | |||
| 5b0e467eae | |||
| 017fbcb0c1 | |||
| b0917066d5 | |||
| 5230df0fbb | |||
| cb614c1491 | |||
| fdaf62e882 | |||
| 28813733d3 | |||
| 4ca827ea31 | |||
| a3b76f46e1 | |||
| b45d882556 | |||
| 27d6d5cd09 | |||
| 951642506b | |||
| bd70be44c2 | |||
| 6e667e11e6 | |||
| c618083f1f | |||
| 91e142b555 | |||
| 28fb940e10 | |||
| 8d20b0e3e1 | |||
| 3d16757865 | |||
| e2261e010d | |||
| e62585d3a3 | |||
| 5240b8fabd | |||
| e081180ffb | |||
| 3b7c4153e9 | |||
| 8d683ae99a | |||
| ece6aa91b3 | |||
| 651bfec50b | |||
| 28ebf66c93 | |||
| d0385c9c42 | |||
| 2627b132ac | |||
| 742abd9630 | |||
| 4806c17f25 | |||
| b89688efd1 | |||
| 5eca684b30 | |||
| d23c2c51d3 | |||
| 73f5108fc1 | |||
| 789c038b1e | |||
| e364e9fd8a | |||
| 22e548b122 | |||
| eaacd364b6 | |||
| d5a1933dc0 | |||
| a81b85df5b | |||
| 865dd1f3ff | |||
| 6235e5c9ed | |||
| b6685dda46 | |||
| 0a32c2f1e1 | |||
| 5f9b49bebe | |||
| 451a29b95e | |||
| 43df0edf6f | |||
| 67ff5f6ec3 | |||
| 7c0afcf02c | |||
| 47d82c8304 | |||
| 395071a745 | |||
| e20d555abe | |||
| 1d9431b920 | |||
| e65267157a | |||
| c87722f364 | |||
| 8afb9c371a | |||
| e5ad7979fb | |||
| abb636126d | |||
| 0ce3515807 | |||
| 77243ed6c2 | |||
| 195a935813 | |||
| dfa2fc1f2d | |||
| 589b292b4a | |||
| de355de4dc | |||
| ccb57be391 | |||
| 06604076a9 | |||
| 298a7818f7 | |||
| 2d11ee82cf | |||
| 4b5d2bd0db | |||
| e1040c7d22 | |||
| 2ee27686b3 | |||
| e0b181669d | |||
| 44e183447c | |||
| b3449c79db | |||
| 354e3059e4 | |||
| d52f1a2fc7 | |||
| 887449e0a8 | |||
| 0876876cdc | |||
| dcb0268b6a | |||
| 111001a343 | |||
| 3802693e6f | |||
| d508d9259a | |||
| 0f9908b238 | |||
| 9d41335b72 | |||
| bbc3430856 | |||
| 87d0a759cd | |||
| 5fe70d970b | |||
| ca2533127f | |||
| 7cb7211a49 | |||
| 544950f67d | |||
| 179fc518b9 | |||
| cbbdbe4bb0 | |||
| 25ea6b6d93 | |||
| e199eb5957 | |||
| 0068ec2781 | |||
| 090171160f | |||
| 12ff393bbf | |||
| 085c714429 | |||
| 7053b6c34c | |||
| f3d07160e1 | |||
| c955d4ad04 | |||
| fc08f5a96f | |||
| f9e4216fee | |||
| f7b5f6c119 | |||
| 901f98928e | |||
| 8ed4295637 | |||
| 0cae3b1f88 | |||
| ba6d64651d | |||
| 12c7fa961f | |||
| 9f8575cfaf | |||
| f64f8211a4 |
@@ -4,7 +4,7 @@ Prerequisites
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, ATK and cairo libraries, available at the same
|
||||
location as GTK+. GTK+ 2.14.2 requires at least GLib 2.17.6,
|
||||
location as GTK+. GTK+ 2.14.7 requires at least GLib 2.17.6,
|
||||
Pango 1.20, ATK 1.13.0 and cairo 1.6.0.
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
@@ -20,8 +20,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.14.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.14.2 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.14.7.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.14.7 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK+
|
||||
[ Become root if necessary ]
|
||||
|
||||
+2
-1
@@ -149,7 +149,8 @@ DISTCLEANFILES = \
|
||||
gail.pc \
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc \
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc \
|
||||
gail-uninstalled.pc
|
||||
gail-uninstalled.pc \
|
||||
config.lt
|
||||
|
||||
## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
|
||||
DEFAULT_GDKTARGET=x11
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ TEST_PROGS =
|
||||
### testing rules
|
||||
|
||||
# Xvfb based test rules
|
||||
XVFB = Xvfb -screen 0 800x600x16
|
||||
XVFB = Xvfb -ac -noreset -screen 0 800x600x16
|
||||
XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \
|
||||
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 \
|
||||
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 \
|
||||
|
||||
@@ -1,3 +1,137 @@
|
||||
Overview of Changes from GTK+ 2.14.6 to 2.14.7
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
565203 RTL: icons are misplaced when horizontal gtkiconview is ...
|
||||
549251 GTK icon view accessible issue
|
||||
565846 va_end(args) should be added into gtk_tree_store_new
|
||||
558694 Paned window splitter keynav broken
|
||||
|
||||
* Updated translations:
|
||||
Belarusian Latin (be@latin)
|
||||
Brazilian Portugese (pt_BR)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.14.5 to 2.14.6
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
561539 Fix warnings when size allocations fall short of border width...
|
||||
557420 Some compose sequences don't work anymore
|
||||
555334 connected server feature
|
||||
563547 Update gdkx11 atom precache table
|
||||
563991 gtk_file_chooser_button_new_with_backend is deprecated
|
||||
560135 Print when the user double clicks a printer
|
||||
564066 Crash in gtk_rc_parse_default_files
|
||||
564212 gtk_icon_view_accessible_model_rows_reordered explain new_order...
|
||||
563751 xatom cache is prefilled too late
|
||||
556839 Crash when opening a link
|
||||
549251 GTK icon view accessible issue
|
||||
558306 Cannot build gdk (gtk+ 2.14.4) on Solaris 8
|
||||
555560 gtk_combo_box_set_active fails with no model
|
||||
563158 CellRendererProgress pulsing and progressing rows can not...
|
||||
556233 local-only causes G_IS_FILE warning
|
||||
562579 Remove error dialog when directory does not exist
|
||||
561494 FileChooser network browsing and authentication support
|
||||
563876 GTK_MODULES env var is no longer relevant
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.14.4 to 2.14.5
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
556578 GIMP windows stay on top of other windows
|
||||
557059 crash when compositing emblems with icon
|
||||
557266 Window Management Problem
|
||||
528320 Incorrect icons displayed for files with custom mimetype icons
|
||||
557894 Wrong return value for gdk_pointer_grab_info_libgtk_only
|
||||
557316 GtkLinkButton should consider user-defined tooltip
|
||||
558323 glitches when popping up combos in treeviews
|
||||
558278 Crash when calling a callback set by gdk_add_client_message_filter
|
||||
557212 Problem with which window gains focus and is visible
|
||||
541391 Unfocussable Treeview swallows focus
|
||||
552956 Should check composite extension version
|
||||
554567 warning fixes (missing format specifiers and NULL vs 0)
|
||||
|
||||
* Updated translations:
|
||||
Asturian (ast)
|
||||
Catalan (ca)
|
||||
Czech (cs)
|
||||
Galician (gl)
|
||||
Hebrew (he)
|
||||
Italian (it)
|
||||
Japanese (ja)
|
||||
Lithuanian (lt)
|
||||
Norwegian bokmål (nb)
|
||||
Thai (th)
|
||||
|
||||
Overview of Changes from GTK+ 2.14.3 to 2.14.4
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
553135 eog crash: assertion failed...
|
||||
553241 double freed pointer in lpr_write cause firefox3 crash
|
||||
553133 GtkFileChooser won't ask to mount a volume
|
||||
553578 tabs are not drawn correctly
|
||||
553211 GtkFileChooserButton unsets filter after first use
|
||||
554141 uninitialized data use/free in gtkclipboard-quartz.c
|
||||
554690 mem leak in filechooser
|
||||
554691 mem leak in filechooser
|
||||
554696 invalid free function used
|
||||
554698 mem leak in filechooser
|
||||
554701 filechooser spams console with useless warnings
|
||||
554704 gtkfilesystemmodel does too much work
|
||||
554506 combining diacritics broken, became deadkeys
|
||||
530575 GtkEntry with invisible chars has a confused cursor...
|
||||
371908 Password Entry broken
|
||||
132501 Make utility window translate to tool window in win32
|
||||
554702 gtkfilesystem leaks GError
|
||||
554192 double press on the "circumflex" dead key...
|
||||
550342 Splash screens have a caption
|
||||
555000 Wrong treatment on non-spacing marks dead keys...
|
||||
552318 menubar mnemonics consumed even when gtk-enable-mnemonics=false
|
||||
555779 GtkCellRendererPixbuf crashed on failed GIcon lookup
|
||||
555791 Nautilus Crashes when opening USB MP3 Player Contents
|
||||
|
||||
* Updated translations:
|
||||
Catalan (ca)
|
||||
German (de)
|
||||
Spanish (es)
|
||||
French (fr)
|
||||
Italian (it)
|
||||
Japanese (ja)
|
||||
Macedonian (mk)
|
||||
Brazilian Portugese (pt_BR)
|
||||
Slovak (sk)
|
||||
Swedish (sv)
|
||||
|
||||
Overview of Changes from GTK+ 2.14.2 to 2.14.3
|
||||
==============================================
|
||||
|
||||
* Revert problematic GtkAdjustment changes
|
||||
|
||||
* Bugs fixed:
|
||||
552837 mem leak in gtkimmulticontext
|
||||
553000 incorrect i18n header in gtkfilesystem.c
|
||||
553135 eog crash: assertion failed
|
||||
552545 leaks GpImage
|
||||
|
||||
* Updated translations:
|
||||
Afrikaans (af)
|
||||
Arabic (ar)
|
||||
Danish (da)
|
||||
Estonian (et)
|
||||
Finnish (fi)
|
||||
Gujarati (gu)
|
||||
Hindi (hi)
|
||||
Japanese (ja)
|
||||
Malayalam (ml)
|
||||
Romanian (ro)
|
||||
Russian (ru)
|
||||
Serbian (sr, sr@latin)
|
||||
Tamil (ta)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.14.1 to 2.14.2
|
||||
==============================================
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.14.2. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.14.7. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
@@ -48,11 +48,15 @@ Release notes for 2.14
|
||||
to GTK_SENSITIVITY_ON, so that the button is always sensitive or
|
||||
GTK_SENSITIVITY_OFF to make it insensitive respectively.
|
||||
|
||||
* GtkAdjustment now enforces that values are restricted to the
|
||||
range [lower, upper - page_size]. This has always been the documented
|
||||
behaviour, and the recommended practice is to set page_size to 0
|
||||
when using adjustments for simple scalar values, like in a slider
|
||||
or spin button.
|
||||
* In the early 2.14.x releases, GtkAdjustment was changed to enforce
|
||||
that values are restricted to the range [lower, upper - page_size].
|
||||
This has always been the documented behaviour, and the recommended
|
||||
practice is to set page_size to 0 when using adjustments for simple
|
||||
scalar values, like in a slider or spin button.
|
||||
Due to the large number of applications that are affected by this
|
||||
change, the behaviour has been reverted to the old behaviour in
|
||||
2.14.3, with an explicit warning that this change will be
|
||||
reintroduced in 2.90.
|
||||
|
||||
* gdk-pixbuf will use GIO for mime type detection if possible. For
|
||||
this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
|
||||
|
||||
@@ -48,11 +48,15 @@ Release notes for 2.14
|
||||
to GTK_SENSITIVITY_ON, so that the button is always sensitive or
|
||||
GTK_SENSITIVITY_OFF to make it insensitive respectively.
|
||||
|
||||
* GtkAdjustment now enforces that values are restricted to the
|
||||
range [lower, upper - page_size]. This has always been the documented
|
||||
behaviour, and the recommended practice is to set page_size to 0
|
||||
when using adjustments for simple scalar values, like in a slider
|
||||
or spin button.
|
||||
* In the early 2.14.x releases, GtkAdjustment was changed to enforce
|
||||
that values are restricted to the range [lower, upper - page_size].
|
||||
This has always been the documented behaviour, and the recommended
|
||||
practice is to set page_size to 0 when using adjustments for simple
|
||||
scalar values, like in a slider or spin button.
|
||||
Due to the large number of applications that are affected by this
|
||||
change, the behaviour has been reverted to the old behaviour in
|
||||
2.14.3, with an explicit warning that this change will be
|
||||
reintroduced in 2.90.
|
||||
|
||||
* gdk-pixbuf will use GIO for mime type detection if possible. For
|
||||
this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ have_libtool=false
|
||||
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*|1.5*)
|
||||
1.4*|1.5*|2.2*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -269,7 +269,9 @@
|
||||
/* #undef USE_MEDIALIB25 */
|
||||
|
||||
/* Define to 1 if XXM is available and should be used */
|
||||
#ifndef _MSC_VER
|
||||
#define USE_MMX 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if no XInput should be used */
|
||||
/* #undef XINPUT_NONE */
|
||||
|
||||
+3
-3
@@ -12,8 +12,8 @@ AC_PREREQ(2.54)
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [14])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_interface_age], [3])
|
||||
m4_define([gtk_micro_version], [8])
|
||||
m4_define([gtk_interface_age], [8])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -1619,7 +1619,7 @@ AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
|
||||
AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
|
||||
if test "x$gdktarget" = "xdirectfb"; then
|
||||
DIRECTFB_REQUIRED_VERSION=0.9.24
|
||||
DIRECTFB_REQUIRED_VERSION=1.0.0
|
||||
AC_MSG_CHECKING(for DirectFB)
|
||||
|
||||
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.7 ===
|
||||
|
||||
2008-12-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.6 ===
|
||||
|
||||
2008-11-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.5 ===
|
||||
|
||||
2008-10-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.4 ====
|
||||
|
||||
2008-09-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.3 ===
|
||||
|
||||
2008-09-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.2 ===
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.7 ===
|
||||
|
||||
2008-12-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.6 ===
|
||||
|
||||
2008-12-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 563876 – [Regression] GTK_MODULES env var is no longer relevant
|
||||
|
||||
* gtk/running.sgml: Improve GTK_MODULES docs.
|
||||
|
||||
2008-11-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.5 ===
|
||||
|
||||
2008-10-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.4 ====
|
||||
|
||||
2008-09-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.3 ===
|
||||
|
||||
2008-09-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.2 ===
|
||||
|
||||
@@ -195,7 +195,7 @@ additional environment variables.
|
||||
<title><envar>GTK_MODULES</envar></title>
|
||||
|
||||
<para>
|
||||
A list of modules to load.
|
||||
A list of modules to load. Note that GTK+ also allows to specify modules to load via a commandline option (<option>--gtk-module</option>) and with the <literal>gtk-modules</literal> setting.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
|
||||
@@ -1,3 +1,85 @@
|
||||
2009-03-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* io-gdip-utils.c(gdip_buffer_to_bitmap) : don't try to set the stream
|
||||
size before stream creation - makes the gdip backend good enough to
|
||||
serve gdk-pixbuf-csource.
|
||||
|
||||
2009-01-19 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
Bug 568305 - gdk-pixbuf mishandles BI_BITFIELDS bmps
|
||||
|
||||
* io-bmp.c (OneLine32): Use unsigned variables so that we can
|
||||
right-shift them without risk of sign extension. Don't "reverse"
|
||||
the alpha value, actually storing 0xFF-alpha, but use it as such.
|
||||
|
||||
2009-01-12 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
Bug 164002 - query scripts don't work uninstalled on windows
|
||||
|
||||
* queryloaders.c (main): Use the configure-time PIXBUF_LIBDIR if
|
||||
the exe is located in a .libs folder, i.e. run in the build
|
||||
directory through a libtool wrapper script or wrapper executable,
|
||||
or in the source folder itself. Otherwise continue to infer the
|
||||
runtime prefix from the exe's location.
|
||||
|
||||
2009-01-12 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* queryloaders.c (main): Remove the Win9x code path. It had been
|
||||
left by mistake. Win9x code is gone from the rest of GTK+ since
|
||||
2.12.
|
||||
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.7 ===
|
||||
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from trunk:
|
||||
|
||||
Bug 566862 – pixbuf_new_from_file does not autodetect format
|
||||
|
||||
* gdk-pixbuf-io.c (_gdk_pixbuf_get_module): Go back to sniffing
|
||||
without looking at the filename, to avoid breaking expected
|
||||
functionality.
|
||||
|
||||
2008-12-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.6 ===
|
||||
|
||||
2008-11-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.5 ===
|
||||
|
||||
2008-10-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.4 ====
|
||||
|
||||
2008-10-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
Bug 555791 – Natuilus Crashes when opening USB MP3 Player Contents
|
||||
|
||||
* io-tga.c (gdk_pixbuf__tga_stop_load): Don't segfault on
|
||||
short files.
|
||||
Problem reported by Pedro Villavicencio
|
||||
|
||||
2008-10-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* io-icns.c: Don't #define _GNU_SOURCE on Windows as it confuses
|
||||
newest mingw headers.
|
||||
|
||||
2008-09-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.3 ===
|
||||
|
||||
2008-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
* gdk-pixbuf-io.c: Don't call fill_info if we've already filled
|
||||
the info from the module file, fixes a small memory leak.
|
||||
|
||||
2008-09-18 Dominic Lachowicz <domlachowicz@gmail.com>
|
||||
|
||||
* io-gdip-utils.c: Fix 2 cases where we leaked a GpImage (#552545)
|
||||
|
||||
@@ -678,9 +678,10 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
|
||||
if (fill_vtable) {
|
||||
image_module->module = (void *) 1;
|
||||
(* fill_vtable) (image_module);
|
||||
image_module->info = g_new0 (GdkPixbufFormat, 1);
|
||||
(* fill_info) (image_module->info);
|
||||
|
||||
if (image_module->info == NULL) {
|
||||
image_module->info = g_new0 (GdkPixbufFormat, 1);
|
||||
(* fill_info) (image_module->info);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@@ -793,7 +794,7 @@ _gdk_pixbuf_get_module (guchar *buffer, guint size,
|
||||
gchar *type;
|
||||
gint j;
|
||||
|
||||
mime_type = g_content_type_guess (filename, buffer, size, NULL);
|
||||
mime_type = g_content_type_guess (NULL, buffer, size, NULL);
|
||||
|
||||
for (modules = get_file_formats (); modules; modules = g_slist_next (modules)) {
|
||||
GdkPixbufModule *module = (GdkPixbufModule *)modules->data;
|
||||
@@ -2405,13 +2406,10 @@ gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf,
|
||||
data.stream = stream;
|
||||
data.cancellable = cancellable;
|
||||
|
||||
if (!gdk_pixbuf_save_to_callbackv (pixbuf, save_to_stream,
|
||||
&data, type,
|
||||
keys, values,
|
||||
error)) {
|
||||
error = NULL; /* Ignore further errors */
|
||||
res = FALSE;
|
||||
}
|
||||
res = gdk_pixbuf_save_to_callbackv (pixbuf, save_to_stream,
|
||||
&data, type,
|
||||
keys, values,
|
||||
error);
|
||||
|
||||
g_strfreev (keys);
|
||||
g_strfreev (values);
|
||||
|
||||
+2
-2
@@ -762,7 +762,7 @@ static void OneLine32(struct bmp_progressive_state *context)
|
||||
a_rshift = context->a_bits - a_lshift;
|
||||
|
||||
for (i = 0; i < context->Header.width; i++) {
|
||||
int v, r, g, b, a;
|
||||
unsigned int v, r, g, b, a;
|
||||
|
||||
v = src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
|
||||
|
||||
@@ -775,7 +775,7 @@ static void OneLine32(struct bmp_progressive_state *context)
|
||||
*pixels++ = (g << g_lshift) | (g >> g_rshift);
|
||||
*pixels++ = (b << b_lshift) | (b >> b_rshift);
|
||||
if (context->a_bits)
|
||||
*pixels++ = 0xff - ((a << a_lshift) | (a >> a_rshift));
|
||||
*pixels++ = (a << a_lshift) | (a >> a_rshift);
|
||||
else
|
||||
*pixels++ = 0xff;
|
||||
|
||||
|
||||
@@ -353,7 +353,6 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
if (!hg)
|
||||
return NULL;
|
||||
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
hr = CreateStreamOnHGlobal (hg, FALSE, (LPSTREAM *)&stream);
|
||||
|
||||
if (!SUCCEEDED (hr)) {
|
||||
@@ -361,7 +360,7 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
GlobalFree (hg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
status = GdipCreateBitmapFromStream (stream, &bitmap);
|
||||
|
||||
if (Ok != status)
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
+5
-3
@@ -349,7 +349,7 @@ static gboolean fill_in_context(TGAContext *ctx, GError **err)
|
||||
}
|
||||
|
||||
ctx->pbuf_bytes = ctx->pbuf->rowstride * ctx->pbuf->height;
|
||||
if (ctx->hdr->flags & TGA_ORIGIN_UPPER || ctx->run_length_encoded)
|
||||
if ((ctx->hdr->flags & TGA_ORIGIN_UPPER) || ctx->run_length_encoded)
|
||||
ctx->pptr = ctx->pbuf->pixels;
|
||||
else
|
||||
ctx->pptr = ctx->pbuf->pixels + (ctx->pbuf->height - 1)*ctx->pbuf->rowstride;
|
||||
@@ -935,8 +935,10 @@ static gboolean gdk_pixbuf__tga_stop_load(gpointer data, GError **err)
|
||||
TGAContext *ctx = (TGAContext *) data;
|
||||
g_return_val_if_fail(ctx != NULL, FALSE);
|
||||
|
||||
if (!(ctx->hdr->flags & TGA_ORIGIN_UPPER) &&
|
||||
ctx->run_length_encoded && ctx->pbuf) {
|
||||
if (ctx->hdr &&
|
||||
(ctx->hdr->flags & TGA_ORIGIN_UPPER) == 0 &&
|
||||
ctx->run_length_encoded &&
|
||||
ctx->pbuf) {
|
||||
pixbuf_flip_vertically (ctx->pbuf);
|
||||
if (ctx->ufunc)
|
||||
(*ctx->ufunc) (ctx->pbuf, 0, 0,
|
||||
|
||||
+3
-10
@@ -25,7 +25,7 @@ BUILT_IN_FORMATS = \
|
||||
-DINCLUDE_xpm -DINCLUDE_wbmp \
|
||||
-DINCLUDE_pnm -DINCLUDE_ras
|
||||
|
||||
PKG_CFLAGS = -FImsvc_recommended_pragmas.h \
|
||||
INCLUDES = -FImsvc_recommended_pragmas.h \
|
||||
!IFNDEF USEGDIP
|
||||
$(JPEG_CFLAGS) $(TIFF_CFLAGS) \
|
||||
!ENDIF
|
||||
@@ -111,12 +111,6 @@ gdk_pixbuf.def: gdk-pixbuf.symbols makefile.msc
|
||||
gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
|
||||
perl makegdkpixbufalias.pl -def < gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
|
||||
|
||||
## common stuff
|
||||
|
||||
INSTALL = copy
|
||||
|
||||
CFLAGS = -I. -DHAVE_CONFIG_H
|
||||
|
||||
sub-pixops :
|
||||
cd pixops
|
||||
nmake -f makefile.msc
|
||||
@@ -146,6 +140,8 @@ lib$(PACKAGE)-$(PKG_VER)-0.dll : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
|
||||
$(CC) $(CFLAGS) -LD -Fe$@ $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib ole32.lib wsock32.lib $(PACKAGE).res \
|
||||
$(LDFLAGS) /implib:$(PACKAGE)-$(PKG_VER).lib /def:$(PACKAGE).def
|
||||
|
||||
PKG_CFLAGS = $(INCLUDES) $(DEFINES)
|
||||
|
||||
make-inline-pixbuf.exe : make-inline-pixbuf.c
|
||||
$(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
|
||||
|
||||
@@ -183,9 +179,6 @@ gdk-pixbuf-enum-types.obj : gdk-pixbuf-enum-types.c gdk-pixbuf-enum-types.h
|
||||
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
|
||||
copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
|
||||
|
||||
.c.obj :
|
||||
$(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
|
||||
|
||||
clean::
|
||||
del config.h
|
||||
del gdk-pixbuf-marshal.h
|
||||
|
||||
+22
-16
@@ -230,27 +230,33 @@ int main (int argc, char **argv)
|
||||
* subdirectory of the installation directory, or in
|
||||
* the installation directory itself.
|
||||
*/
|
||||
if (G_WIN32_HAVE_WIDECHAR_API ()) {
|
||||
wchar_t fn[1000];
|
||||
GetModuleFileNameW (NULL, fn, G_N_ELEMENTS (fn));
|
||||
runtime_prefix = g_utf16_to_utf8 (fn, -1, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
char fn[1000];
|
||||
GetModuleFileNameA (NULL, fn, G_N_ELEMENTS (fn));
|
||||
runtime_prefix = g_locale_to_utf8 (fn, -1, NULL, NULL, NULL);
|
||||
}
|
||||
wchar_t fn[1000];
|
||||
GetModuleFileNameW (NULL, fn, G_N_ELEMENTS (fn));
|
||||
runtime_prefix = g_utf16_to_utf8 (fn, -1, NULL, NULL, NULL);
|
||||
slash = strrchr (runtime_prefix, '\\');
|
||||
*slash = '\0';
|
||||
slash = strrchr (runtime_prefix, '\\');
|
||||
if (slash != NULL && g_ascii_strcasecmp (slash + 1, "bin") == 0) {
|
||||
*slash = '\0';
|
||||
/* If running from some weird location, or from the
|
||||
* build directory (either in the .libs folder where
|
||||
* libtool places the real executable when using a
|
||||
* wrapper, or directly from the gdk-pixbuf folder),
|
||||
* use the compile-time libdir.
|
||||
*/
|
||||
if (slash == NULL ||
|
||||
g_ascii_strcasecmp (slash + 1, ".libs") == 0 ||
|
||||
g_ascii_strcasecmp (slash + 1, "gdk-pixbuf") == 0) {
|
||||
libdir = PIXBUF_LIBDIR;
|
||||
}
|
||||
else {
|
||||
if (slash != NULL && g_ascii_strcasecmp (slash + 1, "bin") == 0) {
|
||||
*slash = '\0';
|
||||
}
|
||||
|
||||
libdir = g_strconcat (runtime_prefix,
|
||||
"/",
|
||||
PIXBUF_LIBDIR + strlen (GTK_PREFIX) + 1,
|
||||
NULL);
|
||||
libdir = g_strconcat (runtime_prefix,
|
||||
"/",
|
||||
PIXBUF_LIBDIR + strlen (GTK_PREFIX) + 1,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
libdir = PIXBUF_LIBDIR;
|
||||
|
||||
+1
-2
@@ -13,6 +13,7 @@ EXTRA_DIST += \
|
||||
gdk.def \
|
||||
gdkmarshalers.list \
|
||||
gdkmedialib.h \
|
||||
gdkwindowimpl.h \
|
||||
makeenums.pl \
|
||||
makefile.msc \
|
||||
gdk.symbols \
|
||||
@@ -97,8 +98,6 @@ gdk_built_public_sources = \
|
||||
gdkenumtypes.h
|
||||
|
||||
gdk_built_private_headers = \
|
||||
gdkprivate.h \
|
||||
gdkwindowimpl.h \
|
||||
gdkalias.h
|
||||
|
||||
gdk_c_sources = \
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
|
||||
#include <directfb_version.h>
|
||||
|
||||
#if DIRECTFB_MAJOR_VERSION < 1
|
||||
#define u32 __u32
|
||||
#define u8 __u8
|
||||
#endif
|
||||
|
||||
static struct {
|
||||
const guchar *bits;
|
||||
|
||||
@@ -80,10 +80,8 @@ GdkVisual * gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format
|
||||
IDirectFBWindow *gdk_directfb_window_lookup(GdkWindow *window);
|
||||
IDirectFBSurface *gdk_directfb_surface_lookup(GdkWindow *window);
|
||||
|
||||
#if (DIRECTFB_MAJOR_VERSION >= 1)
|
||||
GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
|
||||
IDirectFBSurface *subsurface);
|
||||
#endif
|
||||
IDirectFBSurface *subsurface);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -32,28 +32,23 @@
|
||||
#include "gdkprivate-directfb.h"
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkdisplaymanager.h"
|
||||
#include "gdkintl.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
|
||||
|
||||
extern void _gdk_visual_init (void);
|
||||
extern void _gdk_events_init (void);
|
||||
extern void _gdk_input_init (void);
|
||||
extern void _gdk_dnd_init (void);
|
||||
extern void _gdk_windowing_window_init (void);
|
||||
extern void _gdk_windowing_image_init (void);
|
||||
extern void _gdk_directfb_keyboard_init (void);
|
||||
extern void _gdk_visual_init (void);
|
||||
extern void _gdk_events_init (void);
|
||||
extern void _gdk_input_init (void);
|
||||
extern void _gdk_dnd_init (void);
|
||||
extern void _gdk_windowing_window_init (void);
|
||||
extern void _gdk_windowing_image_init (void);
|
||||
extern void _gdk_directfb_keyboard_init (void);
|
||||
|
||||
static gboolean gdk_directfb_argb_font = FALSE;
|
||||
static gint gdk_directfb_glyph_surface_cache = 8;
|
||||
static gchar *directfb_args;
|
||||
|
||||
|
||||
const GOptionEntry _gdk_windowing_args[] =
|
||||
{
|
||||
{ "dfb",0,0,G_OPTION_ARG_STRING,&directfb_args,N_("directfb arg"),N_("sdl|system")},
|
||||
{ "dfb-help",0,0,G_OPTION_ARG_NONE, NULL,NULL},
|
||||
{ "disable-aa-fonts",0,0,G_OPTION_ARG_INT,&gdk_directfb_monochrome_fonts,NULL,NULL },
|
||||
{ "argb-font",0,0, G_OPTION_ARG_INT, &gdk_directfb_argb_font,NULL,NULL},
|
||||
{ "transparent-unfocused",0,0, G_OPTION_ARG_INT, &gdk_directfb_apply_focus_opacity,NULL,NULL },
|
||||
@@ -67,43 +62,35 @@ const GOptionEntry _gdk_windowing_args[] =
|
||||
**/
|
||||
GdkDisplay * gdk_display_open (const gchar *display_name)
|
||||
{
|
||||
|
||||
if (_gdk_display) {
|
||||
return GDK_DISPLAY_OBJECT(_gdk_display); /* single display only */
|
||||
}
|
||||
DFBResult ret;
|
||||
IDirectFB *directfb;
|
||||
IDirectFBDisplayLayer *layer;
|
||||
IDirectFBInputDevice *keyboard;
|
||||
DFBResult ret;
|
||||
|
||||
int argc=0;
|
||||
char **argv=NULL;
|
||||
int argc = 0;
|
||||
char **argv = NULL;
|
||||
|
||||
#if 0 /* arg hack arg support broken*/
|
||||
if(directfb_args ) {
|
||||
argc=2;
|
||||
argv = (char **)g_malloc(sizeof(char *)*argc);
|
||||
argv[0] = "simple";
|
||||
argv[1] = "--dfb:system=SDL";
|
||||
}
|
||||
#endif
|
||||
if (_gdk_display)
|
||||
{
|
||||
return GDK_DISPLAY_OBJECT(_gdk_display); /* single display only */
|
||||
}
|
||||
|
||||
ret = DirectFBInit (&argc,&argv);
|
||||
if (ret != DFB_OK)
|
||||
{
|
||||
{
|
||||
DirectFBError ("gdk_display_open: DirectFBInit", ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = DirectFBCreate (&directfb);
|
||||
|
||||
ret = DirectFBCreate (&directfb);
|
||||
if (ret != DFB_OK)
|
||||
{
|
||||
DirectFBError ("gdk_display_open: DirectFBCreate", ret);
|
||||
return NULL;
|
||||
}
|
||||
_gdk_display = g_object_new(GDK_TYPE_DISPLAY_DFB,NULL);
|
||||
_gdk_display->directfb=directfb;
|
||||
|
||||
_gdk_display = g_object_new (GDK_TYPE_DISPLAY_DFB, NULL);
|
||||
_gdk_display->directfb = directfb;
|
||||
|
||||
ret = directfb->GetDisplayLayer (directfb, DLID_PRIMARY, &layer);
|
||||
if (ret != DFB_OK)
|
||||
@@ -130,11 +117,10 @@ GdkDisplay * gdk_display_open (const gchar *display_name)
|
||||
_gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
|
||||
|
||||
_gdk_visual_init ();
|
||||
_gdk_windowing_window_init ();
|
||||
|
||||
gdk_screen_set_default_colormap (_gdk_screen,
|
||||
gdk_screen_get_system_colormap (_gdk_screen));
|
||||
_gdk_windowing_window_init ();
|
||||
_gdk_windowing_image_init ();
|
||||
gdk_screen_get_system_colormap (_gdk_screen)); _gdk_windowing_image_init ();
|
||||
|
||||
_gdk_input_init ();
|
||||
_gdk_dnd_init ();
|
||||
|
||||
@@ -162,24 +162,22 @@ dfb_events_process_window_event (DFBWindowEvent *event)
|
||||
|
||||
static gboolean
|
||||
gdk_event_send_client_message_by_window (GdkEvent *event,
|
||||
GdkWindow *window)
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkEvent *new_event;
|
||||
DFBUserEvent evt;
|
||||
|
||||
g_return_val_if_fail(event != NULL, FALSE);
|
||||
g_return_val_if_fail(GDK_IS_WINDOW(window), FALSE);
|
||||
|
||||
new_event = gdk_directfb_event_make (window, GDK_CLIENT_EVENT);
|
||||
new_event->client.message_type = event->client.message_type;
|
||||
new_event->client.data_format = event->client.data_format;
|
||||
memcpy(&new_event->client.data,
|
||||
&event->client.data,
|
||||
sizeof(event->client.data));
|
||||
evt.clazz = DFEC_USER;
|
||||
evt.type = GPOINTER_TO_UINT (GDK_ATOM_TO_POINTER (event->client.message_type));
|
||||
evt.data = (void *) event->client.data.l[0];
|
||||
|
||||
_gdk_display->buffer->PostEvent(_gdk_display->buffer, DFB_EVENT (&evt));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dfb_events_dispatch (void)
|
||||
{
|
||||
@@ -230,6 +228,32 @@ dfb_events_io_func (GIOChannel *channel,
|
||||
else
|
||||
dfb_events_process_window_event (&event->window);
|
||||
break;
|
||||
|
||||
case DFEC_USER:
|
||||
{
|
||||
GList *list;
|
||||
|
||||
GDK_NOTE (EVENTS, g_print (" client_message"));
|
||||
|
||||
for (list = client_filters; list; list = list->next)
|
||||
{
|
||||
GdkClientFilter *filter = list->data;
|
||||
DFBUserEvent *user_event = (DFBUserEvent *) event;
|
||||
GdkAtom type;
|
||||
|
||||
type = GDK_POINTER_TO_ATOM (GUINT_TO_POINTER (user_event->type));
|
||||
|
||||
if (filter->type == type)
|
||||
{
|
||||
if (filter->function (user_event,
|
||||
NULL,
|
||||
filter->data) != GDK_FILTER_CONTINUE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -395,7 +419,6 @@ gdk_directfb_event_windows_add (GdkWindow *window)
|
||||
impl->window->CreateEventBuffer (impl->window, &EventBuffer);
|
||||
}
|
||||
|
||||
#if (DIRECTFB_MAJOR_VERSION >= 1)
|
||||
void
|
||||
gdk_directfb_event_windows_remove (GdkWindow *window)
|
||||
{
|
||||
@@ -412,7 +435,6 @@ gdk_directfb_event_windows_remove (GdkWindow *window)
|
||||
impl->window->DetachEventBuffer (impl->window, EventBuffer);
|
||||
/* FIXME: should we warn if (! EventBuffer) ? */
|
||||
}
|
||||
#endif
|
||||
|
||||
GdkWindow *
|
||||
gdk_directfb_child_at (GdkWindow *window,
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
|
||||
|
||||
void
|
||||
_gdk_windowing_window_get_offsets (GdkWindow *window,
|
||||
gint *x_offset,
|
||||
gint *y_offset)
|
||||
_gdk_directfb_window_get_offsets (GdkWindow *window,
|
||||
gint *x_offset,
|
||||
gint *y_offset)
|
||||
{
|
||||
if (x_offset)
|
||||
*x_offset = 0;
|
||||
@@ -69,9 +69,9 @@ _gdk_windowing_window_queue_antiexpose (GdkWindow *window,
|
||||
* brings in from offscreen areas are invalidated.
|
||||
**/
|
||||
void
|
||||
gdk_window_scroll (GdkWindow *window,
|
||||
gint dx,
|
||||
gint dy)
|
||||
_gdk_directfb_window_scroll (GdkWindow *window,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
@@ -161,10 +161,10 @@ gdk_window_scroll (GdkWindow *window,
|
||||
* Since: 2.8
|
||||
**/
|
||||
void
|
||||
gdk_window_move_region (GdkWindow *window,
|
||||
const GdkRegion *region,
|
||||
gint dx,
|
||||
gint dy)
|
||||
_gdk_directfb_window_move_region (GdkWindow *window,
|
||||
const GdkRegion *region,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
|
||||
@@ -1629,28 +1629,7 @@ gdk_directfb_translate_key (DFBInputDeviceKeyIdentifier key_id,
|
||||
break;
|
||||
|
||||
case DIKT_DEAD:
|
||||
switch (key_symbol)
|
||||
{
|
||||
case DIKS_DEAD_ABOVEDOT: keyval = GDK_dead_abovedot; break;
|
||||
case DIKS_DEAD_ABOVERING: keyval = GDK_dead_abovering; break;
|
||||
case DIKS_DEAD_ACUTE: keyval = GDK_dead_acute; break;
|
||||
case DIKS_DEAD_BREVE: keyval = GDK_dead_breve; break;
|
||||
case DIKS_DEAD_CARON: keyval = GDK_dead_caron; break;
|
||||
case DIKS_DEAD_CEDILLA: keyval = GDK_dead_cedilla; break;
|
||||
case DIKS_DEAD_CIRCUMFLEX: keyval = GDK_dead_circumflex; break;
|
||||
case DIKS_DEAD_DIAERESIS: keyval = GDK_dead_diaeresis; break;
|
||||
case DIKS_DEAD_DOUBLEACUTE: keyval = GDK_dead_doubleacute; break;
|
||||
case DIKS_DEAD_GRAVE: keyval = GDK_dead_grave; break;
|
||||
case DIKS_DEAD_IOTA: keyval = GDK_dead_iota; break;
|
||||
case DIKS_DEAD_MACRON: keyval = GDK_dead_macron; break;
|
||||
case DIKS_DEAD_OGONEK: keyval = GDK_dead_ogonek; break;
|
||||
case DIKS_DEAD_SEMIVOICED_SOUND:
|
||||
keyval = GDK_dead_semivoiced_sound; break;
|
||||
case DIKS_DEAD_TILDE: keyval = GDK_dead_tilde; break;
|
||||
case DIKS_DEAD_VOICED_SOUND: keyval = GDK_dead_voiced_sound; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* dead keys are handled directly by directfb */
|
||||
break;
|
||||
|
||||
case DIKT_CUSTOM:
|
||||
|
||||
@@ -172,6 +172,17 @@ void gdk_directfb_window_id_table_insert (DFBWindowID dfb_id,
|
||||
void gdk_directfb_window_id_table_remove (DFBWindowID dfb_id);
|
||||
GdkWindow * gdk_directfb_window_id_table_lookup (DFBWindowID dfb_id);
|
||||
|
||||
void _gdk_directfb_window_get_offsets (GdkWindow *window,
|
||||
gint *x_offset,
|
||||
gint *y_offset);
|
||||
void _gdk_directfb_window_scroll (GdkWindow *window,
|
||||
gint dx,
|
||||
gint dy);
|
||||
void _gdk_directfb_window_move_region (GdkWindow *window,
|
||||
const GdkRegion *region,
|
||||
gint dx,
|
||||
gint dy);
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -228,10 +239,8 @@ GdkImage* _gdk_directfb_copy_to_image (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
void gdk_directfb_event_windows_add (GdkWindow *window);
|
||||
#if (DIRECTFB_MAJOR_VERSION >= 1)
|
||||
void gdk_directfb_event_windows_add (GdkWindow *window);
|
||||
void gdk_directfb_event_windows_remove (GdkWindow *window);
|
||||
#endif
|
||||
|
||||
GdkGrabStatus gdk_directfb_keyboard_grab (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
|
||||
+249
-264
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "gdk.h"
|
||||
#include "gdkwindowimpl.h"
|
||||
#include "gdkwindow.h"
|
||||
|
||||
#include "gdkdirectfb.h"
|
||||
@@ -67,6 +68,9 @@ static void gdk_window_impl_directfb_init (GdkWindowImplDirectFB *win
|
||||
static void gdk_window_impl_directfb_class_init (GdkWindowImplDirectFBClass *klass);
|
||||
static void gdk_window_impl_directfb_finalize (GObject *object);
|
||||
|
||||
static void gdk_window_impl_iface_init (GdkWindowImplIface *iface);
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GdkWindowChildChanged changed;
|
||||
@@ -98,9 +102,11 @@ gdk_window_directfb_process_all_updates (void)
|
||||
tmp_list = old_update_windows;
|
||||
while (tmp_list)
|
||||
{
|
||||
GdkWindowObject *private = GDK_WINDOW_OBJECT( tmp_list->data );
|
||||
GdkWindowImplDirectFB *wimpl = GDK_WINDOW_IMPL_DIRECTFB( private->impl );
|
||||
|
||||
GdkWindowObject *private = GDK_WINDOW_OBJECT( tmp_list->data );
|
||||
#ifdef DIRECT_ENABLE_DEBUG
|
||||
GdkWindowImplDirectFB *wimpl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
#endif
|
||||
|
||||
if (private->update_freeze_count)
|
||||
{
|
||||
D_DEBUG_AT( GDKDFB_Updates, " -> %p frozen [%4d,%4d-%4dx%4d] (%d boxes)\n",
|
||||
@@ -115,7 +121,7 @@ gdk_window_directfb_process_all_updates (void)
|
||||
wimpl->flips.num_regions );
|
||||
gdk_window_process_updates(tmp_list->data,TRUE);
|
||||
}
|
||||
|
||||
|
||||
g_object_unref (tmp_list->data);
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
@@ -186,11 +192,8 @@ static GdkWindow *gdk_directfb_window_containing_pointer = NULL;
|
||||
static GdkWindow *gdk_directfb_focused_window = NULL;
|
||||
static gpointer parent_class = NULL;
|
||||
GdkWindow * _gdk_parent_root = NULL;
|
||||
static void
|
||||
gdk_window_impl_directfb_paintable_init (GdkPaintableIface *iface);
|
||||
|
||||
|
||||
|
||||
static void gdk_window_impl_directfb_paintable_init (GdkPaintableIface *iface);
|
||||
|
||||
|
||||
GType
|
||||
@@ -213,20 +216,30 @@ gdk_window_impl_directfb_get_type (void)
|
||||
(GInstanceInitFunc) gdk_window_impl_directfb_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo paintable_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gdk_window_impl_directfb_paintable_init,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
static const GInterfaceInfo paintable_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gdk_window_impl_directfb_paintable_init,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const GInterfaceInfo window_impl_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gdk_window_impl_iface_init,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (GDK_TYPE_DRAWABLE_IMPL_DIRECTFB,
|
||||
"GdkWindowImplDirectFB",
|
||||
&object_info, 0);
|
||||
g_type_add_interface_static (object_type,
|
||||
GDK_TYPE_PAINTABLE,
|
||||
&paintable_info);
|
||||
g_type_add_interface_static (object_type,
|
||||
GDK_TYPE_PAINTABLE,
|
||||
&paintable_info);
|
||||
|
||||
g_type_add_interface_static (object_type,
|
||||
GDK_TYPE_WINDOW_IMPL,
|
||||
&window_impl_info);
|
||||
}
|
||||
|
||||
return object_type;
|
||||
@@ -401,11 +414,11 @@ _gdk_windowing_window_init (void)
|
||||
|
||||
g_assert (_gdk_parent_root == NULL);
|
||||
|
||||
_gdk_display->layer->GetConfiguration(
|
||||
_gdk_display->layer, &dlc );
|
||||
_gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc);
|
||||
|
||||
_gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL);
|
||||
private = GDK_WINDOW_OBJECT (_gdk_parent_root);
|
||||
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
private->window_type = GDK_WINDOW_ROOT;
|
||||
@@ -475,6 +488,7 @@ gdk_directfb_window_new (GdkWindow *parent,
|
||||
|
||||
window = g_object_new (GDK_TYPE_WINDOW, NULL);
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
|
||||
|
||||
parent_private = GDK_WINDOW_OBJECT (parent);
|
||||
parent_impl = GDK_WINDOW_IMPL_DIRECTFB (parent_private->impl);
|
||||
@@ -647,8 +661,8 @@ gdk_directfb_window_new (GdkWindow *parent,
|
||||
|
||||
GdkWindow *
|
||||
_gdk_window_new (GdkWindow *parent,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask)
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask)
|
||||
{
|
||||
g_return_val_if_fail (attributes != NULL, NULL);
|
||||
|
||||
@@ -685,9 +699,8 @@ _gdk_windowing_window_destroy (GdkWindow *window,
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
_gdk_selection_window_destroyed (window);
|
||||
#if (DIRECTFB_MAJOR_VERSION >= 1)
|
||||
gdk_directfb_event_windows_remove (window);
|
||||
#endif
|
||||
|
||||
if (window == _gdk_directfb_pointer_grab_window)
|
||||
gdk_pointer_ungrab (GDK_CURRENT_TIME);
|
||||
if (window == _gdk_directfb_keyboard_grab_window)
|
||||
@@ -1230,28 +1243,19 @@ show_window_internal (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_show_unraised (GdkWindow *window)
|
||||
static void
|
||||
gdk_directfb_window_show (GdkWindow *window,
|
||||
gboolean raise)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
show_window_internal (window, FALSE);
|
||||
show_window_internal (window, raise);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_show (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
show_window_internal (window, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_hide (GdkWindow *window)
|
||||
static void
|
||||
gdk_directfb_window_hide (GdkWindow *window)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplDirectFB *impl;
|
||||
@@ -1276,11 +1280,11 @@ gdk_window_hide (GdkWindow *window)
|
||||
|
||||
if (!private->input_only && private->parent)
|
||||
{
|
||||
_gdk_windowing_window_clear_area (GDK_WINDOW (private->parent),
|
||||
private->x,
|
||||
private->y,
|
||||
impl->drawable.width,
|
||||
impl->drawable.height);
|
||||
gdk_window_clear_area (GDK_WINDOW (private->parent),
|
||||
private->x,
|
||||
private->y,
|
||||
impl->drawable.width,
|
||||
impl->drawable.height);
|
||||
}
|
||||
|
||||
event_win = gdk_directfb_other_event_window (window, GDK_UNMAP);
|
||||
@@ -1299,8 +1303,8 @@ gdk_window_hide (GdkWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_withdraw (GdkWindow *window)
|
||||
static void
|
||||
gdk_directfb_window_withdraw (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@@ -1308,80 +1312,6 @@ gdk_window_withdraw (GdkWindow *window)
|
||||
gdk_window_hide (window);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_move (GdkWindow *window,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
if (impl->window)
|
||||
{
|
||||
private->x = x;
|
||||
private->y = y;
|
||||
impl->window->MoveTo (impl->window, x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
gint width=impl->drawable.width;
|
||||
gint height=impl->drawable.height;
|
||||
GdkRectangle old =
|
||||
{ private->x, private->y,width,height };
|
||||
|
||||
_gdk_directfb_move_resize_child (window, x, y, width, height);
|
||||
_gdk_directfb_calc_abs (window);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (private))
|
||||
{
|
||||
GdkWindow *mousewin;
|
||||
GdkRectangle new = { x, y, width, height };
|
||||
|
||||
gdk_rectangle_union (&new, &old, &new);
|
||||
gdk_window_invalidate_rect (GDK_WINDOW (private->parent), &new,TRUE);
|
||||
|
||||
/* The window the pointer is in might have changed */
|
||||
mousewin = gdk_window_at_pointer (NULL, NULL);
|
||||
gdk_directfb_window_send_crossing_events (NULL, mousewin,
|
||||
GDK_CROSSING_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_resize (GdkWindow *window,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
gint x, y;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
|
||||
x = private->x;
|
||||
y = private->y;
|
||||
|
||||
if (private->parent && (private->parent->window_type != GDK_WINDOW_CHILD))
|
||||
{
|
||||
GdkWindowChildHandlerData *data;
|
||||
|
||||
data = g_object_get_data (G_OBJECT (private->parent),
|
||||
"gdk-window-child-handler");
|
||||
|
||||
if (data)
|
||||
(*data->get_pos) (window, &x, &y, data->user_data);
|
||||
}
|
||||
|
||||
gdk_window_move_resize (window, x, y, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_directfb_move_resize_child (GdkWindow *window,
|
||||
gint x,
|
||||
@@ -1407,15 +1337,17 @@ _gdk_directfb_move_resize_child (GdkWindow *window,
|
||||
|
||||
if (!private->input_only)
|
||||
{
|
||||
if (impl->drawable.surface) {
|
||||
GdkDrawableImplDirectFB *dimpl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
|
||||
if(dimpl->cairo_surface) {
|
||||
cairo_surface_destroy(dimpl->cairo_surface);
|
||||
dimpl->cairo_surface= NULL;
|
||||
}
|
||||
impl->drawable.surface->Release (impl->drawable.surface);
|
||||
impl->drawable.surface = NULL;
|
||||
}
|
||||
if (impl->drawable.surface)
|
||||
{
|
||||
if (impl->drawable.cairo_surface)
|
||||
{
|
||||
cairo_surface_destroy (impl->drawable.cairo_surface);
|
||||
impl->drawable.cairo_surface = NULL;
|
||||
}
|
||||
|
||||
impl->drawable.surface->Release (impl->drawable.surface);
|
||||
impl->drawable.surface = NULL;
|
||||
}
|
||||
|
||||
parent_impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (private->parent)->impl);
|
||||
|
||||
@@ -1432,19 +1364,66 @@ _gdk_directfb_move_resize_child (GdkWindow *window,
|
||||
for (list = private->children; list; list = list->next)
|
||||
{
|
||||
private = GDK_WINDOW_OBJECT (list->data);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
_gdk_directfb_move_resize_child (list->data,
|
||||
private->x, private->y,
|
||||
impl->drawable.width, impl->drawable.height);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_move_resize (GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
static void
|
||||
gdk_directfb_window_move (GdkWindow *window,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
if (impl->window)
|
||||
{
|
||||
private->x = x;
|
||||
private->y = y;
|
||||
impl->window->MoveTo (impl->window, x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
gint width=impl->drawable.width;
|
||||
gint height=impl->drawable.height;
|
||||
GdkRectangle old =
|
||||
{ private->x, private->y,width,height };
|
||||
|
||||
_gdk_directfb_move_resize_child (window, x, y, width, height);
|
||||
_gdk_directfb_calc_abs (window);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (private))
|
||||
{
|
||||
GdkWindow *mousewin;
|
||||
GdkRectangle new = { x, y, width, height };
|
||||
|
||||
gdk_rectangle_union (&new, &old, &new);
|
||||
gdk_window_invalidate_rect (GDK_WINDOW (private->parent), &new,TRUE);
|
||||
|
||||
/* The window the pointer is in might have changed */
|
||||
mousewin = gdk_window_at_pointer (NULL, NULL);
|
||||
gdk_directfb_window_send_crossing_events (NULL, mousewin,
|
||||
GDK_CROSSING_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_directfb_window_move_resize (GdkWindow *window,
|
||||
gboolean with_move,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplDirectFB *impl;
|
||||
@@ -1454,8 +1433,14 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
if (with_move && (width < 0 && height < 0))
|
||||
{
|
||||
gdk_directfb_window_move (window, x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
width = 1;
|
||||
if (height < 1)
|
||||
height = 1;
|
||||
|
||||
@@ -1478,26 +1463,39 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
|
||||
if (impl->drawable.width == width && impl->drawable.height == height)
|
||||
{
|
||||
gdk_window_move (window, x, y);
|
||||
if (with_move)
|
||||
gdk_directfb_window_move (window, x, y);
|
||||
}
|
||||
else if (impl->window)
|
||||
{
|
||||
private->x = x;
|
||||
private->y = y;
|
||||
impl->window->MoveTo (impl->window, x, y);
|
||||
private->x = x;
|
||||
private->y = y;
|
||||
impl->drawable.width = width;
|
||||
impl->drawable.height = height;
|
||||
|
||||
if (with_move)
|
||||
impl->window->MoveTo (impl->window, x, y);
|
||||
impl->window->Resize (impl->window, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkRectangle old =
|
||||
{ private->x, private->y, impl->drawable.width, impl->drawable.height };
|
||||
_gdk_directfb_move_resize_child (window, x, y, width, height);
|
||||
GdkRectangle old = { private->x, private->y,
|
||||
impl->drawable.width, impl->drawable.height };
|
||||
GdkRectangle new = { x, y, width, height };
|
||||
|
||||
if (! with_move)
|
||||
{
|
||||
new.x = private->x;
|
||||
new.y = private->y;
|
||||
}
|
||||
|
||||
_gdk_directfb_move_resize_child (window,
|
||||
new.x, new.y, new.width, new.height);
|
||||
_gdk_directfb_calc_abs (window);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (private))
|
||||
{
|
||||
GdkWindow *mousewin;
|
||||
GdkRectangle new = { x, y, width, height };
|
||||
GdkWindow *mousewin;
|
||||
|
||||
gdk_rectangle_union (&new, &old, &new);
|
||||
gdk_window_invalidate_rect (GDK_WINDOW (private->parent), &new,TRUE);
|
||||
@@ -1510,11 +1508,11 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_window_reparent (GdkWindow *window,
|
||||
GdkWindow *new_parent,
|
||||
gint x,
|
||||
gint y)
|
||||
static gboolean
|
||||
gdk_directfb_window_reparent (GdkWindow *window,
|
||||
GdkWindow *new_parent,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GdkWindowObject *window_private;
|
||||
GdkWindowObject *parent_private;
|
||||
@@ -1523,10 +1521,10 @@ _gdk_window_reparent (GdkWindow *window,
|
||||
GdkWindowImplDirectFB *parent_impl;
|
||||
GdkVisual *visual;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (!new_parent)
|
||||
new_parent = _gdk_parent_root;
|
||||
@@ -1539,7 +1537,7 @@ _gdk_window_reparent (GdkWindow *window,
|
||||
|
||||
/* already parented */
|
||||
if( window_private->parent == (GdkWindowObject *)new_parent )
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
window_private->parent = (GdkWindowObject *) new_parent;
|
||||
|
||||
@@ -1593,7 +1591,7 @@ _gdk_window_reparent (GdkWindow *window,
|
||||
{
|
||||
g_assert(0);
|
||||
_gdk_window_destroy (window, FALSE);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
/* we hold a reference count on ourselves */
|
||||
g_object_ref (window);
|
||||
@@ -1609,14 +1607,17 @@ _gdk_window_reparent (GdkWindow *window,
|
||||
&rect,
|
||||
&impl->drawable.surface);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_windowing_window_clear_area (GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
static void
|
||||
gdk_directfb_window_clear_area (GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean send_expose)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
@@ -1700,51 +1701,8 @@ _gdk_windowing_window_clear_area (GdkWindow *window,
|
||||
g_object_unref (gc);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_windowing_window_clear_area_e (GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %4d,%4d-%4dx%4d )\n", __FUNCTION__, window, x, y, width, height );
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
|
||||
/**
|
||||
Follow XClearArea definition for zero height width
|
||||
**/
|
||||
if( width == 0 )
|
||||
width = impl->drawable.width-x;
|
||||
if( height == 0 )
|
||||
height = impl->drawable.height-y;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window)) {
|
||||
D_DEBUG_AT( GDKDFB_Window, " -> DESTROYED!\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
_gdk_windowing_window_clear_area (window, x, y, width, height);
|
||||
|
||||
gdk_window_invalidate_rect (window, &rect, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_raise (GdkWindow *window)
|
||||
static void
|
||||
gdk_window_directfb_raise (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
@@ -1774,8 +1732,8 @@ gdk_window_raise (GdkWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_lower (GdkWindow *window)
|
||||
static void
|
||||
gdk_window_directfb_lower (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
@@ -1875,9 +1833,9 @@ gdk_window_set_role (GdkWindow *window,
|
||||
* Since: 2.12
|
||||
*
|
||||
**/
|
||||
void
|
||||
void
|
||||
gdk_window_set_startup_id (GdkWindow *window,
|
||||
const gchar *startup_id)
|
||||
const gchar *startup_id)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1907,9 +1865,9 @@ gdk_window_set_transient_for (GdkWindow *window,
|
||||
root->children = g_list_insert (root->children, window, i);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_background (GdkWindow *window,
|
||||
const GdkColor *color)
|
||||
static void
|
||||
gdk_directfb_window_set_background (GdkWindow *window,
|
||||
const GdkColor *color)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
|
||||
@@ -1930,10 +1888,10 @@ gdk_window_set_background (GdkWindow *window,
|
||||
private->bg_pixmap = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_back_pixmap (GdkWindow *window,
|
||||
GdkPixmap *pixmap,
|
||||
gint parent_relative)
|
||||
static void
|
||||
gdk_directfb_window_set_back_pixmap (GdkWindow *window,
|
||||
GdkPixmap *pixmap,
|
||||
gboolean parent_relative)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkPixmap *old_pixmap;
|
||||
@@ -1972,9 +1930,9 @@ gdk_window_set_back_pixmap (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_cursor (GdkWindow *window,
|
||||
GdkCursor *cursor)
|
||||
static void
|
||||
gdk_directfb_window_set_cursor (GdkWindow *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
GdkWindowImplDirectFB *impl;
|
||||
GdkCursor *old_cursor;
|
||||
@@ -2011,13 +1969,13 @@ gdk_window_set_cursor (GdkWindow *window,
|
||||
gdk_cursor_unref (old_cursor);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_get_geometry (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height,
|
||||
gint *depth)
|
||||
static void
|
||||
gdk_directfb_window_get_geometry (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height,
|
||||
gint *depth)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
@@ -2078,10 +2036,10 @@ _gdk_directfb_calc_abs (GdkWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_window_get_origin (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y)
|
||||
static gboolean
|
||||
gdk_directfb_window_get_origin (GdkWindow *window,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
@@ -2215,8 +2173,8 @@ _gdk_windowing_window_get_pointer (display,
|
||||
|
||||
}
|
||||
|
||||
GdkEventMask
|
||||
gdk_window_get_events (GdkWindow *window)
|
||||
static GdkEventMask
|
||||
gdk_directfb_window_get_events (GdkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
||||
|
||||
@@ -2226,9 +2184,9 @@ gdk_window_get_events (GdkWindow *window)
|
||||
return GDK_WINDOW_OBJECT (window)->event_mask;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_events (GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
static void
|
||||
gdk_directfb_window_set_events (GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@@ -2240,27 +2198,27 @@ gdk_window_set_events (GdkWindow *window,
|
||||
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_shape_combine_mask (GdkWindow *window,
|
||||
GdkBitmap *mask,
|
||||
gint x,
|
||||
gint y)
|
||||
static void
|
||||
gdk_directfb_window_shape_combine_mask (GdkWindow *window,
|
||||
GdkBitmap *mask,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_input_shape_combine_mask (GdkWindow *window,
|
||||
GdkBitmap *mask,
|
||||
gint x,
|
||||
gint y)
|
||||
GdkBitmap *mask,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_shape_combine_region (GdkWindow *window,
|
||||
const GdkRegion *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y)
|
||||
static void
|
||||
gdk_directfb_window_shape_combine_region (GdkWindow *window,
|
||||
const GdkRegion *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2584,13 +2542,13 @@ gdk_window_set_functions (GdkWindow *window,
|
||||
g_message("unimplemented %s", __FUNCTION__);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_child_shapes (GdkWindow *window)
|
||||
static void
|
||||
gdk_directfb_window_set_child_shapes (GdkWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_merge_child_shapes (GdkWindow *window)
|
||||
static void
|
||||
gdk_directfb_window_merge_child_shapes (GdkWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2604,9 +2562,9 @@ gdk_window_merge_child_input_shapes (GdkWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
static gboolean
|
||||
gdk_directfb_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
@@ -2693,9 +2651,8 @@ gdk_window_get_frame_extents (GdkWindow *window,
|
||||
* Given a directfb window and a subsurface of that window
|
||||
* create a gdkwindow child wrapper
|
||||
*/
|
||||
#if (DIRECTFB_MAJOR_VERSION >= 1)
|
||||
GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
|
||||
IDirectFBSurface *subsurface)
|
||||
IDirectFBSurface *subsurface)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindowObject *private;
|
||||
@@ -2708,6 +2665,7 @@ GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
|
||||
|
||||
window = g_object_new (GDK_TYPE_WINDOW, NULL);
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
|
||||
parent_private = GDK_WINDOW_OBJECT (parent);
|
||||
parent_impl = GDK_WINDOW_IMPL_DIRECTFB (parent_private->impl);
|
||||
private->parent = parent_private;
|
||||
@@ -2739,7 +2697,6 @@ GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
|
||||
return window;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The wrapping is not perfect since directfb does not give full access
|
||||
@@ -2787,6 +2744,7 @@ gdk_window_foreign_new_for_display (GdkDisplay* display,GdkNativeWindow anid)
|
||||
/* we hold a reference count on ourselves */
|
||||
g_object_ref (window);
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
|
||||
private->parent = parent_private;
|
||||
private->window_type = GDK_WINDOW_TOPLEVEL;
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
@@ -3153,11 +3111,11 @@ gdk_window_impl_directfb_begin_paint_region (GdkPaintable *paintable,
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, " -> [%2d] %4d,%4d-%4dx%4d\n", i, GDKDFB_RECTANGLE_VALS_FROM_BOX( box ) );
|
||||
|
||||
_gdk_windowing_window_clear_area (GDK_WINDOW(wimpl->gdkWindow),
|
||||
box->x1,
|
||||
box->y1,
|
||||
box->x2 - box->x1,
|
||||
box->y2 - box->y1);
|
||||
gdk_window_clear_area (GDK_WINDOW(wimpl->gdkWindow),
|
||||
box->x1,
|
||||
box->y1,
|
||||
box->x2 - box->x1,
|
||||
box->y2 - box->y1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3259,7 +3217,7 @@ gdk_window_set_opacity (GdkWindow *window,
|
||||
{
|
||||
GdkDisplay *display;
|
||||
guint8 cardinal;
|
||||
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -3281,6 +3239,33 @@ _gdk_windowing_window_set_composited (GdkWindow *window,
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_impl_iface_init (GdkWindowImplIface *iface)
|
||||
{
|
||||
iface->show = gdk_directfb_window_show;
|
||||
iface->hide = gdk_directfb_window_hide;
|
||||
iface->withdraw = gdk_directfb_window_withdraw;
|
||||
iface->raise = gdk_window_directfb_raise;
|
||||
iface->lower = gdk_window_directfb_lower;
|
||||
iface->move_resize = gdk_directfb_window_move_resize;
|
||||
iface->move_region = _gdk_directfb_window_move_region;
|
||||
iface->scroll = _gdk_directfb_window_scroll;
|
||||
iface->clear_area = gdk_directfb_window_clear_area;
|
||||
iface->set_background = gdk_directfb_window_set_background;
|
||||
iface->set_back_pixmap = gdk_directfb_window_set_back_pixmap;
|
||||
iface->get_events = gdk_directfb_window_get_events;
|
||||
iface->set_events = gdk_directfb_window_set_events;
|
||||
iface->reparent = gdk_directfb_window_reparent;
|
||||
iface->set_cursor = gdk_directfb_window_set_cursor;
|
||||
iface->get_geometry = gdk_directfb_window_get_geometry;
|
||||
iface->get_origin = gdk_directfb_window_get_origin;
|
||||
iface->get_offsets = _gdk_directfb_window_get_offsets;
|
||||
iface->shape_combine_mask = gdk_directfb_window_shape_combine_mask;
|
||||
iface->shape_combine_region = gdk_directfb_window_shape_combine_region;
|
||||
iface->set_child_shapes = gdk_directfb_window_set_child_shapes;
|
||||
iface->merge_child_shapes = gdk_directfb_window_merge_child_shapes;
|
||||
iface->set_static_gravities = gdk_directfb_window_set_static_gravities;
|
||||
}
|
||||
|
||||
#define __GDK_WINDOW_X11_C__
|
||||
#include "gdkaliasdef.c"
|
||||
|
||||
@@ -88,20 +88,44 @@ static const int gdk_ndebug_keys = G_N_ELEMENTS (gdk_debug_keys);
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static void
|
||||
gdk_arg_debug_cb (const char *key, const char *value, gpointer user_data)
|
||||
static gboolean
|
||||
gdk_arg_debug_cb (const char *key, const char *value, gpointer user_data, GError **error)
|
||||
{
|
||||
_gdk_debug_flags |= g_parse_debug_string (value,
|
||||
guint debug_value = g_parse_debug_string (value,
|
||||
(GDebugKey *) gdk_debug_keys,
|
||||
gdk_ndebug_keys);
|
||||
|
||||
if (debug_value == 0 && value != NULL && strcmp (value, "") != 0)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
|
||||
"Error parsing option --gdk-debug");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
_gdk_debug_flags |= debug_value;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_arg_no_debug_cb (const char *key, const char *value, gpointer user_data)
|
||||
static gboolean
|
||||
gdk_arg_no_debug_cb (const char *key, const char *value, gpointer user_data, GError **error)
|
||||
{
|
||||
_gdk_debug_flags &= ~g_parse_debug_string (value,
|
||||
(GDebugKey *) gdk_debug_keys,
|
||||
gdk_ndebug_keys);
|
||||
guint debug_value = g_parse_debug_string (value,
|
||||
(GDebugKey *) gdk_debug_keys,
|
||||
gdk_ndebug_keys);
|
||||
|
||||
if (debug_value == 0 && value != NULL && strcmp (value, "") != 0)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
|
||||
"Error parsing option --gdk-no-debug");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
_gdk_debug_flags &= ~debug_value;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
|
||||
#define GDK_TYPE_APP_LAUNCH_CONTEXT (gdk_app_launch_context_get_type ())
|
||||
#define GDK_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContext))
|
||||
#define GDK_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContextClass))
|
||||
#define GDK_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDGDK_TYPE_APP_LAUNCH_CONTEXT))
|
||||
#define GDK_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_APP_LAUNCH_CONTEXT))
|
||||
#define GDK_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDK_TYPE_APP_LAUNCH_CONTEXT))
|
||||
#define GDK_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContextClass))
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ gdk_pointer_grab_info_libgtk_only (GdkDisplay *display,
|
||||
if (owner_events)
|
||||
*owner_events = pointer_grab_owner_events;
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -475,8 +475,6 @@ get_keyboard_modifiers_from_ns_event (NSEvent *nsevent)
|
||||
if (nsflags & NSControlKeyMask)
|
||||
modifiers |= GDK_CONTROL_MASK;
|
||||
if (nsflags & NSCommandKeyMask)
|
||||
modifiers |= GDK_META_MASK;
|
||||
if (nsflags & NSAlternateKeyMask)
|
||||
modifiers |= GDK_MOD1_MASK;
|
||||
|
||||
return modifiers;
|
||||
@@ -1587,7 +1585,7 @@ create_key_event (GdkWindow *window,
|
||||
{
|
||||
case GDK_Meta_R:
|
||||
case GDK_Meta_L:
|
||||
mask = GDK_META_MASK;
|
||||
mask = GDK_MOD1_MASK;
|
||||
break;
|
||||
case GDK_Shift_R:
|
||||
case GDK_Shift_L:
|
||||
@@ -1598,7 +1596,7 @@ create_key_event (GdkWindow *window,
|
||||
break;
|
||||
case GDK_Alt_R:
|
||||
case GDK_Alt_L:
|
||||
mask = GDK_MOD1_MASK;
|
||||
mask = GDK_MOD5_MASK;
|
||||
break;
|
||||
case GDK_Control_R:
|
||||
case GDK_Control_L:
|
||||
|
||||
@@ -1016,12 +1016,13 @@ _gdk_window_new (GdkWindow *parent,
|
||||
content_rect = NSMakeRect (-500 - impl->width, -500 - impl->height,
|
||||
impl->width, impl->height);
|
||||
|
||||
switch (attributes->window_type)
|
||||
if (attributes->window_type == GDK_WINDOW_TEMP ||
|
||||
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
|
||||
{
|
||||
case GDK_WINDOW_TEMP:
|
||||
style_mask = NSBorderlessWindowMask;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
style_mask = (NSTitledWindowMask |
|
||||
NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask |
|
||||
@@ -2733,7 +2734,8 @@ gdk_window_set_decorations (GdkWindow *window,
|
||||
|
||||
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
|
||||
|
||||
if (decorations == 0 || GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
|
||||
if (decorations == 0 || GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN )
|
||||
{
|
||||
new_mask = NSBorderlessWindowMask;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
void
|
||||
_gdk_windowing_set_default_display (GdkDisplay *display)
|
||||
{
|
||||
g_assert (_gdk_display == display);
|
||||
g_assert (display == NULL || _gdk_display == display);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MONITOR_INFO
|
||||
|
||||
+68
-11
@@ -1065,6 +1065,10 @@ local_send_leave (GdkDragContext *context,
|
||||
{
|
||||
GdkEvent tmp_event;
|
||||
|
||||
GDK_NOTE (DND, g_print ("local_send_leave: context=%p current_dest_drag=%p\n",
|
||||
context,
|
||||
current_dest_drag));
|
||||
|
||||
if ((current_dest_drag != NULL) &&
|
||||
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
|
||||
(current_dest_drag->source_window == context->source_window))
|
||||
@@ -1090,6 +1094,10 @@ local_send_enter (GdkDragContext *context,
|
||||
GdkDragContextPrivateWin32 *private;
|
||||
GdkDragContext *new_context;
|
||||
|
||||
GDK_NOTE (DND, g_print ("local_send_enter: context=%p current_dest_drag=%p\n",
|
||||
context,
|
||||
current_dest_drag));
|
||||
|
||||
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
|
||||
|
||||
if (current_dest_drag != NULL)
|
||||
@@ -1134,6 +1142,10 @@ local_send_motion (GdkDragContext *context,
|
||||
{
|
||||
GdkEvent tmp_event;
|
||||
|
||||
GDK_NOTE (DND, g_print ("local_send_motion: context=%p current_dest_drag=%p\n",
|
||||
context,
|
||||
current_dest_drag));
|
||||
|
||||
if ((current_dest_drag != NULL) &&
|
||||
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
|
||||
(current_dest_drag->source_window == context->source_window))
|
||||
@@ -1145,7 +1157,6 @@ local_send_motion (GdkDragContext *context,
|
||||
tmp_event.dnd.time = time;
|
||||
|
||||
current_dest_drag->suggested_action = action;
|
||||
current_dest_drag->actions = current_dest_drag->suggested_action;
|
||||
|
||||
tmp_event.dnd.x_root = x_root;
|
||||
tmp_event.dnd.y_root = y_root;
|
||||
@@ -1164,8 +1175,12 @@ local_send_drop (GdkDragContext *context,
|
||||
guint32 time)
|
||||
{
|
||||
GdkEvent tmp_event;
|
||||
|
||||
if ((current_dest_drag != NULL) &&
|
||||
|
||||
GDK_NOTE (DND, g_print ("local_send_drop: context=%p current_dest_drag=%p\n",
|
||||
context,
|
||||
current_dest_drag));
|
||||
|
||||
if ((current_dest_drag != NULL) &&
|
||||
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
|
||||
(current_dest_drag->source_window == context->source_window))
|
||||
{
|
||||
@@ -1409,11 +1424,35 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
|
||||
g_return_val_if_fail (context != NULL, FALSE);
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drag_motion\n"));
|
||||
context->actions = possible_actions;
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drag_motion: protocol=%s\n"
|
||||
" suggested_action=%s, possible_actions=%s\n"
|
||||
" context=%p:actions=%s, suggested_action=%s, action=%s\n",
|
||||
_gdk_win32_drag_protocol_to_string (protocol),
|
||||
_gdk_win32_drag_action_to_string (suggested_action),
|
||||
_gdk_win32_drag_action_to_string (possible_actions),
|
||||
context,
|
||||
_gdk_win32_drag_action_to_string (context->actions),
|
||||
_gdk_win32_drag_action_to_string (context->suggested_action),
|
||||
_gdk_win32_drag_action_to_string (context->action)));
|
||||
|
||||
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
|
||||
|
||||
if (context->dest_window != dest_window)
|
||||
if (context->dest_window == dest_window)
|
||||
{
|
||||
GdkDragContext *dest_context;
|
||||
|
||||
dest_context = gdk_drag_context_find (FALSE,
|
||||
context->source_window,
|
||||
dest_window);
|
||||
|
||||
if (dest_context)
|
||||
dest_context->actions = context->actions;
|
||||
|
||||
context->suggested_action = suggested_action;
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkEvent temp_event;
|
||||
|
||||
@@ -1461,10 +1500,6 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
|
||||
gdk_event_put (&temp_event);
|
||||
}
|
||||
else
|
||||
{
|
||||
context->suggested_action = suggested_action;
|
||||
}
|
||||
|
||||
/* Send a drag-motion event */
|
||||
|
||||
@@ -1490,9 +1525,23 @@ gdk_drag_motion (GdkDragContext *context,
|
||||
}
|
||||
}
|
||||
else
|
||||
return TRUE;
|
||||
{
|
||||
GDK_NOTE (DND, g_print (" returning TRUE\n"
|
||||
" context=%p:actions=%s, suggested_action=%s, action=%s\n",
|
||||
context,
|
||||
_gdk_win32_drag_action_to_string (context->actions),
|
||||
_gdk_win32_drag_action_to_string (context->suggested_action),
|
||||
_gdk_win32_drag_action_to_string (context->action)));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
GDK_NOTE (DND, g_print (" returning FALSE\n"
|
||||
" context=%p:actions=%s, suggested_action=%s, action=%s\n",
|
||||
context,
|
||||
_gdk_win32_drag_action_to_string (context->actions),
|
||||
_gdk_win32_drag_action_to_string (context->suggested_action),
|
||||
_gdk_win32_drag_action_to_string (context->action)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1548,6 +1597,14 @@ gdk_drag_status (GdkDragContext *context,
|
||||
|
||||
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drag_status: action=%s\n"
|
||||
" context=%p:actions=%s, suggested_action=%s, action=%s\n",
|
||||
_gdk_win32_drag_action_to_string (action),
|
||||
context,
|
||||
_gdk_win32_drag_action_to_string (context->actions),
|
||||
_gdk_win32_drag_action_to_string (context->suggested_action),
|
||||
_gdk_win32_drag_action_to_string (context->action)));
|
||||
|
||||
context->action = action;
|
||||
|
||||
src_context = gdk_drag_context_find (TRUE,
|
||||
@@ -1610,7 +1667,7 @@ gdk_drop_finish (GdkDragContext *context,
|
||||
|
||||
g_return_if_fail (context != NULL);
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drop_finish"));
|
||||
GDK_NOTE (DND, g_print ("gdk_drop_finish\n"));
|
||||
|
||||
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
|
||||
|
||||
|
||||
+310
-43
@@ -292,11 +292,7 @@ _gdk_win32_window_procedure (HWND hwnd,
|
||||
retval = inner_window_procedure (hwnd, message, wparam, lparam);
|
||||
debug_indent -= 2;
|
||||
|
||||
#ifdef _WIN64
|
||||
GDK_NOTE (EVENTS, g_print (" => %I64d%s", retval, (debug_indent == 0 ? "\n" : "")));
|
||||
#else
|
||||
GDK_NOTE (EVENTS, g_print (" => %ld%s", retval, (debug_indent == 0 ? "\n" : "")));
|
||||
#endif
|
||||
GDK_NOTE (EVENTS, g_print (" => %I64d%s", (gint64) retval, (debug_indent == 0 ? "\n" : "")));
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -750,7 +746,7 @@ gdk_display_keyboard_ungrab (GdkDisplay *display,
|
||||
|
||||
g_return_if_fail (display == _gdk_display);
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_keyboard_ungrab\n"));
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_display_keyboard_ungrab\n"));
|
||||
|
||||
if (k_grab_window && !k_grab_owner_events)
|
||||
{
|
||||
@@ -959,6 +955,7 @@ static void
|
||||
print_event (GdkEvent *event)
|
||||
{
|
||||
gchar *escaped, *kvname;
|
||||
gchar *selection_name, *target_name, *property_name;
|
||||
|
||||
g_print ("%s%*s===> ", (debug_indent > 0 ? "\n" : ""), debug_indent, "");
|
||||
switch (event->any.type)
|
||||
@@ -1069,11 +1066,33 @@ print_event (GdkEvent *event)
|
||||
case GDK_FOCUS_CHANGE:
|
||||
g_print ("%s", (event->focus_change.in ? "IN" : "OUT"));
|
||||
break;
|
||||
case GDK_SELECTION_REQUEST:
|
||||
case GDK_SELECTION_NOTIFY:
|
||||
case GDK_SELECTION_CLEAR:
|
||||
selection_name = gdk_atom_name (event->selection.selection);
|
||||
target_name = gdk_atom_name (event->selection.target);
|
||||
property_name = gdk_atom_name (event->selection.property);
|
||||
g_print ("sel:%s tgt:%s prop:%s",
|
||||
selection_name, target_name, property_name);
|
||||
g_free (selection_name);
|
||||
g_free (target_name);
|
||||
g_free (property_name);
|
||||
break;
|
||||
case GDK_CONFIGURE:
|
||||
g_print ("x:%d y:%d w:%d h:%d",
|
||||
event->configure.x, event->configure.y,
|
||||
event->configure.width, event->configure.height);
|
||||
break;
|
||||
case GDK_CLIENT_EVENT:
|
||||
g_print ("%s %d %ld %ld %ld %ld %ld",
|
||||
gdk_atom_name (event->client.message_type),
|
||||
event->client.data_format,
|
||||
event->client.data.l[0],
|
||||
event->client.data.l[1],
|
||||
event->client.data.l[2],
|
||||
event->client.data.l[3],
|
||||
event->client.data.l[4]);
|
||||
break;
|
||||
case GDK_SCROLL:
|
||||
g_print ("(%.4g,%.4g) (%.4g,%.4g) %s ",
|
||||
event->scroll.x, event->scroll.y,
|
||||
@@ -1217,9 +1236,9 @@ fill_key_event_string (GdkEvent *event)
|
||||
}
|
||||
|
||||
static GdkFilterReturn
|
||||
apply_filters (GdkWindow *window,
|
||||
MSG *msg,
|
||||
GList *filters)
|
||||
apply_event_filters (GdkWindow *window,
|
||||
MSG *msg,
|
||||
GList *filters)
|
||||
{
|
||||
GdkFilterReturn result = GDK_FILTER_CONTINUE;
|
||||
GdkEvent *event;
|
||||
@@ -1676,7 +1695,8 @@ translate_mouse_coords (GdkWindow *window1,
|
||||
|
||||
/* The check_extended flag controls whether to check if the windows want
|
||||
* events from extended input devices and if the message should be skipped
|
||||
* because an extended input device is active */
|
||||
* because an extended input device is active
|
||||
*/
|
||||
static gboolean
|
||||
propagate (GdkWindow **window,
|
||||
MSG *msg,
|
||||
@@ -1693,8 +1713,9 @@ propagate (GdkWindow **window,
|
||||
{
|
||||
/* Event source is grabbed with owner_events FALSE */
|
||||
|
||||
/* See if the event should be ignored because an extended input device
|
||||
* is used */
|
||||
/* See if the event should be ignored because an extended input
|
||||
* device is used
|
||||
*/
|
||||
if (check_extended &&
|
||||
((GdkWindowObject *) grab_window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
@@ -1714,10 +1735,12 @@ propagate (GdkWindow **window,
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we come here, we know that if grab_window != NULL then
|
||||
* grab_owner_events is TRUE
|
||||
*/
|
||||
while (TRUE)
|
||||
{
|
||||
/* See if the event should be ignored because an extended input device
|
||||
* is used */
|
||||
if (check_extended &&
|
||||
((GdkWindowObject *) *window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
@@ -1736,8 +1759,6 @@ propagate (GdkWindow **window,
|
||||
{
|
||||
/* Event source is grabbed with owner_events TRUE */
|
||||
|
||||
/* See if the event should be ignored because an extended
|
||||
* input device is used */
|
||||
if (check_extended &&
|
||||
((GdkWindowObject *) grab_window)->extension_events != 0 &&
|
||||
_gdk_input_ignore_core)
|
||||
@@ -1781,9 +1802,6 @@ static gboolean
|
||||
doesnt_want_key (gint mask,
|
||||
MSG *msg)
|
||||
{
|
||||
GdkWindow *modal_current = _gdk_modal_current ();
|
||||
GdkWindow *window = (GdkWindow *) gdk_win32_handle_table_lookup ((GdkNativeWindow)msg->hwnd);
|
||||
|
||||
return (((msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP) &&
|
||||
!(mask & GDK_KEY_RELEASE_MASK)) ||
|
||||
((msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN) &&
|
||||
@@ -2106,6 +2124,146 @@ generate_button_event (GdkEventType type,
|
||||
_gdk_event_button_generate (_gdk_display, event);
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_stacking_on_unminimize (MSG *msg)
|
||||
{
|
||||
HWND rover;
|
||||
HWND lowest_transient = NULL;
|
||||
|
||||
rover = msg->hwnd;
|
||||
while ((rover = GetNextWindow (rover, GW_HWNDNEXT)))
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw)
|
||||
{
|
||||
GdkWindowImplWin32 *rover_impl =
|
||||
(GdkWindowImplWin32 *)((GdkWindowObject *)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))
|
||||
{
|
||||
lowest_transient = rover;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lowest_transient != NULL)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" restacking: %p", lowest_transient));
|
||||
SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ensure_stacking_on_window_pos_changing (MSG *msg,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = (GdkWindowImplWin32 *)((GdkWindowObject *) window)->impl;
|
||||
WINDOWPOS *windowpos = (WINDOWPOS *) msg->lParam;
|
||||
|
||||
if (GetActiveWindow () == msg->hwnd &&
|
||||
impl->type_hint != GDK_WINDOW_TYPE_HINT_UTILITY &&
|
||||
impl->type_hint != GDK_WINDOW_TYPE_HINT_DIALOG &&
|
||||
impl->transient_owner == NULL)
|
||||
{
|
||||
/* 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;
|
||||
|
||||
rover = windowpos->hwndInsertAfter;
|
||||
restacking = FALSE;
|
||||
while (rover)
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw)
|
||||
{
|
||||
GdkWindowImplWin32 *rover_impl =
|
||||
(GdkWindowImplWin32 *)((GdkWindowObject *)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))
|
||||
{
|
||||
restacking = TRUE;
|
||||
windowpos->hwndInsertAfter = rover;
|
||||
}
|
||||
}
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT);
|
||||
}
|
||||
|
||||
if (restacking)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" restacking: %p", windowpos->hwndInsertAfter));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_stacking_on_activate_app (MSG *msg,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = (GdkWindowImplWin32 *)((GdkWindowObject *) window)->impl;
|
||||
|
||||
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
impl->transient_owner != NULL)
|
||||
{
|
||||
SetWindowPos (msg->hwnd, HWND_TOP, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsWindowVisible (msg->hwnd) &&
|
||||
msg->hwnd == GetActiveWindow ())
|
||||
{
|
||||
/* 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;
|
||||
|
||||
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)
|
||||
{
|
||||
GdkWindowImplWin32 *rover_impl =
|
||||
(GdkWindowImplWin32 *)((GdkWindowObject *)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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_event_translate (MSG *msg,
|
||||
gint *ret_valp)
|
||||
@@ -2117,6 +2275,7 @@ gdk_event_translate (MSG *msg,
|
||||
HCURSOR hcursor;
|
||||
BYTE key_state[256];
|
||||
HIMC himc;
|
||||
WINDOWPOS *windowpos;
|
||||
|
||||
GdkEvent *event;
|
||||
|
||||
@@ -2142,7 +2301,7 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
/* Apply global filters */
|
||||
|
||||
GdkFilterReturn result = apply_filters (NULL, msg, _gdk_default_filters);
|
||||
GdkFilterReturn result = apply_event_filters (NULL, msg, _gdk_default_filters);
|
||||
|
||||
/* If result is GDK_FILTER_CONTINUE, we continue as if nothing
|
||||
* happened. If it is GDK_FILTER_REMOVE or GDK_FILTER_TRANSLATE,
|
||||
@@ -2201,7 +2360,7 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
/* Apply per-window filters */
|
||||
|
||||
GdkFilterReturn result = apply_filters (window, msg, ((GdkWindowObject *) window)->filters);
|
||||
GdkFilterReturn result = apply_event_filters (window, msg, ((GdkWindowObject *) window)->filters);
|
||||
|
||||
if (result == GDK_FILTER_REMOVE || result == GDK_FILTER_TRANSLATE)
|
||||
{
|
||||
@@ -2214,9 +2373,15 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
GList *tmp_list;
|
||||
GdkFilterReturn result = GDK_FILTER_CONTINUE;
|
||||
GList *node;
|
||||
|
||||
GDK_NOTE (EVENTS, g_print (" client_message"));
|
||||
|
||||
event = gdk_event_new (GDK_NOTHING);
|
||||
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
|
||||
|
||||
node = _gdk_event_queue_append (_gdk_display, event);
|
||||
|
||||
tmp_list = client_filters;
|
||||
while (tmp_list)
|
||||
{
|
||||
@@ -2226,38 +2391,41 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
if (filter->type == GDK_POINTER_TO_ATOM (msg->wParam))
|
||||
{
|
||||
GList *filter_list = g_list_append (NULL, filter);
|
||||
|
||||
GDK_NOTE (EVENTS, g_print (" (match)"));
|
||||
|
||||
result = apply_filters (window, msg, filter_list);
|
||||
|
||||
g_list_free (filter_list);
|
||||
result = (*filter->function) (msg, event, filter->data);
|
||||
|
||||
if (result != GDK_FILTER_CONTINUE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (result == GDK_FILTER_REMOVE || result == GDK_FILTER_TRANSLATE)
|
||||
switch (result)
|
||||
{
|
||||
case GDK_FILTER_REMOVE:
|
||||
_gdk_event_queue_remove_link (_gdk_display, node);
|
||||
g_list_free_1 (node);
|
||||
gdk_event_free (event);
|
||||
return_val = TRUE;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
case GDK_FILTER_TRANSLATE:
|
||||
((GdkEventPrivate *)event)->flags &= ~GDK_EVENT_PENDING;
|
||||
GDK_NOTE (EVENTS, print_event (event));
|
||||
return_val = TRUE;
|
||||
goto done;
|
||||
|
||||
case GDK_FILTER_CONTINUE:
|
||||
/* Send unknown client messages on to Gtk for it to use */
|
||||
|
||||
event = gdk_event_new (GDK_CLIENT_EVENT);
|
||||
event->client.type = GDK_CLIENT_EVENT;
|
||||
event->client.window = window;
|
||||
event->client.message_type = GDK_POINTER_TO_ATOM (msg->wParam);
|
||||
event->client.data_format = 32;
|
||||
event->client.data.l[0] = msg->lParam;
|
||||
for (i = 1; i < 5; i++)
|
||||
event->client.data.l[i] = 0;
|
||||
|
||||
append_event (event);
|
||||
|
||||
GDK_NOTE (EVENTS, print_event (event));
|
||||
return_val = TRUE;
|
||||
goto done;
|
||||
}
|
||||
@@ -2714,7 +2882,7 @@ gdk_event_translate (MSG *msg,
|
||||
break;
|
||||
|
||||
case WM_MOUSEWHEEL:
|
||||
GDK_NOTE (EVENTS, g_print (" %d", HIWORD (msg->wParam)));
|
||||
GDK_NOTE (EVENTS, g_print (" %d", (short) HIWORD (msg->wParam)));
|
||||
|
||||
/* WM_MOUSEWHEEL is delivered to the focus window. Work around
|
||||
* that. Also, the position is in screen coordinates, not client
|
||||
@@ -2764,6 +2932,44 @@ gdk_event_translate (MSG *msg,
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
||||
case WM_HSCROLL:
|
||||
/* Just print more debugging information, don't actually handle it. */
|
||||
GDK_NOTE (EVENTS,
|
||||
(g_print (" %s",
|
||||
(LOWORD (msg->wParam) == SB_ENDSCROLL ? "ENDSCROLL" :
|
||||
(LOWORD (msg->wParam) == SB_LEFT ? "LEFT" :
|
||||
(LOWORD (msg->wParam) == SB_RIGHT ? "RIGHT" :
|
||||
(LOWORD (msg->wParam) == SB_LINELEFT ? "LINELEFT" :
|
||||
(LOWORD (msg->wParam) == SB_LINERIGHT ? "LINERIGHT" :
|
||||
(LOWORD (msg->wParam) == SB_PAGELEFT ? "PAGELEFT" :
|
||||
(LOWORD (msg->wParam) == SB_PAGERIGHT ? "PAGERIGHT" :
|
||||
(LOWORD (msg->wParam) == SB_THUMBPOSITION ? "THUMBPOSITION" :
|
||||
(LOWORD (msg->wParam) == SB_THUMBTRACK ? "THUMBTRACK" :
|
||||
"???")))))))))),
|
||||
(LOWORD (msg->wParam) == SB_THUMBPOSITION ||
|
||||
LOWORD (msg->wParam) == SB_THUMBTRACK) ?
|
||||
(g_print (" %d", HIWORD (msg->wParam)), 0) : 0));
|
||||
break;
|
||||
|
||||
case WM_VSCROLL:
|
||||
/* Just print more debugging information, don't actually handle it. */
|
||||
GDK_NOTE (EVENTS,
|
||||
(g_print (" %s",
|
||||
(LOWORD (msg->wParam) == SB_ENDSCROLL ? "ENDSCROLL" :
|
||||
(LOWORD (msg->wParam) == SB_BOTTOM ? "BOTTOM" :
|
||||
(LOWORD (msg->wParam) == SB_TOP ? "TOP" :
|
||||
(LOWORD (msg->wParam) == SB_LINEDOWN ? "LINDOWN" :
|
||||
(LOWORD (msg->wParam) == SB_LINEUP ? "LINEUP" :
|
||||
(LOWORD (msg->wParam) == SB_PAGEDOWN ? "PAGEDOWN" :
|
||||
(LOWORD (msg->wParam) == SB_PAGEUP ? "PAGEUP" :
|
||||
(LOWORD (msg->wParam) == SB_THUMBPOSITION ? "THUMBPOSITION" :
|
||||
(LOWORD (msg->wParam) == SB_THUMBTRACK ? "THUMBTRACK" :
|
||||
"???")))))))))),
|
||||
(LOWORD (msg->wParam) == SB_THUMBPOSITION ||
|
||||
LOWORD (msg->wParam) == SB_THUMBTRACK) ?
|
||||
(g_print (" %d", HIWORD (msg->wParam)), 0) : 0));
|
||||
break;
|
||||
|
||||
case WM_QUERYNEWPALETTE:
|
||||
if (gdk_visual_get_system ()->type == GDK_VISUAL_PSEUDO_COLOR)
|
||||
{
|
||||
@@ -2852,7 +3058,6 @@ gdk_event_translate (MSG *msg,
|
||||
break;
|
||||
|
||||
case WM_SYNCPAINT:
|
||||
|
||||
sync_timer = SetTimer (GDK_WINDOW_HWND (window),
|
||||
1,
|
||||
200, sync_timer_proc);
|
||||
@@ -2886,7 +3091,14 @@ gdk_event_translate (MSG *msg,
|
||||
break;
|
||||
|
||||
case WM_SHOWWINDOW:
|
||||
GDK_NOTE (EVENTS, g_print (" %d", (int) msg->wParam));
|
||||
GDK_NOTE (EVENTS, g_print (" %s %s",
|
||||
(msg->wParam ? "YES" : "NO"),
|
||||
(msg->lParam == 0 ? "ShowWindow" :
|
||||
(msg->lParam == SW_OTHERUNZOOM ? "OTHERUNZOOM" :
|
||||
(msg->lParam == SW_OTHERZOOM ? "OTHERZOOM" :
|
||||
(msg->lParam == SW_PARENTCLOSING ? "PARENTCLOSING" :
|
||||
(msg->lParam == SW_PARENTOPENING ? "PARENTOPENING" :
|
||||
"???")))))));
|
||||
|
||||
if (!(((GdkWindowObject *) window)->event_mask & GDK_STRUCTURE_MASK))
|
||||
break;
|
||||
@@ -2927,7 +3139,6 @@ gdk_event_translate (MSG *msg,
|
||||
break;
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
|
||||
switch (msg->wParam)
|
||||
{
|
||||
case SC_MINIMIZE:
|
||||
@@ -2970,6 +3181,9 @@ gdk_event_translate (MSG *msg,
|
||||
GdkWindowState withdrawn_bit =
|
||||
IsWindowVisible (msg->hwnd) ? GDK_WINDOW_STATE_WITHDRAWN : 0;
|
||||
|
||||
if (((GdkWindowObject *) window)->state & GDK_WINDOW_STATE_ICONIFIED)
|
||||
ensure_stacking_on_unminimize (msg);
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
handle_configure_event (msg, window);
|
||||
|
||||
@@ -3024,7 +3238,41 @@ gdk_event_translate (MSG *msg,
|
||||
KillTimer (NULL, modal_timer);
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGED :
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
GDK_NOTE (EVENTS, (windowpos = (WINDOWPOS *) msg->lParam,
|
||||
g_print (" %s %s %dx%d@%+d%+d now below %p",
|
||||
_gdk_win32_window_pos_bits_to_string (windowpos->flags),
|
||||
(windowpos->hwndInsertAfter == HWND_BOTTOM ? "BOTTOM" :
|
||||
(windowpos->hwndInsertAfter == HWND_NOTOPMOST ? "NOTOPMOST" :
|
||||
(windowpos->hwndInsertAfter == HWND_TOP ? "TOP" :
|
||||
(windowpos->hwndInsertAfter == HWND_TOPMOST ? "TOPMOST" :
|
||||
(sprintf (buf, "%p", windowpos->hwndInsertAfter),
|
||||
buf))))),
|
||||
windowpos->cx, windowpos->cy, windowpos->x, windowpos->y,
|
||||
GetNextWindow (msg->hwnd, GW_HWNDPREV))));
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
return_val = ensure_stacking_on_window_pos_changing (msg, window);
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
GDK_NOTE (EVENTS, (windowpos = (WINDOWPOS *) msg->lParam,
|
||||
g_print (" %s %s %dx%d@%+d%+d",
|
||||
_gdk_win32_window_pos_bits_to_string (windowpos->flags),
|
||||
(windowpos->hwndInsertAfter == HWND_BOTTOM ? "BOTTOM" :
|
||||
(windowpos->hwndInsertAfter == HWND_NOTOPMOST ? "NOTOPMOST" :
|
||||
(windowpos->hwndInsertAfter == HWND_TOP ? "TOP" :
|
||||
(windowpos->hwndInsertAfter == HWND_TOPMOST ? "TOPMOST" :
|
||||
(sprintf (buf, "%p", windowpos->hwndInsertAfter),
|
||||
buf))))),
|
||||
windowpos->cx, windowpos->cy, windowpos->x, windowpos->y)));
|
||||
|
||||
/* If position and size haven't changed, don't do anything */
|
||||
if (_sizemove_in_progress &&
|
||||
(windowpos->flags & SWP_NOMOVE) &&
|
||||
(windowpos->flags & SWP_NOSIZE))
|
||||
break;
|
||||
|
||||
/* Once we've entered the moving or sizing modal loop, we won't
|
||||
* return to the main loop until we're done sizing or moving.
|
||||
*/
|
||||
@@ -3034,6 +3282,7 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
if (((GdkWindowObject *) window)->event_mask & GDK_STRUCTURE_MASK)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" do magic"));
|
||||
if (((GdkWindowObject *) window)->resize_count > 1)
|
||||
((GdkWindowObject *) window)->resize_count -= 1;
|
||||
|
||||
@@ -3418,7 +3667,7 @@ gdk_event_translate (MSG *msg,
|
||||
event->selection.send_event = FALSE;
|
||||
event->selection.selection = GDK_SELECTION_CLIPBOARD;
|
||||
event->selection.target = target;
|
||||
event->selection.property = _gdk_selection_property;
|
||||
event->selection.property = _gdk_selection;
|
||||
event->selection.requestor = msg->hwnd;
|
||||
event->selection.time = msg->time;
|
||||
|
||||
@@ -3450,6 +3699,11 @@ gdk_event_translate (MSG *msg,
|
||||
/* The requestor is holding the clipboard, no
|
||||
* OpenClipboard() is required/possible
|
||||
*/
|
||||
GDK_NOTE (DND,
|
||||
g_print (" SetClipboardData(%s,%p)",
|
||||
_gdk_win32_cf_to_string (msg->wParam),
|
||||
_delayed_rendering_data));
|
||||
|
||||
API_CALL (SetClipboardData, (msg->wParam, _delayed_rendering_data));
|
||||
_delayed_rendering_data = NULL;
|
||||
}
|
||||
@@ -3457,11 +3711,17 @@ gdk_event_translate (MSG *msg,
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
|
||||
GDK_NOTE (EVENTS, g_print (" %s%s %p",
|
||||
(LOWORD (msg->wParam) == WA_ACTIVE ? "ACTIVE" :
|
||||
(LOWORD (msg->wParam) == WA_CLICKACTIVE ? "CLICKACTIVE" :
|
||||
(LOWORD (msg->wParam) == WA_INACTIVE ? "INACTIVE" : "???"))),
|
||||
HIWORD (msg->wParam) ? " minimized" : "",
|
||||
(HWND) msg->lParam));
|
||||
/* We handle mouse clicks for modally-blocked windows under WM_MOUSEACTIVATE,
|
||||
* but we still need to deal with alt-tab, or with SetActiveWindow() type
|
||||
* situations. */
|
||||
if (is_modally_blocked (window) && msg->wParam == WA_ACTIVE)
|
||||
* situations.
|
||||
*/
|
||||
if (is_modally_blocked (window) && LOWORD (msg->wParam) == WA_ACTIVE)
|
||||
{
|
||||
GdkWindow *modal_current = _gdk_modal_current ();
|
||||
SetActiveWindow (GDK_WINDOW_HWND (modal_current));
|
||||
@@ -3479,6 +3739,13 @@ gdk_event_translate (MSG *msg,
|
||||
_gdk_input_set_tablet_active ();
|
||||
break;
|
||||
|
||||
case WM_ACTIVATEAPP:
|
||||
GDK_NOTE (EVENTS, g_print (" %s thread: %I64d",
|
||||
msg->wParam ? "YES" : "NO",
|
||||
(gint64) msg->lParam));
|
||||
if (msg->wParam && GDK_WINDOW_IS_MAPPED (window))
|
||||
ensure_stacking_on_activate_app (msg, window);
|
||||
break;
|
||||
|
||||
/* Handle WINTAB events here, as we know that gdkinput.c will
|
||||
* use the fixed WT_DEFBASE as lcMsgBase, and we thus can use the
|
||||
|
||||
@@ -46,10 +46,7 @@ HKL _gdk_input_locale;
|
||||
gboolean _gdk_input_locale_is_ime;
|
||||
UINT _gdk_input_codepage;
|
||||
|
||||
WORD _cf_utf8_string;
|
||||
WORD _cf_image_bmp;
|
||||
|
||||
GdkAtom _gdk_selection_property;
|
||||
GdkAtom _gdk_selection;
|
||||
GdkAtom _wm_transient_for;
|
||||
GdkAtom _targets;
|
||||
GdkAtom _save_targets;
|
||||
@@ -57,7 +54,6 @@ GdkAtom _utf8_string;
|
||||
GdkAtom _text;
|
||||
GdkAtom _compound_text;
|
||||
GdkAtom _text_uri_list;
|
||||
GdkAtom _image_bmp;
|
||||
|
||||
GdkAtom _local_dnd;
|
||||
GdkAtom _gdk_win32_dropfiles;
|
||||
|
||||
+121
-8
@@ -100,10 +100,7 @@ _gdk_windowing_init (void)
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
_cf_utf8_string = RegisterClipboardFormat ("UTF8_STRING");
|
||||
_cf_image_bmp = RegisterClipboardFormat ("image/bmp");
|
||||
|
||||
_gdk_selection_property = gdk_atom_intern ("GDK_SELECTION", FALSE);
|
||||
_gdk_selection = gdk_atom_intern ("GDK_SELECTION", FALSE);
|
||||
_wm_transient_for = gdk_atom_intern ("WM_TRANSIENT_FOR", FALSE);
|
||||
_targets = gdk_atom_intern ("TARGETS", FALSE);
|
||||
_save_targets = gdk_atom_intern ("SAVE_TARGETS", FALSE);
|
||||
@@ -111,7 +108,6 @@ _gdk_windowing_init (void)
|
||||
_text = gdk_atom_intern ("TEXT", FALSE);
|
||||
_compound_text = gdk_atom_intern ("COMPOUND_TEXT", FALSE);
|
||||
_text_uri_list = gdk_atom_intern ("text/uri-list", FALSE);
|
||||
_image_bmp = gdk_atom_intern ("image/bmp", FALSE);
|
||||
|
||||
_local_dnd = gdk_atom_intern ("LocalDndSelection", FALSE);
|
||||
_gdk_win32_dropfiles = gdk_atom_intern ("DROPFILES_DND", FALSE);
|
||||
@@ -481,6 +477,26 @@ _gdk_win32_line_style_to_string (GdkLineStyle line_style)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol)
|
||||
{
|
||||
switch (protocol)
|
||||
{
|
||||
#define CASE(x) case GDK_DRAG_PROTO_##x: return #x
|
||||
CASE (MOTIF);
|
||||
CASE (XDND);
|
||||
CASE (ROOTWIN);
|
||||
CASE (NONE);
|
||||
CASE (WIN32_DROPFILES);
|
||||
CASE (OLE2);
|
||||
CASE (LOCAL);
|
||||
#undef CASE
|
||||
default: return static_printf ("illegal_%d", protocol);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask)
|
||||
{
|
||||
@@ -553,7 +569,7 @@ _gdk_win32_window_style_to_string (LONG style)
|
||||
buf[0] = '\0';
|
||||
|
||||
#define BIT(x) \
|
||||
if (style & WS_ ## x) \
|
||||
if (style & WS_ ## x) \
|
||||
(bufp += sprintf (bufp, "%s" #x, s), s = "|")
|
||||
|
||||
/* Note that many of the WS_* macros are in face several bits.
|
||||
@@ -585,6 +601,105 @@ _gdk_win32_window_style_to_string (LONG style)
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_window_exstyle_to_string (LONG style)
|
||||
{
|
||||
gchar buf[1000];
|
||||
gchar *bufp = buf;
|
||||
gchar *s = "";
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
#define BIT(x) \
|
||||
if (style & WS_EX_ ## x) \
|
||||
(bufp += sprintf (bufp, "%s" #x, s), s = "|")
|
||||
|
||||
/* Note that many of the WS_EX_* macros are in face several bits.
|
||||
* Handle just the individual bits here. Sort as in w32api's
|
||||
* winuser.h.
|
||||
*/
|
||||
BIT (ACCEPTFILES);
|
||||
BIT (APPWINDOW);
|
||||
BIT (CLIENTEDGE);
|
||||
BIT (COMPOSITED);
|
||||
BIT (CONTEXTHELP);
|
||||
BIT (CONTROLPARENT);
|
||||
BIT (DLGMODALFRAME);
|
||||
BIT (LAYERED);
|
||||
BIT (LAYOUTRTL);
|
||||
BIT (LEFTSCROLLBAR);
|
||||
BIT (MDICHILD);
|
||||
BIT (NOACTIVATE);
|
||||
BIT (NOINHERITLAYOUT);
|
||||
BIT (NOPARENTNOTIFY);
|
||||
BIT (RIGHT);
|
||||
BIT (RTLREADING);
|
||||
BIT (STATICEDGE);
|
||||
BIT (TOOLWINDOW);
|
||||
BIT (TOPMOST);
|
||||
BIT (TRANSPARENT);
|
||||
BIT (WINDOWEDGE);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_window_pos_bits_to_string (UINT flags)
|
||||
{
|
||||
gchar buf[1000];
|
||||
gchar *bufp = buf;
|
||||
gchar *s = "";
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
#define BIT(x) \
|
||||
if (flags & SWP_ ## x) \
|
||||
(bufp += sprintf (bufp, "%s" #x, s), s = "|")
|
||||
|
||||
BIT (DRAWFRAME);
|
||||
BIT (FRAMECHANGED);
|
||||
BIT (HIDEWINDOW);
|
||||
BIT (NOACTIVATE);
|
||||
BIT (NOCOPYBITS);
|
||||
BIT (NOMOVE);
|
||||
BIT (NOSIZE);
|
||||
BIT (NOREDRAW);
|
||||
BIT (NOZORDER);
|
||||
BIT (SHOWWINDOW);
|
||||
BIT (NOOWNERZORDER);
|
||||
BIT (NOSENDCHANGING);
|
||||
BIT (DEFERERASE);
|
||||
BIT (ASYNCWINDOWPOS);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_drag_action_to_string (GdkDragAction actions)
|
||||
{
|
||||
gchar buf[100];
|
||||
gchar *bufp = buf;
|
||||
gchar *s = "";
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
#define BIT(x) \
|
||||
if (actions & GDK_ACTION_ ## x) \
|
||||
(bufp += sprintf (bufp, "%s" #x, s), s = "|")
|
||||
|
||||
BIT (DEFAULT);
|
||||
BIT (COPY);
|
||||
BIT (MOVE);
|
||||
BIT (LINK);
|
||||
BIT (PRIVATE);
|
||||
BIT (ASK);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_rop2_to_string (int rop2)
|
||||
{
|
||||
@@ -964,9 +1079,7 @@ _gdk_win32_cf_to_string (UINT format)
|
||||
#define CASE(x) case CF_##x: return "CF_" #x
|
||||
CASE (BITMAP);
|
||||
CASE (DIB);
|
||||
#ifdef CF_DIBV5
|
||||
CASE (DIBV5);
|
||||
#endif
|
||||
CASE (DIF);
|
||||
CASE (DSPBITMAP);
|
||||
CASE (DSPENHMETAFILE);
|
||||
|
||||
@@ -93,11 +93,17 @@
|
||||
#define WM_APPCOMMAND 0x319
|
||||
#endif
|
||||
|
||||
#ifndef CF_DIBV5
|
||||
#define CF_DIBV5 17
|
||||
#endif
|
||||
|
||||
|
||||
/* Define some combinations of GdkDebugFlags */
|
||||
#define GDK_DEBUG_EVENTS_OR_COLORMAP (GDK_DEBUG_EVENTS|GDK_DEBUG_COLORMAP)
|
||||
#define GDK_DEBUG_EVENTS_OR_INPUT (GDK_DEBUG_EVENTS|GDK_DEBUG_INPUT)
|
||||
#define GDK_DEBUG_PIXMAP_OR_COLORMAP (GDK_DEBUG_PIXMAP|GDK_DEBUG_COLORMAP)
|
||||
#define GDK_DEBUG_MISC_OR_COLORMAP (GDK_DEBUG_MISC|GDK_DEBUG_COLORMAP)
|
||||
#define GDK_DEBUG_MISC_OR_EVENTS (GDK_DEBUG_MISC|GDK_DEBUG_EVENTS)
|
||||
|
||||
#define GDK_TYPE_GC_WIN32 (_gdk_gc_win32_get_type ())
|
||||
#define GDK_GC_WIN32(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_WIN32, GdkGCWin32))
|
||||
@@ -308,9 +314,13 @@ gchar *_gdk_win32_fill_style_to_string (GdkFill fill);
|
||||
gchar *_gdk_win32_function_to_string (GdkFunction function);
|
||||
gchar *_gdk_win32_join_style_to_string (GdkJoinStyle join_style);
|
||||
gchar *_gdk_win32_line_style_to_string (GdkLineStyle line_style);
|
||||
gchar *_gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol);
|
||||
gchar *_gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask);
|
||||
gchar *_gdk_win32_window_state_to_string (GdkWindowState state);
|
||||
gchar *_gdk_win32_window_style_to_string (LONG style);
|
||||
gchar *_gdk_win32_window_exstyle_to_string (LONG style);
|
||||
gchar *_gdk_win32_window_pos_bits_to_string (UINT flags);
|
||||
gchar *_gdk_win32_drag_action_to_string (GdkDragAction actions);
|
||||
gchar *_gdk_win32_drawable_description (GdkDrawable *d);
|
||||
|
||||
gchar *_gdk_win32_rop2_to_string (int rop2);
|
||||
@@ -397,12 +407,8 @@ extern guint _gdk_keymap_serial;
|
||||
extern gboolean _gdk_keyboard_has_altgr;
|
||||
extern guint _scancode_rshift;
|
||||
|
||||
/* Registered clipboard formats */
|
||||
extern WORD _cf_utf8_string;
|
||||
extern WORD _cf_image_bmp;
|
||||
|
||||
/* GdkAtoms: properties, targets and types */
|
||||
extern GdkAtom _gdk_selection_property;
|
||||
extern GdkAtom _gdk_selection;
|
||||
extern GdkAtom _wm_transient_for;
|
||||
extern GdkAtom _targets;
|
||||
extern GdkAtom _save_targets;
|
||||
@@ -410,7 +416,6 @@ extern GdkAtom _utf8_string;
|
||||
extern GdkAtom _text;
|
||||
extern GdkAtom _compound_text;
|
||||
extern GdkAtom _text_uri_list;
|
||||
extern GdkAtom _image_bmp;
|
||||
|
||||
/* DND selections */
|
||||
extern GdkAtom _local_dnd;
|
||||
|
||||
+101
-128
@@ -99,7 +99,8 @@ gdk_atom_name (GdkAtom atom)
|
||||
ATOM win32_atom;
|
||||
gchar name[256];
|
||||
|
||||
if (GDK_SELECTION_PRIMARY == atom) return g_strdup ("PRIMARY");
|
||||
if (GDK_NONE == atom) return g_strdup ("<none>");
|
||||
else if (GDK_SELECTION_PRIMARY == atom) return g_strdup ("PRIMARY");
|
||||
else if (GDK_SELECTION_SECONDARY == atom) return g_strdup ("SECONDARY");
|
||||
else if (GDK_SELECTION_CLIPBOARD == atom) return g_strdup ("CLIPBOARD");
|
||||
else if (GDK_SELECTION_TYPE_ATOM == atom) return g_strdup ("ATOM");
|
||||
@@ -153,14 +154,10 @@ gdk_property_change (GdkWindow *window,
|
||||
gint nelements)
|
||||
{
|
||||
HGLOBAL hdata;
|
||||
UINT cf = 0;
|
||||
gint i, size, nchars;
|
||||
gchar *prop_name, *type_name;
|
||||
gint i, size;
|
||||
guchar *ucptr, *buf = NULL;
|
||||
wchar_t *wcptr;
|
||||
wchar_t *wcptr, *p;
|
||||
glong wclen;
|
||||
enum { SYSTEM_CODEPAGE, UNICODE_TEXT } method;
|
||||
gboolean ok = TRUE;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
@@ -168,21 +165,23 @@ gdk_property_change (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(prop_name = gdk_atom_name (property),
|
||||
type_name = gdk_atom_name (type),
|
||||
g_print ("gdk_property_change: %p %p (%s) %p (%s) %s %d*%d bytes: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
property, prop_name,
|
||||
type, type_name,
|
||||
(mode == GDK_PROP_MODE_REPLACE ? "REPLACE" :
|
||||
(mode == GDK_PROP_MODE_PREPEND ? "PREPEND" :
|
||||
(mode == GDK_PROP_MODE_APPEND ? "APPEND" :
|
||||
"???"))),
|
||||
format, nelements,
|
||||
_gdk_win32_data_to_string (data, MIN (10, format*nelements/8))),
|
||||
g_free (prop_name),
|
||||
g_free (type_name)));
|
||||
GDK_NOTE (DND, {
|
||||
gchar *prop_name = gdk_atom_name (property);
|
||||
gchar *type_name = gdk_atom_name (type);
|
||||
|
||||
g_print ("gdk_property_change: %p %s %s %s %d*%d bits: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
prop_name,
|
||||
type_name,
|
||||
(mode == GDK_PROP_MODE_REPLACE ? "REPLACE" :
|
||||
(mode == GDK_PROP_MODE_PREPEND ? "PREPEND" :
|
||||
(mode == GDK_PROP_MODE_APPEND ? "APPEND" :
|
||||
"???"))),
|
||||
format, nelements,
|
||||
_gdk_win32_data_to_string (data, MIN (10, format*nelements/8)));
|
||||
g_free (prop_name);
|
||||
g_free (type_name);
|
||||
});
|
||||
|
||||
/* We should never come here for these types */
|
||||
g_return_if_fail (type != GDK_TARGET_STRING);
|
||||
@@ -190,9 +189,9 @@ gdk_property_change (GdkWindow *window,
|
||||
g_return_if_fail (type != _compound_text);
|
||||
g_return_if_fail (type != _save_targets);
|
||||
|
||||
if (property == _gdk_selection_property
|
||||
&& format == 8
|
||||
&& mode == GDK_PROP_MODE_REPLACE)
|
||||
if (property == _gdk_selection &&
|
||||
format == 8 &&
|
||||
mode == GDK_PROP_MODE_REPLACE)
|
||||
{
|
||||
if (type == _utf8_string)
|
||||
{
|
||||
@@ -202,38 +201,13 @@ gdk_property_change (GdkWindow *window,
|
||||
return;
|
||||
}
|
||||
|
||||
nchars = g_utf8_strlen ((char*) data, nelements);
|
||||
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, NULL);
|
||||
|
||||
/* Check if only ASCII */
|
||||
for (i = 0; i < nelements; i++)
|
||||
if (data[i] >= 0200)
|
||||
break;
|
||||
|
||||
if (i == nelements)
|
||||
{
|
||||
/* If only ASCII, use CF_TEXT and the data as such */
|
||||
method = SYSTEM_CODEPAGE;
|
||||
size = nelements;
|
||||
for (i = 0; i < nelements; i++)
|
||||
if (data[i] == '\n')
|
||||
size++;
|
||||
size++;
|
||||
GDK_NOTE (DND, g_print ("... as text: %.40s\n", data));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use CF_UNICODETEXT */
|
||||
method = UNICODE_TEXT;
|
||||
|
||||
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, NULL);
|
||||
|
||||
wclen++; /* Terminating 0 */
|
||||
size = wclen * 2;
|
||||
for (i = 0; i < wclen; i++)
|
||||
if (wcptr[i] == '\n')
|
||||
size += 2;
|
||||
GDK_NOTE (DND, g_print ("... as Unicode\n"));
|
||||
}
|
||||
wclen++; /* Terminating 0 */
|
||||
size = wclen * 2;
|
||||
for (i = 0; i < wclen; i++)
|
||||
if (wcptr[i] == '\n')
|
||||
size += 2;
|
||||
|
||||
if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, size)))
|
||||
{
|
||||
@@ -246,53 +220,32 @@ gdk_property_change (GdkWindow *window,
|
||||
|
||||
ucptr = GlobalLock (hdata);
|
||||
|
||||
switch (method)
|
||||
p = (wchar_t *) ucptr;
|
||||
for (i = 0; i < wclen; i++)
|
||||
{
|
||||
case SYSTEM_CODEPAGE:
|
||||
cf = CF_TEXT;
|
||||
for (i = 0; i < nelements; i++)
|
||||
{
|
||||
if (data[i] == '\n')
|
||||
*ucptr++ = '\r';
|
||||
*ucptr++ = data[i];
|
||||
}
|
||||
*ucptr++ = '\0';
|
||||
break;
|
||||
|
||||
case UNICODE_TEXT:
|
||||
{
|
||||
wchar_t *p = (wchar_t *) ucptr;
|
||||
cf = CF_UNICODETEXT;
|
||||
for (i = 0; i < wclen; i++)
|
||||
{
|
||||
if (wcptr[i] == '\n')
|
||||
*p++ = '\r';
|
||||
*p++ = wcptr[i];
|
||||
}
|
||||
g_free (wcptr);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
if (wcptr[i] == '\n')
|
||||
*p++ = '\r';
|
||||
*p++ = wcptr[i];
|
||||
}
|
||||
g_free (wcptr);
|
||||
|
||||
GlobalUnlock (hdata);
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(%s,%p)\n",
|
||||
_gdk_win32_cf_to_string (cf), hdata));
|
||||
if (ok && !SetClipboardData (cf, hdata))
|
||||
WIN32_API_FAILED ("SetClipboardData"), ok = FALSE;
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_UNICODETEXT,%p)\n",
|
||||
hdata));
|
||||
if (!SetClipboardData (CF_UNICODETEXT, hdata))
|
||||
WIN32_API_FAILED ("SetClipboardData");
|
||||
|
||||
if (!CloseClipboard ())
|
||||
WIN32_API_FAILED ("CloseClipboard");
|
||||
}
|
||||
else
|
||||
{
|
||||
GDK_NOTE (DND, g_print ("... delayed rendering\n"));
|
||||
/* Delayed Rendering. We can't assign hdata to the clipboard
|
||||
* here as type may be "image/png", "image/jpg", etc. In
|
||||
* this case there's a further conversion afterwards.
|
||||
/* We use delayed rendering for everything else than
|
||||
* text. We can't assign hdata to the clipboard here as type
|
||||
* may be "image/png", "image/jpg", etc. In this case
|
||||
* there's a further conversion afterwards.
|
||||
*/
|
||||
GDK_NOTE (DND, g_print ("... delayed rendering\n"));
|
||||
_delayed_rendering_data = NULL;
|
||||
if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, nelements > 0 ? nelements : 1)))
|
||||
{
|
||||
@@ -318,14 +271,16 @@ gdk_property_delete (GdkWindow *window,
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (DND,
|
||||
(prop_name = gdk_atom_name (property),
|
||||
g_print ("gdk_property_delete: %p %p (%s)\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
property, prop_name),
|
||||
g_free (prop_name)));
|
||||
GDK_NOTE (DND, {
|
||||
prop_name = gdk_atom_name (property);
|
||||
|
||||
if (property == _gdk_selection_property)
|
||||
g_print ("gdk_property_delete: %p %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
prop_name);
|
||||
g_free (prop_name);
|
||||
});
|
||||
|
||||
if (property == _gdk_selection)
|
||||
_gdk_selection_property_delete (window);
|
||||
else if (property == _wm_transient_for)
|
||||
gdk_window_set_transient_for (window, _gdk_root);
|
||||
@@ -339,37 +294,56 @@ gdk_property_delete (GdkWindow *window,
|
||||
}
|
||||
|
||||
/*
|
||||
for reference copied from gdk/x11/gdkevents-x11.c
|
||||
For reference, from gdk/x11/gdksettings.c:
|
||||
|
||||
{ "Net/DoubleClickTime", "gtk-double-click-time" },
|
||||
{ "Net/DoubleClickDistance", "gtk-double-click-distance" },
|
||||
{ "Net/DndDragThreshold", "gtk-dnd-drag-threshold" },
|
||||
{ "Gtk/CanChangeAccels", "gtk-can-change-accels" },
|
||||
{ "Gtk/ColorPalette", "gtk-color-palette" },
|
||||
{ "Gtk/FontName", "gtk-font-name" },
|
||||
{ "Gtk/IconSizes", "gtk-icon-sizes" },
|
||||
{ "Gtk/KeyThemeName", "gtk-key-theme-name" },
|
||||
{ "Gtk/ToolbarStyle", "gtk-toolbar-style" },
|
||||
{ "Gtk/ToolbarIconSize", "gtk-toolbar-icon-size" },
|
||||
{ "Gtk/IMPreeditStyle", "gtk-im-preedit-style" },
|
||||
{ "Gtk/IMStatusStyle", "gtk-im-status-style" },
|
||||
{ "Gtk/IMModule", "gtk-im-module" },
|
||||
{ "Net/CursorBlink", "gtk-cursor-blink" },
|
||||
{ "Net/CursorBlinkTime", "gtk-cursor-blink-time" },
|
||||
{ "Net/ThemeName", "gtk-theme-name" },
|
||||
{ "Net/IconThemeName", "gtk-icon-theme-name" },
|
||||
{ "Gtk/ButtonImages", "gtk-button-images" },
|
||||
{ "Gtk/MenuImages", "gtk-menu-images" },
|
||||
{ "Xft/Antialias", "gtk-xft-antialias" },
|
||||
{ "Xft/Hinting", "gtk-xft-hinting" },
|
||||
{ "Xft/HintStyle", "gtk-xft-hintstyle" },
|
||||
{ "Xft/RGBA", "gtk-xft-rgba" },
|
||||
{ "Xft/DPI", "gtk-xft-dpi" },
|
||||
"Net/DoubleClickTime\0" "gtk-double-click-time\0"
|
||||
"Net/DoubleClickDistance\0" "gtk-double-click-distance\0"
|
||||
"Net/DndDragThreshold\0" "gtk-dnd-drag-threshold\0"
|
||||
"Net/CursorBlink\0" "gtk-cursor-blink\0"
|
||||
"Net/CursorBlinkTime\0" "gtk-cursor-blink-time\0"
|
||||
"Net/ThemeName\0" "gtk-theme-name\0"
|
||||
"Net/IconThemeName\0" "gtk-icon-theme-name\0"
|
||||
"Gtk/CanChangeAccels\0" "gtk-can-change-accels\0"
|
||||
"Gtk/ColorPalette\0" "gtk-color-palette\0"
|
||||
"Gtk/FontName\0" "gtk-font-name\0"
|
||||
"Gtk/IconSizes\0" "gtk-icon-sizes\0"
|
||||
"Gtk/KeyThemeName\0" "gtk-key-theme-name\0"
|
||||
"Gtk/ToolbarStyle\0" "gtk-toolbar-style\0"
|
||||
"Gtk/ToolbarIconSize\0" "gtk-toolbar-icon-size\0"
|
||||
"Gtk/IMPreeditStyle\0" "gtk-im-preedit-style\0"
|
||||
"Gtk/IMStatusStyle\0" "gtk-im-status-style\0"
|
||||
"Gtk/Modules\0" "gtk-modules\0"
|
||||
"Gtk/FileChooserBackend\0" "gtk-file-chooser-backend\0"
|
||||
"Gtk/ButtonImages\0" "gtk-button-images\0"
|
||||
"Gtk/MenuImages\0" "gtk-menu-images\0"
|
||||
"Gtk/MenuBarAccel\0" "gtk-menu-bar-accel\0"
|
||||
"Gtk/CursorThemeName\0" "gtk-cursor-theme-name\0"
|
||||
"Gtk/CursorThemeSize\0" "gtk-cursor-theme-size\0"
|
||||
"Gtk/ShowInputMethodMenu\0" "gtk-show-input-method-menu\0"
|
||||
"Gtk/ShowUnicodeMenu\0" "gtk-show-unicode-menu\0"
|
||||
"Gtk/TimeoutInitial\0" "gtk-timeout-initial\0"
|
||||
"Gtk/TimeoutRepeat\0" "gtk-timeout-repeat\0"
|
||||
"Gtk/ColorScheme\0" "gtk-color-scheme\0"
|
||||
"Gtk/EnableAnimations\0" "gtk-enable-animations\0"
|
||||
"Xft/Antialias\0" "gtk-xft-antialias\0"
|
||||
"Xft/Hinting\0" "gtk-xft-hinting\0"
|
||||
"Xft/HintStyle\0" "gtk-xft-hintstyle\0"
|
||||
"Xft/RGBA\0" "gtk-xft-rgba\0"
|
||||
"Xft/DPI\0" "gtk-xft-dpi\0"
|
||||
"Net/FallbackIconTheme\0" "gtk-fallback-icon-theme\0"
|
||||
"Gtk/TouchscreenMode\0" "gtk-touchscreen-mode\0"
|
||||
"Gtk/EnableAccels\0" "gtk-enable-accels\0"
|
||||
"Gtk/EnableMnemonics\0" "gtk-enable-mnemonics\0"
|
||||
"Gtk/ScrolledWindowPlacement\0" "gtk-scrolled-window-placement\0"
|
||||
"Gtk/IMModule\0" "gtk-im-module\0"
|
||||
"Fontconfig/Timestamp\0" "gtk-fontconfig-timestamp\0"
|
||||
"Net/SoundThemeName\0" "gtk-sound-theme-name\0"
|
||||
"Net/EnableInputFeedbackSounds\0" "gtk-enable-input-feedback-sounds\0"
|
||||
"Net/EnableEventSounds\0" "gtk-enable-event-sounds\0";
|
||||
|
||||
More, from various places in gtk sources:
|
||||
|
||||
// more spread in gtk sources
|
||||
gtk-entry-select-on-focus
|
||||
gtk-cursor-blink
|
||||
gtk-cursor-blink-time
|
||||
gtk-split-cursor
|
||||
|
||||
*/
|
||||
@@ -463,6 +437,5 @@ gdk_screen_get_setting (GdkScreen *screen,
|
||||
}
|
||||
#endif
|
||||
|
||||
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) not handled\n", name));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+503
-421
File diff suppressed because it is too large
Load Diff
+111
-47
@@ -34,11 +34,7 @@
|
||||
#include "gdkwindowimpl.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
#include "gdkinput-win32.h"
|
||||
|
||||
#if 0
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include "gdkenumtypes.h"
|
||||
|
||||
static GdkColormap* gdk_window_impl_win32_get_colormap (GdkDrawable *drawable);
|
||||
static void gdk_window_impl_win32_set_colormap (GdkDrawable *drawable,
|
||||
@@ -54,9 +50,9 @@ static void gdk_window_impl_win32_finalize (GObject *object);
|
||||
static gpointer parent_class = NULL;
|
||||
static GSList *modal_window_stack = NULL;
|
||||
|
||||
static void update_style_bits (GdkWindow *window);
|
||||
static gboolean _gdk_window_get_functions (GdkWindow *window,
|
||||
GdkWMFunction *functions);
|
||||
static void update_style_bits (GdkWindow *window);
|
||||
static gboolean _gdk_window_get_functions (GdkWindow *window,
|
||||
GdkWMFunction *functions);
|
||||
|
||||
#define WINDOW_IS_TOPLEVEL(window) \
|
||||
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \
|
||||
@@ -699,6 +695,9 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
else
|
||||
impl->type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
|
||||
|
||||
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
|
||||
dwExStyle |= WS_EX_TOOLWINDOW;
|
||||
|
||||
if (private->parent)
|
||||
private->parent->children = g_list_prepend (private->parent->children, window);
|
||||
|
||||
@@ -752,6 +751,9 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
hparent,
|
||||
GDK_WINDOW_HWND (window)));
|
||||
|
||||
/* Add window handle to title */
|
||||
GDK_NOTE (MISC_OR_EVENTS, gdk_window_set_title (window, title));
|
||||
|
||||
g_free (wtitle);
|
||||
|
||||
if (draw_impl->handle == NULL)
|
||||
@@ -1026,6 +1028,8 @@ show_window_internal (GdkWindow *window,
|
||||
GdkWindowObject *private;
|
||||
HWND old_active_window;
|
||||
gboolean focus_on_map = TRUE;
|
||||
DWORD exstyle;
|
||||
HWND top;
|
||||
|
||||
private = (GdkWindowObject *) window;
|
||||
|
||||
@@ -1076,35 +1080,38 @@ show_window_internal (GdkWindow *window,
|
||||
focus_on_map = private->focus_on_map;
|
||||
}
|
||||
|
||||
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
if (private->state & GDK_WINDOW_STATE_BELOW)
|
||||
exstyle &= (~WS_EX_TOPMOST);
|
||||
|
||||
if (private->state & GDK_WINDOW_STATE_ABOVE)
|
||||
exstyle |= WS_EX_TOPMOST;
|
||||
|
||||
if (exstyle & WS_EX_TOPMOST)
|
||||
top = HWND_TOPMOST;
|
||||
else
|
||||
top = HWND_TOP;
|
||||
|
||||
/* Use SetWindowPos to show transparent windows so automatic redraws
|
||||
* in other windows can be suppressed.
|
||||
*/
|
||||
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
|
||||
if (exstyle & WS_EX_TRANSPARENT)
|
||||
{
|
||||
UINT flags = SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOMOVE | SWP_NOSIZE;
|
||||
|
||||
if (!raise)
|
||||
flags |= SWP_NOZORDER;
|
||||
if (!raise || 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), top, 0, 0, 0, 0, flags);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
old_active_window = GetActiveWindow ();
|
||||
|
||||
if (private->state & (GDK_WINDOW_STATE_BELOW | GDK_WINDOW_STATE_ABOVE))
|
||||
{
|
||||
DWORD exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
if (private->state & GDK_WINDOW_STATE_BELOW)
|
||||
exstyle &= (~WS_EX_TOPMOST);
|
||||
if (private->state & GDK_WINDOW_STATE_ABOVE)
|
||||
exstyle |= WS_EX_TOPMOST;
|
||||
|
||||
API_CALL (SetWindowLong, (GDK_WINDOW_HWND (window), GWL_EXSTYLE, exstyle));
|
||||
}
|
||||
|
||||
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
{
|
||||
gdk_window_fullscreen (window);
|
||||
@@ -1138,10 +1145,14 @@ show_window_internal (GdkWindow *window,
|
||||
if (focus_on_map && private->accept_focus)
|
||||
{
|
||||
SetForegroundWindow (GDK_WINDOW_HWND (window));
|
||||
if (top == HWND_TOPMOST)
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), top,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP,
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), top,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
@@ -1852,16 +1863,15 @@ get_effective_window_decorations (GdkWindow *window,
|
||||
return TRUE;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLBAR:
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
gdk_window_set_skip_taskbar_hint (window, TRUE);
|
||||
*decoration = GDK_DECOR_ALL | GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE;
|
||||
gdk_window_set_skip_pager_hint (window, TRUE);
|
||||
*decoration = (GDK_DECOR_ALL | GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
|
||||
return TRUE;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
return FALSE;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_SPLASHSCREEN:
|
||||
*decoration = (GDK_DECOR_ALL | GDK_DECOR_RESIZEH | GDK_DECOR_MENU
|
||||
| GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
|
||||
*decoration = (GDK_DECOR_ALL | GDK_DECOR_RESIZEH | GDK_DECOR_MENU |
|
||||
GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
|
||||
return TRUE;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_DOCK:
|
||||
@@ -1961,9 +1971,13 @@ gdk_window_set_title (GdkWindow *window,
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_title: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window), title));
|
||||
|
||||
GDK_NOTE (MISC_OR_EVENTS, title = g_strdup_printf ("%p %s", GDK_WINDOW_HWND (window), title));
|
||||
|
||||
wtitle = g_utf8_to_utf16 (title, -1, NULL, NULL, NULL);
|
||||
API_CALL (SetWindowTextW, (GDK_WINDOW_HWND (window), wtitle));
|
||||
g_free (wtitle);
|
||||
|
||||
GDK_NOTE (MISC_OR_EVENTS, g_free ((char *) title));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1992,6 +2006,8 @@ gdk_window_set_transient_for (GdkWindow *window,
|
||||
window_id = GDK_WINDOW_HWND (window);
|
||||
parent_id = parent != NULL ? GDK_WINDOW_HWND (parent) : NULL;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_transient_for: %p: %p\n", window_id, parent_id));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) || (parent && GDK_WINDOW_DESTROYED (parent)))
|
||||
{
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -2879,19 +2895,29 @@ update_single_bit (LONG *style,
|
||||
static void
|
||||
update_style_bits (GdkWindow *window)
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
GdkWindowImplWin32 *impl = (GdkWindowImplWin32 *)private->impl;
|
||||
GdkWMDecoration decorations;
|
||||
LONG old_style, new_style, exstyle;
|
||||
LONG old_style, new_style, old_exstyle, new_exstyle;
|
||||
gboolean all;
|
||||
RECT rect, before, after;
|
||||
|
||||
old_style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
old_exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
GetClientRect (GDK_WINDOW_HWND (window), &before);
|
||||
after = before;
|
||||
AdjustWindowRectEx (&before, old_style, FALSE, exstyle);
|
||||
AdjustWindowRectEx (&before, old_style, FALSE, old_exstyle);
|
||||
|
||||
new_style = old_style;
|
||||
new_exstyle = old_exstyle;
|
||||
|
||||
if (private->window_type == GDK_WINDOW_TEMP ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
|
||||
new_exstyle |= WS_EX_TOOLWINDOW;
|
||||
else
|
||||
new_exstyle &= ~WS_EX_TOOLWINDOW;
|
||||
|
||||
if (get_effective_window_decorations (window, &decorations))
|
||||
{
|
||||
all = (decorations & GDK_DECOR_ALL);
|
||||
@@ -2903,21 +2929,34 @@ update_style_bits (GdkWindow *window)
|
||||
update_single_bit (&new_style, all, decorations & GDK_DECOR_MAXIMIZE, WS_MAXIMIZEBOX);
|
||||
}
|
||||
|
||||
if (old_style == new_style)
|
||||
if (old_style == new_style && old_exstyle == new_exstyle )
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("update_style_bits: %p: no change\n",
|
||||
GDK_WINDOW_HWND (window)));
|
||||
return;
|
||||
}
|
||||
|
||||
GDK_NOTE (MISC, g_print ("update_style_bits: %p: %s => %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_style_to_string (old_style),
|
||||
_gdk_win32_window_style_to_string (new_style)));
|
||||
if (old_style != new_style)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("update_style_bits: %p: STYLE: %s => %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_style_to_string (old_style),
|
||||
_gdk_win32_window_style_to_string (new_style)));
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, new_style);
|
||||
}
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, new_style);
|
||||
if (old_exstyle != new_exstyle)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("update_style_bits: %p: EXSTYLE: %s => %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_exstyle_to_string (old_exstyle),
|
||||
_gdk_win32_window_exstyle_to_string (new_exstyle)));
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE, new_exstyle);
|
||||
}
|
||||
|
||||
AdjustWindowRectEx (&after, new_style, FALSE, exstyle);
|
||||
AdjustWindowRectEx (&after, new_style, FALSE, new_exstyle);
|
||||
|
||||
GetWindowRect (GDK_WINDOW_HWND (window), &rect);
|
||||
rect.left += after.left - before.left;
|
||||
@@ -3492,13 +3531,18 @@ gdk_window_unfullscreen (GdkWindow *window)
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_keep_above (GdkWindow *window, gboolean setting)
|
||||
gdk_window_set_keep_above (GdkWindow *window,
|
||||
gboolean setting)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_keep_above: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
setting ? "YES" : "NO"));
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
{
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
@@ -3513,13 +3557,18 @@ gdk_window_set_keep_above (GdkWindow *window, gboolean setting)
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_keep_below (GdkWindow *window, gboolean setting)
|
||||
gdk_window_set_keep_below (GdkWindow *window,
|
||||
gboolean setting)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_keep_below: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
setting ? "YES" : "NO"));
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
{
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
@@ -3564,6 +3613,10 @@ gdk_window_set_modal_hint (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_modal_hint: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
modal ? "YES" : "NO"));
|
||||
|
||||
private = (GdkWindowObject*) window;
|
||||
|
||||
if (modal == private->modal_hint)
|
||||
@@ -3602,13 +3655,13 @@ gdk_window_set_skip_taskbar_hint (GdkWindow *window,
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_skip_taskbar_hint: %p: %s, doing nothing\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
skips_taskbar ? "YES" : "NO"));
|
||||
|
||||
// ### TODO: Need to figure out what to do here.
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_skip_taskbar_hint: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
skips_taskbar ? "TRUE" : "FALSE"));
|
||||
|
||||
if (skips_taskbar)
|
||||
{
|
||||
if (owner == NULL)
|
||||
@@ -3642,6 +3695,10 @@ gdk_window_set_skip_pager_hint (GdkWindow *window,
|
||||
gboolean skips_pager)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_skip_pager_hint: %p: %s, doing nothing\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
skips_pager ? "YES" : "NO"));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3653,8 +3710,15 @@ gdk_window_set_type_hint (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_type_hint: %p: %d\n",
|
||||
GDK_WINDOW_HWND (window), hint));
|
||||
GDK_NOTE (MISC,
|
||||
G_STMT_START{
|
||||
static GEnumClass *class = NULL;
|
||||
if (!class)
|
||||
class = g_type_class_ref (GDK_TYPE_WINDOW_TYPE_HINT);
|
||||
g_print ("gdk_window_set_type_hint: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
g_enum_get_value (class, hint)->value_name);
|
||||
}G_STMT_END);
|
||||
|
||||
((GdkWindowImplWin32 *)((GdkWindowObject *)window)->impl)->type_hint = hint;
|
||||
|
||||
|
||||
@@ -86,9 +86,16 @@ static const char *const precache_atoms[] = {
|
||||
"UTF8_STRING",
|
||||
"WM_CLIENT_LEADER",
|
||||
"WM_DELETE_WINDOW",
|
||||
"WM_ICON_NAME",
|
||||
"WM_LOCALE_NAME",
|
||||
"WM_NAME",
|
||||
"WM_PROTOCOLS",
|
||||
"WM_TAKE_FOCUS",
|
||||
"WM_WINDOW_ROLE",
|
||||
"_NET_ACTIVE_WINDOW",
|
||||
"_NET_CURRENT_DESKTOP",
|
||||
"_NET_FRAME_EXTENTS",
|
||||
"_NET_STARTUP_ID",
|
||||
"_NET_WM_CM_S0",
|
||||
"_NET_WM_DESKTOP",
|
||||
"_NET_WM_ICON",
|
||||
@@ -97,10 +104,15 @@ static const char *const precache_atoms[] = {
|
||||
"_NET_WM_PID",
|
||||
"_NET_WM_PING",
|
||||
"_NET_WM_STATE",
|
||||
"_NET_WM_STATE_STICKY",
|
||||
"_NET_WM_STATE_ABOVE",
|
||||
"_NET_WM_STATE_BELOW",
|
||||
"_NET_WM_STATE_FULLSCREEN",
|
||||
"_NET_WM_STATE_MODAL",
|
||||
"_NET_WM_STATE_MAXIMIZED_VERT",
|
||||
"_NET_WM_STATE_MAXIMIZED_HORZ",
|
||||
"_NET_WM_STATE_FULLSCREEN",
|
||||
"_NET_WM_STATE_SKIP_TASKBAR",
|
||||
"_NET_WM_STATE_SKIP_PAGER",
|
||||
"_NET_WM_STATE_STICKY",
|
||||
"_NET_WM_SYNC_REQUEST",
|
||||
"_NET_WM_SYNC_REQUEST_COUNTER",
|
||||
"_NET_WM_WINDOW_TYPE",
|
||||
@@ -169,6 +181,8 @@ gdk_display_open (const gchar *display_name)
|
||||
XAddConnectionWatch (xdisplay, gdk_internal_connection_watch, NULL);
|
||||
#endif /* HAVE_X11R6 */
|
||||
|
||||
_gdk_x11_precache_atoms (display, precache_atoms, G_N_ELEMENTS (precache_atoms));
|
||||
|
||||
/* RandR must be initialized before we initialize the screens */
|
||||
display_x11->have_randr12 = FALSE;
|
||||
#ifdef HAVE_RANDR
|
||||
@@ -181,6 +195,8 @@ gdk_display_open (const gchar *display_name)
|
||||
|
||||
if ((major == 1 && minor >= 2) || major > 1)
|
||||
display_x11->have_randr12 = TRUE;
|
||||
|
||||
gdk_x11_register_standard_event_type (display, display_x11->xrandr_event_base, RRNumberEvents);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -206,8 +222,6 @@ gdk_display_open (const gchar *display_name)
|
||||
attr.height = 10;
|
||||
attr.event_mask = 0;
|
||||
|
||||
_gdk_x11_precache_atoms (display, precache_atoms, G_N_ELEMENTS (precache_atoms));
|
||||
|
||||
display_x11->leader_gdk_window = gdk_window_new (GDK_SCREEN_X11 (display_x11->default_screen)->root_window,
|
||||
&attr, GDK_WA_X | GDK_WA_Y);
|
||||
(_gdk_x11_window_get_toplevel (display_x11->leader_gdk_window))->is_leader = TRUE;
|
||||
@@ -236,7 +250,17 @@ gdk_display_open (const gchar *display_name)
|
||||
#ifdef HAVE_XCOMPOSITE
|
||||
if (XCompositeQueryExtension (display_x11->xdisplay,
|
||||
&ignore, &ignore))
|
||||
display_x11->have_xcomposite = TRUE;
|
||||
{
|
||||
int major, minor;
|
||||
|
||||
XCompositeQueryVersion (display_x11->xdisplay, &major, &minor);
|
||||
|
||||
/* Prior to Composite version 0.4, composited windows clipped their
|
||||
* parents, so you had to use IncludeInferiors to draw to the parent
|
||||
* This isn't useful for our purposes, so require 0.4
|
||||
*/
|
||||
display_x11->have_xcomposite = major > 0 || (major == 0 && minor >= 4);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
display_x11->have_xcomposite = FALSE;
|
||||
|
||||
+14
-11
@@ -2614,23 +2614,20 @@ fetch_net_wm_check_window (GdkScreen *screen)
|
||||
gulong bytes_after;
|
||||
guchar *data;
|
||||
Window *xwindow;
|
||||
|
||||
/* This function is very slow on every call if you are not running a
|
||||
* spec-supporting WM. For now not optimized, because it isn't in
|
||||
* any critical code paths, but if you used it somewhere that had to
|
||||
* be fast you want to avoid "GTK is slow with old WMs" complaints.
|
||||
* Probably at that point the function should be changed to query
|
||||
* _NET_SUPPORTING_WM_CHECK only once every 10 seconds or something.
|
||||
*/
|
||||
GTimeVal tv;
|
||||
|
||||
screen_x11 = GDK_SCREEN_X11 (screen);
|
||||
display = screen_x11->display;
|
||||
|
||||
g_return_if_fail (GDK_DISPLAY_X11 (display)->trusted_client);
|
||||
|
||||
if (screen_x11->wmspec_check_window != None)
|
||||
return; /* already have it */
|
||||
|
||||
g_get_current_time (&tv);
|
||||
|
||||
if (ABS (tv.tv_sec - screen_x11->last_wmspec_check_time) < 15)
|
||||
return; /* we've checked recently */
|
||||
|
||||
screen_x11->last_wmspec_check_time = tv.tv_sec;
|
||||
|
||||
data = NULL;
|
||||
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), screen_x11->xroot_window,
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTING_WM_CHECK"),
|
||||
@@ -2646,6 +2643,12 @@ fetch_net_wm_check_window (GdkScreen *screen)
|
||||
|
||||
xwindow = (Window *)data;
|
||||
|
||||
if (screen_x11->wmspec_check_window == *xwindow)
|
||||
{
|
||||
XFree (xwindow);
|
||||
return;
|
||||
}
|
||||
|
||||
gdk_error_trap_push ();
|
||||
|
||||
/* Find out if this WM goes away, so we can reset everything. */
|
||||
|
||||
+10
-1
@@ -894,6 +894,11 @@ void
|
||||
_gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
XEvent *event)
|
||||
{
|
||||
gint width, height;
|
||||
|
||||
width = gdk_screen_get_width (screen);
|
||||
height = gdk_screen_get_height (screen);
|
||||
|
||||
#ifdef HAVE_RANDR
|
||||
if (!XRRUpdateConfiguration (event))
|
||||
return;
|
||||
@@ -909,7 +914,11 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
else
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
if (width == gdk_screen_get_width (screen) &&
|
||||
height == gdk_screen_get_height (screen))
|
||||
return;
|
||||
|
||||
_gdk_x11_screen_process_monitors_change (screen);
|
||||
g_signal_emit_by_name (screen, "size_changed");
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ struct _GdkScreenX11
|
||||
GdkWindow *root_window;
|
||||
|
||||
/* Window manager */
|
||||
long last_wmspec_check_time;
|
||||
Window wmspec_check_window;
|
||||
char *window_manager_name;
|
||||
/* TRUE if wmspec_check_window has changed since last
|
||||
|
||||
@@ -189,8 +189,11 @@ gdk_test_simulate_button (GdkWindow *window,
|
||||
0, /* serial */
|
||||
1, /* send_event */
|
||||
};
|
||||
gboolean success;
|
||||
|
||||
g_return_val_if_fail (button_pressrelease == GDK_BUTTON_PRESS || button_pressrelease == GDK_BUTTON_RELEASE, FALSE);
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
|
||||
if (!GDK_WINDOW_IS_MAPPED (window))
|
||||
return FALSE;
|
||||
screen = gdk_colormap_get_screen (gdk_drawable_get_colormap (window));
|
||||
@@ -218,7 +221,7 @@ gdk_test_simulate_button (GdkWindow *window,
|
||||
&xev.subwindow);
|
||||
if (!xev.subwindow)
|
||||
xev.subwindow = xev.window;
|
||||
gboolean success = xev.same_screen;
|
||||
success = xev.same_screen;
|
||||
success &= 0 != XWarpPointer (xev.display, None, xev.window, 0, 0, 0, 0, xev.x, xev.y);
|
||||
success &= 0 != XSendEvent (xev.display, xev.window, True, button_pressrelease == GDK_BUTTON_PRESS ? ButtonPressMask : ButtonReleaseMask, (XEvent*) &xev);
|
||||
XSync (xev.display, False);
|
||||
|
||||
+4
-14
@@ -46,11 +46,7 @@ bin/gdk-pixbuf-csource.exe
|
||||
bin/gtk-builder-convert
|
||||
bin/gtk-demo.exe
|
||||
bin/gtk-update-icon-cache.exe
|
||||
share/man/man1/gdk-builder-convert.1
|
||||
share/man/man1/gdk-pixbuf-csource.1
|
||||
share/man/man1/gdk-update-icon-cache.1
|
||||
share/man/man1/gtk-pixbuf-query-loaders.1
|
||||
share/man/man1/gtk-query-immodules-2.0.1
|
||||
share/man
|
||||
lib/libgdk_pixbuf-@GTK_API_VERSION@.dll.a
|
||||
lib/gdk_pixbuf-@GTK_API_VERSION@.lib
|
||||
lib/libgdk-win32-@GTK_API_VERSION@.dll.a
|
||||
@@ -60,16 +56,10 @@ lib/gtk-win32-@GTK_API_VERSION@.lib
|
||||
lib/libgailutil.dll.a
|
||||
lib/gailutil.lib
|
||||
lib/gtk-2.0/include
|
||||
lib/pkgconfig/gdk-pixbuf-2.0.pc
|
||||
lib/pkgconfig/gdk-2.0.pc
|
||||
lib/pkgconfig/gdk-win32-2.0.pc
|
||||
lib/pkgconfig/gtk+-2.0.pc
|
||||
lib/pkgconfig/gtk+-win32-2.0.pc
|
||||
share/aclocal/gtk-2.0.m4
|
||||
lib/pkgconfig
|
||||
share/aclocal
|
||||
share/gtk-2.0
|
||||
share/gtk-doc/html/gdk-pixbuf
|
||||
share/gtk-doc/html/gdk
|
||||
share/gtk-doc/html/gtk
|
||||
share/gtk-doc
|
||||
EOF
|
||||
|
||||
zip -r $DEVZIP share/doc/gtk+-dev-@GTK_VERSION@
|
||||
|
||||
+30
-2
@@ -25,6 +25,7 @@ URL_COMPOSE = 'http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=blob_plain
|
||||
URL_KEYSYMSTXT = "http://www.cl.cam.ac.uk/~mgk25/ucs/keysyms.txt"
|
||||
URL_GDKKEYSYMSH = "http://svn.gnome.org/svn/gtk%2B/trunk/gdk/gdkkeysyms.h"
|
||||
URL_UNICODEDATATXT = 'http://www.unicode.org/Public/5.0.0/ucd/UnicodeData.txt'
|
||||
FILENAME_COMPOSE_SUPPLEMENTARY = 'gtk-compose-lookaside.txt'
|
||||
|
||||
# We currently support keysyms of size 2; once upstream xorg gets sorted,
|
||||
# we might produce some tables with size 2 and some with size 4.
|
||||
@@ -421,17 +422,36 @@ except:
|
||||
print "Unexpected error: ", sys.exc_info()[0]
|
||||
sys.exit(-1)
|
||||
|
||||
""" Look if there is a lookaside (supplementary) compose file in the current
|
||||
directory, and if so, open, then merge with upstream Compose file.
|
||||
"""
|
||||
try:
|
||||
composefile_lookaside = open(FILENAME_COMPOSE_SUPPLEMENTARY, 'r')
|
||||
except IOError, (errno, strerror):
|
||||
if not opt_quiet:
|
||||
print "I/O error(%s): %s" % (errno, strerror)
|
||||
print "Did not find lookaside compose file. Continuing..."
|
||||
except:
|
||||
print "Unexpected error: ", sys.exc_info()[0]
|
||||
sys.exit(-1)
|
||||
|
||||
xorg_compose_sequences_raw = []
|
||||
for seq in composefile.readlines():
|
||||
xorg_compose_sequences_raw.append(seq)
|
||||
for seq in composefile_lookaside.readlines():
|
||||
xorg_compose_sequences_raw.append(seq)
|
||||
|
||||
""" Parse the compose file in xorg_compose_sequences"""
|
||||
xorg_compose_sequences = []
|
||||
xorg_compose_sequences_algorithmic = []
|
||||
linenum_compose = 0
|
||||
for line in composefile.readlines():
|
||||
for line in xorg_compose_sequences_raw:
|
||||
linenum_compose += 1
|
||||
line = line.strip()
|
||||
if line is "" or match("^XCOMM", line) or match("^#", line):
|
||||
continue
|
||||
|
||||
line = line[:-1]
|
||||
#line = line[:-1]
|
||||
components = split(':', line)
|
||||
if len(components) != 2:
|
||||
print "Invalid line %(linenum_compose)d in %(filename)s: No sequence\
|
||||
@@ -484,6 +504,14 @@ for line in composefile.readlines():
|
||||
"0x0342" in sequence or \
|
||||
"0x0314" in sequence:
|
||||
continue
|
||||
if "dead_belowring" in sequence or\
|
||||
"dead_belowcomma" in sequence or\
|
||||
"dead_belowmacron" in sequence or\
|
||||
"dead_belowtilde" in sequence or\
|
||||
"dead_belowbreve" in sequence or\
|
||||
"dead_belowdiaeresis" in sequence or\
|
||||
"dead_belowcircumflex" in sequence:
|
||||
continue
|
||||
#for i in range(len(sequence)):
|
||||
# if sequence[i] == "0x0342":
|
||||
# sequence[i] = "dead_tilde"
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
#
|
||||
# This file contains the compose sequences that GTK+ used to have until GTK+ 2.12
|
||||
# but are not found anymore at the upstream Compose file at X.Org.
|
||||
# When updating gtkimcontextsimpleseqs.h with compose-parse.py,
|
||||
# we include this file as well. There are 15 conflicts currently
|
||||
# in the compose sequences, and we currently favour the sequences from
|
||||
# this file (against the upstream X.Org file). For more, see
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=557420
|
||||
#
|
||||
|
||||
<Greek_accentdieresis> <Greek_iota> : "ἴ" U0390
|
||||
<Greek_accentdieresis> <Greek_upsilon> : "ΐ" U03B0
|
||||
<Multi_key> <B> <period> : "Ḃ" U1E02
|
||||
<Multi_key> <b> <period> : "ḃ" U1E03
|
||||
<Multi_key> <D> <period> : "Ḋ" U1E0A
|
||||
<Multi_key> <d> <period> : "ḋ" U1E0B
|
||||
<Multi_key> <F> <period> : "Ḟ" U1E1E
|
||||
<Multi_key> <f> <period> : "ḟ" U1E1F
|
||||
<Multi_key> <M> <period> : "Ṁ" U1E40
|
||||
<Multi_key> <S> <period> : "Ṡ" U1E60
|
||||
<Multi_key> <P> <period> : "Ṗ" U1E56
|
||||
<Multi_key> <p> <period> : "ṗ" U1E57
|
||||
<Multi_key> <s> <period> : "ṡ" U1E61
|
||||
<Multi_key> <T> <period> : "Ṫ" U1E6A
|
||||
<Multi_key> <t> <period> : "ṫ" U1E6B
|
||||
<Multi_key> <e> <period> : "ė" U0117
|
||||
<Multi_key> <slash> <C> : "¢" U00A2
|
||||
<Multi_key> <C> <slash> : "¢" U00A2
|
||||
<Multi_key> <C> <bar> : "¢" U00A2
|
||||
<Multi_key> <bar> <C> : "¢" U00A2
|
||||
<Multi_key> <minus> <l> : "£" U00A3
|
||||
<Multi_key> <equal> <L> : "£" U00A3
|
||||
<Multi_key> <equal> <l> : "£" U00A3
|
||||
<Multi_key> <L> <equal> : "£" U00A3
|
||||
<Multi_key> <l> <minus> : "£" U00A3
|
||||
<Multi_key> <l> <equal> : "£" U00A3
|
||||
<Multi_key> <0> <X> : "¤" U00A4
|
||||
<Multi_key> <0> <x> : "¤" U00A4
|
||||
<Multi_key> <O> <X> : "¤" U00A4
|
||||
<Multi_key> <O> <x> : "¤" U00A4
|
||||
<Multi_key> <X> <0> : "¤" U00A4
|
||||
<Multi_key> <X> <O> : "¤" U00A4
|
||||
<Multi_key> <X> <o> : "¤" U00A4
|
||||
<Multi_key> <o> <X> : "¤" U00A4
|
||||
<Multi_key> <x> <0> : "¤" U00A4
|
||||
<Multi_key> <x> <O> : "¤" U00A4
|
||||
<Multi_key> <minus> <Y> : "¥" U00A5
|
||||
<Multi_key> <minus> <y> : "¥" U00A5
|
||||
<Multi_key> <equal> <y> : "¥" U00A5
|
||||
<Multi_key> <Y> <minus> : "¥" U00A5
|
||||
<Multi_key> <y> <minus> : "¥" U00A5
|
||||
<Multi_key> <y> <equal> : "¥" U00A5
|
||||
<Multi_key> <exclam> <S> : "§" U00A7
|
||||
<Multi_key> <exclam> <s> : "§" U00A7
|
||||
<Multi_key> <0> <S> : "§" U00A7
|
||||
<Multi_key> <0> <s> : "§" U00A7
|
||||
<Multi_key> <O> <S> : "§" U00A7
|
||||
<Multi_key> <S> <exclam> : "§" U00A7
|
||||
<Multi_key> <S> <0> : "§" U00A7
|
||||
<Multi_key> <S> <O> : "§" U00A7
|
||||
<Multi_key> <s> <exclam> : "§" U00A7
|
||||
<Multi_key> <s> <0> : "§" U00A7
|
||||
<Multi_key> <quotedbl> <quotedbl> : "¨" U00A8
|
||||
<Multi_key> <parenleft> <c> : "©" U00A9
|
||||
<Multi_key> <0> <C> : "©" U00A9
|
||||
<Multi_key> <0> <c> : "©" U00A9
|
||||
<Multi_key> <C> <0> : "©" U00A9
|
||||
<Multi_key> <C> <O> : "©" U00A9
|
||||
<Multi_key> <C> <o> : "©" U00A9
|
||||
<Multi_key> <c> <0> : "©" U00A9
|
||||
<Multi_key> <c> <O> : "©" U00A9
|
||||
<Multi_key> <c> <o> : "©" U00A9
|
||||
<Multi_key> <A> <underscore> : "ª" U00AA
|
||||
<Multi_key> <underscore> <A> : "ª" U00AA
|
||||
<Multi_key> <underscore> <a> : "ª" U00AA
|
||||
<Multi_key> <a> <underscore> : "ª" U00AA
|
||||
<Multi_key> <C> <comma> : "Ç" U00C7
|
||||
<Multi_key> <minus> <minus> <space> : "" U00AD
|
||||
<Multi_key> <parenleft> <r> : "®" U00AE
|
||||
<Multi_key> <R> <O> : "®" U00AE
|
||||
<Multi_key> <minus> <asciicircum> : "¯" U00AF
|
||||
<Multi_key> <asciicircum> <minus> : "¯" U00AF
|
||||
<Multi_key> <asciicircum> <underscore> : "¯" U00AF
|
||||
<Multi_key> <underscore> <asciicircum> : "¯" U00AF
|
||||
<Multi_key> <underscore> <underscore> : "¯" U00AF
|
||||
<Multi_key> <asterisk> <0> : "°" U00B0
|
||||
<Multi_key> <0> <asterisk> : "°" U00B0
|
||||
<Multi_key> <0> <asciicircum> : "°" U00B0
|
||||
<Multi_key> <asciicircum> <0> : "°" U00B0
|
||||
<Multi_key> <minus> <plus> : "±" U00B1
|
||||
<Multi_key> <2> <S> : "²" U00B2
|
||||
<Multi_key> <2> <asciicircum> : "²" U00B2
|
||||
<Multi_key> <2> <s> : "²" U00B2
|
||||
<Multi_key> <S> <2> : "²" U00B2
|
||||
<Multi_key> <s> <2> : "²" U00B2
|
||||
<Multi_key> <3> <S> : "³" U00B3
|
||||
<Multi_key> <3> <asciicircum> : "³" U00B3
|
||||
<Multi_key> <3> <s> : "³" U00B3
|
||||
<Multi_key> <S> <3> : "³" U00B3
|
||||
<Multi_key> <s> <3> : "³" U00B3
|
||||
<Multi_key> <apostrophe> <apostrophe> : "´" U00B4
|
||||
<Multi_key> <slash> <U> : "µ" U00B5
|
||||
<Multi_key> <slash> <u> : "µ" U00B5
|
||||
<Multi_key> <U> <slash> : "µ" U00B5
|
||||
<Multi_key> <u> <slash> : "µ" U00B5
|
||||
<Multi_key> <exclam> <P> : "¶" U00B6
|
||||
<Multi_key> <exclam> <p> : "¶" U00B6
|
||||
<Multi_key> <period> <asciicircum> : "·" U00B7
|
||||
<Multi_key> <asciicircum> <period> : "·" U00B7
|
||||
<Multi_key> <comma> <comma> : "¸" U00B8
|
||||
<Multi_key> <1> <S> : "¹" U00B9
|
||||
<Multi_key> <1> <asciicircum> : "¹" U00B9
|
||||
<Multi_key> <1> <s> : "¹" U00B9
|
||||
<Multi_key> <S> <1> : "¹" U00B9
|
||||
<Multi_key> <s> <1> : "¹" U00B9
|
||||
<Multi_key> <O> <underscore> : "º" U00BA
|
||||
<Multi_key> <underscore> <O> : "º" U00BA
|
||||
<Multi_key> <underscore> <o> : "º" U00BA
|
||||
<Multi_key> <o> <underscore> : "º" U00BA
|
||||
<Multi_key> <A> <grave> : "À" U00C0
|
||||
<Multi_key> <A> <apostrophe> : "Á" U00C1
|
||||
<Multi_key> <A> <acute> : "Á" U00C1
|
||||
<Multi_key> <greater> <A> : "Â" U00C2
|
||||
<Multi_key> <A> <greater> : "Â" U00C2
|
||||
<Multi_key> <A> <asciicircum> : "Â" U00C2
|
||||
<Multi_key> <minus> <A> : "Ã" U00C3
|
||||
<Multi_key> <A> <minus> : "Ã" U00C3
|
||||
<Multi_key> <A> <asciitilde> : "Ã" U00C3
|
||||
<Multi_key> <A> <quotedbl> : "Ä" U00C4
|
||||
<Multi_key> <A> <diaeresis> : "Ä" U00C4
|
||||
<Multi_key> <diaeresis> <A> : "Ä" U00C4
|
||||
<Multi_key> <asterisk> <A> : "Å" U00C5
|
||||
<Multi_key> <A> <asterisk> : "Å" U00C5
|
||||
<Multi_key> <A> <A> : "Å" U00C5
|
||||
<Multi_key> <space> <less> : "ˇ" U02C7
|
||||
<Multi_key> <less> <space> : "ˇ" U02C7
|
||||
<Multi_key> <E> <grave> : "È" U00C8
|
||||
<Multi_key> <E> <apostrophe> : "É" U00C9
|
||||
<Multi_key> <E> <acute> : "É" U00C9
|
||||
<Multi_key> <greater> <E> : "Ê" U00CA
|
||||
<Multi_key> <E> <greater> : "Ê" U00CA
|
||||
<Multi_key> <E> <asciicircum> : "Ê" U00CA
|
||||
<Multi_key> <E> <quotedbl> : "Ë" U00CB
|
||||
<Multi_key> <E> <diaeresis> : "Ë" U00CB
|
||||
<Multi_key> <diaeresis> <E> : "Ë" U00CB
|
||||
<Multi_key> <I> <grave> : "Ì" U00CC
|
||||
<Multi_key> <I> <apostrophe> : "Í" U00CD
|
||||
<Multi_key> <I> <acute> : "Í" U00CD
|
||||
<Multi_key> <greater> <I> : "Î" U00CE
|
||||
<Multi_key> <I> <greater> : "Î" U00CE
|
||||
<Multi_key> <I> <asciicircum> : "Î" U00CE
|
||||
<Multi_key> <I> <quotedbl> : "Ï" U00CF
|
||||
<Multi_key> <I> <diaeresis> : "Ï" U00CF
|
||||
<Multi_key> <diaeresis> <I> : "Ï" U00CF
|
||||
<Multi_key> <minus> <N> : "Ñ" U00D1
|
||||
<Multi_key> <N> <minus> : "Ñ" U00D1
|
||||
<Multi_key> <N> <asciitilde> : "Ñ" U00D1
|
||||
<Multi_key> <O> <grave> : "Ò" U00D2
|
||||
<Multi_key> <O> <apostrophe> : "Ó" U00D3
|
||||
<Multi_key> <O> <acute> : "Ó" U00D3
|
||||
<Multi_key> <greater> <O> : "Ô" U00D4
|
||||
<Multi_key> <O> <greater> : "Ô" U00D4
|
||||
<Multi_key> <O> <asciicircum> : "Ô" U00D4
|
||||
<Multi_key> <minus> <O> : "Õ" U00D5
|
||||
<Multi_key> <O> <minus> : "Õ" U00D5
|
||||
<Multi_key> <O> <asciitilde> : "Õ" U00D5
|
||||
<Multi_key> <O> <quotedbl> : "Ö" U00D6
|
||||
<Multi_key> <O> <diaeresis> : "Ö" U00D6
|
||||
<Multi_key> <diaeresis> <O> : "Ö" U00D6
|
||||
<Multi_key> <space> <parenleft> : "˘" U02D8
|
||||
<Multi_key> <parenleft> <space> : "˘" U02D8
|
||||
<Multi_key> <U> <grave> : "Ù" U00D9
|
||||
<Multi_key> <U> <apostrophe> : "Ú" U00DA
|
||||
<Multi_key> <U> <acute> : "Ú" U00DA
|
||||
<Multi_key> <greater> <U> : "Û" U00DB
|
||||
<Multi_key> <U> <greater> : "Û" U00DB
|
||||
<Multi_key> <U> <asciicircum> : "Û" U00DB
|
||||
<Multi_key> <U> <quotedbl> : "Ü" U00DC
|
||||
<Multi_key> <U> <diaeresis> : "Ü" U00DC
|
||||
<Multi_key> <diaeresis> <U> : "Ü" U00DC
|
||||
<Multi_key> <Y> <apostrophe> : "Ý" U00DD
|
||||
<Multi_key> <Y> <acute> : "Ý" U00DD
|
||||
<Multi_key> <a> <grave> : "à" U00E0
|
||||
<Multi_key> <a> <apostrophe> : "á" U00E1
|
||||
<Multi_key> <a> <acute> : "á" U00E1
|
||||
<Multi_key> <greater> <a> : "â" U00E2
|
||||
<Multi_key> <a> <greater> : "â" U00E2
|
||||
<Multi_key> <a> <asciicircum> : "â" U00E2
|
||||
<Multi_key> <minus> <a> : "ã" U00E3
|
||||
<Multi_key> <a> <minus> : "ã" U00E3
|
||||
<Multi_key> <a> <asciitilde> : "ã" U00E3
|
||||
<Multi_key> <a> <quotedbl> : "ä" U00E4
|
||||
<Multi_key> <a> <diaeresis> : "ä" U00E4
|
||||
<Multi_key> <diaeresis> <a> : "ä" U00E4
|
||||
<Multi_key> <asterisk> <a> : "å" U00E5
|
||||
<Multi_key> <a> <asterisk> : "å" U00E5
|
||||
<Multi_key> <a> <a> : "å" U00E5
|
||||
<Multi_key> <c> <comma> : "ç" U00E7
|
||||
<Multi_key> <e> <grave> : "è" U00E8
|
||||
<Multi_key> <e> <apostrophe> : "é" U00E9
|
||||
<Multi_key> <e> <acute> : "é" U00E9
|
||||
<Multi_key> <greater> <e> : "ê" U00EA
|
||||
<Multi_key> <e> <greater> : "ê" U00EA
|
||||
<Multi_key> <e> <asciicircum> : "ê" U00EA
|
||||
<Multi_key> <e> <quotedbl> : "ë" U00EB
|
||||
<Multi_key> <e> <diaeresis> : "ë" U00EB
|
||||
<Multi_key> <diaeresis> <e> : "ë" U00EB
|
||||
<Multi_key> <i> <grave> : "ì" U00EC
|
||||
<Multi_key> <i> <apostrophe> : "í" U00ED
|
||||
<Multi_key> <i> <acute> : "í" U00ED
|
||||
<Multi_key> <greater> <i> : "î" U00EE
|
||||
<Multi_key> <i> <greater> : "î" U00EE
|
||||
<Multi_key> <i> <asciicircum> : "î" U00EE
|
||||
<Multi_key> <i> <quotedbl> : "ï" U00EF
|
||||
<Multi_key> <i> <diaeresis> : "ï" U00EF
|
||||
<Multi_key> <diaeresis> <i> : "ï" U00EF
|
||||
<Multi_key> <minus> <n> : "ñ" U00F1
|
||||
<Multi_key> <n> <minus> : "ñ" U00F1
|
||||
<Multi_key> <n> <asciitilde> : "ñ" U00F1
|
||||
<Multi_key> <o> <grave> : "ò" U00F2
|
||||
<Multi_key> <o> <apostrophe> : "ó" U00F3
|
||||
<Multi_key> <o> <acute> : "ó" U00F3
|
||||
<Multi_key> <greater> <o> : "ô" U00F4
|
||||
<Multi_key> <o> <greater> : "ô" U00F4
|
||||
<Multi_key> <o> <asciicircum> : "ô" U00F4
|
||||
<Multi_key> <minus> <o> : "õ" U00F5
|
||||
<Multi_key> <o> <minus> : "õ" U00F5
|
||||
<Multi_key> <o> <asciitilde> : "õ" U00F5
|
||||
<Multi_key> <o> <quotedbl> : "ö" U00F6
|
||||
<Multi_key> <o> <diaeresis> : "ö" U00F6
|
||||
<Multi_key> <diaeresis> <o> : "ö" U00F6
|
||||
<Multi_key> <o> <slash> : "ø" U00F8
|
||||
<Multi_key> <u> <grave> : "ù" U00F9
|
||||
<Multi_key> <u> <apostrophe> : "ú" U00FA
|
||||
<Multi_key> <u> <acute> : "ú" U00FA
|
||||
<Multi_key> <greater> <u> : "û" U00FB
|
||||
<Multi_key> <u> <greater> : "û" U00FB
|
||||
<Multi_key> <u> <asciicircum> : "û" U00FB
|
||||
<Multi_key> <u> <quotedbl> : "ü" U00FC
|
||||
<Multi_key> <u> <diaeresis> : "ü" U00FC
|
||||
<Multi_key> <diaeresis> <u> : "ü" U00FC
|
||||
<Multi_key> <y> <apostrophe> : "ý" U00FD
|
||||
<Multi_key> <y> <acute> : "ý" U00FD
|
||||
<Multi_key> <y> <quotedbl> : "ÿ" U00FF
|
||||
<Multi_key> <y> <diaeresis> : "ÿ" U00FF
|
||||
<Multi_key> <diaeresis> <y> : "ÿ" U00FF
|
||||
<Multi_key> <parenleft> <A> : "Ă" U0102
|
||||
<Multi_key> <A> <parenleft> : "Ă" U0102
|
||||
<Multi_key> <parenleft> <a> : "ă" U0103
|
||||
<Multi_key> <a> <parenleft> : "ă" U0103
|
||||
<Multi_key> <comma> <A> : "Ą" U0104
|
||||
<Multi_key> <A> <comma> : "Ą" U0104
|
||||
<Multi_key> <comma> <a> : "ą" U0105
|
||||
<Multi_key> <a> <comma> : "ą" U0105
|
||||
<Multi_key> <C> <apostrophe> : "Ć" U0106
|
||||
<Multi_key> <c> <apostrophe> : "ć" U0107
|
||||
<Multi_key> <C> <period> : "Ċ" U010A
|
||||
<Multi_key> <c> <period> : "ċ" U010B
|
||||
<Multi_key> <less> <C> : "Č" U010C
|
||||
<Multi_key> <C> <less> : "Č" U010C
|
||||
<Multi_key> <less> <c> : "č" U010D
|
||||
<Multi_key> <c> <less> : "č" U010D
|
||||
<Multi_key> <less> <D> : "Ď" U010E
|
||||
<Multi_key> <D> <less> : "Ď" U010E
|
||||
<Multi_key> <less> <d> : "ď" U010F
|
||||
<Multi_key> <d> <less> : "ď" U010F
|
||||
<Multi_key> <minus> <D> : "Đ" U0110
|
||||
<Multi_key> <D> <minus> : "Đ" U0110
|
||||
<Multi_key> <minus> <d> : "đ" U0111
|
||||
<Multi_key> <d> <minus> : "đ" U0111
|
||||
<Multi_key> <minus> <E> : "Ē" U0112
|
||||
<Multi_key> <E> <minus> : "Ē" U0112
|
||||
<Multi_key> <E> <underscore> : "Ē" U0112
|
||||
<Multi_key> <minus> <e> : "ē" U0113
|
||||
<Multi_key> <e> <minus> : "ē" U0113
|
||||
<Multi_key> <e> <underscore> : "ē" U0113
|
||||
<Multi_key> <E> <period> : "Ė" U0116
|
||||
<Multi_key> <period> <period> : "˙" U02D9
|
||||
<Multi_key> <comma> <E> : "Ę" U0118
|
||||
<Multi_key> <E> <comma> : "Ę" U0118
|
||||
<Multi_key> <comma> <e> : "ę" U0119
|
||||
<Multi_key> <e> <comma> : "ę" U0119
|
||||
<Multi_key> <less> <E> : "Ě" U011A
|
||||
<Multi_key> <E> <less> : "Ě" U011A
|
||||
<Multi_key> <less> <e> : "ě" U011B
|
||||
<Multi_key> <e> <less> : "ě" U011B
|
||||
<Multi_key> <parenleft> <G> : "Ğ" U011E
|
||||
<Multi_key> <G> <parenleft> : "Ğ" U011E
|
||||
<Multi_key> <G> <U> : "Ğ" U011E
|
||||
<Multi_key> <G> <breve> : "Ğ" U011E
|
||||
<Multi_key> <breve> <G> : "Ğ" U011E
|
||||
<Multi_key> <parenleft> <g> : "ğ" U011F
|
||||
<Multi_key> <g> <parenleft> : "ğ" U011F
|
||||
<Multi_key> <g> <U> : "ğ" U011F
|
||||
<Multi_key> <g> <breve> : "ğ" U011F
|
||||
<Multi_key> <breve> <g> : "ğ" U011F
|
||||
<Multi_key> <G> <period> : "Ġ" U0120
|
||||
<Multi_key> <g> <period> : "ġ" U0121
|
||||
<Multi_key> <G> <comma> : "Ģ" U0122
|
||||
<Multi_key> <g> <comma> : "ģ" U0123
|
||||
<Multi_key> <I> <asciitilde> : "Ĩ" U0128
|
||||
<Multi_key> <i> <asciitilde> : "ĩ" U0129
|
||||
<Multi_key> <minus> <I> : "Ī" U012A
|
||||
<Multi_key> <I> <minus> : "Ī" U012A
|
||||
<Multi_key> <I> <underscore> : "Ī" U012A
|
||||
<Multi_key> <minus> <i> : "ī" U012B
|
||||
<Multi_key> <i> <minus> : "ī" U012B
|
||||
<Multi_key> <i> <underscore> : "ī" U012B
|
||||
<Multi_key> <comma> <I> : "Į" U012E
|
||||
<Multi_key> <I> <comma> : "Į" U012E
|
||||
<Multi_key> <I> <period> : "İ" U0130
|
||||
<Multi_key> <period> <i> : "ı" U0131
|
||||
<Multi_key> <K> <comma> : "Ķ" U0136
|
||||
<Multi_key> <k> <comma> : "ķ" U0137
|
||||
<Multi_key> <L> <apostrophe> : "Ĺ" U0139
|
||||
<Multi_key> <l> <apostrophe> : "ĺ" U013A
|
||||
<Multi_key> <L> <comma> : "Ļ" U013B
|
||||
<Multi_key> <l> <comma> : "ļ" U013C
|
||||
<Multi_key> <less> <L> : "Ľ" U013D
|
||||
<Multi_key> <L> <less> : "Ľ" U013D
|
||||
<Multi_key> <less> <l> : "ľ" U013E
|
||||
<Multi_key> <l> <less> : "ľ" U013E
|
||||
<Multi_key> <L> <slash> : "Ł" U0141
|
||||
<Multi_key> <l> <slash> : "ł" U0142
|
||||
<Multi_key> <N> <apostrophe> : "Ń" U0143
|
||||
<Multi_key> <n> <apostrophe> : "ń" U0144
|
||||
<Multi_key> <N> <comma> : "Ņ" U0145
|
||||
<Multi_key> <n> <comma> : "ņ" U0146
|
||||
<Multi_key> <less> <N> : "Ň" U0147
|
||||
<Multi_key> <N> <less> : "Ň" U0147
|
||||
<Multi_key> <less> <n> : "ň" U0148
|
||||
<Multi_key> <n> <less> : "ň" U0148
|
||||
<Multi_key> <O> <E> : "Œ" U0152
|
||||
<Multi_key> <o> <e> : "œ" U0153
|
||||
<Multi_key> <R> <apostrophe> : "Ŕ" U0154
|
||||
<Multi_key> <r> <apostrophe> : "ŕ" U0155
|
||||
<Multi_key> <R> <comma> : "Ŗ" U0156
|
||||
<Multi_key> <r> <comma> : "ŗ" U0157
|
||||
<Multi_key> <less> <R> : "Ř" U0158
|
||||
<Multi_key> <R> <less> : "Ř" U0158
|
||||
<Multi_key> <less> <r> : "ř" U0159
|
||||
<Multi_key> <r> <less> : "ř" U0159
|
||||
<Multi_key> <S> <apostrophe> : "Ś" U015A
|
||||
<Multi_key> <s> <apostrophe> : "ś" U015B
|
||||
<Multi_key> <O> <slash> : "Ø" U00D8
|
||||
<Multi_key> <S> <comma> : "Ş" U015E
|
||||
<Multi_key> <S> <cedilla> : "Ş" U015E
|
||||
<Multi_key> <s> <comma> : "ş" U015F
|
||||
<Multi_key> <s> <cedilla> : "ş" U015F
|
||||
<Multi_key> <less> <S> : "Š" U0160
|
||||
<Multi_key> <S> <less> : "Š" U0160
|
||||
<Multi_key> <less> <s> : "š" U0161
|
||||
<Multi_key> <s> <less> : "š" U0161
|
||||
<Multi_key> <less> <T> : "Ť" U0164
|
||||
<Multi_key> <T> <less> : "Ť" U0164
|
||||
<Multi_key> <less> <t> : "ť" U0165
|
||||
<Multi_key> <t> <less> : "ť" U0165
|
||||
<Multi_key> <T> <minus> : "Ŧ" U0166
|
||||
<Multi_key> <T> <slash> : "Ŧ" U0166
|
||||
<Multi_key> <t> <minus> : "ŧ" U0167
|
||||
<Multi_key> <t> <slash> : "ŧ" U0167
|
||||
<Multi_key> <U> <asciitilde> : "Ũ" U0168
|
||||
<Multi_key> <u> <asciitilde> : "ũ" U0169
|
||||
<Multi_key> <minus> <U> : "Ū" U016A
|
||||
<Multi_key> <U> <minus> : "Ū" U016A
|
||||
<Multi_key> <U> <underscore> : "Ū" U016A
|
||||
<Multi_key> <minus> <u> : "ū" U016B
|
||||
<Multi_key> <u> <minus> : "ū" U016B
|
||||
<Multi_key> <u> <underscore> : "ū" U016B
|
||||
<Multi_key> <asterisk> <U> : "Ů" U016E
|
||||
<Multi_key> <U> <asterisk> : "Ů" U016E
|
||||
<Multi_key> <asterisk> <u> : "ů" U016F
|
||||
<Multi_key> <u> <asterisk> : "ů" U016F
|
||||
<Multi_key> <comma> <U> : "Ų" U0172
|
||||
<Multi_key> <U> <comma> : "Ų" U0172
|
||||
<Multi_key> <comma> <u> : "ų" U0173
|
||||
<Multi_key> <u> <comma> : "ų" U0173
|
||||
<Multi_key> <W> <asciicircum> : "Ŵ" U0174
|
||||
<Multi_key> <w> <asciicircum> : "ŵ" U0175
|
||||
<Multi_key> <Y> <asciicircum> : "Ŷ" U0176
|
||||
<Multi_key> <y> <asciicircum> : "ŷ" U0177
|
||||
<Multi_key> <Y> <quotedbl> : "Ÿ" U0178
|
||||
<Multi_key> <Y> <diaeresis> : "Ÿ" U0178
|
||||
<Multi_key> <diaeresis> <Y> : "Ÿ" U0178
|
||||
<Multi_key> <Z> <apostrophe> : "Ź" U0179
|
||||
<Multi_key> <z> <apostrophe> : "ź" U017A
|
||||
<Multi_key> <Z> <period> : "Ż" U017B
|
||||
<Multi_key> <z> <period> : "ż" U017C
|
||||
<Multi_key> <less> <Z> : "Ž" U017D
|
||||
<Multi_key> <Z> <less> : "Ž" U017D
|
||||
<Multi_key> <v> <Z> : "Ž" U017D
|
||||
<Multi_key> <less> <z> : "ž" U017E
|
||||
<Multi_key> <v> <z> : "ž" U017E
|
||||
<Multi_key> <z> <less> : "ž" U017E
|
||||
<dead_acute> <dead_diaeresis> <space> : "΅" U0385
|
||||
<dead_diaeresis> <dead_acute> <space> : "΅" U0385
|
||||
<Multi_key> <quotedbl> <apostrophe> <space> : "΅" U0385
|
||||
<Multi_key> <apostrophe> <quotedbl> <space> : "΅" U0385
|
||||
<Multi_key> <Greek_ALPHA> <apostrophe> : "Ά" U0386
|
||||
<Multi_key> <m> <period> : "ṁ" U1E41
|
||||
<Multi_key> <Greek_EPSILON> <apostrophe> : "Έ" U0388
|
||||
<Multi_key> <Greek_ETA> <apostrophe> : "Ή" U0389
|
||||
<Multi_key> <Greek_IOTA> <apostrophe> : "Ί" U038A
|
||||
<Multi_key> <Greek_OMICRON> <apostrophe> : "Ό" U038C
|
||||
<Multi_key> <Greek_UPSILON> <apostrophe> : "Ύ" U038E
|
||||
<Multi_key> <Greek_OMEGA> <apostrophe> : "Ώ" U038F
|
||||
<dead_diaeresis> <dead_acute> <Greek_iota> : "ΐ" U0390
|
||||
<Multi_key> <quotedbl> <apostrophe> <Greek_iota> : "ΐ" U0390
|
||||
<Multi_key> <comma> <i> : "į" U012F
|
||||
<Multi_key> <i> <comma> : "į" U012F
|
||||
<Multi_key> <Greek_IOTA> <quotedbl> : "Ϊ" U03AA
|
||||
<Multi_key> <Greek_UPSILON> <quotedbl> : "Ϋ" U03AB
|
||||
<Multi_key> <Greek_alpha> <apostrophe> : "ά" U03AC
|
||||
<Multi_key> <Greek_epsilon> <apostrophe> : "έ" U03AD
|
||||
<Multi_key> <Greek_eta> <apostrophe> : "ή" U03AE
|
||||
<Multi_key> <Greek_iota> <apostrophe> : "ί" U03AF
|
||||
<dead_diaeresis> <dead_acute> <Greek_upsilon> : "ΰ" U03B0
|
||||
<Multi_key> <quotedbl> <apostrophe> <Greek_upsilon> : "ΰ" U03B0
|
||||
<Multi_key> <Greek_iota> <quotedbl> : "ϊ" U03CA
|
||||
<Multi_key> <Greek_upsilon> <quotedbl> : "ϋ" U03CB
|
||||
<Multi_key> <Greek_omicron> <apostrophe> : "ό" U03CC
|
||||
<Multi_key> <Greek_upsilon> <apostrophe> : "ύ" U03CD
|
||||
<Multi_key> <Greek_omega> <apostrophe> : "ώ" U03CE
|
||||
+70
-57
@@ -64,8 +64,8 @@ struct _GtkAboutDialogPrivate
|
||||
gchar *version;
|
||||
gchar *copyright;
|
||||
gchar *comments;
|
||||
gchar *website;
|
||||
gchar *website_label;
|
||||
gchar *website_url;
|
||||
gchar *website_text;
|
||||
gchar *translator_credits;
|
||||
gchar *license;
|
||||
|
||||
@@ -78,6 +78,7 @@ struct _GtkAboutDialogPrivate
|
||||
GtkWidget *comments_label;
|
||||
GtkWidget *copyright_label;
|
||||
GtkWidget *website_button;
|
||||
GtkWidget *website_label;
|
||||
|
||||
GtkWidget *credits_button;
|
||||
GtkWidget *credits_dialog;
|
||||
@@ -124,6 +125,7 @@ static void gtk_about_dialog_set_property (GObject
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gtk_about_dialog_show (GtkWidget *widge);
|
||||
static void update_name_version (GtkAboutDialog *about);
|
||||
static GtkIconSet * icon_set_new_from_pixbufs (GList *pixbufs);
|
||||
static void activate_url (GtkWidget *widget,
|
||||
@@ -182,6 +184,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
|
||||
object_class->finalize = gtk_about_dialog_finalize;
|
||||
|
||||
widget_class->show = gtk_about_dialog_show;
|
||||
|
||||
/**
|
||||
* GtkAboutDialog:program-name:
|
||||
@@ -433,8 +436,8 @@ gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
priv->version = NULL;
|
||||
priv->copyright = NULL;
|
||||
priv->comments = NULL;
|
||||
priv->website = NULL;
|
||||
priv->website_label = NULL;
|
||||
priv->website_url = NULL;
|
||||
priv->website_text = NULL;
|
||||
priv->translator_credits = NULL;
|
||||
priv->license = NULL;
|
||||
priv->authors = NULL;
|
||||
@@ -477,14 +480,19 @@ gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
gtk_label_set_justify (GTK_LABEL (priv->copyright_label), GTK_JUSTIFY_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), priv->copyright_label, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_link_button_new ("");
|
||||
hbox = gtk_hbox_new (TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
|
||||
|
||||
priv->website_button = button = gtk_link_button_new ("");
|
||||
gtk_widget_set_no_show_all (button, TRUE);
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (activate_url), about);
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
|
||||
priv->website_button = button;
|
||||
|
||||
priv->website_label = button = gtk_label_new ("");
|
||||
gtk_widget_set_no_show_all (button, TRUE);
|
||||
gtk_label_set_selectable (GTK_LABEL (button), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (priv->logo_image);
|
||||
@@ -545,8 +553,8 @@ gtk_about_dialog_finalize (GObject *object)
|
||||
g_free (priv->copyright);
|
||||
g_free (priv->comments);
|
||||
g_free (priv->license);
|
||||
g_free (priv->website);
|
||||
g_free (priv->website_label);
|
||||
g_free (priv->website_url);
|
||||
g_free (priv->website_text);
|
||||
g_free (priv->translator_credits);
|
||||
|
||||
g_strfreev (priv->authors);
|
||||
@@ -645,10 +653,10 @@ gtk_about_dialog_get_property (GObject *object,
|
||||
g_value_set_string (value, priv->comments);
|
||||
break;
|
||||
case PROP_WEBSITE:
|
||||
g_value_set_string (value, priv->website);
|
||||
g_value_set_string (value, priv->website_url);
|
||||
break;
|
||||
case PROP_WEBSITE_LABEL:
|
||||
g_value_set_string (value, priv->website_label);
|
||||
g_value_set_string (value, priv->website_text);
|
||||
break;
|
||||
case PROP_LICENSE:
|
||||
g_value_set_string (value, priv->license);
|
||||
@@ -691,6 +699,44 @@ gtk_about_dialog_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_website (GtkAboutDialog *about)
|
||||
{
|
||||
GtkAboutDialogPrivate *priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
if (priv->website_url && activate_url_hook)
|
||||
{
|
||||
gtk_widget_show (priv->website_button);
|
||||
gtk_widget_hide (priv->website_label);
|
||||
|
||||
gtk_link_button_set_uri (GTK_LINK_BUTTON (priv->website_button), priv->website_url);
|
||||
if (priv->website_text)
|
||||
gtk_button_set_label (GTK_BUTTON (priv->website_button), priv->website_text);
|
||||
else
|
||||
gtk_button_set_label (GTK_BUTTON (priv->website_button), priv->website_url);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_show (priv->website_label);
|
||||
gtk_widget_hide (priv->website_button);
|
||||
|
||||
if (priv->website_url)
|
||||
gtk_label_set_text (GTK_LABEL (priv->website_label), priv->website_url);
|
||||
else if (priv->website_text)
|
||||
gtk_label_set_text (GTK_LABEL (priv->website_label), priv->website_text);
|
||||
else
|
||||
gtk_widget_hide (priv->website_label);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_about_dialog_show (GtkWidget *widget)
|
||||
{
|
||||
update_website (GTK_ABOUT_DIALOG (widget));
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_about_dialog_parent_class)->show (widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_about_dialog_get_name:
|
||||
* @about: a #GtkAboutDialog
|
||||
@@ -1117,7 +1163,7 @@ gtk_about_dialog_get_website (GtkAboutDialog *about)
|
||||
|
||||
priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
return priv->website;
|
||||
return priv->website_url;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1143,32 +1189,11 @@ gtk_about_dialog_set_website (GtkAboutDialog *about,
|
||||
|
||||
priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
tmp = priv->website;
|
||||
if (website != NULL)
|
||||
{
|
||||
priv->website = g_strdup (website);
|
||||
if (activate_url_hook != NULL)
|
||||
{
|
||||
gtk_link_button_set_uri (GTK_LINK_BUTTON (priv->website_button), website);
|
||||
if (priv->website_label == NULL)
|
||||
gtk_about_dialog_set_website_label (about, website);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkWidget *hbox = priv->website_button->parent;
|
||||
gtk_widget_destroy (priv->website_button);
|
||||
priv->website_button = gtk_label_new (website);
|
||||
gtk_label_set_selectable (GTK_LABEL (priv->website_button), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), priv->website_button);
|
||||
gtk_widget_show (priv->website_button);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->website = NULL;
|
||||
gtk_widget_hide (priv->website_button);
|
||||
}
|
||||
g_free (tmp);
|
||||
tmp = priv->website_url;
|
||||
priv->website_url = g_strdup (website);
|
||||
g_free (tmp);
|
||||
|
||||
update_website (about);
|
||||
|
||||
g_object_notify (G_OBJECT (about), "website");
|
||||
}
|
||||
@@ -1193,7 +1218,7 @@ gtk_about_dialog_get_website_label (GtkAboutDialog *about)
|
||||
|
||||
priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
return priv->website_label;
|
||||
return priv->website_text;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1217,24 +1242,12 @@ gtk_about_dialog_set_website_label (GtkAboutDialog *about,
|
||||
|
||||
priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
tmp = priv->website_label;
|
||||
if (activate_url_hook != NULL)
|
||||
{
|
||||
if (website_label != NULL)
|
||||
{
|
||||
priv->website_label = g_strdup (website_label);
|
||||
gtk_button_set_label (GTK_BUTTON (priv->website_button),
|
||||
priv->website_label);
|
||||
gtk_widget_show (priv->website_button);
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->website_label = NULL;
|
||||
gtk_widget_hide (priv->website_button);
|
||||
}
|
||||
}
|
||||
tmp = priv->website_text;
|
||||
priv->website_text = g_strdup (website_label);
|
||||
g_free (tmp);
|
||||
|
||||
update_website (about);
|
||||
|
||||
g_object_notify (G_OBJECT (about), "website-label");
|
||||
}
|
||||
|
||||
|
||||
+1
-5
@@ -359,11 +359,7 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
|
||||
|
||||
/* don't use CLAMP() so we don't end up below lower if upper - page_size
|
||||
* is smaller than lower
|
||||
*/
|
||||
value = MIN (value, adjustment->upper - adjustment->page_size);
|
||||
value = MAX (value, adjustment->lower);
|
||||
value = CLAMP (value, adjustment->lower, adjustment->upper);
|
||||
|
||||
if (value != adjustment->value)
|
||||
{
|
||||
|
||||
+2
-2
@@ -466,8 +466,8 @@ gtk_alignment_size_allocate (GtkWidget *widget,
|
||||
padding_horizontal = priv->padding_left + priv->padding_right;
|
||||
padding_vertical = priv->padding_top + priv->padding_bottom;
|
||||
|
||||
width = allocation->width - padding_horizontal - 2 * border_width;
|
||||
height = allocation->height - padding_vertical - 2 * border_width;
|
||||
width = MAX (1, allocation->width - padding_horizontal - 2 * border_width);
|
||||
height = MAX (1, allocation->height - padding_vertical - 2 * border_width);
|
||||
|
||||
if (width > child_requisition.width)
|
||||
child_allocation.width = (child_requisition.width *
|
||||
|
||||
+1
-1
@@ -1456,7 +1456,7 @@ _gtk_builder_flags_from_string (GType type,
|
||||
gboolean eos, ret;
|
||||
|
||||
g_return_val_if_fail (G_TYPE_IS_FLAGS (type), FALSE);
|
||||
g_return_val_if_fail (string != 0, FALSE);
|
||||
g_return_val_if_fail (string != NULL, FALSE);
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
|
||||
@@ -267,32 +267,12 @@ gtk_cell_renderer_combo_set_property (GObject *object,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_MODEL:
|
||||
{
|
||||
GObject *object;
|
||||
GtkCellRendererComboPrivate *priv;
|
||||
|
||||
priv = GTK_CELL_RENDERER_COMBO_GET_PRIVATE (cell);
|
||||
|
||||
if (cell->model)
|
||||
{
|
||||
if (priv->combo)
|
||||
gtk_combo_box_set_model (GTK_COMBO_BOX (priv->combo), NULL);
|
||||
g_object_unref (cell->model);
|
||||
cell->model = NULL;
|
||||
}
|
||||
|
||||
object = g_value_get_object (value);
|
||||
if (object)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TREE_MODEL (object));
|
||||
g_object_ref (object);
|
||||
|
||||
cell->model = GTK_TREE_MODEL (object);
|
||||
if (priv->combo)
|
||||
gtk_combo_box_set_model (GTK_COMBO_BOX (priv->combo), cell->model);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (cell->model)
|
||||
g_object_unref (cell->model);
|
||||
cell->model = g_value_get_object (value);
|
||||
if (cell->model)
|
||||
g_object_ref (cell->model);
|
||||
break;
|
||||
case PROP_TEXT_COLUMN:
|
||||
cell->text_column = g_value_get_int (value);
|
||||
break;
|
||||
|
||||
@@ -454,8 +454,16 @@ gtk_cell_renderer_pixbuf_create_themed_pixbuf (GtkCellRendererPixbuf *cellpixbuf
|
||||
priv->gicon,
|
||||
MIN (width, height),
|
||||
GTK_ICON_LOOKUP_USE_BUILTIN);
|
||||
cellpixbuf->pixbuf = gtk_icon_info_load_icon (info, &error);
|
||||
gtk_icon_info_free (info);
|
||||
if (!info)
|
||||
{
|
||||
g_set_error (&error, GTK_ICON_THEME_ERROR, GTK_ICON_THEME_NOT_FOUND,
|
||||
_("Icon not present in theme"));
|
||||
}
|
||||
else
|
||||
{
|
||||
cellpixbuf->pixbuf = gtk_icon_info_load_icon (info, &error);
|
||||
gtk_icon_info_free (info);
|
||||
}
|
||||
}
|
||||
|
||||
if (!cellpixbuf->pixbuf)
|
||||
|
||||
@@ -397,10 +397,10 @@ gtk_cell_renderer_progress_set_pulse (GtkCellRendererProgress *cellprogress,
|
||||
|
||||
if (pulse != priv->pulse)
|
||||
{
|
||||
if (priv->pulse <= 0)
|
||||
if (pulse <= 0)
|
||||
priv->offset = 0;
|
||||
else
|
||||
priv->offset++;
|
||||
priv->offset = pulse;
|
||||
}
|
||||
|
||||
priv->pulse = pulse;
|
||||
|
||||
@@ -890,7 +890,7 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
|
||||
|
||||
length = [types count] * sizeof (GdkAtom);
|
||||
|
||||
selection_data = g_slice_new (GtkSelectionData);
|
||||
selection_data = g_slice_new0 (GtkSelectionData);
|
||||
selection_data->selection = clipboard->selection;
|
||||
selection_data->target = target;
|
||||
|
||||
|
||||
+20
-4
@@ -81,6 +81,7 @@ struct _GtkComboBoxPrivate
|
||||
gint wrap_width;
|
||||
GtkShadowType shadow_type;
|
||||
|
||||
gint active; /* Only temporary */
|
||||
GtkTreeRowReference *active_row;
|
||||
|
||||
GtkWidget *tree_view;
|
||||
@@ -928,6 +929,7 @@ gtk_combo_box_init (GtkComboBox *combo_box)
|
||||
priv->height = 0;
|
||||
priv->wrap_width = 0;
|
||||
|
||||
priv->active = -1;
|
||||
priv->active_row = NULL;
|
||||
priv->col_column = -1;
|
||||
priv->row_column = -1;
|
||||
@@ -4016,13 +4018,13 @@ gtk_combo_box_list_auto_scroll (GtkComboBox *combo_box,
|
||||
adj->lower < adj->value)
|
||||
{
|
||||
value = adj->value - (tree_view->allocation.x - x + 1);
|
||||
gtk_adjustment_set_value (adj, value);
|
||||
gtk_adjustment_set_value (adj, CLAMP (value, adj->lower, adj->upper - adj->page_size));
|
||||
}
|
||||
else if (x >= tree_view->allocation.x + tree_view->allocation.width &&
|
||||
adj->upper - adj->page_size > adj->value)
|
||||
{
|
||||
value = adj->value + (x - tree_view->allocation.x - tree_view->allocation.width + 1);
|
||||
gtk_adjustment_set_value (adj, MAX (value, 0.0));
|
||||
gtk_adjustment_set_value (adj, CLAMP (value, 0.0, adj->upper - adj->page_size));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4033,13 +4035,13 @@ gtk_combo_box_list_auto_scroll (GtkComboBox *combo_box,
|
||||
adj->lower < adj->value)
|
||||
{
|
||||
value = adj->value - (tree_view->allocation.y - y + 1);
|
||||
gtk_adjustment_set_value (adj, value);
|
||||
gtk_adjustment_set_value (adj, CLAMP (value, adj->lower, adj->upper - adj->page_size));
|
||||
}
|
||||
else if (y >= tree_view->allocation.height &&
|
||||
adj->upper - adj->page_size > adj->value)
|
||||
{
|
||||
value = adj->value + (y - tree_view->allocation.height + 1);
|
||||
gtk_adjustment_set_value (adj, MAX (value, 0.0));
|
||||
gtk_adjustment_set_value (adj, CLAMP (value, 0.0, adj->upper - adj->page_size));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4839,6 +4841,13 @@ gtk_combo_box_set_active (GtkComboBox *combo_box,
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
g_return_if_fail (index_ >= -1);
|
||||
|
||||
if (combo_box->priv->model == NULL)
|
||||
{
|
||||
/* Save index, in case the model is set after the index */
|
||||
combo_box->priv->active = index_;
|
||||
return;
|
||||
}
|
||||
|
||||
if (index_ != -1)
|
||||
path = gtk_tree_path_new_from_indices (index_, -1);
|
||||
|
||||
@@ -5034,6 +5043,13 @@ gtk_combo_box_set_model (GtkComboBox *combo_box,
|
||||
gtk_cell_view_set_model (GTK_CELL_VIEW (combo_box->priv->cell_view),
|
||||
combo_box->priv->model);
|
||||
|
||||
if (combo_box->priv->active != -1)
|
||||
{
|
||||
/* If an index was set in advance, apply it now */
|
||||
gtk_combo_box_set_active (combo_box, combo_box->priv->active);
|
||||
combo_box->priv->active = -1;
|
||||
}
|
||||
|
||||
out:
|
||||
gtk_combo_box_update_sensitivity (combo_box);
|
||||
|
||||
|
||||
+9
-5
@@ -2940,7 +2940,7 @@ gtk_entry_backspace (GtkEntry *entry)
|
||||
return;
|
||||
}
|
||||
|
||||
prev_pos = gtk_entry_move_logically(entry, entry->current_pos, -1);
|
||||
prev_pos = gtk_entry_move_logically (entry, entry->current_pos, -1);
|
||||
|
||||
if (prev_pos < entry->current_pos)
|
||||
{
|
||||
@@ -2950,7 +2950,8 @@ gtk_entry_backspace (GtkEntry *entry)
|
||||
|
||||
pango_layout_get_log_attrs (layout, &log_attrs, &n_attrs);
|
||||
|
||||
if (log_attrs[entry->current_pos].backspace_deletes_character)
|
||||
if (entry->visible &&
|
||||
log_attrs[entry->current_pos].backspace_deletes_character)
|
||||
{
|
||||
gchar *cluster_text;
|
||||
gchar *normalized_text;
|
||||
@@ -3679,6 +3680,8 @@ gtk_entry_draw_cursor (GtkEntry *entry,
|
||||
gint cursor_index;
|
||||
gboolean block;
|
||||
gboolean block_at_line_end;
|
||||
PangoLayout *layout;
|
||||
const char *text;
|
||||
|
||||
_gtk_entry_effective_inner_border (entry, &inner_border);
|
||||
|
||||
@@ -3686,11 +3689,13 @@ gtk_entry_draw_cursor (GtkEntry *entry,
|
||||
|
||||
gdk_drawable_get_size (entry->text_area, NULL, &text_area_height);
|
||||
|
||||
cursor_index = g_utf8_offset_to_pointer (entry->text, entry->current_pos + entry->preedit_cursor) - entry->text;
|
||||
layout = gtk_entry_ensure_layout (entry, TRUE);
|
||||
text = pango_layout_get_text (layout);
|
||||
cursor_index = g_utf8_offset_to_pointer (text, entry->current_pos + entry->preedit_cursor) - text;
|
||||
if (!entry->overwrite_mode)
|
||||
block = FALSE;
|
||||
else
|
||||
block = _gtk_text_util_get_block_cursor_location (gtk_entry_ensure_layout (entry, TRUE),
|
||||
block = _gtk_text_util_get_block_cursor_location (layout,
|
||||
cursor_index, &cursor_rect, &block_at_line_end);
|
||||
|
||||
if (!block)
|
||||
@@ -3746,7 +3751,6 @@ gtk_entry_draw_cursor (GtkEntry *entry,
|
||||
}
|
||||
else /* overwrite_mode */
|
||||
{
|
||||
PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
|
||||
GdkColor cursor_color;
|
||||
GdkRectangle rect;
|
||||
cairo_t *cr;
|
||||
|
||||
@@ -998,7 +998,7 @@ dnd_select_folder_get_info_cb (GCancellable *cancellable,
|
||||
{
|
||||
gboolean is_folder;
|
||||
|
||||
is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
data->selected =
|
||||
(((data->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER && is_folder) ||
|
||||
@@ -1455,7 +1455,7 @@ set_info_get_info_cb (GCancellable *cancellable,
|
||||
if (!data->label)
|
||||
data->label = g_strdup (g_file_info_get_display_name (info));
|
||||
|
||||
is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter,
|
||||
ICON_COLUMN, pixbuf,
|
||||
@@ -2106,6 +2106,7 @@ filter_model_visible_func (GtkTreeModel *model,
|
||||
{
|
||||
if (!g_file_is_native (base_file))
|
||||
retval = FALSE;
|
||||
g_object_unref (base_file);
|
||||
}
|
||||
else
|
||||
retval = FALSE;
|
||||
@@ -2736,7 +2737,7 @@ gtk_file_chooser_button_new (const gchar *title,
|
||||
* Returns: a new button widget.
|
||||
*
|
||||
* Since: 2.6
|
||||
* Deprecated: 2.14
|
||||
* Deprecated: 2.14: Use gtk_file_chooser_button_new() instead.
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_file_chooser_button_new_with_backend (const gchar *title,
|
||||
|
||||
+137
-35
@@ -456,6 +456,7 @@ static void recent_get_valid_child_iter (GtkFileChooserDefault *impl,
|
||||
GtkTreeIter *child_iter,
|
||||
GtkTreeIter *iter);
|
||||
static void set_file_system_backend (GtkFileChooserDefault *impl);
|
||||
static void unset_file_system_backend (GtkFileChooserDefault *impl);
|
||||
|
||||
|
||||
|
||||
@@ -923,6 +924,8 @@ gtk_file_chooser_default_finalize (GObject *object)
|
||||
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (object);
|
||||
GSList *l;
|
||||
|
||||
unset_file_system_backend (impl);
|
||||
|
||||
if (impl->shortcuts_pane_filter_model)
|
||||
g_object_unref (impl->shortcuts_pane_filter_model);
|
||||
|
||||
@@ -931,8 +934,6 @@ gtk_file_chooser_default_finalize (GObject *object)
|
||||
|
||||
shortcuts_free (impl);
|
||||
|
||||
g_object_unref (impl->file_system);
|
||||
|
||||
g_free (impl->browse_files_last_selected_name);
|
||||
|
||||
for (l = impl->filters; l; l = l->next)
|
||||
@@ -2073,10 +2074,17 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
|
||||
if (_gtk_file_system_volume_is_mounted (volume))
|
||||
{
|
||||
GFile *base_file;
|
||||
gboolean base_is_native = TRUE;
|
||||
|
||||
base_file = _gtk_file_system_volume_get_root (volume);
|
||||
if (base_file != NULL && !g_file_is_native (base_file))
|
||||
continue;
|
||||
if (base_file != NULL)
|
||||
{
|
||||
base_is_native = g_file_is_native (base_file);
|
||||
g_object_unref (base_file);
|
||||
}
|
||||
|
||||
if (!base_is_native)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2178,6 +2186,7 @@ shortcuts_add_bookmarks (GtkFileChooserDefault *impl)
|
||||
|
||||
bookmarks = _gtk_file_system_list_bookmarks (impl->file_system);
|
||||
shortcuts_append_bookmarks (impl, bookmarks);
|
||||
g_slist_foreach (bookmarks, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (bookmarks);
|
||||
|
||||
if (impl->num_bookmarks == 0)
|
||||
@@ -2762,7 +2771,7 @@ selection_check_foreach_cb (GtkTreeModel *model,
|
||||
case OPERATION_MODE_BROWSE:
|
||||
gtk_tree_model_sort_convert_iter_to_child_iter (closure->impl->sort_model, &child_iter, iter);
|
||||
info = _gtk_file_system_model_get_info (closure->impl->browse_files_model, &child_iter);
|
||||
is_folder = info ? (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) : FALSE;
|
||||
is_folder = info ? (_gtk_file_info_consider_as_directory (info)) : FALSE;
|
||||
break;
|
||||
|
||||
case OPERATION_MODE_SEARCH:
|
||||
@@ -4156,8 +4165,7 @@ file_list_drag_data_received_get_info_cb (GCancellable *cancellable,
|
||||
|
||||
if ((data->impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||
data->impl->action == GTK_FILE_CHOOSER_ACTION_SAVE) &&
|
||||
data->uris[1] == 0 && !error &&
|
||||
g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
|
||||
data->uris[1] == NULL && !error && _gtk_file_info_consider_as_directory (info))
|
||||
change_folder_and_display_error (data->impl, data->file, FALSE);
|
||||
else
|
||||
{
|
||||
@@ -5300,7 +5308,8 @@ set_local_only (GtkFileChooserDefault *impl,
|
||||
shortcuts_add_bookmarks (impl);
|
||||
}
|
||||
|
||||
if (local_only && !g_file_is_native (impl->current_folder))
|
||||
if (local_only && impl->current_folder &&
|
||||
!g_file_is_native (impl->current_folder))
|
||||
{
|
||||
/* If we are pointing to a non-local folder, make an effort to change
|
||||
* back to a local folder, but it's really up to the app to not cause
|
||||
@@ -5373,6 +5382,17 @@ set_file_system_backend (GtkFileChooserDefault *impl)
|
||||
profile_end ("end", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
unset_file_system_backend (GtkFileChooserDefault *impl)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (impl->file_system,
|
||||
G_CALLBACK (volumes_bookmarks_changed_cb), impl);
|
||||
|
||||
g_object_unref (impl->file_system);
|
||||
|
||||
impl->file_system = NULL;
|
||||
}
|
||||
|
||||
/* This function is basically a do_all function.
|
||||
*
|
||||
* It sets the visibility on all the widgets based on the current state, and
|
||||
@@ -6066,7 +6086,7 @@ list_model_filter_func (GtkFileSystemModel *model,
|
||||
if (!impl->current_filter)
|
||||
return TRUE;
|
||||
|
||||
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY)
|
||||
if (_gtk_file_info_consider_as_directory (file_info))
|
||||
return TRUE;
|
||||
|
||||
return !get_is_file_filtered (impl, file, file_info);
|
||||
@@ -6103,12 +6123,12 @@ install_list_model_filter (GtkFileChooserDefault *impl)
|
||||
gboolean dir_a, dir_b; \
|
||||
\
|
||||
if (info_a) \
|
||||
dir_a = (g_file_info_get_file_type (info_a) == G_FILE_TYPE_DIRECTORY); \
|
||||
dir_a = _gtk_file_info_consider_as_directory (info_a); \
|
||||
else \
|
||||
return impl->list_sort_ascending ? -1 : 1; \
|
||||
\
|
||||
if (info_b) \
|
||||
dir_b = (g_file_info_get_file_type (info_b) == G_FILE_TYPE_DIRECTORY); \
|
||||
dir_b = _gtk_file_info_consider_as_directory (info_b); \
|
||||
else \
|
||||
return impl->list_sort_ascending ? 1 : -1; \
|
||||
\
|
||||
@@ -6390,9 +6410,9 @@ show_and_select_files_finished_loading (GtkFolder *folder,
|
||||
have_hidden = g_file_info_get_is_hidden (info);
|
||||
|
||||
if (!have_filtered)
|
||||
have_filtered = (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY) &&
|
||||
have_filtered = (! _gtk_file_info_consider_as_directory (info)) &&
|
||||
get_is_file_filtered (data->impl, file, info);
|
||||
|
||||
|
||||
g_object_unref (info);
|
||||
|
||||
if (have_hidden && have_filtered)
|
||||
@@ -6490,7 +6510,7 @@ show_and_select_files (GtkFileChooserDefault *impl,
|
||||
|
||||
impl->show_and_select_files_cancellable =
|
||||
_gtk_file_system_get_folder (impl->file_system, parent_file,
|
||||
"standard::is-hidden,standard::type,standard::name",
|
||||
"standard::is-hidden,standard::type,standard::name,standard::content-type",
|
||||
show_and_select_files_get_folder_cb, info);
|
||||
|
||||
profile_end ("end", NULL);
|
||||
@@ -6725,7 +6745,7 @@ update_chooser_entry (GtkFileChooserDefault *impl)
|
||||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
|
||||
{
|
||||
/* We don't want the name to change when clicking on a folder... */
|
||||
change_entry = (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY);
|
||||
change_entry = (! _gtk_file_info_consider_as_directory (info));
|
||||
}
|
||||
else
|
||||
change_entry = TRUE; /* ... unless we are in SELECT_FOLDER mode */
|
||||
@@ -6809,6 +6829,42 @@ struct UpdateCurrentFolderData
|
||||
GError *original_error;
|
||||
};
|
||||
|
||||
static void
|
||||
update_current_folder_mount_enclosing_volume_cb (GCancellable *cancellable,
|
||||
GtkFileSystemVolume *volume,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean cancelled = g_cancellable_is_cancelled (cancellable);
|
||||
struct UpdateCurrentFolderData *data = user_data;
|
||||
GtkFileChooserDefault *impl = data->impl;
|
||||
|
||||
|
||||
if (cancellable != impl->update_current_folder_cancellable)
|
||||
goto out;
|
||||
|
||||
impl->update_current_folder_cancellable = NULL;
|
||||
set_busy_cursor (impl, FALSE);
|
||||
|
||||
if (cancelled)
|
||||
goto out;
|
||||
|
||||
if (error)
|
||||
{
|
||||
error_changing_folder_dialog (data->impl, data->file, g_error_copy (error));
|
||||
impl->reload_state = RELOAD_EMPTY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
change_folder_and_display_error (impl, data->file, data->clear_entry);
|
||||
|
||||
out:
|
||||
g_object_unref (data->file);
|
||||
g_free (data);
|
||||
|
||||
g_object_unref (cancellable);
|
||||
}
|
||||
|
||||
static void
|
||||
update_current_folder_get_info_cb (GCancellable *cancellable,
|
||||
GFileInfo *info,
|
||||
@@ -6834,6 +6890,26 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
|
||||
{
|
||||
GFile *parent_file;
|
||||
|
||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED))
|
||||
{
|
||||
GMountOperation *mount_operation;
|
||||
GtkWidget *toplevel;
|
||||
|
||||
g_object_unref (cancellable);
|
||||
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (impl));
|
||||
|
||||
mount_operation = gtk_mount_operation_new (GTK_WINDOW (toplevel));
|
||||
|
||||
impl->update_current_folder_cancellable =
|
||||
_gtk_file_system_mount_enclosing_volume (impl->file_system, data->file,
|
||||
mount_operation,
|
||||
update_current_folder_mount_enclosing_volume_cb,
|
||||
data);
|
||||
set_busy_cursor (impl, TRUE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data->original_file)
|
||||
{
|
||||
data->original_file = g_object_ref (data->file);
|
||||
@@ -6865,8 +6941,13 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* error and bail out */
|
||||
error_changing_folder_dialog (impl, data->original_file, data->original_error);
|
||||
/* Error and bail out, ignoring "not found" errors since they're useless:
|
||||
* they only happen when a program defaults to a folder that has been (re)moved.
|
||||
*/
|
||||
if (!g_error_matches (data->original_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||
error_changing_folder_dialog (impl, data->original_file, data->original_error);
|
||||
else
|
||||
g_error_free (data->original_error);
|
||||
g_object_unref (data->original_file);
|
||||
|
||||
goto out;
|
||||
@@ -6880,7 +6961,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
|
||||
g_object_unref (data->original_file);
|
||||
}
|
||||
|
||||
if (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY)
|
||||
if (! _gtk_file_info_consider_as_directory (info))
|
||||
goto out;
|
||||
|
||||
if (!_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), data->file, data->keep_trail, NULL))
|
||||
@@ -6892,10 +6973,10 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
|
||||
g_object_unref (impl->current_folder);
|
||||
|
||||
impl->current_folder = g_object_ref (data->file);
|
||||
|
||||
impl->reload_state = RELOAD_HAS_FOLDER;
|
||||
}
|
||||
|
||||
impl->reload_state = RELOAD_HAS_FOLDER;
|
||||
|
||||
/* Update the widgets that may trigger a folder change themselves. */
|
||||
|
||||
if (!impl->changing_folder)
|
||||
@@ -7163,7 +7244,7 @@ maybe_select (GtkTreeModel *model,
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
|
||||
|
||||
info = get_list_file_info (impl, iter);
|
||||
is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
if ((is_folder && impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) ||
|
||||
(!is_folder && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN))
|
||||
@@ -7561,7 +7642,7 @@ add_shortcut_get_info_cb (GCancellable *cancellable,
|
||||
|
||||
data->impl->loading_shortcuts = g_slist_remove (data->impl->loading_shortcuts, cancellable);
|
||||
|
||||
if (cancelled || error || g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY)
|
||||
if (cancelled || error || (! _gtk_file_info_consider_as_directory (info)))
|
||||
goto out;
|
||||
|
||||
pos = shortcuts_get_pos_for_shortcut_folder (data->impl, data->impl->num_shortcuts);
|
||||
@@ -8109,7 +8190,7 @@ save_entry_get_info_cb (GCancellable *cancellable,
|
||||
if (!info)
|
||||
parent_is_folder = FALSE;
|
||||
else
|
||||
parent_is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
parent_is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
if (parent_is_folder)
|
||||
{
|
||||
@@ -8179,7 +8260,7 @@ file_exists_get_info_cb (GCancellable *cancellable,
|
||||
if (cancelled)
|
||||
goto out;
|
||||
|
||||
file_exists_and_is_not_folder = info && (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY);
|
||||
file_exists_and_is_not_folder = info && (! _gtk_file_info_consider_as_directory (info));
|
||||
|
||||
if (data->impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
|
||||
/* user typed a filename; we are done */
|
||||
@@ -8593,7 +8674,7 @@ search_hit_get_info_cb (GCancellable *cancellable,
|
||||
|
||||
display_name = g_strdup (g_file_info_get_display_name (info));
|
||||
mime_type = g_content_type_get_mime_type (g_file_info_get_content_type (info));
|
||||
is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
pixbuf = _gtk_file_info_render_icon (info, GTK_WIDGET (request->impl),
|
||||
request->impl->icon_size);
|
||||
|
||||
@@ -9664,7 +9745,7 @@ recent_item_get_info_cb (GCancellable *cancellable,
|
||||
goto out;
|
||||
}
|
||||
|
||||
is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
gtk_list_store_set (request->impl->recent_model, &iter,
|
||||
RECENT_MODEL_COL_IS_FOLDER, is_folder,
|
||||
@@ -10180,12 +10261,16 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
|
||||
|
||||
if (!_gtk_file_system_volume_is_mounted (volume))
|
||||
{
|
||||
GtkMountOperation *mount_op;
|
||||
|
||||
set_busy_cursor (impl, TRUE);
|
||||
|
||||
mount_op = gtk_mount_operation_new (get_toplevel (GTK_WIDGET (impl)));
|
||||
impl->shortcuts_activate_iter_cancellable =
|
||||
_gtk_file_system_mount_volume (impl->file_system, volume, NULL,
|
||||
_gtk_file_system_mount_volume (impl->file_system, volume, mount_op,
|
||||
shortcuts_activate_volume_mount_cb,
|
||||
g_object_ref (impl));
|
||||
g_object_unref (mount_op);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -10224,7 +10309,7 @@ shortcuts_activate_get_info_cb (GCancellable *cancellable,
|
||||
if (cancelled)
|
||||
goto out;
|
||||
|
||||
if (!error && g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
|
||||
if (!error && _gtk_file_info_consider_as_directory (info))
|
||||
change_folder_and_display_error (data->impl, data->file, FALSE);
|
||||
else
|
||||
gtk_file_chooser_default_select_file (GTK_FILE_CHOOSER (data->impl),
|
||||
@@ -10446,7 +10531,7 @@ list_select_func (GtkTreeSelection *selection,
|
||||
|
||||
gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, &child_iter, &iter);
|
||||
info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter);
|
||||
if (info && g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY)
|
||||
if (info && (! _gtk_file_info_consider_as_directory (info)))
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
@@ -10558,11 +10643,28 @@ list_row_activated (GtkTreeView *tree_view,
|
||||
info = _gtk_file_system_model_get_info (impl->browse_files_model,
|
||||
&child_iter);
|
||||
|
||||
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
|
||||
if (_gtk_file_info_consider_as_directory (info))
|
||||
{
|
||||
GFile *file;
|
||||
GFile *file, *target_file;
|
||||
const gchar *target_uri;
|
||||
|
||||
file = _gtk_file_system_model_get_file (impl->browse_files_model, &child_iter);
|
||||
if (g_file_info_get_file_type (info) == G_FILE_TYPE_MOUNTABLE ||
|
||||
g_file_info_get_file_type (info) == G_FILE_TYPE_SHORTCUT)
|
||||
{
|
||||
target_uri = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
|
||||
if (target_uri)
|
||||
{
|
||||
target_file = g_file_new_for_uri (target_uri);
|
||||
if (target_file)
|
||||
{
|
||||
g_object_unref (file);
|
||||
file = target_file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
change_folder_and_display_error (impl, file, FALSE);
|
||||
return;
|
||||
}
|
||||
@@ -10690,7 +10792,7 @@ list_icon_data_func (GtkTreeViewColumn *tree_column,
|
||||
if (info &&
|
||||
(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
|
||||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
|
||||
sensitive = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
sensitive = _gtk_file_info_consider_as_directory (info);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -10794,7 +10896,7 @@ list_name_data_func (GtkTreeViewColumn *tree_column,
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
|
||||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
|
||||
{
|
||||
sensitive = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
sensitive = _gtk_file_info_consider_as_directory (info);
|
||||
}
|
||||
|
||||
g_object_set (cell,
|
||||
@@ -10818,7 +10920,7 @@ list_size_data_func (GtkTreeViewColumn *tree_column,
|
||||
gchar *str;
|
||||
gboolean sensitive = TRUE;
|
||||
|
||||
if (!info || g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
|
||||
if (!info || _gtk_file_info_consider_as_directory (info))
|
||||
{
|
||||
g_object_set (cell,
|
||||
"text", NULL,
|
||||
@@ -10935,7 +11037,7 @@ list_mtime_data_func (GtkTreeViewColumn *tree_column,
|
||||
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
|
||||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
|
||||
sensitive = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
sensitive = _gtk_file_info_consider_as_directory (info);
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (time_mtime == 0))
|
||||
|
||||
@@ -439,7 +439,7 @@ maybe_append_separator_to_file (GtkFileChooserEntry *chooser_entry,
|
||||
|
||||
if (info)
|
||||
{
|
||||
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
|
||||
if (_gtk_file_info_consider_as_directory (info))
|
||||
{
|
||||
gchar *tmp = display_name;
|
||||
display_name = g_strconcat (tmp, G_DIR_SEPARATOR_S, NULL);
|
||||
@@ -1812,7 +1812,7 @@ _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
|
||||
|
||||
if (file_info)
|
||||
{
|
||||
retval = (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY);
|
||||
retval = _gtk_file_info_consider_as_directory (file_info);
|
||||
g_object_unref (file_info);
|
||||
}
|
||||
}
|
||||
|
||||
+80
-7
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "gtkfilechooser.h"
|
||||
#include "gtkfilesystem.h"
|
||||
@@ -323,7 +323,7 @@ save_bookmarks (GFile *bookmarks_file,
|
||||
NULL, FALSE, 0, NULL,
|
||||
NULL, &error))
|
||||
{
|
||||
g_critical (error->message);
|
||||
g_critical ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
@@ -362,6 +362,39 @@ bookmarks_file_changed (GFileMonitor *monitor,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mount_referenced_by_volume_activation_root (GList *volumes, GMount *mount)
|
||||
{
|
||||
GList *l;
|
||||
GFile *mount_root;
|
||||
gboolean ret;
|
||||
|
||||
ret = FALSE;
|
||||
|
||||
mount_root = g_mount_get_root (mount);
|
||||
|
||||
for (l = volumes; l != NULL; l = l->next)
|
||||
{
|
||||
GVolume *volume = G_VOLUME (l->data);
|
||||
GFile *volume_activation_root;
|
||||
|
||||
volume_activation_root = g_volume_get_activation_root (volume);
|
||||
if (volume_activation_root != NULL)
|
||||
{
|
||||
if (g_file_has_prefix (volume_activation_root, mount_root))
|
||||
{
|
||||
ret = TRUE;
|
||||
g_object_unref (volume_activation_root);
|
||||
break;
|
||||
}
|
||||
g_object_unref (volume_activation_root);
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (mount_root);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
get_volumes_list (GtkFileSystem *file_system)
|
||||
{
|
||||
@@ -468,8 +501,6 @@ get_volumes_list (GtkFileSystem *file_system)
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (volumes);
|
||||
|
||||
/* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
|
||||
mounts = g_volume_monitor_get_mounts (priv->volume_monitor);
|
||||
|
||||
@@ -484,10 +515,20 @@ get_volumes_list (GtkFileSystem *file_system)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* if there's exists one or more volumes with an activation root inside the mount,
|
||||
* don't display the mount
|
||||
*/
|
||||
if (mount_referenced_by_volume_activation_root (volumes, mount))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* show this mount */
|
||||
priv->volumes = g_slist_prepend (priv->volumes, g_object_ref (mount));
|
||||
}
|
||||
|
||||
g_list_free (volumes);
|
||||
|
||||
g_list_free (mounts);
|
||||
}
|
||||
|
||||
@@ -531,7 +572,10 @@ _gtk_file_system_init (GtkFileSystem *file_system)
|
||||
G_FILE_MONITOR_NONE,
|
||||
NULL, &error);
|
||||
if (error)
|
||||
g_warning (error->message);
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
g_signal_connect (priv->bookmarks_monitor, "changed",
|
||||
G_CALLBACK (bookmarks_file_changed), file_system);
|
||||
@@ -915,6 +959,11 @@ enclosing_volume_mount_cb (GObject *source_object,
|
||||
g_file_mount_enclosing_volume_finish (G_FILE (source_object), result, &error);
|
||||
volume = _gtk_file_system_get_volume_for_file (async_data->file_system, G_FILE (source_object));
|
||||
|
||||
/* Silently drop G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible mounts. */
|
||||
/* Better than doing query_info with additional I/O every time. */
|
||||
if (error && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_ALREADY_MOUNTED))
|
||||
g_clear_error (&error);
|
||||
|
||||
gdk_threads_enter ();
|
||||
((GtkFileSystemVolumeMountCallback) async_data->callback) (async_data->cancellable, volume,
|
||||
error, async_data->data);
|
||||
@@ -1304,7 +1353,9 @@ enumerator_files_callback (GObject *source_object,
|
||||
|
||||
if (error)
|
||||
{
|
||||
g_warning (error->message);
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
g_warning ("%s", error->message);
|
||||
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
@@ -1360,7 +1411,10 @@ gtk_folder_constructed (GObject *object)
|
||||
priv->directory_monitor = g_file_monitor_directory (priv->folder_file, G_FILE_MONITOR_NONE, NULL, &error);
|
||||
|
||||
if (error)
|
||||
g_warning (error->message);
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
g_signal_connect (priv->directory_monitor, "changed",
|
||||
G_CALLBACK (directory_monitor_changed), object);
|
||||
@@ -1730,7 +1784,26 @@ _gtk_file_info_render_icon (GFileInfo *info,
|
||||
|
||||
if (icon)
|
||||
pixbuf = get_pixbuf_from_gicon (icon, widget, icon_size, NULL);
|
||||
|
||||
if (!pixbuf)
|
||||
{
|
||||
/* Use general fallback for all files without icon */
|
||||
icon = g_themed_icon_new ("text-x-generic");
|
||||
pixbuf = get_pixbuf_from_gicon (icon, widget, icon_size, NULL);
|
||||
g_object_unref (icon);
|
||||
}
|
||||
}
|
||||
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_file_info_consider_as_directory (GFileInfo *info)
|
||||
{
|
||||
GFileType type = g_file_info_get_file_type (info);
|
||||
|
||||
return (type == G_FILE_TYPE_DIRECTORY ||
|
||||
type == G_FILE_TYPE_MOUNTABLE ||
|
||||
type == G_FILE_TYPE_SHORTCUT);
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +172,8 @@ GdkPixbuf * _gtk_file_info_render_icon (GFileInfo *info,
|
||||
GtkWidget *widget,
|
||||
gint icon_size);
|
||||
|
||||
gboolean _gtk_file_info_consider_as_directory (GFileInfo *info);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FILE_SYSTEM_H__ */
|
||||
|
||||
@@ -444,7 +444,7 @@ gtk_file_system_model_iter_has_child (GtkTreeModel *tree_model,
|
||||
else
|
||||
{
|
||||
GFileInfo *info = file_model_node_get_info (model, node);
|
||||
return (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
return _gtk_file_info_consider_as_directory (info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,7 +994,7 @@ ref_path_cb (GCancellable *cancellable,
|
||||
|
||||
if (folder)
|
||||
info->cleanups = g_slist_prepend (info->cleanups, folder);
|
||||
else if (g_slist_length (info->files) == 1
|
||||
else if ((info->files != NULL && info->files->next == NULL) /* g_slist_length == 1 */
|
||||
&& g_file_equal (info->node->file, info->files->data))
|
||||
{
|
||||
/* Done, now call the function */
|
||||
@@ -1022,10 +1022,10 @@ ref_path_cb (GCancellable *cancellable,
|
||||
goto out;
|
||||
}
|
||||
|
||||
g_object_unref (info->files);
|
||||
g_object_unref (info->files->data);
|
||||
info->files = g_slist_remove (info->files, info->files->data);
|
||||
|
||||
if (g_slist_length (info->files) < 1)
|
||||
if (info->files == NULL)
|
||||
{
|
||||
/* Done, now call the function */
|
||||
if (info->node)
|
||||
@@ -1070,7 +1070,8 @@ ref_path_cb (GCancellable *cancellable,
|
||||
out:
|
||||
if (info->node)
|
||||
unref_node_and_parents (info->model, info->node);
|
||||
g_object_unref (info->files);
|
||||
g_slist_foreach (info->files, (GFunc)g_object_unref, NULL);
|
||||
g_slist_free (info->files);
|
||||
g_slist_foreach (info->cleanups, (GFunc)g_object_unref, NULL);
|
||||
g_slist_free (info->cleanups);
|
||||
g_object_unref (info->model);
|
||||
@@ -1133,8 +1134,9 @@ _gtk_file_system_model_path_do (GtkFileSystemModel *model,
|
||||
return;
|
||||
}
|
||||
}
|
||||
g_object_unref (parent_file);
|
||||
|
||||
if (g_slist_length (files) < 1)
|
||||
if (files == NULL)
|
||||
return;
|
||||
|
||||
/* Now we have all paths, except the root path */
|
||||
@@ -1151,7 +1153,7 @@ _gtk_file_system_model_path_do (GtkFileSystemModel *model,
|
||||
g_object_unref (files->data);
|
||||
files = g_slist_remove (files, files->data);
|
||||
|
||||
if (g_slist_length (files) < 1)
|
||||
if (files == NULL)
|
||||
{
|
||||
/* Done, now call the function */
|
||||
if (node)
|
||||
@@ -1328,7 +1330,7 @@ file_model_node_is_visible (GtkFileSystemModel *model,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
if (model->show_folders != model->show_files &&
|
||||
model->show_folders != is_folder)
|
||||
@@ -1551,7 +1553,7 @@ file_model_node_get_children (GtkFileSystemModel *model,
|
||||
{
|
||||
GFileInfo *info = file_model_node_get_info (model, node);
|
||||
gboolean has_children = FALSE;
|
||||
gboolean is_folder = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
|
||||
gboolean is_folder = _gtk_file_info_consider_as_directory (info);
|
||||
|
||||
file_model_node_idle_clear_cancel (node);
|
||||
|
||||
|
||||
@@ -2863,7 +2863,7 @@ icon_source_start_element (GMarkupParseContext *context,
|
||||
error_domain,
|
||||
tmp);
|
||||
#else
|
||||
g_warning (tmp);
|
||||
g_warning ("%s", tmp);
|
||||
#endif
|
||||
g_free (tmp);
|
||||
g_free (stock_id);
|
||||
|
||||
+19
-4
@@ -2776,13 +2776,15 @@ static gboolean icon_info_ensure_scale_and_pixbuf (GtkIconInfo*, gboolean);
|
||||
static void
|
||||
apply_emblems (GtkIconInfo *info)
|
||||
{
|
||||
GdkPixbuf *icon;
|
||||
GdkPixbuf *icon = NULL;
|
||||
gint w, h, pos;
|
||||
GSList *l;
|
||||
|
||||
icon = info->pixbuf;
|
||||
w = gdk_pixbuf_get_width (icon);
|
||||
h = gdk_pixbuf_get_height (icon);
|
||||
if (info->emblem_infos == NULL)
|
||||
return;
|
||||
|
||||
w = gdk_pixbuf_get_width (info->pixbuf);
|
||||
h = gdk_pixbuf_get_height (info->pixbuf);
|
||||
|
||||
for (l = info->emblem_infos, pos = 0; l; l = l->next, pos++)
|
||||
{
|
||||
@@ -2826,10 +2828,23 @@ apply_emblems (GtkIconInfo *info)
|
||||
break;
|
||||
}
|
||||
|
||||
if (icon == NULL)
|
||||
{
|
||||
icon = gdk_pixbuf_copy (info->pixbuf);
|
||||
if (icon == NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
gdk_pixbuf_composite (emblem, icon, x, y, ew, eh, x, y,
|
||||
scale, scale, GDK_INTERP_BILINEAR, 255);
|
||||
}
|
||||
}
|
||||
|
||||
if (icon)
|
||||
{
|
||||
g_object_unref (info->pixbuf);
|
||||
info->pixbuf = icon;
|
||||
}
|
||||
}
|
||||
|
||||
/* This function contains the complicated logic for deciding
|
||||
|
||||
+95
-30
@@ -1354,7 +1354,7 @@ gtk_icon_view_size_allocate (GtkWidget *widget,
|
||||
hadjustment->upper = MAX (allocation->width, icon_view->priv->width);
|
||||
|
||||
if (hadjustment->value > hadjustment->upper - hadjustment->page_size)
|
||||
gtk_adjustment_set_value (hadjustment, hadjustment->upper - hadjustment->page_size);
|
||||
gtk_adjustment_set_value (hadjustment, MAX (0, hadjustment->upper - hadjustment->page_size));
|
||||
|
||||
vadjustment->page_size = allocation->height;
|
||||
vadjustment->page_increment = allocation->height * 0.9;
|
||||
@@ -1363,7 +1363,7 @@ gtk_icon_view_size_allocate (GtkWidget *widget,
|
||||
vadjustment->upper = MAX (allocation->height, icon_view->priv->height);
|
||||
|
||||
if (vadjustment->value > vadjustment->upper - vadjustment->page_size)
|
||||
gtk_adjustment_set_value (vadjustment, vadjustment->upper - vadjustment->page_size);
|
||||
gtk_adjustment_set_value (vadjustment, MAX (0, vadjustment->upper - vadjustment->page_size));
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget) &&
|
||||
icon_view->priv->scroll_to_path)
|
||||
@@ -1520,11 +1520,17 @@ gtk_icon_view_expose (GtkWidget *widget,
|
||||
static gboolean
|
||||
rubberband_scroll_timeout (gpointer data)
|
||||
{
|
||||
GtkIconView *icon_view = data;
|
||||
GtkIconView *icon_view;
|
||||
gdouble value;
|
||||
|
||||
gtk_adjustment_set_value (icon_view->priv->vadjustment,
|
||||
icon_view->priv->vadjustment->value +
|
||||
icon_view->priv->scroll_value_diff);
|
||||
icon_view = data;
|
||||
|
||||
value = MIN (icon_view->priv->vadjustment->value +
|
||||
icon_view->priv->scroll_value_diff,
|
||||
icon_view->priv->vadjustment->upper -
|
||||
icon_view->priv->vadjustment->page_size);
|
||||
|
||||
gtk_adjustment_set_value (icon_view->priv->vadjustment, value);
|
||||
|
||||
gtk_icon_view_update_rubberband (icon_view);
|
||||
|
||||
@@ -2560,7 +2566,7 @@ gtk_icon_view_layout_single_row (GtkIconView *icon_view,
|
||||
current_width += icon_view->priv->column_spacing + 2 * focus_width;
|
||||
|
||||
item->y = *y + focus_width;
|
||||
item->x = rtl ? GTK_WIDGET (icon_view)->allocation.width - item->width - x : x;
|
||||
item->x = x;
|
||||
|
||||
x = current_width - (icon_view->priv->margin + focus_width);
|
||||
|
||||
@@ -2584,14 +2590,17 @@ gtk_icon_view_layout_single_row (GtkIconView *icon_view,
|
||||
{
|
||||
GtkIconViewItem *item = items->data;
|
||||
|
||||
if (rtl)
|
||||
{
|
||||
item->x = *maximum_width - item->width - item->x;
|
||||
item->col = col - 1 - item->col;
|
||||
}
|
||||
|
||||
gtk_icon_view_calculate_item_size2 (icon_view, item, max_height);
|
||||
|
||||
/* We may want to readjust the new y coordinate. */
|
||||
if (item->y + item->height + focus_width + icon_view->priv->row_spacing > *y)
|
||||
*y = item->y + item->height + focus_width + icon_view->priv->row_spacing;
|
||||
|
||||
if (rtl)
|
||||
item->col = col - 1 - item->col;
|
||||
}
|
||||
|
||||
g_free (max_height);
|
||||
@@ -4202,7 +4211,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
||||
{
|
||||
gint x, y;
|
||||
gint focus_width;
|
||||
gfloat offset;
|
||||
gfloat offset, value;
|
||||
|
||||
gtk_widget_style_get (GTK_WIDGET (icon_view),
|
||||
"focus-line-width", &focus_width,
|
||||
@@ -4212,15 +4221,17 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
||||
|
||||
offset = y + item->y - focus_width -
|
||||
row_align * (GTK_WIDGET (icon_view)->allocation.height - item->height);
|
||||
|
||||
gtk_adjustment_set_value (icon_view->priv->vadjustment,
|
||||
icon_view->priv->vadjustment->value + offset);
|
||||
value = CLAMP (icon_view->priv->vadjustment->value + offset,
|
||||
icon_view->priv->vadjustment->lower,
|
||||
icon_view->priv->vadjustment->upper - icon_view->priv->vadjustment->page_size);
|
||||
gtk_adjustment_set_value (icon_view->priv->vadjustment, value);
|
||||
|
||||
offset = x + item->x - focus_width -
|
||||
col_align * (GTK_WIDGET (icon_view)->allocation.width - item->width);
|
||||
|
||||
gtk_adjustment_set_value (icon_view->priv->hadjustment,
|
||||
icon_view->priv->hadjustment->value + offset);
|
||||
value = CLAMP (icon_view->priv->hadjustment->value + offset,
|
||||
icon_view->priv->hadjustment->lower,
|
||||
icon_view->priv->hadjustment->upper - icon_view->priv->hadjustment->page_size);
|
||||
gtk_adjustment_set_value (icon_view->priv->hadjustment, value);
|
||||
|
||||
gtk_adjustment_changed (icon_view->priv->hadjustment);
|
||||
gtk_adjustment_changed (icon_view->priv->vadjustment);
|
||||
@@ -6279,6 +6290,7 @@ gtk_icon_view_autoscroll (GtkIconView *icon_view)
|
||||
{
|
||||
gint px, py, x, y, width, height;
|
||||
gint hoffset, voffset;
|
||||
gfloat value;
|
||||
|
||||
gdk_window_get_pointer (GTK_WIDGET (icon_view)->window, &px, &py, NULL);
|
||||
gdk_window_get_geometry (GTK_WIDGET (icon_view)->window, &x, &y, &width, &height, NULL);
|
||||
@@ -6293,12 +6305,19 @@ gtk_icon_view_autoscroll (GtkIconView *icon_view)
|
||||
hoffset = MAX (px - (x + width - 2 * SCROLL_EDGE_SIZE), 0);
|
||||
|
||||
if (voffset != 0)
|
||||
gtk_adjustment_set_value (icon_view->priv->vadjustment,
|
||||
icon_view->priv->vadjustment->value + voffset);
|
||||
|
||||
{
|
||||
value = CLAMP (icon_view->priv->vadjustment->value + voffset,
|
||||
icon_view->priv->vadjustment->lower,
|
||||
icon_view->priv->vadjustment->upper - icon_view->priv->vadjustment->page_size);
|
||||
gtk_adjustment_set_value (icon_view->priv->vadjustment, value);
|
||||
}
|
||||
if (hoffset != 0)
|
||||
gtk_adjustment_set_value (icon_view->priv->hadjustment,
|
||||
icon_view->priv->hadjustment->value + hoffset);
|
||||
{
|
||||
value = CLAMP (icon_view->priv->hadjustment->value + hoffset,
|
||||
icon_view->priv->hadjustment->lower,
|
||||
icon_view->priv->hadjustment->upper - icon_view->priv->hadjustment->page_size);
|
||||
gtk_adjustment_set_value (icon_view->priv->hadjustment, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6879,8 +6898,9 @@ gtk_icon_view_drag_data_received (GtkWidget *widget,
|
||||
* @n_targets: the number of items in @targets
|
||||
* @actions: the bitmask of possible actions for a drag from this
|
||||
* widget
|
||||
*
|
||||
* Turns @icon_view into a drag source for automatic DND.
|
||||
*
|
||||
* Turns @icon_view into a drag source for automatic DND. Calling this
|
||||
* method sets #GtkIconView:reorderable to %FALSE.
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
@@ -6912,8 +6932,9 @@ gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view,
|
||||
* @n_targets: the number of items in @targets
|
||||
* @actions: the bitmask of possible actions for a drag to this
|
||||
* widget
|
||||
*
|
||||
* Turns @icon_view into a drop destination for automatic DND.
|
||||
*
|
||||
* Turns @icon_view into a drop destination for automatic DND. Calling this
|
||||
* method sets #GtkIconView:reorderable to %FALSE.
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
@@ -6941,7 +6962,8 @@ gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
||||
* gtk_icon_view_unset_model_drag_source:
|
||||
* @icon_view: a #GtkIconView
|
||||
*
|
||||
* Undoes the effect of gtk_icon_view_enable_model_drag_source().
|
||||
* Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
|
||||
* method sets #GtkIconView:reorderable to %FALSE.
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
@@ -6963,7 +6985,8 @@ gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view)
|
||||
* gtk_icon_view_unset_model_drag_dest:
|
||||
* @icon_view: a #GtkIconView
|
||||
*
|
||||
* Undoes the effect of gtk_icon_view_enable_model_drag_dest().
|
||||
* Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
|
||||
* method sets #GtkIconView:reorderable to %FALSE.
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
@@ -7241,7 +7264,9 @@ static const GtkTargetEntry item_targets[] = {
|
||||
* #GtkTreeStore and #GtkListStore support these. If @reorderable is %TRUE, then
|
||||
* the user can reorder the model by dragging and dropping rows. The
|
||||
* developer can listen to these changes by connecting to the model's
|
||||
* row_inserted and row_deleted signals.
|
||||
* row_inserted and row_deleted signals. The reordering is implemented by setting up
|
||||
* the icon view as a drag source and destination. Therefore, drag and
|
||||
* drop can not be used in a reorderable view for any other purpose.
|
||||
*
|
||||
* This function does not give you any degree of control over the order -- any
|
||||
* reordering is allowed. If more control is needed, you should probably
|
||||
@@ -8864,8 +8889,39 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model,
|
||||
gpointer user_data)
|
||||
{
|
||||
AtkObject *atk_obj;
|
||||
gint index;
|
||||
GtkWidget *widget;
|
||||
GtkIconView *icon_view;
|
||||
GtkIconViewItem *item;
|
||||
GtkIconViewAccessible *a11y_view;
|
||||
GtkIconViewItemAccessible *a11y_item;
|
||||
gchar *name, *text;
|
||||
|
||||
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
|
||||
a11y_view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
|
||||
index = gtk_tree_path_get_indices(path)[0];
|
||||
a11y_item = gtk_icon_view_accessible_find_child (atk_obj, index);
|
||||
|
||||
if (a11y_item)
|
||||
{
|
||||
widget = GTK_ACCESSIBLE (atk_obj)->widget;
|
||||
icon_view = GTK_ICON_VIEW (widget);
|
||||
item = a11y_item->item;
|
||||
|
||||
name = gtk_icon_view_item_accessible_get_name (ATK_OBJECT (a11y_item));
|
||||
|
||||
if (!name || strcmp (name, "") == 0)
|
||||
{
|
||||
gtk_icon_view_set_cell_data (icon_view, item);
|
||||
text = get_text (icon_view, item);
|
||||
if (text)
|
||||
{
|
||||
gtk_text_buffer_set_text (a11y_item->text_buffer, text, -1);
|
||||
g_free (text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (atk_obj, "visible-data-changed");
|
||||
|
||||
return;
|
||||
@@ -8992,20 +9048,29 @@ gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model,
|
||||
GtkIconViewItemAccessible *item;
|
||||
GList *items;
|
||||
AtkObject *atk_obj;
|
||||
gint *order;
|
||||
gint length, i;
|
||||
|
||||
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
|
||||
icon_view = GTK_ICON_VIEW (user_data);
|
||||
priv = gtk_icon_view_accessible_get_priv (atk_obj);
|
||||
|
||||
length = gtk_tree_model_iter_n_children (tree_model, NULL);
|
||||
|
||||
order = g_new (gint, length);
|
||||
for (i = 0; i < length; i++)
|
||||
order [new_order[i]] = i;
|
||||
|
||||
items = priv->items;
|
||||
while (items)
|
||||
{
|
||||
info = items->data;
|
||||
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (info->item);
|
||||
info->index = new_order[info->index];
|
||||
info->index = order[info->index];
|
||||
item->item = g_list_nth_data (icon_view->priv->items, info->index);
|
||||
items = items->next;
|
||||
}
|
||||
g_free (order);
|
||||
priv->items = g_list_sort (priv->items,
|
||||
(GCompareFunc)gtk_icon_view_accessible_item_compare);
|
||||
|
||||
|
||||
+110
-14
@@ -53,7 +53,7 @@ struct _GtkComposeTableCompact
|
||||
*/
|
||||
#include "gtkimcontextsimpleseqs.h"
|
||||
|
||||
/* From the values below, the value 22 means the number of different first keysyms
|
||||
/* From the values below, the value 23 means the number of different first keysyms
|
||||
* that exist in the Compose file (from Xorg). When running compose-parse.py without
|
||||
* parameters, you get the count that you can put here. Needed when updating the
|
||||
* gtkimcontextsimpleseqs.h header file (contains the compose sequences).
|
||||
@@ -61,7 +61,7 @@ struct _GtkComposeTableCompact
|
||||
static const GtkComposeTableCompact gtk_compose_table_compact = {
|
||||
gtk_compose_seqs_compact,
|
||||
5,
|
||||
22,
|
||||
23,
|
||||
6
|
||||
};
|
||||
|
||||
@@ -270,6 +270,72 @@ check_table (GtkIMContextSimple *context_simple,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Checks if a keysym is a dead key. Dead key keysym values are defined in
|
||||
* ../gdk/gdkkeysyms.h and the first is GDK_dead_grave. As X.Org is updated,
|
||||
* more dead keys are added and we need to update the upper limit.
|
||||
* Currently, the upper limit is GDK_dead_dasia+1. The +1 has to do with
|
||||
* a temporary issue in the X.Org header files.
|
||||
* In future versions it will be just the keysym (no +1).
|
||||
*/
|
||||
#define IS_DEAD_KEY(k) \
|
||||
((k) >= GDK_dead_grave && (k) <= (GDK_dead_dasia+1))
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
|
||||
/* On Windows, user expectation is that typing a dead accent followed
|
||||
* by space will input the corresponding spacing character. The X
|
||||
* compose tables are different for dead acute and diaeresis, which
|
||||
* when followed by space produce a plain ASCII apostrophe and double
|
||||
* quote respectively. So special-case those.
|
||||
*/
|
||||
|
||||
static gboolean
|
||||
check_win32_special_cases (GtkIMContextSimple *context_simple,
|
||||
gint n_compose)
|
||||
{
|
||||
if (n_compose == 2 &&
|
||||
context_simple->compose_buffer[1] == GDK_space)
|
||||
{
|
||||
gunichar value = 0;
|
||||
|
||||
switch (context_simple->compose_buffer[0])
|
||||
{
|
||||
case GDK_dead_acute:
|
||||
value = 0x00B4; break;
|
||||
case GDK_dead_diaeresis:
|
||||
value = 0x00A8; break;
|
||||
}
|
||||
if (value > 0)
|
||||
{
|
||||
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
|
||||
context_simple->compose_buffer[0] = 0;
|
||||
|
||||
GTK_NOTE (MISC, g_print ("win32: U+%04X\n", value));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
check_win32_special_case_after_compact_match (GtkIMContextSimple *context_simple,
|
||||
gint n_compose,
|
||||
guint value)
|
||||
{
|
||||
/* On Windows user expectation is that typing two dead accents will input
|
||||
* two corresponding spacing accents.
|
||||
*/
|
||||
if (n_compose == 2 &&
|
||||
context_simple->compose_buffer[0] == context_simple->compose_buffer[1] &&
|
||||
IS_DEAD_KEY (context_simple->compose_buffer[0]))
|
||||
{
|
||||
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
|
||||
GTK_NOTE (MISC, g_print ("win32: U+%04X ", value));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
check_compact_table (GtkIMContextSimple *context_simple,
|
||||
const GtkComposeTableCompact *table,
|
||||
@@ -292,11 +358,18 @@ check_compact_table (GtkIMContextSimple *context_simple,
|
||||
compare_seq_index);
|
||||
|
||||
if (!seq_index)
|
||||
return FALSE;
|
||||
{
|
||||
GTK_NOTE (MISC, g_print ("compact: no\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (seq_index && n_compose == 1)
|
||||
return TRUE;
|
||||
{
|
||||
GTK_NOTE (MISC, g_print ("compact: yes\n"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GTK_NOTE (MISC, g_print ("compact: %d ", *seq_index));
|
||||
seq = NULL;
|
||||
|
||||
for (i = n_compose-1; i < table->max_seq_len; i++)
|
||||
@@ -317,6 +390,8 @@ check_compact_table (GtkIMContextSimple *context_simple,
|
||||
else
|
||||
{
|
||||
g_signal_emit_by_name (context_simple, "preedit-changed");
|
||||
|
||||
GTK_NOTE (MISC, g_print ("yes\n"));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -324,19 +399,27 @@ check_compact_table (GtkIMContextSimple *context_simple,
|
||||
}
|
||||
|
||||
if (!seq)
|
||||
return FALSE;
|
||||
{
|
||||
GTK_NOTE (MISC, g_print ("no\n"));
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gunichar value;
|
||||
|
||||
value = seq[row_stride - 1];
|
||||
|
||||
|
||||
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
|
||||
#ifdef G_OS_WIN32
|
||||
check_win32_special_case_after_compact_match (context_simple, n_compose, value);
|
||||
#endif
|
||||
context_simple->compose_buffer[0] = 0;
|
||||
|
||||
GTK_NOTE (MISC, g_print ("U+%04X\n", value));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GTK_NOTE (MISC, g_print ("no\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -407,12 +490,6 @@ check_normalize_nfc (gunichar* combination_buffer, gint n_compose)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* When updating the table of the compose sequences, also update here.
|
||||
*/
|
||||
#define IS_DEAD_KEY(k) \
|
||||
(((k) >= GDK_dead_grave && (k) <= (GDK_dead_dasia+1)) || \
|
||||
g_unichar_type (gdk_keyval_to_unicode (k)) == G_UNICODE_NON_SPACING_MARK)
|
||||
|
||||
static gboolean
|
||||
check_algorithmically (GtkIMContextSimple *context_simple,
|
||||
gint n_compose)
|
||||
@@ -925,12 +1002,31 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
return TRUE;
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
if (check_algorithmically (context_simple, n_compose))
|
||||
|
||||
GTK_NOTE (MISC, {
|
||||
g_print ("[ ");
|
||||
for (i = 0; i < n_compose; i++)
|
||||
{
|
||||
const gchar *keyval_name = gdk_keyval_name (context_simple->compose_buffer[i]);
|
||||
|
||||
if (keyval_name != NULL)
|
||||
g_print ("%s ", keyval_name);
|
||||
else
|
||||
g_print ("%04x ", context_simple->compose_buffer[i]);
|
||||
}
|
||||
g_print ("] ");
|
||||
});
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (check_win32_special_cases (context_simple, n_compose))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
if (check_compact_table (context_simple, >k_compose_table_compact, n_compose))
|
||||
return TRUE;
|
||||
|
||||
if (check_algorithmically (context_simple, n_compose))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* The current compose_buffer doesn't match anything */
|
||||
|
||||
+606
-40
File diff suppressed because it is too large
Load Diff
@@ -237,6 +237,7 @@ gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext)
|
||||
gtk_im_multicontext_set_slave (multicontext, slave, FALSE);
|
||||
g_object_unref (slave);
|
||||
|
||||
g_free (multicontext->context_id);
|
||||
multicontext->context_id = g_strdup (global_context_id);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -620,7 +620,9 @@ gtk_link_button_query_tooltip_cb (GtkWidget *widget,
|
||||
label = gtk_button_get_label (GTK_BUTTON (link_button));
|
||||
uri = link_button->priv->uri;
|
||||
|
||||
if (label && *label != '\0' && uri && strcmp (label, uri) != 0)
|
||||
if (!gtk_widget_get_tooltip_text (widget)
|
||||
&& !gtk_widget_get_tooltip_markup (widget)
|
||||
&& label && *label != '\0' && uri && strcmp (label, uri) != 0)
|
||||
{
|
||||
gtk_tooltip_set_text (tooltip, uri);
|
||||
return TRUE;
|
||||
|
||||
+18
-14
@@ -88,6 +88,24 @@ DllMain (HINSTANCE hinstDLL,
|
||||
/* This here before inclusion of gtkprivate.h so that it sees the
|
||||
* original GTK_LOCALEDIR definition. Yeah, this is a bit sucky.
|
||||
*/
|
||||
const gchar *
|
||||
_gtk_get_libdir (void)
|
||||
{
|
||||
static char *gtk_libdir = NULL;
|
||||
if (gtk_libdir == NULL)
|
||||
{
|
||||
gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
|
||||
gchar *slash = strrchr (root, '\\');
|
||||
if (g_ascii_strcasecmp (slash + 1, ".libs") == 0)
|
||||
gtk_libdir = GTK_LIBDIR;
|
||||
else
|
||||
gtk_libdir = g_build_filename (root, "lib", NULL);
|
||||
g_free (root);
|
||||
}
|
||||
|
||||
return gtk_libdir;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
_gtk_get_localedir (void)
|
||||
{
|
||||
@@ -332,20 +350,6 @@ _gtk_get_datadir (void)
|
||||
return gtk_datadir;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
_gtk_get_libdir (void)
|
||||
{
|
||||
static char *gtk_libdir = NULL;
|
||||
if (gtk_libdir == NULL)
|
||||
{
|
||||
gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
|
||||
gtk_libdir = g_build_filename (root, "lib", NULL);
|
||||
g_free (root);
|
||||
}
|
||||
|
||||
return gtk_libdir;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
_gtk_get_sysconfdir (void)
|
||||
{
|
||||
|
||||
@@ -469,6 +469,7 @@ gtk_mount_operation_ask_password (GMountOperation *mount_op,
|
||||
gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
|
||||
|
||||
gtk_window_set_resizable (window, FALSE);
|
||||
gtk_window_set_title (window, "");
|
||||
gtk_window_set_icon_name (window, GTK_STOCK_DIALOG_AUTHENTICATION);
|
||||
|
||||
gtk_dialog_add_buttons (dialog,
|
||||
|
||||
+19
-2
@@ -153,6 +153,11 @@ struct _GtkNotebookPage
|
||||
guint reorderable : 1;
|
||||
guint detachable : 1;
|
||||
|
||||
/* if true, the tab label was visible on last allocation; we track this so
|
||||
* that we know to redraw the tab area if a tab label was hidden then shown
|
||||
* without changing position */
|
||||
guint tab_allocated_visible : 1;
|
||||
|
||||
GtkRequisition requisition;
|
||||
GtkAllocation allocation;
|
||||
|
||||
@@ -5556,9 +5561,15 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
|
||||
gint tab_curvature;
|
||||
gint tab_pos = get_effective_tab_pos (notebook);
|
||||
gboolean tab_allocation_changed;
|
||||
gboolean was_visible = page->tab_allocated_visible;
|
||||
|
||||
if (!page->tab_label)
|
||||
return FALSE;
|
||||
if (!page->tab_label ||
|
||||
!GTK_WIDGET_VISIBLE (page->tab_label) ||
|
||||
!gtk_widget_get_child_visible (page->tab_label))
|
||||
{
|
||||
page->tab_allocated_visible = FALSE;
|
||||
return was_visible;
|
||||
}
|
||||
|
||||
xthickness = widget->style->xthickness;
|
||||
ythickness = widget->style->ythickness;
|
||||
@@ -5630,6 +5641,12 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
|
||||
|
||||
gtk_widget_size_allocate (page->tab_label, &child_allocation);
|
||||
|
||||
if (!was_visible)
|
||||
{
|
||||
page->tab_allocated_visible = TRUE;
|
||||
tab_allocation_changed = TRUE;
|
||||
}
|
||||
|
||||
return tab_allocation_changed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1598,6 +1598,9 @@ static void
|
||||
get_child_panes (GtkWidget *widget,
|
||||
GList **panes)
|
||||
{
|
||||
if (!GTK_WIDGET_REALIZED (widget))
|
||||
return;
|
||||
|
||||
if (GTK_IS_PANED (widget))
|
||||
{
|
||||
GtkPaned *paned = GTK_PANED (widget);
|
||||
|
||||
@@ -119,7 +119,7 @@ gtk_print_backend_module_load (GTypeModule *module)
|
||||
pb_module->library = g_module_open (pb_module->path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
|
||||
if (!pb_module->library)
|
||||
{
|
||||
g_warning (g_module_error());
|
||||
g_warning ("%s", g_module_error());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ gtk_print_backend_module_load (GTypeModule *module)
|
||||
!g_module_symbol (pb_module->library, "pb_module_create",
|
||||
&createp))
|
||||
{
|
||||
g_warning (g_module_error());
|
||||
g_warning ("%s", g_module_error());
|
||||
g_module_close (pb_module->library);
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -1848,10 +1848,10 @@ run_pdf (GtkPrintOperation *op,
|
||||
width, height);
|
||||
if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
|
||||
{
|
||||
g_set_error (&priv->error,
|
||||
GTK_PRINT_ERROR,
|
||||
GTK_PRINT_ERROR_GENERAL,
|
||||
cairo_status_to_string (cairo_surface_status (surface)));
|
||||
g_set_error_literal (&priv->error,
|
||||
GTK_PRINT_ERROR,
|
||||
GTK_PRINT_ERROR_GENERAL,
|
||||
cairo_status_to_string (cairo_surface_status (surface)));
|
||||
*do_print = FALSE;
|
||||
return GTK_PRINT_OPERATION_RESULT_ERROR;
|
||||
}
|
||||
|
||||
@@ -1696,6 +1696,19 @@ update_range_sensitivity (GtkWidget *button,
|
||||
gtk_widget_set_sensitive (range, active);
|
||||
}
|
||||
|
||||
static void
|
||||
emit_ok_response (GtkTreeView *tree_view,
|
||||
GtkTreePath *path,
|
||||
GtkTreeViewColumn *column,
|
||||
gpointer *user_data)
|
||||
{
|
||||
GtkPrintUnixDialog *print_dialog;
|
||||
|
||||
print_dialog = (GtkPrintUnixDialog *) user_data;
|
||||
|
||||
gtk_dialog_response (GTK_DIALOG (print_dialog), GTK_RESPONSE_OK);
|
||||
}
|
||||
|
||||
static void
|
||||
create_main_page (GtkPrintUnixDialog *dialog)
|
||||
{
|
||||
@@ -1708,6 +1721,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeSelection *selection;
|
||||
GtkWidget *custom_input;
|
||||
const gchar *range_tooltip;
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 18);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
@@ -1773,6 +1787,8 @@ create_main_page (GtkPrintUnixDialog *dialog)
|
||||
NULL);
|
||||
gtk_tree_view_column_set_cell_data_func (column, renderer, set_cell_sensitivity_func, NULL, NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
|
||||
|
||||
g_signal_connect (GTK_TREE_VIEW (treeview), "row-activated", G_CALLBACK (emit_ok_response), dialog);
|
||||
|
||||
gtk_widget_show (treeview);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled), treeview);
|
||||
@@ -1810,7 +1826,8 @@ create_main_page (GtkPrintUnixDialog *dialog)
|
||||
0, 0);
|
||||
|
||||
radio = gtk_radio_button_new_with_mnemonic (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("Pag_es:"));
|
||||
gtk_widget_set_tooltip_text (radio, _("Specify one or more page ranges,\n e.g. 1-3,7,11"));
|
||||
range_tooltip = _("Specify one or more page ranges,\n e.g. 1-3,7,11");
|
||||
gtk_widget_set_tooltip_text (radio, range_tooltip);
|
||||
|
||||
priv->page_range_radio = radio;
|
||||
gtk_widget_show (radio);
|
||||
@@ -1818,6 +1835,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
|
||||
0, 1, 2, 3, GTK_FILL, 0,
|
||||
0, 0);
|
||||
entry = gtk_entry_new ();
|
||||
gtk_widget_set_tooltip_text (entry, range_tooltip);
|
||||
priv->page_range_entry = entry;
|
||||
gtk_widget_show (entry);
|
||||
gtk_table_attach (GTK_TABLE (table), entry,
|
||||
|
||||
@@ -961,6 +961,9 @@ gtk_range_set_range (GtkRange *range,
|
||||
value = MIN (value, MAX (range->adjustment->lower,
|
||||
range->layout->fill_level));
|
||||
|
||||
value = CLAMP (value, range->adjustment->lower,
|
||||
(range->adjustment->upper - range->adjustment->page_size));
|
||||
|
||||
gtk_adjustment_set_value (range->adjustment, value);
|
||||
gtk_adjustment_changed (range->adjustment);
|
||||
}
|
||||
@@ -985,6 +988,9 @@ gtk_range_set_value (GtkRange *range,
|
||||
value = MIN (value, MAX (range->adjustment->lower,
|
||||
range->layout->fill_level));
|
||||
|
||||
value = CLAMP (value, range->adjustment->lower,
|
||||
(range->adjustment->upper - range->adjustment->page_size));
|
||||
|
||||
gtk_adjustment_set_value (range->adjustment, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -837,6 +837,8 @@ gtk_rc_parse_default_files (GtkRcContext *context)
|
||||
{
|
||||
gint i;
|
||||
|
||||
gtk_rc_add_initial_default_files ();
|
||||
|
||||
for (i = 0; gtk_rc_default_files[i] != NULL; i++)
|
||||
gtk_rc_context_parse_file (context, gtk_rc_default_files[i], GTK_PATH_PRIO_RC, FALSE);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -1124,6 +1124,8 @@ gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
|
||||
break;
|
||||
}
|
||||
|
||||
value = CLAMP (value, adjustment->lower, adjustment->upper - adjustment->page_size);
|
||||
|
||||
gtk_adjustment_set_value (adjustment, value);
|
||||
|
||||
return TRUE;
|
||||
@@ -1507,11 +1509,13 @@ gtk_scrolled_window_scroll_event (GtkWidget *widget,
|
||||
if (range && GTK_WIDGET_VISIBLE (range))
|
||||
{
|
||||
GtkAdjustment *adj = GTK_RANGE (range)->adjustment;
|
||||
gdouble delta;
|
||||
gdouble delta, new_value;
|
||||
|
||||
delta = _gtk_range_get_wheel_delta (GTK_RANGE (range), event->direction);
|
||||
|
||||
gtk_adjustment_set_value (adj, adj->value + delta);
|
||||
new_value = CLAMP (adj->value + delta, adj->lower, adj->upper - adj->page_size);
|
||||
|
||||
gtk_adjustment_set_value (adj, new_value);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1684,6 +1684,13 @@ gtk_spin_button_new_with_range (gdouble min,
|
||||
return GTK_WIDGET (spin);
|
||||
}
|
||||
|
||||
static void
|
||||
warn_nonzero_page_size (GtkAdjustment *adjustment)
|
||||
{
|
||||
if (gtk_adjustment_get_page_size (adjustment) != 0.0)
|
||||
g_warning ("GtkSpinButton: setting an adjustment with non-zero page size is deprecated");
|
||||
}
|
||||
|
||||
/* Callback used when the spin button's adjustment changes. We need to redraw
|
||||
* the arrows when the adjustment's range changes, and reevaluate our size request.
|
||||
*/
|
||||
@@ -1695,6 +1702,7 @@ adjustment_changed_cb (GtkAdjustment *adjustment, gpointer data)
|
||||
spin_button = GTK_SPIN_BUTTON (data);
|
||||
|
||||
spin_button->timer_step = spin_button->adjustment->step_increment;
|
||||
warn_nonzero_page_size (adjustment);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (spin_button));
|
||||
}
|
||||
|
||||
@@ -1734,6 +1742,7 @@ gtk_spin_button_set_adjustment (GtkSpinButton *spin_button,
|
||||
G_CALLBACK (adjustment_changed_cb),
|
||||
spin_button);
|
||||
spin_button->timer_step = spin_button->adjustment->step_increment;
|
||||
warn_nonzero_page_size (adjustment);
|
||||
}
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (spin_button));
|
||||
|
||||
@@ -671,6 +671,7 @@ gtk_status_icon_finalize (GObject *object)
|
||||
priv->blank_icon = NULL;
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
gtk_widget_destroy (priv->image);
|
||||
gtk_widget_destroy (priv->tray_icon);
|
||||
#endif
|
||||
|
||||
|
||||
+2
-1
@@ -2654,7 +2654,8 @@ void gtk_text_layout_get_iter_at_position (GtkTextLayout *layout,
|
||||
if (y > display->height - display->top_margin - display->bottom_margin)
|
||||
{
|
||||
byte_index = _gtk_text_line_byte_count (line);
|
||||
*trailing = 0;
|
||||
if (trailing)
|
||||
*trailing = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+1
-1
@@ -1465,7 +1465,7 @@ gtk_text_view_get_iter_at_location (GtkTextView *text_view,
|
||||
* gtk_text_view_get_iter_at_position:
|
||||
* @text_view: a #GtkTextView
|
||||
* @iter: a #GtkTextIter
|
||||
* @trailing: location to store an integer indicating where
|
||||
* @trailing: if non-%NULL, location to store an integer indicating where
|
||||
* in the grapheme the user clicked. It will either be
|
||||
* zero, or the number of characters in the grapheme.
|
||||
* 0 represents the trailing edge of the grapheme.
|
||||
|
||||
+2
-2
@@ -81,7 +81,7 @@ gtk_theme_engine_load (GTypeModule *module)
|
||||
g_free(engine_path);
|
||||
if (!engine->library)
|
||||
{
|
||||
g_warning (g_module_error());
|
||||
g_warning ("%s", g_module_error());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ gtk_theme_engine_load (GTypeModule *module)
|
||||
!g_module_symbol (engine->library, "theme_create_rc_style",
|
||||
(gpointer *)&engine->create_rc_style))
|
||||
{
|
||||
g_warning (g_module_error());
|
||||
g_warning ("%s", g_module_error());
|
||||
g_module_close (engine->library);
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -911,6 +911,7 @@ gtk_tooltip_show_tooltip (GdkDisplay *display)
|
||||
|
||||
if (tooltip->keyboard_mode_enabled)
|
||||
{
|
||||
x = y = -1;
|
||||
pointer_widget = tooltip_widget = tooltip->keyboard_widget;
|
||||
}
|
||||
else
|
||||
|
||||
+26
-20
@@ -1318,29 +1318,32 @@ gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
{
|
||||
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *)sortable;
|
||||
|
||||
if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
{
|
||||
GtkTreeDataSortHeader *header = NULL;
|
||||
|
||||
header = _gtk_tree_data_list_get_header (tree_model_sort->sort_list,
|
||||
sort_column_id);
|
||||
|
||||
/* we want to make sure that we have a function */
|
||||
g_return_if_fail (header != NULL);
|
||||
g_return_if_fail (header->func != NULL);
|
||||
}
|
||||
else
|
||||
g_return_if_fail (tree_model_sort->default_sort_func != NULL);
|
||||
|
||||
if (tree_model_sort->sort_column_id == sort_column_id)
|
||||
if (sort_column_id != GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
|
||||
{
|
||||
if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
{
|
||||
if (tree_model_sort->order == order)
|
||||
return;
|
||||
}
|
||||
{
|
||||
GtkTreeDataSortHeader *header = NULL;
|
||||
|
||||
header = _gtk_tree_data_list_get_header (tree_model_sort->sort_list,
|
||||
sort_column_id);
|
||||
|
||||
/* we want to make sure that we have a function */
|
||||
g_return_if_fail (header != NULL);
|
||||
g_return_if_fail (header->func != NULL);
|
||||
}
|
||||
else
|
||||
return;
|
||||
g_return_if_fail (tree_model_sort->default_sort_func != NULL);
|
||||
|
||||
if (tree_model_sort->sort_column_id == sort_column_id)
|
||||
{
|
||||
if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
{
|
||||
if (tree_model_sort->order == order)
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
tree_model_sort->sort_column_id = sort_column_id;
|
||||
@@ -1696,6 +1699,9 @@ gtk_tree_model_sort_sort_level (GtkTreeModelSort *tree_model_sort,
|
||||
static void
|
||||
gtk_tree_model_sort_sort (GtkTreeModelSort *tree_model_sort)
|
||||
{
|
||||
if (tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
|
||||
return;
|
||||
|
||||
if (!tree_model_sort->root)
|
||||
return;
|
||||
|
||||
|
||||
@@ -276,6 +276,7 @@ gtk_tree_store_new (gint n_columns,
|
||||
{
|
||||
g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type));
|
||||
g_object_unref (retval);
|
||||
va_end (args);
|
||||
return NULL;
|
||||
}
|
||||
gtk_tree_store_set_column_type (retval, i, type);
|
||||
@@ -284,6 +285,7 @@ gtk_tree_store_new (gint n_columns,
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_store_newv:
|
||||
* @n_columns: number of columns in the tree store
|
||||
|
||||
+52
-34
@@ -640,7 +640,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
|
||||
PROP_SEARCH_COLUMN,
|
||||
g_param_spec_int ("search-column",
|
||||
P_("Search Column"),
|
||||
P_("Model column to search through when searching through code"),
|
||||
P_("Model column to search through during interactive search"),
|
||||
-1,
|
||||
G_MAXINT,
|
||||
-1,
|
||||
@@ -2461,7 +2461,7 @@ gtk_tree_view_size_allocate (GtkWidget *widget,
|
||||
static void
|
||||
grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view)
|
||||
{
|
||||
if (!GTK_WIDGET_HAS_FOCUS (tree_view))
|
||||
if (GTK_WIDGET_CAN_FOCUS (tree_view) && !GTK_WIDGET_HAS_FOCUS (tree_view))
|
||||
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
|
||||
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
|
||||
}
|
||||
@@ -3611,6 +3611,7 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
|
||||
GdkRectangle visible_rect;
|
||||
gint y;
|
||||
gint offset;
|
||||
gfloat value;
|
||||
|
||||
gdk_window_get_pointer (tree_view->priv->bin_window, NULL, &y, NULL);
|
||||
y += tree_view->priv->dy;
|
||||
@@ -3626,8 +3627,9 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_adjustment_set_value (tree_view->priv->vadjustment,
|
||||
MAX (tree_view->priv->vadjustment->value + offset, 0.0));
|
||||
value = CLAMP (tree_view->priv->vadjustment->value + offset, 0.0,
|
||||
tree_view->priv->vadjustment->upper - tree_view->priv->vadjustment->page_size);
|
||||
gtk_adjustment_set_value (tree_view->priv->vadjustment, value);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -3636,6 +3638,7 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view)
|
||||
GdkRectangle visible_rect;
|
||||
gint x;
|
||||
gint offset;
|
||||
gfloat value;
|
||||
|
||||
gdk_window_get_pointer (tree_view->priv->bin_window, &x, NULL, NULL);
|
||||
|
||||
@@ -3651,8 +3654,9 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view)
|
||||
}
|
||||
offset = offset/3;
|
||||
|
||||
gtk_adjustment_set_value (tree_view->priv->hadjustment,
|
||||
MAX (tree_view->priv->hadjustment->value + offset, 0.0));
|
||||
value = CLAMP (tree_view->priv->hadjustment->value + offset,
|
||||
0.0, tree_view->priv->hadjustment->upper - tree_view->priv->hadjustment->page_size);
|
||||
gtk_adjustment_set_value (tree_view->priv->hadjustment, value);
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -4572,24 +4576,33 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
if (gtk_tree_view_is_expander_column (tree_view, column) &&
|
||||
tree_view->priv->tree_lines_enabled)
|
||||
{
|
||||
gint x = background_area.x;
|
||||
gint mult = rtl ? -1 : 1;
|
||||
gint y0 = background_area.y;
|
||||
gint y1 = background_area.y + background_area.height/2;
|
||||
gint y2 = background_area.y + background_area.height;
|
||||
|
||||
if (rtl)
|
||||
x += background_area.width - 1;
|
||||
|
||||
if ((node->flags & GTK_RBNODE_IS_PARENT) == GTK_RBNODE_IS_PARENT
|
||||
&& depth > 1)
|
||||
{
|
||||
gdk_draw_line (event->window,
|
||||
tree_view->priv->tree_line_gc,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.5),
|
||||
background_area.y + background_area.height / 2,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.1),
|
||||
background_area.y + background_area.height / 2);
|
||||
x + tree_view->priv->expander_size * (depth - 1.5) * mult,
|
||||
y1,
|
||||
x + tree_view->priv->expander_size * (depth - 1.1) * mult,
|
||||
y1);
|
||||
}
|
||||
else if (depth > 1)
|
||||
{
|
||||
gdk_draw_line (event->window,
|
||||
tree_view->priv->tree_line_gc,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.5),
|
||||
background_area.y + background_area.height / 2,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 0.5),
|
||||
background_area.y + background_area.height / 2);
|
||||
x + tree_view->priv->expander_size * (depth - 1.5) * mult,
|
||||
y1,
|
||||
x + tree_view->priv->expander_size * (depth - 0.5) * mult,
|
||||
y1);
|
||||
}
|
||||
|
||||
if (depth > 1)
|
||||
@@ -4601,17 +4614,17 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
if (!_gtk_rbtree_next (tree, node))
|
||||
gdk_draw_line (event->window,
|
||||
tree_view->priv->tree_line_gc,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.5),
|
||||
background_area.y,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.5),
|
||||
background_area.y + background_area.height / 2);
|
||||
x + tree_view->priv->expander_size * (depth - 1.5) * mult,
|
||||
y0,
|
||||
x + tree_view->priv->expander_size * (depth - 1.5) * mult,
|
||||
y1);
|
||||
else
|
||||
gdk_draw_line (event->window,
|
||||
tree_view->priv->tree_line_gc,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.5),
|
||||
background_area.y,
|
||||
background_area.x + tree_view->priv->expander_size * (depth - 1.5),
|
||||
background_area.y + background_area.height);
|
||||
x + tree_view->priv->expander_size * (depth - 1.5) * mult,
|
||||
y0,
|
||||
x + tree_view->priv->expander_size * (depth - 1.5) * mult,
|
||||
y2);
|
||||
|
||||
tmp_node = tree->parent_node;
|
||||
tmp_tree = tree->parent_tree;
|
||||
@@ -4621,10 +4634,10 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
if (_gtk_rbtree_next (tmp_tree, tmp_node))
|
||||
gdk_draw_line (event->window,
|
||||
tree_view->priv->tree_line_gc,
|
||||
background_area.x + tree_view->priv->expander_size * (i - 0.5),
|
||||
background_area.y,
|
||||
background_area.x + tree_view->priv->expander_size * (i - 0.5),
|
||||
background_area.y + background_area.height);
|
||||
x + tree_view->priv->expander_size * (i - 0.5) * mult,
|
||||
y0,
|
||||
x + tree_view->priv->expander_size * (i - 0.5) * mult,
|
||||
y2);
|
||||
|
||||
tmp_node = tmp_tree->parent_node;
|
||||
tmp_tree = tmp_tree->parent_tree;
|
||||
@@ -7837,7 +7850,8 @@ gtk_tree_view_focus (GtkWidget *widget,
|
||||
GtkContainer *container = GTK_CONTAINER (widget);
|
||||
GtkWidget *focus_child;
|
||||
|
||||
if (!GTK_WIDGET_IS_SENSITIVE (container))
|
||||
if (!GTK_WIDGET_IS_SENSITIVE (container) ||
|
||||
!GTK_WIDGET_CAN_FOCUS (widget))
|
||||
return FALSE;
|
||||
|
||||
focus_child = container->focus_child;
|
||||
@@ -8946,7 +8960,11 @@ gtk_tree_view_clamp_column_visible (GtkTreeView *tree_view,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_adjustment_set_value (tree_view->priv->hadjustment, x);
|
||||
gtk_adjustment_set_value (tree_view->priv->hadjustment,
|
||||
CLAMP (x,
|
||||
tree_view->priv->hadjustment->lower,
|
||||
tree_view->priv->hadjustment->upper
|
||||
- tree_view->priv->hadjustment->page_size));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -11591,9 +11609,9 @@ gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
||||
vadj = tree_view->priv->vadjustment;
|
||||
|
||||
if (tree_x != -1)
|
||||
gtk_adjustment_set_value (hadj, tree_x);
|
||||
gtk_adjustment_set_value (hadj, CLAMP (tree_x, hadj->lower, hadj->upper - hadj->page_size));
|
||||
if (tree_y != -1)
|
||||
gtk_adjustment_set_value (vadj, tree_y);
|
||||
gtk_adjustment_set_value (vadj, CLAMP (tree_y, vadj->lower, vadj->upper - vadj->page_size));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13335,7 +13353,7 @@ unset_reorderable (GtkTreeView *tree_view)
|
||||
* widget
|
||||
*
|
||||
* Turns @tree_view into a drag source for automatic DND. Calling this
|
||||
* method sets reorderable to %FALSE.
|
||||
* method sets #GtkTreeView:reorderable to %FALSE.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
||||
@@ -13372,7 +13390,7 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
||||
* widget
|
||||
*
|
||||
* Turns @tree_view into a drop destination for automatic DND. Calling
|
||||
* this method sets reorderable to %FALSE.
|
||||
* this method sets #GtkTreeView:reorderable to %FALSE.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
@@ -13402,7 +13420,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
*
|
||||
* Undoes the effect of
|
||||
* gtk_tree_view_enable_model_drag_source(). Calling this method sets
|
||||
* reorderable to %FALSE.
|
||||
* #GtkTreeView:reorderable to %FALSE.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
|
||||
@@ -13434,7 +13452,7 @@ gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
|
||||
*
|
||||
* Undoes the effect of
|
||||
* gtk_tree_view_enable_model_drag_dest(). Calling this method sets
|
||||
* reorderable to %FALSE.
|
||||
* #GtkTreeView:reorderable to %FALSE.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view)
|
||||
|
||||
+28
-22
@@ -8028,6 +8028,8 @@ gtk_window_activate_key (GtkWindow *window,
|
||||
{
|
||||
GtkKeyHash *key_hash;
|
||||
GtkWindowKeyEntry *found_entry = NULL;
|
||||
gboolean enable_mnemonics;
|
||||
gboolean enable_accels;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
@@ -8036,39 +8038,43 @@ gtk_window_activate_key (GtkWindow *window,
|
||||
|
||||
if (key_hash)
|
||||
{
|
||||
GSList *tmp_list;
|
||||
GSList *entries = _gtk_key_hash_lookup (key_hash,
|
||||
event->hardware_keycode,
|
||||
event->state,
|
||||
gtk_accelerator_get_default_mod_mask (),
|
||||
event->group);
|
||||
GSList *tmp_list;
|
||||
|
||||
for (tmp_list = entries; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
GtkWindowKeyEntry *entry = tmp_list->data;
|
||||
if (entry->is_mnemonic)
|
||||
{
|
||||
found_entry = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found_entry && entries)
|
||||
found_entry = entries->data;
|
||||
|
||||
g_slist_free (entries);
|
||||
}
|
||||
|
||||
if (found_entry)
|
||||
{
|
||||
gboolean enable_mnemonics;
|
||||
gboolean enable_accels;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (window)),
|
||||
"gtk-enable-mnemonics", &enable_mnemonics,
|
||||
"gtk-enable-accels", &enable_accels,
|
||||
NULL);
|
||||
|
||||
for (tmp_list = entries; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
GtkWindowKeyEntry *entry = tmp_list->data;
|
||||
if (entry->is_mnemonic)
|
||||
{
|
||||
if (enable_mnemonics)
|
||||
{
|
||||
found_entry = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (enable_accels && !found_entry)
|
||||
{
|
||||
found_entry = entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free (entries);
|
||||
}
|
||||
|
||||
if (found_entry)
|
||||
{
|
||||
if (found_entry->is_mnemonic)
|
||||
{
|
||||
if (enable_mnemonics)
|
||||
|
||||
+1
-1
@@ -144,7 +144,6 @@ gtk_OBJECTS_file = \
|
||||
gtkfilefilter.obj \
|
||||
gtkfilesystem.obj \
|
||||
gtkfilesystemmodel.obj \
|
||||
gtkfilesystemwin32.obj \
|
||||
|
||||
gtk_OBJECTS_print = \
|
||||
gtkprint-win32.obj \
|
||||
@@ -291,6 +290,7 @@ gtk_OBJECTS = \
|
||||
gtkruler.obj \
|
||||
gtkscale.obj \
|
||||
gtkscalebutton.obj \
|
||||
gtkshow.obj \
|
||||
gtkscrollbar.obj \
|
||||
gtkscrolledwindow.obj \
|
||||
gtksearchengine.obj \
|
||||
|
||||
+3
-3
@@ -795,7 +795,7 @@ test_spin_button (void)
|
||||
"<property name=\"upper\">10</property>"
|
||||
"<property name=\"step-increment\">2</property>"
|
||||
"<property name=\"page-increment\">3</property>"
|
||||
"<property name=\"page-size\">5</property>"
|
||||
"<property name=\"page-size\">0</property>"
|
||||
"<property name=\"value\">1</property>"
|
||||
"</object>"
|
||||
"<object class=\"GtkSpinButton\" id=\"spinbutton1\">"
|
||||
@@ -823,7 +823,7 @@ test_spin_button (void)
|
||||
g_object_get (adjustment, "page-increment", &value, NULL);
|
||||
g_assert (value == 3);
|
||||
g_object_get (adjustment, "page-size", &value, NULL);
|
||||
g_assert (value == 5);
|
||||
g_assert (value == 0);
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
@@ -2293,7 +2293,7 @@ test_file (const gchar *filename)
|
||||
|
||||
if (!gtk_builder_add_from_file (builder, filename, &error))
|
||||
{
|
||||
g_error (error->message);
|
||||
g_error ("%s", error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2897,7 +2897,16 @@ draw_flat_box (GtkStyle *style, GdkWindow *window,
|
||||
{
|
||||
if (detail)
|
||||
{
|
||||
if (!strcmp (detail, "checkbutton"))
|
||||
if (state_type == GTK_STATE_SELECTED &&
|
||||
(!strncmp ("cell_even", detail, 9) || !strncmp ("cell_odd", detail, 8)))
|
||||
{
|
||||
GdkGC *gc = GTK_WIDGET_HAS_FOCUS (widget) ? style->base_gc[state_type] : style->base_gc[GTK_STATE_ACTIVE];
|
||||
|
||||
gdk_draw_rectangle (window, gc, TRUE, x, y, width, height);
|
||||
|
||||
return;
|
||||
}
|
||||
else if (!strcmp (detail, "checkbutton"))
|
||||
{
|
||||
if (state_type == GTK_STATE_PRELIGHT)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.7 ===
|
||||
|
||||
2008-12-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.6 ===
|
||||
|
||||
2008-11-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.5 ===
|
||||
|
||||
2007-06-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.11.1 ===
|
||||
|
||||
@@ -1,3 +1,76 @@
|
||||
2009-02-04 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Bug 570406 - gailutil.def is in srcdir, but used from builddir
|
||||
|
||||
* libgail-util/Makefile.am: Use gailutil.def from srcdir. Drop
|
||||
useless rules to install/uninstall import libraries, libtool knows
|
||||
to install / uninstall them itself when installing / uninstalling
|
||||
a .la file. Add rules to install / uninstall the def file like for
|
||||
consistency, like with the other libraries in GTK+.
|
||||
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.7 ===
|
||||
|
||||
2009-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
Bug #565110 – Add an env variable to disable Gail.
|
||||
|
||||
* gail.c (gtk_module_init): Bail out if NO_GAIL env var is set
|
||||
|
||||
2008-12-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.6 ===
|
||||
|
||||
2008-11-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 353088 – gtk_expander_get_label should return the full label text
|
||||
|
||||
* gailexpander.c: Don't rely on gtk_expander_get_label.
|
||||
Patch by Peter Johanson.
|
||||
|
||||
2008-11-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.14.5 ===
|
||||
|
||||
2008-11-08 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* gailtextview.c: (gail_streamable_content_get_stream):
|
||||
Missing format specifier. Bug #554567.
|
||||
|
||||
2008-10-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
Bug 555953 – libferret missing link against libgtk-x11
|
||||
|
||||
* test/Makefile.am: Link libferret against gtk.
|
||||
|
||||
2008-10-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
Bug 554950 – gail must make itself resident
|
||||
|
||||
* gail.c: Make the module resident, since it can't handle
|
||||
being unloaded.
|
||||
|
||||
2008-09-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
* gailtextview.c:
|
||||
* gailbutton.c: Fix possible leaks of textutils.
|
||||
|
||||
2008-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
* gailtreeview.c (garbage_collect_cell_data): Actually free
|
||||
the copied list.
|
||||
|
||||
2008-08-21 Li Yuan <li.yuan@sun.com>
|
||||
|
||||
* gailtreeview.c: (traverse_cells):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user