mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-30 12:34:07 +02:00
Compare commits
308 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac1fa7fc6d | |||
| 1f03c13f4d | |||
| 8e84264036 | |||
| 4b4abf4c50 | |||
| a631e3060e | |||
| 6c5c3e6181 | |||
| 329f82f6e7 | |||
| 60a900be28 | |||
| c7c736e283 | |||
| 752a949492 | |||
| be495bedbc | |||
| 412b3eace2 | |||
| 0aeba6064b | |||
| ec115fedf7 | |||
| 29177f94ed | |||
| ae050ceb40 | |||
| b27b44db72 | |||
| c6f029c946 | |||
| 66bf19c1e0 | |||
| 073235ada4 | |||
| 1b8eb63376 | |||
| 75a8299d18 | |||
| cc0a652ea8 | |||
| 80079cd343 | |||
| 955c6793a6 | |||
| 189679b49c | |||
| e45a3bc07d | |||
| bc16a03722 | |||
| 260415eb42 | |||
| c8174a4b2e | |||
| 2901b418ad | |||
| ae6b03e50f | |||
| 128ba2ddc7 | |||
| 7ca96b9ed6 | |||
| 839061a25a | |||
| 1e63c590b6 | |||
| 92e1e9fb0b | |||
| ddf0b20367 | |||
| d303317a31 | |||
| c620b354b5 | |||
| ebac2bbcd8 | |||
| 3281349f8d | |||
| 3f5280987e | |||
| 6d0953bc22 | |||
| ef1a504898 | |||
| 474b23344a | |||
| 77db6dc649 | |||
| b09ac30233 | |||
| 6e14b6142b | |||
| 7778df2fc5 | |||
| 156841f80e | |||
| c82e6dad5c | |||
| 95c68fe26d | |||
| 77c3b95fd5 | |||
| b662d0827c | |||
| a542934e67 | |||
| d2b2c3238b | |||
| d37a3162e0 | |||
| 9ddacfc29b | |||
| 7e21785710 | |||
| 7cfdf6bd68 | |||
| 72942267aa | |||
| ac19c4bc07 | |||
| 14bd13b1be | |||
| afe13d3e72 | |||
| e356ef8c05 | |||
| 3d993a7323 | |||
| a4a6e65ca9 | |||
| 4392fdc291 | |||
| 67e2f5e1ca | |||
| 3579c85af1 | |||
| 896bbce2e5 | |||
| 8f1ee27595 | |||
| 541947e9ef | |||
| 7bb7d0f4d6 | |||
| da676c9e9e | |||
| 4edf589a5b | |||
| 709eec4bce | |||
| b179803c11 | |||
| 5cd40deb20 | |||
| 9db1ea580d | |||
| 9e56f58742 | |||
| 4b946f69e2 | |||
| d55be193b8 | |||
| e5b227fe8d | |||
| d947095881 | |||
| 93b049356f | |||
| 75f353bef4 | |||
| 2264ed9de6 | |||
| d0aa2cefcd | |||
| a52d13c8b8 | |||
| 215b6ee2e6 | |||
| ab45c6c6c2 | |||
| 3344f2b040 | |||
| ecef2b2890 | |||
| 802cbc0d75 | |||
| 157d1ba85f | |||
| 91e7f37074 | |||
| 18a539b372 | |||
| eae9200c5d | |||
| 25cb9d208a | |||
| 23471b2e21 | |||
| 258ffc8b97 | |||
| 86b7ec1a58 | |||
| 9831e3f72a | |||
| 0a55facac0 | |||
| 0ecf7d3540 | |||
| 4576b5bf1e | |||
| 0526ddfc54 | |||
| 4c52232ee7 | |||
| 43edd37ee2 | |||
| e95aea2e30 | |||
| 038a3588d6 | |||
| 0b2fd6a8c8 | |||
| 3e991badf7 | |||
| ac6d284269 | |||
| 83b94b1616 | |||
| d045ffcf7d | |||
| 6c69dc32a0 | |||
| 3b1c00ad06 | |||
| dd6fe27858 | |||
| 45f3f5d0ae | |||
| 7185af15cf | |||
| 80e8dd43f7 | |||
| a383074c99 | |||
| 52a623729d | |||
| d4ee17f0b5 | |||
| 7475bc5d0a | |||
| 35f87b5592 | |||
| 5e37d13eb6 | |||
| 4b1aee3e79 | |||
| 0ccc5bbde7 | |||
| 59a686d22e | |||
| 26d46f6e16 | |||
| ceafbf0629 | |||
| cf178d011b | |||
| 682c2767c2 | |||
| 0e00c6b605 | |||
| e9717ed719 | |||
| 9e59d19507 | |||
| 94f98dcd25 | |||
| 6c7266c338 | |||
| b4bd6d0cad | |||
| c7f7c10d7c | |||
| d831766572 | |||
| e2ecfbfd54 | |||
| a8ec32d41a | |||
| 1215680b6d | |||
| 77df89396c | |||
| c8883fdbb0 | |||
| 3cc5808dcd | |||
| 8ca89f0141 | |||
| 76fa91d21e | |||
| d2d5297a1e | |||
| 7b317a5fba | |||
| 9f8dc6f5dc | |||
| bc56db0776 | |||
| 15d06ff064 | |||
| 2dd98666f1 | |||
| d1a7db8aea | |||
| 64a8ecb390 | |||
| a9e336256b | |||
| e9b20b51e9 | |||
| 1d8b38b6e0 | |||
| 82ad19d420 | |||
| 492b22d975 | |||
| 62405fbb75 | |||
| f1fef40f0d | |||
| 2fb9308a67 | |||
| d902477efd | |||
| 5ee19c2308 | |||
| fabd4252ab | |||
| 630e9292c2 | |||
| 14d1b8197a | |||
| 4d658341d2 | |||
| ac75047aef | |||
| 6d6f9f6ff5 | |||
| 370adc94e7 | |||
| 532acdc443 | |||
| d7d38aa443 | |||
| a6209cc89b | |||
| 01bd523cee | |||
| 45ab72a78a | |||
| 437b76812d | |||
| e3ee459a78 | |||
| d70b546f2e | |||
| 812930b7cd | |||
| 2a14004fc3 | |||
| 04e9f33437 | |||
| 150816c687 | |||
| ddacfa5d63 | |||
| 0718297e9a | |||
| 9cc16182d3 | |||
| f6165d6e80 | |||
| 10c36d244e | |||
| 515eb652c7 | |||
| 8ed92efa3c | |||
| cc839f8bc5 | |||
| 48d4820dee | |||
| d4f5f3ec7f | |||
| 83f7fa43ce | |||
| 55a816bdbc | |||
| 7639fa1c15 | |||
| 93b411f258 | |||
| 326a67e18f | |||
| c089c6aea4 | |||
| 66b0ee3c4d | |||
| a6c8577eb4 | |||
| 094001a53d | |||
| deba131857 | |||
| a9bc9751a2 | |||
| 58b6728743 | |||
| 894d096d6e | |||
| a41b0aa21d | |||
| d4cc033379 | |||
| 308b9f4975 | |||
| 1d1c904126 | |||
| ca4ae5068b | |||
| 26491867a3 | |||
| dce34e926b | |||
| a0b283a60f | |||
| 671db45007 | |||
| 0c6ad643c8 | |||
| 5076b6f496 | |||
| 54c8535365 | |||
| 24f5b32469 | |||
| 85169642ca | |||
| 9f9ef6417e | |||
| fb2a6d2e61 | |||
| 8219c36488 | |||
| bd38778bef | |||
| 1e45ff2305 | |||
| 7e1cdf2d59 | |||
| 43f0474013 | |||
| a079544647 | |||
| 03ec24502d | |||
| 5c90ed9d2d | |||
| 735651df55 | |||
| bfab769065 | |||
| c060477d57 | |||
| 75f133285f | |||
| a6ec6a30a3 | |||
| 6afa419b01 | |||
| a2bf67f54c | |||
| 351e05dca9 | |||
| ae78e88eef | |||
| f049635fa5 | |||
| 4221e30bd2 | |||
| 71558f4ce3 | |||
| 4b61081353 | |||
| 4138c57631 | |||
| 0bbb122b94 | |||
| 0e274dc979 | |||
| 4dfb0dd059 | |||
| bcb53700d6 | |||
| e5f7ef23a6 | |||
| 70f89fd9c5 | |||
| 19202fd2db | |||
| aadd694a6b | |||
| fbec3a728f | |||
| 944bb49997 | |||
| 0ac6827a9b | |||
| f030ab7664 | |||
| 2a8fc1df9a | |||
| 296456f361 | |||
| f2cd2c9f03 | |||
| d125f80dee | |||
| 8e47ca8e62 | |||
| 29cf48b934 | |||
| 816fa00625 | |||
| 6ebec0bb9f | |||
| 7c50721747 | |||
| 4559cbbccc | |||
| e828e1c074 | |||
| 97a9300aa4 | |||
| fd56152202 | |||
| 58862300f9 | |||
| 1612d2f345 | |||
| 920c6d16b1 | |||
| 8aecba27d1 | |||
| fc63d72032 | |||
| eb2a9d97a2 | |||
| 9abe4165d1 | |||
| 82ab2d2d06 | |||
| bbf24d1d39 | |||
| 224cb403a7 | |||
| 1cd8fea423 | |||
| a98680cd14 | |||
| 7d423a3a0f | |||
| 033d2d9a6f | |||
| 6e2075f3df | |||
| 5d2fd7bf7e | |||
| f6742662ec | |||
| 583f66ec4e | |||
| cd23e77fd1 | |||
| 230a501d36 | |||
| 3022edd060 | |||
| 1713a88656 | |||
| 00a25db9ea | |||
| c678580621 | |||
| 44bc9cc264 | |||
| dfa92906c0 | |||
| 27dc5efd2e | |||
| 86659be668 | |||
| e314f10909 | |||
| 54a24ab6f7 | |||
| a17d131da3 | |||
| 6320bb6219 |
+16
@@ -30,6 +30,8 @@ m4/ltversion.m4
|
||||
m4/lt~obsolete.m4
|
||||
|
||||
src/wconfig.h
|
||||
WINGs/WINGs/WINGsP.h
|
||||
wrlib/wraster.h
|
||||
|
||||
# These files are generated by scripts
|
||||
INSTALL-WMAKER
|
||||
@@ -120,6 +122,20 @@ WindowMaker/Defaults/WMWindowAttributes
|
||||
WindowMaker/Defaults/WindowMaker
|
||||
WindowMaker/IconSets/Default.iconset
|
||||
|
||||
WPrefs.app/WPrefs.desktop
|
||||
|
||||
# These files are generated by the i18n process
|
||||
/po/WindowMaker.pot
|
||||
/po/*.mo
|
||||
/WINGs/po/WINGs.pot
|
||||
/WINGs/po/*.mo
|
||||
/WPrefs.app/po/WPrefs.pot
|
||||
/WPrefs.app/po/*.mo
|
||||
/util/po/*.pot
|
||||
/util/po/*.mo
|
||||
/wrlib/po/*.pot
|
||||
/wrlib/po/*.mo
|
||||
|
||||
# Some text editors generate backup files
|
||||
*~
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Changes since version 0.95.7:
|
||||
- debian: Ignore missing documentation for --runstatedir.
|
||||
- debian: Use dh_autoreconf.
|
||||
- debian: Simplify debian/rules.
|
||||
- debian: Fix typo occured. (Thanks, lintian.)
|
||||
- debian: Fix typo occurred. (Thanks, lintian.)
|
||||
- debian: wmaker manpage moved from 1x to 1.
|
||||
(Andreas Metzler <ametzler@bebt.de>)
|
||||
- debian: Add wmiv to wmaker package.
|
||||
@@ -498,7 +498,7 @@ Changes since version 0.95.6:
|
||||
- doc: Add manpage for wmiv.
|
||||
(Doug Torrance <dtorrance@monmouthcollege.edu>)
|
||||
- wmaker: replaced old email address with the official one
|
||||
- WINGs: Updated news with the API changes that occured between 0.95.6 and
|
||||
- WINGs: Updated news with the API changes that occurred between 0.95.6 and
|
||||
0.95.7
|
||||
- WINGs: ran spell checker on the NEWS file
|
||||
- WINGs: fix non-portable int conversion for printf in font panel size handling
|
||||
@@ -969,7 +969,7 @@ Changes since version 0.95.5:
|
||||
- WMaker: moved XGrab/XUngrabPointer into the conditional code
|
||||
- News: created section dedicated to the changes related to 0.95.3
|
||||
- News: added description of a change that may be interesting to users
|
||||
- News: added section to describe the changes that have occured in 0.95.4
|
||||
- News: added section to describe the changes that have occurred in 0.95.4
|
||||
- News: marked the current changes as part of 0.95.5 and describe the drawers
|
||||
feature
|
||||
- News: described the new features for future 0.95.6 release
|
||||
@@ -1103,7 +1103,7 @@ Changes since version 0.95.5:
|
||||
#50158)
|
||||
- WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity
|
||||
#50200)
|
||||
- WPrefs: add warning when renderTexture encounters some unknow settings
|
||||
- WPrefs: add warning when renderTexture encounters some unknown settings
|
||||
(Christophe CURIS <christophe.curis@free.fr>)
|
||||
- util/wmiv: add image auto orientation detection
|
||||
(David Maciejak <david.maciejak@gmail.com>)
|
||||
@@ -4063,7 +4063,7 @@ Changes since version 0.17.5:
|
||||
icons
|
||||
- fixed bug in focusfollowmouse that made windows under the currently
|
||||
focused window that close, to not get the focus
|
||||
- if the app is a .app, it will try to find it's icon in the .app
|
||||
- if the app is a .app, it will try to find its icon in the .app
|
||||
directory and save it in the WMWindowAttributes, so that the dock can use it.
|
||||
- drag docklets that select for mouse events to with Alt+drag
|
||||
|
||||
@@ -4934,7 +4934,7 @@ Changes since version 0.3.2:
|
||||
|
||||
- application icons (not mini-windows) like I think how it is on NEXTSTEP(tm)
|
||||
- fixed "slippery" icon movement
|
||||
- added a Dock (not for GNUstep, as it will have it's own)
|
||||
- added a Dock (not for GNUstep, as it will have its own)
|
||||
|
||||
Changes since version 0.3.1:
|
||||
............................
|
||||
@@ -4964,7 +4964,7 @@ it's opened to select items, just drag the pointer
|
||||
- transient owners get a different titlebar color when the focus
|
||||
is in the transient (e.g, in NeXTese: mainWindow is highlighted correctly when
|
||||
the keyWindow is a panel)
|
||||
- when transient is closed, it's owner always get the focus
|
||||
- when transient is closed, its owner always get the focus
|
||||
- fixed XGrabButton/BadAccess bug
|
||||
- fixed window_count error (this time I'm 90% sure)
|
||||
- fixed focusNextWindow through Alt-Tab bug with non-focusable windows
|
||||
|
||||
@@ -15,7 +15,7 @@ Summary of Contents:
|
||||
1.2 Where can I get Window Maker?
|
||||
1.3 Where are the mailing list archives?
|
||||
1.4 Where is more documentation on configuring Window Maker?
|
||||
1.5 What is an App Icon?
|
||||
1.5 What is an appicon?
|
||||
1.6 How can I get a question added to the FAQ?
|
||||
1.7 How do I report bugs?
|
||||
1.8 Is there an anonymous cvs server?
|
||||
@@ -134,7 +134,7 @@ Introduction:
|
||||
|
||||
1.1 What is Window Maker?
|
||||
----------------------------------
|
||||
Window Maker is an elegant X11 window manger that emulates the
|
||||
Window Maker is an elegant X11 window manager that emulates the
|
||||
OpenStep desktop with some noticeable enhancements. Look at
|
||||
http://wm.current.nu/themes/my-themes.html and
|
||||
http://wm.current.nu/themes/screenshots.html
|
||||
@@ -333,7 +333,7 @@ Window Maker distribution.
|
||||
|
||||
The author Anthony Quinn <southgat@frontiernet.net> has released a
|
||||
version that works with Window Maker >= 0.15.x. It is available from
|
||||
it's home page at http://www.frontiernet.net/~southgat/wmsound/
|
||||
its home page at http://www.frontiernet.net/~southgat/wmsound/
|
||||
or on Largo's site at http://wm.current.nu/files.html#wmsound
|
||||
for your convenience.
|
||||
|
||||
@@ -352,7 +352,7 @@ GNOME application they have no title bar" below.
|
||||
To use it with CDE, read the answer for "How do I switch
|
||||
CDE's window manager to use Window Maker?"
|
||||
|
||||
To use it with KDE, read it's documentation to get rid of kwm (and possibly
|
||||
To use it with KDE, read its documentation to get rid of kwm (and possibly
|
||||
kpanel) and replace it with wmaker. Then, start WPrefs.app, go to "Mouse
|
||||
Preferences" and set the "Disable mouse actions" check box. You will
|
||||
need to restart Window Maker to make this change take effect. The
|
||||
@@ -507,7 +507,7 @@ exec wmaker
|
||||
Things to try if it doesn't work: (somewhat fuzzy and random)
|
||||
|
||||
This should do it although I did have problems sometimes initially which I
|
||||
fixed by randomly trying absolute pathes for wmaker in .xsession/.xinitrc and/or
|
||||
fixed by randomly trying absolute paths for wmaker in .xsession/.xinitrc and/or
|
||||
making the dtprofile/.xinitrc/etc executable. It helps logging in on the console
|
||||
(select from CDE login screen) and start X manually using 'X'.
|
||||
If it works that way it should work when logging into the CDE environment.
|
||||
@@ -628,7 +628,7 @@ the last app started by .xinitrc is closed.
|
||||
the X server will be closed, and your session will end.
|
||||
|
||||
|
||||
3.3 How do I "dock" AppIcons on the Clip?
|
||||
3.3 How do I "dock" appicons on the Clip?
|
||||
-----------------------------------------
|
||||
Just drag icons near it like you would for the dock. Note that if you place
|
||||
the clip near the dock, you may have problems docking appicons in either.
|
||||
@@ -674,7 +674,7 @@ David Reviejo <dreviejo@arrakis.es> best summed up this answer:
|
||||
|
||||
|
||||
|
||||
3.7 How do I "undock" AppIcons?
|
||||
3.7 How do I "undock" appicons?
|
||||
----------------------------------
|
||||
If the program is not running, just drag the icon to the middle of your
|
||||
desktop (away from the dock and clip) and watch it disappear.
|
||||
@@ -731,7 +731,7 @@ These directories will be listed under the "Search Path" section of WPrefs.
|
||||
3.11 When I run GNOME application they have no title bar.
|
||||
----------------------------------
|
||||
|
||||
The GNOME toolkit decided to behave his own way, so it draws its own title bar
|
||||
The GNOME toolkit decided to behave in its own way, so it draws its own title bar
|
||||
with buttons, and asks Window Maker to not draw anything (title bar, resize bar,
|
||||
close and miniaturise button, ...).
|
||||
|
||||
@@ -838,7 +838,7 @@ AlwaysUserIcon=Yes;
|
||||
};
|
||||
|
||||
|
||||
4.6 How do I get a Tile background for my AppIcons (those things in
|
||||
4.6 How do I get a Tile background for my appicons (those things in
|
||||
the dock)?
|
||||
----------------------------------
|
||||
You need to change 1 line to your ~/GNUstep/Defaults/WindowMaker file.
|
||||
@@ -868,9 +868,9 @@ Application Icon'' Option then Save, Apply and close the dialog.
|
||||
|
||||
This should allow you do dock the program normally.
|
||||
|
||||
Emulate Appicon does exactly the same thing as dockit, a small app
|
||||
Emulate AppIcon does exactly the same thing as dockit, a small app
|
||||
distributed with ancient versions of Window Maker before the Attribute
|
||||
Editor existed (now deprecated for the obvious reason). If Emulate Appicon
|
||||
Editor existed (now deprecated for the obvious reason). If Emulate AppIcon
|
||||
does not work, dockit will not work either. Such applications violate the
|
||||
ICCCM (Inter-Client Communication Conventions Manual) and are considered
|
||||
badly coded for not setting the instance.class hints.
|
||||
@@ -898,7 +898,7 @@ NoAppIcon=Yes;
|
||||
|
||||
4.9 How do I set a pixmap background?
|
||||
----------------------------------
|
||||
Here is the in depth explanation straight from the NEWS file:
|
||||
Here is the in-depth explanation straight from the NEWS file:
|
||||
|
||||
wmsetbg now accepts the following options:
|
||||
usage: wmsetbg [-options] image
|
||||
@@ -1283,7 +1283,7 @@ WM_NORMAL_HINTS(WM_SIZE_HINTS):
|
||||
user specified size: 400 by 300
|
||||
program specified minimum size: 400 by 300
|
||||
|
||||
Now, when scilab opens it's window, Window Maker nicely does exactly what it
|
||||
Now, when scilab opens its window, Window Maker nicely does exactly what it
|
||||
is told, that is, map the window at position 136679205, 1074468360 which
|
||||
obviously falls outside the screen no matter how big is your monitor ;)
|
||||
|
||||
@@ -1476,7 +1476,7 @@ Themes:
|
||||
8.1 What exactly are themes?
|
||||
----------------------------------
|
||||
Themes are a great aspect of Window Maker allowing a user to simply
|
||||
save the entire 'look' of their desktop in a Archive to distribute freely among
|
||||
save the entire 'look' of their desktop in an archive to distribute freely among
|
||||
friends, fellow users and/or the whole net in general. :)
|
||||
|
||||
See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html
|
||||
|
||||
+40
-4
@@ -19,10 +19,19 @@ config-paths.h: Makefile
|
||||
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
|
||||
@echo '' >> $@
|
||||
@echo '/* where shared data is stored */' >> $@
|
||||
@echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
|
||||
@echo '#define PKGDATADIR "$(datadir)/$(PACKAGE_TARNAME)"' >> $@
|
||||
@echo '' >> $@
|
||||
@echo '/* where the global defaults are stored */' >> $@
|
||||
@echo '#define DEFSDATADIR "$(defsdatadir)"' >> $@
|
||||
@echo '#define PKGCONFDIR "$(pkgconfdir)"' >> $@
|
||||
@echo '' >> $@
|
||||
@echo '/* where the user data root is located */' >> $@
|
||||
@echo '#define GSUSER_SUBDIR "GNUstep"' >> $@
|
||||
@echo '' >> $@
|
||||
@echo '/* where the user defaults are stored */' >> $@
|
||||
@echo '#define DEFAULTS_SUBDIR "Defaults"' >> $@
|
||||
@echo '' >> $@
|
||||
@echo '/* where the user data are stored */' >> $@
|
||||
@echo '#define USERDATA_SUBDIR "Library"' >> $@
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@@ -41,11 +50,13 @@ EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \
|
||||
script/check-cmdline-options-doc.sh \
|
||||
script/check-translation-sources.sh \
|
||||
script/check-wmaker-loaddef-callbacks.sh \
|
||||
script/generate-html-from-man.sh \
|
||||
script/generate-mapfile-from-header.sh \
|
||||
script/generate-po-from-template.sh \
|
||||
script/generate-txt-from-texi.sh \
|
||||
script/nested-func-to-macro.sh \
|
||||
script/replace-ac-keywords.sh
|
||||
script/replace-ac-keywords.sh \
|
||||
script/replace-generated-content.sh
|
||||
|
||||
|
||||
.PHONY: coverage-reset coverage
|
||||
@@ -62,6 +73,10 @@ coverage:
|
||||
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Section for the I18N processing
|
||||
################################################################################
|
||||
|
||||
# make update-lang PO=<lang>
|
||||
# ==========================
|
||||
# Update the PO files against the POT file in all the translation sub-directories
|
||||
@@ -80,13 +95,34 @@ if HAVE_XGETTEXT
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) update-lang || exit $$?); \
|
||||
done
|
||||
|
||||
SUBDIRS_PO = WINGs/po po util/po WPrefs.app/po
|
||||
SUBDIRS_PO = wrlib/po WINGs/po po util/po WPrefs.app/po
|
||||
else
|
||||
@echo "Error: the program 'xgettext' was not found by configure, it is mandatory for this operation" >&2 ; exit 1
|
||||
endif
|
||||
|
||||
.PHONY: update-lang
|
||||
|
||||
################################################################################
|
||||
# Section related to generating HTML content for the website
|
||||
################################################################################
|
||||
|
||||
if WITH_WEB_REPO
|
||||
|
||||
SUBDIRS_WEB = doc
|
||||
|
||||
website:
|
||||
@for subdir in $(SUBDIRS_WEB); do \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) website || exit $$?); \
|
||||
done
|
||||
|
||||
endif
|
||||
|
||||
.PHONY: website
|
||||
|
||||
################################################################################
|
||||
# Section for the automated checks
|
||||
################################################################################
|
||||
|
||||
# Create a 'silent-rule' for our make check the same way automake does
|
||||
AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
|
||||
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
|
||||
|
||||
@@ -1,6 +1,61 @@
|
||||
NEWS for veteran Window Maker users
|
||||
-----------------------------------
|
||||
|
||||
-- 0.96.0
|
||||
|
||||
Hot Corners feature
|
||||
--------------------------
|
||||
|
||||
Screen corners can be assigned an external command to be
|
||||
executed when the mouse pointer is entering those areas.
|
||||
In WPrefs, "Hot Corner Shortcut Preferences" can be used
|
||||
for configuration or by manually adding a "HotCorners" key
|
||||
and value to "YES" in the ~/GNUstep/Defaults/WindowMaker file.
|
||||
Hot Corners feature is disabled by default.
|
||||
Actions are specified by the "HotCornerActions" and are defined
|
||||
as a four entries list ("top left action", "top right action",
|
||||
"bottom left action", "bottom right action").
|
||||
A screen corner area is a cube shape defined by the "HotCornerEdge"
|
||||
which is a number of pixels from 2 (by default) to 10.
|
||||
To lower the risk of triggering that feature accidentally a
|
||||
"HotCornerDelay" key can be used which is the time before the action
|
||||
is triggered while the pointer is in one of the screen corner.
|
||||
Default value is 250 ms.
|
||||
|
||||
|
||||
Screenshot capture feature
|
||||
--------------------------
|
||||
|
||||
In WPrefs "Keyboard Shortcut Preferences" tab, three new actions can
|
||||
be configured: "Capture a portion of the screen", "Capture a window",
|
||||
"Capture the entire screen". The file is saved in
|
||||
~/GNUstep/Library/WindowMaker/Screenshots directory under a filename
|
||||
format "screenshot_%Y-%m-%d_at_%H:%M:%S" followed by the extension.
|
||||
Which can be png or jpg based on WRaster dependencies.
|
||||
|
||||
|
||||
libXRes is now an optional dependency
|
||||
-------------------------------------
|
||||
|
||||
XRes the resource extension for the X protocol is used to find the
|
||||
underlying processes (and PIDs) responsible for displaying the windows.
|
||||
|
||||
|
||||
Support for _NET_WM_FULLSCREEN_MONITORS hint
|
||||
--------------------------------------------
|
||||
|
||||
That hint allows applications that support it to be set as fullscreen on multiple heads.
|
||||
It depends on Xinerama extension support.
|
||||
|
||||
|
||||
Keep dock on primary head
|
||||
-------------------------
|
||||
|
||||
To keep the dock on the primary head in a multi-head setup, set the option
|
||||
"KeepDockOnPrimaryHead" in ~/GNUstep/Defaults/WindowMaker to "YES" or click
|
||||
"Keep dock on primary head" under the WPrefs "Expert User Preferences" tab.
|
||||
|
||||
|
||||
-- 0.95.9
|
||||
|
||||
Configurable SwitchPanel
|
||||
@@ -1643,7 +1698,7 @@ raising/lowering there is a time threshold before raising/lowering.
|
||||
The thresholds can be changed in wconfig.h by changing one or both of
|
||||
AUTO_LOWER_DELAY and AUTO_RAISE_DELAY (expressed in milliseconds).
|
||||
For example if you set AUTO_RAISE_DELAY to 0, then the Clip will be raised as
|
||||
soon as the mouse pointer enters it's area. Setting AUTO_RAISE_DELAY to a very
|
||||
soon as the mouse pointer enters its area. Setting AUTO_RAISE_DELAY to a very
|
||||
big value, will make the Clip to practically do not auto raise unless clicked,
|
||||
but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved.
|
||||
|
||||
@@ -2572,7 +2627,7 @@ The OPEN_MENU command now supports the following syntax:
|
||||
// it in current position
|
||||
OPEN_MENU file.menu
|
||||
2. Pipe menu handling.
|
||||
// opens command and uses it's stdout to construct menu.
|
||||
// opens command and uses its stdout to construct menu.
|
||||
// Command's output must be a valid menu description.
|
||||
OPEN_MENU | command
|
||||
3. Directory handling.
|
||||
@@ -3175,7 +3230,7 @@ when they are first mapped
|
||||
titlebar gradients are in a single piece now
|
||||
|
||||
the WMDock file was merged into the WMState file. You can insert this
|
||||
file in WMState and set it's key to Dock. For example, if your WMDock
|
||||
file in WMState and set its key to Dock. For example, if your WMDock
|
||||
contains:
|
||||
|
||||
{
|
||||
|
||||
@@ -178,7 +178,7 @@ Running multiple instances of Window Maker
|
||||
|
||||
It is not a good idea to run more than one instance of Window Maker
|
||||
from the same user (so that wmaker will use the same configuration files) at the
|
||||
same time. You might get unexpected behavior when Window Maker updates it's
|
||||
same time. You might get unexpected behavior when Window Maker updates its
|
||||
configuration files.
|
||||
|
||||
If you really desire to do this, try running Window Maker with the command line
|
||||
@@ -209,7 +209,7 @@ while keeping a nice appearance and good functionality, follow the items bellow:
|
||||
- remove support for image formats you don't use
|
||||
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
|
||||
environment variable to 0. If you want to increase performance at the cost of
|
||||
memory usage, set it's value to a value like the number of different icons you
|
||||
memory usage, set its value to a value like the number of different icons you
|
||||
use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
|
||||
|
||||
|
||||
|
||||
+7
-1
@@ -1,3 +1,9 @@
|
||||
Changes since wmaker 0.96.0:
|
||||
............................
|
||||
|
||||
- added W_KeycodeToKeysym to replace XKeycodeToKeysym/XkbKeycodeToKeysym calls
|
||||
|
||||
|
||||
Changes since wmaker 0.92.0:
|
||||
............................
|
||||
|
||||
@@ -134,7 +140,7 @@ Changes since wmaker 0.64.0:
|
||||
- Moved all internal handlers (timer, idle and input) to handlers.c
|
||||
- simplified wevent.c and wutil.c.
|
||||
- fixed handling of input with poll (was broken)
|
||||
- fixed mem leak that occured when input handling was done with poll
|
||||
- fixed mem leak that occurred when input handling was done with poll
|
||||
- simpler and more straightforward event handling for timer, idle, input
|
||||
and X events (also fixed some problems the old handling logic had)
|
||||
- moved timer, idle and input handler definitions and prototypes from
|
||||
|
||||
@@ -8,7 +8,7 @@ noinst_PROGRAMS = fontl puzzle colorpick
|
||||
|
||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/WINGs/libWUtil.la \
|
||||
@XFTLIBS@ @INTLIBS@ @XLIBS@
|
||||
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||
|
||||
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WUtil.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdnoreturn.h>
|
||||
|
||||
void wAbort()
|
||||
noreturn void wAbort(void)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
@@ -40,7 +41,7 @@ void show(WMWidget * self, void *data)
|
||||
WMSetLabelText(l, buf);
|
||||
}
|
||||
|
||||
void quit(WMWidget * self, void *data)
|
||||
noreturn void quit(WMWidget * self, void *data)
|
||||
{
|
||||
(void) self;
|
||||
(void) data;
|
||||
|
||||
@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
|
||||
|
||||
lib_LTLIBRARIES = libExtraWINGs.la
|
||||
|
||||
noinst_PROGRAMS = test
|
||||
noinst_PROGRAMS = tableview
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
@@ -25,6 +25,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
|
||||
|
||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/WINGs/libWUtil.la \
|
||||
@XFTLIBS@ @INTLIBS@
|
||||
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||
|
||||
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||
tableview_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||
|
||||
@@ -19,13 +19,18 @@ static char *options[] = {
|
||||
|
||||
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
||||
{
|
||||
(void) self;
|
||||
(void) table;
|
||||
|
||||
return 20;
|
||||
}
|
||||
|
||||
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
||||
{
|
||||
(void) self;
|
||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
||||
int i;
|
||||
|
||||
if (col1[0] == 0) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
char buf[128];
|
||||
@@ -44,6 +49,8 @@ void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
||||
|
||||
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
||||
{
|
||||
(void) self;
|
||||
|
||||
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
||||
col1[row] = data;
|
||||
else
|
||||
@@ -59,6 +66,7 @@ static WMTableViewDelegate delegate = {
|
||||
|
||||
void clickedTable(WMWidget * w, void *self)
|
||||
{
|
||||
(void) w;
|
||||
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
||||
|
||||
WMEditTableViewRow(self, row);
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <WINGs/WINGsP.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "wtableview.h"
|
||||
|
||||
@@ -274,7 +276,7 @@ static void adjustScrollers(WMTableView * table)
|
||||
prop = 1.0;
|
||||
} else {
|
||||
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
||||
if (oprop == 0.0)
|
||||
if (fabs(oprop) <= DBL_EPSILON)
|
||||
oprop = 1.0;
|
||||
ovalue = WMGetScrollerValue(table->hscroll);
|
||||
|
||||
@@ -290,7 +292,7 @@ static void adjustScrollers(WMTableView * table)
|
||||
prop = 1.0;
|
||||
} else {
|
||||
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
||||
if (oprop == 0.0)
|
||||
if (fabs(oprop) <= DBL_EPSILON)
|
||||
oprop = 1.0;
|
||||
ovalue = WMGetScrollerValue(table->vscroll);
|
||||
|
||||
@@ -332,7 +334,7 @@ static void doScroll(WMWidget * self, void *data)
|
||||
case WSIncrementWheel:
|
||||
case WSIncrementLine:
|
||||
value += (float)table->rowHeight / size;
|
||||
if (value > 1.0)
|
||||
if (value > (float)1.0)
|
||||
value = 1.0;
|
||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||
repaintTable(table);
|
||||
@@ -344,7 +346,7 @@ static void doScroll(WMWidget * self, void *data)
|
||||
|
||||
case WSDecrementPage:
|
||||
value -= vpsize / size;
|
||||
if (value < 0.0)
|
||||
if (value < (float)0.0)
|
||||
value = 0.0;
|
||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||
repaintTable(table);
|
||||
@@ -352,7 +354,7 @@ static void doScroll(WMWidget * self, void *data)
|
||||
|
||||
case WSIncrementPage:
|
||||
value += vpsize / size;
|
||||
if (value > 1.0)
|
||||
if (value > (float)1.0)
|
||||
value = 1.0;
|
||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||
repaintTable(table);
|
||||
@@ -398,6 +400,7 @@ static void doScroll(WMWidget * self, void *data)
|
||||
|
||||
static void splitterHandler(XEvent * event, void *data)
|
||||
{
|
||||
(void) event;
|
||||
WMTableColumn *column = (WMTableColumn *) data;
|
||||
WMTableView *table = column->table;
|
||||
int done = 0;
|
||||
@@ -451,6 +454,8 @@ static void splitterHandler(XEvent * event, void *data)
|
||||
|
||||
static void realizeTable(void *data, WMNotification * notif)
|
||||
{
|
||||
(void) notif;
|
||||
|
||||
repaintTable(data);
|
||||
}
|
||||
|
||||
@@ -790,7 +795,6 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
|
||||
|
||||
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
||||
{
|
||||
WMScroller *scroller;
|
||||
WMRange range;
|
||||
WMRect rect;
|
||||
int newY, tmp;
|
||||
@@ -798,7 +802,6 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
||||
rect = getVisibleRect(table);
|
||||
range = rowsInRect(table, rect);
|
||||
|
||||
scroller = table->vscroll;
|
||||
|
||||
if (row < range.position) {
|
||||
newY = row * table->rowHeight - rect.size.height / 2;
|
||||
@@ -1157,6 +1160,8 @@ static void handleEvents(XEvent * event, void *data)
|
||||
|
||||
static void handleResize(W_ViewDelegate * self, WMView * view)
|
||||
{
|
||||
(void) self;
|
||||
|
||||
reorganizeInterior(view->self);
|
||||
}
|
||||
|
||||
@@ -1167,7 +1172,8 @@ static void reorganizeInterior(WMTableView * table)
|
||||
WMSize size = getTotalSize(table);
|
||||
WMView *view = table->view;
|
||||
int vw, vh;
|
||||
int hsThickness, vsThickness;
|
||||
int hsThickness = 0;
|
||||
int vsThickness = 0;
|
||||
|
||||
if (table->vscroll)
|
||||
vsThickness = WMWidgetWidth(table->vscroll);
|
||||
|
||||
+7
-6
@@ -12,7 +12,7 @@ lib_LTLIBRARIES = libWUtil.la libWINGs.la
|
||||
|
||||
|
||||
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
||||
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@ @PANGOLIBS@
|
||||
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFT_LIBS@ @FCLIBS@ @LIBM@ @PANGO_LIBS@
|
||||
libWUtil_la_LIBADD = @LIBBSD@
|
||||
|
||||
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
|
||||
@@ -87,11 +87,12 @@ libWUtil_la_SOURCES = \
|
||||
wutil.c
|
||||
|
||||
|
||||
AM_CFLAGS =
|
||||
AM_CFLAGS = @PANGO_CFLAGS@
|
||||
|
||||
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
|
||||
-I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
@XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||
-I$(top_srcdir)/WINGs/WINGs -I$(top_builddir)/WINGs/WINGs \
|
||||
-I$(top_builddir)/wrlib -I$(top_srcdir)/src \
|
||||
@XFT_CFLAGS@ @HEADER_SEARCH_PATH@
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = WINGs.pc WUtil.pc
|
||||
@@ -105,8 +106,8 @@ WINGs.pc: Makefile
|
||||
@echo 'Version: $(VERSION)' >> $@
|
||||
@echo 'Requires: wrlib WUtil' >> $@
|
||||
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
|
||||
@echo 'Libs.private: $(XFTLIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
||||
@echo 'Cflags: $(inc_search_path)' >> $@
|
||||
@echo 'Libs.private: $(XFT_LIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
||||
@echo 'Cflags: $(inc_search_path) @PANGO_CFLAGS@' >> $@
|
||||
|
||||
WUtil.pc: Makefile
|
||||
@echo "Generating $@"
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
** API and ABI modifications since wmaker 0.92.0
|
||||
** API and ABI modifications since wmaker 0.96.0
|
||||
----------------------------------------------------
|
||||
|
||||
** libWINGs **
|
||||
<WINGsP.h>
|
||||
W_KeycodeToKeysym ADDED
|
||||
struct W_DragDestinationInfo: new members added SIZE CHANGE
|
||||
|
||||
<WINGs.h>
|
||||
|
||||
+6
-6
@@ -8,25 +8,25 @@
|
||||
kojima@windowmaker.info
|
||||
|
||||
|
||||
WINGs is a small widget set with the N*XTSTEP look and feel. It's API
|
||||
is inspired in OpenStep and it's implementation borrows some ideas
|
||||
WINGs is a small widget set with the N*XTSTEP look and feel. Its API
|
||||
is inspired in OpenStep and its implementation borrows some ideas
|
||||
from Tk. It has a reasonable set of widgets, sufficient for building
|
||||
small applications (like a CDPlayer or hacking something like rxvt). It
|
||||
also has other functions that are usefull for applications, like a
|
||||
User Defaults alike configuration manager and a notification system.
|
||||
|
||||
The library is limited and it's design is a little sloppy,
|
||||
The library is limited and its design is a little sloppy,
|
||||
so it's not intended to build large or complex applications, like
|
||||
anything more complex than a CDPlayer. GNUstep should be used for such
|
||||
applications.
|
||||
|
||||
Since WINGs is written in C and is sort of low-level it is small
|
||||
and faster than say, Motif or even Athena. Knowing Xlib will help you to
|
||||
workaround some of it's limitations, although you'll probably be able to
|
||||
workaround some of its limitations, although you'll probably be able to
|
||||
write something like a trivial tic-tac-toe game without knowing much Xlib.
|
||||
|
||||
Some of it's functions are designed to support the Window Maker window
|
||||
manager (see http://windowmaker.info) In fact, it's primary role is to
|
||||
Some of its functions are designed to support the Window Maker window
|
||||
manager (see http://windowmaker.info) In fact, its primary role is to
|
||||
support Window Maker. All other uses of it are just an added bonus.
|
||||
|
||||
It will help you to understand the API if you read the ApplicationKit
|
||||
|
||||
@@ -6,7 +6,7 @@ noinst_PROGRAMS = wtest wmquery wmfile testmywidget
|
||||
|
||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/WINGs/libWUtil.la \
|
||||
@XFTLIBS@ @INTLIBS@ @XLIBS@
|
||||
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||
|
||||
|
||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||
@@ -17,4 +17,5 @@ wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFT_CFLAGS@ @HEADER_SEARCH_PATH@ \
|
||||
@PANGO_CFLAGS@
|
||||
|
||||
@@ -64,6 +64,7 @@ static W_Class myWidgetClass = 0;
|
||||
*/
|
||||
W_Class InitMyWidget(WMScreen * scr)
|
||||
{
|
||||
(void)scr;
|
||||
/* register our widget with WINGs and get our widget class ID */
|
||||
if (!myWidgetClass) {
|
||||
myWidgetClass = W_RegisterUserWidget();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "mywidget.h"
|
||||
|
||||
void wAbort()
|
||||
_Noreturn void wAbort(void)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
#include "logo.xpm"
|
||||
|
||||
void wAbort()
|
||||
_Noreturn void wAbort(void)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char *ProgName;
|
||||
|
||||
void usage(void)
|
||||
_Noreturn void usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
@@ -53,13 +53,10 @@ int main(int argc, char **argv)
|
||||
WMPixmap *pixmap;
|
||||
WMOpenPanel *oPanel;
|
||||
WMSavePanel *sPanel;
|
||||
/* RImage *image; */
|
||||
char *title = NULL;
|
||||
char *initial = "/";
|
||||
int ch;
|
||||
int panelType = OPEN_PANEL_TYPE;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
if (!dpy) {
|
||||
puts("could not open display");
|
||||
@@ -96,14 +93,14 @@ int main(int argc, char **argv)
|
||||
if (panelType == SAVE_PANEL_TYPE) {
|
||||
sPanel = WMGetSavePanel(scr);
|
||||
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
||||
/*title */ NULL, NULL) == True)
|
||||
title, NULL) == True)
|
||||
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
||||
else
|
||||
printf("\n");
|
||||
} else {
|
||||
oPanel = WMGetOpenPanel(scr);
|
||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
||||
/*title */ NULL, NULL) == True)
|
||||
title, NULL) == True)
|
||||
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
||||
else
|
||||
printf("\n");
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
#include "logo.xpm"
|
||||
|
||||
void wAbort()
|
||||
_Noreturn void wAbort(void)
|
||||
{
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char *ProgName;
|
||||
|
||||
void usage(void)
|
||||
_Noreturn void usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
@@ -45,8 +45,6 @@ int main(int argc, char **argv)
|
||||
char *initial = NULL;
|
||||
char *result = NULL;
|
||||
int ch;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
WMInitializeApplication("WMQuery", &argc, argv);
|
||||
|
||||
|
||||
+19
-3
@@ -14,7 +14,7 @@
|
||||
* This will be called when the application will be terminated because
|
||||
* of a fatal error (only for memory allocation failures ATM).
|
||||
*/
|
||||
void wAbort()
|
||||
_Noreturn void wAbort(void)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
@@ -25,6 +25,7 @@ int windowCount = 0;
|
||||
|
||||
void closeAction(WMWidget * self, void *data)
|
||||
{
|
||||
(void)data;
|
||||
WMDestroyWidget(self);
|
||||
windowCount--;
|
||||
printf("window closed, window count = %d\n", windowCount);
|
||||
@@ -165,10 +166,13 @@ void testBox(WMScreen * scr)
|
||||
|
||||
static void singleClick(WMWidget * self, void *data)
|
||||
{
|
||||
(void)self;
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void doubleClick(WMWidget * self, void *data)
|
||||
{
|
||||
(void)data;
|
||||
WMSelectAllListItems((WMList *) self);
|
||||
}
|
||||
|
||||
@@ -480,6 +484,7 @@ void testColorPanel(WMScreen * scr)
|
||||
|
||||
void sliderCallback(WMWidget * w, void *data)
|
||||
{
|
||||
(void)data;
|
||||
printf("SLIDER == %i\n", WMGetSliderValue(w));
|
||||
}
|
||||
|
||||
@@ -516,7 +521,7 @@ void testSlider(WMScreen * scr)
|
||||
void testTextField(WMScreen * scr)
|
||||
{
|
||||
WMWindow *win;
|
||||
WMTextField *field, *field2;
|
||||
WMTextField *field, *field2, *field3;
|
||||
|
||||
windowCount++;
|
||||
|
||||
@@ -535,6 +540,11 @@ void testTextField(WMScreen * scr)
|
||||
WMMoveWidget(field2, 20, 50);
|
||||
WMSetTextFieldAlignment(field2, WARight);
|
||||
|
||||
field3 = WMCreateTextField(win);
|
||||
WMResizeWidget(field3, 200, 20);
|
||||
WMMoveWidget(field3, 20, 80);
|
||||
WMSetTextFieldAlignment(field3, WACenter);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
@@ -749,6 +759,8 @@ void testTabView(WMScreen * scr)
|
||||
|
||||
void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize)
|
||||
{
|
||||
(void)sPtr;
|
||||
|
||||
switch (indView) {
|
||||
case 0:
|
||||
*minSize = 20;
|
||||
@@ -782,6 +794,7 @@ static void resizeSplitView(XEvent * event, void *data)
|
||||
|
||||
void appendSubviewButtonAction(WMWidget * self, void *data)
|
||||
{
|
||||
(void)self;
|
||||
WMSplitView *sPtr = (WMSplitView *) data;
|
||||
char buf[64];
|
||||
WMLabel *label = WMCreateLabel(sPtr);
|
||||
@@ -796,6 +809,7 @@ void appendSubviewButtonAction(WMWidget * self, void *data)
|
||||
|
||||
void removeSubviewButtonAction(WMWidget * self, void *data)
|
||||
{
|
||||
(void)self;
|
||||
WMSplitView *sPtr = (WMSplitView *) data;
|
||||
int count = WMGetSplitViewSubviewsCount(sPtr);
|
||||
|
||||
@@ -808,12 +822,14 @@ void removeSubviewButtonAction(WMWidget * self, void *data)
|
||||
|
||||
void orientationButtonAction(WMWidget * self, void *data)
|
||||
{
|
||||
(void)self;
|
||||
WMSplitView *sPtr = (WMSplitView *) data;
|
||||
WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr));
|
||||
}
|
||||
|
||||
void adjustSubviewsButtonAction(WMWidget * self, void *data)
|
||||
{
|
||||
(void)self;
|
||||
WMAdjustSplitViewSubviews((WMSplitView *) data);
|
||||
}
|
||||
|
||||
@@ -902,7 +918,7 @@ void testSplitView(WMScreen * scr)
|
||||
WMMapWidget(win);
|
||||
}
|
||||
|
||||
void testUD()
|
||||
void testUD(void)
|
||||
{
|
||||
WMUserDefaults *defs;
|
||||
char str[32];
|
||||
|
||||
+11
-1
@@ -5,4 +5,14 @@ AUTOMAKE_OPTIONS =
|
||||
# is this a kluge? if so, how should i do it?
|
||||
includedir = @includedir@/WINGs
|
||||
|
||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h
|
||||
BUILT_SOURCES = WINGsP.h
|
||||
CLEANFILES = WINGsP.h
|
||||
include_HEADERS = WINGs.h WUtil.h
|
||||
nodist_include_HEADERS = WINGsP.h
|
||||
EXTRA_DIST = WINGsP.h.in
|
||||
|
||||
WINGsP.h: WINGsP.h.in $(top_builddir)/config.h
|
||||
$(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
|
||||
--header "$(top_builddir)/config.h" \
|
||||
--filter "USE_PANGO" \
|
||||
-o $@ $<
|
||||
|
||||
+22
-16
@@ -26,7 +26,7 @@
|
||||
#include <WINGs/WUtil.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define WINGS_H_VERSION 20150508
|
||||
#define WINGS_H_VERSION 20230226
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -736,7 +736,7 @@ Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
||||
void *cdata);
|
||||
|
||||
|
||||
extern char *WMSelectionOwnerDidChangeNotification;
|
||||
extern const char *WMSelectionOwnerDidChangeNotification;
|
||||
|
||||
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
|
||||
|
||||
@@ -977,11 +977,11 @@ WMPoint WMGetViewScreenPosition(WMView *view);
|
||||
WMWidget* WMWidgetOfView(WMView *view);
|
||||
|
||||
/* notifications */
|
||||
extern char *WMViewSizeDidChangeNotification;
|
||||
extern const char *WMViewSizeDidChangeNotification;
|
||||
|
||||
extern char *WMViewFocusDidChangeNotification;
|
||||
extern const char *WMViewFocusDidChangeNotification;
|
||||
|
||||
extern char *WMViewRealizedNotification;
|
||||
extern const char *WMViewRealizedNotification;
|
||||
|
||||
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
|
||||
|
||||
@@ -1190,9 +1190,9 @@ void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
|
||||
|
||||
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
|
||||
|
||||
extern char *WMTextDidChangeNotification;
|
||||
extern char *WMTextDidBeginEditingNotification;
|
||||
extern char *WMTextDidEndEditingNotification;
|
||||
extern const char *WMTextDidChangeNotification;
|
||||
extern const char *WMTextDidBeginEditingNotification;
|
||||
extern const char *WMTextDidEndEditingNotification;
|
||||
|
||||
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
|
||||
|
||||
@@ -1212,7 +1212,7 @@ void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
|
||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||
WMScrollArrowPosition position);
|
||||
|
||||
extern char *WMScrollerDidScrollNotification;
|
||||
extern const char *WMScrollerDidScrollNotification;
|
||||
|
||||
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
|
||||
|
||||
@@ -1291,8 +1291,8 @@ Bool WMListAllowsMultipleSelection(WMList *lPtr);
|
||||
Bool WMListAllowsEmptySelection(WMList *lPtr);
|
||||
|
||||
|
||||
extern char *WMListDidScrollNotification;
|
||||
extern char *WMListSelectionDidChangeNotification;
|
||||
extern const char *WMListDidScrollNotification;
|
||||
extern const char *WMListSelectionDidChangeNotification;
|
||||
|
||||
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
|
||||
|
||||
@@ -1324,7 +1324,7 @@ void WMSortBrowserColumnWithComparer(WMBrowser *bPtr, int column,
|
||||
WMCompareDataProc *func);
|
||||
|
||||
/* Don't free the returned string. */
|
||||
char* WMSetBrowserPath(WMBrowser *bPtr, char *path);
|
||||
const char* WMSetBrowserPath(WMBrowser *bPtr, const char *path);
|
||||
|
||||
/* free the returned string */
|
||||
char* WMGetBrowserPath(WMBrowser *bPtr);
|
||||
@@ -1462,6 +1462,10 @@ void WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag);
|
||||
|
||||
Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr);
|
||||
|
||||
int WMSelectPopUpButtonPreviousItem(WMPopUpButton *bPtr);
|
||||
|
||||
int WMSelectPopUpButtonNextItem(WMPopUpButton *bPtr);
|
||||
|
||||
/* ---[ WINGs/wprogressindicator.c ]------------------------------------- */
|
||||
|
||||
WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent);
|
||||
@@ -1496,7 +1500,7 @@ void WMSetColorPanelPickerMode(WMColorPanel *panel, WMColorPanelMode mode);
|
||||
|
||||
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
|
||||
|
||||
extern char *WMColorPanelColorChangedNotification;
|
||||
extern const char *WMColorPanelColorChangedNotification;
|
||||
|
||||
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
|
||||
|
||||
@@ -1509,7 +1513,7 @@ WMColor* WMGetColorWellColor(WMColorWell *cPtr);
|
||||
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
|
||||
|
||||
|
||||
extern char *WMColorWellDidChangeNotification;
|
||||
extern const char *WMColorWellDidChangeNotification;
|
||||
|
||||
|
||||
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */
|
||||
@@ -1529,6 +1533,8 @@ void WMSetScrollViewRelief(WMScrollView *sPtr, WMReliefType type);
|
||||
|
||||
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
||||
|
||||
void WMScrollViewScrollPoint(WMScrollView * sPtr, WMPoint point);
|
||||
|
||||
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
||||
|
||||
WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr);
|
||||
@@ -1876,7 +1882,7 @@ void WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag);
|
||||
|
||||
void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag);
|
||||
|
||||
void WMSetFilePanelDirectory(WMFilePanel *panel, char *path);
|
||||
void WMSetFilePanelDirectory(WMFilePanel *panel, const char *path);
|
||||
|
||||
/* you can free the returned string */
|
||||
char* WMGetFilePanelFileName(WMFilePanel *panel);
|
||||
@@ -1884,7 +1890,7 @@ char* WMGetFilePanelFileName(WMFilePanel *panel);
|
||||
void WMFreeFilePanel(WMFilePanel *panel);
|
||||
|
||||
int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
||||
char *path, const char *name, char **fileTypes);
|
||||
const char *path, const char *name, char **fileTypes);
|
||||
|
||||
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#ifdef USE_PANGO
|
||||
#include <pango/pango.h>
|
||||
#endif
|
||||
@USE_PANGO@#include <pango/pango.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
@@ -43,7 +41,7 @@ typedef struct _WINGsConfiguration {
|
||||
unsigned mouseWheelDown;
|
||||
} _WINGsConfiguration;
|
||||
|
||||
extern char *_WINGS_progname;
|
||||
extern const char *_WINGS_progname;
|
||||
extern _WINGsConfiguration WINGsConfiguration;
|
||||
extern struct W_Application WMApplication;
|
||||
|
||||
@@ -459,9 +457,7 @@ typedef struct W_Font {
|
||||
short refCount;
|
||||
char *name;
|
||||
|
||||
#ifdef USE_PANGO
|
||||
PangoLayout *layout;
|
||||
#endif
|
||||
@USE_PANGO@ PangoLayout *layout;
|
||||
} W_Font;
|
||||
|
||||
#define W_FONTID(f) (f)->font->fid
|
||||
@@ -498,6 +494,8 @@ void W_SetPreeditPositon(W_View *view, int x, int y);
|
||||
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
||||
int buflen, KeySym *keysym, Status *status);
|
||||
|
||||
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index);
|
||||
|
||||
|
||||
/* ---[ wmisc.c ]--------------------------------------------------------- */
|
||||
|
||||
+2
-1
@@ -249,7 +249,7 @@ char* wexpandpath(const char *path);
|
||||
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
|
||||
|
||||
/* don't free the returned string */
|
||||
char* wgethomedir(void);
|
||||
const char* wgethomedir(void);
|
||||
|
||||
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
|
||||
|
||||
@@ -864,6 +864,7 @@ Bool WMWritePropListToFile(WMPropList *plist, const char *path);
|
||||
|
||||
/* don't free the returned string */
|
||||
const char* wusergnusteppath(void);
|
||||
const char* wuserdatapath(void);
|
||||
|
||||
/* Free the returned string when you no longer need it */
|
||||
char* wdefaultspathfordomain(const char *domain);
|
||||
|
||||
@@ -599,7 +599,7 @@ static void dragSourceResponseTimeOut(void *destView)
|
||||
W_DragDestinationInfoClear(info);
|
||||
}
|
||||
|
||||
void W_DragDestinationStopTimer()
|
||||
void W_DragDestinationStopTimer(void)
|
||||
{
|
||||
if (dndDestinationTimer != NULL) {
|
||||
WMDeleteTimerHandler(dndDestinationTimer);
|
||||
|
||||
+1
-1
@@ -1080,7 +1080,7 @@ static void dragSourceResponseTimeOut(void *source)
|
||||
}
|
||||
}
|
||||
|
||||
void W_DragSourceStopTimer()
|
||||
void W_DragSourceStopTimer(void)
|
||||
{
|
||||
if (dndSourceTimer != NULL) {
|
||||
WMDeleteTimerHandler(dndSourceTimer);
|
||||
|
||||
+2
-6
@@ -39,7 +39,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
char *wgethomedir()
|
||||
const char *wgethomedir(void)
|
||||
{
|
||||
static char *home = NULL;
|
||||
char *tmp;
|
||||
@@ -48,11 +48,7 @@ char *wgethomedir()
|
||||
if (home)
|
||||
return home;
|
||||
|
||||
#ifdef HAVE_SECURE_GETENV
|
||||
tmp = secure_getenv("HOME");
|
||||
#else
|
||||
tmp = getenv("HOME");
|
||||
#endif
|
||||
tmp = GETENV("HOME");
|
||||
if (tmp) {
|
||||
home = wstrdup(tmp);
|
||||
return home;
|
||||
|
||||
+2
-1
@@ -107,7 +107,8 @@ void *wmalloc(size_t size)
|
||||
}
|
||||
}
|
||||
}
|
||||
memset(tmp, 0, size);
|
||||
if (tmp != NULL)
|
||||
memset(tmp, 0, size);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -536,7 +536,7 @@ found_end_define_fname:
|
||||
while (*src != '\0') {
|
||||
idx = 0;
|
||||
if (*src == '~') {
|
||||
char *home = wgethomedir();
|
||||
const char *home = wgethomedir();
|
||||
while (*home != '\0') {
|
||||
if (idx < sizeof(buffer) - 2)
|
||||
buffer[idx++] = *home;
|
||||
@@ -612,10 +612,10 @@ static void menu_parser_condition_ifmacro(WMenuParser parser, Bool check_exists)
|
||||
macro = menu_parser_find_macro(parser, macro_name);
|
||||
parser->cond.stack[0].skip =
|
||||
((check_exists) && (macro == NULL)) ||
|
||||
((!check_exists) && (macro != NULL)) ;
|
||||
((!check_exists) && (macro != NULL));
|
||||
}
|
||||
|
||||
strcpy(parser->cond.stack[0].name, cmd_name);
|
||||
strncpy(parser->cond.stack[0].name, cmd_name, sizeof(parser->cond.stack[0].name) - 1);
|
||||
parser->cond.stack[0].line = parser->line_number;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ void menu_parser_define_macro(WMenuParser parser)
|
||||
return;
|
||||
}
|
||||
macro = wmalloc(sizeof(*macro));
|
||||
memset(arg_name, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
|
||||
|
||||
/* Isolate name of macro */
|
||||
idx = 0;
|
||||
@@ -279,7 +280,8 @@ WParserMacro *menu_parser_find_macro(WMenuParser parser, const char *name)
|
||||
continue;
|
||||
|
||||
return macro;
|
||||
check_next_macro: ;
|
||||
check_next_macro:
|
||||
;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -391,6 +393,8 @@ void menu_parser_expand_macro(WMenuParser parser, WParserMacro *macro)
|
||||
unsigned int size;
|
||||
int i, space_left;
|
||||
|
||||
memset(arg_value, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
|
||||
|
||||
/* Skip the name of the macro, this was not done by caller */
|
||||
for (i = 0; macro->name[i] != '\0'; i++)
|
||||
parser->rd++;
|
||||
@@ -692,7 +696,7 @@ static void w_create_macro(WMenuParser parser, const char *name, WParserMacroFun
|
||||
WParserMacro *macro;
|
||||
|
||||
macro = wmalloc(sizeof(*macro));
|
||||
strcpy(macro->name, name);
|
||||
strncpy(macro->name, name, sizeof(macro->name) - 1);
|
||||
macro->function = handler;
|
||||
macro->arg_count = -1;
|
||||
macro->next = parser->macros;
|
||||
|
||||
@@ -4,7 +4,7 @@ CATALOGS = @WINGSMOFILES@
|
||||
|
||||
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
||||
|
||||
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po
|
||||
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po sr.po
|
||||
|
||||
# WUtil files:
|
||||
POTFILES = \
|
||||
|
||||
@@ -9,6 +9,7 @@ sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
||||
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
||||
nl.po Dutch Alwin <translations@ziggo.nl>
|
||||
fy.po Frisian Alwin <translations@ziggo.nl>
|
||||
sr.po Serbian Strahinya Radich <sr@strahinja.org>
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
@@ -9,6 +9,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
|
||||
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
||||
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
||||
"Language: bg\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
@@ -14,6 +14,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
|
||||
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
@@ -12,6 +12,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
|
||||
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||
"Language-Team: Czech <cz@li.org>\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
@@ -15,6 +15,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
|
||||
"Last-Translator: shlomme@gmx.net\n"
|
||||
"Language-Team: German\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
@@ -10,6 +10,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
||||
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
|
||||
"Language-Team: Français <fr@li.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# Translation into Western Frisian for Window Maker
|
||||
# Copyright (C) 2015-2016 Window Maker Developers Team
|
||||
# Copyright (C) 2015-2019 Window Maker Developers Team
|
||||
# This file is distributed under the same license as the windowmaker package.
|
||||
# Original by Alwin <translations@ziggo.nl>, 2015.
|
||||
#
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2014-02-18 00:25+0100\n"
|
||||
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"Language: \n"
|
||||
"Language: hu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
+1
-7
@@ -1,5 +1,5 @@
|
||||
# New translation into Dutch for Window Maker
|
||||
# Copyright (C) 2014-2015 Window Maker Developers Team
|
||||
# Copyright (C) 2014-2019 Window Maker Developers Team
|
||||
# This file is distributed under the same license as the windowmaker package.
|
||||
# Original by Alwin <translations@ziggo.nl>, 2014.
|
||||
#
|
||||
@@ -843,9 +843,6 @@ msgstr "Kon invoerbestand \"%s\" niet openen"
|
||||
msgid "Could not create target file \"%s\""
|
||||
msgstr "Kon doelbestand \"%s\" niet aanmaken"
|
||||
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "Er trad 'n fout op bij bladeren door '%s'."
|
||||
|
||||
msgid ""
|
||||
"invalid characted '%c' in arg-list for macro \"%s\" while expecting "
|
||||
"parameter name"
|
||||
@@ -860,9 +857,6 @@ msgstr ""
|
||||
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' "
|
||||
"of ')'"
|
||||
|
||||
msgid "unknow directive '#%s'"
|
||||
msgstr "onbekende aanwijzing '#%s'"
|
||||
|
||||
msgid "found #%s but have no matching #if"
|
||||
msgstr "#%s gevonden, maar heeft geen bijbehorende #if"
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
|
||||
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
|
||||
"Language-Team: Slovak <sk@li.org>\n"
|
||||
"Language: sk\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
+806
@@ -0,0 +1,806 @@
|
||||
# Serbian messages for Window Maker
|
||||
# Copyright (C) 1997-2006 Alfredo K. Kojima
|
||||
# 1998-2006 Dan Pascu
|
||||
# 2013-2020 Window Maker Developers Team
|
||||
# This file is distributed under the same license as the Window Maker package.
|
||||
# Strahinya Radich (Страхиња Радић) <sr@strahinja.org>, 2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WindowMaker 0.96.0\n"
|
||||
"Report-Msgid-Bugs-To: wmaker-dev@googlegroups.com\n"
|
||||
"POT-Creation-Date: 2023-11-02 19:36+0100\n"
|
||||
"PO-Revision-Date: 2023-11-02 19:48+0100\n"
|
||||
"Last-Translator: Страхиња Радић <sr@strahinja.org>\n"
|
||||
"Language-Team: Serbian <sr@li.org>\n"
|
||||
"Language: sr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: poe 1.6.0-1-g10e6dcc\n"
|
||||
|
||||
#: ../../WINGs/error.c:106
|
||||
msgid "fatal: "
|
||||
msgstr "фатално: "
|
||||
|
||||
#: ../../WINGs/error.c:112
|
||||
msgid "error: "
|
||||
msgstr "грешка: "
|
||||
|
||||
#: ../../WINGs/error.c:118
|
||||
msgid "warning: "
|
||||
msgstr "упозорење: "
|
||||
|
||||
#: ../../WINGs/findfile.c:59
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "не може се добавити унос лозинке за UID %i"
|
||||
|
||||
#: ../../WINGs/findfile.c:89
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "не може се добавити унос лозинке за корисника %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:208
|
||||
#, c-format
|
||||
msgid "could not expand %s"
|
||||
msgstr "не може се проширити %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:437
|
||||
#, c-format
|
||||
msgid "Could not open input file \"%s\": %s"
|
||||
msgstr "Не може се отворити улазна датотека „%s“: %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:453
|
||||
#, c-format
|
||||
msgid "Could not create target file \"%s\": %s"
|
||||
msgstr "Не може се креирати одредишна датотека „%s“: %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:461
|
||||
msgid "could not allocate memory for the copy buffer"
|
||||
msgstr "не може се алоцирати меморија за бафер за копирање"
|
||||
|
||||
#: ../../WINGs/findfile.c:478
|
||||
#, c-format
|
||||
msgid "could not read from file \"%s\": %s"
|
||||
msgstr "не може се прочитати датотека „%s“: %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:493
|
||||
#, c-format
|
||||
msgid "could not write data to file \"%s\": %s"
|
||||
msgstr "не могу се уписати подаци у датотеку „%s“: %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:505
|
||||
#, c-format
|
||||
msgid "could not set permission 0%03o on file \"%s\": %s"
|
||||
msgstr "не може се поставити дозвола 0%03o на датотеци „%s“: %s"
|
||||
|
||||
#: ../../WINGs/findfile.c:509
|
||||
#, c-format
|
||||
msgid "could not close the file \"%s\": %s"
|
||||
msgstr "не може се затворити датотека „%s“: %s"
|
||||
|
||||
#: ../../WINGs/menuparser.c:110
|
||||
#, c-format
|
||||
msgid " included from file \"%s\" at line %d"
|
||||
msgstr " укључена из датотеке „%s“ у реду %d"
|
||||
|
||||
#: ../../WINGs/menuparser.c:142
|
||||
#, c-format
|
||||
msgid "missing #endif to match #%s at line %d"
|
||||
msgstr "недостаје #endif који би одговарао #%s у реду %d"
|
||||
|
||||
#: ../../WINGs/menuparser.c:200
|
||||
msgid "multiple SHORTCUT definition not valid"
|
||||
msgstr "вишеструка дефиниција SHORTCUT није исправна"
|
||||
|
||||
#: ../../WINGs/menuparser.c:253
|
||||
msgid "premature end of file while expecting a new line after '\\'"
|
||||
msgstr "прерани крај датотеке док се очекивао нови ред после „\\“"
|
||||
|
||||
#: ../../WINGs/menuparser.c:279
|
||||
#, c-format
|
||||
msgid "reached end of file while searching '*/' for comment started at line %d"
|
||||
msgstr "достигнут крај датотеке приликом тражења „*/“ за коментар започет у реду %d"
|
||||
|
||||
#: ../../WINGs/menuparser.c:344
|
||||
msgid "missing closing double-quote before end-of-line"
|
||||
msgstr "недостаје завршни наводник пре краја реда"
|
||||
|
||||
#: ../../WINGs/menuparser.c:362
|
||||
msgid "missing closing simple-quote before end-of-line"
|
||||
msgstr "недостаје завршни апостроф пре краја реда"
|
||||
|
||||
#: ../../WINGs/menuparser.c:380
|
||||
msgid "too many nested macro expansions, breaking loop"
|
||||
msgstr "превише угњеждених проширења макроа, прекида се петља"
|
||||
|
||||
#: ../../WINGs/menuparser.c:439
|
||||
#, c-format
|
||||
msgid "unknown directive '#%s'"
|
||||
msgstr "непозната директива „#%s“"
|
||||
|
||||
#: ../../WINGs/menuparser.c:444
|
||||
#, c-format
|
||||
msgid "extra text after '#' command is ignored: \"%.16s...\""
|
||||
msgstr "сувишни текст после наредбе „#“ је игнорисан: „%.16s...“"
|
||||
|
||||
#: ../../WINGs/menuparser.c:459
|
||||
msgid "no file name found for #include"
|
||||
msgstr "назив датотеке у #include-у није пронађен"
|
||||
|
||||
#: ../../WINGs/menuparser.c:471
|
||||
msgid "file name must be enclosed in brackets or double-quotes for #define"
|
||||
msgstr "назив датотеке у #define-у мора бити окружен угластим заградама или наводницима"
|
||||
|
||||
#: ../../WINGs/menuparser.c:485
|
||||
#, c-format
|
||||
msgid "missing closing '%c' in filename specification"
|
||||
msgstr "недостаје завршно „%c“ у задавању назива датотеке"
|
||||
|
||||
#: ../../WINGs/menuparser.c:503
|
||||
msgid "too many nested #include's"
|
||||
msgstr "превише угњеждених #include-ова"
|
||||
|
||||
#: ../../WINGs/menuparser.c:568
|
||||
#, c-format
|
||||
msgid "could not find file \"%s\" for #include"
|
||||
msgstr "не може се наћи датотека „%s“ у #include-у"
|
||||
|
||||
#: ../../WINGs/menuparser.c:589
|
||||
#, c-format
|
||||
msgid "missing macro name argument to #%s"
|
||||
msgstr "недостаје аргумент #%s - назив макроа"
|
||||
|
||||
#: ../../WINGs/menuparser.c:600
|
||||
msgid "too many nested #if sequences"
|
||||
msgstr "превише угњеждених секвенци #if"
|
||||
|
||||
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
|
||||
#, c-format
|
||||
msgid "found #%s but has no matching #if"
|
||||
msgstr "пронађено #%s, али без одговарајућег #if"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:166
|
||||
msgid "no macro name found for #define"
|
||||
msgstr "назив макроа за #define није пронађен"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:188
|
||||
#, c-format
|
||||
msgid "premature end of file while reading arg-list for macro \"%s\""
|
||||
msgstr "прерани крај датотеке приликом читања листе аргумената за макро „%s“"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:195
|
||||
#, c-format
|
||||
msgid "too many parameters for macro \"%s\" definition"
|
||||
msgstr "превише параметара за дефиницију макроа „%s“"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:210
|
||||
#, c-format
|
||||
msgid "invalid character '%c' in arg-list for macro \"%s\" while expecting parameter name"
|
||||
msgstr "неисправни знак „%c“ у листи аргумената за макро „%s“ док се очекивао назив параметра"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:221
|
||||
#, c-format
|
||||
msgid "invalid character '%c' in arg-list for macro \"%s\" while expecting ',' or ')'"
|
||||
msgstr "неисправни знак „%c“ у листи аргумената за макро „%s“ док се очекивало „,“ или „)“"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:254
|
||||
#, c-format
|
||||
msgid "macro \"%s\" already defined, ignoring redefinition"
|
||||
msgstr "макро „%s“ је већ дефинисан, игнорише се поновна дефиниција"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:348
|
||||
#, c-format
|
||||
msgid "more content than supported for the macro \"%s\""
|
||||
msgstr "више садржаја него што је подржано за макро „%s“"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:459
|
||||
#, c-format
|
||||
msgid "expansion for macro \"%s\" too big, line truncated"
|
||||
msgstr "проширење макроа „%s“ је превелико, ред је исечен"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:471
|
||||
#, c-format
|
||||
msgid "macro \"%s\" needs parenthesis for arguments"
|
||||
msgstr "макроу „%s“ су потребне заграде за аргументе"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:502
|
||||
msgid "missing closing quote or double-quote before end-of-line"
|
||||
msgstr "недостаје завршни наводник или апостроф пре краја реда"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:525
|
||||
#, c-format
|
||||
msgid "too many arguments for macro \"%s\", expected only %d"
|
||||
msgstr "превише аргумената за макро „%s“, очекује се само %d"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:534
|
||||
#, c-format
|
||||
msgid "premature end of line while searching for arguments to macro \"%s\""
|
||||
msgstr "прерани крај реда приликом тражења аргумената за макро „%s“"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:540
|
||||
#, c-format
|
||||
msgid "not enough arguments for macro \"%s\", expected %d but got only %d"
|
||||
msgstr "недовољно аргумената за макро „%s“, очекује се %d, али само постоји %d"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:545
|
||||
#, c-format
|
||||
msgid "too much data in parameter list of macro \"%s\", truncated"
|
||||
msgstr "превише података у листи параметара макроа „%s“, исечено"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:565
|
||||
#, c-format
|
||||
msgid "size of value for macro '%s' is too big, truncated"
|
||||
msgstr "величина вредности макроа „%s“ је превелика, исечено"
|
||||
|
||||
#: ../../WINGs/menuparser_macros.c:646 ../../WINGs/menuparser_macros.c:672
|
||||
#, c-format
|
||||
msgid "could not determine %s"
|
||||
msgstr "не може се одредити %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:78
|
||||
#, c-format
|
||||
msgid "syntax error in %s %s, line %i: %s"
|
||||
msgstr "синтаксна грешка у %s %s, ред %i: %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:134
|
||||
msgid "Only string or data is supported for a proplist dictionary key"
|
||||
msgstr "Само ниска или подаци су подржани у proplist речничком кључу"
|
||||
|
||||
#: ../../WINGs/proplist.c:167 ../../WINGs/proplist.c:217
|
||||
#: ../../WINGs/proplist.c:382 ../../WINGs/proplist.c:458
|
||||
#: ../../WINGs/proplist.c:1048 ../../WINGs/proplist.c:1098
|
||||
#: ../../WINGs/proplist.c:1246 ../../WINGs/proplist.c:1326
|
||||
#: ../../WINGs/proplist.c:1431 ../../WINGs/proplist.c:1475
|
||||
msgid "Used proplist functions on non-WMPropLists objects"
|
||||
msgstr "Користе се proplist функције над не-WMPropLists објектима"
|
||||
|
||||
#: ../../WINGs/proplist.c:635
|
||||
msgid "unterminated PropList string"
|
||||
msgstr "незатворена PropList ниска"
|
||||
|
||||
#: ../../WINGs/proplist.c:673
|
||||
msgid "unterminated PropList data"
|
||||
msgstr "незатворен PropList податак"
|
||||
|
||||
#: ../../WINGs/proplist.c:681
|
||||
msgid "unterminated PropList data (missing hexdigit)"
|
||||
msgstr "незатворен PropList податак (недостаје хекс-цифра)"
|
||||
|
||||
#: ../../WINGs/proplist.c:693 ../../WINGs/proplist.c:698
|
||||
msgid "non hexdigit character in PropList data"
|
||||
msgstr "знак који није хекс-цифра у PropList подацима"
|
||||
|
||||
#: ../../WINGs/proplist.c:730
|
||||
msgid "unterminated PropList array"
|
||||
msgstr "незатворен PropList низ"
|
||||
|
||||
#: ../../WINGs/proplist.c:738
|
||||
msgid "missing or unterminated PropList array"
|
||||
msgstr "недостајући или незатворени PropList низ"
|
||||
|
||||
#: ../../WINGs/proplist.c:748
|
||||
msgid "could not get PropList array element"
|
||||
msgstr "не може се добавити елемент PropList низа"
|
||||
|
||||
#: ../../WINGs/proplist.c:775
|
||||
msgid "unterminated PropList dictionary"
|
||||
msgstr "незатворени PropList речник"
|
||||
|
||||
#: ../../WINGs/proplist.c:792
|
||||
msgid "missing PropList dictionary key"
|
||||
msgstr "недостајући кључ PropList речника"
|
||||
|
||||
#: ../../WINGs/proplist.c:794
|
||||
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||
msgstr "недостаје кључ PropList речничке ставке или је речник незатворен"
|
||||
|
||||
#: ../../WINGs/proplist.c:802
|
||||
msgid "error parsing PropList dictionary key"
|
||||
msgstr "грешка приликом рашчлањивања кључа PropList речника"
|
||||
|
||||
#: ../../WINGs/proplist.c:810
|
||||
msgid "missing = in PropList dictionary entry"
|
||||
msgstr "недостаје = у ставци PropList речника"
|
||||
|
||||
#: ../../WINGs/proplist.c:818
|
||||
msgid "error parsing PropList dictionary entry value"
|
||||
msgstr "грешка приликом рашчлањивања вредности PropList речничког уноса"
|
||||
|
||||
#: ../../WINGs/proplist.c:826
|
||||
msgid "missing ; in PropList dictionary entry"
|
||||
msgstr "недостаје ; у речничком уносу PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:885
|
||||
msgid "was expecting a string, data, array or dictionary. If it's a string, try enclosing it with \"."
|
||||
msgstr "очекује се ниска, податак, низ или речник. Ако је у питању ниска, пробајте да је окружите са \"."
|
||||
|
||||
#: ../../WINGs/proplist.c:888
|
||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||
msgstr "Коментари нису дозвољени унутар датотека домена WindowMaker-а."
|
||||
|
||||
#: ../../WINGs/proplist.c:1495 ../../WINGs/proplist.c:1560
|
||||
#: ../../WINGs/proplist.c:1624
|
||||
msgid "extra data after end of property list"
|
||||
msgstr "вишак података после листе особина"
|
||||
|
||||
#: ../../WINGs/proplist.c:1535
|
||||
#, c-format
|
||||
msgid "could not get size for file '%s'"
|
||||
msgstr "не може се одредити величина датотеке „%s“"
|
||||
|
||||
#: ../../WINGs/proplist.c:1543
|
||||
#, c-format
|
||||
msgid "error reading from file '%s'"
|
||||
msgstr "грешка приликом читања датотеке „%s“"
|
||||
|
||||
#: ../../WINGs/proplist.c:1590
|
||||
#, c-format
|
||||
msgid "%s:could not open menu file"
|
||||
msgstr "%s:не може се отворити датотека менија"
|
||||
|
||||
#: ../../WINGs/proplist.c:1672
|
||||
#, c-format
|
||||
msgid "mkstemp (%s) failed"
|
||||
msgstr "mkstemp (%s) није успео"
|
||||
|
||||
#: ../../WINGs/proplist.c:1682
|
||||
#, c-format
|
||||
msgid "mktemp (%s) failed"
|
||||
msgstr "mktemp (%s) није успео"
|
||||
|
||||
#: ../../WINGs/proplist.c:1689
|
||||
#, c-format
|
||||
msgid "open (%s) failed"
|
||||
msgstr "open (%s) није успео"
|
||||
|
||||
#: ../../WINGs/proplist.c:1696
|
||||
#, c-format
|
||||
msgid "writing to file: %s failed"
|
||||
msgstr "уписивање у датотеку: %s није успело"
|
||||
|
||||
#: ../../WINGs/proplist.c:1706
|
||||
#, c-format
|
||||
msgid "fclose (%s) failed"
|
||||
msgstr "fclose (%s) није успео"
|
||||
|
||||
#: ../../WINGs/proplist.c:1714
|
||||
#, c-format
|
||||
msgid "rename ('%s' to '%s') failed"
|
||||
msgstr "rename („%s“ у „%s“) није успео"
|
||||
|
||||
#: ../../WINGs/proplist.c:1785
|
||||
#, c-format
|
||||
msgid "Could not create component %s"
|
||||
msgstr "Не може се креирати компонента %s"
|
||||
|
||||
#: ../../WINGs/userdefaults.c:68
|
||||
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
||||
msgstr "променљива WMAKER_USER_ROOT је задата са неисправном путањом, не користи се"
|
||||
|
||||
#. something happened with the file. just overwrite it
|
||||
#: ../../WINGs/userdefaults.c:208 ../../WINGs/userdefaults.c:223
|
||||
#, c-format
|
||||
msgid "cannot read domain from file '%s' when syncing"
|
||||
msgstr "не може се учитати домен из датотеке „%s“ приликом синхронизовања"
|
||||
|
||||
#: ../../WINGs/dragcommon.c:60
|
||||
#, c-format
|
||||
msgid "unknown XDND action %s"
|
||||
msgstr "непозната XDND акција %s"
|
||||
|
||||
#: ../../WINGs/dragcommon.c:142
|
||||
#, c-format
|
||||
msgid "target %lu for XDND message no longer exists"
|
||||
msgstr "одредиште %lu XDND поруке више не постоји"
|
||||
|
||||
#: ../../WINGs/dragcommon.c:220
|
||||
#, c-format
|
||||
msgid "unsupported version %i for XDND enter message"
|
||||
msgstr "неподржана верзија %i XDND улазне поруке"
|
||||
|
||||
#: ../../WINGs/dragsource.c:163
|
||||
msgid "XDND selection lost during drag operation..."
|
||||
msgstr "XDND избор је изгубљен приликом операције превлачења..."
|
||||
|
||||
#: ../../WINGs/dragsource.c:758
|
||||
msgid "could not get XDND version for target of drop"
|
||||
msgstr "не може се одредити верзија XDND-а за одредиште превлачења"
|
||||
|
||||
#: ../../WINGs/dragsource.c:774
|
||||
msgid "could not get ownership of XDND selection"
|
||||
msgstr "не може се одредити власништво над XDND избором"
|
||||
|
||||
#: ../../WINGs/dragsource.c:1070
|
||||
msgid "delay for drag destination response expired"
|
||||
msgstr "пауза за одговор одредишта превлачења је истекла"
|
||||
|
||||
#: ../../WINGs/wcolor.c:204 ../../WINGs/wcolor.c:214 ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:288
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "не може се алоцирати боја %s"
|
||||
|
||||
#: ../../WINGs/wcolor.c:204
|
||||
msgid "white"
|
||||
msgstr "бела"
|
||||
|
||||
#: ../../WINGs/wcolor.c:214
|
||||
msgid "black"
|
||||
msgstr "црна"
|
||||
|
||||
#: ../../WINGs/wcolor.c:250
|
||||
msgid "gray"
|
||||
msgstr "сива"
|
||||
|
||||
#: ../../WINGs/wcolor.c:288
|
||||
msgid "dark gray"
|
||||
msgstr "тамно сива"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:390
|
||||
msgid "Colors"
|
||||
msgstr "Боје"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:565 ../../WINGs/wcolorpanel.c:2716
|
||||
msgid "Brightness"
|
||||
msgstr "Светлина"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:567 ../../WINGs/wcolorpanel.c:641
|
||||
#: ../../WINGs/wcolorpanel.c:672 ../../WINGs/wcolorpanel.c:703
|
||||
#: ../../WINGs/wcolorpanel.c:778 ../../WINGs/wcolorpanel.c:809
|
||||
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:874
|
||||
#: ../../WINGs/wcolorpanel.c:2010 ../../WINGs/wcolorpanel.c:2718
|
||||
#: ../../WINGs/wcolorpanel.c:2752 ../../WINGs/wcolorpanel.c:2786
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Панел за боје: Неуспешно алоцирање меморије"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:639
|
||||
msgid "Red"
|
||||
msgstr "Црвена"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:670
|
||||
msgid "Green"
|
||||
msgstr "Зелена"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:701
|
||||
msgid "Blue"
|
||||
msgstr "Плава"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:715
|
||||
msgid "Decimal"
|
||||
msgstr "Децимално"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:723
|
||||
msgid "Hexadecimal"
|
||||
msgstr "Хексадекадно"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:776
|
||||
msgid "Cyan"
|
||||
msgstr "Цијан"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:807
|
||||
msgid "Magenta"
|
||||
msgstr "Магента"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:839
|
||||
msgid "Yellow"
|
||||
msgstr "Жута"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:872
|
||||
msgid "Black"
|
||||
msgstr "Црна"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:947
|
||||
msgid "Spectrum"
|
||||
msgstr "Спектар"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:973
|
||||
msgid "Palette"
|
||||
msgstr "Палета"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:978
|
||||
msgid "New from File..."
|
||||
msgstr "Нова из датотеке..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:979 ../../WINGs/wcolorpanel.c:1024
|
||||
#: ../../WINGs/wcolorpanel.c:1039
|
||||
msgid "Rename..."
|
||||
msgstr "Преименуј..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:980 ../../WINGs/wcolorpanel.c:1025
|
||||
#: ../../WINGs/wcolorpanel.c:1040 ../../WINGs/wcolorpanel.c:3176
|
||||
msgid "Remove"
|
||||
msgstr "Уклони"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:981
|
||||
msgid "Copy"
|
||||
msgstr "Копирај"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:982
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Нова из клипборда"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1001
|
||||
msgid "X11-Colors"
|
||||
msgstr "X11 боје"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1018
|
||||
msgid "Color"
|
||||
msgstr "Боја"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1023
|
||||
msgid "Add..."
|
||||
msgstr "Додај..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1033
|
||||
msgid "List"
|
||||
msgstr "Листа"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1038
|
||||
msgid "New..."
|
||||
msgstr "Нова..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1165
|
||||
#, c-format
|
||||
msgid "Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr "Панел за боје: Не може се креирати директоријум %s неопходан за чување подешавања"
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1171 ../../WINGs/wcolorpanel.c:3069
|
||||
#: ../../WINGs/wcolorpanel.c:3073
|
||||
msgid "File Error"
|
||||
msgstr "Грешка датотеке"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1172
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr "Не може се креирати директоријум са подешавањима ColorPanel"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1173 ../../WINGs/wcolorpanel.c:3070
|
||||
#: ../../WINGs/wcolorpanel.c:3075 ../../WINGs/wcolorpanel.c:3100
|
||||
#: ../../WINGs/wfilepanel.c:227 ../../WINGs/wfilepanel.c:596
|
||||
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||
#: ../../WINGs/wfilepanel.c:883 ../../WINGs/wfontpanel.c:532
|
||||
msgid "OK"
|
||||
msgstr "ОК"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1178
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Панел за боје: Не може се пронаћи датотека"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1374 ../../WINGs/wcolorpanel.c:1435
|
||||
#: ../../WINGs/wcolorpanel.c:1495
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Панел за боје: Неуспешан захтев X-а"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2750
|
||||
msgid "Saturation"
|
||||
msgstr "Засићење"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2784
|
||||
msgid "Hue"
|
||||
msgstr "Нијанса"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3008
|
||||
msgid "Open Palette"
|
||||
msgstr "Отвори палету"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3070
|
||||
msgid "Invalid file format !"
|
||||
msgstr "Неисправан формат датотеке !"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3072
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "не може се уклонити датотека %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3074
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "Не може се уклонити датотека из директоријума са подешавањима !"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3099
|
||||
msgid "Rename"
|
||||
msgstr "Преименовање"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3099
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Преименуј палету у:"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3100 ../../WINGs/wfilepanel.c:236
|
||||
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||
msgid "Cancel"
|
||||
msgstr "Поништи"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3116 ../../WINGs/wfilepanel.c:715
|
||||
msgid "Warning"
|
||||
msgstr "Упозорење"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3117
|
||||
msgid "Palette already exists !\n\nOverwrite ?"
|
||||
msgstr "Палета већ постоји !\n\nПреписати ?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3117 ../../WINGs/wcolorpanel.c:3176
|
||||
msgid "No"
|
||||
msgstr "Не"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3117 ../../WINGs/wcolorpanel.c:3176
|
||||
msgid "Yes"
|
||||
msgstr "Да"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3148
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s"
|
||||
msgstr "Палета %s се не може преименовати у %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3171
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Ово ће трајно уклонити палету "
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3173
|
||||
msgid ".\n\nAre you sure you want to remove this palette ?"
|
||||
msgstr ".\n\nДа ли сте сигурни да желите да уклоните палету ?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3195
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s"
|
||||
msgstr "Не може се уклонити палета %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3498
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Панел за боју: Боја није задата"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:216
|
||||
msgid "Name:"
|
||||
msgstr "Назив:"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:306 ../../WINGs/wfilepanel.c:364
|
||||
msgid "Open"
|
||||
msgstr "Отвори"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:322 ../../WINGs/wfilepanel.c:370
|
||||
msgid "Save"
|
||||
msgstr "Сачувај"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:506
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: не може се отворити директоријум %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:526
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: не може се stat-овати %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:596 ../../WINGs/wfilepanel.c:883
|
||||
#: ../../WINGs/wfontpanel.c:531
|
||||
msgid "Error"
|
||||
msgstr "Грешка"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:610
|
||||
msgid "Create Directory"
|
||||
msgstr "Креирање директоријума"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:611
|
||||
msgid "Enter directory name"
|
||||
msgstr "Унесите назив директоријума"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:639
|
||||
#, c-format
|
||||
msgid "Can not create %s: %s"
|
||||
msgstr "Не може се креирати %s: %s"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:705
|
||||
#, c-format
|
||||
msgid "Can not find %s: %s"
|
||||
msgstr "Не може се наћи %s: %s"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:711
|
||||
#, c-format
|
||||
msgid "Delete %s %s?"
|
||||
msgstr "Обрисати %s %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:712
|
||||
msgid "directory"
|
||||
msgstr "директоријум"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:712
|
||||
msgid "file"
|
||||
msgstr "датотеку"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:719
|
||||
#, c-format
|
||||
msgid "Removing %s failed: %s"
|
||||
msgstr "Уклањање %s није успело: %s"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:751
|
||||
#, c-format
|
||||
msgid "An error occurred browsing '%s'."
|
||||
msgstr "Догодила се грешка приликом прегледања „%s“."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:754
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "„%s“ није директоријум."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:883
|
||||
msgid "File does not exist."
|
||||
msgstr "Датотека не постоји."
|
||||
|
||||
#: ../../WINGs/wfont.c:43
|
||||
#, c-format
|
||||
msgid "invalid font: %s. Trying '%s'"
|
||||
msgstr "неисправан фонт: %s. Проба се „%s“"
|
||||
|
||||
#: ../../WINGs/wfont.c:270 ../../WINGs/wfont.c:288
|
||||
#, c-format
|
||||
msgid "could not load font: %s."
|
||||
msgstr "не може се учитати фонт: %s."
|
||||
|
||||
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
|
||||
#: ../../WINGs/wfontpanel.c:184
|
||||
msgid "Font Panel"
|
||||
msgstr "Панел за фонт"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:220
|
||||
msgid "The quick brown fox jumps over the lazy dog"
|
||||
msgstr "Одбациће кавгаџија плаштом чађ у жељезни фењер"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:226
|
||||
msgid "Family"
|
||||
msgstr "Фамилија"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:237
|
||||
msgid "Typeface"
|
||||
msgstr "Словни лик"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:248
|
||||
msgid "Size"
|
||||
msgstr "Величина"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:267
|
||||
msgid "Set"
|
||||
msgstr "Постави"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:273
|
||||
msgid "Revert"
|
||||
msgstr "Врати"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:532
|
||||
msgid "Could not init font config library\n"
|
||||
msgstr "Не може се иницијализовати библиотека font config\n"
|
||||
|
||||
#: ../../WINGs/widgets.c:447
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: не може се учитати датотека са сликама виџета: %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:543
|
||||
#, c-format
|
||||
msgid "WINGs: could not open display %s"
|
||||
msgstr "WINGs: не може се отворити приказ %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:772
|
||||
msgid "could not load any fonts. Make sure your font installation and locale settings are correct."
|
||||
msgstr "не може се учитати ниједан фонт. Проверите да ли су фонтови исправно инсталирани и да али су подешавања језика исправна."
|
||||
|
||||
#: ../../WINGs/winputmethod.c:65
|
||||
msgid "could not add destroy callback for XIM input method"
|
||||
msgstr "не може се додати destroy callback за XIM метод уноса"
|
||||
|
||||
#: ../../WINGs/wruler.c:175
|
||||
msgid "0 inches"
|
||||
msgstr "0 инча"
|
||||
|
||||
#: ../../WINGs/wtextfield.c:494
|
||||
msgid "only left alignment is supported in textfields"
|
||||
msgstr "у текстуалним пољима је подржано само лево уравнање"
|
||||
|
||||
#: ../../WINGs/wwindow.c:160
|
||||
msgid "window title conversion error... using STRING encoding"
|
||||
msgstr "грешка приликом конверзије наслова прозора... користи се STRING кодирање"
|
||||
|
||||
#: ../../WINGs/wwindow.c:181
|
||||
msgid "icon title conversion error... using STRING encoding"
|
||||
msgstr "грешка приликом конверзије наслова иконе... користи се STRING кодирање"
|
||||
+20
-7
@@ -1695,6 +1695,7 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
||||
if (fprintf(theFile, "%s\n", desc) != strlen(desc) + 1) {
|
||||
werror(_("writing to file: %s failed"), thePath);
|
||||
wfree(desc);
|
||||
fclose(theFile);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
@@ -1823,7 +1824,7 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
|
||||
/*
|
||||
* remove a directory hierarchy
|
||||
*
|
||||
* refuses to remove anything outside $WMAKER_USER_ROOT
|
||||
* refuses to remove anything outside $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library
|
||||
*
|
||||
* returns 1 on success, 0 on failure
|
||||
*
|
||||
@@ -1833,15 +1834,27 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
|
||||
*/
|
||||
int wrmdirhier(const char *path)
|
||||
{
|
||||
const char *libpath;
|
||||
char *udefpath = NULL;
|
||||
struct stat st;
|
||||
int error;
|
||||
const char *t;
|
||||
|
||||
/* Only remove directories under $WMAKER_USER_ROOT */
|
||||
if ((t = wusergnusteppath()) == NULL)
|
||||
return EPERM;
|
||||
if (strncmp(path, t, strlen(t)) != 0)
|
||||
return EPERM;
|
||||
/* Only remove directories under $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library */
|
||||
libpath = wuserdatapath();
|
||||
if (strncmp(path, libpath, strlen(libpath)) == 0)
|
||||
if (path[strlen(libpath)] == '/')
|
||||
goto path_in_valid_tree;
|
||||
|
||||
udefpath = wdefaultspathfordomain("");
|
||||
if (strncmp(path, udefpath, strlen(udefpath)) == 0)
|
||||
/* Note: by side effect, 'udefpath' already contains a final '/' */
|
||||
goto path_in_valid_tree;
|
||||
|
||||
wfree(udefpath);
|
||||
return EPERM;
|
||||
|
||||
path_in_valid_tree:
|
||||
wfree(udefpath);
|
||||
|
||||
/* Shortcut if it doesn't exist to begin with */
|
||||
if (stat(path, &st) == -1)
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
#define MAX_PROPERTY_SIZE 8*1024
|
||||
|
||||
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
||||
const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
||||
|
||||
typedef struct SelectionHandler {
|
||||
WMView *view;
|
||||
|
||||
+5
-7
@@ -204,7 +204,7 @@ char *wstrndup(const char *str, size_t len)
|
||||
char *wstrconcat(const char *str1, const char *str2)
|
||||
{
|
||||
char *str;
|
||||
size_t slen;
|
||||
size_t slen, slen1;
|
||||
|
||||
if (!str1 && str2)
|
||||
return wstrdup(str2);
|
||||
@@ -213,13 +213,11 @@ char *wstrconcat(const char *str1, const char *str2)
|
||||
else if (!str1 && !str2)
|
||||
return NULL;
|
||||
|
||||
slen = strlen(str1) + strlen(str2) + 1;
|
||||
slen1 = strlen(str1);
|
||||
slen = slen1 + strlen(str2) + 1;
|
||||
str = wmalloc(slen);
|
||||
if (wstrlcpy(str, str1, slen) >= slen ||
|
||||
wstrlcat(str, str2, slen) >= slen) {
|
||||
wfree(str);
|
||||
return NULL;
|
||||
}
|
||||
strcpy(str, str1);
|
||||
strcpy(str + slen1, str2);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
+21
-20
@@ -40,29 +40,25 @@ char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification
|
||||
|
||||
static void synchronizeUserDefaults(void *foo);
|
||||
|
||||
#define DEFAULTS_DIR "/Defaults"
|
||||
#ifndef HAVE_INOTIFY
|
||||
/* Check defaults database for changes every this many milliseconds */
|
||||
/* XXX: this is shared with src/ stuff, put it in some common header */
|
||||
#define UD_SYNC_INTERVAL 2000
|
||||
#endif
|
||||
|
||||
const char *wusergnusteppath()
|
||||
const char *wusergnusteppath(void)
|
||||
{
|
||||
static const char subdir[] = "/GNUstep";
|
||||
static const char subdir[] = "/" GSUSER_SUBDIR;
|
||||
static char *path = NULL;
|
||||
char *gspath, *h;
|
||||
char *gspath;
|
||||
const char *h;
|
||||
int pathlen;
|
||||
|
||||
if (path)
|
||||
/* Value have been already computed, re-use it */
|
||||
return path;
|
||||
|
||||
#ifdef HAVE_SECURE_GETENV
|
||||
gspath = secure_getenv("WMAKER_USER_ROOT");
|
||||
#else
|
||||
gspath = getenv("WMAKER_USER_ROOT");
|
||||
#endif
|
||||
gspath = GETENV("WMAKER_USER_ROOT");
|
||||
if (gspath) {
|
||||
gspath = wexpandpath(gspath);
|
||||
if (gspath) {
|
||||
@@ -84,6 +80,19 @@ const char *wusergnusteppath()
|
||||
return path;
|
||||
}
|
||||
|
||||
const char *wuserdatapath(void)
|
||||
{
|
||||
static char *path = NULL;
|
||||
|
||||
if (path)
|
||||
/* Value have been already computed, re-use it */
|
||||
return path;
|
||||
|
||||
path = wstrconcat(wusergnusteppath(), "/" USERDATA_SUBDIR);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
char *wdefaultspathfordomain(const char *domain)
|
||||
{
|
||||
char *path;
|
||||
@@ -91,12 +100,11 @@ char *wdefaultspathfordomain(const char *domain)
|
||||
size_t slen;
|
||||
|
||||
gspath = wusergnusteppath();
|
||||
slen = strlen(gspath) + strlen(DEFAULTS_DIR) + strlen(domain) + 4;
|
||||
slen = strlen(gspath) + strlen("/" DEFAULTS_SUBDIR "/") + strlen(domain) + 1;
|
||||
path = wmalloc(slen);
|
||||
|
||||
strcpy(path, gspath);
|
||||
strcat(path, DEFAULTS_DIR);
|
||||
strcat(path, "/");
|
||||
strcat(path, "/" DEFAULTS_SUBDIR "/");
|
||||
strcat(path, domain);
|
||||
|
||||
return path;
|
||||
@@ -105,14 +113,7 @@ char *wdefaultspathfordomain(const char *domain)
|
||||
/* XXX: doesn't quite belong to *user*defaults.c */
|
||||
char *wglobaldefaultspathfordomain(const char *domain)
|
||||
{
|
||||
char *t = NULL;
|
||||
size_t len;
|
||||
|
||||
len = strlen(DEFSDATADIR) + strlen(domain) + 2;
|
||||
t = wmalloc(len);
|
||||
snprintf(t, len, "%s/%s", DEFSDATADIR, domain);
|
||||
|
||||
return t;
|
||||
return wstrconcat(PKGCONFDIR "/", domain);
|
||||
}
|
||||
|
||||
void w_save_defaults_changes(void)
|
||||
|
||||
+31
-21
@@ -9,7 +9,7 @@
|
||||
|
||||
struct W_Application WMApplication;
|
||||
|
||||
char *_WINGS_progname = NULL;
|
||||
const char *_WINGS_progname = NULL;
|
||||
|
||||
Bool W_ApplicationInitialized(void)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ void WMSetResourcePath(const char *path)
|
||||
WMApplication.resourcePath = wstrdup(path);
|
||||
}
|
||||
|
||||
char *WMGetApplicationName()
|
||||
char *WMGetApplicationName(void)
|
||||
{
|
||||
return WMApplication.applicationName;
|
||||
}
|
||||
@@ -131,7 +131,9 @@ error:
|
||||
|
||||
char *WMPathForResourceOfType(const char *resource, const char *ext)
|
||||
{
|
||||
const char *gslocapps, *gssysapps, *gsuserapps;
|
||||
char *path, *appdir;
|
||||
char buffer[PATH_MAX];
|
||||
size_t slen;
|
||||
|
||||
path = appdir = NULL;
|
||||
@@ -141,11 +143,11 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
|
||||
* - resourcePath/ext
|
||||
* - dirname(argv[0])/ext
|
||||
* - WMAKER_USER_ROOT/Applications/ApplicationName.app/ext
|
||||
* - ~/GNUstep/Applications/ApplicationName.app/ext
|
||||
* - GNUSTEP_LOCAL_ROOT/Applications/ApplicationName.app/ext
|
||||
* - /usr/local/GNUstep/Applications/ApplicationName.app/ext
|
||||
* - GNUSTEP_SYSTEM_ROOT/Applications/ApplicationName.app/ext
|
||||
* - /usr/GNUstep/Applications/ApplicationName.app/ext
|
||||
* - GNUSTEP_USER_APPS/ApplicationName.app/ext
|
||||
* - GNUSTEP_LOCAL_APPS/ApplicationName.app/ext
|
||||
* - /usr/local/lib/GNUstep/Applications/ApplicationName.app/ext
|
||||
* - GNUSTEP_SYSTEM_APPS/ApplicationName.app/ext
|
||||
* - /usr/lib/GNUstep/Applications/ApplicationName.app/ext
|
||||
*/
|
||||
|
||||
if (WMApplication.resourcePath) {
|
||||
@@ -170,32 +172,40 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
|
||||
}
|
||||
}
|
||||
|
||||
slen = strlen(WMApplication.applicationName) + sizeof("Applications/.app");
|
||||
snprintf(buffer, sizeof(buffer), "Applications/%s.app", WMApplication.applicationName);
|
||||
path = checkFile(GETENV("WMAKER_USER_ROOT"), buffer, ext, resource);
|
||||
if (path)
|
||||
goto out;
|
||||
|
||||
slen = strlen(WMApplication.applicationName) + sizeof("/.app");
|
||||
appdir = wmalloc(slen);
|
||||
if (snprintf(appdir, slen, "Applications/%s.app", WMApplication.applicationName) >= slen)
|
||||
if (snprintf(appdir, slen, "/%s.app", WMApplication.applicationName) >= slen)
|
||||
goto out;
|
||||
|
||||
path = checkFile(getenv("WMAKER_USER_ROOT"), appdir, ext, resource);
|
||||
gsuserapps = GETENV("GNUSTEP_USER_APPS");
|
||||
if (!gsuserapps) {
|
||||
snprintf(buffer, sizeof(buffer), "%s/Applications", wusergnusteppath());
|
||||
gsuserapps = buffer;
|
||||
}
|
||||
path = checkFile(gsuserapps, appdir, ext, resource);
|
||||
if (path)
|
||||
goto out;
|
||||
|
||||
path = checkFile(wusergnusteppath(), appdir, ext, resource);
|
||||
gslocapps = GETENV("GNUSTEP_LOCAL_APPS");
|
||||
if (!gslocapps)
|
||||
gslocapps = "/usr/local/lib/GNUstep/Applications";
|
||||
path = checkFile(gslocapps, appdir, ext, resource);
|
||||
if (path)
|
||||
goto out;
|
||||
|
||||
path = checkFile(getenv("GNUSTEP_LOCAL_ROOT"), appdir, ext, resource);
|
||||
gssysapps = GETENV("GNUSTEP_SYSTEM_APPS");
|
||||
if (!gssysapps)
|
||||
gssysapps = "/usr/lib/GNUstep/Applications";
|
||||
path = checkFile(gssysapps, appdir, ext, resource);
|
||||
if (path)
|
||||
goto out;
|
||||
|
||||
path = checkFile("/usr/local/GNUstep", appdir, ext, resource);
|
||||
if (path)
|
||||
goto out;
|
||||
|
||||
path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);
|
||||
if (path)
|
||||
goto out;
|
||||
|
||||
path = checkFile("/usr/GNUstep", appdir, ext, resource); /* falls through */
|
||||
path = checkFile("/usr/GNUstep/System/Applications", appdir, ext, resource); /* falls through */
|
||||
|
||||
out:
|
||||
if (appdir)
|
||||
|
||||
+3
-2
@@ -619,11 +619,12 @@ void WMSetBrowserHasScroller(WMBrowser * bPtr, int hasScroller)
|
||||
bPtr->flags.hasScroller = hasScroller;
|
||||
}
|
||||
|
||||
char *WMSetBrowserPath(WMBrowser * bPtr, char *path)
|
||||
const char *WMSetBrowserPath(WMBrowser * bPtr, const char *path)
|
||||
{
|
||||
int i;
|
||||
char *str;
|
||||
char *tmp, *retPtr = NULL;
|
||||
char *tmp;
|
||||
const char *retPtr = NULL;
|
||||
int item;
|
||||
WMListItem *listItem;
|
||||
|
||||
|
||||
+3
-3
@@ -51,7 +51,7 @@ static WMColor *findCloseColor(WMScreen * scr, unsigned short red, unsigned shor
|
||||
color->refCount = 1;
|
||||
color->color = xcolor;
|
||||
color->alpha = alpha;
|
||||
color->flags.exact = 1;
|
||||
color->flags.exact = 0;
|
||||
color->gc = NULL;
|
||||
|
||||
return color;
|
||||
@@ -91,7 +91,7 @@ WMColor *WMCreateRGBColor(WMScreen * scr, unsigned short red, unsigned short gre
|
||||
color = findCloseColor(scr, red, green, blue, 0xffff);
|
||||
}
|
||||
if (!color)
|
||||
color = WMBlackColor(scr);
|
||||
color = scr->black;
|
||||
|
||||
return color;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ WMColor *WMCreateRGBAColor(WMScreen * scr, unsigned short red, unsigned short gr
|
||||
color = findCloseColor(scr, red, green, blue, alpha);
|
||||
}
|
||||
if (!color)
|
||||
color = WMBlackColor(scr);
|
||||
color = scr->black;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
+27
-26
@@ -44,7 +44,7 @@
|
||||
# include <X11/extensions/shape.h>
|
||||
#endif
|
||||
|
||||
char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
|
||||
const char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
|
||||
|
||||
/*
|
||||
* Bitmaps for magnifying glass cursor
|
||||
@@ -394,7 +394,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
|
||||
panel->mode = WMWheelModeColorPanel;
|
||||
panel->lastChanged = 0;
|
||||
panel->slidersmode = WMRGBModeColorPanel;
|
||||
panel->configurationPath = wstrconcat(wusergnusteppath(), "/Library/Colors/");
|
||||
panel->configurationPath = wstrconcat(wuserdatapath(), "/Colors/");
|
||||
|
||||
/* Some General Purpose Widgets */
|
||||
panel->colorWell = WMCreateColorWell(panel->win);
|
||||
@@ -1159,21 +1159,18 @@ static void readConfiguration(W_ColorPanel * panel)
|
||||
|
||||
DIR *dPtr;
|
||||
struct dirent *dp;
|
||||
struct stat stat_buf;
|
||||
int item;
|
||||
|
||||
if (stat(panel->configurationPath, &stat_buf) != 0) {
|
||||
if (mkdir(panel->configurationPath, S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) != 0) {
|
||||
werror(_("Color Panel: Could not create directory %s needed"
|
||||
" to store configurations"), panel->configurationPath);
|
||||
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||
_("File Error"),
|
||||
_("Could not create ColorPanel configuration directory"),
|
||||
_("OK"), NULL, NULL);
|
||||
}
|
||||
if (!wmkdirhier(panel->configurationPath)) {
|
||||
werror(_("Color Panel: Could not create directory %s needed"
|
||||
" to store configurations"), panel->configurationPath);
|
||||
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||
_("File Error"),
|
||||
_("Could not create ColorPanel configuration directory"),
|
||||
_("OK"), NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2262,7 +2259,7 @@ static void wheelPositionSelectionOutBounds(W_ColorPanel * panel, int x, int y)
|
||||
|
||||
static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel)
|
||||
{
|
||||
CPColor from;
|
||||
CPColor from = {};
|
||||
unsigned long ofs;
|
||||
|
||||
ofs = panel->coly * panel->wheelMtrx->width + panel->colx;
|
||||
@@ -2607,7 +2604,7 @@ static void cmykTextFieldCallback(void *observerData, WMNotification * notificat
|
||||
|
||||
static void hsbSliderCallback(WMWidget * w, void *data)
|
||||
{
|
||||
CPColor cpColor;
|
||||
CPColor cpColor = {};
|
||||
int value[3];
|
||||
char tmp[4];
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
@@ -2643,9 +2640,9 @@ static void hsbSliderCallback(WMWidget * w, void *data)
|
||||
|
||||
static void hsbTextFieldCallback(void *observerData, WMNotification * notification)
|
||||
{
|
||||
CPColor cpColor;
|
||||
CPColor cpColor = {};
|
||||
int value[3];
|
||||
char tmp[4];
|
||||
char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */
|
||||
int n;
|
||||
W_ColorPanel *panel = (W_ColorPanel *) observerData;
|
||||
|
||||
@@ -3504,13 +3501,17 @@ static void convertCPColor(CPColor * color)
|
||||
old_hue = color->hsv.hue;
|
||||
RRGBtoHSV(&(color->rgb), &(color->hsv));
|
||||
|
||||
/* In black the hue is undefined, and may change by conversion
|
||||
* Same for white. */
|
||||
if (((color->rgb.red == 0) &&
|
||||
(color->rgb.green == 0) &&
|
||||
(color->rgb.blue == 0)) ||
|
||||
((color->rgb.red == 0) && (color->rgb.green == 0) && (color->rgb.blue == 255))
|
||||
)
|
||||
/*
|
||||
* For pure grey colors, the Hue is generally calculated
|
||||
* as 0, but in reality the Hue does not matter.
|
||||
*
|
||||
* But in an interactive GUI it is interresting to remember
|
||||
* the previous Hue because if user moves away from perfect
|
||||
* grey then he could be interrested in finding back his
|
||||
* previous tint
|
||||
*/
|
||||
if ((color->rgb.red == color->rgb.green) &&
|
||||
(color->rgb.red == color->rgb.blue) )
|
||||
color->hsv.hue = old_hue;
|
||||
break;
|
||||
case cpHSV:
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
|
||||
#define XDND_COLOR_DATA_TYPE "application/X-color"
|
||||
|
||||
char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
|
||||
const char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
|
||||
|
||||
typedef struct W_ColorWell {
|
||||
W_Class widgetClass;
|
||||
@@ -173,10 +173,10 @@ WMColorWell *WMCreateColorWell(WMWidget * parent)
|
||||
|
||||
void WMSetColorWellColor(WMColorWell * cPtr, WMColor * color)
|
||||
{
|
||||
if (cPtr->color)
|
||||
if (cPtr->color && cPtr->color != color) {
|
||||
WMReleaseColor(cPtr->color);
|
||||
|
||||
cPtr->color = WMRetainColor(color);
|
||||
cPtr->color = WMRetainColor(color);
|
||||
}
|
||||
|
||||
if (cPtr->colorView->flags.realized && cPtr->colorView->flags.mapped)
|
||||
paintColorWell(cPtr);
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
# define _(text) (text)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SECURE_GETENV
|
||||
#define GETENV(x) secure_getenv((x))
|
||||
#else
|
||||
#define GETENV(x) getenv((x))
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WINGS_CONFIG_H_ */
|
||||
|
||||
|
||||
+4
-4
@@ -343,7 +343,7 @@ void WMFreeFilePanel(WMFilePanel * panel)
|
||||
}
|
||||
|
||||
int
|
||||
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *path, const char *name, char **fileTypes)
|
||||
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, const char *path, const char *name, char **fileTypes)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
|
||||
@@ -387,12 +387,12 @@ WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *pat
|
||||
return (panel->flags.canceled ? False : True);
|
||||
}
|
||||
|
||||
void WMSetFilePanelDirectory(WMFilePanel * panel, char *path)
|
||||
void WMSetFilePanelDirectory(WMFilePanel * panel, const char *path)
|
||||
{
|
||||
WMList *list;
|
||||
WMListItem *item;
|
||||
int col;
|
||||
char *rest;
|
||||
const char *rest;
|
||||
|
||||
rest = WMSetBrowserPath(panel->browser, path);
|
||||
if (strcmp(path, "/") == 0)
|
||||
@@ -761,7 +761,7 @@ static void goFloppy(WMWidget *widget, void *p_panel)
|
||||
static void goHome(WMWidget *widget, void *p_panel)
|
||||
{
|
||||
WMFilePanel *panel = p_panel;
|
||||
char *home;
|
||||
const char *home;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) widget;
|
||||
|
||||
+37
-33
@@ -70,37 +70,30 @@ static Bool hasProperty(FcPattern * pattern, const char *property)
|
||||
return False;
|
||||
}
|
||||
|
||||
static Bool hasPropertyWithStringValue(FcPattern * pattern, const char *object, const char *value)
|
||||
{
|
||||
FcChar8 *str;
|
||||
int id;
|
||||
|
||||
if (!value || value[0] == 0)
|
||||
return True;
|
||||
|
||||
id = 0;
|
||||
while (FcPatternGetString(pattern, object, id, &str) == FcResultMatch) {
|
||||
if (strcasecmp(value, (char *)str) == 0) {
|
||||
return True;
|
||||
}
|
||||
id++;
|
||||
}
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
||||
{
|
||||
FcPattern *pattern;
|
||||
FcPattern *pattern = NULL;
|
||||
char *result;
|
||||
|
||||
if (font[0] == '-') {
|
||||
if (font && font[0] == '-') {
|
||||
pattern = xlfdToFcPattern(font);
|
||||
} else {
|
||||
pattern = FcNameParse((const FcChar8 *) font);
|
||||
}
|
||||
|
||||
/*FcPatternPrint(pattern); */
|
||||
if (!pattern) {
|
||||
wwarning(_("could not load font spec: %s."), font);
|
||||
if (!fallback)
|
||||
return NULL;
|
||||
pattern = FcPatternCreate();
|
||||
if (!pattern)
|
||||
return NULL;
|
||||
if (!FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) fallback)) {
|
||||
wfatal(_("could not load default font spec: %s."), fallback);
|
||||
FcPatternDestroy(pattern);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (size > 0) {
|
||||
FcPatternDel(pattern, FC_PIXEL_SIZE);
|
||||
@@ -109,12 +102,6 @@ static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
||||
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)DEFAULT_SIZE);
|
||||
}
|
||||
|
||||
if (fallback && !hasPropertyWithStringValue(pattern, FC_FAMILY, fallback)) {
|
||||
FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) fallback);
|
||||
}
|
||||
|
||||
/*FcPatternPrint(pattern); */
|
||||
|
||||
result = (char *)FcNameUnparse(pattern);
|
||||
FcPatternDestroy(pattern);
|
||||
|
||||
@@ -135,7 +122,7 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
|
||||
double size;
|
||||
#endif
|
||||
|
||||
if (fontName[0] == '-') {
|
||||
if (fontName && fontName[0] == '-') {
|
||||
fname = xlfdToFcName(fontName);
|
||||
} else {
|
||||
fname = wstrdup(fontName);
|
||||
@@ -187,6 +174,10 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
|
||||
pango_layout_set_font_description(layout, description);
|
||||
|
||||
font->layout = layout;
|
||||
|
||||
pango_font_description_free(description);
|
||||
g_object_unref(context);
|
||||
FcPatternDestroy(pattern);
|
||||
#endif
|
||||
|
||||
assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL);
|
||||
@@ -210,6 +201,11 @@ void WMReleaseFont(WMFont * font)
|
||||
font->refCount--;
|
||||
if (font->refCount < 1) {
|
||||
XftFontClose(font->screen->display, font->font);
|
||||
#ifdef USE_PANGO
|
||||
if (font->layout) {
|
||||
g_object_unref(font->layout);
|
||||
}
|
||||
#endif
|
||||
if (font->name) {
|
||||
WMHashRemove(font->screen->fontCache, font->name);
|
||||
wfree(font->name);
|
||||
@@ -262,7 +258,11 @@ WMFont *WMSystemFontOfSize(WMScreen * scrPtr, int size)
|
||||
WMFont *font;
|
||||
char *fontSpec;
|
||||
|
||||
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, NULL);
|
||||
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, DEFAULT_FONT);
|
||||
|
||||
if (!fontSpec) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
font = WMCreateFont(scrPtr, fontSpec);
|
||||
|
||||
@@ -280,7 +280,11 @@ WMFont *WMBoldSystemFontOfSize(WMScreen * scrPtr, int size)
|
||||
WMFont *font;
|
||||
char *fontSpec;
|
||||
|
||||
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, NULL);
|
||||
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, DEFAULT_FONT);
|
||||
|
||||
if (!fontSpec) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
font = WMCreateFont(scrPtr, fontSpec);
|
||||
|
||||
@@ -336,7 +340,7 @@ void WMDrawString(WMScreen * scr, Drawable d, WMColor * color, WMFont * font, in
|
||||
|
||||
#ifdef USE_PANGO
|
||||
previous_text = pango_layout_get_text(font->layout);
|
||||
if ((previous_text == NULL) || (strcmp(text, previous_text) != 0))
|
||||
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
||||
pango_layout_set_text(font->layout, text, length);
|
||||
pango_xft_render_layout(scr->xftdraw, &xftcolor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
||||
#else
|
||||
@@ -374,7 +378,7 @@ WMDrawImageString(WMScreen * scr, Drawable d, WMColor * color, WMColor * backgro
|
||||
|
||||
#ifdef USE_PANGO
|
||||
previous_text = pango_layout_get_text(font->layout);
|
||||
if ((previous_text == NULL) || (strcmp(text, previous_text) != 0))
|
||||
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
||||
pango_layout_set_text(font->layout, text, length);
|
||||
pango_xft_render_layout(scr->xftdraw, &textColor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
||||
#else
|
||||
|
||||
@@ -253,6 +253,9 @@ WMFrame *WMCreateFrame(WMWidget * parent)
|
||||
|
||||
static void destroyFrame(Frame * fPtr)
|
||||
{
|
||||
if (fPtr->textColor)
|
||||
WMReleaseColor(fPtr->textColor);
|
||||
|
||||
if (fPtr->caption)
|
||||
wfree(fPtr->caption);
|
||||
|
||||
|
||||
+1
-1
@@ -945,7 +945,7 @@ void WMSetFocusToWidget(WMWidget * widget)
|
||||
|
||||
/*
|
||||
* WMRealizeWidget-
|
||||
* Realizes the widget and all it's children.
|
||||
* Realizes the widget and all its children.
|
||||
*
|
||||
*/
|
||||
void WMRealizeWidget(WMWidget * w)
|
||||
|
||||
@@ -213,3 +213,32 @@ int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int bufl
|
||||
#endif
|
||||
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Map a keycode to the corresponding keysym
|
||||
* To replace the deprecated X11 function XKeycodeToKeysym
|
||||
*/
|
||||
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index)
|
||||
{
|
||||
static int min_kc = -1;
|
||||
static int max_kc;
|
||||
int num_syms;
|
||||
KeySym *key_syms;
|
||||
KeySym ks;
|
||||
|
||||
XDisplayKeycodes(display, &min_kc, &max_kc);
|
||||
if (keycode < min_kc || keycode > max_kc || index < 0) {
|
||||
return NoSymbol;
|
||||
}
|
||||
|
||||
key_syms = XGetKeyboardMapping(display, keycode, 1, &num_syms);
|
||||
if (index >= num_syms) {
|
||||
XFree(key_syms);
|
||||
return NoSymbol;
|
||||
}
|
||||
|
||||
ks = key_syms[index];
|
||||
XFree(key_syms);
|
||||
|
||||
return ks;
|
||||
}
|
||||
|
||||
+500
-11
@@ -1,8 +1,10 @@
|
||||
|
||||
#include "WINGsP.h"
|
||||
#include <ctype.h>
|
||||
#include <strings.h>
|
||||
|
||||
char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
||||
char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
||||
const char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
||||
const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
||||
|
||||
typedef struct W_List {
|
||||
W_Class widgetClass;
|
||||
@@ -27,11 +29,15 @@ typedef struct W_List {
|
||||
WMHandlerID *idleID; /* for updating the scroller after adding elements */
|
||||
|
||||
WMHandlerID *selectID; /* for selecting items in list while scrolling */
|
||||
WMHandlerID *typeaheadID; /* for clearing typeahead buffer */
|
||||
|
||||
WMScroller *vScroller;
|
||||
|
||||
Pixmap doubleBuffer;
|
||||
|
||||
char *typeahead;
|
||||
int typeaheadLen;
|
||||
|
||||
struct {
|
||||
unsigned int allowMultipleSelection:1;
|
||||
unsigned int allowEmptySelection:1;
|
||||
@@ -48,6 +54,7 @@ typedef struct W_List {
|
||||
#define DEFAULT_HEIGHT 150
|
||||
|
||||
#define SCROLL_DELAY 100
|
||||
#define TYPEAHEAD_CLEAR_DELAY 700
|
||||
|
||||
static void destroyList(List * lPtr);
|
||||
static void paintList(List * lPtr);
|
||||
@@ -62,6 +69,8 @@ static void scrollBackwardSelecting(void *data);
|
||||
static void vScrollCallBack(WMWidget * scroller, void *self);
|
||||
|
||||
static void toggleItemSelection(WMList * lPtr, int index);
|
||||
static void jumpToFirstItemWithPrefix(WMList * lPtr, const char *prefix, int prefixLen);
|
||||
static void typeaheadTimeout(void *data);
|
||||
|
||||
static void updateGeometry(WMList * lPtr);
|
||||
static void didResizeList(W_ViewDelegate * self, WMView * view);
|
||||
@@ -113,6 +122,9 @@ WMList *WMCreateList(WMWidget * parent)
|
||||
W_Screen *scrPtr = W_VIEW(parent)->screen;
|
||||
|
||||
lPtr = wmalloc(sizeof(List));
|
||||
lPtr->typeahead = NULL;
|
||||
lPtr->typeaheadLen = 0;
|
||||
lPtr->typeaheadID = NULL;
|
||||
|
||||
lPtr->widgetClass = WC_List;
|
||||
|
||||
@@ -129,7 +141,8 @@ WMList *WMCreateList(WMWidget * parent)
|
||||
| ClientMessageMask, handleEvents, lPtr);
|
||||
|
||||
WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask
|
||||
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask, handleActionEvents, lPtr);
|
||||
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask
|
||||
| KeyPressMask, handleActionEvents, lPtr);
|
||||
|
||||
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
||||
|
||||
@@ -288,6 +301,14 @@ void WMClearList(WMList * lPtr)
|
||||
WMDeleteTimerHandler(lPtr->selectID);
|
||||
lPtr->selectID = NULL;
|
||||
}
|
||||
if (lPtr->typeaheadID) {
|
||||
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||
lPtr->typeaheadID = NULL;
|
||||
}
|
||||
if (lPtr->typeahead) {
|
||||
lPtr->typeahead[0] = '\0';
|
||||
lPtr->typeaheadLen = 0;
|
||||
}
|
||||
if (lPtr->view->flags.realized) {
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
@@ -495,15 +516,16 @@ static void paintItem(List * lPtr, int index)
|
||||
static void paintList(List * lPtr)
|
||||
{
|
||||
W_Screen *scrPtr = lPtr->view->screen;
|
||||
int i, lim;
|
||||
int i, lim, itemCount;
|
||||
|
||||
if (!lPtr->view->flags.mapped)
|
||||
return;
|
||||
|
||||
if (WMGetArrayItemCount(lPtr->items) > 0) {
|
||||
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > WMGetArrayItemCount(lPtr->items)) {
|
||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
if (itemCount > 0) {
|
||||
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > itemCount) {
|
||||
|
||||
lim = WMGetArrayItemCount(lPtr->items) - lPtr->topItem;
|
||||
lim = itemCount - lPtr->topItem;
|
||||
XClearArea(scrPtr->display, lPtr->view->window, 19,
|
||||
2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21,
|
||||
lPtr->view->size.height - lim * lPtr->itemHeight - 3, False);
|
||||
@@ -820,7 +842,7 @@ void WMSetListSelectionToRange(WMList * lPtr, WMRange range)
|
||||
|
||||
void WMSelectAllListItems(WMList * lPtr)
|
||||
{
|
||||
int i;
|
||||
int i, itemCount;
|
||||
WMListItem *item;
|
||||
|
||||
if (!lPtr->flags.allowMultipleSelection)
|
||||
@@ -833,7 +855,8 @@ void WMSelectAllListItems(WMList * lPtr)
|
||||
WMFreeArray(lPtr->selectedItems);
|
||||
lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items);
|
||||
|
||||
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) {
|
||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
for (i = 0; i < itemCount; i++) {
|
||||
item = WMGetFromArray(lPtr->items, i);
|
||||
if (!item->selected) {
|
||||
item->selected = 1;
|
||||
@@ -859,10 +882,11 @@ void WMSelectAllListItems(WMList * lPtr)
|
||||
*/
|
||||
static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis)
|
||||
{
|
||||
int i;
|
||||
int i, itemCount;
|
||||
WMListItem *item;
|
||||
|
||||
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) {
|
||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
for (i = 0; i < itemCount; i++) {
|
||||
item = WMGetFromArray(lPtr->items, i);
|
||||
if (item != exceptThis && item->selected) {
|
||||
item->selected = 0;
|
||||
@@ -920,6 +944,85 @@ static void toggleItemSelection(WMList * lPtr, int index)
|
||||
}
|
||||
}
|
||||
|
||||
static int findItemWithPrefix(List * lPtr, const char *prefix, int prefixLen)
|
||||
{
|
||||
if (prefixLen <= 0)
|
||||
return -1;
|
||||
|
||||
int i, itemCount;
|
||||
|
||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
for (i = 0; i < itemCount; i++) {
|
||||
WMListItem *item = WMGetFromArray(lPtr->items, i);
|
||||
|
||||
if (!item || !item->text || item->text[0] == '\0')
|
||||
continue;
|
||||
if (strncasecmp(item->text, prefix, prefixLen) == 0)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void jumpToFirstItemWithPrefix(WMList * lPtr, const char *prefix, int prefixLen)
|
||||
{
|
||||
int index, oldTop, visibleCount;
|
||||
|
||||
index = findItemWithPrefix(lPtr, prefix, prefixLen);
|
||||
if (index < 0)
|
||||
return;
|
||||
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
WMRange range;
|
||||
|
||||
range.position = index;
|
||||
range.count = 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMSelectListItem(lPtr, index);
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
|
||||
visibleCount = lPtr->fullFitLines + lPtr->flags.dontFitAll;
|
||||
if (visibleCount < 1)
|
||||
visibleCount = 1;
|
||||
|
||||
oldTop = lPtr->topItem;
|
||||
if (index < lPtr->topItem) {
|
||||
lPtr->topItem = index;
|
||||
} else {
|
||||
if (lPtr->flags.dontFitAll) {
|
||||
if (lPtr->fullFitLines <= 0) {
|
||||
lPtr->topItem = index;
|
||||
} else {
|
||||
int lastFullyVisible = lPtr->topItem + lPtr->fullFitLines - 1;
|
||||
if (index > lastFullyVisible)
|
||||
lPtr->topItem = index - lPtr->fullFitLines + 1;
|
||||
}
|
||||
} else if (index >= lPtr->topItem + visibleCount) {
|
||||
lPtr->topItem = index - visibleCount + 1;
|
||||
}
|
||||
}
|
||||
if (lPtr->topItem < 0)
|
||||
lPtr->topItem = 0;
|
||||
|
||||
if (lPtr->view->flags.realized && lPtr->topItem != oldTop)
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
|
||||
static void typeaheadTimeout(void *data)
|
||||
{
|
||||
List *lPtr = (List *) data;
|
||||
|
||||
lPtr->typeaheadID = NULL;
|
||||
if (lPtr->typeahead) {
|
||||
lPtr->typeahead[0] = '\0';
|
||||
lPtr->typeaheadLen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void handleActionEvents(XEvent * event, void *data)
|
||||
{
|
||||
List *lPtr = (List *) data;
|
||||
@@ -959,6 +1062,7 @@ static void handleActionEvents(XEvent * event, void *data)
|
||||
WMDeleteTimerHandler(lPtr->selectID);
|
||||
lPtr->selectID = NULL;
|
||||
}
|
||||
WMSetFocusToWidget(lPtr);
|
||||
break;
|
||||
|
||||
case LeaveNotify:
|
||||
@@ -970,6 +1074,9 @@ static void handleActionEvents(XEvent * event, void *data)
|
||||
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr);
|
||||
}
|
||||
}
|
||||
WMWidget *parentWidget = WMWidgetOfView(lPtr->view->parent);
|
||||
if (parentWidget)
|
||||
WMSetFocusToWidget(parentWidget);
|
||||
break;
|
||||
|
||||
case ButtonPress:
|
||||
@@ -1076,6 +1183,381 @@ static void handleActionEvents(XEvent * event, void *data)
|
||||
prevItem = tmp;
|
||||
}
|
||||
break;
|
||||
|
||||
case KeyPress:
|
||||
char buffer[16];
|
||||
KeySym ksym;
|
||||
Status status;
|
||||
int len;
|
||||
WMScreen *scr = lPtr->view->screen;
|
||||
XWindowAttributes wattr;
|
||||
|
||||
if (event->xkey.state & (ControlMask | Mod1Mask))
|
||||
break;
|
||||
|
||||
if (!(XGetWindowAttributes(scr->display, lPtr->view->window, &wattr) && wattr.map_state == IsViewable))
|
||||
break;
|
||||
|
||||
len = W_LookupString(lPtr->view, &event->xkey, buffer, (int)sizeof(buffer) - 1, &ksym, &status);
|
||||
if (len < 0)
|
||||
break;
|
||||
if (len > 0)
|
||||
buffer[len] = '\0';
|
||||
|
||||
/* Handle navigation keys */
|
||||
switch (ksym) {
|
||||
case XK_Up: {
|
||||
int newRow;
|
||||
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
int cur = WMGetListSelectedItemRow(lPtr);
|
||||
|
||||
if (lPtr->flags.allowMultipleSelection && WMGetArrayItemCount(lPtr->selectedItems) > 0) {
|
||||
WMListItem *lastSel = WMGetFromArray(lPtr->selectedItems, WMGetArrayItemCount(lPtr->selectedItems) - 1);
|
||||
if (lastSel)
|
||||
cur = WMGetFirstInArray(lPtr->items, lastSel);
|
||||
}
|
||||
|
||||
if (cur == WLNotFound)
|
||||
cur = lPtr->topItem;
|
||||
newRow = cur - 1;
|
||||
if (newRow < 0)
|
||||
newRow = 0;
|
||||
|
||||
if (newRow != cur && itemCount > 0) {
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
WMRange range;
|
||||
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||
anchor = cur;
|
||||
}
|
||||
|
||||
range.position = anchor;
|
||||
if (newRow >= anchor)
|
||||
range.count = newRow - anchor + 1;
|
||||
else
|
||||
range.count = newRow - anchor - 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMRange range = { .position = newRow, .count = 1 };
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
} else {
|
||||
WMSelectListItem(lPtr, newRow);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
|
||||
/* Ensure visibility */
|
||||
if (newRow < lPtr->topItem) {
|
||||
lPtr->topItem = newRow;
|
||||
if (lPtr->view->flags.realized)
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XK_Down: {
|
||||
int newRow;
|
||||
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
int cur = WMGetListSelectedItemRow(lPtr);
|
||||
|
||||
if (lPtr->flags.allowMultipleSelection && WMGetArrayItemCount(lPtr->selectedItems) > 0) {
|
||||
WMListItem *lastSel = WMGetFromArray(lPtr->selectedItems, WMGetArrayItemCount(lPtr->selectedItems) - 1);
|
||||
if (lastSel)
|
||||
cur = WMGetFirstInArray(lPtr->items, lastSel);
|
||||
}
|
||||
|
||||
if (cur == WLNotFound)
|
||||
cur = lPtr->topItem;
|
||||
newRow = cur + 1;
|
||||
if (newRow >= itemCount)
|
||||
newRow = itemCount - 1;
|
||||
|
||||
if (newRow != cur && itemCount > 0) {
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
WMRange range;
|
||||
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||
anchor = cur;
|
||||
}
|
||||
|
||||
range.position = anchor;
|
||||
if (newRow >= anchor)
|
||||
range.count = newRow - anchor + 1;
|
||||
else
|
||||
range.count = newRow - anchor - 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMRange range = { .position = newRow, .count = 1 };
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
} else {
|
||||
WMSelectListItem(lPtr, newRow);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
|
||||
/* Ensure visibility */
|
||||
if (newRow > (lPtr->topItem + lPtr->fullFitLines - 1)) {
|
||||
lPtr->topItem = newRow - lPtr->fullFitLines + 1;
|
||||
if (lPtr->topItem < 0)
|
||||
lPtr->topItem = 0;
|
||||
/* Ensure we don't scroll past the end */
|
||||
if (lPtr->topItem + lPtr->fullFitLines > itemCount)
|
||||
lPtr->topItem = itemCount - lPtr->fullFitLines;
|
||||
if (lPtr->topItem < 0)
|
||||
lPtr->topItem = 0;
|
||||
if (lPtr->view->flags.realized)
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XK_Page_Up: {
|
||||
int newRow;
|
||||
int page = lPtr->fullFitLines > 0 ? lPtr->fullFitLines : 1;
|
||||
int cur = WMGetListSelectedItemRow(lPtr);
|
||||
|
||||
if (cur == WLNotFound)
|
||||
cur = lPtr->topItem;
|
||||
newRow = cur - page;
|
||||
if (newRow < 0)
|
||||
newRow = 0;
|
||||
|
||||
if (newRow != cur) {
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
WMRange range;
|
||||
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||
anchor = cur;
|
||||
}
|
||||
|
||||
range.position = anchor;
|
||||
if (newRow >= anchor)
|
||||
range.count = newRow - anchor + 1;
|
||||
else
|
||||
range.count = newRow - anchor - 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMRange range = { .position = newRow, .count = 1 };
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
} else {
|
||||
WMSelectListItem(lPtr, newRow);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
if (newRow < lPtr->topItem) {
|
||||
lPtr->topItem = newRow;
|
||||
if (lPtr->view->flags.realized)
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XK_Page_Down: {
|
||||
int newRow;
|
||||
int page = lPtr->fullFitLines > 0 ? lPtr->fullFitLines : 1;
|
||||
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
int cur = WMGetListSelectedItemRow(lPtr);
|
||||
|
||||
if (cur == WLNotFound)
|
||||
cur = lPtr->topItem;
|
||||
newRow = cur + page;
|
||||
if (newRow >= itemCount)
|
||||
newRow = itemCount - 1;
|
||||
|
||||
if (newRow != cur && itemCount > 0) {
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
WMRange range;
|
||||
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||
anchor = cur;
|
||||
}
|
||||
|
||||
range.position = anchor;
|
||||
if (newRow >= anchor)
|
||||
range.count = newRow - anchor + 1;
|
||||
else
|
||||
range.count = newRow - anchor - 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMRange range = { .position = newRow, .count = 1 };
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
} else {
|
||||
WMSelectListItem(lPtr, newRow);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
|
||||
/* Ensure visibility */
|
||||
if (newRow > (lPtr->topItem + lPtr->fullFitLines - 1)) {
|
||||
lPtr->topItem = newRow - lPtr->fullFitLines + 1;
|
||||
if (lPtr->topItem < 0)
|
||||
lPtr->topItem = 0;
|
||||
/* Ensure we don't scroll past the end */
|
||||
if (lPtr->topItem + lPtr->fullFitLines > itemCount)
|
||||
lPtr->topItem = itemCount - lPtr->fullFitLines;
|
||||
if (lPtr->topItem < 0)
|
||||
lPtr->topItem = 0;
|
||||
if (lPtr->view->flags.realized)
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XK_Home: {
|
||||
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
if (itemCount > 0) {
|
||||
int newRow = 0;
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
WMRange range;
|
||||
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||
anchor = lPtr->topItem;
|
||||
}
|
||||
|
||||
range.position = anchor;
|
||||
if (newRow >= anchor)
|
||||
range.count = newRow - anchor + 1;
|
||||
else
|
||||
range.count = newRow - anchor - 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMRange range = { .position = newRow, .count = 1 };
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
} else {
|
||||
WMSelectListItem(lPtr, newRow);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
if (newRow < lPtr->topItem) {
|
||||
lPtr->topItem = newRow;
|
||||
if (lPtr->view->flags.realized)
|
||||
updateScroller(lPtr);
|
||||
}
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XK_End: {
|
||||
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||
if (itemCount > 0) {
|
||||
int newRow = itemCount - 1;
|
||||
if (lPtr->flags.allowMultipleSelection) {
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
WMRange range;
|
||||
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||
anchor = lPtr->topItem;
|
||||
}
|
||||
|
||||
range.position = anchor;
|
||||
if (newRow >= anchor)
|
||||
range.count = newRow - anchor + 1;
|
||||
else
|
||||
range.count = newRow - anchor - 1;
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
} else {
|
||||
WMRange range = { .position = newRow, .count = 1 };
|
||||
WMSetListSelectionToRange(lPtr, range);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
} else {
|
||||
WMSelectListItem(lPtr, newRow);
|
||||
lastClicked = newRow;
|
||||
}
|
||||
|
||||
/* Ensure the last item is fully visible */
|
||||
lPtr->topItem = itemCount - lPtr->fullFitLines;
|
||||
if (lPtr->topItem < 0)
|
||||
lPtr->topItem = 0;
|
||||
if (lPtr->view->flags.realized)
|
||||
updateScroller(lPtr);
|
||||
|
||||
/* Trigger action callback */
|
||||
if (lPtr->action)
|
||||
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we handled a navigation keysym, avoid falling through to typeahead logic */
|
||||
if (ksym == XK_Up || ksym == XK_Down || ksym == XK_Page_Up || ksym == XK_Page_Down || ksym == XK_Home || ksym == XK_End)
|
||||
break;
|
||||
|
||||
if (len <= 0)
|
||||
break;
|
||||
|
||||
buffer[len] = '\0';
|
||||
|
||||
if (ksym == XK_Escape) {
|
||||
if (lPtr->typeaheadID) {
|
||||
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||
lPtr->typeaheadID = NULL;
|
||||
}
|
||||
if (lPtr->typeahead) {
|
||||
lPtr->typeahead[0] = '\0';
|
||||
lPtr->typeaheadLen = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (ksym == XK_BackSpace) {
|
||||
if (lPtr->typeaheadLen > 0 && lPtr->typeahead) {
|
||||
lPtr->typeaheadLen--;
|
||||
lPtr->typeahead[lPtr->typeaheadLen] = '\0';
|
||||
}
|
||||
} else if (len == 1 && isalnum((unsigned char)buffer[0])) {
|
||||
if (!lPtr->typeahead) {
|
||||
lPtr->typeahead = wmalloc(2);
|
||||
lPtr->typeaheadLen = 0;
|
||||
}
|
||||
lPtr->typeahead = wrealloc(lPtr->typeahead, lPtr->typeaheadLen + 2);
|
||||
lPtr->typeahead[lPtr->typeaheadLen] = buffer[0];
|
||||
lPtr->typeaheadLen++;
|
||||
lPtr->typeahead[lPtr->typeaheadLen] = '\0';
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
if (lPtr->typeaheadLen > 0)
|
||||
jumpToFirstItemWithPrefix(lPtr, lPtr->typeahead, lPtr->typeaheadLen);
|
||||
|
||||
if (lPtr->typeaheadID) {
|
||||
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||
lPtr->typeaheadID = NULL;
|
||||
}
|
||||
if (lPtr->typeaheadLen > 0)
|
||||
lPtr->typeaheadID = WMAddTimerHandler(TYPEAHEAD_CLEAR_DELAY, typeaheadTimeout, lPtr);
|
||||
break;
|
||||
|
||||
}
|
||||
if (lPtr->topItem != topItem)
|
||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||
@@ -1123,6 +1605,10 @@ static void destroyList(List * lPtr)
|
||||
WMDeleteTimerHandler(lPtr->selectID);
|
||||
lPtr->selectID = NULL;
|
||||
|
||||
if (lPtr->typeaheadID)
|
||||
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||
lPtr->typeaheadID = NULL;
|
||||
|
||||
if (lPtr->selectedItems)
|
||||
WMFreeArray(lPtr->selectedItems);
|
||||
|
||||
@@ -1132,6 +1618,9 @@ static void destroyList(List * lPtr)
|
||||
if (lPtr->doubleBuffer)
|
||||
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
|
||||
|
||||
if (lPtr->typeahead)
|
||||
wfree(lPtr->typeahead);
|
||||
|
||||
WMRemoveNotificationObserver(lPtr);
|
||||
|
||||
wfree(lPtr);
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ static void handleKeyPress(XEvent * event, void *clientData)
|
||||
|
||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||
|
||||
if (ksym == XK_Return && panel->defBtn) {
|
||||
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
||||
WMPerformButtonClick(panel->defBtn);
|
||||
} else if (ksym == XK_Escape) {
|
||||
if (panel->altBtn || panel->othBtn) {
|
||||
@@ -421,7 +421,7 @@ static void handleKeyPress2(XEvent * event, void *clientData)
|
||||
|
||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||
|
||||
if (ksym == XK_Return && panel->defBtn) {
|
||||
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
||||
WMPerformButtonClick(panel->defBtn);
|
||||
} else if (ksym == XK_Escape) {
|
||||
if (panel->altBtn) {
|
||||
@@ -709,7 +709,7 @@ static void handleKeyPress3(XEvent * event, void *clientData)
|
||||
|
||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||
|
||||
if (ksym == XK_Return && panel->defBtn) {
|
||||
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
||||
WMPerformButtonClick(panel->defBtn);
|
||||
} else if (ksym == XK_Escape) {
|
||||
if (panel->altBtn) {
|
||||
|
||||
@@ -252,6 +252,56 @@ WMMenuItem *WMGetPopUpButtonMenuItem(WMPopUpButton * bPtr, int index)
|
||||
return WMGetFromArray(bPtr->items, index);
|
||||
}
|
||||
|
||||
int WMSelectPopUpButtonPreviousItem(WMPopUpButton * bPtr)
|
||||
{
|
||||
int testIndex;
|
||||
|
||||
CHECK_CLASS(bPtr, WC_PopUpButton);
|
||||
|
||||
if (bPtr->flags.pullsDown || bPtr->selectedItemIndex < 0)
|
||||
return -1;
|
||||
|
||||
testIndex = bPtr->selectedItemIndex - 1;
|
||||
|
||||
while (testIndex >= 0 && !WMGetPopUpButtonItemEnabled(bPtr, testIndex))
|
||||
testIndex--;
|
||||
|
||||
if (testIndex != -1) {
|
||||
WMSetPopUpButtonSelectedItem(bPtr, testIndex);
|
||||
if (bPtr->action)
|
||||
(*bPtr->action) (bPtr, bPtr->clientData);
|
||||
return testIndex;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int WMSelectPopUpButtonNextItem(WMPopUpButton * bPtr)
|
||||
{
|
||||
int itemCount;
|
||||
int testIndex;
|
||||
|
||||
CHECK_CLASS(bPtr, WC_PopUpButton);
|
||||
|
||||
if (bPtr->flags.pullsDown || bPtr->selectedItemIndex < 0)
|
||||
return -1;
|
||||
|
||||
itemCount = WMGetArrayItemCount(bPtr->items);
|
||||
testIndex = bPtr->selectedItemIndex + 1;
|
||||
|
||||
while (testIndex < itemCount && !WMGetPopUpButtonItemEnabled(bPtr, testIndex))
|
||||
testIndex++;
|
||||
|
||||
if (testIndex != itemCount) {
|
||||
WMSetPopUpButtonSelectedItem(bPtr, testIndex);
|
||||
if (bPtr->action)
|
||||
(*bPtr->action) (bPtr, bPtr->clientData);
|
||||
return testIndex;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void paintPopUpButton(PopUpButton * bPtr)
|
||||
{
|
||||
W_Screen *scr = bPtr->view->screen;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
|
||||
#define AUTOSCROLL_DELAY 40
|
||||
|
||||
char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
|
||||
const char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
|
||||
|
||||
typedef struct W_Scroller {
|
||||
W_Class widgetClass;
|
||||
|
||||
+29
-15
@@ -166,12 +166,15 @@ typedef struct W_Text {
|
||||
WMArray *xdndDestinationTypes;
|
||||
} Text;
|
||||
|
||||
/* not used */
|
||||
#if 0
|
||||
#define NOTIFY(T,C,N,A) {\
|
||||
WMNotification *notif = WMCreateNotification(N,T,A);\
|
||||
if ((T)->delegate && (T)->delegate->C)\
|
||||
(*(T)->delegate->C)((T)->delegate,notif);\
|
||||
WMPostNotification(notif);\
|
||||
WMReleaseNotification(notif);}
|
||||
#endif
|
||||
|
||||
#define TYPETEXT 0
|
||||
|
||||
@@ -215,6 +218,11 @@ static char *default_bullet[] = {
|
||||
" ooo "
|
||||
};
|
||||
|
||||
/* These id are used when sharing the selected text between applications */
|
||||
static Atom XA_TARGETS = None;
|
||||
static Atom XA_TEXT = None;
|
||||
static Atom XA_COMPOUND_TEXT = None;
|
||||
|
||||
static void handleEvents(XEvent * event, void *data);
|
||||
static void layOutDocument(Text * tPtr);
|
||||
static void updateScrollers(Text * tPtr);
|
||||
@@ -617,7 +625,7 @@ static void paintText(Text * tPtr)
|
||||
TextBlock *tb;
|
||||
WMFont *font;
|
||||
const char *text;
|
||||
int len, y, c, s, done = False, dir /* 1 = down */ ;
|
||||
int len, y, c, s, done = False, dir; /* dir 1 = down */
|
||||
WMScreen *scr = tPtr->view->screen;
|
||||
Display *dpy = tPtr->view->screen->display;
|
||||
Window win = tPtr->view->window;
|
||||
@@ -2036,17 +2044,13 @@ static void releaseSelection(Text * tPtr)
|
||||
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
|
||||
{
|
||||
Text *tPtr = view->self;
|
||||
Display *dpy = tPtr->view->screen->display;
|
||||
Atom _TARGETS;
|
||||
Atom TEXT = XInternAtom(dpy, "TEXT", False);
|
||||
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||
WMData *data = NULL;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) selection;
|
||||
(void) cdata;
|
||||
|
||||
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
|
||||
if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
|
||||
char *text = WMGetTextSelectedStream(tPtr);
|
||||
|
||||
if (text) {
|
||||
@@ -2059,19 +2063,18 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
||||
} else
|
||||
printf("didn't get it\n");
|
||||
|
||||
_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||
if (target == _TARGETS) {
|
||||
Atom array[4];
|
||||
if (target == XA_TARGETS) {
|
||||
Atom supported_type[4];
|
||||
|
||||
array[0] = _TARGETS;
|
||||
array[1] = XA_STRING;
|
||||
array[2] = TEXT;
|
||||
array[3] = COMPOUND_TEXT;
|
||||
supported_type[0] = XA_TARGETS;
|
||||
supported_type[1] = XA_STRING;
|
||||
supported_type[2] = XA_TEXT;
|
||||
supported_type[3] = XA_COMPOUND_TEXT;
|
||||
|
||||
data = WMCreateDataWithBytes(&array, sizeof(array));
|
||||
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
||||
WMSetDataFormat(data, 32);
|
||||
|
||||
*type = target;
|
||||
*type = XA_ATOM;
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -2974,6 +2977,17 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi
|
||||
dpy = tPtr->view->screen->display;
|
||||
scr = tPtr->view->screen;
|
||||
|
||||
if (XA_TARGETS == None) {
|
||||
/*
|
||||
* Because the X protocol guaranties that the value will never change in
|
||||
* the lifespan of the server, we query the values only the first time a
|
||||
* widget is created
|
||||
*/
|
||||
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||
XA_TEXT = XInternAtom(dpy, "TEXT", False);
|
||||
XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||
}
|
||||
|
||||
tPtr->view->self = tPtr;
|
||||
tPtr->view->attribs.cursor = scr->textCursor;
|
||||
tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;
|
||||
|
||||
+94
-64
@@ -10,9 +10,9 @@
|
||||
#define CURSOR_BLINK_ON_DELAY 600
|
||||
#define CURSOR_BLINK_OFF_DELAY 300
|
||||
|
||||
char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
|
||||
char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
|
||||
char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
|
||||
const char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
|
||||
const char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
|
||||
const char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
|
||||
|
||||
typedef struct W_TextField {
|
||||
W_Class widgetClass;
|
||||
@@ -239,9 +239,9 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
||||
TextField *tPtr = view->self;
|
||||
int count;
|
||||
Display *dpy = tPtr->view->screen->display;
|
||||
Atom _TARGETS;
|
||||
Atom TEXT = XInternAtom(dpy, "TEXT", False);
|
||||
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||
Atom XA_TARGETS;
|
||||
Atom XA_TEXT = XInternAtom(dpy, "TEXT", False);
|
||||
Atom XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||
WMData *data;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
@@ -251,7 +251,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
||||
count = tPtr->selection.count < 0
|
||||
? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position;
|
||||
|
||||
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
|
||||
if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
|
||||
|
||||
data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count));
|
||||
WMSetDataFormat(data, 8);
|
||||
@@ -260,19 +260,19 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
||||
return data;
|
||||
}
|
||||
|
||||
_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||
if (target == _TARGETS) {
|
||||
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||
if (target == XA_TARGETS) {
|
||||
Atom supported_type[4];
|
||||
|
||||
supported_type[0] = _TARGETS;
|
||||
supported_type[0] = XA_TARGETS;
|
||||
supported_type[1] = XA_STRING;
|
||||
supported_type[2] = TEXT;
|
||||
supported_type[3] = COMPOUND_TEXT;
|
||||
supported_type[2] = XA_TEXT;
|
||||
supported_type[3] = XA_COMPOUND_TEXT;
|
||||
|
||||
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
||||
WMSetDataFormat(data, 32);
|
||||
|
||||
*type = target;
|
||||
*type = XA_ATOM;
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -446,6 +446,13 @@ void WMDeleteTextFieldRange(WMTextField * tPtr, WMRange range)
|
||||
|
||||
decrToFit(tPtr);
|
||||
|
||||
/* Ensure cursor is visible after deletion */
|
||||
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
||||
tPtr->viewPosition = tPtr->cursorPosition;
|
||||
} else {
|
||||
incrToFit2(tPtr);
|
||||
}
|
||||
|
||||
paintTextField(tPtr);
|
||||
}
|
||||
|
||||
@@ -490,11 +497,6 @@ void WMSetTextFieldAlignment(WMTextField * tPtr, WMAlignment alignment)
|
||||
|
||||
tPtr->flags.alignment = alignment;
|
||||
|
||||
if (alignment != WALeft) {
|
||||
wwarning(_("only left alignment is supported in textfields"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (tPtr->view->flags.realized) {
|
||||
paintTextField(tPtr);
|
||||
}
|
||||
@@ -661,7 +663,7 @@ static void didResizeTextField(W_ViewDelegate * self, WMView * view)
|
||||
|
||||
tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
|
||||
|
||||
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 2 */ ;
|
||||
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth;
|
||||
}
|
||||
|
||||
static char *makeHiddenString(int length)
|
||||
@@ -846,8 +848,8 @@ static void paintTextField(TextField * tPtr)
|
||||
count = tPtr->viewPosition;
|
||||
}
|
||||
|
||||
rx = tPtr->offsetWidth + 1 + WMWidthOfString(tPtr->font, text, count)
|
||||
- WMWidthOfString(tPtr->font, text, tPtr->viewPosition);
|
||||
rx = tx + WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]),
|
||||
count - tPtr->viewPosition);
|
||||
|
||||
WMDrawImageString(screen, drawbuffer, color, screen->gray,
|
||||
tPtr->font, rx, ty, &(text[count]), count2);
|
||||
@@ -942,7 +944,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
{
|
||||
char buffer[64];
|
||||
KeySym ksym;
|
||||
char *textEvent = NULL;
|
||||
const char *textEvent = NULL;
|
||||
void *data = NULL;
|
||||
int count, refresh = 0;
|
||||
int control_pressed = 0;
|
||||
@@ -1029,7 +1031,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
case XK_Left:
|
||||
if (tPtr->cursorPosition > 0) {
|
||||
int i;
|
||||
paintCursor(tPtr);
|
||||
|
||||
i = tPtr->cursorPosition;
|
||||
i += oneUTF8CharBackward(&tPtr->text[i], i);
|
||||
@@ -1045,9 +1046,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
|
||||
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
||||
tPtr->viewPosition = tPtr->cursorPosition;
|
||||
refresh = 1;
|
||||
} else
|
||||
paintCursor(tPtr);
|
||||
}
|
||||
refresh = 1;
|
||||
}
|
||||
if (shifted)
|
||||
cancelSelection = 0;
|
||||
@@ -1070,7 +1070,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
case XK_Right:
|
||||
if (tPtr->cursorPosition < tPtr->textLen) {
|
||||
int i;
|
||||
paintCursor(tPtr);
|
||||
|
||||
i = tPtr->cursorPosition;
|
||||
if (controled) {
|
||||
@@ -1083,10 +1082,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
}
|
||||
tPtr->cursorPosition = i;
|
||||
|
||||
refresh = incrToFit2(tPtr);
|
||||
|
||||
if (!refresh)
|
||||
paintCursor(tPtr);
|
||||
incrToFit2(tPtr);
|
||||
refresh = 1;
|
||||
}
|
||||
if (shifted)
|
||||
cancelSelection = 0;
|
||||
@@ -1109,13 +1106,11 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
case XK_Home:
|
||||
if (!controled) {
|
||||
if (tPtr->cursorPosition > 0) {
|
||||
paintCursor(tPtr);
|
||||
tPtr->cursorPosition = 0;
|
||||
if (tPtr->viewPosition > 0) {
|
||||
tPtr->viewPosition = 0;
|
||||
refresh = 1;
|
||||
} else
|
||||
paintCursor(tPtr);
|
||||
}
|
||||
refresh = 1;
|
||||
}
|
||||
if (shifted)
|
||||
cancelSelection = 0;
|
||||
@@ -1138,14 +1133,11 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
||||
case XK_End:
|
||||
if (!controled) {
|
||||
if (tPtr->cursorPosition < tPtr->textLen) {
|
||||
paintCursor(tPtr);
|
||||
tPtr->cursorPosition = tPtr->textLen;
|
||||
tPtr->viewPosition = 0;
|
||||
|
||||
refresh = incrToFit(tPtr);
|
||||
|
||||
if (!refresh)
|
||||
paintCursor(tPtr);
|
||||
incrToFit(tPtr);
|
||||
refresh = 1;
|
||||
}
|
||||
if (shifted)
|
||||
cancelSelection = 0;
|
||||
@@ -1408,7 +1400,25 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
||||
tPtr->viewPosition);
|
||||
}
|
||||
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||
if (tPtr->flags.alignment == WARight) {
|
||||
int textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
|
||||
if (textWidth < tPtr->usableWidth) {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||
event->xmotion.x - tPtr->usableWidth + textWidth);
|
||||
} else {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||
}
|
||||
} else if (tPtr->flags.alignment == WACenter) {
|
||||
int textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
|
||||
if (textWidth < tPtr->usableWidth) {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||
event->xmotion.x - (tPtr->usableWidth - textWidth) / 2);
|
||||
} else {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||
}
|
||||
} else {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||
}
|
||||
|
||||
/* Do not allow text selection in secure textfields */
|
||||
if (tPtr->flags.secure) {
|
||||
@@ -1441,17 +1451,35 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
||||
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
||||
WMSetFocusToWidget(tPtr);
|
||||
}
|
||||
if (textWidth < tPtr->usableWidth) {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||
event->xbutton.x - tPtr->usableWidth
|
||||
+ textWidth);
|
||||
} else
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
||||
|
||||
if (tPtr->flags.focused) {
|
||||
tPtr->selection.position = tPtr->cursorPosition;
|
||||
tPtr->selection.count = 0;
|
||||
}
|
||||
paintTextField(tPtr);
|
||||
break;
|
||||
|
||||
case WACenter:
|
||||
textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
|
||||
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
||||
WMSetFocusToWidget(tPtr);
|
||||
}
|
||||
if (textWidth < tPtr->usableWidth) {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||
event->xbutton.x - tPtr->usableWidth
|
||||
+ textWidth);
|
||||
} else
|
||||
event->xbutton.x - (tPtr->usableWidth - textWidth) / 2);
|
||||
} else {
|
||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
||||
|
||||
}
|
||||
if (tPtr->flags.focused) {
|
||||
tPtr->selection.position = tPtr->cursorPosition;
|
||||
tPtr->selection.count = 0;
|
||||
}
|
||||
paintTextField(tPtr);
|
||||
break;
|
||||
|
||||
@@ -1465,29 +1493,31 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
||||
tPtr->selection.count = 0;
|
||||
paintTextField(tPtr);
|
||||
}
|
||||
if (event->xbutton.button == Button2 && tPtr->flags.enabled) {
|
||||
char *text;
|
||||
int n;
|
||||
|
||||
if (!WMRequestSelection(tPtr->view, XA_PRIMARY, XA_STRING,
|
||||
event->xbutton.time, pasteText, NULL)) {
|
||||
text = XFetchBuffer(tPtr->view->screen->display, &n, 0);
|
||||
|
||||
if (text) {
|
||||
text[n] = 0;
|
||||
WMInsertTextFieldText(tPtr, text, tPtr->cursorPosition);
|
||||
XFree(text);
|
||||
NOTIFY(tPtr, didChange, WMTextDidChangeNotification,
|
||||
(void *)WMInsertTextEvent);
|
||||
}
|
||||
} else {
|
||||
tPtr->flags.waitingSelection = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (event->xbutton.button == Button2 && tPtr->flags.enabled) {
|
||||
char *text;
|
||||
int n;
|
||||
|
||||
if (!WMRequestSelection(tPtr->view, XA_PRIMARY, XA_STRING,
|
||||
event->xbutton.time, pasteText, NULL)) {
|
||||
text = XFetchBuffer(tPtr->view->screen->display, &n, 0);
|
||||
|
||||
if (text) {
|
||||
text[n] = 0;
|
||||
WMInsertTextFieldText(tPtr, text, tPtr->cursorPosition);
|
||||
XFree(text);
|
||||
NOTIFY(tPtr, didChange, WMTextDidChangeNotification,
|
||||
(void *)WMInsertTextEvent);
|
||||
}
|
||||
} else {
|
||||
tPtr->flags.waitingSelection = 1;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
void WHandleEvents()
|
||||
void WHandleEvents(void)
|
||||
{
|
||||
/* Check any expired timers */
|
||||
W_CheckTimerHandlers();
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@
|
||||
|
||||
/* the notifications about views */
|
||||
|
||||
char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
|
||||
char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
|
||||
char *WMViewRealizedNotification = "WMViewRealizedNotification";
|
||||
const char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
|
||||
const char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
|
||||
const char *WMViewRealizedNotification = "WMViewRealizedNotification";
|
||||
|
||||
#define EVENT_MASK \
|
||||
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
|
||||
|
||||
@@ -395,7 +395,11 @@ static void setWindowMakerHints(WMWindow * win)
|
||||
|
||||
memset(&attribs, 0, sizeof(GNUstepWMAttributes));
|
||||
attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr | GSExtraFlagsAttr;
|
||||
|
||||
if (win->minSize.width == win->maxSize.width && win->minSize.height == win->maxSize.height)
|
||||
win->flags.style &= ~WMResizableWindowMask;
|
||||
attribs.window_style = win->flags.style;
|
||||
|
||||
attribs.window_level = win->level;
|
||||
if (win->flags.documentEdited)
|
||||
attribs.extra_flags = GSDocumentEditedFlag;
|
||||
|
||||
+30
-12
@@ -446,12 +446,18 @@ static void str2rcolor(RContext * rc, const char *name, RColor * color)
|
||||
{
|
||||
XColor xcolor;
|
||||
|
||||
XParseColor(rc->dpy, rc->cmap, name, &xcolor);
|
||||
|
||||
color->alpha = 255;
|
||||
color->red = xcolor.red >> 8;
|
||||
color->green = xcolor.green >> 8;
|
||||
color->blue = xcolor.blue >> 8;
|
||||
if (XParseColor(rc->dpy, rc->cmap, name, &xcolor) != 0) {
|
||||
color->alpha = 255;
|
||||
color->red = xcolor.red >> 8;
|
||||
color->green = xcolor.green >> 8;
|
||||
color->blue = xcolor.blue >> 8;
|
||||
} else {
|
||||
/* Color Name was not found - Return white instead */
|
||||
color->alpha = 255;
|
||||
color->red = 255;
|
||||
color->green = 255;
|
||||
color->blue = 255;
|
||||
}
|
||||
}
|
||||
|
||||
static void dumpRImage(const char *path, RImage * image)
|
||||
@@ -1070,6 +1076,8 @@ static void deleteTexture(WMWidget * w, void *data)
|
||||
(void) w;
|
||||
|
||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||
if (section < 0)
|
||||
return;
|
||||
row = WMGetListSelectedItemRow(panel->texLs);
|
||||
item = WMGetListItem(panel->texLs, row);
|
||||
titem = (TextureListItem *) item->clientData;
|
||||
@@ -1128,6 +1136,8 @@ static void changePage(WMWidget * w, void *data)
|
||||
|
||||
if (w) {
|
||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||
if (section < 0)
|
||||
return;
|
||||
|
||||
WMSelectListItem(panel->texLs, panel->textureIndex[section]);
|
||||
|
||||
@@ -1227,6 +1237,8 @@ static void textureDoubleClick(WMWidget * w, void *data)
|
||||
|
||||
/* unselect old texture */
|
||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||
if (section < 0)
|
||||
return;
|
||||
|
||||
item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
|
||||
titem = (TextureListItem *) item->clientData;
|
||||
@@ -1255,7 +1267,7 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
||||
{
|
||||
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
|
||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||
int width, height, x, y;
|
||||
int width, height, x, y, tmp;
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
|
||||
WMListItem *item;
|
||||
@@ -1284,7 +1296,8 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
||||
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
||||
|
||||
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor)
|
||||
tmp = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||
if ((tmp >= 0) && ((1 << tmp) & titem->selectedFor))
|
||||
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||
else if (titem->selectedFor)
|
||||
WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||
@@ -1419,6 +1432,10 @@ static void changeColorPage(WMWidget * w, void *data)
|
||||
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||
RContext *rc = WMScreenRContext(scr);
|
||||
|
||||
section = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||
if (section < 0)
|
||||
return;
|
||||
|
||||
if (panel->preview) {
|
||||
GC gc;
|
||||
|
||||
@@ -1430,7 +1447,6 @@ static void changeColorPage(WMWidget * w, void *data)
|
||||
colorOptions[panel->oldcsection].hand.y);
|
||||
}
|
||||
if (w) {
|
||||
section = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||
|
||||
panel->oldcsection = section;
|
||||
if (panel->preview)
|
||||
@@ -1731,6 +1747,8 @@ static void colorWellObserver(void *self, WMNotification * n)
|
||||
(void) n;
|
||||
|
||||
p = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||
if (p < 0)
|
||||
return;
|
||||
|
||||
WMReleaseColor(panel->colors[p]);
|
||||
|
||||
@@ -1822,10 +1840,10 @@ static void createPanel(Panel * p)
|
||||
char *tmp;
|
||||
Bool ok = True;
|
||||
|
||||
panel->fprefix = wstrconcat(wusergnusteppath(), "/Library/WindowMaker");
|
||||
panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
|
||||
|
||||
if (access(panel->fprefix, F_OK) != 0) {
|
||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
||||
werror("%s", panel->fprefix);
|
||||
ok = False;
|
||||
}
|
||||
@@ -1835,7 +1853,7 @@ static void createPanel(Panel * p)
|
||||
wfree(panel->fprefix);
|
||||
panel->fprefix = tmp;
|
||||
if (access(panel->fprefix, F_OK) != 0) {
|
||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
||||
werror("%s", panel->fprefix);
|
||||
}
|
||||
}
|
||||
|
||||
+173
-9
@@ -2,8 +2,9 @@
|
||||
*
|
||||
* WPrefs - Window Maker Preferences Program
|
||||
*
|
||||
* Copyright (c) 2014 Window Maker Team
|
||||
* Copyright (c) 2014-2023 Window Maker Team
|
||||
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
||||
* Copyright (c) 2009-2026 Window Maker Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,7 +26,7 @@
|
||||
/* This structure containts the list of all the check-buttons to display in the
|
||||
* expert tab of the window with the corresponding information for effect
|
||||
*/
|
||||
static const struct {
|
||||
static struct expert_option {
|
||||
const char *label; /* Text displayed to user */
|
||||
|
||||
int def_state; /* True/False: the default value, if not defined in current config */
|
||||
@@ -71,9 +72,15 @@ static const struct {
|
||||
{ N_("Cycle windows only on the active head."),
|
||||
/* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
|
||||
|
||||
{ N_("Cycle all windows from all workspaces."),
|
||||
/* default: */ False, OPTION_WMAKER, "CycleAllWorkspaces" },
|
||||
|
||||
{ N_("Ignore minimized windows when cycling."),
|
||||
/* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
|
||||
|
||||
{ N_("Show app icons in window list."),
|
||||
/* default: */ False, OPTION_WMAKER, "WindowListAppIcons" },
|
||||
|
||||
{ N_("Show switch panel when cycling windows."),
|
||||
/* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" },
|
||||
|
||||
@@ -88,7 +95,7 @@ static const struct {
|
||||
/* default: */ False, OPTION_WMAKER, "KbdModeLock" },
|
||||
#endif /* XKB_MODELOCK */
|
||||
|
||||
{ N_("Maximize (snap) a window to edge or corner by dragging."),
|
||||
{ N_("Snap a window to edge or corner by dragging."),
|
||||
/* default: */ False, OPTION_WMAKER, "WindowSnapping" },
|
||||
|
||||
{ N_("Distance from edge to begin window snap."),
|
||||
@@ -97,7 +104,7 @@ static const struct {
|
||||
{ N_("Distance from corner to begin window snap."),
|
||||
/* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" },
|
||||
|
||||
{ N_("Snapping a window to the top maximizes it to the full screen."),
|
||||
{ N_("Snap a window to the top to maximize it to the full screen."),
|
||||
/* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" },
|
||||
|
||||
{ N_("Allow move half-maximized windows between multiple screens."),
|
||||
@@ -113,8 +120,23 @@ static const struct {
|
||||
/* default: */ False, OPTION_WMAKER, "OpenTransientOnOwnerWorkspace" },
|
||||
|
||||
{ N_("Wrap dock-attached icons around the screen edges."),
|
||||
/* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" }
|
||||
/* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" },
|
||||
|
||||
{ N_("Double click on titlebar maximizes/minimizes a window to/from full screen."),
|
||||
/* default: */ False, OPTION_WMAKER, "DbClickFullScreen" },
|
||||
|
||||
{ N_("Close rootmenu when mouse (left or right) is clicked outside focus."),
|
||||
/* default: */ False, OPTION_WMAKER, "CloseRootMenuByLeftOrRightMouseClick" },
|
||||
{ N_("Keep dock on primary head."),
|
||||
/* default: */ False, OPTION_WMAKER, "KeepDockOnPrimaryHead"},
|
||||
|
||||
{ N_("Allow windows to take focus using mouse wheel."),
|
||||
/* default: */ False, OPTION_WMAKER, "MouseWheelFocus"},
|
||||
|
||||
#ifdef USE_RANDR
|
||||
{ N_("Automatically (de)activate monitors on hotplug events."),
|
||||
/* default: */ False, OPTION_WMAKER, "HotplugMonitor"},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -132,6 +154,8 @@ typedef struct _Panel {
|
||||
WMButton *swi[wlengthof_nocheck(expert_options)];
|
||||
|
||||
WMTextField *textfield[wlengthof_nocheck(expert_options)];
|
||||
WMScrollView *sv;
|
||||
WMWidget *frame;
|
||||
|
||||
} _Panel;
|
||||
|
||||
@@ -140,15 +164,134 @@ typedef struct _Panel {
|
||||
static void changeIntTextfield(void *data, int delta)
|
||||
{
|
||||
WMTextField *textfield;
|
||||
char *text;
|
||||
char *text, buffer[12];
|
||||
int value;
|
||||
|
||||
textfield = (WMTextField *)data;
|
||||
text = WMGetTextFieldText(textfield);
|
||||
value = atoi(text);
|
||||
wfree(text);
|
||||
value += delta;
|
||||
sprintf(text, "%d", value);
|
||||
WMSetTextFieldText(textfield, text);
|
||||
sprintf(buffer, "%d", value);
|
||||
WMSetTextFieldText(textfield, buffer);
|
||||
}
|
||||
|
||||
static void scrollViewWheelHandler(XEvent *event, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel *) data;
|
||||
int amount, viewH, contentH, newY, maxY;
|
||||
WMRect rect;
|
||||
WMPoint pt;
|
||||
|
||||
if (!panel || !panel->sv || !panel->frame)
|
||||
return;
|
||||
|
||||
if (event->type != ButtonPress)
|
||||
return;
|
||||
|
||||
if (event->xbutton.button != WINGsConfiguration.mouseWheelUp &&
|
||||
event->xbutton.button != WINGsConfiguration.mouseWheelDown)
|
||||
return;
|
||||
|
||||
rect = WMGetScrollViewVisibleRect(panel->sv);
|
||||
viewH = rect.size.height;
|
||||
contentH = WMWidgetHeight(panel->frame);
|
||||
|
||||
if (event->xbutton.state & ControlMask) {
|
||||
amount = viewH; /* page */
|
||||
} else if (event->xbutton.state & ShiftMask) {
|
||||
amount = 1; /* line */
|
||||
} else {
|
||||
amount = viewH / 3; /* default */
|
||||
if (amount == 0)
|
||||
amount = 1;
|
||||
}
|
||||
|
||||
if (event->xbutton.button == WINGsConfiguration.mouseWheelUp)
|
||||
amount = -amount;
|
||||
|
||||
newY = rect.pos.y + amount;
|
||||
maxY = contentH - viewH;
|
||||
if (maxY < 0)
|
||||
maxY = 0;
|
||||
if (newY < 0)
|
||||
newY = 0;
|
||||
if (newY > maxY)
|
||||
newY = maxY;
|
||||
|
||||
pt.x = rect.pos.x;
|
||||
pt.y = newY;
|
||||
|
||||
WMScrollViewScrollPoint(panel->sv, pt);
|
||||
}
|
||||
|
||||
static void scrollViewRealizeObserver(void *self, WMNotification *not)
|
||||
{
|
||||
(void) not;
|
||||
_Panel *panel = (_Panel *) self;
|
||||
Display *dpy = NULL;
|
||||
Window viewport_win = 0;
|
||||
WMView *frameView;
|
||||
|
||||
if (!panel || !panel->frame)
|
||||
return;
|
||||
|
||||
frameView = WMWidgetView(panel->frame);
|
||||
|
||||
if (frameView && frameView->parent) {
|
||||
dpy = frameView->screen->display;
|
||||
viewport_win = frameView->parent->window;
|
||||
}
|
||||
|
||||
/* fallback: use the scrollview's view window if parent viewport not available */
|
||||
if (!viewport_win && panel->sv) {
|
||||
WMView *svView = WMWidgetView(panel->sv);
|
||||
if (svView && svView->screen) {
|
||||
dpy = svView->screen->display;
|
||||
viewport_win = svView->window;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dpy || viewport_win == 0)
|
||||
return;
|
||||
|
||||
XGrabButton(dpy, WINGsConfiguration.mouseWheelUp, AnyModifier, viewport_win,
|
||||
True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
|
||||
XGrabButton(dpy, WINGsConfiguration.mouseWheelDown, AnyModifier, viewport_win,
|
||||
True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
|
||||
}
|
||||
|
||||
static void scrollViewPrepareForClose(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel *) p;
|
||||
Display *dpy = NULL;
|
||||
Window viewport_win = 0;
|
||||
|
||||
if (!panel)
|
||||
return;
|
||||
|
||||
if (panel->frame) {
|
||||
WMView *frameView = WMWidgetView(panel->frame);
|
||||
if (frameView && frameView->parent) {
|
||||
dpy = frameView->screen->display;
|
||||
viewport_win = frameView->parent->window;
|
||||
}
|
||||
}
|
||||
|
||||
if (!viewport_win && panel->sv) {
|
||||
WMView *svView = WMWidgetView(panel->sv);
|
||||
if (svView && svView->screen) {
|
||||
dpy = svView->screen->display;
|
||||
viewport_win = svView->window;
|
||||
}
|
||||
}
|
||||
|
||||
if (dpy && viewport_win != 0) {
|
||||
XUngrabButton(dpy, WINGsConfiguration.mouseWheelUp, AnyModifier, viewport_win);
|
||||
XUngrabButton(dpy, WINGsConfiguration.mouseWheelDown, AnyModifier, viewport_win);
|
||||
}
|
||||
|
||||
WMRemoveNotificationObserver(panel);
|
||||
}
|
||||
|
||||
static void downButtonCallback(WMWidget *self, void *data)
|
||||
@@ -163,6 +306,19 @@ static void upButtonCallback(WMWidget *self, void *data)
|
||||
changeIntTextfield(data, 1);
|
||||
}
|
||||
|
||||
static int cmpExpertOptions(const void *v1, const void *v2)
|
||||
{
|
||||
int rc;
|
||||
const struct expert_option *opt1 = (struct expert_option *)v1;
|
||||
const struct expert_option *opt2 = (struct expert_option *)v2;
|
||||
|
||||
if ((rc = strcmp(opt1->label, opt2->label)) < 0)
|
||||
return -1;
|
||||
else if (rc > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel *) p;
|
||||
@@ -186,6 +342,7 @@ static void createPanel(Panel *p)
|
||||
WMSetFrameRelief(f, WRFlat);
|
||||
|
||||
udb = WMGetStandardUserDefaults();
|
||||
qsort(expert_options, wlengthof(expert_options), sizeof(expert_options[0]), cmpExpertOptions);
|
||||
for (i = 0; i < wlengthof(expert_options); i++) {
|
||||
if (expert_options[i].class != OPTION_WMAKER_INT) {
|
||||
panel->swi[i] = WMCreateSwitchButton(f);
|
||||
@@ -260,7 +417,7 @@ static void createPanel(Panel *p)
|
||||
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
wwarning("export_options[%d].class = %d, this should not happen\n",
|
||||
wwarning("expert_options[%d].class = %d, this should not happen\n",
|
||||
i, expert_options[i].class);
|
||||
#endif
|
||||
state = expert_options[i].def_state;
|
||||
@@ -272,6 +429,11 @@ static void createPanel(Panel *p)
|
||||
|
||||
WMMapSubwidgets(panel->box);
|
||||
WMSetScrollViewContentView(sv, WMWidgetView(f));
|
||||
/* keep references for the wheel handler and register it */
|
||||
panel->sv = sv;
|
||||
panel->frame = f;
|
||||
WMCreateEventHandler(WMWidgetView(sv), ButtonPressMask, scrollViewWheelHandler, panel);
|
||||
WMAddNotificationObserver(scrollViewRealizeObserver, panel, WMViewRealizedNotification, WMWidgetView(sv));
|
||||
WMRealizeWidget(panel->box);
|
||||
}
|
||||
|
||||
@@ -308,6 +470,7 @@ static void storeDefaults(_Panel *panel)
|
||||
|
||||
text = WMGetTextFieldText(panel->textfield[i]);
|
||||
value = atoi(text);
|
||||
wfree(text);
|
||||
|
||||
SetIntegerForKey(value, expert_options[i].op_name);
|
||||
break;
|
||||
@@ -331,6 +494,7 @@ Panel *InitExpert(WMWidget *parent)
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeDefaults;
|
||||
panel->callbacks.prepareForClose = scrollViewPrepareForClose;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "WPrefs.h"
|
||||
#include <unistd.h>
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#include <math.h>
|
||||
|
||||
/* workaround for older fontconfig, that doesn't define these constants */
|
||||
#ifndef FC_WEIGHT_NORMAL
|
||||
@@ -521,7 +522,7 @@ static void selectedOption(WMWidget * w, void *data)
|
||||
WMListItem *item = WMGetListItem(panel->sizeL, i);
|
||||
int distance;
|
||||
|
||||
distance = abs(size - atoi(item->text));
|
||||
distance = fabs(size - atoi(item->text));
|
||||
|
||||
if (i == 0 || distance < closest) {
|
||||
closest = distance;
|
||||
|
||||
@@ -0,0 +1,465 @@
|
||||
/* HotCornerShortcuts.c - screen corners actions
|
||||
*
|
||||
* WPrefs - Window Maker Preferences Program
|
||||
*
|
||||
* Copyright (c) 2023 Window Maker Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "WPrefs.h"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMBox *box;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
char *description;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWidget *parent;
|
||||
WMPixmap *icon;
|
||||
Pixmap quarter[4];
|
||||
|
||||
WMFrame *hcF;
|
||||
WMButton *hcB;
|
||||
WMFrame *hceF;
|
||||
WMSlider *hceS;
|
||||
WMLabel *hceL;
|
||||
WMFrame *hcdescF;
|
||||
WMLabel *hcdescL;
|
||||
|
||||
WMFrame *hcdelayF;
|
||||
WMButton *hcdelayB[5];
|
||||
WMTextField *hcdelayT;
|
||||
WMLabel *hcdelayL;
|
||||
WMLabel *icornerL;
|
||||
|
||||
WMFrame *hcactionsF;
|
||||
WMTextField *hcactionsT[4];
|
||||
|
||||
char hotcornerDelaySelected;
|
||||
} _Panel;
|
||||
|
||||
#define ICON_FILE "hotcorners"
|
||||
|
||||
#define DELAY_ICON "timer%i"
|
||||
#define DELAY_ICON_S "timer%is"
|
||||
|
||||
static void edgeCallback(WMWidget * w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel *) data;
|
||||
char buffer[64];
|
||||
int i;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
i = WMGetSliderValue(panel->hceS);
|
||||
|
||||
if (i == 0)
|
||||
sprintf(buffer, _("OFF"));
|
||||
else if (i == 1)
|
||||
sprintf(buffer, _("1 pixel"));
|
||||
else if (i <= 4)
|
||||
/* 2-4 */
|
||||
sprintf(buffer, _("%i pixels"), i);
|
||||
else
|
||||
/* >4 */
|
||||
sprintf(buffer, _("%i pixels "), i); /* note space! */
|
||||
WMSetLabelText(panel->hceL, buffer);
|
||||
}
|
||||
|
||||
static void showData(_Panel * panel)
|
||||
{
|
||||
int i;
|
||||
char buffer[32];
|
||||
WMPropList *array;
|
||||
|
||||
if (!GetObjectForKey("HotCornerDelay"))
|
||||
i = 250;
|
||||
else
|
||||
i = GetIntegerForKey("HotCornerDelay");
|
||||
sprintf(buffer, "%i", i);
|
||||
WMSetTextFieldText(panel->hcdelayT, buffer);
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
WMPerformButtonClick(panel->hcdelayB[0]);
|
||||
break;
|
||||
case 250:
|
||||
WMPerformButtonClick(panel->hcdelayB[1]);
|
||||
break;
|
||||
case 500:
|
||||
WMPerformButtonClick(panel->hcdelayB[2]);
|
||||
break;
|
||||
case 750:
|
||||
WMPerformButtonClick(panel->hcdelayB[3]);
|
||||
break;
|
||||
case 1000:
|
||||
WMPerformButtonClick(panel->hcdelayB[4]);
|
||||
break;
|
||||
}
|
||||
|
||||
i = GetIntegerForKey("HotCornerEdge");
|
||||
i = i < 0 ? 2 : i;
|
||||
i = i > 10 ? 10 : i;
|
||||
WMSetSliderValue(panel->hceS, i);
|
||||
edgeCallback(NULL, panel);
|
||||
|
||||
WMSetButtonSelected(panel->hcB, GetBoolForKey("HotCorners"));
|
||||
|
||||
array = GetObjectForKey("HotCornerActions");
|
||||
if (array && (!WMIsPLArray(array) || WMGetPropListItemCount(array) != sizeof(panel->hcactionsT) / sizeof(WMTextField *))) {
|
||||
wwarning(_("invalid data in option HotCornerActions."));
|
||||
} else {
|
||||
if (array) {
|
||||
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++)
|
||||
if (strcasecmp(WMGetFromPLString(WMGetFromPLArray(array, i)), "None") != 0)
|
||||
WMSetTextFieldText(panel->hcactionsT[i], WMGetFromPLString(WMGetFromPLArray(array, i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void storeData(_Panel * panel)
|
||||
{
|
||||
WMPropList *list;
|
||||
WMPropList *tmp;
|
||||
char *str;
|
||||
int i;
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->hcB), "HotCorners");
|
||||
|
||||
str = WMGetTextFieldText(panel->hcdelayT);
|
||||
if (sscanf(str, "%i", &i) != 1)
|
||||
i = 0;
|
||||
SetIntegerForKey(i, "HotCornerDelay");
|
||||
free(str);
|
||||
|
||||
SetIntegerForKey(WMGetSliderValue(panel->hceS), "HotCornerEdge");
|
||||
|
||||
list = WMCreatePLArray(NULL, NULL);
|
||||
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++) {
|
||||
str = WMGetTextFieldText(panel->hcactionsT[i]);
|
||||
if (strlen(str) == 0)
|
||||
str = "None";
|
||||
tmp = WMCreatePLString(str);
|
||||
WMAddToPLArray(list, tmp);
|
||||
}
|
||||
SetObjectForKey(list, "HotCornerActions");
|
||||
}
|
||||
|
||||
static void pushDelayButton(WMWidget * w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel *) data;
|
||||
|
||||
panel->hotcornerDelaySelected = 1;
|
||||
if (w == panel->hcdelayB[0]) {
|
||||
WMSetTextFieldText(panel->hcdelayT, "0");
|
||||
} else if (w == panel->hcdelayB[1]) {
|
||||
WMSetTextFieldText(panel->hcdelayT, "250");
|
||||
} else if (w == panel->hcdelayB[2]) {
|
||||
WMSetTextFieldText(panel->hcdelayT, "500");
|
||||
} else if (w == panel->hcdelayB[3]) {
|
||||
WMSetTextFieldText(panel->hcdelayT, "700");
|
||||
} else if (w == panel->hcdelayB[4]) {
|
||||
WMSetTextFieldText(panel->hcdelayT, "1000");
|
||||
}
|
||||
}
|
||||
|
||||
static void delayTextChanged(void *observerData, WMNotification * notification)
|
||||
{
|
||||
_Panel *panel = (_Panel *) observerData;
|
||||
int i;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) notification;
|
||||
|
||||
if (panel->hotcornerDelaySelected) {
|
||||
for (i = 0; i < 5; i++) {
|
||||
WMSetButtonSelected(panel->hcdelayB[i], False);
|
||||
}
|
||||
panel->hotcornerDelaySelected = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void createPanel(Panel * p)
|
||||
{
|
||||
_Panel *panel = (_Panel *) p;
|
||||
int i;
|
||||
char *buf1, *buf2;
|
||||
WMColor *color;
|
||||
WMFont *font;
|
||||
char *path;
|
||||
RImage *xis = NULL;
|
||||
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||
RContext *rc = WMScreenRContext(scr);
|
||||
GC gc = XCreateGC(scr->display, WMWidgetXID(panel->parent), 0, NULL);
|
||||
|
||||
path = LocateImage(ICON_FILE);
|
||||
if (path) {
|
||||
xis = RLoadImage(rc, path, 0);
|
||||
if (!xis) {
|
||||
wwarning(_("could not load image file %s"), path);
|
||||
}
|
||||
wfree(path);
|
||||
}
|
||||
|
||||
panel->box = WMCreateBox(panel->parent);
|
||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||
|
||||
|
||||
/***************** Hot Corner lelf side frames *****************/
|
||||
panel->hcF = WMCreateFrame(panel->box);
|
||||
WMResizeWidget(panel->hcF, 240, 53);
|
||||
WMMoveWidget(panel->hcF, 15, 17);
|
||||
|
||||
panel->hcB = WMCreateSwitchButton(panel->hcF);
|
||||
WMResizeWidget(panel->hcB, 150, 30);
|
||||
WMMoveWidget(panel->hcB, 15, 12);
|
||||
WMSetButtonText(panel->hcB, _("Enable Hot Corners"));
|
||||
|
||||
WMMapSubwidgets(panel->hcF);
|
||||
|
||||
panel->hceF = WMCreateFrame(panel->box);
|
||||
WMSetFrameTitle(panel->hceF, _("Hot Corner Edge"));
|
||||
WMResizeWidget(panel->hceF, 240, 40);
|
||||
WMMoveWidget(panel->hceF, 15, 77);
|
||||
|
||||
panel->hceS = WMCreateSlider(panel->hceF);
|
||||
WMResizeWidget(panel->hceS, 80, 15);
|
||||
WMMoveWidget(panel->hceS, 15, 18);
|
||||
WMSetSliderMinValue(panel->hceS, 2);
|
||||
WMSetSliderMaxValue(panel->hceS, 10);
|
||||
WMSetSliderAction(panel->hceS, edgeCallback, panel);
|
||||
|
||||
panel->hceL = WMCreateLabel(panel->hceF);
|
||||
WMResizeWidget(panel->hceL, 100, 15);
|
||||
WMMoveWidget(panel->hceL, 105, 18);
|
||||
|
||||
WMMapSubwidgets(panel->hceF);
|
||||
|
||||
panel->hcdescF = WMCreateFrame(panel->box);
|
||||
WMResizeWidget(panel->hcdescF, 240, 95);
|
||||
WMMoveWidget(panel->hcdescF, 15, 130);
|
||||
|
||||
panel->hcdescL = WMCreateLabel(panel->hcdescF);
|
||||
WMResizeWidget(panel->hcdescL, 200, 70);
|
||||
WMMoveWidget(panel->hcdescL, 15, 10);
|
||||
WMSetLabelText(panel->hcdescL,
|
||||
_("Instructions:\n\n"
|
||||
" - assign command to corner\n"
|
||||
" - or leave it empty\n"));
|
||||
|
||||
WMMapSubwidgets(panel->hcdescF);
|
||||
|
||||
/***************** Hot Corner Action Delay *****************/
|
||||
panel->hcdelayF = WMCreateFrame(panel->box);
|
||||
WMResizeWidget(panel->hcdelayF, 245, 60);
|
||||
WMMoveWidget(panel->hcdelayF, 265, 10);
|
||||
|
||||
WMSetFrameTitle(panel->hcdelayF, _("Hot Corner Delay"));
|
||||
|
||||
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
|
||||
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
char *path;
|
||||
|
||||
panel->hcdelayB[i] = WMCreateCustomButton(panel->hcdelayF, WBBStateChangeMask);
|
||||
WMResizeWidget(panel->hcdelayB[i], 25, 25);
|
||||
WMMoveWidget(panel->hcdelayB[i], 12 + (30 * i), 25);
|
||||
WMSetButtonBordered(panel->hcdelayB[i], False);
|
||||
WMSetButtonImagePosition(panel->hcdelayB[i], WIPImageOnly);
|
||||
WMSetButtonAction(panel->hcdelayB[i], pushDelayButton, panel);
|
||||
if (i > 0)
|
||||
WMGroupButtons(panel->hcdelayB[0], panel->hcdelayB[i]);
|
||||
sprintf(buf1, DELAY_ICON, i);
|
||||
sprintf(buf2, DELAY_ICON_S, i);
|
||||
path = LocateImage(buf1);
|
||||
if (path) {
|
||||
panel->icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (panel->icon) {
|
||||
WMSetButtonImage(panel->hcdelayB[i], panel->icon);
|
||||
WMReleasePixmap(panel->icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
wfree(path);
|
||||
}
|
||||
path = LocateImage(buf2);
|
||||
if (path) {
|
||||
panel->icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (panel->icon) {
|
||||
WMSetButtonAltImage(panel->hcdelayB[i], panel->icon);
|
||||
WMReleasePixmap(panel->icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
wfree(path);
|
||||
}
|
||||
}
|
||||
wfree(buf1);
|
||||
wfree(buf2);
|
||||
|
||||
panel->hcdelayT = WMCreateTextField(panel->hcdelayF);
|
||||
|
||||
WMResizeWidget(panel->hcdelayT, 36, 20);
|
||||
WMMoveWidget(panel->hcdelayT, 165, 28);
|
||||
WMAddNotificationObserver(delayTextChanged, panel, WMTextDidChangeNotification, panel->hcdelayT);
|
||||
|
||||
panel->hcdelayL = WMCreateLabel(panel->hcdelayF);
|
||||
WMResizeWidget(panel->hcdelayL, 36, 16);
|
||||
WMMoveWidget(panel->hcdelayL, 205, 32);
|
||||
WMSetLabelText(panel->hcdelayL, _("ms"));
|
||||
|
||||
color = WMDarkGrayColor(scr);
|
||||
font = WMSystemFontOfSize(scr, 10);
|
||||
|
||||
WMSetLabelTextColor(panel->hcdelayL, color);
|
||||
WMSetLabelFont(panel->hcdelayL, font);
|
||||
|
||||
WMReleaseColor(color);
|
||||
WMReleaseFont(font);
|
||||
|
||||
WMMapSubwidgets(panel->hcdelayF);
|
||||
|
||||
/***************** Set Hot Corner Actions ****************/
|
||||
panel->hcactionsF = WMCreateFrame(panel->box);
|
||||
WMSetFrameTitle(panel->hcactionsF, _("Hot Corner Actions"));
|
||||
WMResizeWidget(panel->hcactionsF, 245, 148);
|
||||
WMMoveWidget(panel->hcactionsF, 265, 77);
|
||||
|
||||
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||
WMResizeWidget(panel->icornerL, 24, 24);
|
||||
WMMoveWidget(panel->icornerL, 10, 18);
|
||||
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||
CreateImages(scr, rc, xis, ICON_FILE, &panel->icon, NULL);
|
||||
if (panel->icon)
|
||||
{
|
||||
WMPixmap *nicon;
|
||||
|
||||
panel->quarter[0] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[0], gc, 0, 0, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[0], WMGetPixmapMaskXID(panel->icon),
|
||||
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
WMSetLabelImage(panel->icornerL, nicon);
|
||||
WMReleasePixmap(nicon);
|
||||
}
|
||||
|
||||
panel->hcactionsT[0] = WMCreateTextField(panel->hcactionsF);
|
||||
WMResizeWidget(panel->hcactionsT[0], 180, 20);
|
||||
WMMoveWidget(panel->hcactionsT[0], 50, 20);
|
||||
|
||||
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||
WMResizeWidget(panel->icornerL, 24, 24);
|
||||
WMMoveWidget(panel->icornerL, 10, 48);
|
||||
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||
if (panel->icon)
|
||||
{
|
||||
WMPixmap *nicon;
|
||||
|
||||
panel->quarter[1] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[1], gc, panel->icon->width/2, 0, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[1], WMGetPixmapMaskXID(panel->icon),
|
||||
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
WMSetLabelImage(panel->icornerL, nicon);
|
||||
WMReleasePixmap(nicon);
|
||||
}
|
||||
|
||||
panel->hcactionsT[1] = WMCreateTextField(panel->hcactionsF);
|
||||
WMResizeWidget(panel->hcactionsT[1], 180, 20);
|
||||
WMMoveWidget(panel->hcactionsT[1], 50, 50);
|
||||
|
||||
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||
WMResizeWidget(panel->icornerL, 24, 24);
|
||||
WMMoveWidget(panel->icornerL, 10, 78);
|
||||
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||
if (panel->icon)
|
||||
{
|
||||
WMPixmap *nicon;
|
||||
|
||||
panel->quarter[2] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[2], gc, 0, panel->icon->height/2, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[2], WMGetPixmapMaskXID(panel->icon),
|
||||
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
WMSetLabelImage(panel->icornerL, nicon);
|
||||
WMReleasePixmap(nicon);
|
||||
}
|
||||
panel->hcactionsT[2] = WMCreateTextField(panel->hcactionsF);
|
||||
WMResizeWidget(panel->hcactionsT[2], 180, 20);
|
||||
WMMoveWidget(panel->hcactionsT[2], 50, 80);
|
||||
|
||||
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||
WMResizeWidget(panel->icornerL, 24, 24);
|
||||
WMMoveWidget(panel->icornerL, 10, 108);
|
||||
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||
if (panel->icon)
|
||||
{
|
||||
WMPixmap *nicon;
|
||||
|
||||
panel->quarter[3] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[3], gc, panel->icon->width/2, panel->icon->height/2, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[3], WMGetPixmapMaskXID(panel->icon),
|
||||
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||
WMSetLabelImage(panel->icornerL, nicon);
|
||||
WMReleasePixmap(nicon);
|
||||
}
|
||||
|
||||
panel->hcactionsT[3] = WMCreateTextField(panel->hcactionsF);
|
||||
WMResizeWidget(panel->hcactionsT[3], 180, 20);
|
||||
WMMoveWidget(panel->hcactionsT[3], 50, 107);
|
||||
|
||||
WMMapSubwidgets(panel->hcactionsF);
|
||||
|
||||
if (xis)
|
||||
RReleaseImage(xis);
|
||||
XFreeGC(scr->display, gc);
|
||||
|
||||
WMRealizeWidget(panel->box);
|
||||
WMMapSubwidgets(panel->box);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
static void prepareForClose(_Panel *panel)
|
||||
{
|
||||
int i;
|
||||
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||
|
||||
WMReleasePixmap(panel->icon);
|
||||
for (i = 0; i < sizeof(panel->quarter) / sizeof(Pixmap); i++)
|
||||
XFreePixmap(scr->display, panel->quarter[i]);
|
||||
}
|
||||
|
||||
Panel *InitHotCornerShortcuts(WMWidget *parent)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Hot Corner Shortcut Preferences");
|
||||
panel->description = _("Choose actions to perform when you move the\n"
|
||||
"mouse pointer to the screen corners.");
|
||||
panel->parent = parent;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
panel->callbacks.prepareForClose = prepareForClose;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
+3
-3
@@ -195,8 +195,8 @@ static void showData(_Panel * panel)
|
||||
|
||||
if (i < 0)
|
||||
i = 0;
|
||||
else if (i > 9)
|
||||
i = 9;
|
||||
else if (i > 29)
|
||||
i = 29;
|
||||
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
|
||||
|
||||
/* Mini-Previews for Icons */
|
||||
@@ -339,7 +339,7 @@ static void createPanel(Panel * p)
|
||||
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
||||
WMResizeWidget(panel->sizeP, 80, 20);
|
||||
WMMoveWidget(panel->sizeP, 10, 19);
|
||||
for (i = 24; i <= 96; i += 8) {
|
||||
for (i = 24; i <= 256; i += 8) {
|
||||
sprintf(buf, "%ix%i", i, i);
|
||||
WMAddPopUpButtonItem(panel->sizeP, buf);
|
||||
}
|
||||
|
||||
+176
-50
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "WPrefs.h"
|
||||
#include <ctype.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/XKBlib.h>
|
||||
@@ -65,7 +67,7 @@ typedef struct _Panel {
|
||||
* First parameter is the internal keyword known by WMaker
|
||||
* Second is the text displayed to the user
|
||||
*/
|
||||
static const struct {
|
||||
static struct keyOption {
|
||||
const char *key;
|
||||
const char *title;
|
||||
} keyOptions[] = {
|
||||
@@ -84,11 +86,12 @@ static const struct {
|
||||
{ "RHMaximizeKey", N_("Maximize active window right half") },
|
||||
{ "THMaximizeKey", N_("Maximize active window top half") },
|
||||
{ "BHMaximizeKey", N_("Maximize active window bottom half") },
|
||||
{ "LTCMaximizeKey", N_("Maximize active window left top corner") },
|
||||
{ "RTCMaximizeKey", N_("Maximize active window right top corner") },
|
||||
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") },
|
||||
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") },
|
||||
{ "MaximusKey", N_("Maximus: Tiled maximization ") },
|
||||
{ "TLCMaximizeKey", N_("Maximize active window top left corner") },
|
||||
{ "TRCMaximizeKey", N_("Maximize active window top right corner") },
|
||||
{ "BLCMaximizeKey", N_("Maximize active window bottom left corner") },
|
||||
{ "BRCMaximizeKey", N_("Maximize active window bottom right corner") },
|
||||
{ "MaximusKey", N_("Tile active window") },
|
||||
{ "CenterKey", N_("Center active window") },
|
||||
{ "KeepOnTopKey", N_("Toggle window on top status") },
|
||||
{ "KeepAtBottomKey",N_("Toggle window at bottom status") },
|
||||
{ "OmnipresentKey", N_("Toggle window omnipresent status") },
|
||||
@@ -154,10 +157,14 @@ static const struct {
|
||||
|
||||
/* Misc. */
|
||||
{ "WindowRelaunchKey", N_("Launch new instance of application") },
|
||||
{ "ScreenSwitchKey", N_("Switch to Next Screen/Monitor") },
|
||||
{ "ScreenSwitchKey", N_("Switch to next screen/monitor") },
|
||||
{ "RunKey", N_("Run application") },
|
||||
{ "ExitKey", N_("Exit Window Maker") },
|
||||
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") },
|
||||
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") }
|
||||
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") },
|
||||
{ "ScreenCaptureKey", N_("Capture the entire screen") },
|
||||
{ "WindowCaptureKey", N_("Capture a window") },
|
||||
{ "PartialCaptureKey", N_("Capture a portion of the screen") }
|
||||
#ifdef XKB_MODELOCK
|
||||
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
|
||||
#endif /* XKB_MODELOCK */
|
||||
@@ -302,25 +309,61 @@ static int NumLockMask(Display *dpy)
|
||||
return mask;
|
||||
}
|
||||
|
||||
/* Append the modifier prefix and key name to the keybuf */
|
||||
static void build_key_combo(unsigned int xkstate, const char *keyname,
|
||||
unsigned int numlock_mask, char keybuf[64])
|
||||
{
|
||||
if (xkstate & ControlMask)
|
||||
strcat(keybuf, "Control+");
|
||||
if (xkstate & ShiftMask)
|
||||
strcat(keybuf, "Shift+");
|
||||
if ((numlock_mask != Mod1Mask) && (xkstate & Mod1Mask))
|
||||
strcat(keybuf, "Mod1+");
|
||||
if ((numlock_mask != Mod2Mask) && (xkstate & Mod2Mask))
|
||||
strcat(keybuf, "Mod2+");
|
||||
if ((numlock_mask != Mod3Mask) && (xkstate & Mod3Mask))
|
||||
strcat(keybuf, "Mod3+");
|
||||
if ((numlock_mask != Mod4Mask) && (xkstate & Mod4Mask))
|
||||
strcat(keybuf, "Mod4+");
|
||||
if ((numlock_mask != Mod5Mask) && (xkstate & Mod5Mask))
|
||||
strcat(keybuf, "Mod5+");
|
||||
wstrlcat(keybuf, keyname, 64);
|
||||
}
|
||||
|
||||
/*
|
||||
* Interactively capture a key shortcut or keychain,
|
||||
* function waits KeychainTimeoutDelay or 300 ms after
|
||||
* each key press for another key in the chain,
|
||||
* and returns the full key specification string.
|
||||
*/
|
||||
char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
||||
{
|
||||
XEvent ev;
|
||||
KeySym ksym, lksym, uksym;
|
||||
char buffer[64];
|
||||
char *key = NULL;
|
||||
/* Large enough for several chained chords */
|
||||
char buffer[512];
|
||||
char keybuf[64];
|
||||
char *key;
|
||||
unsigned int numlock_mask;
|
||||
Bool have_key = False;
|
||||
Bool chain_mode;
|
||||
int timeout_ms;
|
||||
|
||||
timeout_ms = GetIntegerForKey("KeychainTimeoutDelay");
|
||||
if (timeout_ms <= 0)
|
||||
timeout_ms = 300;
|
||||
|
||||
buffer[0] = '\0';
|
||||
|
||||
/* ---- Phase 1: capture the first key (blocking) ---- */
|
||||
while (*capturing) {
|
||||
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
||||
WMNextEvent(dpy, &ev);
|
||||
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
||||
numlock_mask = NumLockMask(dpy);
|
||||
|
||||
if (xext_xkb_supported)
|
||||
/* conditional mask check to get numeric keypad keys */
|
||||
ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, ev.xkey.state & numlock_mask?1:0);
|
||||
else
|
||||
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0);
|
||||
/* conditional mask check to get numeric keypad keys */
|
||||
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
|
||||
|
||||
if (!IsModifierKey(ksym)) {
|
||||
if (convert_case) {
|
||||
@@ -330,44 +373,95 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
||||
key = XKeysymToString(ksym);
|
||||
}
|
||||
|
||||
*capturing = 0;
|
||||
keybuf[0] = '\0';
|
||||
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
|
||||
wstrlcat(buffer, keybuf, sizeof(buffer));
|
||||
have_key = True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
|
||||
if (!key)
|
||||
/* ---- Phase 2: collect additional chain keys with timeout ---- */
|
||||
chain_mode = (timeout_ms > 0);
|
||||
while (*capturing && chain_mode) {
|
||||
int xfd = ConnectionNumber(dpy);
|
||||
fd_set rfds;
|
||||
struct timeval tv;
|
||||
|
||||
if (!XPending(dpy)) {
|
||||
FD_ZERO(&rfds);
|
||||
FD_SET(xfd, &rfds);
|
||||
tv.tv_sec = timeout_ms / 1000;
|
||||
tv.tv_usec = (timeout_ms % 1000) * 1000;
|
||||
XFlush(dpy);
|
||||
if (select(xfd + 1, &rfds, NULL, NULL, &tv) == 0)
|
||||
break; /* timeout: the chain is complete */
|
||||
}
|
||||
|
||||
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
||||
WMNextEvent(dpy, &ev);
|
||||
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
||||
numlock_mask = NumLockMask(dpy);
|
||||
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode,
|
||||
ev.xkey.state & numlock_mask ? 1 : 0);
|
||||
|
||||
if (!IsModifierKey(ksym)) {
|
||||
if (convert_case) {
|
||||
XConvertCase(ksym, &lksym, &uksym);
|
||||
key = XKeysymToString(uksym);
|
||||
} else {
|
||||
key = XKeysymToString(ksym);
|
||||
}
|
||||
|
||||
keybuf[0] = '\0';
|
||||
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
|
||||
wstrlcat(buffer, " ", sizeof(buffer));
|
||||
wstrlcat(buffer, keybuf, sizeof(buffer));
|
||||
}
|
||||
} else {
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
}
|
||||
|
||||
if (!have_key || !*capturing)
|
||||
return NULL;
|
||||
|
||||
buffer[0] = 0;
|
||||
|
||||
if (ev.xkey.state & ControlMask)
|
||||
strcat(buffer, "Control+");
|
||||
|
||||
if (ev.xkey.state & ShiftMask)
|
||||
strcat(buffer, "Shift+");
|
||||
|
||||
if ((numlock_mask != Mod1Mask) && (ev.xkey.state & Mod1Mask))
|
||||
strcat(buffer, "Mod1+");
|
||||
|
||||
if ((numlock_mask != Mod2Mask) && (ev.xkey.state & Mod2Mask))
|
||||
strcat(buffer, "Mod2+");
|
||||
|
||||
if ((numlock_mask != Mod3Mask) && (ev.xkey.state & Mod3Mask))
|
||||
strcat(buffer, "Mod3+");
|
||||
|
||||
if ((numlock_mask != Mod4Mask) && (ev.xkey.state & Mod4Mask))
|
||||
strcat(buffer, "Mod4+");
|
||||
|
||||
if ((numlock_mask != Mod5Mask) && (ev.xkey.state & Mod5Mask))
|
||||
strcat(buffer, "Mod5+");
|
||||
|
||||
wstrlcat(buffer, key, sizeof(buffer));
|
||||
|
||||
*capturing = 0;
|
||||
return wstrdup(buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
* check if the keystr entered is already set to another action
|
||||
* if found it returns the position in the keyOptions
|
||||
*/
|
||||
static int isKeySet(_Panel *panel, char *keystr)
|
||||
{
|
||||
int i;
|
||||
char *str;
|
||||
|
||||
for (i = 0; i < panel->actionCount; i++) {
|
||||
str = NULL;
|
||||
if (panel->shortcuts[i]) {
|
||||
str = wtrimspace(panel->shortcuts[i]);
|
||||
if (strlen(str) == 0) {
|
||||
wfree(str);
|
||||
str = NULL;
|
||||
}
|
||||
}
|
||||
if (str) {
|
||||
if (strcmp(keystr, str) == 0) {
|
||||
wfree(str);
|
||||
return i;
|
||||
}
|
||||
wfree(str);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void captureClick(WMWidget * w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel *) data;
|
||||
@@ -382,23 +476,37 @@ static void captureClick(WMWidget * w, void *data)
|
||||
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
shortcut = capture_shortcut(dpy, &panel->capturing, 1);
|
||||
if (shortcut) {
|
||||
int key_idx = -1;
|
||||
int row = WMGetListSelectedItemRow(panel->actLs);
|
||||
|
||||
WMSetTextFieldText(panel->shoT, shortcut);
|
||||
if (row >= 0) {
|
||||
if (panel->shortcuts[row])
|
||||
wfree(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = shortcut;
|
||||
key_idx = isKeySet(panel, shortcut);
|
||||
if (key_idx >= 0 && (key_idx != row)) {
|
||||
char *msg;
|
||||
|
||||
WMRedisplayWidget(panel->actLs);
|
||||
} else {
|
||||
msg = wstrconcat(_("Key shortcut already in use by the "), _(keyOptions[key_idx].title));
|
||||
WMRunAlertPanel(WMWidgetScreen(w), GetWindow(),
|
||||
_("Error"),
|
||||
msg,
|
||||
_("OK"), NULL, NULL);
|
||||
wfree(msg);
|
||||
wfree(shortcut);
|
||||
} else {
|
||||
WMSetTextFieldText(panel->shoT, shortcut);
|
||||
if (row >= 0) {
|
||||
if (panel->shortcuts[row])
|
||||
wfree(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = shortcut;
|
||||
|
||||
WMRedisplayWidget(panel->actLs);
|
||||
} else {
|
||||
wfree(shortcut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
panel->capturing = 0;
|
||||
WMSetButtonText(w, _("Capture"));
|
||||
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key."));
|
||||
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key(s)."));
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
}
|
||||
|
||||
@@ -410,6 +518,9 @@ static void clearShortcut(WMWidget * w, void *data)
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
/* Cancel any ongoing capture so the keychain loop is unblocked */
|
||||
panel->capturing = 0;
|
||||
|
||||
WMSetTextFieldText(panel->shoT, NULL);
|
||||
|
||||
if (row >= 0) {
|
||||
@@ -499,6 +610,20 @@ static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int stat
|
||||
WMDrawString(scr, d, panel->black, panel->font, x + 20, y, text, strlen(text));
|
||||
}
|
||||
|
||||
static int cmpKeyOptions(const void *v1, const void *v2)
|
||||
{
|
||||
int rc;
|
||||
const struct keyOption *opt1 = (struct keyOption *)v1;
|
||||
const struct keyOption *opt2 = (struct keyOption *)v2;
|
||||
|
||||
if ((rc = strncmp(opt1->title, opt2->title, 20)) < 0)
|
||||
return -1;
|
||||
else if (rc > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void createPanel(Panel * p)
|
||||
{
|
||||
_Panel *panel = (_Panel *) p;
|
||||
@@ -538,6 +663,7 @@ static void createPanel(Panel * p)
|
||||
WMSetListUserDrawProc(panel->actLs, paintItem);
|
||||
WMHangData(panel->actLs, panel);
|
||||
|
||||
qsort(keyOptions, wlengthof(keyOptions), sizeof(keyOptions[0]), cmpKeyOptions);
|
||||
for (i = 0; i < wlengthof(keyOptions); i++) {
|
||||
WMAddListItem(panel->actLs, _(keyOptions[i].title));
|
||||
}
|
||||
|
||||
+16
-3
@@ -10,9 +10,20 @@ wpdatadir = @wprefs_datadir@
|
||||
|
||||
wpdata_DATA = WPrefs.tiff WPrefs.xpm
|
||||
|
||||
applicationsdir = @datadir@/applications
|
||||
|
||||
applications_DATA = WPrefs.desktop
|
||||
|
||||
WPrefs.desktop: WPrefs.desktop.in
|
||||
$(AM_V_GEN)sed -e "s:#wprefs_bindir#:${wprefs_bindir}:" \
|
||||
-e "s:#wprefs_datadir#:${wprefs_datadir}:" $< > $@
|
||||
|
||||
EXTRA_DIST = $(wpdata_DATA) \
|
||||
KeyboardSettings.c \
|
||||
Themes.c
|
||||
Themes.c \
|
||||
WPrefs.desktop.in
|
||||
|
||||
DISTCLEANFILES = WPrefs.desktop
|
||||
|
||||
WPrefs_SOURCES = \
|
||||
main.c \
|
||||
@@ -24,6 +35,7 @@ WPrefs_SOURCES = \
|
||||
Expert.c \
|
||||
Focus.c \
|
||||
FontSimple.c \
|
||||
HotCornerShortcuts.c \
|
||||
Icons.c \
|
||||
KeyboardShortcuts.c \
|
||||
Menu.c \
|
||||
@@ -45,10 +57,11 @@ WPrefs_SOURCES = \
|
||||
# KeyboardSettings.c \
|
||||
# Themes.c
|
||||
|
||||
AM_CFLAGS =
|
||||
AM_CFLAGS = @PANGO_CFLAGS@
|
||||
|
||||
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
|
||||
-I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
||||
-I$(top_builddir)/wrlib -I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
|
||||
@HEADER_SEARCH_PATH@
|
||||
|
||||
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||
|
||||
|
||||
+31
-12
@@ -291,6 +291,8 @@ static void changedItemPad(WMWidget * w, void *data)
|
||||
_Panel *panel = (_Panel *) data;
|
||||
int padn = WMGetPopUpButtonSelectedItem(w);
|
||||
|
||||
if (padn < 0)
|
||||
return;
|
||||
WMUnmapWidget(panel->itemPad[panel->currentPad]);
|
||||
WMMapWidget(panel->itemPad[padn]);
|
||||
|
||||
@@ -507,7 +509,7 @@ static void createPanel(_Panel * p)
|
||||
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
||||
|
||||
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
|
||||
data->param.pipe.command = "/etc/GNUstep/Defaults/menu.hook";
|
||||
data->param.pipe.command = "/etc/" GSUSER_SUBDIR "/" DEFAULTS_SUBDIR "/menu.hook";
|
||||
|
||||
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
|
||||
data->param.pipe.command = "wmconfig --output wmaker";
|
||||
@@ -518,19 +520,25 @@ static void createPanel(_Panel * p)
|
||||
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
|
||||
data->param.directory.command = "setstyle";
|
||||
data->param.directory.directory =
|
||||
"/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
|
||||
"/usr/share/" PACKAGE_TARNAME "/Themes"
|
||||
" /usr/local/share/" PACKAGE_TARNAME "/Themes"
|
||||
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Themes";
|
||||
data->param.directory.stripExt = 1;
|
||||
|
||||
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
|
||||
data->param.directory.command = "wmsetbg -u -s";
|
||||
data->param.directory.directory =
|
||||
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
|
||||
"/opt/kde2/share/wallpapers"
|
||||
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
|
||||
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
|
||||
data->param.directory.stripExt = 1;
|
||||
|
||||
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
|
||||
data->param.directory.command = "wmsetbg -u -t";
|
||||
data->param.directory.directory =
|
||||
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
|
||||
"/opt/kde2/share/wallpapers"
|
||||
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
|
||||
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
|
||||
data->param.directory.stripExt = 1;
|
||||
|
||||
smenu = putNewSubmenu(pad, _("Assorted XTerms"));
|
||||
@@ -619,7 +627,8 @@ static void createPanel(_Panel * p)
|
||||
WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
|
||||
"or a list of directories with the programs you\n"
|
||||
"want to have listed in the menu. Ex:\n"
|
||||
"~/GNUstep/Library/WindowMaker/menu\n" "or\n" "/usr/bin ~/xbin"));
|
||||
"~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/menu\n"
|
||||
"or\n" "/usr/bin ~/xbin"));
|
||||
|
||||
WMMapSubwidgets(panel->pathF);
|
||||
|
||||
@@ -914,6 +923,11 @@ static ItemData *parseCommand(WMPropList * item)
|
||||
|
||||
data->type = ExecInfo;
|
||||
|
||||
if (parameter == NULL) {
|
||||
wfree(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->param.exec.command = wstrdup(parameter);
|
||||
if (shortcut)
|
||||
data->param.exec.shortcut = wstrdup(shortcut);
|
||||
@@ -926,6 +940,12 @@ static ItemData *parseCommand(WMPropList * item)
|
||||
* |pipe
|
||||
*/
|
||||
p = parameter;
|
||||
|
||||
if (p == NULL) {
|
||||
wfree(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (isspace(*p) && *p)
|
||||
p++;
|
||||
if (*p == '|') {
|
||||
@@ -1482,16 +1502,11 @@ static WMPropList *getDefaultMenu(_Panel * panel)
|
||||
|
||||
static void showData(_Panel * panel)
|
||||
{
|
||||
const char *gspath;
|
||||
char *menuPath, *labelText;
|
||||
char buf[1024];
|
||||
WMPropList *pmenu;
|
||||
|
||||
gspath = wusergnusteppath();
|
||||
|
||||
menuPath = wmalloc(strlen(gspath) + 32);
|
||||
strcpy(menuPath, gspath);
|
||||
strcat(menuPath, "/Defaults/WMRootMenu");
|
||||
menuPath = wdefaultspathfordomain("WMRootMenu");
|
||||
|
||||
pmenu = WMReadPropListFromFile(menuPath);
|
||||
|
||||
@@ -1502,8 +1517,12 @@ static void showData(_Panel * panel)
|
||||
|
||||
path = wexpandpath(WMGetFromPLString(pmenu));
|
||||
|
||||
if (access(path, F_OK) < 0)
|
||||
if (access(path, F_OK) < 0) {
|
||||
char *old_path = path;
|
||||
|
||||
path = wfindfile(DEF_CONFIG_PATHS, path);
|
||||
wfree(old_path);
|
||||
}
|
||||
|
||||
/* TODO: if needed, concatenate locale suffix to path.
|
||||
See getLocalizedMenuFile() in src/rootmenu.c. */
|
||||
|
||||
@@ -381,10 +381,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
|
||||
if (mapping->modifiermap[idx] != 0) {
|
||||
int l;
|
||||
for (l = 0; l < 4; l++) {
|
||||
if (xext_xkb_supported)
|
||||
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
|
||||
else
|
||||
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0);
|
||||
ksym = W_KeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
||||
if (ksym != NoSymbol)
|
||||
break;
|
||||
}
|
||||
@@ -650,7 +647,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
||||
umask(permissions);
|
||||
permissions = (S_IRWXU | S_IRWXG | S_IRWXO) & (~permissions);
|
||||
|
||||
path = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart");
|
||||
path = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart");
|
||||
|
||||
f = fopen(path, "rb");
|
||||
if (!f) {
|
||||
@@ -668,7 +665,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
||||
char *tmppath;
|
||||
FILE *fo;
|
||||
|
||||
tmppath = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart.tmp");
|
||||
tmppath = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart.tmp");
|
||||
fo = fopen(tmppath, "wb");
|
||||
if (!fo) {
|
||||
werror(_("could not create temporary file %s"), tmppath);
|
||||
@@ -751,6 +748,8 @@ static void storeData(_Panel * panel)
|
||||
int action;
|
||||
|
||||
action = WMGetPopUpButtonSelectedItem(panel->mouse_action[i].popup);
|
||||
if (action < 0)
|
||||
continue;
|
||||
if (button_list[i].type == T_BUTTON)
|
||||
db_value = button_actions[action].db_value;
|
||||
else
|
||||
|
||||
+6
-6
@@ -77,11 +77,11 @@ static void showData(_Panel * panel)
|
||||
if (array)
|
||||
wwarning(_("bad value in option IconPath. Using default path list"));
|
||||
addPathToList(panel->icoL, -1, "~/pixmaps");
|
||||
addPathToList(panel->icoL, -1, "~/GNUstep/Library/Icons");
|
||||
addPathToList(panel->icoL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/Icons");
|
||||
addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
|
||||
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Icons");
|
||||
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Pixmaps");
|
||||
addPathToList(panel->icoL, -1, "/usr/share/WindowMaker/Icons");
|
||||
addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Icons");
|
||||
addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
|
||||
addPathToList(panel->icoL, -1, "/usr/share/" PACKAGE_TARNAME "/Icons");
|
||||
} else {
|
||||
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
||||
val = WMGetFromPLArray(array, i);
|
||||
@@ -94,8 +94,8 @@ static void showData(_Panel * panel)
|
||||
if (array)
|
||||
wwarning(_("bad value in option PixmapPath. Using default path list"));
|
||||
addPathToList(panel->pixL, -1, "~/pixmaps");
|
||||
addPathToList(panel->pixL, -1, "~/GNUstep/Library/WindowMaker/Pixmaps");
|
||||
addPathToList(panel->pixL, -1, "/usr/local/share/WindowMaker/Pixmaps");
|
||||
addPathToList(panel->pixL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Pixmaps");
|
||||
addPathToList(panel->pixL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
|
||||
} else {
|
||||
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
||||
val = WMGetFromPLArray(array, i);
|
||||
|
||||
@@ -196,9 +196,13 @@ static void storeData(_Panel * panel)
|
||||
int i;
|
||||
|
||||
i = WMGetPopUpButtonSelectedItem(panel->sizeP);
|
||||
if (i < 0)
|
||||
return;
|
||||
SetStringForKey(resize_display[i].db_value, "ResizeDisplay");
|
||||
|
||||
i = WMGetPopUpButtonSelectedItem(panel->posiP);
|
||||
if (i < 0)
|
||||
return;
|
||||
SetStringForKey(move_display[i].db_value, "MoveDisplay");
|
||||
|
||||
lr = WMGetButtonSelected(panel->lrB);
|
||||
@@ -280,14 +284,14 @@ static void createPanel(Panel * p)
|
||||
|
||||
/***************** Options ****************/
|
||||
panel->optF = WMCreateFrame(panel->box);
|
||||
WMResizeWidget(panel->optF, 255, 94);
|
||||
WMResizeWidget(panel->optF, 255, 96);
|
||||
WMMoveWidget(panel->optF, 15, 125);
|
||||
WMSetFrameTitle(panel->optF, _("AppIcon bouncing"));
|
||||
|
||||
for (i = 0; i < wlengthof(appicon_bouncing); i++) {
|
||||
panel->bounceB[i] = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->bounceB[i], 237, 26);
|
||||
WMMoveWidget(panel->bounceB[i], 9, 14 + i * 25);
|
||||
WMMoveWidget(panel->bounceB[i], 9, 16 + i * 26);
|
||||
WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label));
|
||||
|
||||
if (appicon_bouncing[i].default_value)
|
||||
@@ -302,7 +306,7 @@ static void createPanel(Panel * p)
|
||||
|
||||
/***************** Workspace border ****************/
|
||||
panel->borderF = WMCreateFrame(panel->box);
|
||||
WMResizeWidget(panel->borderF, 220, 75);
|
||||
WMResizeWidget(panel->borderF, 220, 77);
|
||||
WMMoveWidget(panel->borderF, 285, 144);
|
||||
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
||||
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
|
||||
WPrefs.app is the preferences "editor" for the WindowMaker window
|
||||
manager. It can be used to set most of the preference options of WindowMaker
|
||||
and define it's applications menu. It also can change some settings
|
||||
and define its applications menu. It also can change some settings
|
||||
that do not belong to WindowMaker.
|
||||
|
||||
Although WPrefs.app is designed to be easy to use, you should read the
|
||||
@@ -16,7 +16,7 @@ of WindowMaker that are not related to configuration.
|
||||
|
||||
To run WPrefs, do not put it in your search path. Instead, run it
|
||||
with the full path, like /usr/local/GNUstep/Applications/WPrefs.app/WPrefs
|
||||
Then, dock it's application icon. The dock will automatically detect it's
|
||||
Then, dock its application icon. The dock will automatically detect its
|
||||
icon and use it.
|
||||
|
||||
If you change configuration often, you might want to leave WPrefs
|
||||
@@ -46,7 +46,7 @@ The mouse speed configuration is saved as a call for xset in
|
||||
~/G/D/L/W/autostart. WindowMaker calls this file when it is started.
|
||||
|
||||
If you don't want or can't use the menu definition section, do not
|
||||
open it's section (or if you do open it, do not Save), or WPrefs will
|
||||
open its section (or if you do open it, do not Save), or WPrefs will
|
||||
overwrite your ~/G/D/WMRootMenu file.
|
||||
|
||||
Only options that have different values than what is found in the
|
||||
|
||||
@@ -689,7 +689,7 @@ static void changeTypeCallback(WMWidget *w, void *data)
|
||||
int i;
|
||||
|
||||
newType = WMGetPopUpButtonSelectedItem(w);
|
||||
if (newType == panel->currentType)
|
||||
if (newType < 0 || newType == panel->currentType)
|
||||
return;
|
||||
|
||||
if (panel->currentType >= 0) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "WPrefs.h"
|
||||
#include <assert.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#ifdef HAVE_STDNORETURN
|
||||
#include <stdnoreturn.h>
|
||||
@@ -516,6 +517,9 @@ void Initialize(WMScreen * scr)
|
||||
char **list;
|
||||
int i;
|
||||
char *path;
|
||||
long pid;
|
||||
Atom net_wm_pid;
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
|
||||
list = RSupportedFileFormats();
|
||||
for (i = 0; list[i] != NULL; i++) {
|
||||
@@ -547,6 +551,11 @@ void Initialize(WMScreen * scr)
|
||||
|
||||
WMRealizeWidget(WPrefs.win);
|
||||
|
||||
net_wm_pid = XInternAtom(dpy, "_NET_WM_PID", False);
|
||||
pid = (long)getpid();
|
||||
XChangeProperty(dpy, WMWidgetXID(WPrefs.win), net_wm_pid, XA_CARDINAL,
|
||||
32, PropModeReplace, (unsigned char *)&pid, 1);
|
||||
|
||||
WMSetWindowMiniwindowImage(WPrefs.win, WMGetApplicationIconImage(scr));
|
||||
|
||||
WMMapWidget(WPrefs.win);
|
||||
@@ -575,6 +584,7 @@ void Initialize(WMScreen * scr)
|
||||
InitKeyboardSettings(WPrefs.banner);
|
||||
#endif
|
||||
InitKeyboardShortcuts(WPrefs.banner);
|
||||
InitHotCornerShortcuts(WPrefs.banner);
|
||||
InitMouseSettings(WPrefs.banner);
|
||||
|
||||
InitAppearance(WPrefs.banner);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Version=1.5
|
||||
Type=Application
|
||||
Name=WPrefs
|
||||
Comment=Window Maker Preferences
|
||||
TryExec=#wprefs_bindir#/WPrefs
|
||||
Exec=WPrefs
|
||||
Icon=#wprefs_datadir#/WPrefs.xpm
|
||||
Categories=Settings;DesktopSettings;
|
||||
+2
-1
@@ -33,6 +33,7 @@
|
||||
#include <wraster.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
/* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
|
||||
#include "../src/wconfig.h"
|
||||
@@ -54,7 +55,6 @@
|
||||
/****/
|
||||
|
||||
extern char *NOptionValueChanged;
|
||||
extern Bool xext_xkb_supported;
|
||||
|
||||
typedef struct _Panel Panel;
|
||||
|
||||
@@ -155,6 +155,7 @@ Panel *InitDocks(WMWidget *parent);
|
||||
Panel *InitExpert(WMWidget *parent);
|
||||
Panel *InitFocus(WMWidget *parent);
|
||||
Panel *InitFontSimple(WMWidget *parent);
|
||||
Panel *InitHotCornerShortcuts(WMWidget *parent);
|
||||
Panel *InitIcons(WMWidget *parent);
|
||||
Panel *InitKeyboardShortcuts(WMWidget *parent);
|
||||
Panel *InitMenu(WMWidget *parent);
|
||||
|
||||
@@ -207,12 +207,15 @@ static void createPanel(Panel * p)
|
||||
|
||||
static void storeData(_Panel * panel)
|
||||
{
|
||||
int tmp = WMGetPopUpButtonSelectedItem(panel->posP);
|
||||
|
||||
if (tmp < 0)
|
||||
return;
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
||||
|
||||
SetStringForKey(WSNamePositions[WMGetPopUpButtonSelectedItem(panel->posP)],
|
||||
"WorkspaceNameDisplayPosition");
|
||||
SetStringForKey(WSNamePositions[tmp], "WorkspaceNameDisplayPosition");
|
||||
}
|
||||
|
||||
Panel *InitWorkspace(WMWidget *parent)
|
||||
|
||||
@@ -1150,7 +1150,7 @@ static void dragItem(WEditMenu * menu, WEditMenuItem * item, Bool copy)
|
||||
static XColor back = { 0, 0xffff, 0xffff, 0xffff, DoRed | DoGreen | DoBlue, 0 };
|
||||
Display *dpy = W_VIEW_DISPLAY(menu->view);
|
||||
WMScreen *scr = W_VIEW_SCREEN(menu->view);
|
||||
int x, y;
|
||||
int x = 0, y = 0;
|
||||
int dx, dy;
|
||||
Bool done = False;
|
||||
Window blaw;
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#endif
|
||||
|
||||
char *NOptionValueChanged = "NOptionValueChanged";
|
||||
Bool xext_xkb_supported = False;
|
||||
|
||||
|
||||
#define MAX_DEATHS 64
|
||||
|
||||
@@ -157,8 +155,6 @@ int main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
xext_xkb_supported = XkbQueryExtension(dpy, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
WMPLSetCaseSensitive(False);
|
||||
|
||||
Initialize(scr);
|
||||
|
||||
@@ -5,7 +5,8 @@ CATALOGS = @WPREFSMOFILES@
|
||||
CLEANFILES = $(DOMAIN).pot $(CATALOGS)
|
||||
|
||||
EXTRA_DIST = bg.po ca.po cs.po de.po es.po et.po fi.po fr.po fy.po hr.po hu.po \
|
||||
it.po ja.po ko.po nl.po pt.po ru.po sk.po uk.po zh_CN.po zh_TW.po
|
||||
it.po ja.po ko.po nl.po pt.po ru.po sk.po sr.po tr.po uk.po zh_CN.po \
|
||||
zh_TW.po
|
||||
|
||||
POTFILES = \
|
||||
$(top_srcdir)/WPrefs.app/Appearance.c \
|
||||
@@ -14,6 +15,7 @@ POTFILES = \
|
||||
$(top_srcdir)/WPrefs.app/Expert.c \
|
||||
$(top_srcdir)/WPrefs.app/Focus.c \
|
||||
$(top_srcdir)/WPrefs.app/FontSimple.c \
|
||||
$(top_srcdir)/WPrefs.app/HotCornerShortcuts.c \
|
||||
$(top_srcdir)/WPrefs.app/Icons.c \
|
||||
$(top_srcdir)/WPrefs.app/KeyboardShortcuts.c \
|
||||
$(top_srcdir)/WPrefs.app/Menu.c \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
File Language Current Maintainer
|
||||
------------------------------------------------------------------------------
|
||||
pt.po Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
|
||||
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
|
||||
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
|
||||
fr.po French Bastien NOCERA <hadess@writeme.com>
|
||||
Hadess <hadess@infonie.fr>
|
||||
Antoine Hulin <antoine@origan.fdn.org>
|
||||
@@ -23,6 +23,7 @@ bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
|
||||
Anton Zinoviev <zinoviev@debian.org>
|
||||
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
||||
et.po Estonian Ivar Smolin <okul@linux.ee>
|
||||
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
|
||||
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
|
||||
nl.po Dutch Alwin <translations@ziggo.nl>
|
||||
fy.po Frisian Alwin <translations@ziggo.nl>
|
||||
sr.po Serbian Strahinya Radich <sr@strahinja.org>
|
||||
|
||||
@@ -8,6 +8,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-04-18 23:22+03:00\n"
|
||||
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
||||
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
||||
"Language: bg\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
@@ -14,6 +14,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2003-09-16 23:15+0200\n"
|
||||
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
@@ -16,6 +16,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-10-14 21:07+0000\n"
|
||||
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||
"Language-Team: czech <cs@li.org>\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
+2
-1
@@ -18,6 +18,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2010-02-02 10:49+0100\n"
|
||||
"Last-Translator: Carlos R. Mafra <crmafra@gmail.com>\n"
|
||||
"Language-Team: German <>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -819,7 +820,7 @@ msgstr "Clip in den Vor-/Hintergrund"
|
||||
|
||||
#: ../../WPrefs.app/KeyboardShortcuts.c:518
|
||||
msgid "Toggle keyboard language"
|
||||
msgstr "Tastatursbelegung ändern"
|
||||
msgstr "Tastaturbelegung ändern"
|
||||
|
||||
#: ../../WPrefs.app/KeyboardShortcuts.c:532
|
||||
msgid "Shortcut"
|
||||
|
||||
@@ -8,6 +8,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2003-09-19 03:05-0400\n"
|
||||
"Last-Translator: Alberto Giménez <algibe@teleline.es>\n"
|
||||
"Language-Team: Spanish \n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
+4
-3
@@ -8,6 +8,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-09-05 09:40+0200\n"
|
||||
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
|
||||
"Language-Team: Estonian <linux-ee@eenet.ee>\n"
|
||||
"Language: et\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -475,7 +476,7 @@ msgstr "Window Maker vőttis vastu signaali %i."
|
||||
|
||||
#: ../src/dialog.c:1707
|
||||
msgid ""
|
||||
" This fatal error occured probably due to a bug. Please fill the included "
|
||||
" This fatal error occurred probably due to a bug. Please fill the included "
|
||||
"BUGFORM and report it to bugs@windowmaker.info."
|
||||
msgstr ""
|
||||
" See fataalviga on arvatavasti pőhjustatud programmi veast. Palun täitke "
|
||||
@@ -1437,7 +1438,7 @@ msgstr "ei őnnestu käivitada alternatiivset aknahaldurit. Annan alla."
|
||||
|
||||
#: ../src/startup.c:419
|
||||
msgid ""
|
||||
"a fatal error has occured, probably due to a bug. Please fill the included "
|
||||
"a fatal error has occurred, probably due to a bug. Please fill the included "
|
||||
"BUGFORM and report it."
|
||||
msgstr ""
|
||||
"aset on leidnud fataalne viga, arvatavasti programmi viga. Palun täida "
|
||||
@@ -1671,7 +1672,7 @@ msgstr "Keela tiitliriba"
|
||||
msgid ""
|
||||
"Remove the titlebar of this window.\n"
|
||||
"To access the window commands menu of a window\n"
|
||||
"without it's titlebar, press Control+Esc (or the\n"
|
||||
"without its titlebar, press Control+Esc (or the\n"
|
||||
"equivalent shortcut, if you changed the default\n"
|
||||
"settings)."
|
||||
msgstr ""
|
||||
|
||||
@@ -11,6 +11,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-09-03 22:18+03:00\n"
|
||||
"Last-Translator: Tomi Kajala <tomi@iki.fi>\n"
|
||||
"Language-Team: Finnish <fi@li.org>\n"
|
||||
"Language: fi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
@@ -12,6 +12,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 1999-07-28 16:31-0100\n"
|
||||
"Last-Translator: Antoine Hulin <antoine.hulin@origan.fdn.org>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
@@ -9,6 +9,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 1998-08-24 14:36:41-0300\n"
|
||||
"Last-Translator: Toni Bilić tbilic@oliver.efos.hr \n"
|
||||
"Language-Team: Croatian \n"
|
||||
"Language: hr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2014-02-18 00:33+0100\n"
|
||||
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"Language: \n"
|
||||
"Language: hu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
@@ -11,6 +11,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2001-05-21\n"
|
||||
"Last-Translator: Michele Campeotto <micampe@f2s.com\n"
|
||||
"Language-Team: Italian\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
@@ -12,6 +12,7 @@ msgstr ""
|
||||
"PO-Revision-Date: 2013-08-13 19:26+0900\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Korean\n"
|
||||
"Language: ko\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user