Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2992461c2a | |||
| 7f36b9665a | |||
| 314fdec2b2 | |||
| 39d1638997 | |||
| 5065f87560 | |||
| d5607bc8df | |||
| 5799d6efa9 | |||
| 6b6f52faf8 | |||
| c6eff1ad06 | |||
| 5b88fdd683 | |||
| f9d25a040d | |||
| 9c30f6dd64 | |||
| 5495d477e2 | |||
| 18da48edf9 | |||
| 2de4b5bd7a | |||
| 463ef2ed50 | |||
| d43bc5cdd8 | |||
| 879bfba4cc | |||
| c487b5878e | |||
| b1499832c0 | |||
| fefb55c088 | |||
| 757386cc97 | |||
| b952930639 |
@@ -1,188 +1,3 @@
|
||||
Overview of Changes in GTK+ 3.8.1
|
||||
=================================
|
||||
|
||||
* Broadway backend improvements:
|
||||
- Ensure window sizes are synched right
|
||||
- Sync surface updates with paint clock
|
||||
- Add support for password authentication
|
||||
- Reuse surfaces passed to server
|
||||
|
||||
* CSS improvements:
|
||||
- Add cycle detection to color resolving
|
||||
|
||||
* Bug fixes
|
||||
675649 gtk-demo: Fix typo
|
||||
681446 gtkdnd memory leak
|
||||
685419 gtkprintbackendfile: Infinite loop in _cairo_write()
|
||||
685420 Critical warnings when GtkPrintJob is released too early
|
||||
690275 scrolling on other windows is applied when coming back...
|
||||
696370 GtkOverlay doesn't work on top of GtkClutterEmbed
|
||||
696622 gtk option printer widget segfault in epiphany
|
||||
696623 GtkOverlay with a revealer produces warnings setting a...
|
||||
696882 GtkWindow changes size after hide/show cycle
|
||||
697144 Popup menu mnemonics fixes
|
||||
697263 Impossible to set window transparency on 3.8
|
||||
697427 Unreferencing GtkStatusIcon object causes abort
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
British English
|
||||
Catalan (Valencian)
|
||||
Czech
|
||||
Finnish
|
||||
Hungarian
|
||||
Indonesian
|
||||
Interlingua
|
||||
Kannada
|
||||
Malayalam
|
||||
Norwegian bokmål
|
||||
Polish
|
||||
Simplified Chinese
|
||||
Slovak
|
||||
Slovenian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.0
|
||||
=================================
|
||||
|
||||
* Bug fixes
|
||||
674759 GtkLabel: wrong value of "mnemonic-keyval" when...
|
||||
695493 testgtk: issues with the color selection example
|
||||
696051 vertical grid lines in rtl mode
|
||||
696171 GtkAssistant highlighted font unreadable
|
||||
696202 Add GtkSpinner animation back to Win32 theme
|
||||
696232 win32: do not crash on invalid utf8 conversion
|
||||
696405 appchooserbutton: filter out applications not...
|
||||
696546 Fix a crash in gtk_print_backend_cups_finalize()
|
||||
696553 Fix a crash in avahi_create_browsers()
|
||||
Use natural size to set treeview adjustments
|
||||
|
||||
* Translation updates
|
||||
Aragonese
|
||||
Czech
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Gujarati
|
||||
Hindi
|
||||
Hungarian
|
||||
Italian
|
||||
Kazakh
|
||||
Marathi
|
||||
Odia
|
||||
Persian
|
||||
Punjabi
|
||||
Russian
|
||||
Slovenian
|
||||
Tamil
|
||||
Traditional Chinese
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.14
|
||||
==================================
|
||||
|
||||
* A lot of filechooser button fixes
|
||||
|
||||
* Bugs fixed:
|
||||
586367 In local_only mode, file chooser should return native...
|
||||
671939 crash on exit
|
||||
674759 GtkLabel: wrong value of "mnemonic-keyval" when "use-...
|
||||
691040 selection is reported incorrectly in file chooser button
|
||||
694339 Fix build of GTK+ on Windows
|
||||
695200 Switching apps while a combobox open makes the parent...
|
||||
695278 Avoid passing a NULL title to setTitle
|
||||
695304 GtkTextView: don't popdown a bubble if we don't have one
|
||||
695312 Initial 'text' set in the non-numeric-only GtkSpinBut...
|
||||
695375 GtkEntryAccessible: also handle entry icon tooltip NU...
|
||||
695391 wayland documentation section id is "gtk-osx"
|
||||
695473 treeview: fix a critical warning
|
||||
695482 Universal Access panel appears jumbled and horrible a...
|
||||
695682 Cannot build docs for wayland-only build
|
||||
695714 Getting of printer info can hang
|
||||
695715 Use DBus calls instead of Avahi API
|
||||
695772 Different appearance of menus within Audacious
|
||||
695783 GtkApplication: Allow passing windows on non-X11 targets
|
||||
695874 GtkFontChooser docs
|
||||
695948 GtkFontButton sets wrong show-preview-entry
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Assamese
|
||||
Belarusian
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
Danish
|
||||
Finnish
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Indonesian
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Korean
|
||||
Polish
|
||||
Portuguese
|
||||
Punjabi
|
||||
Serbian
|
||||
Slovenian
|
||||
Spanish
|
||||
Uyghur
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.12
|
||||
==================================
|
||||
|
||||
* We now support touch friendly popups on entries and text views
|
||||
in place of context menus, on touch devices
|
||||
|
||||
* The print dialog now shows printers that are discovered
|
||||
using avahi, if configured with --enable-avahi-browsing
|
||||
|
||||
* Bugs fixed:
|
||||
650424 treeview: expander is not easily themable
|
||||
674207 window: Compiler warning when not building on X11
|
||||
675333 Cannot forget association in Open With dialog: program...
|
||||
688956 Print dialog needs to support Bonjour broadcasting of ...
|
||||
691426 get_current_desktop does not interpret property data c...
|
||||
692955 GtkIconCache fails to load non-builtin icons
|
||||
693995 GkColorChooserWidget crashes in select_swatch if palet...
|
||||
694059 GtkTreeView accessible object:state-changed-expanded e...
|
||||
694162 Memory leaks due to extra ref in gtk_ui_manager_builda...
|
||||
694217 drag&drop half-broken – items get stuck while dragging
|
||||
694274 wayland: don't attempt to unqueue events when events a...
|
||||
694302 Convert pixbuf animation demo (both copies) to GdkFram...
|
||||
694395 Remove unused code
|
||||
694406 Excessive amount of accessible text events when changi...
|
||||
694451 Containers shouldn't special case RTL positions
|
||||
694732 gdk: prevent NULL pointer access when debugging is ena...
|
||||
694742 Fix possible memory leak when GlobalAlloc() fails
|
||||
694924 Dead code in GtkClipboard
|
||||
694925 non-expose based draw() doesn't render window background
|
||||
694968 GtkIconTheme: fix failed assertion when asynchrnously ...
|
||||
694990 use primary icon slot for search icon
|
||||
695131 gtkbin: initialize minimum and natural size to zero fo...
|
||||
|
||||
Translation updates:
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
Estonian
|
||||
German
|
||||
Greek
|
||||
Gujarati
|
||||
Lithuanian
|
||||
Polish
|
||||
Punjabi
|
||||
Russian
|
||||
Serbian
|
||||
Simplified Chinese
|
||||
Slovenian
|
||||
Spanish
|
||||
Traditional Chinese
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.10
|
||||
==================================
|
||||
|
||||
|
||||
@@ -4,8 +4,4 @@ SUBDIRS = \
|
||||
vs9 \
|
||||
vs10
|
||||
|
||||
EXTRA_DIST += \
|
||||
gen-file-list-gtk.py \
|
||||
gengir_gtk.bat
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
# Generate the file lists for processing with g-ir-scanner
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
import optparse
|
||||
|
||||
def gen_gdk_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['gdk_public_h_sources', 'gdk_c_sources'])
|
||||
|
||||
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
|
||||
|
||||
files = vars['gdk_public_h_sources'].split() + \
|
||||
vars['gdk_c_sources'].split() + \
|
||||
vars['gdk_enums'].split()
|
||||
|
||||
sources = [i for i in files if (i != 'gdkkeysyms-compat.h')]
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def gen_filelist_gtk(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {'USE_WIN32':True},
|
||||
filters = ['gtkinclude_HEADERS',
|
||||
'deprecatedinclude_HEADERS',
|
||||
'gtk_base_c_sources'])
|
||||
|
||||
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
|
||||
|
||||
files = vars['gtkinclude_HEADERS'].split() + \
|
||||
vars['deprecatedinclude_HEADERS'].split() + \
|
||||
vars['gtk_base_c_sources'].split() + \
|
||||
vars['gtk_other_src'].split()
|
||||
|
||||
sources = [i for i in files if not (i.endswith('private.h')) and i != 'gtktextdisplay.h' and i != 'gtktextlayout.h']
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
|
||||
'''
|
||||
path: path to the Makefile.am
|
||||
vars: predefined variables
|
||||
conds: condition variables for Makefile
|
||||
filters: if None, all variables defined are returned,
|
||||
otherwise, it is a list contains that variables should be returned
|
||||
'''
|
||||
cur_vars = vars.copy()
|
||||
RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
|
||||
RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
|
||||
RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
|
||||
RE_AM_CONTINUING = re.compile(r'\\\s*$')
|
||||
RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
|
||||
RE_AM_ELSE = re.compile(r'^\s*else')
|
||||
RE_AM_ENDIF = re.compile(r'^\s*endif')
|
||||
def am_eval(cont):
|
||||
return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
|
||||
with open(path, 'r') as f:
|
||||
contents = f.readlines()
|
||||
#combine continuing lines
|
||||
i = 0
|
||||
ncont = []
|
||||
while i < len(contents):
|
||||
line = contents[i]
|
||||
if RE_AM_CONTINUING.search(line):
|
||||
line = RE_AM_CONTINUING.sub('', line)
|
||||
j = i + 1
|
||||
while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
|
||||
line += RE_AM_CONTINUING.sub('', contents[j])
|
||||
j += 1
|
||||
else:
|
||||
if j < len(contents):
|
||||
line += contents[j]
|
||||
i = j
|
||||
else:
|
||||
i += 1
|
||||
ncont.append(line)
|
||||
|
||||
#include, var define, var evaluation
|
||||
i = -1
|
||||
skip = False
|
||||
oldskip = []
|
||||
while i < len(ncont) - 1:
|
||||
i += 1
|
||||
line = ncont[i]
|
||||
mo = RE_AM_IF.search(line)
|
||||
if mo:
|
||||
oldskip.append(skip)
|
||||
skip = False if mo.group(1) in conds and conds[mo.group(1)] \
|
||||
else True
|
||||
continue
|
||||
mo = RE_AM_ELSE.search(line)
|
||||
if mo:
|
||||
skip = not skip
|
||||
continue
|
||||
mo = RE_AM_ENDIF.search(line)
|
||||
if mo:
|
||||
if oldskip:
|
||||
skip = oldskip.pop()
|
||||
continue
|
||||
if not skip:
|
||||
mo = RE_AM_INCLUDE.search(line)
|
||||
if mo:
|
||||
cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
|
||||
continue
|
||||
mo = RE_AM_VAR.search(line)
|
||||
if mo:
|
||||
cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
|
||||
continue
|
||||
|
||||
#filter:
|
||||
if filters != None:
|
||||
ret = {}
|
||||
for i in filters:
|
||||
ret[i] = cur_vars.get(i, '')
|
||||
return ret
|
||||
else:
|
||||
return cur_vars
|
||||
|
||||
def main(argv):
|
||||
srcroot = '..\\..'
|
||||
subdir_gdk = 'gdk'
|
||||
subdir_gtk = 'gtk'
|
||||
|
||||
gen_gdk_filelist(srcroot, subdir_gdk, 'gdk_list')
|
||||
gen_filelist_gtk(srcroot, subdir_gtk, 'gtk_list')
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
@@ -1,177 +0,0 @@
|
||||
@echo off
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
rem Needed environmental variables:
|
||||
rem PLAT: Windows platform-Win32 (i.e. x86) or x64 (i.e. x86-64)
|
||||
rem CONF: Configuration Type, Release or Debug
|
||||
rem VSVER: Visual C++ version used [9, 10 or 11]
|
||||
rem BASEDIR: Where the dependent libraries/headers are located
|
||||
rem PKG_CONFIG_PATH: Where the GLib/ATK/Pango/GDK-Pixbuf and their dependent pkg-config .pc files can be found
|
||||
rem MINGWDIR: Installation path of MINGW GCC, so gcc.exe can be found in %MINGWDIR%\bin.
|
||||
|
||||
rem Note that the Python executable/installation and all the runtime dependencies of the
|
||||
rem library/libraries need to be in your PATH or %BASEBIN%\bin.
|
||||
|
||||
rem Check the environemental variables...
|
||||
if /i "%PLAT%" == "Win32" goto PLAT_OK
|
||||
if /i "%PLAT%" == "x64" goto PLAT_OK
|
||||
if /i "%PLAT%" == "x86" (
|
||||
set PLAT=Win32
|
||||
goto PLAT_OK
|
||||
)
|
||||
if /i "%PLAT%" == "x86-64" (
|
||||
set PLAT=x64
|
||||
goto PLAT_OK
|
||||
)
|
||||
goto ERR_PLAT
|
||||
|
||||
:PLAT_OK
|
||||
if "%VSVER%" == "9" goto VSVER_OK
|
||||
if "%VSVER%" == "10" goto VSVER_OK
|
||||
if "%VSVER%" == "11" goto VSVER_OK
|
||||
goto ERR_VSVER
|
||||
:VSVER_OK
|
||||
if /i "%CONF%" == "Release" goto CONF_OK
|
||||
if /i "%CONF%" == "Debug" goto CONF_OK
|
||||
goto ERR_CONF
|
||||
:CONF_OK
|
||||
if "%BASEDIR%" == "" goto ERR_BASEDIR
|
||||
if not exist %BASEDIR% goto ERR_BASEDIR
|
||||
|
||||
if "%PKG_CONFIG_PATH%" == "" goto ERR_PKGCONFIG
|
||||
if not exist %PKG_CONFIG_PATH%\gobject-2.0.pc goto ERR_PKGCONFIG
|
||||
|
||||
if "%MINGWDIR%" == "" goto ERR_MINGWDIR
|
||||
if not exist %MINGWDIR%\bin\gcc.exe goto ERR_MINGWDIR
|
||||
|
||||
set CC=cl
|
||||
set BINDIR=%CD%\vs%VSVER%\%CONF%\%PLAT%\bin
|
||||
set INCLUDE=%BASEDIR%\include\glib-2.0;%BASEDIR%\lib\glib-2.0\include;%INCLUDE%
|
||||
set LIB=%BINDIR%;%BASEDIR%\lib;%LIB%
|
||||
set PATH=%BINDIR%;%BASEDIR%\bin;%PATH%;%MINGWDIR%\bin
|
||||
set PYTHONPATH=%BASEDIR%\lib\gobject-introspection;%BINDIR%
|
||||
|
||||
echo Creating filelist files for generating GDK3/GTK3 .gir's...
|
||||
call python gen-file-list-gtk.py
|
||||
|
||||
echo Setup .bat for generating GDK3/GTK3 .gir's...
|
||||
|
||||
rem ===============================================================================
|
||||
rem Begin setup of gtk_gir.bat to create Gdk-3.0.gir
|
||||
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
|
||||
rem ===============================================================================
|
||||
|
||||
echo echo Generating Gdk-3.0.gir...> gtk_gir.bat
|
||||
echo @echo off>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
rem ===============================================================
|
||||
rem Setup the command line flags to g-ir-scanner for Gdk-3.0.gir...
|
||||
rem ===============================================================
|
||||
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gdk ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
|
||||
echo --namespace=Gdk --nsversion=3.0 ^^>> gtk_gir.bat
|
||||
echo --include=Gio-2.0 --include=GdkPixbuf-2.0 ^^>> gtk_gir.bat
|
||||
echo --include=Pango-1.0 --include=cairo-1.0 ^^>> gtk_gir.bat
|
||||
echo --no-libtool --library=gdk-3-vs%VSVER% ^^>> gtk_gir.bat
|
||||
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
|
||||
echo --pkg-export gdk-3.0 --warn-all --c-include="gdk/gdk.h" ^^>> gtk_gir.bat
|
||||
echo -I..\.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION ^^>> gtk_gir.bat
|
||||
echo --filelist=gdk_list ^^>> gtk_gir.bat
|
||||
echo -o Gdk-3.0.gir>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
echo Completed setup of .bat for generating Gdk-3.0.gir.
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
rem =================================================
|
||||
rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir
|
||||
rem =================================================
|
||||
|
||||
rem ===============================================================================
|
||||
rem Begin setup of gtk_gir.bat to create Gtk-3.0.gir
|
||||
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
|
||||
rem ===============================================================================
|
||||
|
||||
echo echo Generating Gtk-3.0.gir...>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
rem ===============================================================
|
||||
rem Setup the command line flags to g-ir-scanner for Gtk-3.0.gir...
|
||||
rem ===============================================================
|
||||
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gtk -I..\..\gdk ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
|
||||
echo --namespace=Gtk --nsversion=3.0 ^^>> gtk_gir.bat
|
||||
echo --include=Atk-1.0 ^^>> gtk_gir.bat
|
||||
echo --include-uninstalled=./Gdk-3.0.gir ^^>> gtk_gir.bat
|
||||
echo --no-libtool --library=gtk-3-vs%VSVER% ^^>> gtk_gir.bat
|
||||
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
|
||||
echo --pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" ^^>> gtk_gir.bat
|
||||
echo -I..\.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" ^^>> gtk_gir.bat
|
||||
echo -Dtime_t=long ^^>> gtk_gir.bat
|
||||
echo -DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"3.6.2\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs%VSVER%\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_am_et -DINCLUDE_IM_cedilla -DINCLUDE_IM_cyrillic_translit ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_ime -DINCLUDE_IM_inuktitut -DINCLUDE_IM_ipa ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_multipress -DINCLUDE_IM_thai -DINCLUDE_IM_ti_er ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_ti_et -DINCLUDE_IM_viqr --filelist=gtk_list ^^>> gtk_gir.bat
|
||||
echo -o Gtk-3.0.gir>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
echo Completed setup of .bat for generating Gtk-3.0.gir.
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
rem =================================================
|
||||
rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir
|
||||
rem =================================================
|
||||
|
||||
rem =======================
|
||||
rem Now generate the .gir's
|
||||
rem =======================
|
||||
CALL gtk_gir.bat
|
||||
|
||||
rem Clean up the .bat/filelists for generating the .gir files...
|
||||
del gtk_gir.bat
|
||||
del gdk_list
|
||||
del gtk_list
|
||||
|
||||
rem Now compile the generated .gir files
|
||||
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gdk-3.0.gir -o Gdk-3.0.typelib
|
||||
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gtk-3.0.gir -o Gtk-3.0.typelib
|
||||
rem Copy the generated .girs and .typelibs to their appropriate places
|
||||
|
||||
mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0
|
||||
move /y *.gir %BASEDIR%\share\gir-1.0\
|
||||
|
||||
mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0
|
||||
move /y *.typelib %BASEDIR%\lib\girepository-1.0\
|
||||
|
||||
goto DONE
|
||||
|
||||
:ERR_PLAT
|
||||
echo You need to specify a valid Platform [set PLAT=Win32 or PLAT=x64]
|
||||
goto DONE
|
||||
:ERR_VSVER
|
||||
echo You need to specify your Visual Studio version [set VSVER=9 or VSVER=10 or VSVER=11]
|
||||
goto DONE
|
||||
:ERR_CONF
|
||||
echo You need to specify a valid Configuration [set CONF=Release or CONF=Debug]
|
||||
goto DONE
|
||||
:ERR_BASEDIR
|
||||
echo You need to specify a valid BASEDIR.
|
||||
goto DONE
|
||||
:ERR_PKGCONFIG
|
||||
echo You need to specify a valid PKG_CONFIG_PATH
|
||||
goto DONE
|
||||
:ERR_MINGWDIR
|
||||
echo You need to specify a valid MINGWDIR, where a valid gcc installation can be found.
|
||||
goto DONE
|
||||
:DONE
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.props \
|
||||
gdk-win32.vcxproj \
|
||||
gdk-win32.vcxproj.filters \
|
||||
gdk.vcxproj \
|
||||
gdk.vcxprojin \
|
||||
gdk.vcxproj.filters \
|
||||
gdk.vcxproj.filtersin \
|
||||
gtk.vcxproj \
|
||||
gtk.vcxprojin \
|
||||
gtk.vcxproj.filters \
|
||||
gtk.vcxproj.filtersin \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtka11y.vcxproj \
|
||||
gtka11y.vcxproj.filters \
|
||||
gtka11y.vcxprojin \
|
||||
gtka11y.vcxproj.filtersin \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
gengir.vcxproj \
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.props \
|
||||
gdk-win32.vcxproj \
|
||||
gdk-win32.vcxproj.filters \
|
||||
gdk.vcxproj \
|
||||
gdk.vcxprojin \
|
||||
gdk.vcxproj.filters \
|
||||
gdk.vcxproj.filtersin \
|
||||
gtk.vcxproj \
|
||||
gtk.vcxprojin \
|
||||
gtk.vcxproj.filters \
|
||||
gtk.vcxproj.filtersin \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtka11y.vcxproj \
|
||||
gtka11y.vcxproj.filters \
|
||||
gtka11y.vcxprojin \
|
||||
gtka11y.vcxproj.filtersin \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
install.vcxproj
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2093D218-190E-4194-9421-3BA7CBF33B15}</ProjectGuid>
|
||||
<RootNamespace>gengir</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="gdk.vcxproj">
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk.vcxproj">
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f5}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -23,6 +23,23 @@ copy $(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
|
||||
copy $(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
|
||||
|
||||
|
||||
mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
|
||||
mkdir $(CopyDir)\lib
|
||||
|
||||
copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
|
||||
@@ -576,7 +593,7 @@ copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion
|
||||
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
||||
|
||||
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\a11y
|
||||
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
@@ -16,8 +16,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcxpro
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gengir", "gengir.vcxproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -90,10 +88,6 @@ Global
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
+14
-15
@@ -1,20 +1,19 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.vsprops \
|
||||
gdk-win32.vcproj \
|
||||
gdk.vcproj \
|
||||
gdk.vcprojin \
|
||||
gtk.vcproj \
|
||||
gtk.vcprojin \
|
||||
gtk3-demo.vcproj \
|
||||
gtk3-demo-application.vcproj \
|
||||
gtka11y.vcproj \
|
||||
gtka11y.vcprojin \
|
||||
gailutil.vcproj \
|
||||
gengir.vcproj \
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.vsprops \
|
||||
gdk-win32.vcproj \
|
||||
gdk.vcproj \
|
||||
gdk.vcprojin \
|
||||
gtk.vcproj \
|
||||
gtk.vcprojin \
|
||||
gtk3-demo.vcproj \
|
||||
gtk3-demo-application.vcproj \
|
||||
gtka11y.vcproj \
|
||||
gtka11y.vcprojin \
|
||||
gailutil.vcproj \
|
||||
install.vcproj
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gengir"
|
||||
ProjectGUID="{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||
RootNamespace="gengir"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioProject>
|
||||
@@ -42,12 +42,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj",
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F} = {3281202A-CD26-4C67-B892-EB34BDBC612F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gengir", "gengir.vcproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -120,10 +114,6 @@ Global
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -79,6 +79,16 @@ mkdir $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
||||
|
||||
mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
|
||||
mkdir $(CopyDir)\lib

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib

|
||||
|
||||
@@ -359,7 +369,7 @@ copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-$(ApiVersion
|
||||
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

|
||||
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

|
||||
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\a11y

|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
|
||||
+5
-8
@@ -9,9 +9,9 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [8])
|
||||
m4_define([gtk_micro_version], [1])
|
||||
m4_define([gtk_interface_age], [1])
|
||||
m4_define([gtk_minor_version], [7])
|
||||
m4_define([gtk_micro_version], [11])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -350,7 +350,7 @@ if test "$enable_win32_backend" = "yes"; then
|
||||
backend_immodules="$backend_immodules,ime"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WIN32"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
|
||||
AM_CONDITIONAL(USE_WIN32, true)
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
else
|
||||
@@ -390,7 +390,6 @@ else
|
||||
AM_CONDITIONAL(USE_BROADWAY, false)
|
||||
fi
|
||||
|
||||
DISABLE_ON_WAYLAND=''
|
||||
if test "x$enable_wayland_backend" = "xyes"; then
|
||||
# For the cairo image backend
|
||||
cairo_backends="$cairo_backends cairo"
|
||||
@@ -398,13 +397,11 @@ if test "x$enable_wayland_backend" = "xyes"; then
|
||||
have_gio_unix=yes
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WAYLAND"
|
||||
DISABLE_ON_WAYLAND='%'
|
||||
WAYLAND_PACKAGES="wayland-client >= 1.0.0 xkbcommon >= 0.2.0 wayland-cursor"
|
||||
AM_CONDITIONAL(USE_WAYLAND, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_WAYLAND, false)
|
||||
fi
|
||||
AC_SUBST(DISABLE_ON_WAYLAND)
|
||||
|
||||
# strip leading space
|
||||
GDK_BACKENDS=${GDK_BACKENDS#* }
|
||||
@@ -1424,7 +1421,7 @@ else
|
||||
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
|
||||
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
|
||||
[Define to 1 if CUPS 1.6 API is available])
|
||||
have_cups_api_1_6=yes
|
||||
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_API_MAJOR)
|
||||
|
||||
+6
-11
@@ -403,7 +403,7 @@ static GtkWidget *create_text (GtkWidget **text_view, gboolean is_source);
|
||||
static void
|
||||
add_data_tab (const gchar *demoname)
|
||||
{
|
||||
gchar *resource_dir, *resource_name, *content_type, *content_mime;
|
||||
gchar *resource_dir, *resource_name, *content_type;
|
||||
gchar **resources;
|
||||
GBytes *bytes;
|
||||
GtkWidget *widget, *label;
|
||||
@@ -427,20 +427,17 @@ add_data_tab (const gchar *demoname)
|
||||
g_bytes_get_data (bytes, NULL),
|
||||
g_bytes_get_size (bytes),
|
||||
NULL);
|
||||
content_mime = g_content_type_get_mime_type (content_type);
|
||||
|
||||
/* In theory we should look at all the mime types gdk-pixbuf supports
|
||||
* and go from there, but we know what file types we've added.
|
||||
*/
|
||||
if (g_content_type_is_a (content_mime, "image/png") ||
|
||||
g_content_type_is_a (content_mime, "image/gif") ||
|
||||
g_content_type_is_a (content_mime, "image/jpeg"))
|
||||
if (g_content_type_is_a (content_type, "image/png") ||
|
||||
g_content_type_is_a (content_type, "image/gif") ||
|
||||
g_content_type_is_a (content_type, "image/jpeg"))
|
||||
{
|
||||
widget = gtk_image_new_from_resource (resource_name);
|
||||
}
|
||||
else if (g_content_type_is_a (content_mime, "text/plain") ||
|
||||
g_content_type_is_a (content_mime, "application/x-ext-ui") ||
|
||||
g_content_type_is_a (content_mime, "text/css"))
|
||||
else if (g_content_type_is_a (content_type, "text/plain"))
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkWidget *textview;
|
||||
@@ -452,8 +449,7 @@ add_data_tab (const gchar *demoname)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_mime);
|
||||
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_type);
|
||||
widget = NULL;
|
||||
}
|
||||
|
||||
@@ -462,7 +458,6 @@ add_data_tab (const gchar *demoname)
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
||||
|
||||
g_free (content_mime);
|
||||
g_free (content_type);
|
||||
g_free (resource_name);
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
@@ -85,7 +85,7 @@ scroll_to_bottom (GtkTextView *textview)
|
||||
gtk_text_iter_set_line_offset (&iter, 0);
|
||||
|
||||
/* and place the mark at iter. the mark will stay there after we
|
||||
* insert some text at the end because it has left gravity.
|
||||
* insert some text at the end because it has right gravity.
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "scroll");
|
||||
gtk_text_buffer_move_mark (buffer, mark, &iter);
|
||||
|
||||
@@ -54,15 +54,6 @@ Start your applications like this:
|
||||
BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
</programlisting>
|
||||
|
||||
You can add password protection for your session by creating a file in
|
||||
<filename>$XDG_CONFIG_HOME/broadway.passwd</filename> or <filename>$HOME/.config/broadway.passwd</filename>
|
||||
with a crypt(3) style password hash.
|
||||
|
||||
A simple way to generate it is with openssl:
|
||||
<programlisting>
|
||||
openssl passwd -1 > ~/.config/broadway.passwd
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ this range will trigger compiler warnings.
|
||||
Here is how you would compile hello.c if you want to allow it
|
||||
to use symbols that were not deprecated in 3.2:
|
||||
<programlisting>
|
||||
$ cc -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
|
||||
$ cc -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ gtk_page_setup_get_type
|
||||
@DISABLE_ON_W32@gtk_page_setup_unix_dialog_get_type
|
||||
gtk_paned_get_type
|
||||
gtk_paper_size_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_plug_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@gtk_plug_get_type
|
||||
@DISABLE_ON_W32@gtk_printer_get_type
|
||||
gtk_print_context_get_type
|
||||
@DISABLE_ON_W32@gtk_print_job_get_type
|
||||
@@ -151,7 +151,7 @@ gtk_separator_menu_item_get_type
|
||||
gtk_separator_tool_item_get_type
|
||||
gtk_settings_get_type
|
||||
gtk_size_group_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_socket_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@gtk_socket_get_type
|
||||
gtk_spin_button_get_type
|
||||
gtk_spinner_get_type
|
||||
gtk_statusbar_get_type
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-wayland">
|
||||
<refentry id="gtk-osx">
|
||||
<refmeta>
|
||||
<refentrytitle>Using GTK+ with Wayland</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
||||
@@ -83,7 +83,7 @@ broadwayd_SOURCES = \
|
||||
broadway-output.h \
|
||||
broadway-output.c
|
||||
|
||||
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt -lcrypt
|
||||
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt
|
||||
|
||||
MAINTAINERCLEANFILES = $(broadway_built_sources)
|
||||
EXTRA_DIST += $(broadway_built_sources)
|
||||
|
||||
@@ -317,13 +317,6 @@ broadway_output_get_next_serial (BroadwayOutput *output)
|
||||
return output->serial;
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
guint32 serial)
|
||||
{
|
||||
output->serial = serial;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* Core rendering operations *
|
||||
@@ -478,24 +471,6 @@ broadway_output_new_surface(BroadwayOutput *output,
|
||||
append_bool (output, is_temp);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_request_auth (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_REQUEST_AUTH);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_auth_ok (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_AUTH_OK);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_disconnected (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_DISCONNECTED);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_show_surface(BroadwayOutput *output, int id)
|
||||
{
|
||||
|
||||
@@ -23,8 +23,6 @@ BroadwayOutput *broadway_output_new (GOutputStream *out,
|
||||
void broadway_output_free (BroadwayOutput *output);
|
||||
int broadway_output_flush (BroadwayOutput *output);
|
||||
int broadway_output_has_error (BroadwayOutput *output);
|
||||
void broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
guint32 serial);
|
||||
guint32 broadway_output_get_next_serial (BroadwayOutput *output);
|
||||
void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int id,
|
||||
@@ -33,9 +31,6 @@ void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int w,
|
||||
int h,
|
||||
gboolean is_temp);
|
||||
void broadway_output_request_auth (BroadwayOutput *output);
|
||||
void broadway_output_auth_ok (BroadwayOutput *output);
|
||||
void broadway_output_disconnected (BroadwayOutput *output);
|
||||
void broadway_output_show_surface (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_hide_surface (BroadwayOutput *output,
|
||||
|
||||
@@ -36,9 +36,6 @@ typedef enum {
|
||||
BROADWAY_OP_SET_TRANSIENT_FOR = 'p',
|
||||
BROADWAY_OP_PUT_RGB = 'i',
|
||||
BROADWAY_OP_FLUSH = 'f',
|
||||
BROADWAY_OP_REQUEST_AUTH = 'l',
|
||||
BROADWAY_OP_AUTH_OK = 'L',
|
||||
BROADWAY_OP_DISCONNECTED = 'D',
|
||||
} BroadwayOpType;
|
||||
|
||||
typedef struct {
|
||||
@@ -163,7 +160,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
BroadwayRequestBase base;
|
||||
guint32 id;
|
||||
char name[36];
|
||||
char name[34];
|
||||
guint32 width;
|
||||
guint32 height;
|
||||
} BroadwayRequestUpdate;
|
||||
|
||||
+37
-198
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "broadway-output.h"
|
||||
|
||||
#define _XOPEN_SOURCE /* for crypt */
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include "gdktypes.h"
|
||||
@@ -11,10 +9,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <crypt.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -25,7 +19,6 @@ typedef struct BroadwayWindow BroadwayWindow;
|
||||
struct _BroadwayServer {
|
||||
GObject parent_instance;
|
||||
|
||||
char *password;
|
||||
char *address;
|
||||
int port;
|
||||
GSocketService *service;
|
||||
@@ -76,7 +69,6 @@ typedef struct HttpRequest {
|
||||
|
||||
struct BroadwayInput {
|
||||
BroadwayServer *server;
|
||||
BroadwayOutput *output;
|
||||
GSocketConnection *connection;
|
||||
GByteArray *buffer;
|
||||
GSource *source;
|
||||
@@ -84,7 +76,6 @@ struct BroadwayInput {
|
||||
gint64 time_base;
|
||||
gboolean proto_v7_plus;
|
||||
gboolean binary;
|
||||
gboolean active;
|
||||
};
|
||||
|
||||
struct BroadwayWindow {
|
||||
@@ -99,9 +90,6 @@ struct BroadwayWindow {
|
||||
gint32 transient_for;
|
||||
|
||||
cairo_surface_t *last_surface;
|
||||
|
||||
char *cached_surface_name;
|
||||
cairo_surface_t *cached_surface;
|
||||
};
|
||||
|
||||
static void broadway_server_resync_windows (BroadwayServer *server);
|
||||
@@ -112,8 +100,6 @@ static void
|
||||
broadway_server_init (BroadwayServer *server)
|
||||
{
|
||||
BroadwayWindow *root;
|
||||
char *passwd_file;
|
||||
char *password, *p;
|
||||
|
||||
server->service = g_socket_service_new ();
|
||||
server->pointer_grab_window_id = -1;
|
||||
@@ -122,22 +108,6 @@ broadway_server_init (BroadwayServer *server)
|
||||
server->id_ht = g_hash_table_new (NULL, NULL);
|
||||
server->id_counter = 0;
|
||||
|
||||
passwd_file = g_build_filename (g_get_user_config_dir (),
|
||||
"broadway.passwd", NULL);
|
||||
|
||||
if (g_file_get_contents (passwd_file,
|
||||
&password, NULL, NULL))
|
||||
{
|
||||
p = strchr (password, '\n');
|
||||
if (p)
|
||||
*p = 0;
|
||||
g_strstrip (password);
|
||||
if (strlen (password) > 3)
|
||||
server->password = password;
|
||||
else
|
||||
g_free (password);
|
||||
}
|
||||
|
||||
root = g_new0 (BroadwayWindow, 1);
|
||||
root->id = server->id_counter++;
|
||||
root->width = 1024;
|
||||
@@ -169,7 +139,7 @@ broadway_server_class_init (BroadwayServerClass * class)
|
||||
object_class->finalize = broadway_server_finalize;
|
||||
}
|
||||
|
||||
static void start (BroadwayInput *input);
|
||||
static void start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary);
|
||||
|
||||
static void
|
||||
http_request_free (HttpRequest *request)
|
||||
@@ -379,14 +349,6 @@ update_future_pointer_info (BroadwayServer *server, BroadwayInputPointerMsg *dat
|
||||
server->future_mouse_in_toplevel = data->mouse_window_id;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
verify_password (BroadwayServer *server, const char *password)
|
||||
{
|
||||
char *hash;
|
||||
hash = crypt (password, server->password);
|
||||
return strcmp (hash, server->password) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
parse_input_message (BroadwayInput *input, const char *message)
|
||||
{
|
||||
@@ -395,22 +357,6 @@ parse_input_message (BroadwayInput *input, const char *message)
|
||||
char *p;
|
||||
gint64 time_;
|
||||
|
||||
if (!input->active)
|
||||
{
|
||||
/* The input has not been activated yet, handle auth/start */
|
||||
|
||||
if (message[0] != 'l' ||
|
||||
!verify_password (server, message+1))
|
||||
{
|
||||
broadway_output_request_auth (input->output);
|
||||
broadway_output_flush (input->output);
|
||||
}
|
||||
else
|
||||
start (input);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
memset (&msg, 0, sizeof (msg));
|
||||
|
||||
p = (char *)message;
|
||||
@@ -624,7 +570,7 @@ parse_input (BroadwayInput *input)
|
||||
}
|
||||
break;
|
||||
case BROADWAY_WS_CNX_PING:
|
||||
broadway_output_pong (input->output);
|
||||
broadway_output_pong (server->output);
|
||||
break;
|
||||
case BROADWAY_WS_CNX_PONG:
|
||||
break; /* we never send pings, but tolerate pongs */
|
||||
@@ -650,8 +596,7 @@ parse_input (BroadwayInput *input)
|
||||
|
||||
if (buf[0] != 0)
|
||||
{
|
||||
if (server->input == input)
|
||||
server->input = NULL;
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
return;
|
||||
}
|
||||
@@ -668,8 +613,7 @@ parse_input (BroadwayInput *input)
|
||||
|
||||
if (len > 0 && buf[0] != 0)
|
||||
{
|
||||
if (server->input == input)
|
||||
server->input = NULL;
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
break;
|
||||
}
|
||||
@@ -696,16 +640,19 @@ queue_process_input_at_idle (BroadwayServer *server)
|
||||
}
|
||||
|
||||
static void
|
||||
broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
broadway_server_read_all_input_nonblocking (BroadwayServer *server)
|
||||
{
|
||||
GInputStream *in;
|
||||
gssize res;
|
||||
guint8 buffer[1024];
|
||||
GError *error;
|
||||
BroadwayInput *input;
|
||||
|
||||
if (input == NULL)
|
||||
if (server->input == NULL)
|
||||
return;
|
||||
|
||||
input = server->input;
|
||||
|
||||
in = g_io_stream_get_input_stream (G_IO_STREAM (input->connection));
|
||||
|
||||
error = NULL;
|
||||
@@ -721,8 +668,7 @@ broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
return;
|
||||
}
|
||||
|
||||
if (input->server->input == input)
|
||||
input->server->input = NULL;
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
if (res < 0)
|
||||
{
|
||||
@@ -740,7 +686,7 @@ broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
static void
|
||||
broadway_server_consume_all_input (BroadwayServer *server)
|
||||
{
|
||||
broadway_server_read_all_input_nonblocking (server->input);
|
||||
broadway_server_read_all_input_nonblocking (server);
|
||||
|
||||
/* Since we're parsing input but not processing the resulting messages
|
||||
we might not get a readable callback on the stream, so queue an idle to
|
||||
@@ -755,10 +701,9 @@ input_data_cb (GObject *stream,
|
||||
{
|
||||
BroadwayServer *server = input->server;
|
||||
|
||||
broadway_server_read_all_input_nonblocking (input);
|
||||
broadway_server_read_all_input_nonblocking (server);
|
||||
|
||||
if (input->active)
|
||||
process_input_messages (server);
|
||||
process_input_messages (server);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -933,14 +878,15 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
gsize len;
|
||||
GChecksum *checksum;
|
||||
char *origin, *host;
|
||||
BroadwayServer *server;
|
||||
BroadwayInput *input;
|
||||
const void *data_buffer;
|
||||
gsize data_buffer_size;
|
||||
GInputStream *in;
|
||||
char *key_v7;
|
||||
gboolean proto_v7_plus;
|
||||
GSocket *socket;
|
||||
int flag = 1;
|
||||
|
||||
server = request->server;
|
||||
|
||||
#ifdef DEBUG_WEBSOCKETS
|
||||
g_print ("incoming request:\n%s\n", request->request->str);
|
||||
@@ -1087,11 +1033,15 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
proto_v7_plus = FALSE;
|
||||
}
|
||||
|
||||
socket = g_socket_connection_get_socket (request->connection);
|
||||
setsockopt (g_socket_get_fd (socket), IPPROTO_TCP,
|
||||
TCP_NODELAY, (char *) &flag, sizeof(int));
|
||||
|
||||
if (server->input != NULL)
|
||||
{
|
||||
broadway_input_free (server->input);
|
||||
server->input = NULL;
|
||||
}
|
||||
|
||||
input = g_new0 (BroadwayInput, 1);
|
||||
|
||||
input->server = request->server;
|
||||
input->connection = g_object_ref (request->connection);
|
||||
input->proto_v7_plus = proto_v7_plus;
|
||||
@@ -1101,9 +1051,9 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
input->buffer = g_byte_array_sized_new (data_buffer_size);
|
||||
g_byte_array_append (input->buffer, data_buffer, data_buffer_size);
|
||||
|
||||
input->output =
|
||||
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
|
||||
0, proto_v7_plus, binary);
|
||||
server->input = input;
|
||||
|
||||
start_output (request, proto_v7_plus, binary);
|
||||
|
||||
/* This will free and close the data input stream, but we got all the buffered content already */
|
||||
http_request_free (request);
|
||||
@@ -1113,53 +1063,35 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
g_source_set_callback (input->source, (GSourceFunc)input_data_cb, input, NULL);
|
||||
g_source_attach (input->source, NULL);
|
||||
|
||||
if (input->server->password)
|
||||
{
|
||||
broadway_output_request_auth (input->output);
|
||||
broadway_output_flush (input->output);
|
||||
}
|
||||
else
|
||||
start (input);
|
||||
|
||||
/* Process any data in the pipe already */
|
||||
parse_input (input);
|
||||
process_input_messages (server);
|
||||
|
||||
g_strfreev (lines);
|
||||
}
|
||||
|
||||
static void
|
||||
start (BroadwayInput *input)
|
||||
start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary)
|
||||
{
|
||||
GSocket *socket;
|
||||
BroadwayServer *server;
|
||||
int flag = 1;
|
||||
|
||||
input->active = TRUE;
|
||||
socket = g_socket_connection_get_socket (request->connection);
|
||||
setsockopt(g_socket_get_fd (socket), IPPROTO_TCP,
|
||||
TCP_NODELAY, (char *) &flag, sizeof(int));
|
||||
|
||||
server = BROADWAY_SERVER (input->server);
|
||||
|
||||
if (server->output)
|
||||
{
|
||||
broadway_output_disconnected (server->output);
|
||||
broadway_output_flush (server->output);
|
||||
}
|
||||
|
||||
if (server->input != NULL)
|
||||
{
|
||||
broadway_input_free (server->input);
|
||||
server->input = NULL;
|
||||
}
|
||||
|
||||
server->input = input;
|
||||
server = BROADWAY_SERVER (request->server);
|
||||
|
||||
if (server->output)
|
||||
{
|
||||
server->saved_serial = broadway_output_get_next_serial (server->output);
|
||||
broadway_output_free (server->output);
|
||||
}
|
||||
server->output = input->output;
|
||||
|
||||
broadway_output_set_next_serial (server->output, server->saved_serial);
|
||||
broadway_output_auth_ok (server->output);
|
||||
broadway_output_flush (server->output);
|
||||
server->output =
|
||||
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
|
||||
server->saved_serial, proto_v7_plus, binary);
|
||||
|
||||
broadway_server_resync_windows (server);
|
||||
|
||||
@@ -1167,8 +1099,6 @@ start (BroadwayInput *input)
|
||||
broadway_output_grab_pointer (server->output,
|
||||
server->pointer_grab_window_id,
|
||||
server->pointer_grab_owner_events);
|
||||
|
||||
process_input_messages (server);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1419,12 +1349,6 @@ broadway_server_destroy_window (BroadwayServer *server,
|
||||
server->toplevels = g_list_remove (server->toplevels, window);
|
||||
g_hash_table_remove (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
|
||||
if (window->cached_surface_name != NULL)
|
||||
g_free (window->cached_surface_name);
|
||||
if (window->cached_surface != NULL)
|
||||
cairo_surface_destroy (window->cached_surface);
|
||||
|
||||
g_free (window);
|
||||
}
|
||||
}
|
||||
@@ -1659,11 +1583,6 @@ broadway_server_window_update (BroadwayServer *server,
|
||||
window->width,
|
||||
window->height);
|
||||
|
||||
g_assert (window->width == cairo_image_surface_get_width (window->last_surface));
|
||||
g_assert (window->width == cairo_image_surface_get_width (surface));
|
||||
g_assert (window->height == cairo_image_surface_get_height (window->last_surface));
|
||||
g_assert (window->height == cairo_image_surface_get_height (surface));
|
||||
|
||||
if (server->output != NULL)
|
||||
{
|
||||
if (window->last_synced)
|
||||
@@ -1820,86 +1739,6 @@ broadway_server_ungrab_pointer (BroadwayServer *server,
|
||||
return serial;
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} ShmSurfaceData;
|
||||
|
||||
static void
|
||||
shm_data_unmap (void *_data)
|
||||
{
|
||||
ShmSurfaceData *data = _data;
|
||||
munmap (data->data, data->data_size);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
broadway_server_open_surface (BroadwayServer *server,
|
||||
guint32 id,
|
||||
char *name,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
BroadwayWindow *window;
|
||||
ShmSurfaceData *data;
|
||||
cairo_surface_t *surface;
|
||||
gsize size;
|
||||
void *ptr;
|
||||
int fd;
|
||||
|
||||
window = g_hash_table_lookup (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window == NULL)
|
||||
return NULL;
|
||||
|
||||
if (window->cached_surface_name != NULL &&
|
||||
strcmp (name, window->cached_surface_name) == 0)
|
||||
return cairo_surface_reference (window->cached_surface);
|
||||
|
||||
size = width * height * sizeof (guint32);
|
||||
|
||||
fd = shm_open(name, O_RDONLY, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("Failed to shm_open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
shm_unlink (name);
|
||||
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
data = g_new0 (ShmSurfaceData, 1);
|
||||
|
||||
data->data = ptr;
|
||||
data->data_size = size;
|
||||
|
||||
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
|
||||
CAIRO_FORMAT_RGB24,
|
||||
width, height,
|
||||
width * sizeof (guint32));
|
||||
g_assert (surface != NULL);
|
||||
|
||||
cairo_surface_set_user_data (surface, &shm_cairo_key,
|
||||
data, shm_data_unmap);
|
||||
|
||||
if (window->cached_surface_name != NULL)
|
||||
g_free (window->cached_surface_name);
|
||||
window->cached_surface_name = g_strdup (name);
|
||||
|
||||
if (window->cached_surface != NULL)
|
||||
cairo_surface_destroy (window->cached_surface);
|
||||
window->cached_surface = cairo_surface_reference (surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
guint32
|
||||
broadway_server_new_window (BroadwayServer *server,
|
||||
int x,
|
||||
|
||||
@@ -78,10 +78,5 @@ gboolean broadway_server_window_move_resize (BroadwayServer *
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
cairo_surface_t * broadway_server_open_surface (BroadwayServer *server,
|
||||
guint32 id,
|
||||
char *name,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
#endif /* __BROADWAY_SERVER__ */
|
||||
|
||||
+45
-71
@@ -225,16 +225,34 @@ function flushSurface(surface)
|
||||
context.save();
|
||||
context.beginPath();
|
||||
|
||||
var minx;
|
||||
var miny;
|
||||
var maxx;
|
||||
var maxy;
|
||||
for (var j = 0; j < cmd.rects.length; j++) {
|
||||
var rect = cmd.rects[j];
|
||||
context.rect(rect.x, rect.y, rect.w, rect.h);
|
||||
if (j == 0) {
|
||||
minx = rect.x;
|
||||
miny = rect.y;
|
||||
maxx = rect.x + rect.w;
|
||||
maxy = rect.y + rect.h;
|
||||
} else {
|
||||
if (rect.x < minx)
|
||||
minx = rect.x;
|
||||
if (rect.y < miny)
|
||||
miny = rect.y;
|
||||
if (rect.x + rect.w > maxx)
|
||||
maxx = rect.x + rect.w;
|
||||
if (rect.y + rect.h > maxy)
|
||||
maxy = rect.y + rect.h;
|
||||
}
|
||||
}
|
||||
context.clip();
|
||||
// This seems to break chrome when src overlaps dest
|
||||
// But source-over should be fine for rgb surfaces anyway
|
||||
//context.globalCompositeOperation = "copy";
|
||||
context.drawImage(surface.canvas,
|
||||
cmd.dx, cmd.dy);
|
||||
context.globalCompositeOperation = "copy";
|
||||
context.drawImage(context.canvas,
|
||||
minx - cmd.dx, miny - cmd.dy, maxx - minx, maxy - miny,
|
||||
minx, miny, maxx - minx, maxy - miny);
|
||||
context.restore();
|
||||
break;
|
||||
|
||||
@@ -478,6 +496,12 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
|
||||
var xOffset = surface.x;
|
||||
var yOffset = surface.y;
|
||||
|
||||
var transientToplevel = getTransientToplevel(surface);
|
||||
if (transientToplevel) {
|
||||
xOffset = surface.x - transientToplevel.x;
|
||||
yOffset = surface.y - transientToplevel.y;
|
||||
}
|
||||
|
||||
var element = surface.canvas;
|
||||
if (surface.frame) {
|
||||
element = surface.frame;
|
||||
@@ -519,21 +543,6 @@ function handleCommands(cmd)
|
||||
var command = cmd.get_char();
|
||||
lastSerial = cmd.get_32();
|
||||
switch (command) {
|
||||
case 'l':
|
||||
login ();
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
if (loginDiv != null)
|
||||
loginDiv.parentNode.removeChild(loginDiv);
|
||||
start ();
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
alert ("disconnected");
|
||||
inputSocket = null;
|
||||
break;
|
||||
|
||||
case 's': // create new surface
|
||||
id = cmd.get_16();
|
||||
x = cmd.get_16s();
|
||||
@@ -733,12 +742,8 @@ BinCommands.prototype.get_32 = function() {
|
||||
};
|
||||
BinCommands.prototype.get_image_url = function() {
|
||||
var size = this.get_32();
|
||||
var png_blob = new Blob ([new Uint8Array (this.arraybuffer, this.pos, size)], {type:"image/png"});
|
||||
var url;
|
||||
if (window.webkitURL)
|
||||
url = window.webkitURL.createObjectURL(png_blob);
|
||||
else
|
||||
url = window.URL.createObjectURL(png_blob, {oneTimeOnly: true});
|
||||
var png_blob = new Blob ([this.arraybuffer.slice (this.pos, this.pos + size)], {type:"image/png"});
|
||||
var url = URL.createObjectURL(png_blob, {oneTimeOnly: true});
|
||||
this.pos = this.pos + size;
|
||||
return url;
|
||||
};
|
||||
@@ -2585,7 +2590,7 @@ function onMouseWheel(ev)
|
||||
var id = getSurfaceId(ev);
|
||||
var pos = getPositionsFromEvent(ev, id);
|
||||
|
||||
var offset = ev.detail ? ev.detail : -ev.wheelDelta;
|
||||
var offset = ev.detail ? ev.detail : ev.wheelDelta;
|
||||
var dir = 0;
|
||||
if (offset > 0)
|
||||
dir = 1;
|
||||
@@ -2626,47 +2631,6 @@ function newWS(loc) {
|
||||
return ws;
|
||||
}
|
||||
|
||||
function start()
|
||||
{
|
||||
setupDocument(document);
|
||||
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
window.onresize = function(ev) {
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
sendInput ("d", [w, h]);
|
||||
}
|
||||
|
||||
var loginDiv = null;
|
||||
function login()
|
||||
{
|
||||
if (loginDiv == null) {
|
||||
var div = document.createElement('div');
|
||||
document.body.appendChild(div);
|
||||
div.innerHTML = "Please enter password<br>";
|
||||
div.style.marginTop = "40px";
|
||||
div.style.textAlign = "center";
|
||||
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("type", "password");
|
||||
div.appendChild(input);
|
||||
input.focus ();
|
||||
input.onkeyup = function(e) {
|
||||
if (e.keyCode === 13 && input.value != "") {
|
||||
inputSocket.send ("l" + input.value);
|
||||
}
|
||||
}
|
||||
loginDiv = div;
|
||||
} else {
|
||||
alert ("Wrong password");
|
||||
}
|
||||
}
|
||||
|
||||
function connect()
|
||||
{
|
||||
var url = window.location.toString();
|
||||
@@ -2675,7 +2639,7 @@ function connect()
|
||||
var params = query_string[1].split("&");
|
||||
}
|
||||
|
||||
var loc = window.location.toString().replace("http:", "ws:").replace("https:", "wss:");
|
||||
var loc = window.location.toString().replace("http:", "ws:");
|
||||
loc = loc.substr(0, loc.lastIndexOf('/')) + "/socket";
|
||||
|
||||
var supports_binary = newWS (loc + "-test").binaryType == "blob";
|
||||
@@ -2688,13 +2652,23 @@ function connect()
|
||||
|
||||
ws.onopen = function() {
|
||||
inputSocket = ws;
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
window.onresize = function(ev) {
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
ws.onclose = function() {
|
||||
if (inputSocket != null)
|
||||
alert ("disconnected");
|
||||
inputSocket = null;
|
||||
};
|
||||
ws.onmessage = function(event) {
|
||||
handleMessage(event.data);
|
||||
};
|
||||
|
||||
setupDocument(document);
|
||||
}
|
||||
|
||||
@@ -140,6 +140,62 @@ region_from_rects (BroadwayRect *rects, int n_rects)
|
||||
return region;
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} ShmSurfaceData;
|
||||
|
||||
static void
|
||||
shm_data_unmap (void *_data)
|
||||
{
|
||||
ShmSurfaceData *data = _data;
|
||||
munmap (data->data, data->data_size);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
open_surface (char *name, int width, int height)
|
||||
{
|
||||
ShmSurfaceData *data;
|
||||
cairo_surface_t *surface;
|
||||
gsize size;
|
||||
void *ptr;
|
||||
int fd;
|
||||
|
||||
size = width * height * sizeof (guint32);
|
||||
|
||||
fd = shm_open(name, O_RDONLY, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("Failed to shm_open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
data = g_new0 (ShmSurfaceData, 1);
|
||||
|
||||
data->data = ptr;
|
||||
data->data_size = size;
|
||||
|
||||
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
|
||||
CAIRO_FORMAT_RGB24,
|
||||
width, height,
|
||||
width * sizeof (guint32));
|
||||
g_assert (surface != NULL);
|
||||
|
||||
cairo_surface_set_user_data (surface, &shm_cairo_key,
|
||||
data, shm_data_unmap);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
void
|
||||
add_client_serial_mapping (BroadwayClient *client,
|
||||
guint32 client_serial,
|
||||
@@ -281,11 +337,9 @@ client_handle_request (BroadwayClient *client,
|
||||
cairo_region_destroy (area);
|
||||
break;
|
||||
case BROADWAY_REQUEST_UPDATE:
|
||||
surface = broadway_server_open_surface (server,
|
||||
request->update.id,
|
||||
request->update.name,
|
||||
request->update.width,
|
||||
request->update.height);
|
||||
surface = open_surface (request->update.name,
|
||||
request->update.width,
|
||||
request->update.height);
|
||||
if (surface != NULL)
|
||||
{
|
||||
broadway_server_window_update (server,
|
||||
@@ -355,6 +409,7 @@ client_fill_cb (GObject *source_object,
|
||||
guint32 size;
|
||||
gsize count, remaining;
|
||||
guint8 *buffer;
|
||||
BroadwayRequest request;
|
||||
|
||||
buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
|
||||
|
||||
@@ -362,10 +417,14 @@ client_fill_cb (GObject *source_object,
|
||||
while (remaining >= sizeof (guint32))
|
||||
{
|
||||
memcpy (&size, buffer, sizeof (guint32));
|
||||
|
||||
|
||||
if (size <= remaining)
|
||||
{
|
||||
client_handle_request (client, (BroadwayRequest *)buffer);
|
||||
g_assert (size >= sizeof (BroadwayRequestBase));
|
||||
g_assert (size <= sizeof (BroadwayRequest));
|
||||
|
||||
memcpy (&request, buffer, size);
|
||||
client_handle_request (client, &request);
|
||||
|
||||
remaining -= size;
|
||||
buffer += size;
|
||||
|
||||
@@ -506,7 +506,7 @@ make_valid_fs_char (char c)
|
||||
{
|
||||
char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
|
||||
|
||||
return chars[c % (sizeof (chars) - 1)];
|
||||
return chars[c % sizeof (chars)];
|
||||
}
|
||||
|
||||
/* name must have at least space for 34 bytes */
|
||||
@@ -550,7 +550,7 @@ create_random_shm (char *name)
|
||||
static const cairo_user_data_key_t gdk_broadway_shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
char name[36];
|
||||
char name[34];
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} BroadwayShmSurfaceData;
|
||||
@@ -582,13 +582,6 @@ _gdk_broadway_server_create_surface (int width,
|
||||
res = ftruncate (fd, data->data_size);
|
||||
g_assert (res != -1);
|
||||
|
||||
res = posix_fallocate (fd, 0, data->data_size);
|
||||
if (res != 0)
|
||||
{
|
||||
shm_unlink (data->name);
|
||||
g_error ("Not enough shared memory for window surface");
|
||||
}
|
||||
|
||||
data->data = mmap(0, data->data_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
@@ -617,7 +610,7 @@ _gdk_broadway_server_window_update (GdkBroadwayServer *server,
|
||||
g_assert (data != NULL);
|
||||
|
||||
msg.id = id;
|
||||
memcpy (msg.name, data->name, 36);
|
||||
memcpy (msg.name, data->name, 34);
|
||||
msg.width = cairo_image_surface_get_width (surface);
|
||||
msg.height = cairo_image_surface_get_height (surface);
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
if (root_y)
|
||||
*root_y = device_root_y;
|
||||
if (win_x)
|
||||
*win_x = device_root_x - toplevel->x;
|
||||
*win_x = device_root_y - toplevel->x;
|
||||
if (win_y)
|
||||
*win_y = device_root_y - toplevel->y;
|
||||
if (mask)
|
||||
@@ -211,29 +211,6 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
gulong serial)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDeviceManager *device_manager;
|
||||
GList *devices, *d;
|
||||
|
||||
device_manager = gdk_display_get_device_manager (display);
|
||||
|
||||
/* Get all devices */
|
||||
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
||||
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
|
||||
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
|
||||
|
||||
/* End all grabs on the newly hidden window */
|
||||
for (d = devices; d; d = d->next)
|
||||
_gdk_display_end_device_grab (display, d->data, serial, window, TRUE);
|
||||
|
||||
g_list_free (devices);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_destroy (GdkWindow *window)
|
||||
{
|
||||
|
||||
@@ -66,8 +66,6 @@ struct _GdkBroadwayDisplay
|
||||
GdkWindow *active_offscreen_window;
|
||||
|
||||
GdkBroadwayServer *server;
|
||||
|
||||
gpointer move_resize_data;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayDisplayClass
|
||||
|
||||
@@ -247,7 +247,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
break;
|
||||
case BROADWAY_EVENT_GRAB_NOTIFY:
|
||||
case BROADWAY_EVENT_UNGRAB_NOTIFY:
|
||||
_gdk_display_device_grab_update (display, display->core_pointer, display->core_pointer, message->base.serial);
|
||||
_gdk_display_device_grab_update (display, display->core_pointer, NULL, message->base.serial);
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
|
||||
@@ -256,6 +256,10 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
{
|
||||
window->x = message->configure_notify.x;
|
||||
window->y = message->configure_notify.y;
|
||||
window->width = message->configure_notify.width;
|
||||
window->height = message->configure_notify.height;
|
||||
_gdk_window_update_size (window);
|
||||
_gdk_broadway_window_resize_surface (window);
|
||||
|
||||
event = gdk_event_new (GDK_CONFIGURE);
|
||||
event->configure.window = g_object_ref (window);
|
||||
|
||||
@@ -92,8 +92,6 @@ gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
|
||||
|
||||
void _gdk_broadway_selection_window_destroyed (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_destroy (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
gulong serial);
|
||||
|
||||
void _gdk_keymap_keys_changed (GdkDisplay *display);
|
||||
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,
|
||||
|
||||
@@ -83,16 +83,18 @@ G_DEFINE_TYPE (GdkWindowImplBroadway,
|
||||
gdk_window_impl_broadway,
|
||||
GDK_TYPE_WINDOW_IMPL)
|
||||
|
||||
static void
|
||||
update_dirty_windows_and_sync (void)
|
||||
static guint dirty_flush_id = 0;
|
||||
|
||||
static gboolean
|
||||
dirty_flush_idle (gpointer data)
|
||||
{
|
||||
GList *l;
|
||||
GdkBroadwayDisplay *display;
|
||||
gboolean updated_surface;
|
||||
|
||||
dirty_flush_id = 0;
|
||||
|
||||
display = GDK_BROADWAY_DISPLAY (gdk_display_get_default ());
|
||||
|
||||
updated_surface = FALSE;
|
||||
for (l = display->toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = l->data;
|
||||
@@ -100,7 +102,6 @@ update_dirty_windows_and_sync (void)
|
||||
if (impl->dirty)
|
||||
{
|
||||
impl->dirty = FALSE;
|
||||
updated_surface = TRUE;
|
||||
_gdk_broadway_server_window_update (display->server,
|
||||
impl->id,
|
||||
impl->surface);
|
||||
@@ -109,32 +110,16 @@ update_dirty_windows_and_sync (void)
|
||||
|
||||
/* We sync here to ensure all references to the impl->surface memory
|
||||
is done, as we may later paint new data in them. */
|
||||
if (updated_surface)
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
else
|
||||
gdk_display_flush (GDK_DISPLAY (display));
|
||||
}
|
||||
|
||||
static guint flush_id = 0;
|
||||
|
||||
static gboolean
|
||||
flush_idle (gpointer data)
|
||||
{
|
||||
flush_id = 0;
|
||||
|
||||
gdk_display_flush (gdk_display_get_default ());
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* We need to flush in an idle rather than AFTER_PAINT, as the clock
|
||||
is frozen during e.g. window resizes so the paint will not happen
|
||||
and the window resize request is never flushed. */
|
||||
static void
|
||||
queue_flush (GdkWindow *window)
|
||||
queue_dirty_flush (GdkBroadwayDisplay *display)
|
||||
{
|
||||
if (flush_id == 0)
|
||||
flush_id = gdk_threads_add_idle (flush_idle, NULL);
|
||||
if (dirty_flush_id == 0)
|
||||
dirty_flush_id = gdk_threads_add_idle (dirty_flush_idle, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -212,25 +197,6 @@ _gdk_broadway_screen_init_root_window (GdkScreen * screen)
|
||||
_gdk_window_update_size (broadway_screen->root_window);
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
GdkWindow *window)
|
||||
{
|
||||
update_dirty_windows_and_sync ();
|
||||
}
|
||||
|
||||
static void
|
||||
connect_frame_clock (GdkWindow *window)
|
||||
{
|
||||
if (WINDOW_IS_TOPLEVEL (window))
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window);
|
||||
|
||||
g_signal_connect (frame_clock, "after-paint",
|
||||
G_CALLBACK (on_frame_clock_after_paint), window);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
@@ -263,21 +229,22 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
g_assert (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT);
|
||||
|
||||
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
|
||||
|
||||
connect_frame_clock (window);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_resize_surface (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
cairo_surface_t *old;
|
||||
|
||||
if (impl->surface)
|
||||
{
|
||||
cairo_surface_destroy (impl->surface);
|
||||
old = impl->surface;
|
||||
|
||||
impl->surface = _gdk_broadway_server_create_surface (gdk_window_get_width (impl->wrapper),
|
||||
gdk_window_get_height (impl->wrapper));
|
||||
|
||||
cairo_surface_destroy (old);
|
||||
}
|
||||
|
||||
if (impl->ref_surface)
|
||||
@@ -417,7 +384,7 @@ gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
if (_gdk_broadway_server_window_show (broadway_display->server, impl->id))
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
|
||||
}
|
||||
|
||||
@@ -437,12 +404,8 @@ gdk_window_broadway_hide (GdkWindow *window)
|
||||
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
|
||||
_gdk_broadway_window_grab_check_unmap (window,
|
||||
_gdk_broadway_server_get_next_serial (broadway_display->server));
|
||||
|
||||
if (_gdk_broadway_server_window_hide (broadway_display->server, impl->id))
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
|
||||
_gdk_window_clear_update_area (window);
|
||||
}
|
||||
@@ -497,7 +460,7 @@ gdk_window_broadway_move_resize (GdkWindow *window,
|
||||
with_move,
|
||||
x, y,
|
||||
window->width, window->height);
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
if (size_changed)
|
||||
window->resize_count++;
|
||||
}
|
||||
@@ -582,12 +545,6 @@ gdk_broadway_window_set_geometry_hints (GdkWindow *window,
|
||||
const GdkGeometry *geometry,
|
||||
GdkWindowHints geom_mask)
|
||||
{
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
impl->geometry_hints = *geometry;
|
||||
impl->geometry_hints_mask = geom_mask;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -653,7 +610,7 @@ gdk_window_broadway_set_device_cursor (GdkWindow *window,
|
||||
{
|
||||
_gdk_broadway_cursor_update_theme (cursor);
|
||||
g_hash_table_replace (impl->device_cursor,
|
||||
device, g_object_ref (cursor));
|
||||
device, gdk_cursor_ref (cursor));
|
||||
}
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1035,8 +992,6 @@ struct _MoveResizeData
|
||||
gint moveresize_orig_width;
|
||||
gint moveresize_orig_height;
|
||||
long moveresize_process_time;
|
||||
GdkWindowHints moveresize_geom_mask;
|
||||
GdkGeometry moveresize_geometry;
|
||||
BroadwayInputMsg *moveresize_pending_event;
|
||||
};
|
||||
|
||||
@@ -1044,19 +999,20 @@ static MoveResizeData *
|
||||
get_move_resize_data (GdkDisplay *display,
|
||||
gboolean create)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
MoveResizeData *mv_resize;
|
||||
static GQuark move_resize_quark = 0;
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
if (!move_resize_quark)
|
||||
move_resize_quark = g_quark_from_static_string ("gdk-window-moveresize");
|
||||
|
||||
mv_resize = broadway_display->move_resize_data;
|
||||
mv_resize = g_object_get_qdata (G_OBJECT (display), move_resize_quark);
|
||||
|
||||
if (!mv_resize && create)
|
||||
{
|
||||
mv_resize = g_new0 (MoveResizeData, 1);
|
||||
mv_resize->display = display;
|
||||
|
||||
broadway_display->move_resize_data = mv_resize;
|
||||
g_object_set_qdata (G_OBJECT (display), move_resize_quark, mv_resize);
|
||||
}
|
||||
|
||||
return mv_resize;
|
||||
@@ -1125,13 +1081,6 @@ update_pos (MoveResizeData *mv_resize,
|
||||
w = MAX (w, 1);
|
||||
h = MAX (h, 1);
|
||||
|
||||
if (mv_resize->moveresize_geom_mask)
|
||||
{
|
||||
gdk_window_constrain_size (&mv_resize->moveresize_geometry,
|
||||
mv_resize->moveresize_geom_mask,
|
||||
w, h, &w, &h);
|
||||
}
|
||||
|
||||
gdk_window_move_resize (mv_resize->moveresize_window, x, y, w, h);
|
||||
}
|
||||
else
|
||||
@@ -1186,7 +1135,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
|
||||
switch (event->base.type)
|
||||
{
|
||||
case BROADWAY_EVENT_POINTER_MOVE:
|
||||
case 'm':
|
||||
if (mv_resize->moveresize_window->resize_count > 0)
|
||||
{
|
||||
if (mv_resize->moveresize_pending_event)
|
||||
@@ -1214,7 +1163,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
finish_drag (mv_resize);
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_BUTTON_RELEASE:
|
||||
case 'B':
|
||||
update_pos (mv_resize,
|
||||
event->pointer.root_x,
|
||||
event->pointer.root_y);
|
||||
@@ -1294,71 +1243,6 @@ create_moveresize_window (MoveResizeData *mv_resize,
|
||||
mv_resize->moveresize_process_time = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
calculate_unmoving_origin (MoveResizeData *mv_resize)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
gint width, height;
|
||||
|
||||
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY &&
|
||||
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC)
|
||||
{
|
||||
gdk_window_get_origin (mv_resize->moveresize_window,
|
||||
&mv_resize->moveresize_orig_x,
|
||||
&mv_resize->moveresize_orig_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_get_frame_extents (mv_resize->moveresize_window, &rect);
|
||||
gdk_window_get_geometry (mv_resize->moveresize_window,
|
||||
NULL, NULL, &width, &height);
|
||||
|
||||
switch (mv_resize->moveresize_geometry.win_gravity)
|
||||
{
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_NORTH:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_NORTH_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_CENTER:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
default:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
@@ -1369,9 +1253,6 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MoveResizeData *mv_resize;
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) ||
|
||||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
|
||||
@@ -1386,14 +1267,12 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
mv_resize->moveresize_y = root_y;
|
||||
mv_resize->moveresize_window = g_object_ref (window);
|
||||
|
||||
gdk_window_get_origin (mv_resize->moveresize_window,
|
||||
&mv_resize->moveresize_orig_x,
|
||||
&mv_resize->moveresize_orig_y);
|
||||
mv_resize->moveresize_orig_width = gdk_window_get_width (window);
|
||||
mv_resize->moveresize_orig_height = gdk_window_get_height (window);
|
||||
|
||||
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask;
|
||||
mv_resize->moveresize_geometry = impl->geometry_hints;
|
||||
|
||||
calculate_unmoving_origin (mv_resize);
|
||||
|
||||
create_moveresize_window (mv_resize, timestamp);
|
||||
}
|
||||
|
||||
@@ -1449,6 +1328,7 @@ gdk_broadway_window_process_updates_recurse (GdkWindow *window,
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
impl->dirty = TRUE;
|
||||
queue_dirty_flush (GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1514,7 +1394,7 @@ _gdk_broadway_window_translate (GdkWindow *window,
|
||||
if (_gdk_broadway_server_window_translate (broadway_display->server,
|
||||
impl->id,
|
||||
area, dx, dy))
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,9 +64,6 @@ struct _GdkWindowImplBroadway
|
||||
gint8 toplevel_window_type;
|
||||
gboolean dirty;
|
||||
gboolean last_synced;
|
||||
|
||||
GdkGeometry geometry_hints;
|
||||
GdkWindowHints geometry_hints_mask;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplBroadwayClass
|
||||
|
||||
@@ -42,15 +42,3 @@ isinf (double x)
|
||||
return (!_finite (x) && !_isnan (x));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Workaround for round() for non-GCC/non-C99 compilers */
|
||||
#ifndef HAVE_ROUND
|
||||
static inline double
|
||||
round (double x)
|
||||
{
|
||||
if (x >= 0)
|
||||
return floor (x + 0.5);
|
||||
else
|
||||
return ceil (x - 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
+2
-15
@@ -42,9 +42,6 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/* for the use of round() */
|
||||
#include "fallback-c89.c"
|
||||
|
||||
#undef DEBUG_WINDOW_PRINTING
|
||||
|
||||
|
||||
@@ -940,26 +937,19 @@ static void
|
||||
apply_clip_as_shape (GdkWindow *window)
|
||||
{
|
||||
GdkRectangle r;
|
||||
cairo_region_t *region;
|
||||
|
||||
r.x = r.y = 0;
|
||||
r.width = window->width;
|
||||
r.height = window->height;
|
||||
|
||||
region = cairo_region_copy (window->clip_region);
|
||||
if (window->layered_region)
|
||||
cairo_region_subtract (region, window->layered_region);
|
||||
|
||||
/* We only apply the clip region if would differ
|
||||
from the actual clip region implied by the size
|
||||
of the window. This is to avoid unneccessarily
|
||||
adding meaningless shapes to all native subwindows */
|
||||
if (!region_rect_equal (region, &r))
|
||||
apply_shape (window, region);
|
||||
if (!region_rect_equal (window->clip_region, &r))
|
||||
apply_shape (window, window->clip_region);
|
||||
else
|
||||
apply_shape (window, NULL);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -10006,9 +9996,6 @@ gdk_window_print (GdkWindow *window,
|
||||
g_print (" alpha[%d]",
|
||||
window->alpha);
|
||||
|
||||
if (window->has_alpha_background)
|
||||
g_print (" alpha_bg");
|
||||
|
||||
s = print_region (window->clip_region);
|
||||
g_print (" clipbox[%s]", s);
|
||||
|
||||
|
||||
@@ -55,10 +55,6 @@ typedef enum
|
||||
|
||||
GdkOSXVersion gdk_quartz_osx_version (void);
|
||||
|
||||
GdkAtom gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type);
|
||||
NSString *gdk_quartz_target_to_pasteboard_type_libgtk_only (const gchar *target);
|
||||
NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#define __GDKQUARTZ_H_INSIDE__
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "gdkselection.h"
|
||||
#include "gdkproperty.h"
|
||||
#include "gdkquartz.h"
|
||||
|
||||
gboolean
|
||||
_gdk_quartz_display_set_selection_owner (GdkDisplay *display,
|
||||
@@ -172,42 +171,3 @@ _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
|
||||
{
|
||||
if ([type isEqualToString:NSStringPboardType])
|
||||
return gdk_atom_intern_static_string ("UTF8_STRING");
|
||||
else if ([type isEqualToString:NSTIFFPboardType])
|
||||
return gdk_atom_intern_static_string ("image/tiff");
|
||||
else if ([type isEqualToString:NSColorPboardType])
|
||||
return gdk_atom_intern_static_string ("application/x-color");
|
||||
else if ([type isEqualToString:NSURLPboardType])
|
||||
return gdk_atom_intern_static_string ("text/uri-list");
|
||||
else
|
||||
return gdk_atom_intern ([type UTF8String], FALSE);
|
||||
}
|
||||
|
||||
NSString *
|
||||
gdk_quartz_target_to_pasteboard_type_libgtk_only (const char *target)
|
||||
{
|
||||
if (strcmp (target, "UTF8_STRING") == 0)
|
||||
return NSStringPboardType;
|
||||
else if (strcmp (target, "image/tiff") == 0)
|
||||
return NSTIFFPboardType;
|
||||
else if (strcmp (target, "application/x-color") == 0)
|
||||
return NSColorPboardType;
|
||||
else if (strcmp (target, "text/uri-list") == 0)
|
||||
return NSURLPboardType;
|
||||
else
|
||||
return [NSString stringWithUTF8String:target];
|
||||
}
|
||||
|
||||
NSString *
|
||||
gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom)
|
||||
{
|
||||
gchar *target = gdk_atom_name (atom);
|
||||
NSString *ret = gdk_quartz_target_to_pasteboard_type_libgtk_only (target);
|
||||
g_free (target);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2642,11 +2642,9 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
|
||||
* NSTitledWindowMask. This behaved extremely oddly when
|
||||
* conditionalized upon that and since it has no side effects (i.e.
|
||||
* if NSTitledWindowMask is not requested, the title will not be
|
||||
* displayed) just do it unconditionally. We also must null check
|
||||
* 'title' before setting it to avoid crashing.
|
||||
* displayed) just do it unconditionally.
|
||||
*/
|
||||
if (title)
|
||||
[impl->toplevel setTitle:title];
|
||||
[impl->toplevel setTitle:title];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2666,8 +2664,7 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
|
||||
screen:screen];
|
||||
[impl->toplevel setHasShadow: window_type_hint_to_shadow (impl->type_hint)];
|
||||
[impl->toplevel setLevel: window_type_hint_to_level (impl->type_hint)];
|
||||
if (title)
|
||||
[impl->toplevel setTitle:title];
|
||||
[impl->toplevel setTitle:title];
|
||||
[impl->toplevel setBackgroundColor:bg];
|
||||
[impl->toplevel setHidesOnDeactivate: window_type_hint_to_hides_on_deactivate (impl->type_hint)];
|
||||
[impl->toplevel setContentView:old_view];
|
||||
|
||||
@@ -3330,7 +3330,7 @@ gdk_event_prepare (GSource *source,
|
||||
|
||||
*timeout = -1;
|
||||
|
||||
if (_gdk_display->event_pause_count > 0)
|
||||
if (display->event_pause_count > 0)
|
||||
retval = FALSE;
|
||||
else
|
||||
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
|
||||
@@ -3349,7 +3349,7 @@ gdk_event_check (GSource *source)
|
||||
|
||||
gdk_threads_enter ();
|
||||
|
||||
if (_gdk_display->event_pause_count > 0)
|
||||
if (display->event_pause_count > 0)
|
||||
retval = FALSE;
|
||||
else if (event_poll_fd.revents & G_IO_IN)
|
||||
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
|
||||
|
||||
@@ -150,7 +150,6 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
guchar *ucptr;
|
||||
wchar_t *wcptr, *p;
|
||||
glong wclen;
|
||||
GError *err = NULL;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
@@ -194,13 +193,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
return;
|
||||
}
|
||||
|
||||
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, &err);
|
||||
if (err != NULL)
|
||||
{
|
||||
g_warning ("Failed to convert utf8: %s", err->message);
|
||||
g_clear_error (&err);
|
||||
return;
|
||||
}
|
||||
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, NULL);
|
||||
|
||||
wclen++; /* Terminating 0 */
|
||||
size = wclen * 2;
|
||||
|
||||
@@ -59,6 +59,10 @@ G_DEFINE_TYPE_WITH_CODE (GdkX11DeviceManagerXI2, gdk_x11_device_manager_xi2, GDK
|
||||
G_IMPLEMENT_INTERFACE (GDK_TYPE_EVENT_TRANSLATOR,
|
||||
gdk_x11_device_manager_xi2_event_translator_init))
|
||||
|
||||
|
||||
#define HAS_FOCUS(toplevel) ((toplevel)->has_focus || (toplevel)->has_pointer_focus)
|
||||
|
||||
|
||||
static void gdk_x11_device_manager_xi2_constructed (GObject *object);
|
||||
static void gdk_x11_device_manager_xi2_dispose (GObject *object);
|
||||
static void gdk_x11_device_manager_xi2_set_property (GObject *object,
|
||||
@@ -1555,20 +1559,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
source_device = g_hash_table_lookup (device_manager->id_table,
|
||||
GUINT_TO_POINTER (xev->sourceid));
|
||||
gdk_event_set_source_device (event, source_device);
|
||||
|
||||
if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER)
|
||||
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
|
||||
else
|
||||
{
|
||||
GList *slaves, *l;
|
||||
|
||||
slaves = gdk_device_list_slave_devices (source_device);
|
||||
|
||||
for (l = slaves; l; l = l->next)
|
||||
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data));
|
||||
|
||||
g_list_free (slaves);
|
||||
}
|
||||
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
|
||||
|
||||
event->crossing.mode = translate_crossing_mode (xev->mode);
|
||||
event->crossing.detail = translate_notify_type (xev->detail);
|
||||
|
||||
@@ -140,7 +140,6 @@ static const char *const precache_atoms[] = {
|
||||
"_NET_WM_STATE_ABOVE",
|
||||
"_NET_WM_STATE_BELOW",
|
||||
"_NET_WM_STATE_FULLSCREEN",
|
||||
"_NET_WM_STATE_HIDDEN",
|
||||
"_NET_WM_STATE_MODAL",
|
||||
"_NET_WM_STATE_MAXIMIZED_VERT",
|
||||
"_NET_WM_STATE_MAXIMIZED_HORZ",
|
||||
@@ -150,17 +149,8 @@ static const char *const precache_atoms[] = {
|
||||
"_NET_WM_SYNC_REQUEST",
|
||||
"_NET_WM_SYNC_REQUEST_COUNTER",
|
||||
"_NET_WM_WINDOW_TYPE",
|
||||
"_NET_WM_WINDOW_TYPE_COMBO",
|
||||
"_NET_WM_WINDOW_TYPE_DIALOG",
|
||||
"_NET_WM_WINDOW_TYPE_DND",
|
||||
"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
|
||||
"_NET_WM_WINDOW_TYPE_MENU",
|
||||
"_NET_WM_WINDOW_TYPE_NORMAL",
|
||||
"_NET_WM_WINDOW_TYPE_POPUP_MENU",
|
||||
"_NET_WM_WINDOW_TYPE_TOOLTIP",
|
||||
"_NET_WM_WINDOW_TYPE_UTILITY",
|
||||
"_NET_WM_USER_TIME",
|
||||
"_NET_WM_USER_TIME_WINDOW",
|
||||
"_NET_VIRTUAL_ROOTS",
|
||||
"GDK_SELECTION",
|
||||
"_NET_WM_STATE_FOCUSED"
|
||||
|
||||
@@ -106,7 +106,6 @@ gtka11y_private_h_sources = \
|
||||
gtkcellaccessibleprivate.h \
|
||||
gtkcolorswatchaccessibleprivate.h \
|
||||
gtkiconviewaccessibleprivate.h \
|
||||
gtklabelaccessibleprivate.h \
|
||||
gtklockbuttonaccessibleprivate.h \
|
||||
gtktextviewaccessibleprivate.h \
|
||||
gtktreeviewaccessibleprivate.h \
|
||||
|
||||
@@ -572,17 +572,9 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
|
||||
gchar *text;
|
||||
text = gtk_entry_get_icon_tooltip_text (gtk_entry,
|
||||
GTK_ENTRY_ICON_PRIMARY);
|
||||
if (text)
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
text);
|
||||
g_free (text);
|
||||
}
|
||||
else
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
"");
|
||||
}
|
||||
g_free (text);
|
||||
}
|
||||
}
|
||||
else if (g_strcmp0 (pspec->name, "secondary-icon-tooltip-text") == 0)
|
||||
@@ -592,17 +584,9 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
|
||||
gchar *text;
|
||||
text = gtk_entry_get_icon_tooltip_text (gtk_entry,
|
||||
GTK_ENTRY_ICON_SECONDARY);
|
||||
if (text)
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
|
||||
text);
|
||||
g_free (text);
|
||||
}
|
||||
else
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
"");
|
||||
}
|
||||
g_free (text);
|
||||
}
|
||||
}
|
||||
else if (g_strcmp0 (pspec->name, "primary-icon-activatable") == 0)
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkpango.h>
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtklabelaccessible.h"
|
||||
|
||||
struct _GtkLabelAccessiblePrivate
|
||||
{
|
||||
gchar *text;
|
||||
gint cursor_position;
|
||||
gint selection_bound;
|
||||
};
|
||||
@@ -46,11 +46,16 @@ gtk_label_accessible_initialize (AtkObject *obj,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkLabelAccessible *accessible;
|
||||
|
||||
ATK_OBJECT_CLASS (gtk_label_accessible_parent_class)->initialize (obj, data);
|
||||
|
||||
accessible = GTK_LABEL_ACCESSIBLE (obj);
|
||||
|
||||
widget = GTK_WIDGET (data);
|
||||
|
||||
accessible->priv->text = g_strdup (gtk_label_get_text (GTK_LABEL (widget)));
|
||||
|
||||
/*
|
||||
* Check whether ancestor of GtkLabel is a GtkButton and if so
|
||||
* set accessible parent for GtkLabelAccessible
|
||||
@@ -92,45 +97,6 @@ check_for_selection_change (GtkLabelAccessible *accessible,
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_label_accessible_text_deleted (GtkLabel *label)
|
||||
{
|
||||
AtkObject *obj;
|
||||
const char *text;
|
||||
guint length;
|
||||
|
||||
obj = _gtk_widget_peek_accessible (GTK_WIDGET (label));
|
||||
if (obj == NULL)
|
||||
return;
|
||||
|
||||
text = gtk_label_get_text (label);
|
||||
length = g_utf8_strlen (text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (obj, "text-changed::delete", 0, length);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_label_accessible_text_inserted (GtkLabel *label)
|
||||
{
|
||||
AtkObject *obj;
|
||||
const char *text;
|
||||
guint length;
|
||||
|
||||
obj = _gtk_widget_peek_accessible (GTK_WIDGET (label));
|
||||
if (obj == NULL)
|
||||
return;
|
||||
|
||||
text = gtk_label_get_text (label);
|
||||
length = g_utf8_strlen (text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (obj, "text-changed::insert", 0, length);
|
||||
|
||||
if (obj->name == NULL)
|
||||
/* The label has changed so notify a change in accessible-name */
|
||||
g_object_notify (G_OBJECT (obj), "accessible-name");
|
||||
|
||||
g_signal_emit_by_name (obj, "visible-data-changed");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_accessible_notify_gtk (GObject *obj,
|
||||
@@ -139,10 +105,37 @@ gtk_label_accessible_notify_gtk (GObject *obj,
|
||||
GtkWidget *widget = GTK_WIDGET (obj);
|
||||
AtkObject* atk_obj = gtk_widget_get_accessible (widget);
|
||||
GtkLabelAccessible *accessible;
|
||||
gint length;
|
||||
|
||||
accessible = GTK_LABEL_ACCESSIBLE (atk_obj);
|
||||
|
||||
if (g_strcmp0 (pspec->name, "cursor-position") == 0)
|
||||
if (g_strcmp0 (pspec->name, "label") == 0)
|
||||
{
|
||||
const gchar *text;
|
||||
|
||||
text = gtk_label_get_text (GTK_LABEL (widget));
|
||||
if (g_strcmp0 (accessible->priv->text, text) == 0)
|
||||
return;
|
||||
|
||||
/* Create a delete text and an insert text signal */
|
||||
length = g_utf8_strlen (accessible->priv->text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (atk_obj, "text-changed::delete", 0, length);
|
||||
|
||||
g_free (accessible->priv->text);
|
||||
accessible->priv->text = g_strdup (text);
|
||||
|
||||
length = g_utf8_strlen (accessible->priv->text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (atk_obj, "text-changed::insert", 0, length);
|
||||
|
||||
if (atk_obj->name == NULL)
|
||||
/* The label has changed so notify a change in accessible-name */
|
||||
g_object_notify (G_OBJECT (atk_obj), "accessible-name");
|
||||
|
||||
g_signal_emit_by_name (atk_obj, "visible-data-changed");
|
||||
}
|
||||
else if (g_strcmp0 (pspec->name, "cursor-position") == 0)
|
||||
{
|
||||
g_signal_emit_by_name (atk_obj, "text-caret-moved",
|
||||
_gtk_label_get_cursor_position (GTK_LABEL (widget)));
|
||||
@@ -158,6 +151,17 @@ gtk_label_accessible_notify_gtk (GObject *obj,
|
||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_accessible_finalize (GObject *object)
|
||||
{
|
||||
GtkLabelAccessible *accessible = GTK_LABEL_ACCESSIBLE (object);
|
||||
|
||||
g_free (accessible->priv->text);
|
||||
|
||||
G_OBJECT_CLASS (gtk_label_accessible_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
/* atkobject.h */
|
||||
|
||||
static AtkStateSet *
|
||||
@@ -270,8 +274,11 @@ gtk_label_accessible_get_name (AtkObject *accessible)
|
||||
static void
|
||||
gtk_label_accessible_class_init (GtkLabelAccessibleClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
GtkWidgetAccessibleClass *widget_class = GTK_WIDGET_ACCESSIBLE_CLASS (klass);
|
||||
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
|
||||
|
||||
gobject_class->finalize = gtk_label_accessible_finalize;
|
||||
|
||||
widget_class->notify_gtk = gtk_label_accessible_notify_gtk;
|
||||
|
||||
@@ -300,21 +307,7 @@ gtk_label_accessible_get_text (AtkText *atk_text,
|
||||
text = gtk_label_get_text (GTK_LABEL (widget));
|
||||
|
||||
if (text)
|
||||
{
|
||||
guint length;
|
||||
const gchar *start, *end;
|
||||
|
||||
length = g_utf8_strlen (text, -1);
|
||||
if (end_pos < 0 || end_pos > length)
|
||||
end_pos = length;
|
||||
if (start_pos > length)
|
||||
start_pos = length;
|
||||
if (end_pos <= start_pos)
|
||||
return g_strdup ("");
|
||||
start = g_utf8_offset_to_pointer (text, start_pos);
|
||||
end = g_utf8_offset_to_pointer (start, end_pos - start_pos);
|
||||
return g_strndup (start, end - start);
|
||||
}
|
||||
return g_utf8_substring (text, start_pos, end_pos > -1 ? end_pos : g_utf8_strlen (text, -1));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/* GTK+ - accessibility implementations
|
||||
* Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnu.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_LABEL_ACCESSIBLE_PRIVATE_H__
|
||||
#define __GTK_LABEL_ACCESSIBLE_PRIVATE_H__
|
||||
|
||||
#include <gtk/a11y/gtklabelaccessible.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void _gtk_label_accessible_text_deleted (GtkLabel *label);
|
||||
void _gtk_label_accessible_text_inserted (GtkLabel *label);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_LABEL_ACCESSIBLE_PRIVATE_H__ */
|
||||
@@ -1926,14 +1926,6 @@ _gtk_tree_view_accessible_add_state (GtkTreeView *treeview,
|
||||
|
||||
if (cell != NULL)
|
||||
_gtk_cell_accessible_state_changed (cell, state, 0);
|
||||
|
||||
if (state == GTK_CELL_RENDERER_FOCUSED)
|
||||
{
|
||||
if (cell == NULL)
|
||||
cell = create_cell (treeview, accessible, tree, node, single_column);
|
||||
|
||||
g_signal_emit_by_name (accessible, "active-descendant-changed", cell);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -342,8 +342,7 @@ _gtk_gradient_resolve_full (GtkGradient *gradient,
|
||||
provider,
|
||||
_gtk_css_computed_values_get_value (values, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
&stop_deps,
|
||||
NULL);
|
||||
&stop_deps);
|
||||
if (val)
|
||||
{
|
||||
rgba = *_gtk_css_rgba_value_get_rgba (val);
|
||||
|
||||
@@ -307,7 +307,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
|
||||
GTK_STYLE_PROVIDER_PRIVATE (props),
|
||||
current,
|
||||
0,
|
||||
NULL,
|
||||
NULL);
|
||||
_gtk_css_value_unref (current);
|
||||
if (v == NULL)
|
||||
|
||||
@@ -118,7 +118,7 @@ g_action_observer_action_enabled_changed (GActionObserver *observer,
|
||||
* @state: the new state of the action
|
||||
*
|
||||
* This function is called when an action that the observer is
|
||||
* registered to receive events for changes to its state.
|
||||
* registered to receive events for changes its state.
|
||||
*
|
||||
* This function should only be called by objects with which the
|
||||
* observer has explicitly registered itself to receive events.
|
||||
|
||||
+1
-352
@@ -791,7 +791,7 @@ GtkSwitch.trough:active {
|
||||
/* Assistant */
|
||||
|
||||
GtkAssistant .sidebar .highlight {
|
||||
background-color: gray;
|
||||
background-color: blue;
|
||||
font: bold;
|
||||
}
|
||||
|
||||
@@ -834,354 +834,3 @@ GtkStatusbar > GtkFrame {
|
||||
background-image: -gtk-win32-theme-part(status, 3 1);
|
||||
}
|
||||
*/
|
||||
|
||||
@keyframes spinner {
|
||||
0% { background-image: none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
0% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
8% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none; }
|
||||
8% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)); }
|
||||
16% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)); }
|
||||
16% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)); }
|
||||
25% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)); }
|
||||
25% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)); }
|
||||
33% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)); }
|
||||
33% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)); }
|
||||
41% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)); }
|
||||
41% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)); }
|
||||
50% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)); }
|
||||
50% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)); }
|
||||
58% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)); }
|
||||
58% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)); }
|
||||
66% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)); }
|
||||
66% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)); }
|
||||
75% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)); }
|
||||
75% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)); }
|
||||
83% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)); }
|
||||
83% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)); }
|
||||
91% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)); }
|
||||
91% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)); }
|
||||
100% { background-image: none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
100% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
}
|
||||
|
||||
.spinner {
|
||||
background-color: transparent;
|
||||
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent));
|
||||
background-position: 25.00% 6.70%, 6.70% 25.00%, 0.00% 50.00%, 6.70% 75.00%, 25.00% 93.30%, 50.00% 100.00%, 75.00% 93.30%, 93.30% 75.00%, 100.00% 50.00%, 93.30% 25.00%, 75.00% 6.70%, 50.00% 0.00%;
|
||||
background-size: 20% 20%;
|
||||
background-repeat: no-repeat;
|
||||
transition: background-image 500ms ease-out;
|
||||
}
|
||||
|
||||
.spinner:active {
|
||||
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent));
|
||||
animation: spinner 1s infinite linear;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,6 @@ gtk_cell_renderer_accel_get_type
|
||||
gtk_cell_renderer_accel_mode_get_type
|
||||
gtk_cell_renderer_accel_new
|
||||
gtk_cell_renderer_activate
|
||||
gtk_cell_renderer_class_set_accessible_type
|
||||
gtk_cell_renderer_combo_get_type
|
||||
gtk_cell_renderer_combo_new
|
||||
gtk_cell_renderer_get_aligned_area
|
||||
|
||||
+1
-1
@@ -955,7 +955,7 @@ _gtk_accel_map_remove_group (const gchar *accel_path,
|
||||
*
|
||||
* Note that locking of individual accelerator paths is independent from
|
||||
* locking the #GtkAccelGroup containing them. For runtime accelerator
|
||||
* changes to be possible, both the accelerator path and its #GtkAccelGroup
|
||||
* changes to be possible both the accelerator path and its #GtkAccelGroup
|
||||
* have to be unlocked.
|
||||
*
|
||||
* Since: 2.4
|
||||
|
||||
@@ -348,9 +348,6 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
|
||||
{
|
||||
app = l->data;
|
||||
|
||||
if (!g_app_info_should_show (app))
|
||||
continue;
|
||||
|
||||
if (default_app != NULL && g_app_info_equal (app, default_app))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -212,6 +212,71 @@ ensure_online_button (GtkAppChooserDialog *self)
|
||||
g_object_ref (self));
|
||||
}
|
||||
|
||||
/* An application is valid if:
|
||||
*
|
||||
* 1) The file exists
|
||||
* 2) The user has permissions to run the file
|
||||
*/
|
||||
static gboolean
|
||||
check_application (GtkAppChooserDialog *self,
|
||||
GAppInfo **app_out)
|
||||
{
|
||||
const char *command;
|
||||
char *path = NULL;
|
||||
char **argv = NULL;
|
||||
int argc;
|
||||
GError *error = NULL;
|
||||
gint retval = TRUE;
|
||||
GAppInfo *info;
|
||||
|
||||
command = NULL;
|
||||
|
||||
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (self->priv->app_chooser_widget));
|
||||
if (info == NULL)
|
||||
{
|
||||
*app_out = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
command = g_app_info_get_executable (info);
|
||||
|
||||
g_shell_parse_argv (command, &argc, &argv, &error);
|
||||
|
||||
if (error)
|
||||
{
|
||||
show_error_dialog (_("Could not run application"),
|
||||
error->message,
|
||||
GTK_WINDOW (self));
|
||||
g_error_free (error);
|
||||
retval = FALSE;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
path = g_find_program_in_path (argv[0]);
|
||||
if (!path)
|
||||
{
|
||||
char *error_message;
|
||||
|
||||
error_message = g_strdup_printf (_("Could not find '%s'"),
|
||||
argv[0]);
|
||||
|
||||
show_error_dialog (_("Could not find application"),
|
||||
error_message,
|
||||
GTK_WINDOW (self));
|
||||
g_free (error_message);
|
||||
retval = FALSE;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
*app_out = info;
|
||||
|
||||
cleanup:
|
||||
g_strfreev (argv);
|
||||
g_free (path);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
add_or_find_application (GtkAppChooserDialog *self)
|
||||
{
|
||||
@@ -541,7 +606,12 @@ static GAppInfo *
|
||||
gtk_app_chooser_dialog_get_app_info (GtkAppChooser *object)
|
||||
{
|
||||
GtkAppChooserDialog *self = GTK_APP_CHOOSER_DIALOG (object);
|
||||
return gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (self->priv->app_chooser_widget));
|
||||
GAppInfo *app = NULL;
|
||||
|
||||
if (!check_application (self, &app))
|
||||
return NULL;
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -138,8 +138,7 @@ pk_search_mime_async (GtkAppChooserOnline *obj,
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
window = gtk_widget_get_window (GTK_WIDGET (parent));
|
||||
if (GDK_IS_X11_WINDOW (window))
|
||||
xid = GDK_WINDOW_XID (window);
|
||||
xid = GDK_WINDOW_XID (window);
|
||||
#endif
|
||||
|
||||
mime_types[0] = content_type;
|
||||
|
||||
@@ -1431,10 +1431,8 @@ gtk_application_inhibit (GtkApplication *application,
|
||||
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
if (gdkwindow == NULL)
|
||||
g_warning ("Inhibit called with an unrealized window");
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
else if (GDK_IS_X11_WINDOW (gdkwindow))
|
||||
else
|
||||
xid = GDK_WINDOW_XID (gdkwindow);
|
||||
#endif
|
||||
}
|
||||
|
||||
res = g_dbus_proxy_call_sync (application->priv->sm_proxy,
|
||||
|
||||
@@ -198,9 +198,6 @@ gtk_bin_get_preferred_width (GtkWidget *widget,
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint border_width;
|
||||
|
||||
*minimum_width = 0;
|
||||
*natural_width = 0;
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
{
|
||||
gint child_min, child_nat;
|
||||
@@ -224,9 +221,6 @@ gtk_bin_get_preferred_height (GtkWidget *widget,
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint border_width;
|
||||
|
||||
*minimum_height = 0;
|
||||
*natural_height = 0;
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
{
|
||||
gint child_min, child_nat;
|
||||
@@ -251,9 +245,6 @@ gtk_bin_get_preferred_width_for_height (GtkWidget *widget,
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint border_width;
|
||||
|
||||
*minimum_width = 0;
|
||||
*natural_width = 0;
|
||||
|
||||
border_width = gtk_bin_get_effective_border_width (bin);
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
@@ -280,9 +271,6 @@ gtk_bin_get_preferred_height_for_width (GtkWidget *widget,
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint border_width;
|
||||
|
||||
*minimum_height = 0;
|
||||
*natural_height = 0;
|
||||
|
||||
border_width = gtk_bin_get_effective_border_width (bin);
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
|
||||
@@ -1355,6 +1355,12 @@ gtk_builder_get_translation_domain (GtkBuilder *builder)
|
||||
*
|
||||
* Add @object to the @builder object pool so it can be referenced just like any
|
||||
* other object built by builder.
|
||||
*
|
||||
* To make this function even more useful a new special entry point element
|
||||
* <external-object> is defined. It is similar to <object> but has
|
||||
* to reference an external object exposed with this function.
|
||||
* This way you can change properties and even add children to an
|
||||
* external object using builder, not just reference it.
|
||||
*
|
||||
* Since: 3.8
|
||||
**/
|
||||
|
||||
+4
-4
@@ -2075,8 +2075,8 @@ gtk_cell_area_get_request_mode (GtkCellArea *area)
|
||||
*
|
||||
* Retrieves a cell area's initial minimum and natural width.
|
||||
*
|
||||
* @area will store some geometrical information in @context along the way;
|
||||
* when requesting sizes over an arbitrary number of rows, it's not important
|
||||
* @area will store some geometrical information in @context along the way,
|
||||
* when requesting sizes over an arbitrary number of rows, its not important
|
||||
* to check the @minimum_width and @natural_width of this call but rather to
|
||||
* consult gtk_cell_area_context_get_preferred_width() after a series of
|
||||
* requests.
|
||||
@@ -2151,8 +2151,8 @@ gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area,
|
||||
*
|
||||
* Retrieves a cell area's initial minimum and natural height.
|
||||
*
|
||||
* @area will store some geometrical information in @context along the way;
|
||||
* when requesting sizes over an arbitrary number of rows, it's not important
|
||||
* @area will store some geometrical information in @context along the way,
|
||||
* when requesting sizes over an arbitrary number of rows, its not important
|
||||
* to check the @minimum_height and @natural_height of this call but rather to
|
||||
* consult gtk_cell_area_context_get_preferred_height() after a series of
|
||||
* requests.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* #GtkTreeModel rows that are requested and rendered in the same context.
|
||||
*
|
||||
* #GtkCellLayout widgets can create any number of contexts in which to
|
||||
* request and render groups of data rows. However, it's important that the
|
||||
* request and render groups of data rows. However its important that the
|
||||
* same context which was used to request sizes for a given #GtkTreeModel
|
||||
* row also be used for the same row when calling other #GtkCellArea APIs
|
||||
* such as gtk_cell_area_render() and gtk_cell_area_event().
|
||||
@@ -329,12 +329,12 @@ gtk_cell_area_context_real_allocate (GtkCellAreaContext *context,
|
||||
*
|
||||
* Fetches the #GtkCellArea this @context was created by.
|
||||
*
|
||||
* This is generally unneeded by layouting widgets; however,
|
||||
* This is generally unneeded by layouting widgets; however
|
||||
* it is important for the context implementation itself to
|
||||
* fetch information about the area it is being used for.
|
||||
*
|
||||
* For instance at #GtkCellAreaContextClass.allocate() time
|
||||
* it's important to know details about any cell spacing
|
||||
* its important to know details about any cell spacing
|
||||
* that the #GtkCellArea is configured with in order to
|
||||
* compute a proper allocation.
|
||||
*
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
* is rendered in the correct location using gtk_cell_renderer_render().
|
||||
*
|
||||
* There are a number of rules that must be followed when writing a new
|
||||
* #GtkCellRenderer. First and foremost, it's important that a certain set
|
||||
* #GtkCellRenderer. First and foremost, its important that a certain set
|
||||
* of properties will always yield a cell renderer of the same size,
|
||||
* barring a #GtkStyle change. The #GtkCellRenderer also has a number of
|
||||
* generic properties that are expected to be honored by all children.
|
||||
|
||||
+4
-4
@@ -596,7 +596,7 @@ gtk_cell_view_size_allocate (GtkWidget *widget,
|
||||
/* The first cell view in context is responsible for allocating the context at allocate time
|
||||
* (or the cellview has its own context and is not grouped with any other cell views)
|
||||
*
|
||||
* If the cellview is in "fit model" mode, we assume it's not in context and needs to
|
||||
* If the cellview is in "fit model" mode, we assume its not in context and needs to
|
||||
* allocate every time.
|
||||
*/
|
||||
if (priv->fit_model)
|
||||
@@ -993,7 +993,7 @@ gtk_cell_view_new_with_context (GtkCellArea *area,
|
||||
* @text: the text to display in the cell view
|
||||
*
|
||||
* Creates a new #GtkCellView widget, adds a #GtkCellRendererText
|
||||
* to it, and makes it show @text.
|
||||
* to it, and makes its show @text.
|
||||
*
|
||||
* Return value: A newly created #GtkCellView widget.
|
||||
*
|
||||
@@ -1058,8 +1058,8 @@ gtk_cell_view_new_with_markup (const gchar *markup)
|
||||
* gtk_cell_view_new_with_pixbuf:
|
||||
* @pixbuf: the image to display in the cell view
|
||||
*
|
||||
* Creates a new #GtkCellView widget, adds a #GtkCellRendererPixbuf
|
||||
* to it, and makes it show @pixbuf.
|
||||
* Creates a new #GtkCellView widget, adds a #GtkCellRendererPixbuf
|
||||
* to it, and makes its show @pixbuf.
|
||||
*
|
||||
* Return value: A newly created #GtkCellView widget.
|
||||
*
|
||||
|
||||
+22
-4
@@ -614,10 +614,28 @@ gtk_clipboard_set_contents (GtkClipboard *clipboard,
|
||||
{
|
||||
clipboard_unset (clipboard);
|
||||
|
||||
clipboard->user_data = user_data;
|
||||
clipboard->have_owner = have_owner;
|
||||
if (have_owner)
|
||||
clipboard_add_owner_notify (clipboard);
|
||||
if (clipboard->get_func)
|
||||
{
|
||||
/* Calling unset() caused the clipboard contents to be reset!
|
||||
* Avoid leaking and return
|
||||
*/
|
||||
if (!(clipboard->have_owner && have_owner) ||
|
||||
clipboard->user_data != user_data)
|
||||
{
|
||||
(*clear_func) (clipboard, user_data);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
clipboard->user_data = user_data;
|
||||
clipboard->have_owner = have_owner;
|
||||
if (have_owner)
|
||||
clipboard_add_owner_notify (clipboard);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
clipboard->get_func = get_func;
|
||||
|
||||
@@ -96,6 +96,7 @@ selected_cb (GtkButton *button,
|
||||
GtkDialog *dialog)
|
||||
{
|
||||
save_color (GTK_COLOR_CHOOSER_DIALOG (dialog));
|
||||
gtk_dialog_response (dialog, GTK_RESPONSE_OK);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -151,7 +152,8 @@ gtk_color_chooser_dialog_init (GtkColorChooserDialog *cc)
|
||||
G_CALLBACK (selected_cb), dialog);
|
||||
gtk_widget_set_can_default (priv->select_button, TRUE);
|
||||
gtk_widget_show (priv->select_button);
|
||||
gtk_dialog_add_action_widget (dialog, priv->select_button, GTK_RESPONSE_OK);
|
||||
gtk_box_pack_end (GTK_BOX (gtk_dialog_get_action_area (dialog)),
|
||||
priv->select_button, FALSE, TRUE, 0);
|
||||
gtk_widget_grab_default (priv->select_button);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (dialog,
|
||||
|
||||
@@ -296,10 +296,6 @@ remove_palette (GtkColorChooserWidget *cc)
|
||||
GList *children, *l;
|
||||
GtkWidget *widget;
|
||||
|
||||
if (cc->priv->current != NULL &&
|
||||
gtk_widget_get_parent (GTK_WIDGET (cc->priv->current)) != cc->priv->custom)
|
||||
cc->priv->current = NULL;
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (cc->priv->palette));
|
||||
for (l = children; l; l = l->next)
|
||||
{
|
||||
|
||||
@@ -2331,19 +2331,6 @@ popup_grab_on_window (GdkWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_combo_box_grab_broken_event (GtkWidget *widget,
|
||||
GdkEventGrabBroken *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
|
||||
|
||||
if (event->grab_window == NULL)
|
||||
gtk_combo_box_popdown (combo_box);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_combo_box_popup:
|
||||
* @combo_box: a #GtkComboBox
|
||||
@@ -2468,11 +2455,6 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
||||
gtk_device_grab_add (priv->popup_window, pointer, TRUE);
|
||||
priv->grab_pointer = pointer;
|
||||
priv->grab_keyboard = keyboard;
|
||||
|
||||
g_signal_connect (priv->popup_window,
|
||||
"grab-broken-event",
|
||||
G_CALLBACK (gtk_combo_box_grab_broken_event),
|
||||
combo_box);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2539,10 +2521,6 @@ gtk_combo_box_popdown (GtkComboBox *combo_box)
|
||||
if (!gtk_widget_get_realized (GTK_WIDGET (combo_box)))
|
||||
return;
|
||||
|
||||
if (priv->grab_keyboard)
|
||||
gdk_device_ungrab (priv->grab_keyboard, GDK_CURRENT_TIME);
|
||||
gdk_device_ungrab (priv->grab_pointer, GDK_CURRENT_TIME);
|
||||
|
||||
gtk_device_grab_remove (priv->popup_window, priv->grab_pointer);
|
||||
gtk_widget_hide (priv->popup_window);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button),
|
||||
|
||||
+7
-17
@@ -140,8 +140,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GtkStyleProviderPrivate *provider,
|
||||
GtkCssValue *current,
|
||||
GtkCssDependencies current_deps,
|
||||
GtkCssDependencies *dependencies,
|
||||
GSList *cycle_list)
|
||||
GtkCssDependencies *dependencies)
|
||||
{
|
||||
GtkCssDependencies unused;
|
||||
GtkCssValue *value;
|
||||
@@ -161,20 +160,12 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
case COLOR_TYPE_NAME:
|
||||
{
|
||||
GtkCssValue *named;
|
||||
GSList cycle = { color, cycle_list };
|
||||
|
||||
/* If color exists in cycle_list, we're currently resolving it.
|
||||
* So we've detected a cycle. */
|
||||
if (g_slist_find (cycle_list, color))
|
||||
return NULL;
|
||||
|
||||
named = _gtk_style_provider_private_get_color (provider, color->sym_col.name);
|
||||
if (named == NULL)
|
||||
return NULL;
|
||||
|
||||
value = _gtk_css_color_value_resolve (named, provider, current, current_deps, dependencies, &cycle);
|
||||
if (value == NULL)
|
||||
return NULL;
|
||||
value = _gtk_css_color_value_resolve (named, provider, current, current_deps, dependencies);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -184,7 +175,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GtkHSLA hsla;
|
||||
GdkRGBA shade;
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.shade.color, provider, current, current_deps, dependencies, cycle_list);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.shade.color, provider, current, current_deps, dependencies);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -206,7 +197,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GtkCssValue *val;
|
||||
GdkRGBA alpha;
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.alpha.color, provider, current, current_deps, dependencies, cycle_list);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.alpha.color, provider, current, current_deps, dependencies);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -226,13 +217,13 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GdkRGBA color1, color2, res;
|
||||
GtkCssDependencies dep1, dep2;
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color1, provider, current, current_deps, &dep1, cycle_list);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color1, provider, current, current_deps, &dep1);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
color1 = *_gtk_css_rgba_value_get_rgba (val);
|
||||
_gtk_css_value_unref (val);
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color2, provider, current, current_deps, &dep2, cycle_list);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color2, provider, current, current_deps, &dep2);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
color2 = *_gtk_css_rgba_value_get_rgba (val);
|
||||
@@ -331,8 +322,7 @@ gtk_css_value_color_compute (GtkCssValue *value,
|
||||
provider,
|
||||
current,
|
||||
current_deps,
|
||||
dependencies,
|
||||
NULL);
|
||||
dependencies);
|
||||
|
||||
if (resolved == NULL)
|
||||
return gtk_css_value_color_get_fallback (property_id, provider, values, parent_values);
|
||||
|
||||
@@ -47,8 +47,7 @@ GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue
|
||||
GtkStyleProviderPrivate *provider,
|
||||
GtkCssValue *current,
|
||||
GtkCssDependencies current_deps,
|
||||
GtkCssDependencies *dependencies,
|
||||
GSList *cycle_list);
|
||||
GtkCssDependencies *dependencies);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -234,8 +234,7 @@ rgba_value_compute (GtkStyleProviderPrivate *provider,
|
||||
provider,
|
||||
_gtk_css_computed_values_get_value (values, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
dependencies,
|
||||
NULL);
|
||||
dependencies);
|
||||
if (val != NULL)
|
||||
{
|
||||
rgba = *_gtk_css_rgba_value_get_rgba (val);
|
||||
@@ -324,8 +323,7 @@ color_value_compute (GtkStyleProviderPrivate *provider,
|
||||
provider,
|
||||
_gtk_css_computed_values_get_value (values, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
dependencies,
|
||||
NULL);
|
||||
dependencies);
|
||||
if (val != NULL)
|
||||
{
|
||||
const GdkRGBA *rgba = _gtk_css_rgba_value_get_rgba (val);
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ struct _GtkDragFindData
|
||||
selection_data.selection = GDK_NONE;
|
||||
selection_data.data = NULL;
|
||||
selection_data.length = -1;
|
||||
selection_data.target = gdk_quartz_pasteboard_type_to_atom_libgtk_only (type);
|
||||
selection_data.target = _gtk_quartz_pasteboard_type_to_atom (type);
|
||||
selection_data.display = gdk_display_get_default ();
|
||||
|
||||
if (gtk_target_list_find (info->target_list,
|
||||
|
||||
@@ -3449,7 +3449,6 @@ gtk_drag_set_icon_surface (GdkDragContext *context,
|
||||
}
|
||||
|
||||
gdk_window_set_background_pattern (gtk_widget_get_window (window), pattern);
|
||||
cairo_pattern_destroy (pattern);
|
||||
|
||||
gtk_drag_set_icon_window (context, window, extents.x, extents.y, TRUE);
|
||||
}
|
||||
|
||||
+1
-1
@@ -2901,7 +2901,7 @@ _gtk_entry_get_display_text (GtkEntry *entry,
|
||||
text = gtk_entry_buffer_get_text (get_buffer (entry));
|
||||
length = gtk_entry_buffer_get_length (get_buffer (entry));
|
||||
|
||||
if (end_pos < 0 || end_pos > length)
|
||||
if (end_pos < 0)
|
||||
end_pos = length;
|
||||
if (start_pos > length)
|
||||
start_pos = length;
|
||||
|
||||
+37
-32
@@ -1929,6 +1929,12 @@ gtk_entry_completion_set_inline_completion (GtkEntryCompletion *completion,
|
||||
{
|
||||
completion->priv->inline_completion = inline_completion;
|
||||
|
||||
if (completion->priv->entry)
|
||||
{
|
||||
disconnect_completion_signals (completion);
|
||||
connect_completion_signals (completion);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (completion), "inline-completion");
|
||||
}
|
||||
}
|
||||
@@ -1973,6 +1979,12 @@ gtk_entry_completion_set_popup_completion (GtkEntryCompletion *completion,
|
||||
{
|
||||
completion->priv->popup_completion = popup_completion;
|
||||
|
||||
if (completion->priv->entry)
|
||||
{
|
||||
disconnect_completion_signals (completion);
|
||||
connect_completion_signals (completion);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (completion), "popup-completion");
|
||||
}
|
||||
}
|
||||
@@ -2206,9 +2218,6 @@ gtk_entry_completion_key_press (GtkWidget *widget,
|
||||
gint matches, actions = 0;
|
||||
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
|
||||
|
||||
if (!completion->priv->popup_completion)
|
||||
return FALSE;
|
||||
|
||||
if (event->keyval == GDK_KEY_Return ||
|
||||
event->keyval == GDK_KEY_KP_Enter ||
|
||||
event->keyval == GDK_KEY_ISO_Enter ||
|
||||
@@ -2491,9 +2500,6 @@ gtk_entry_completion_changed (GtkWidget *widget,
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
GdkDevice *device;
|
||||
|
||||
if (!completion->priv->popup_completion)
|
||||
return;
|
||||
|
||||
/* (re)install completion timeout */
|
||||
if (completion->priv->completion_timeout)
|
||||
g_source_remove (completion->priv->completion_timeout);
|
||||
@@ -2539,14 +2545,13 @@ static void
|
||||
clear_completion_callback (GtkEntry *entry,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
|
||||
|
||||
if (!completion->priv->inline_completion)
|
||||
return;
|
||||
|
||||
if (pspec->name == I_("cursor-position") ||
|
||||
pspec->name == I_("selection-bound"))
|
||||
completion->priv->has_completion = FALSE;
|
||||
{
|
||||
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
|
||||
|
||||
completion->priv->has_completion = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -2554,9 +2559,6 @@ accept_completion_callback (GtkEntry *entry)
|
||||
{
|
||||
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
|
||||
|
||||
if (!completion->priv->inline_completion)
|
||||
return FALSE;
|
||||
|
||||
if (completion->priv->has_completion)
|
||||
gtk_editable_set_position (GTK_EDITABLE (entry),
|
||||
gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry)));
|
||||
@@ -2571,9 +2573,6 @@ completion_insert_text_callback (GtkEntry *entry,
|
||||
gint position,
|
||||
GtkEntryCompletion *completion)
|
||||
{
|
||||
if (!completion->priv->inline_completion)
|
||||
return;
|
||||
|
||||
/* idle to update the selection based on the file list */
|
||||
if (completion->priv->check_completion_idle == NULL)
|
||||
{
|
||||
@@ -2589,21 +2588,27 @@ completion_insert_text_callback (GtkEntry *entry,
|
||||
static void
|
||||
connect_completion_signals (GtkEntryCompletion *completion)
|
||||
{
|
||||
completion->priv->changed_id =
|
||||
g_signal_connect (completion->priv->entry, "changed",
|
||||
G_CALLBACK (gtk_entry_completion_changed), completion);
|
||||
g_signal_connect (completion->priv->entry, "key-press-event",
|
||||
G_CALLBACK (gtk_entry_completion_key_press), completion);
|
||||
if (completion->priv->popup_completion)
|
||||
{
|
||||
completion->priv->changed_id =
|
||||
g_signal_connect (completion->priv->entry, "changed",
|
||||
G_CALLBACK (gtk_entry_completion_changed), completion);
|
||||
g_signal_connect (completion->priv->entry, "key-press-event",
|
||||
G_CALLBACK (gtk_entry_completion_key_press), completion);
|
||||
}
|
||||
|
||||
completion->priv->insert_text_id =
|
||||
g_signal_connect (completion->priv->entry, "insert-text",
|
||||
G_CALLBACK (completion_insert_text_callback), completion);
|
||||
g_signal_connect (completion->priv->entry, "notify",
|
||||
G_CALLBACK (clear_completion_callback), completion);
|
||||
g_signal_connect (completion->priv->entry, "activate",
|
||||
G_CALLBACK (accept_completion_callback), completion);
|
||||
g_signal_connect (completion->priv->entry, "focus-out-event",
|
||||
G_CALLBACK (accept_completion_callback), completion);
|
||||
if (completion->priv->inline_completion)
|
||||
{
|
||||
completion->priv->insert_text_id =
|
||||
g_signal_connect (completion->priv->entry, "insert-text",
|
||||
G_CALLBACK (completion_insert_text_callback), completion);
|
||||
g_signal_connect (completion->priv->entry, "notify",
|
||||
G_CALLBACK (clear_completion_callback), completion);
|
||||
g_signal_connect (completion->priv->entry, "activate",
|
||||
G_CALLBACK (accept_completion_callback), completion);
|
||||
g_signal_connect (completion->priv->entry, "focus-out-event",
|
||||
G_CALLBACK (accept_completion_callback), completion);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+4
-4
@@ -266,7 +266,7 @@ typedef enum
|
||||
/**
|
||||
* GtkMessageType:
|
||||
* @GTK_MESSAGE_INFO: Informational message
|
||||
* @GTK_MESSAGE_WARNING: Non-fatal warning message
|
||||
* @GTK_MESSAGE_WARNING: Nonfatal warning message
|
||||
* @GTK_MESSAGE_QUESTION: Question requiring a choice
|
||||
* @GTK_MESSAGE_ERROR: Fatal error message
|
||||
* @GTK_MESSAGE_OTHER: None of the above, doesn't get an icon
|
||||
@@ -674,7 +674,7 @@ typedef enum
|
||||
* @GTK_PACK_DIRECTION_TTB: Widgets are packed top-to-bottom
|
||||
* @GTK_PACK_DIRECTION_BTT: Widgets are packed bottom-to-top
|
||||
*
|
||||
* Determines how widgets should be packed inside menubars
|
||||
* Determines how widgets should be packed insided menubars
|
||||
* and menuitems contained in menubars.
|
||||
*/
|
||||
typedef enum
|
||||
@@ -823,7 +823,7 @@ typedef enum {
|
||||
* GtkSizeRequestMode:
|
||||
* @GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH: Prefer height-for-width geometry management
|
||||
* @GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT: Prefer width-for-height geometry management
|
||||
* @GTK_SIZE_REQUEST_CONSTANT_SIZE: Don't trade height-for-width or width-for-height
|
||||
* @GTK_SIZE_REQUEST_CONSTANT_SIZE: Dont trade height-for-width or width-for-height
|
||||
*
|
||||
* Specifies a preference for height-for-width or
|
||||
* width-for-height geometry management.
|
||||
@@ -935,7 +935,7 @@ typedef enum {
|
||||
* @GTK_BORDER_STYLE_HIDDEN: Same as @GTK_BORDER_STYLE_NONE
|
||||
* @GTK_BORDER_STYLE_DOTTED: A series of round dots
|
||||
* @GTK_BORDER_STYLE_DASHED: A series of square-ended dashes
|
||||
* @GTK_BORDER_STYLE_DOUBLE: Two parallel lines with some space between them
|
||||
* @GTK_BORDER_STYLE_DOUBLE: Two parrallel lines with some space between them
|
||||
* @GTK_BORDER_STYLE_GROOVE: Looks as if it were carved in the canvas
|
||||
* @GTK_BORDER_STYLE_RIDGE: Looks as if it were coming out of the canvas
|
||||
*
|
||||
|
||||
+3
-33
@@ -907,10 +907,6 @@ gtk_file_chooser_get_action (GtkFileChooser *chooser)
|
||||
* rather than the URI functions like
|
||||
* gtk_file_chooser_get_uri(),
|
||||
*
|
||||
* On some systems non-native files may still be
|
||||
* available using the native filesystem via a userspace
|
||||
* filesystem (FUSE).
|
||||
*
|
||||
* Since: 2.4
|
||||
**/
|
||||
void
|
||||
@@ -1201,22 +1197,6 @@ files_to_strings (GSList *files,
|
||||
return g_slist_reverse (strings);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
file_to_uri_with_native_path (GFile *file)
|
||||
{
|
||||
gchar *result = NULL;
|
||||
gchar *native;
|
||||
|
||||
native = g_file_get_path (file);
|
||||
if (native)
|
||||
{
|
||||
result = g_filename_to_uri (native, NULL, NULL); /* NULL-GError */
|
||||
g_free (native);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_file_chooser_get_filenames:
|
||||
* @chooser: a #GtkFileChooser
|
||||
@@ -1365,9 +1345,7 @@ gtk_file_chooser_set_current_name (GtkFileChooser *chooser,
|
||||
* folder.
|
||||
*
|
||||
* Return value: The currently selected URI, or %NULL
|
||||
* if no file is selected. If gtk_file_chooser_set_local_only() is set to %TRUE
|
||||
* (the default) a local URI will be returned for any FUSE locations.
|
||||
* Free with g_free()
|
||||
* if no file is selected. Free with g_free()
|
||||
*
|
||||
* Since: 2.4
|
||||
**/
|
||||
@@ -1382,11 +1360,7 @@ gtk_file_chooser_get_uri (GtkFileChooser *chooser)
|
||||
file = gtk_file_chooser_get_file (chooser);
|
||||
if (file)
|
||||
{
|
||||
if (gtk_file_chooser_get_local_only (chooser))
|
||||
result = file_to_uri_with_native_path (file);
|
||||
else
|
||||
result = g_file_get_uri (file);
|
||||
|
||||
result = g_file_get_uri (file);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
@@ -1555,11 +1529,7 @@ gtk_file_chooser_get_uris (GtkFileChooser *chooser)
|
||||
|
||||
files = gtk_file_chooser_get_files (chooser);
|
||||
|
||||
if (gtk_file_chooser_get_local_only (chooser))
|
||||
result = files_to_strings (files, file_to_uri_with_native_path);
|
||||
else
|
||||
result = files_to_strings (files, g_file_get_uri);
|
||||
|
||||
result = files_to_strings (files, g_file_get_uri);
|
||||
g_slist_foreach (files, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (files);
|
||||
|
||||
|
||||
+234
-321
File diff suppressed because it is too large
Load Diff
@@ -1854,7 +1854,7 @@ shortcuts_append_bookmarks (GtkFileChooserDefault *impl,
|
||||
|
||||
file = bookmarks->data;
|
||||
|
||||
if (impl->local_only && !_gtk_file_has_native_path (file))
|
||||
if (impl->local_only && !g_file_is_native (file))
|
||||
continue;
|
||||
|
||||
if (shortcut_find_position (impl, file) != -1)
|
||||
@@ -1976,16 +1976,16 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
|
||||
if (_gtk_file_system_volume_is_mounted (volume))
|
||||
{
|
||||
GFile *base_file;
|
||||
gboolean base_has_native_path = FALSE;
|
||||
gboolean base_is_native = TRUE;
|
||||
|
||||
base_file = _gtk_file_system_volume_get_root (volume);
|
||||
if (base_file != NULL)
|
||||
{
|
||||
base_has_native_path = _gtk_file_has_native_path (base_file);
|
||||
base_is_native = g_file_is_native (base_file);
|
||||
g_object_unref (base_file);
|
||||
}
|
||||
|
||||
if (!base_has_native_path)
|
||||
if (!base_is_native)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -5159,7 +5159,7 @@ set_local_only (GtkFileChooserDefault *impl,
|
||||
}
|
||||
|
||||
if (local_only && impl->current_folder &&
|
||||
!_gtk_file_has_native_path (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
|
||||
@@ -7338,7 +7338,7 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
|
||||
|
||||
operation_mode_set (impl, OPERATION_MODE_BROWSE);
|
||||
|
||||
if (impl->local_only && !_gtk_file_has_native_path (file))
|
||||
if (impl->local_only && !g_file_is_native (file))
|
||||
{
|
||||
g_set_error_literal (error,
|
||||
GTK_FILE_CHOOSER_ERROR,
|
||||
|
||||
@@ -558,7 +558,7 @@ set_completion_folder (GtkFileChooserEntry *chooser_entry,
|
||||
{
|
||||
if (folder_file &&
|
||||
chooser_entry->local_only
|
||||
&& !_gtk_file_has_native_path (folder_file))
|
||||
&& !g_file_is_native (folder_file))
|
||||
folder_file = NULL;
|
||||
|
||||
if ((chooser_entry->current_folder_file
|
||||
|
||||
@@ -1273,16 +1273,3 @@ _gtk_file_info_consider_as_directory (GFileInfo *info)
|
||||
type == G_FILE_TYPE_SHORTCUT);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_file_has_native_path (GFile *file)
|
||||
{
|
||||
char *local_file_path;
|
||||
gboolean has_native_path;
|
||||
|
||||
/* Don't use g_file_is_native(), as we want to support FUSE paths if available */
|
||||
local_file_path = g_file_get_path (file);
|
||||
has_native_path = (local_file_path != NULL);
|
||||
g_free (local_file_path);
|
||||
|
||||
return has_native_path;
|
||||
}
|
||||
|
||||
@@ -128,9 +128,6 @@ GdkPixbuf * _gtk_file_info_render_icon (GFileInfo *info,
|
||||
|
||||
gboolean _gtk_file_info_consider_as_directory (GFileInfo *info);
|
||||
|
||||
/* GFile helper functions */
|
||||
gboolean _gtk_file_has_native_path (GFile *file);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FILE_SYSTEM_H__ */
|
||||
|
||||
+1
-1
@@ -555,7 +555,7 @@ gtk_font_button_init (GtkFontButton *font_button)
|
||||
font_button->priv->use_size = FALSE;
|
||||
font_button->priv->show_style = TRUE;
|
||||
font_button->priv->show_size = TRUE;
|
||||
font_button->priv->show_preview_entry = TRUE;
|
||||
font_button->priv->show_preview_entry = FALSE;
|
||||
font_button->priv->font_dialog = NULL;
|
||||
font_button->priv->font_family = NULL;
|
||||
font_button->priv->font_face = NULL;
|
||||
|
||||
@@ -107,11 +107,11 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkFontChooser::font-activated:
|
||||
* GtkFontChooserWidget::font-activated:
|
||||
* @self: the object which received the signal
|
||||
* @fontname: the font name
|
||||
*
|
||||
* Emitted when a font is activated.
|
||||
* Emitted when a font is activated from the widget's list.
|
||||
* This usually happens when the user double clicks an item,
|
||||
* or an item is selected and the user presses one of the keys
|
||||
* Space, Shift+Space, Return or Enter.
|
||||
|
||||
+6
-13
@@ -109,7 +109,7 @@
|
||||
* or stock items, rather than directly, but looking up icons
|
||||
* directly is also simple. The #GtkIconTheme object acts
|
||||
* as a database of all the icons in the current theme. You
|
||||
* can create new #GtkIconTheme objects, but it's much more
|
||||
* can create new #GtkIconTheme objects, but its much more
|
||||
* efficient to use the standard icon theme for the #GdkScreen
|
||||
* so that the icon information is shared with other people
|
||||
* looking up icons. In the case where the default screen is
|
||||
@@ -3027,8 +3027,6 @@ icon_info_dup (GtkIconInfo *icon_info)
|
||||
dup->icon_file = g_object_ref (icon_info->icon_file);
|
||||
if (icon_info->loadable)
|
||||
dup->loadable = g_object_ref (icon_info->loadable);
|
||||
if (icon_info->pixbuf)
|
||||
dup->pixbuf = g_object_ref (icon_info->pixbuf);
|
||||
|
||||
for (l = icon_info->emblem_infos; l != NULL; l = l->next)
|
||||
{
|
||||
@@ -4887,18 +4885,15 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *icon_theme,
|
||||
{
|
||||
GIcon *base, *emblem;
|
||||
GList *list, *l;
|
||||
GtkIconInfo *base_info, *emblem_info;
|
||||
GtkIconInfo *emblem_info;
|
||||
|
||||
if (GTK_IS_NUMERABLE_ICON (icon))
|
||||
_gtk_numerable_icon_set_background_icon_size (GTK_NUMERABLE_ICON (icon), size / 2);
|
||||
|
||||
base = g_emblemed_icon_get_icon (G_EMBLEMED_ICON (icon));
|
||||
base_info = gtk_icon_theme_lookup_by_gicon (icon_theme, base, size, flags);
|
||||
if (base_info)
|
||||
info = gtk_icon_theme_lookup_by_gicon (icon_theme, base, size, flags);
|
||||
if (info)
|
||||
{
|
||||
info = icon_info_dup (base_info);
|
||||
g_object_unref (base_info);
|
||||
|
||||
list = g_emblemed_icon_get_emblems (G_EMBLEMED_ICON (icon));
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
@@ -4908,11 +4903,9 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *icon_theme,
|
||||
if (emblem_info)
|
||||
info->emblem_infos = g_slist_prepend (info->emblem_infos, emblem_info);
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return info;
|
||||
}
|
||||
else if (GDK_IS_PIXBUF (icon))
|
||||
{
|
||||
|
||||
+14
-42
@@ -52,7 +52,7 @@
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkmain.h"
|
||||
|
||||
#include "a11y/gtklabelaccessibleprivate.h"
|
||||
#include "a11y/gtklabelaccessible.h"
|
||||
|
||||
/* this is in case rint() is not provided by the compiler,
|
||||
* such as in the case of C89 compilers, like MSVC
|
||||
@@ -1980,20 +1980,15 @@ gtk_label_set_text_internal (GtkLabel *label,
|
||||
gchar *str)
|
||||
{
|
||||
GtkLabelPrivate *priv = label->priv;
|
||||
gboolean text_changed;
|
||||
|
||||
if (g_strcmp0 (priv->text, str) == 0)
|
||||
{
|
||||
g_free (str);
|
||||
return;
|
||||
}
|
||||
text_changed = g_strcmp0 (priv->text, str) != 0;
|
||||
|
||||
_gtk_label_accessible_text_deleted (label);
|
||||
g_free (priv->text);
|
||||
priv->text = str;
|
||||
|
||||
_gtk_label_accessible_text_inserted (label);
|
||||
|
||||
gtk_label_select_region_index (label, 0, 0);
|
||||
if (text_changed)
|
||||
gtk_label_select_region_index (label, 0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2517,11 +2512,10 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
||||
GError *error = NULL;
|
||||
PangoAttrList *attrs = NULL;
|
||||
gunichar accel_char = 0;
|
||||
gchar *str_for_display = NULL;
|
||||
gchar *str_for_accel = NULL;
|
||||
gchar *new_str;
|
||||
GList *links = NULL;
|
||||
|
||||
if (!parse_uri_markup (label, str, &str_for_display, &links, &error))
|
||||
if (!parse_uri_markup (label, str, &new_str, &links, &error))
|
||||
{
|
||||
g_warning ("Failed to set text from markup due to error parsing markup: %s",
|
||||
error->message);
|
||||
@@ -2529,8 +2523,6 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
||||
return;
|
||||
}
|
||||
|
||||
str_for_accel = g_strdup (str_for_display);
|
||||
|
||||
if (links)
|
||||
{
|
||||
gtk_label_ensure_select_info (label);
|
||||
@@ -2558,51 +2550,31 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
||||
gchar *pattern;
|
||||
guint key;
|
||||
|
||||
if (separate_uline_pattern (str_for_display, &key, &tmp, &pattern))
|
||||
if (separate_uline_pattern (new_str, &key, &tmp, &pattern))
|
||||
{
|
||||
g_free (str_for_display);
|
||||
str_for_display = tmp;
|
||||
g_free (new_str);
|
||||
new_str = tmp;
|
||||
g_free (pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Extract the text to display */
|
||||
if (!pango_parse_markup (str_for_display,
|
||||
if (!pango_parse_markup (new_str,
|
||||
-1,
|
||||
with_uline ? '_' : 0,
|
||||
&attrs,
|
||||
&text,
|
||||
NULL,
|
||||
with_uline ? &accel_char : NULL,
|
||||
&error))
|
||||
{
|
||||
g_warning ("Failed to set text from markup due to error parsing markup: %s",
|
||||
error->message);
|
||||
g_free (str_for_display);
|
||||
g_free (str_for_accel);
|
||||
g_free (new_str);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Extract the accelerator character */
|
||||
if (with_uline && !pango_parse_markup (str_for_accel,
|
||||
-1,
|
||||
'_',
|
||||
NULL,
|
||||
NULL,
|
||||
&accel_char,
|
||||
&error))
|
||||
{
|
||||
g_warning ("Failed to set text from markup due to error parsing markup: %s",
|
||||
error->message);
|
||||
g_free (str_for_display);
|
||||
g_free (str_for_accel);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
g_free (str_for_display);
|
||||
g_free (str_for_accel);
|
||||
g_free (new_str);
|
||||
|
||||
if (text)
|
||||
gtk_label_set_text_internal (label, text);
|
||||
|
||||
+4
-4
@@ -59,8 +59,8 @@
|
||||
* int
|
||||
* main (int argc, char **argv)
|
||||
* {
|
||||
* /* Initialize i18n support with bindtextdomain(), etc. */
|
||||
* ...
|
||||
* /* Initialize i18n support */
|
||||
* gtk_set_locale ();
|
||||
*
|
||||
* /* Initialize the widget set */
|
||||
* gtk_init (&argc, &argv);
|
||||
@@ -849,7 +849,7 @@ gtk_get_option_group (gboolean open_default_display)
|
||||
* @argv: (array length=argc) (inout) (allow-none): Address of the
|
||||
* <parameter>argv</parameter> parameter of main(), or %NULL. Any options
|
||||
* understood by GTK+ are stripped before return.
|
||||
* @parameter_string: (allow-none): a string which is displayed in
|
||||
* @parameter_string: a string which is displayed in
|
||||
* the first line of <option>--help</option> output, after
|
||||
* <literal><replaceable>programname</replaceable> [OPTION...]</literal>
|
||||
* @entries: (array zero-terminated=1): a %NULL-terminated array
|
||||
@@ -1698,7 +1698,7 @@ gtk_main_do_event (GdkEvent *event)
|
||||
if (GTK_IS_WINDOW (window))
|
||||
{
|
||||
if (mnemonics_visible)
|
||||
_gtk_window_schedule_mnemonics_visible (GTK_WINDOW (window));
|
||||
_gtk_window_set_auto_mnemonics_visible (GTK_WINDOW (window));
|
||||
else
|
||||
gtk_window_set_mnemonics_visible (GTK_WINDOW (window), FALSE);
|
||||
}
|
||||
|
||||
+50
-61
@@ -82,52 +82,9 @@ G_DEFINE_TYPE_WITH_CODE (GtkOverlay, gtk_overlay, GTK_TYPE_BIN,
|
||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
|
||||
gtk_overlay_buildable_init))
|
||||
|
||||
static void
|
||||
gtk_overlay_compute_child_allocation (GtkOverlay *overlay,
|
||||
GtkOverlayChild *child,
|
||||
GtkAllocation *window_allocation,
|
||||
GtkAllocation *widget_allocation)
|
||||
{
|
||||
gint left, right, top, bottom;
|
||||
GtkAllocation allocation, overlay_allocation;
|
||||
gboolean result;
|
||||
|
||||
g_signal_emit (overlay, signals[GET_CHILD_POSITION],
|
||||
0, child->widget, &allocation, &result);
|
||||
|
||||
gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation);
|
||||
|
||||
allocation.x += overlay_allocation.x;
|
||||
allocation.y += overlay_allocation.y;
|
||||
|
||||
/* put the margins outside the window; also arrange things
|
||||
* so that the adjusted child allocation still ends up at 0, 0
|
||||
*/
|
||||
left = gtk_widget_get_margin_left (child->widget);
|
||||
right = gtk_widget_get_margin_right (child->widget);
|
||||
top = gtk_widget_get_margin_top (child->widget);
|
||||
bottom = gtk_widget_get_margin_bottom (child->widget);
|
||||
|
||||
if (widget_allocation)
|
||||
{
|
||||
widget_allocation->x = - left;
|
||||
widget_allocation->y = - top;
|
||||
widget_allocation->width = allocation.width;
|
||||
widget_allocation->height = allocation.height;
|
||||
}
|
||||
|
||||
if (window_allocation)
|
||||
{
|
||||
window_allocation->x = allocation.x + left;
|
||||
window_allocation->y = allocation.y + top;
|
||||
window_allocation->width = allocation.width - (left + right);
|
||||
window_allocation->height = allocation.height - (top + bottom);
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gtk_overlay_create_child_window (GtkOverlay *overlay,
|
||||
GtkOverlayChild *child)
|
||||
GtkWidget *child)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (overlay);
|
||||
GtkAllocation allocation;
|
||||
@@ -135,7 +92,7 @@ gtk_overlay_create_child_window (GtkOverlay *overlay,
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
gtk_overlay_compute_child_allocation (overlay, child, &allocation, NULL);
|
||||
gtk_widget_get_allocation (child, &allocation);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
@@ -151,8 +108,8 @@ gtk_overlay_create_child_window (GtkOverlay *overlay,
|
||||
gtk_widget_register_window (widget, window);
|
||||
gtk_style_context_set_background (gtk_widget_get_style_context (widget), window);
|
||||
|
||||
gtk_widget_set_parent_window (child->widget, window);
|
||||
|
||||
gtk_widget_set_parent_window (child, window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -283,7 +240,9 @@ static void
|
||||
gtk_overlay_child_allocate (GtkOverlay *overlay,
|
||||
GtkOverlayChild *child)
|
||||
{
|
||||
GtkAllocation window_allocation, child_allocation;
|
||||
gint left, right, top, bottom;
|
||||
GtkAllocation allocation, child_allocation, overlay_allocation;
|
||||
gboolean result;
|
||||
|
||||
if (gtk_widget_get_mapped (GTK_WIDGET (overlay)))
|
||||
{
|
||||
@@ -296,14 +255,38 @@ gtk_overlay_child_allocate (GtkOverlay *overlay,
|
||||
if (!gtk_widget_get_visible (child->widget))
|
||||
return;
|
||||
|
||||
gtk_overlay_compute_child_allocation (overlay, child, &window_allocation, &child_allocation);
|
||||
g_signal_emit (overlay, signals[GET_CHILD_POSITION],
|
||||
0, child->widget, &allocation, &result);
|
||||
|
||||
gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation);
|
||||
|
||||
allocation.x += overlay_allocation.x;
|
||||
allocation.y += overlay_allocation.y;
|
||||
|
||||
/* put the margins outside the window; also arrange things
|
||||
* so that the adjusted child allocation still ends up at 0, 0
|
||||
*/
|
||||
left = gtk_widget_get_margin_left (child->widget);
|
||||
right = gtk_widget_get_margin_right (child->widget);
|
||||
top = gtk_widget_get_margin_top (child->widget);
|
||||
bottom = gtk_widget_get_margin_bottom (child->widget);
|
||||
|
||||
child_allocation.x = - left;
|
||||
child_allocation.y = - top;
|
||||
child_allocation.width = allocation.width;
|
||||
child_allocation.height = allocation.height;
|
||||
|
||||
allocation.x += left;
|
||||
allocation.y += top;
|
||||
allocation.width -= left + right;
|
||||
allocation.height -= top + bottom;
|
||||
|
||||
if (child->window)
|
||||
gdk_window_move_resize (child->window,
|
||||
window_allocation.x, window_allocation.y,
|
||||
window_allocation.width, window_allocation.height);
|
||||
allocation.x, allocation.y,
|
||||
allocation.width, allocation.height);
|
||||
|
||||
gtk_overlay_child_update_style_classes (overlay, child->widget, &window_allocation);
|
||||
gtk_overlay_child_update_style_classes (overlay, child->widget, &allocation);
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation);
|
||||
}
|
||||
|
||||
@@ -363,7 +346,9 @@ gtk_overlay_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_size_allocate (main_widget, allocation);
|
||||
|
||||
for (children = priv->children; children; children = children->next)
|
||||
gtk_overlay_child_allocate (overlay, children->data);
|
||||
{
|
||||
gtk_overlay_child_allocate (overlay, children->data);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -372,15 +357,15 @@ gtk_overlay_get_child_position (GtkOverlay *overlay,
|
||||
GtkAllocation *alloc)
|
||||
{
|
||||
GtkAllocation main_alloc;
|
||||
GtkRequisition min, req;
|
||||
GtkRequisition req;
|
||||
GtkAlign halign;
|
||||
GtkTextDirection direction;
|
||||
|
||||
gtk_overlay_get_main_widget_allocation (overlay, &main_alloc);
|
||||
gtk_widget_get_preferred_size (widget, &min, &req);
|
||||
gtk_widget_get_preferred_size (widget, NULL, &req);
|
||||
|
||||
alloc->x = main_alloc.x;
|
||||
alloc->width = MAX (min.width, MIN (main_alloc.width, req.width));
|
||||
alloc->width = MIN (main_alloc.width, req.width);
|
||||
|
||||
direction = gtk_widget_get_direction (widget);
|
||||
|
||||
@@ -391,7 +376,7 @@ gtk_overlay_get_child_position (GtkOverlay *overlay,
|
||||
/* nothing to do */
|
||||
break;
|
||||
case GTK_ALIGN_FILL:
|
||||
alloc->width = MAX (alloc->width, main_alloc.width);
|
||||
alloc->width = main_alloc.width;
|
||||
break;
|
||||
case GTK_ALIGN_CENTER:
|
||||
alloc->x += main_alloc.width / 2 - req.width / 2;
|
||||
@@ -402,7 +387,7 @@ gtk_overlay_get_child_position (GtkOverlay *overlay,
|
||||
}
|
||||
|
||||
alloc->y = main_alloc.y;
|
||||
alloc->height = MAX (min.height, MIN (main_alloc.height, req.height));
|
||||
alloc->height = MIN (main_alloc.height, req.height);
|
||||
|
||||
switch (gtk_widget_get_valign (widget))
|
||||
{
|
||||
@@ -410,7 +395,7 @@ gtk_overlay_get_child_position (GtkOverlay *overlay,
|
||||
/* nothing to do */
|
||||
break;
|
||||
case GTK_ALIGN_FILL:
|
||||
alloc->height = MAX (alloc->height, main_alloc.height);
|
||||
alloc->height = main_alloc.height;
|
||||
break;
|
||||
case GTK_ALIGN_CENTER:
|
||||
alloc->y += main_alloc.height / 2 - req.height / 2;
|
||||
@@ -438,7 +423,10 @@ gtk_overlay_realize (GtkWidget *widget)
|
||||
child = children->data;
|
||||
|
||||
if (child->window == NULL)
|
||||
child->window = gtk_overlay_create_child_window (overlay, child);
|
||||
{
|
||||
child->window = gtk_overlay_create_child_window (overlay, child->widget);
|
||||
gtk_overlay_child_allocate (overlay, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,8 +712,9 @@ gtk_overlay_add_overlay (GtkOverlay *overlay,
|
||||
|
||||
if (gtk_widget_get_realized (GTK_WIDGET (overlay)))
|
||||
{
|
||||
child->window = gtk_overlay_create_child_window (overlay, child);
|
||||
child->window = gtk_overlay_create_child_window (overlay, widget);
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));
|
||||
gtk_overlay_child_allocate (overlay, child);
|
||||
}
|
||||
else
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));
|
||||
|
||||
@@ -677,6 +677,7 @@ gtk_plug_unrealize (GtkWidget *widget)
|
||||
|
||||
if (priv->socket_window != NULL)
|
||||
{
|
||||
gtk_widget_unregister_window (widget, priv->socket_window);
|
||||
g_object_unref (priv->socket_window);
|
||||
priv->socket_window = NULL;
|
||||
|
||||
@@ -878,6 +879,7 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (plug);
|
||||
|
||||
gtk_widget_unregister_window (widget, priv->socket_window);
|
||||
g_object_unref (priv->socket_window);
|
||||
priv->socket_window = NULL;
|
||||
|
||||
|
||||
@@ -152,8 +152,6 @@ gtk_printer_option_widget_finalize (GObject *object)
|
||||
|
||||
if (priv->source)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->source,
|
||||
priv->source_changed_handler);
|
||||
g_object_unref (priv->source);
|
||||
priv->source = NULL;
|
||||
}
|
||||
|
||||
+6
-6
@@ -269,21 +269,21 @@ gtk_print_job_finalize (GObject *object)
|
||||
GtkPrintJob *job = GTK_PRINT_JOB (object);
|
||||
GtkPrintJobPrivate *priv = job->priv;
|
||||
|
||||
if (priv->surface)
|
||||
cairo_surface_destroy (priv->surface);
|
||||
|
||||
if (priv->backend)
|
||||
g_object_unref (priv->backend);
|
||||
|
||||
if (priv->spool_io != NULL)
|
||||
{
|
||||
g_io_channel_unref (priv->spool_io);
|
||||
priv->spool_io = NULL;
|
||||
}
|
||||
|
||||
if (priv->backend)
|
||||
g_object_unref (priv->backend);
|
||||
|
||||
if (priv->printer)
|
||||
g_object_unref (priv->printer);
|
||||
|
||||
if (priv->surface)
|
||||
cairo_surface_destroy (priv->surface);
|
||||
|
||||
if (priv->settings)
|
||||
g_object_unref (priv->settings);
|
||||
|
||||
|
||||
+39
-4
@@ -76,6 +76,21 @@ _gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf)
|
||||
return nsimage;
|
||||
}
|
||||
|
||||
static NSString *
|
||||
target_to_pasteboard_type (const char *target)
|
||||
{
|
||||
if (strcmp (target, "UTF8_STRING") == 0)
|
||||
return NSStringPboardType;
|
||||
else if (strcmp (target, "image/tiff") == 0)
|
||||
return NSTIFFPboardType;
|
||||
else if (strcmp (target, "application/x-color") == 0)
|
||||
return NSColorPboardType;
|
||||
else if (strcmp (target, "text/uri-list") == 0)
|
||||
return NSURLPboardType;
|
||||
else
|
||||
return [NSString stringWithUTF8String:target];
|
||||
}
|
||||
|
||||
NSSet *
|
||||
_gtk_quartz_target_list_to_pasteboard_types (GtkTargetList *target_list)
|
||||
{
|
||||
@@ -85,8 +100,10 @@ _gtk_quartz_target_list_to_pasteboard_types (GtkTargetList *target_list)
|
||||
for (list = target_list->list; list; list = list->next)
|
||||
{
|
||||
GtkTargetPair *pair = list->data;
|
||||
gchar *target = gdk_atom_name (pair->target);
|
||||
g_return_val_if_fail (pair->flags < 16, NULL);
|
||||
[set addObject:gdk_quartz_atom_to_pasteboard_type_libgtk_only (pair->target)];
|
||||
[set addObject:target_to_pasteboard_type (target)];
|
||||
g_free (target);
|
||||
}
|
||||
|
||||
return set;
|
||||
@@ -101,12 +118,27 @@ _gtk_quartz_target_entries_to_pasteboard_types (const GtkTargetEntry *targets,
|
||||
|
||||
for (i = 0; i < n_targets; i++)
|
||||
{
|
||||
[set addObject:gdk_quartz_target_to_pasteboard_type_libgtk_only (targets[i].target)];
|
||||
[set addObject:target_to_pasteboard_type (targets[i].target)];
|
||||
}
|
||||
|
||||
return set;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
_gtk_quartz_pasteboard_type_to_atom (NSString *type)
|
||||
{
|
||||
if ([type isEqualToString:NSStringPboardType])
|
||||
return gdk_atom_intern_static_string ("UTF8_STRING");
|
||||
else if ([type isEqualToString:NSTIFFPboardType])
|
||||
return gdk_atom_intern_static_string ("image/tiff");
|
||||
else if ([type isEqualToString:NSColorPboardType])
|
||||
return gdk_atom_intern_static_string ("application/x-color");
|
||||
else if ([type isEqualToString:NSURLPboardType])
|
||||
return gdk_atom_intern_static_string ("text/uri-list");
|
||||
else
|
||||
return gdk_atom_intern ([type UTF8String], FALSE);
|
||||
}
|
||||
|
||||
GList *
|
||||
_gtk_quartz_pasteboard_types_to_atom_list (NSArray *array)
|
||||
{
|
||||
@@ -118,7 +150,7 @@ _gtk_quartz_pasteboard_types_to_atom_list (NSArray *array)
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
GdkAtom atom = gdk_quartz_pasteboard_type_to_atom_libgtk_only ([array objectAtIndex:i]);
|
||||
GdkAtom atom = _gtk_quartz_pasteboard_type_to_atom ([array objectAtIndex:i]);
|
||||
|
||||
result = g_list_prepend (result, GDK_ATOM_TO_POINTER (atom));
|
||||
}
|
||||
@@ -234,17 +266,20 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard,
|
||||
GtkSelectionData *selection_data)
|
||||
{
|
||||
NSString *type;
|
||||
gchar *target;
|
||||
GdkDisplay *display;
|
||||
gint format;
|
||||
const guchar *data;
|
||||
NSUInteger length;
|
||||
|
||||
target = gdk_atom_name (gtk_selection_data_get_target (selection_data));
|
||||
display = gtk_selection_data_get_display (selection_data);
|
||||
format = gtk_selection_data_get_format (selection_data);
|
||||
data = gtk_selection_data_get_data (selection_data);
|
||||
length = gtk_selection_data_get_length (selection_data);
|
||||
|
||||
type = gdk_quartz_atom_to_pasteboard_type_libgtk_only (gtk_selection_data_get_target (selection_data));
|
||||
type = target_to_pasteboard_type (target);
|
||||
g_free (target);
|
||||
|
||||
if ([type isEqualTo:NSStringPboardType])
|
||||
[pasteboard setString:[NSString stringWithUTF8String:(const char *)data]
|
||||
|
||||
@@ -29,6 +29,7 @@ NSSet *_gtk_quartz_target_entries_to_pasteboard_types (const GtkTargetEntry *t
|
||||
guint n_targets);
|
||||
|
||||
GList *_gtk_quartz_pasteboard_types_to_atom_list (NSArray *array);
|
||||
GdkAtom _gtk_quartz_pasteboard_type_to_atom (NSString *type);
|
||||
|
||||
GtkSelectionData *_gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard,
|
||||
GdkAtom target,
|
||||
|
||||
@@ -74,7 +74,7 @@ search_entry_changed_cb (GtkEntry *entry,
|
||||
|
||||
if (str == NULL || *str == '\0')
|
||||
{
|
||||
icon_name = NULL;
|
||||
icon_name = "edit-find-symbolic";
|
||||
active = FALSE;
|
||||
}
|
||||
else
|
||||
@@ -101,12 +101,6 @@ gtk_search_entry_init (GtkSearchEntry *entry)
|
||||
g_signal_connect (entry, "icon-release",
|
||||
G_CALLBACK (search_entry_clear_cb), NULL);
|
||||
|
||||
g_object_set (entry,
|
||||
"primary-icon-name", "edit-find-symbolic",
|
||||
"primary-icon-activatable", FALSE,
|
||||
"primary-icon-sensitive", FALSE,
|
||||
NULL);
|
||||
|
||||
search_entry_changed_cb (GTK_ENTRY (entry), NULL);
|
||||
}
|
||||
|
||||
|
||||
+19
-7
@@ -167,10 +167,17 @@ gtk_separator_get_preferred_size (GtkWidget *widget,
|
||||
{
|
||||
GtkSeparator *separator = GTK_SEPARATOR (widget);
|
||||
GtkSeparatorPrivate *private = separator->priv;
|
||||
GtkStyleContext *context;
|
||||
GtkStateFlags state;
|
||||
GtkBorder border;
|
||||
gboolean wide_sep;
|
||||
gint sep_width;
|
||||
gint sep_height;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
gtk_style_context_get_border (context, state, &border);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"wide-separators", &wide_sep,
|
||||
"separator-width", &sep_width,
|
||||
@@ -183,11 +190,11 @@ gtk_separator_get_preferred_size (GtkWidget *widget,
|
||||
}
|
||||
else if (orientation == GTK_ORIENTATION_VERTICAL)
|
||||
{
|
||||
*minimum = *natural = wide_sep ? sep_height : 1;
|
||||
*minimum = *natural = wide_sep ? sep_height : border.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
*minimum = *natural = wide_sep ? sep_width : 1;
|
||||
*minimum = *natural = wide_sep ? sep_width : border.left;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,22 +220,27 @@ gtk_separator_draw (GtkWidget *widget,
|
||||
{
|
||||
GtkSeparator *separator = GTK_SEPARATOR (widget);
|
||||
GtkSeparatorPrivate *private = separator->priv;
|
||||
GtkStateFlags state;
|
||||
GtkStyleContext *context;
|
||||
GtkBorder padding;
|
||||
gboolean wide_separators;
|
||||
gint separator_width;
|
||||
gint separator_height;
|
||||
int width, height;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_widget_style_get (widget,
|
||||
"wide-separators", &wide_separators,
|
||||
"separator-width", &separator_width,
|
||||
"separator-height", &separator_height,
|
||||
NULL);
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
if (wide_separators)
|
||||
@@ -237,8 +249,8 @@ gtk_separator_draw (GtkWidget *widget,
|
||||
width, separator_height);
|
||||
else
|
||||
gtk_render_line (context, cr,
|
||||
0, height / 2,
|
||||
width - 1, height / 2);
|
||||
0, (height - padding.top) / 2,
|
||||
width - 1, (height - padding.top) / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -248,8 +260,8 @@ gtk_separator_draw (GtkWidget *widget,
|
||||
separator_width, height);
|
||||
else
|
||||
gtk_render_line (context, cr,
|
||||
width / 2, 0,
|
||||
width / 2, height - 1);
|
||||
(width - padding.left) / 2, 0,
|
||||
(width - padding.left) / 2, height - 1);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
+2
-7
@@ -1048,12 +1048,7 @@ gtk_spin_button_realize (GtkWidget *widget)
|
||||
|
||||
return_val = FALSE;
|
||||
g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0, &return_val);
|
||||
|
||||
/* If output wasn't processed explicitly by the method connected to the
|
||||
* 'output' signal; and if we don't have any explicit 'text' set initially,
|
||||
* fallback to the default output. */
|
||||
if (!return_val &&
|
||||
(spin_button->priv->numeric || gtk_entry_get_text (GTK_ENTRY (spin_button)) == NULL))
|
||||
if (return_val == FALSE)
|
||||
gtk_spin_button_default_output (spin_button);
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (spin_button));
|
||||
@@ -2412,7 +2407,7 @@ gtk_spin_button_set_value (GtkSpinButton *spin_button,
|
||||
* @policy: a #GtkSpinButtonUpdatePolicy value
|
||||
*
|
||||
* Sets the update behavior of a spin button.
|
||||
* This determines whether the spin button is always updated
|
||||
* This determines wether the spin button is always updated
|
||||
* or only when a valid value is set.
|
||||
*/
|
||||
void
|
||||
|
||||
+6
-19
@@ -1071,10 +1071,10 @@ gtk_style_context_set_invalid (GtkStyleContext *context,
|
||||
|
||||
if (invalid)
|
||||
{
|
||||
if (GTK_IS_RESIZE_CONTAINER (priv->widget))
|
||||
_gtk_container_queue_restyle (GTK_CONTAINER (priv->widget));
|
||||
else if (priv->parent)
|
||||
if (priv->parent)
|
||||
gtk_style_context_set_invalid (priv->parent, TRUE);
|
||||
else if (GTK_IS_RESIZE_CONTAINER (priv->widget))
|
||||
_gtk_container_queue_restyle (GTK_CONTAINER (priv->widget));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2676,7 +2676,6 @@ gtk_style_context_set_frame_clock (GtkStyleContext *context,
|
||||
*
|
||||
* Returns: (transfer none): a #GdkFrameClock, or %NULL
|
||||
* if @context does not have an attached frame clock.
|
||||
*
|
||||
* Since: 3.8
|
||||
**/
|
||||
GdkFrameClock *
|
||||
@@ -2828,8 +2827,7 @@ _gtk_style_context_resolve_color (GtkStyleContext *context,
|
||||
GTK_STYLE_PROVIDER_PRIVATE (context->priv->cascade),
|
||||
_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
dependencies,
|
||||
NULL);
|
||||
dependencies);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
@@ -3283,19 +3281,8 @@ _gtk_style_context_validate (GtkStyleContext *context,
|
||||
_gtk_bitmask_free (animation_changes);
|
||||
}
|
||||
|
||||
if (change & GTK_CSS_CHANGE_FORCE_INVALIDATE)
|
||||
{
|
||||
GtkBitmask *full = _gtk_bitmask_new ();
|
||||
full = _gtk_bitmask_invert_range (full,
|
||||
0,
|
||||
_gtk_css_style_property_get_n_properties ());
|
||||
gtk_style_context_do_invalidate (context, full);
|
||||
_gtk_bitmask_free (full);
|
||||
}
|
||||
else if (!_gtk_bitmask_is_empty (changes))
|
||||
{
|
||||
gtk_style_context_do_invalidate (context, changes);
|
||||
}
|
||||
if (!_gtk_bitmask_is_empty (changes) || (change & GTK_CSS_CHANGE_FORCE_INVALIDATE))
|
||||
gtk_style_context_do_invalidate (context, changes);
|
||||
|
||||
change = _gtk_css_change_for_child (change);
|
||||
for (list = priv->children; list; list = list->next)
|
||||
|
||||
+3
-3
@@ -130,7 +130,7 @@ test_find_widget_input_windows (GtkWidget *widget,
|
||||
* particular because the mouse pointer is warped to the key press
|
||||
* location, see gdk_test_simulate_key() for details.
|
||||
*
|
||||
* Returns: whether all actions neccessary for the key event simulation were carried out successfully.
|
||||
* Returns: wether all actions neccessary for the key event simulation were carried out successfully.
|
||||
*
|
||||
* Since: 2.14
|
||||
**/
|
||||
@@ -166,7 +166,7 @@ gtk_test_widget_send_key (GtkWidget *widget,
|
||||
* particular because the mouse pointer is warped to the button click
|
||||
* location, see gdk_test_simulate_button() for details.
|
||||
*
|
||||
* Returns: whether all actions neccessary for the button click simulation were carried out successfully.
|
||||
* Returns: wether all actions neccessary for the button click simulation were carried out successfully.
|
||||
*
|
||||
* Since: 2.14
|
||||
**/
|
||||
@@ -197,7 +197,7 @@ gtk_test_widget_click (GtkWidget *widget,
|
||||
* spin button arrow areas, usually leading to an increase or decrease of
|
||||
* spin button's value.
|
||||
*
|
||||
* Returns: whether all actions neccessary for the button click simulation were carried out successfully.
|
||||
* Returns: wether all actions neccessary for the button click simulation were carried out successfully.
|
||||
*
|
||||
* Since: 2.14
|
||||
**/
|
||||
|
||||
+1
-2
@@ -9101,8 +9101,7 @@ text_window_scroll (GtkTextWindow *win,
|
||||
|
||||
if (dx != 0 || dy != 0)
|
||||
{
|
||||
if (priv->selection_bubble)
|
||||
_gtk_bubble_window_popdown (GTK_BUBBLE_WINDOW (priv->selection_bubble));
|
||||
_gtk_bubble_window_popdown (GTK_BUBBLE_WINDOW (priv->selection_bubble));
|
||||
gdk_window_scroll (win->bin_window, dx, dy);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1409,7 +1409,7 @@ gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item)
|
||||
/* The slightely inaccurate name "gtk_tool_item_toolbar_reconfigured" was
|
||||
* choosen over "gtk_tool_item_tool_shell_reconfigured", since the function
|
||||
* emits the "toolbar-reconfigured" signal, not "tool-shell-reconfigured".
|
||||
* It's not possible to rename the signal, and emitting another name than
|
||||
* Its not possible to rename the signal, and emitting another name than
|
||||
* indicated by the function name would be quite confusing. That's the
|
||||
* price of providing stable APIs.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user