mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-30 12:34:07 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 02d2d0f2e3 | |||
| 58561dc08a | |||
| 54aae6c062 |
-45
@@ -30,8 +30,6 @@ m4/ltversion.m4
|
|||||||
m4/lt~obsolete.m4
|
m4/lt~obsolete.m4
|
||||||
|
|
||||||
src/wconfig.h
|
src/wconfig.h
|
||||||
WINGs/WINGs/WINGsP.h
|
|
||||||
wrlib/wraster.h
|
|
||||||
|
|
||||||
# These files are generated by scripts
|
# These files are generated by scripts
|
||||||
INSTALL-WMAKER
|
INSTALL-WMAKER
|
||||||
@@ -89,54 +87,11 @@ WINGs/WUtil.pc
|
|||||||
|
|
||||||
wrlib/libwraster.map
|
wrlib/libwraster.map
|
||||||
|
|
||||||
WindowMaker/appearance.menu
|
|
||||||
WindowMaker/menu
|
|
||||||
WindowMaker/menu.bg
|
|
||||||
WindowMaker/menu.fi
|
|
||||||
WindowMaker/menu.fy
|
|
||||||
WindowMaker/menu.hu
|
|
||||||
WindowMaker/menu.ko
|
|
||||||
WindowMaker/menu.nl
|
|
||||||
WindowMaker/menu.ro
|
|
||||||
WindowMaker/menu.sk
|
|
||||||
WindowMaker/menu.zh_TW
|
|
||||||
WindowMaker/plmenu
|
|
||||||
WindowMaker/plmenu.bg
|
|
||||||
WindowMaker/plmenu.es
|
|
||||||
WindowMaker/plmenu.fi
|
|
||||||
WindowMaker/plmenu.fy
|
|
||||||
WindowMaker/plmenu.ja
|
|
||||||
WindowMaker/plmenu.ko
|
|
||||||
WindowMaker/plmenu.nl
|
|
||||||
WindowMaker/plmenu.pl
|
|
||||||
WindowMaker/plmenu.ro
|
|
||||||
WindowMaker/plmenu.sk
|
|
||||||
WindowMaker/plmenu.zh_CN
|
|
||||||
WindowMaker/plmenu.zh_TW
|
|
||||||
WindowMaker/wmmacros
|
|
||||||
|
|
||||||
|
|
||||||
WindowMaker/Defaults/WMRootMenu
|
WindowMaker/Defaults/WMRootMenu
|
||||||
WindowMaker/Defaults/WMState
|
WindowMaker/Defaults/WMState
|
||||||
WindowMaker/Defaults/WMWindowAttributes
|
WindowMaker/Defaults/WMWindowAttributes
|
||||||
WindowMaker/Defaults/WindowMaker
|
WindowMaker/Defaults/WindowMaker
|
||||||
WindowMaker/IconSets/Default.iconset
|
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
|
# Some text editors generate backup files
|
||||||
*~
|
*~
|
||||||
|
|
||||||
.pc
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
If you find a bug please fill this form and send it to
|
If you find a bug please fill this form and send it to
|
||||||
wmaker-dev@googlegroups.com Please, USE THIS FORM!!!
|
wmaker-dev@lists.windowmaker.org Please, USE THIS FORM!!!
|
||||||
|
|
||||||
0. Before reporting this bug I already:
|
0. Before reporting this bug I already:
|
||||||
[ ] read the NEWS, README and INSTALL files
|
[ ] read the NEWS, README and INSTALL files
|
||||||
|
|||||||
@@ -1,95 +1,3 @@
|
|||||||
Changes since version 0.95.7:
|
|
||||||
.............................
|
|
||||||
|
|
||||||
- Build on Ubuntu 14.04
|
|
||||||
(Johann Haarhoff <johann@haarhoff.org.za>)
|
|
||||||
- Window Maker 0.95.7 Debian files
|
|
||||||
- create_appicon_from_dock checks if no_appicon flag is set
|
|
||||||
- New applications do not create Cached Icon
|
|
||||||
- Remove unused argument in save_appicon
|
|
||||||
- Avoid recreate Cached icon moving between docks
|
|
||||||
- Avoid create again a docked application cache icon
|
|
||||||
- save the icon filename instead the full path
|
|
||||||
- Remove cache icon when detached
|
|
||||||
- usermenu.c Avoid compiler warnings
|
|
||||||
- Enable usermenu
|
|
||||||
(Rodolfo GarcÃa Peñas (kix) <kix@kix.es>)
|
|
||||||
- wmaker: fixed infinite loop in switching within group
|
|
||||||
(Satya Mishra <qufgmx@gmail.com>)
|
|
||||||
- wmaker: Print error dialog when attempting to delete an in-use workspace.
|
|
||||||
(Doug Torrance <dtorrance@piedmont.edu>)
|
|
||||||
- debian: Ignore missing documentation for --runstatedir.
|
|
||||||
- debian: Use dh_autoreconf.
|
|
||||||
- debian: Simplify debian/rules.
|
|
||||||
- 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.
|
|
||||||
- debian: Add version 0.95.6-1.2 entry to changelog.
|
|
||||||
- debian: Update with final version of 0.95.7-1 packaging.
|
|
||||||
- wmaker: Maintain sorting of windows by workspace in switch menu.
|
|
||||||
- debian: Update with version 0.95.7-2 packaging.
|
|
||||||
- wmaker: Update copyright years in info panel.
|
|
||||||
- wmaker: Remove prototype for unused get_right_position_on_screen function.
|
|
||||||
- wmaker: Fix typos (used codespell).
|
|
||||||
- wmaker: Add option for window snap to top edge to maximize to full screen.
|
|
||||||
- wmaker: Use window placement settings on other workspaces.
|
|
||||||
- wmaker: Add keyboard shortcuts for keeping window on top or at bottom.
|
|
||||||
- wmaker: Display keyboard shortcuts for remaining options in window menu.
|
|
||||||
- wmaker: Fix whitespace in menu.h; passes checkpatch.pl inspection.
|
|
||||||
- wmaker: Implement basic menu shading.
|
|
||||||
(Doug Torrance <dtorrance@piedmont.edu>)
|
|
||||||
- Translations: Dutch language files updated
|
|
||||||
- Translations: Frisian language files updated
|
|
||||||
(Alwin <translations@ziggo.nl>)
|
|
||||||
- wmlib: Add pkg-config file.
|
|
||||||
- wmlib: Remove install-exec-local target.
|
|
||||||
- WPrefs: Code formatting in TexturePanel.c; minimizes checkpatch.pl warnings.
|
|
||||||
- WPrefs: Add support for fpixmap ("fillscale") texture.
|
|
||||||
- check-doc: Ignore runstatedir in check-cmdline-options-doc.sh
|
|
||||||
- check-doc: Ignore with-aix-soname in check-cmdline-options-doc.sh
|
|
||||||
- debian: Remove 56_ignore_runstatedir.diff.
|
|
||||||
- debian: Update with version 0.95.7-3 packaging.
|
|
||||||
- debian: Update with version 0.95.7-4 packaging.
|
|
||||||
- debian: Update with version 0.95.7-5 packaging.
|
|
||||||
- debian: Update with version 0.95.7-6 packaging.
|
|
||||||
- wmmenugen: Fix segfault; argv[argc] doesn't exist.
|
|
||||||
(Doug Torrance <dtorrance@piedmont.edu>)
|
|
||||||
- getstyle: fix wcopy_file paths
|
|
||||||
(Alexandru Lazar <alazar@startmail.com>)
|
|
||||||
- wmaker: fix stacking order of dock and fullscreen
|
|
||||||
- wmaker: allow alt+tabbed windows over fullscreen
|
|
||||||
(Bjørn Mork <bjorn@mork.no>)
|
|
||||||
- WPrefs: Update path for Debian menu
|
|
||||||
- Use wprefs_bindir output variable to set WPrefs path in menus.
|
|
||||||
- Remove WindowMaker/mkMakefile script.
|
|
||||||
- Don't try and add removed file mkMakefile to distribution tarball.
|
|
||||||
- Look for plmenu in build directory when creating WMRootMenu.
|
|
||||||
- debian: Update with version 0.95.7-7 packaging.
|
|
||||||
- configure: Use PKG_PROG_PKG_CONFIG macro to allow cross building.
|
|
||||||
(Doug Torrance <dtorrance@piedmont.edu>)
|
|
||||||
- Trivial cleanup: Removed unused defines.
|
|
||||||
(Roman Dobosz <gryf73@gmail.com>)
|
|
||||||
- Added 'head' parameter to wMaximizeWindow
|
|
||||||
- Added wGetHeadRelativeToCurrentHead function
|
|
||||||
- Added option for ability to move half-maximized between heads.
|
|
||||||
- Added possibility for half-maximized windows to move across the screens.
|
|
||||||
- Fixed wrong (re)stored dimensions for unmaximized window.
|
|
||||||
(gryf <gryf73@gmail.com>)
|
|
||||||
- Bugfix for moving windows between heads.
|
|
||||||
- New option for enabling alternative half-maximized window movement.
|
|
||||||
- Alternative way for traversing half-maximized windows.
|
|
||||||
- New option for moving mouse pointer along with half-maximized windows.
|
|
||||||
- Implementation for moving mouse pointer within the maximized window.
|
|
||||||
- Refactoring handleMaximize() function
|
|
||||||
- Removed trailing whitespaces from readme files.
|
|
||||||
- Fixed couple of compilator warning and removed unused macros.
|
|
||||||
(Roman Dobosz <gryf73@gmail.com>)
|
|
||||||
- wmaker: Do not place icons under the dock
|
|
||||||
(Cyrus Rahman <crahman@gmail.com>)
|
|
||||||
- debian: Update with version 0.95.7-8 packaging.
|
|
||||||
(Doug Torrance <dtorrance@piedmont.edu>)
|
|
||||||
|
|
||||||
Changes since version 0.95.6:
|
Changes since version 0.95.6:
|
||||||
.............................
|
.............................
|
||||||
|
|
||||||
@@ -488,51 +396,6 @@ Changes since version 0.95.6:
|
|||||||
- debian: Import version 0.95.6-1.
|
- debian: Import version 0.95.6-1.
|
||||||
- debian: Import version 0.95.6-1.1.
|
- debian: Import version 0.95.6-1.1.
|
||||||
(Doug Torrance <dtorrance@monmouthcollege.edu>)
|
(Doug Torrance <dtorrance@monmouthcollege.edu>)
|
||||||
- Import of (partly outdated) Ukrainian translations.
|
|
||||||
(Martin Dietze <mdietze@gmail.com>)
|
|
||||||
- Add folder with fedora .spec file
|
|
||||||
(Alexey I. Froloff <raorn@raorn.name>)
|
|
||||||
- make: Add Ukrainian translation files to EXTRA_DIST.
|
|
||||||
- wmiv: Add long command line options --help and --version.
|
|
||||||
- wmiv: Improve help text.
|
|
||||||
- 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 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
|
|
||||||
- WRaster: fix unused variable warning when XShm extention is not enabled
|
|
||||||
(Christophe CURIS <christophe.curis@free.fr>)
|
|
||||||
- New translation into Frisian for Window Maker
|
|
||||||
(Alwin <translations@ziggo.nl>)
|
|
||||||
- wrlib: fixed gcc version needed for deprecated attribute support
|
|
||||||
- Configure: increased the version of Automake requested
|
|
||||||
(Christophe CURIS <christophe.curis@free.fr>)
|
|
||||||
- configure: Fix output of libdir directory in summary
|
|
||||||
(Josip Deanovic <djosip+news@linuxpages.net>)
|
|
||||||
- wmaker: fix detection of legacy Apercu configuration keywords
|
|
||||||
- WPrefs: fix conversion of old "Apercu" setting to the new keywords
|
|
||||||
(Christophe CURIS <christophe.curis@free.fr>)
|
|
||||||
- wmaker: Allow window snapping and linked workspaces simultaneously.
|
|
||||||
- wmaker: Allow configuration of window snapping detect distances.
|
|
||||||
- WPrefs: Add ability to set integer values in Expert panel
|
|
||||||
- WPrefs: Add snap edge and corner detect to Expert panel.
|
|
||||||
(Doug Torrance <dtorrance@monmouthcollege.edu>)
|
|
||||||
- Translations: Dutch updates for WPrefs
|
|
||||||
- Translations: Frisian updates for WPrefs
|
|
||||||
(Alwin <translations@ziggo.nl>)
|
|
||||||
- configure: fixed incorrect variable name that prevented --disable-xdnd to
|
|
||||||
work
|
|
||||||
(Rodolfo GarcÃa Peñas (kix) <kix@kix.es>)
|
|
||||||
- Revert "wmaker: fix clearing of window attribute that was not saved properly"
|
|
||||||
- Disable pager by default
|
|
||||||
(Carlos R. Mafra <crmafra@gmail.com>)
|
|
||||||
- Allow using keypad Enter to commit move/resize
|
|
||||||
- Allow using numpad Enter key in dialogs for confirmation
|
|
||||||
(Amadeusz Sławiński <amade@asmblr.net>)
|
|
||||||
- Window Maker 0.95.7
|
|
||||||
(Carlos R. Mafra <crmafra@gmail.com>)
|
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.95.5:
|
Changes since version 0.95.5:
|
||||||
@@ -969,7 +832,7 @@ Changes since version 0.95.5:
|
|||||||
- WMaker: moved XGrab/XUngrabPointer into the conditional code
|
- WMaker: moved XGrab/XUngrabPointer into the conditional code
|
||||||
- News: created section dedicated to the changes related to 0.95.3
|
- 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 description of a change that may be interesting to users
|
||||||
- News: added section to describe the changes that have occurred in 0.95.4
|
- News: added section to describe the changes that have occured in 0.95.4
|
||||||
- News: marked the current changes as part of 0.95.5 and describe the drawers
|
- News: marked the current changes as part of 0.95.5 and describe the drawers
|
||||||
feature
|
feature
|
||||||
- News: described the new features for future 0.95.6 release
|
- News: described the new features for future 0.95.6 release
|
||||||
@@ -1103,7 +966,7 @@ Changes since version 0.95.5:
|
|||||||
#50158)
|
#50158)
|
||||||
- WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity
|
- WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity
|
||||||
#50200)
|
#50200)
|
||||||
- WPrefs: add warning when renderTexture encounters some unknown settings
|
- WPrefs: add warning when renderTexture encounters some unknow settings
|
||||||
(Christophe CURIS <christophe.curis@free.fr>)
|
(Christophe CURIS <christophe.curis@free.fr>)
|
||||||
- util/wmiv: add image auto orientation detection
|
- util/wmiv: add image auto orientation detection
|
||||||
(David Maciejak <david.maciejak@gmail.com>)
|
(David Maciejak <david.maciejak@gmail.com>)
|
||||||
@@ -4063,7 +3926,7 @@ Changes since version 0.17.5:
|
|||||||
icons
|
icons
|
||||||
- fixed bug in focusfollowmouse that made windows under the currently
|
- fixed bug in focusfollowmouse that made windows under the currently
|
||||||
focused window that close, to not get the focus
|
focused window that close, to not get the focus
|
||||||
- if the app is a .app, it will try to find its icon in the .app
|
- if the app is a .app, it will try to find it's icon in the .app
|
||||||
directory and save it in the WMWindowAttributes, so that the dock can use it.
|
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
|
- drag docklets that select for mouse events to with Alt+drag
|
||||||
|
|
||||||
@@ -4934,7 +4797,7 @@ Changes since version 0.3.2:
|
|||||||
|
|
||||||
- application icons (not mini-windows) like I think how it is on NEXTSTEP(tm)
|
- application icons (not mini-windows) like I think how it is on NEXTSTEP(tm)
|
||||||
- fixed "slippery" icon movement
|
- fixed "slippery" icon movement
|
||||||
- added a Dock (not for GNUstep, as it will have its own)
|
- added a Dock (not for GNUstep, as it will have it's own)
|
||||||
|
|
||||||
Changes since version 0.3.1:
|
Changes since version 0.3.1:
|
||||||
............................
|
............................
|
||||||
@@ -4964,7 +4827,7 @@ it's opened to select items, just drag the pointer
|
|||||||
- transient owners get a different titlebar color when the focus
|
- transient owners get a different titlebar color when the focus
|
||||||
is in the transient (e.g, in NeXTese: mainWindow is highlighted correctly when
|
is in the transient (e.g, in NeXTese: mainWindow is highlighted correctly when
|
||||||
the keyWindow is a panel)
|
the keyWindow is a panel)
|
||||||
- when transient is closed, its owner always get the focus
|
- when transient is closed, it's owner always get the focus
|
||||||
- fixed XGrabButton/BadAccess bug
|
- fixed XGrabButton/BadAccess bug
|
||||||
- fixed window_count error (this time I'm 90% sure)
|
- fixed window_count error (this time I'm 90% sure)
|
||||||
- fixed focusNextWindow through Alt-Tab bug with non-focusable windows
|
- 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.2 Where can I get Window Maker?
|
||||||
1.3 Where are the mailing list archives?
|
1.3 Where are the mailing list archives?
|
||||||
1.4 Where is more documentation on configuring Window Maker?
|
1.4 Where is more documentation on configuring Window Maker?
|
||||||
1.5 What is an appicon?
|
1.5 What is an App Icon?
|
||||||
1.6 How can I get a question added to the FAQ?
|
1.6 How can I get a question added to the FAQ?
|
||||||
1.7 How do I report bugs?
|
1.7 How do I report bugs?
|
||||||
1.8 Is there an anonymous cvs server?
|
1.8 Is there an anonymous cvs server?
|
||||||
@@ -134,7 +134,7 @@ Introduction:
|
|||||||
|
|
||||||
1.1 What is Window Maker?
|
1.1 What is Window Maker?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Window Maker is an elegant X11 window manager that emulates the
|
Window Maker is an elegant X11 window manger that emulates the
|
||||||
OpenStep desktop with some noticeable enhancements. Look at
|
OpenStep desktop with some noticeable enhancements. Look at
|
||||||
http://wm.current.nu/themes/my-themes.html and
|
http://wm.current.nu/themes/my-themes.html and
|
||||||
http://wm.current.nu/themes/screenshots.html
|
http://wm.current.nu/themes/screenshots.html
|
||||||
@@ -333,7 +333,7 @@ Window Maker distribution.
|
|||||||
|
|
||||||
The author Anthony Quinn <southgat@frontiernet.net> has released a
|
The author Anthony Quinn <southgat@frontiernet.net> has released a
|
||||||
version that works with Window Maker >= 0.15.x. It is available from
|
version that works with Window Maker >= 0.15.x. It is available from
|
||||||
its home page at http://www.frontiernet.net/~southgat/wmsound/
|
it's home page at http://www.frontiernet.net/~southgat/wmsound/
|
||||||
or on Largo's site at http://wm.current.nu/files.html#wmsound
|
or on Largo's site at http://wm.current.nu/files.html#wmsound
|
||||||
for your convenience.
|
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
|
To use it with CDE, read the answer for "How do I switch
|
||||||
CDE's window manager to use Window Maker?"
|
CDE's window manager to use Window Maker?"
|
||||||
|
|
||||||
To use it with KDE, read its documentation to get rid of kwm (and possibly
|
To use it with KDE, read it's documentation to get rid of kwm (and possibly
|
||||||
kpanel) and replace it with wmaker. Then, start WPrefs.app, go to "Mouse
|
kpanel) and replace it with wmaker. Then, start WPrefs.app, go to "Mouse
|
||||||
Preferences" and set the "Disable mouse actions" check box. You will
|
Preferences" and set the "Disable mouse actions" check box. You will
|
||||||
need to restart Window Maker to make this change take effect. The
|
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)
|
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
|
This should do it although I did have problems sometimes initially which I
|
||||||
fixed by randomly trying absolute paths for wmaker in .xsession/.xinitrc and/or
|
fixed by randomly trying absolute pathes for wmaker in .xsession/.xinitrc and/or
|
||||||
making the dtprofile/.xinitrc/etc executable. It helps logging in on the console
|
making the dtprofile/.xinitrc/etc executable. It helps logging in on the console
|
||||||
(select from CDE login screen) and start X manually using 'X'.
|
(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.
|
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.
|
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
|
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.
|
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
|
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.
|
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.
|
3.11 When I run GNOME application they have no title bar.
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
The GNOME toolkit decided to behave in its own way, so it draws its own title bar
|
The GNOME toolkit decided to behave his own way, so it draws its own title bar
|
||||||
with buttons, and asks Window Maker to not draw anything (title bar, resize bar,
|
with buttons, and asks Window Maker to not draw anything (title bar, resize bar,
|
||||||
close and miniaturise button, ...).
|
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)?
|
the dock)?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
You need to change 1 line to your ~/GNUstep/Defaults/WindowMaker file.
|
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.
|
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
|
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
|
does not work, dockit will not work either. Such applications violate the
|
||||||
ICCCM (Inter-Client Communication Conventions Manual) and are considered
|
ICCCM (Inter-Client Communication Conventions Manual) and are considered
|
||||||
badly coded for not setting the instance.class hints.
|
badly coded for not setting the instance.class hints.
|
||||||
@@ -898,7 +898,7 @@ NoAppIcon=Yes;
|
|||||||
|
|
||||||
4.9 How do I set a pixmap background?
|
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:
|
wmsetbg now accepts the following options:
|
||||||
usage: wmsetbg [-options] image
|
usage: wmsetbg [-options] image
|
||||||
@@ -1283,7 +1283,7 @@ WM_NORMAL_HINTS(WM_SIZE_HINTS):
|
|||||||
user specified size: 400 by 300
|
user specified size: 400 by 300
|
||||||
program specified minimum size: 400 by 300
|
program specified minimum size: 400 by 300
|
||||||
|
|
||||||
Now, when scilab opens its window, Window Maker nicely does exactly what it
|
Now, when scilab opens it's window, Window Maker nicely does exactly what it
|
||||||
is told, that is, map the window at position 136679205, 1074468360 which
|
is told, that is, map the window at position 136679205, 1074468360 which
|
||||||
obviously falls outside the screen no matter how big is your monitor ;)
|
obviously falls outside the screen no matter how big is your monitor ;)
|
||||||
|
|
||||||
@@ -1476,7 +1476,7 @@ Themes:
|
|||||||
8.1 What exactly are themes?
|
8.1 What exactly are themes?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Themes are a great aspect of Window Maker allowing a user to simply
|
Themes are a great aspect of Window Maker allowing a user to simply
|
||||||
save the entire 'look' of their desktop in an archive to distribute freely among
|
save the entire 'look' of their desktop in a Archive to distribute freely among
|
||||||
friends, fellow users and/or the whole net in general. :)
|
friends, fellow users and/or the whole net in general. :)
|
||||||
|
|
||||||
See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html
|
See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html
|
||||||
|
|||||||
+5
-43
@@ -19,19 +19,10 @@ config-paths.h: Makefile
|
|||||||
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
|
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
|
||||||
@echo '' >> $@
|
@echo '' >> $@
|
||||||
@echo '/* where shared data is stored */' >> $@
|
@echo '/* where shared data is stored */' >> $@
|
||||||
@echo '#define PKGDATADIR "$(datadir)/$(PACKAGE_TARNAME)"' >> $@
|
@echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
|
||||||
@echo '' >> $@
|
@echo '' >> $@
|
||||||
@echo '/* where the global defaults are stored */' >> $@
|
@echo '/* where the configuration is stored */' >> $@
|
||||||
@echo '#define PKGCONFDIR "$(pkgconfdir)"' >> $@
|
@echo '#define SYSCONFDIR "$(sysconfdir)"' >> $@
|
||||||
@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
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
@@ -50,13 +41,11 @@ EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \
|
|||||||
script/check-cmdline-options-doc.sh \
|
script/check-cmdline-options-doc.sh \
|
||||||
script/check-translation-sources.sh \
|
script/check-translation-sources.sh \
|
||||||
script/check-wmaker-loaddef-callbacks.sh \
|
script/check-wmaker-loaddef-callbacks.sh \
|
||||||
script/generate-html-from-man.sh \
|
|
||||||
script/generate-mapfile-from-header.sh \
|
script/generate-mapfile-from-header.sh \
|
||||||
script/generate-po-from-template.sh \
|
script/generate-po-from-template.sh \
|
||||||
script/generate-txt-from-texi.sh \
|
script/generate-txt-from-texi.sh \
|
||||||
script/nested-func-to-macro.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
|
.PHONY: coverage-reset coverage
|
||||||
@@ -73,10 +62,6 @@ coverage:
|
|||||||
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
|
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
|
||||||
endif
|
endif
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Section for the I18N processing
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# make update-lang PO=<lang>
|
# make update-lang PO=<lang>
|
||||||
# ==========================
|
# ==========================
|
||||||
# Update the PO files against the POT file in all the translation sub-directories
|
# Update the PO files against the POT file in all the translation sub-directories
|
||||||
@@ -95,34 +80,13 @@ if HAVE_XGETTEXT
|
|||||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) update-lang || exit $$?); \
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) update-lang || exit $$?); \
|
||||||
done
|
done
|
||||||
|
|
||||||
SUBDIRS_PO = wrlib/po WINGs/po po util/po WPrefs.app/po
|
SUBDIRS_PO = WINGs/po po util/po WPrefs.app/po
|
||||||
else
|
else
|
||||||
@echo "Error: the program 'xgettext' was not found by configure, it is mandatory for this operation" >&2 ; exit 1
|
@echo "Error: the program 'xgettext' was not found by configure, it is mandatory for this operation" >&2 ; exit 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: update-lang
|
.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
|
# 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_$(V))
|
||||||
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
|
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
|
||||||
@@ -142,8 +106,6 @@ configure-documentation:
|
|||||||
--ignore-prg 'enable-shared,enable-static # should be in INSTALL' \
|
--ignore-prg 'enable-shared,enable-static # should be in INSTALL' \
|
||||||
--ignore-prg 'disable-option-checking,enable-fast-install # should be in INSTALL' \
|
--ignore-prg 'disable-option-checking,enable-fast-install # should be in INSTALL' \
|
||||||
--ignore-prg 'disable-libtool-lock,with-pic,with-gnu-ld,with-sysroot # for libtool' \
|
--ignore-prg 'disable-libtool-lock,with-pic,with-gnu-ld,with-sysroot # for libtool' \
|
||||||
--ignore-prg 'runstatedir #new in autoconf 2.70, backported in Debian' \
|
|
||||||
--ignore-prg 'with-aix-soname #new in libtool 2.4.4' \
|
|
||||||
--ignore-prg 'with-x # no use, it would not work without X'
|
--ignore-prg 'with-x # no use, it would not work without X'
|
||||||
|
|
||||||
.PHONY: configure-documentation
|
.PHONY: configure-documentation
|
||||||
|
|||||||
@@ -1,489 +1,7 @@
|
|||||||
|
|
||||||
NEWS for veteran Window Maker users
|
NEWS for veteran Window Maker users
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
-- 0.97.0
|
|
||||||
|
|
||||||
Directional window focus
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
The keyboard focus can now be moved in a specific direction (left, right,
|
|
||||||
up, down) relative to the currently focused window, using window centres
|
|
||||||
for comparison. The shortcuts can be configured in WPrefs under
|
|
||||||
"Keyboard Shortcuts", or set directly in ~/GNUstep/Defaults/WindowMaker
|
|
||||||
via "FocusWindowLeftKey", "FocusWindowRightKey", "FocusWindowUpKey" and
|
|
||||||
"FocusWindowDownKey" (disabled by default).
|
|
||||||
|
|
||||||
The existing "CirculateRaise" option ("Raise window when switching focus
|
|
||||||
with keyboard" in WPrefs) also controls whether windows that are fully
|
|
||||||
obscured by others are raised when receiving focus this way.
|
|
||||||
|
|
||||||
|
|
||||||
Vim-like window marking
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Windows can now be dynamically assigned a mark label (a key or
|
|
||||||
modifier+key combination) allowing them to be instantly recalled without
|
|
||||||
searching. This is inspired by vim's mark-and-jump navigation.
|
|
||||||
|
|
||||||
The mark label is displayed in the window list menu between the window
|
|
||||||
title and the workspace name.
|
|
||||||
|
|
||||||
Five actions can be configured in ~/GNUstep/Defaults/WindowMaker
|
|
||||||
(or in WPrefs under "Keyboard Shortcuts")
|
|
||||||
|
|
||||||
"MarkSetKey": assign a label to the focused window (e.g. with the
|
|
||||||
action bound to "Super+M", pressing "Super+M x" marks the focused
|
|
||||||
window with label 'x').
|
|
||||||
|
|
||||||
"MarkUnsetKey": remove the mark from a labeled window.
|
|
||||||
|
|
||||||
"MarkJumpKey": focus and raise the window with the given label.
|
|
||||||
|
|
||||||
"MarkBringKey": move the marked window to the current workspace and
|
|
||||||
focus it.
|
|
||||||
|
|
||||||
"MarkSwapKey": swap the focused window with the marked window.
|
|
||||||
|
|
||||||
Those are disabled by default.
|
|
||||||
Marks are persistent across sessions and saved in the WMState file.
|
|
||||||
|
|
||||||
|
|
||||||
Multi-key and sticky-chain keybindings
|
|
||||||
--------------------------------------
|
|
||||||
|
|
||||||
Keyboard shortcuts now support multi-key sequences, similar to
|
|
||||||
Emacs-style prefix bindings (e.g. pressing a leader key followed by
|
|
||||||
one or more continuation keys).
|
|
||||||
|
|
||||||
An optional sticky-chain mode allows a prefix key to remain active
|
|
||||||
until a cancel key is pressed or a timeout expires, making it possible
|
|
||||||
to trigger multiple actions in sequence without re-entering the prefix.
|
|
||||||
New options in ~/GNUstep/Defaults/WindowMaker:
|
|
||||||
|
|
||||||
"KeychainTimeoutDelay" is the timeout in milliseconds after which an
|
|
||||||
active chain expires. Default is 500. Set to 0 to disable the
|
|
||||||
timeout.
|
|
||||||
|
|
||||||
"KeychainCancelKey" sets a key to explicitly cancel an active chain.
|
|
||||||
(disabled by default).
|
|
||||||
|
|
||||||
|
|
||||||
Configurable modifier key labels
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
A new "ModifierKeyShortLabels" option in ~/GNUstep/Defaults/WindowMaker
|
|
||||||
allows customizing the labels shown for modifier keys in menus and
|
|
||||||
keyboard shortcut displays. Unicode symbols can be used in place of the
|
|
||||||
default text labels. For example to use the same symbol as defined on
|
|
||||||
MacOS:
|
|
||||||
|
|
||||||
ModifierKeyShortLabels = (
|
|
||||||
"\342\207\247",
|
|
||||||
"\342\214\203",
|
|
||||||
"\342\214\245",
|
|
||||||
"\342\207\255",
|
|
||||||
"\342\207\263",
|
|
||||||
"\342\214\230",
|
|
||||||
"\342\207\252",
|
|
||||||
"\342\227\206",
|
|
||||||
"\342\214\245"
|
|
||||||
);
|
|
||||||
|
|
||||||
Configurable mouse wheel focus behavior
|
|
||||||
----------------------------------------
|
|
||||||
|
|
||||||
Scrolling the mouse wheel over a window can now optionally move the
|
|
||||||
keyboard focus to that window. The option is available in WPrefs under
|
|
||||||
"Expert User Preferences", or by setting "MouseWheelFocusEnable" in
|
|
||||||
~/GNUstep/Defaults/WindowMaker (NO by default).
|
|
||||||
|
|
||||||
|
|
||||||
Application icons in the window list
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
Application icons can now be shown in the window list menu. This behavior
|
|
||||||
can be configured by setting the "WindowListAppIcons" option in
|
|
||||||
~/GNUstep/Defaults/WindowMaker or "Show app icons in window list." in
|
|
||||||
WPrefs under "Expert User Preferences" (NO by default).
|
|
||||||
|
|
||||||
|
|
||||||
Configurable screenshot filename template
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
The filename (strftime compatible) format used when saving screenshots
|
|
||||||
can now be customized by setting the "ScreenshotFileNameTemplate"
|
|
||||||
option in ~/GNUstep/Defaults/WindowMaker. The default remains the
|
|
||||||
format introduced in 0.96.0.
|
|
||||||
|
|
||||||
|
|
||||||
JPEG XL image support
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
WRaster can now optionally load JPEG XL images if the libjxl
|
|
||||||
library is present at build time. The feature can be toggled at
|
|
||||||
configure time with --enable-jxl/--disable-jxl.
|
|
||||||
|
|
||||||
|
|
||||||
wmiv: archive files and unknown format handling
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
wmiv can now open images stored inside archive files (with libarchive).
|
|
||||||
A new option to silently skip unknown image formats is also available.
|
|
||||||
It supports ctrl+c shortcut to copy the current image to the clipboard.
|
|
||||||
|
|
||||||
|
|
||||||
Support for _NET_WM_MOVERESIZE
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
Window Maker now handles the _NET_WM_MOVERESIZE EWMH message, which
|
|
||||||
allows applications to initiate interactive window moves and resizes
|
|
||||||
through a standard protocol request (for those applications without
|
|
||||||
decorations: VS Code, Google Chrome, Steam and Discord, ...).
|
|
||||||
|
|
||||||
|
|
||||||
Cycle windows across all workspaces
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
A new 'Cycle all windows from all workspaces' expert option allows
|
|
||||||
the Alt-Tab window switcher to include windows from all workspaces,
|
|
||||||
not only the current one. Which is the "CycleAllWorkspaces" option
|
|
||||||
in ~/GNUstep/Defaults/WindowMaker (NO by default).
|
|
||||||
|
|
||||||
|
|
||||||
RandR and multi-monitor improvements
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
RandR version >= 1.3 is automatically enabled when detected. By default,
|
|
||||||
it operates in static mode, requiring the screen layout to be defined
|
|
||||||
manually. A new "HotplugMonitor" option in ~/GNUstep/Defaults/WindowMaker
|
|
||||||
(NO by default) enables automatic monitor detection on hotplug events,
|
|
||||||
adding newly connected monitors to the right of the existing layout.
|
|
||||||
This option is also available in WPrefs expert panel under
|
|
||||||
"Automatically (de)activate monitors on hotplug events".
|
|
||||||
|
|
||||||
|
|
||||||
Titlebar language button revamp
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
When the modelock feature is enabled, the legacy hardcoded language
|
|
||||||
dropdown icons in the titlebar are replaced by a compact button
|
|
||||||
displaying the short name of the current XKB locale (those are
|
|
||||||
basically the layouts displayed via setxkbmap -query).
|
|
||||||
Clicking the button cycles through up to four keyboard layouts
|
|
||||||
(matching the four XKB groups). The xkbfile library is required for
|
|
||||||
this feature.
|
|
||||||
|
|
||||||
|
|
||||||
-- 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
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
SwitchPanel is now more configurable: you can configure the switch panel icon
|
|
||||||
size by setting the "SwitchPanelIconSize" option to your preferred value in
|
|
||||||
~/GNUstep/Defaults/WindowMaker. The font size used in this panel now is also
|
|
||||||
sensible to changes in the system font.
|
|
||||||
|
|
||||||
|
|
||||||
New user configuration directory environment variable
|
|
||||||
-----------------------------------------------------
|
|
||||||
|
|
||||||
In previous versions, the GNUstep directory used to store a user's Window Maker
|
|
||||||
configuration files was specified by the GNUSTEP_USER_ROOT environment variable,
|
|
||||||
which defaulted to ~/GNUstep. However, this environment variable was deprecated
|
|
||||||
in gnustep-make v2. Therefore, it has been replaced by the WMAKER_USER_ROOT
|
|
||||||
environment variable.
|
|
||||||
|
|
||||||
|
|
||||||
libXmu is now an optional dependency
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
If the library is not found, compilation work, the only limitation will arise
|
|
||||||
when trying to install the standard colormap on displays which are not TrueColor.
|
|
||||||
Please note that if you have the library but not the headers, configure will
|
|
||||||
still stop; there is no user option to explicitly disable the library use.
|
|
||||||
|
|
||||||
|
|
||||||
-- 0.95.8
|
|
||||||
|
|
||||||
Move pointer with maximized windows
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
Implementation for moving mouse pointer within the maximized window.
|
|
||||||
|
|
||||||
Mouse pointer can be now moved together with window if keyboard was used for
|
|
||||||
arrange maximized windows on screen. This feature can be turned on in WPrefs.app
|
|
||||||
in Expert tab by selecting "Move mouse pointer with half maximized windows.", or
|
|
||||||
setting "PointerWithHalfMaxWindows" to "Yes" on ~/GNUstep/Defaults/WindowMaker
|
|
||||||
file.
|
|
||||||
|
|
||||||
|
|
||||||
Alternative way for traverse half-maximized windows
|
|
||||||
---------------------------------------------------
|
|
||||||
|
|
||||||
For now, there could be three possible states of the window while using
|
|
||||||
the half-maximized feature. Unmaximized windows have their state saved during
|
|
||||||
that process, which is used to unmaximize them. For example, if there is a
|
|
||||||
window that is maximized on the left half of the screen, and while requesting
|
|
||||||
left-half-maximize it becomes unmaximized with its size and dimensions
|
|
||||||
restored to the original state.
|
|
||||||
|
|
||||||
By setting "AlternativeHalfMaximized" option to "Yes"
|
|
||||||
~/GNUstep/Defaults/WindowMaker config file (or by using WPrefs.app and option
|
|
||||||
"Alternative transitions between states for half maximized windows."), there
|
|
||||||
would be slightly different change in window "traverse". Given layout depicted
|
|
||||||
below:
|
|
||||||
|
|
||||||
┌┬────────────────────┬┐
|
|
||||||
├┘ ┌───────┐ ├┤
|
|
||||||
│ ├───────┤ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ └───────┘ └┤
|
|
||||||
├┬┐ │
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
Window can be moved using keyboard shortcut right-half-maximize:
|
|
||||||
|
|
||||||
┌┬─────────┬──────────┬┐
|
|
||||||
├┘ ├──────────┼┤
|
|
||||||
│ │ ├┤
|
|
||||||
│ │ ├┤
|
|
||||||
│ │ ├┤
|
|
||||||
│ │ ├┤
|
|
||||||
├┬┐ └──────────┘│
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
Further invoking right-half-maximize will do nothing. Note, that the window always
|
|
||||||
can be unmaximized using an appropriate keyboard shortcut or by selecting
|
|
||||||
"Unmaximize" from the window menu.
|
|
||||||
|
|
||||||
Going to opposite direction by invoking left-half-maximize, will make the window
|
|
||||||
maximized in both, vertical and horizontal directions:
|
|
||||||
|
|
||||||
┌─────────────────────┬┐
|
|
||||||
├─────────────────────┼┤
|
|
||||||
│ ├┤
|
|
||||||
│ ├┤
|
|
||||||
│ ├┤
|
|
||||||
│ ├┤
|
|
||||||
├┬┬───────────────────┘│
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
Further invoking left-half-maximize, will make the window maximized in half left
|
|
||||||
side od the screen:
|
|
||||||
|
|
||||||
┌──────────┬──────────┬┐
|
|
||||||
├──────────┤ ├┤
|
|
||||||
│ │ ├┤
|
|
||||||
│ │ ├┤
|
|
||||||
│ │ ├┤
|
|
||||||
│ │ └┤
|
|
||||||
├┬┬────────┘ │
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
And again, further invoking left-half-maximize, will do nothing in this mode.
|
|
||||||
|
|
||||||
This change affects all possible half-maximized window state also quarters.
|
|
||||||
Issuing bottom-left-corner will take lower left quarter of the screen (nothing
|
|
||||||
is new so far):
|
|
||||||
|
|
||||||
┌┬────────────────────┬┐
|
|
||||||
├┘ ├┤
|
|
||||||
│ ├┤
|
|
||||||
├──────────┐ ├┤
|
|
||||||
├──────────┤ ├┤
|
|
||||||
│ │ └┤
|
|
||||||
├┬┬────────┘ │
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
Issuing bottom-right-corner again will change window state to bottom half
|
|
||||||
maximized:
|
|
||||||
|
|
||||||
┌┬────────────────────┬┐
|
|
||||||
├┘ ├┤
|
|
||||||
│ ├┤
|
|
||||||
├─────────────────────┼┤
|
|
||||||
├─────────────────────┼┤
|
|
||||||
│ ├┤
|
|
||||||
├┬┬───────────────────┘│
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
Invoking bottom-right-corner again:
|
|
||||||
|
|
||||||
┌┬────────────────────┬┐
|
|
||||||
├┘ ├┤
|
|
||||||
│ ├┤
|
|
||||||
│ ┌──────────┼┤
|
|
||||||
│ ├──────────┼┤
|
|
||||||
│ │ ├┤
|
|
||||||
├┬┐ └──────────┘│
|
|
||||||
└┴┴────────────────────┘
|
|
||||||
|
|
||||||
Issuing bottom-right-corner again will have no effect.
|
|
||||||
|
|
||||||
|
|
||||||
Move half-maximized windows between the screens
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
New option was introduced to allow change of behaviour of half-maximize windows
|
|
||||||
in multiple displays environment. In such environment it is more natural that
|
|
||||||
half maximized windows would travel from one screen to another. Now it is
|
|
||||||
possible to make that happen by setting an option
|
|
||||||
"MoveHalfMaximizedWindowsBetweenScreens" to "Yes" in
|
|
||||||
~/GNUstep/Defaults/WindowMaker config file, or by checking "Allow move
|
|
||||||
half-maximized windows between multiple screens." in 'Expert User Preferences"
|
|
||||||
tab in WPrefs.app.
|
|
||||||
|
|
||||||
For example, given there are two screens in layout where one display is on the
|
|
||||||
left and second display is on the right with window on first screen:
|
|
||||||
|
|
||||||
┌┬────────────────┬─────────────────┬┐
|
|
||||||
├┘ ┌───────┐ │ ├┤
|
|
||||||
│ ├───────┤ │ ├┤
|
|
||||||
│ │ │ │ ├┤
|
|
||||||
│ │ │ │ ├┤
|
|
||||||
│ └───────┘ │ └┤
|
|
||||||
├┬┐ ├┬┬┐ │
|
|
||||||
└┴┴───────────────┴┴┴┴───────────────┘
|
|
||||||
|
|
||||||
It can be right-half-maximized (using the previously defined key combination), so it
|
|
||||||
becomes:
|
|
||||||
|
|
||||||
┌┬───────┬────────┬─────────────────┬┐
|
|
||||||
├┘ ├────────┤ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ └┤
|
|
||||||
├┬┐ └────────┼┬┬┐ │
|
|
||||||
└┴┴───────────────┴┴┴┴───────────────┘
|
|
||||||
|
|
||||||
In this example there is an assumption that WindowMaker is configured, that
|
|
||||||
maximized windows won't cover mini icons nor the dock.
|
|
||||||
|
|
||||||
Without setting new option to true, issuing another right-half-maximize will
|
|
||||||
restore window dimensions and position to the original state (like on the first
|
|
||||||
figure). With new option set to true it will move window to second screen like:
|
|
||||||
|
|
||||||
┌┬────────────────┬────────┬────────┬┐
|
|
||||||
├┘ ├────────┤ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ └┤
|
|
||||||
├┬┐ ├┬┬┬─────┘ │
|
|
||||||
└┴┴───────────────┴┴┴┴───────────────┘
|
|
||||||
|
|
||||||
Another activation of right-half-maximize:
|
|
||||||
|
|
||||||
┌┬────────────────┬────────┬────────┬┐
|
|
||||||
├┘ │ ├────────┼┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
├┬┐ ├┬┬┐ └────────┘│
|
|
||||||
└┴┴───────────────┴┴┴┴───────────────┘
|
|
||||||
|
|
||||||
And final activation of right-half-maximize:
|
|
||||||
|
|
||||||
┌┬────────────────┬───────┬─────────┬┐
|
|
||||||
├┘ ├───────┤ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ │ │ ├┤
|
|
||||||
│ ├───────┘ ├┤
|
|
||||||
│ │ └┤
|
|
||||||
├┬┐ ├┬┬┐ │
|
|
||||||
└┴┴───────────────┴┴┴┴───────────────┘
|
|
||||||
|
|
||||||
Where the window is restored to its size (but not position, since it is on a different
|
|
||||||
head now). Moving a window in directions like left-half-maximize,
|
|
||||||
top-half-maximize and bottom-half-maximize will behave in similar way depending
|
|
||||||
on the layout of displays.
|
|
||||||
|
|
||||||
Note, that only windows that are half-maximized vertically or horizontally can
|
|
||||||
be moved to another screen due to the fact, that direction of movement of
|
|
||||||
quarter-maximized windows is ambiguous. As for vertical/horizontal-maximize,
|
|
||||||
since doesn't move the window but only stretch it vertically/horizontally this
|
|
||||||
feature also doesn't apply.
|
|
||||||
|
|
||||||
|
|
||||||
Snapping a window to the top
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
You can now choose whether snapping a window to the top edge of the screen
|
|
||||||
maximizes it to the top half (the previous and default behavior) or to the
|
|
||||||
full screen by setting "SnapToTopMaximizesFullscreen" to "NO" or "YES",
|
|
||||||
respectively. This setting can also be changed by unchecking or checking
|
|
||||||
"Snapping a window to the top maximizes it to the full screen" in the
|
|
||||||
"Expert User Preferences" tab in WPrefs.app.
|
|
||||||
|
|
||||||
Global defaults directory configuration
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
You can now configure the global defaults directory, where the system
|
|
||||||
WindowMaker, WMRootMenu, etc. files are stored, by running
|
|
||||||
./configure --with-defsdatadir=/path/to/defaults
|
|
||||||
at build time. The previous method, which only partially worked, involved
|
|
||||||
defining the GLOBAL_DEFAULTS_SUBDIR macro. This is no longer available.
|
|
||||||
Note that the default location is ${sysconfdir}/WindowMaker.
|
|
||||||
|
|
||||||
-- 0.95.7
|
-- 0.95.7
|
||||||
|
|
||||||
Window snapping
|
Window snapping
|
||||||
@@ -525,12 +43,12 @@ There are four choices:
|
|||||||
geometry is restored.
|
geometry is restored.
|
||||||
* "Unmaximize" ("...consider the window unmaximized") causes a maximized window
|
* "Unmaximize" ("...consider the window unmaximized") causes a maximized window
|
||||||
to be moved when dragged and remains partially maximized, i.e., it keeps its
|
to be moved when dragged and remains partially maximized, i.e., it keeps its
|
||||||
maximized geometry, but is considered to be unmaximized. In particular, it can
|
maximized geometry, but is consider to be unmaximized. In particular, it can
|
||||||
be immediately re-maximized.
|
be immediately re-maximized.
|
||||||
* "NoMove" ("...do not move the window") prevents a maximized window from being
|
* "NoMove" ("...do not move the window") prevents a maximized window from being
|
||||||
moved when dragged.
|
moved when dragged.
|
||||||
|
|
||||||
Note that, to accommodate this option in the "Window Handling Preferences" tab in
|
Note that, to accomodate this option in the "Window Handling Preferences" tab in
|
||||||
WPrefs.app, the option to "Open dialogs in the same workspace as their owners"
|
WPrefs.app, the option to "Open dialogs in the same workspace as their owners"
|
||||||
(which sets the "OpenTransientOnOwnerWorkspace" option from
|
(which sets the "OpenTransientOnOwnerWorkspace" option from
|
||||||
~/GNUstep/Defaults/WindowMaker) has been moved to "Expert User Preferences".
|
~/GNUstep/Defaults/WindowMaker) has been moved to "Expert User Preferences".
|
||||||
@@ -1330,7 +848,7 @@ Others
|
|||||||
|
|
||||||
- added DONT_SCALE_ICONS compile time option
|
- added DONT_SCALE_ICONS compile time option
|
||||||
- added --dont-restore cmd line option. When passed to wmaker, it
|
- added --dont-restore cmd line option. When passed to wmaker, it
|
||||||
won't restore the state saved previously.
|
wont restore the state saved previously.
|
||||||
|
|
||||||
--- 0.61.1
|
--- 0.61.1
|
||||||
|
|
||||||
@@ -1870,10 +1388,10 @@ Clip icons when the mouse pointer enter/leave the Clip. To avoid unwanted
|
|||||||
raising/lowering there is a time threshold before raising/lowering.
|
raising/lowering there is a time threshold before raising/lowering.
|
||||||
The thresholds can be changed in wconfig.h by changing one or both of
|
The thresholds can be changed in wconfig.h by changing one or both of
|
||||||
AUTO_LOWER_DELAY and AUTO_RAISE_DELAY (expressed in milliseconds).
|
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
|
For example if you set AUTO_RAISE_DELAY to 0, then the Clip will be raised as
|
||||||
soon as the mouse pointer enters its area. Setting AUTO_RAISE_DELAY to a very
|
soon as the mouse pointer enters it's area. Setting AUTO_RAISE_DELAY to a very
|
||||||
big value will make the Clip practically not auto-raise unless clicked,
|
big value, will make the Clip to practically do not auto raise unless clicked,
|
||||||
but it will still be automatically lowered after AUTO_LOWER_DELAY (ms) when left.
|
but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved.
|
||||||
|
|
||||||
|
|
||||||
New ThemePack Format
|
New ThemePack Format
|
||||||
@@ -2640,7 +2158,7 @@ applets of that kind, because the icon window do not belongs to WindowMaker,
|
|||||||
but to the application itself. For such icons you must keep the mouse over the
|
but to the application itself. For such icons you must keep the mouse over the
|
||||||
icon groundplate, else it will collapse back. But usually these type of icons
|
icon groundplate, else it will collapse back. But usually these type of icons
|
||||||
will not stay in a collapsed clip, since one needs to see what they show.
|
will not stay in a collapsed clip, since one needs to see what they show.
|
||||||
When the clip is left it will collapse back after a delay of 1 second, unless
|
When the clip is leaved it will collapse back after a delay of 1 second, unless
|
||||||
the mouse is moved back to the clip area. The delay can be set modifying
|
the mouse is moved back to the clip area. The delay can be set modifying
|
||||||
AUTO_COLLAPSE_DELAY in wconfig.h. Default is 1000 (ms) which means 1 second.
|
AUTO_COLLAPSE_DELAY in wconfig.h. Default is 1000 (ms) which means 1 second.
|
||||||
|
|
||||||
@@ -2800,7 +2318,7 @@ The OPEN_MENU command now supports the following syntax:
|
|||||||
// it in current position
|
// it in current position
|
||||||
OPEN_MENU file.menu
|
OPEN_MENU file.menu
|
||||||
2. Pipe menu handling.
|
2. Pipe menu handling.
|
||||||
// opens command and uses its stdout to construct menu.
|
// opens command and uses it's stdout to construct menu.
|
||||||
// Command's output must be a valid menu description.
|
// Command's output must be a valid menu description.
|
||||||
OPEN_MENU | command
|
OPEN_MENU | command
|
||||||
3. Directory handling.
|
3. Directory handling.
|
||||||
@@ -2977,8 +2495,8 @@ When the step to move becomes smaller than IconSlideStep, IconSlideStep will
|
|||||||
be used further until the destination is reached.
|
be used further until the destination is reached.
|
||||||
|
|
||||||
This way a nice deceleration effect is achieved, since while the icon
|
This way a nice deceleration effect is achieved, since while the icon
|
||||||
approaches the destination, it will use smaller steps, giving the illusion that
|
approaches destination, it will use smaller steps, gibing the illusion that
|
||||||
the icons are moving slower.
|
the icons is moving slower.
|
||||||
|
|
||||||
IconSlideDelay will give the pause between steps, and is expressed in ms.
|
IconSlideDelay will give the pause between steps, and is expressed in ms.
|
||||||
|
|
||||||
@@ -3403,7 +2921,7 @@ when they are first mapped
|
|||||||
titlebar gradients are in a single piece now
|
titlebar gradients are in a single piece now
|
||||||
|
|
||||||
the WMDock file was merged into the WMState file. You can insert this
|
the WMDock file was merged into the WMState file. You can insert this
|
||||||
file in WMState and set its key to Dock. For example, if your WMDock
|
file in WMState and set it's key to Dock. For example, if your WMDock
|
||||||
contains:
|
contains:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ HELP ME!!!
|
|||||||
==========
|
==========
|
||||||
|
|
||||||
There is a mailing list for discussing Window Maker at
|
There is a mailing list for discussing Window Maker at
|
||||||
wmaker-user@googlegroups.com. To subscribe to it, visit
|
wmaker-user@lists.windowmaker.org To subscribe to it, send a message to
|
||||||
https://groups.google.com/forum/#!forum/wmaker-user
|
wmaker-user-subscribe@lists.windowmaker.org
|
||||||
|
|
||||||
If you got a problem, ask there (after reading the docs, of course). The people
|
If you got a problem, ask there (after reading the docs, of course). The people
|
||||||
there is more likely to be able to answer your questions than we are. For bug
|
there is more likely to be able to answer your questions than we are. For bug
|
||||||
@@ -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
|
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
|
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 its
|
same time. You might get unexpected behavior when Window Maker updates it's
|
||||||
configuration files.
|
configuration files.
|
||||||
|
|
||||||
If you really desire to do this, try running Window Maker with the command line
|
If you really desire to do this, try running Window Maker with the command line
|
||||||
@@ -190,7 +190,7 @@ Performance Tuning
|
|||||||
==================
|
==================
|
||||||
|
|
||||||
If you want to diminish Window Maker's memory usage and improve performance,
|
If you want to diminish Window Maker's memory usage and improve performance,
|
||||||
while keeping a nice appearance and good functionality, follow the items below:
|
while keeping a nice appearance and good functionality, follow the items bellow:
|
||||||
|
|
||||||
- use solid textures for everything, mainly title bars and menus. If you want a
|
- use solid textures for everything, mainly title bars and menus. If you want a
|
||||||
nice looking desktop, use the Traditional style.
|
nice looking desktop, use the Traditional style.
|
||||||
@@ -209,7 +209,7 @@ while keeping a nice appearance and good functionality, follow the items below:
|
|||||||
- remove support for image formats you don't use
|
- remove support for image formats you don't use
|
||||||
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
|
- 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
|
environment variable to 0. If you want to increase performance at the cost of
|
||||||
memory usage, set its value to a value like the number of different icons you
|
memory usage, set it's value to a value like the number of different icons you
|
||||||
use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
|
use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
|
||||||
|
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ pointer faster;
|
|||||||
clicked with the 0 (Ins) key.
|
clicked with the 0 (Ins) key.
|
||||||
|
|
||||||
|
|
||||||
The above key values work on an XFree86 3.2 (X11R6.1) X server, but your
|
The above key values work in a XFree86 3.2 (X11R6.1) X server but your
|
||||||
mileage may vary.
|
mileage may vary.
|
||||||
|
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ that crashes Window Maker, please send a backtrace with your bug report.
|
|||||||
|
|
||||||
To make a useful backtrace, you need a core file with debugging information
|
To make a useful backtrace, you need a core file with debugging information
|
||||||
produced by Window Maker when it crashes. It should have been installed without
|
produced by Window Maker when it crashes. It should have been installed without
|
||||||
being stripped.
|
stripping too.
|
||||||
|
|
||||||
To compile wmaker with debugging information:
|
To compile wmaker with debugging information:
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ The icons listed in COPYING.WTFPL and are distributed in this program and were
|
|||||||
made by Banlu Kemiyatorn (]d), are licensed through the "do What The Fuck you
|
made by Banlu Kemiyatorn (]d), are licensed through the "do What The Fuck you
|
||||||
want to Public License". Read the COPYING.WTFPL file for the complete license.
|
want to Public License". Read the COPYING.WTFPL file for the complete license.
|
||||||
|
|
||||||
NeXT, OpenStep and NEXTSTEP are trademarks of NeXT Computer, Inc. All other
|
NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc. All other
|
||||||
trademarks are property of their respective owners.
|
trademarks are property of their respective owners.
|
||||||
|
|
||||||
The authors reserve the right to make changes in the software without prior
|
The authors reserve the right to make changes in the software without prior
|
||||||
@@ -307,9 +307,9 @@ screenshots.
|
|||||||
|
|
||||||
|
|
||||||
The AUTHORS file contains a list of the people who have contributed to the
|
The AUTHORS file contains a list of the people who have contributed to the
|
||||||
project. The names of people who have helped with localization (translation) can
|
project. The name of people who have helped with localization (translation) can
|
||||||
be found in po/README and Window Maker/README
|
be found in po/README and Window Maker/README
|
||||||
|
|
||||||
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
||||||
to wmaker-dev@googlegroups.com
|
to wmaker-dev@lists.windowmaker.org
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ Sending the patch to the mailing list
|
|||||||
|
|
||||||
Send your patches to:
|
Send your patches to:
|
||||||
|
|
||||||
wmaker-dev@googlegroups.com
|
wmaker-dev@lists.windowmaker.org
|
||||||
|
|
||||||
Please do not send patches to any individual developer unless you have a very
|
Please do not send patches to any individual developer unless you have a very
|
||||||
good reason to avoid more people being able to comment (and improve) on your
|
good reason to avoid more people being able to comment (and improve) on your
|
||||||
@@ -147,7 +147,7 @@ you, otherwise you may face the problems below. Doing this is really easy:
|
|||||||
# (of course, replace smtp.example.com with your ISP's)
|
# (of course, replace smtp.example.com with your ISP's)
|
||||||
git config --global sendemail.smtpserver "smtp.example.com"
|
git config --global sendemail.smtpserver "smtp.example.com"
|
||||||
git config --global sendemail.validate true
|
git config --global sendemail.validate true
|
||||||
git config sendemail.to "Window Maker Devel <wmaker-dev@googlegroups.com>"
|
git config sendemail.to "Window Maker Devel <wmaker-dev@lists.windowmaker.org>"
|
||||||
|
|
||||||
# If you're sending more than 1 patch, you may be interested in having an
|
# If you're sending more than 1 patch, you may be interested in having an
|
||||||
# introduction mail for the batch:
|
# introduction mail for the batch:
|
||||||
|
|||||||
+1
-7
@@ -1,9 +1,3 @@
|
|||||||
Changes since wmaker 0.96.0:
|
|
||||||
............................
|
|
||||||
|
|
||||||
- added W_KeycodeToKeysym to replace XKeycodeToKeysym/XkbKeycodeToKeysym calls
|
|
||||||
|
|
||||||
|
|
||||||
Changes since wmaker 0.92.0:
|
Changes since wmaker 0.92.0:
|
||||||
............................
|
............................
|
||||||
|
|
||||||
@@ -140,7 +134,7 @@ Changes since wmaker 0.64.0:
|
|||||||
- Moved all internal handlers (timer, idle and input) to handlers.c
|
- Moved all internal handlers (timer, idle and input) to handlers.c
|
||||||
- simplified wevent.c and wutil.c.
|
- simplified wevent.c and wutil.c.
|
||||||
- fixed handling of input with poll (was broken)
|
- fixed handling of input with poll (was broken)
|
||||||
- fixed mem leak that occurred when input handling was done with poll
|
- fixed mem leak that occured when input handling was done with poll
|
||||||
- simpler and more straightforward event handling for timer, idle, input
|
- simpler and more straightforward event handling for timer, idle, input
|
||||||
and X events (also fixed some problems the old handling logic had)
|
and X events (also fixed some problems the old handling logic had)
|
||||||
- moved timer, idle and input handler definitions and prototypes from
|
- 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 \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
@XFTLIBS@ @INTLIBS@ @XLIBS@
|
||||||
|
|
||||||
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,8 @@
|
|||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdnoreturn.h>
|
|
||||||
|
|
||||||
noreturn void wAbort(void)
|
void wAbort()
|
||||||
{
|
{
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -41,7 +40,7 @@ void show(WMWidget * self, void *data)
|
|||||||
WMSetLabelText(l, buf);
|
WMSetLabelText(l, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
noreturn void quit(WMWidget * self, void *data)
|
void quit(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void) self;
|
(void) self;
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
|
|||||||
|
|
||||||
lib_LTLIBRARIES = libExtraWINGs.la
|
lib_LTLIBRARIES = libExtraWINGs.la
|
||||||
|
|
||||||
noinst_PROGRAMS = tableview
|
noinst_PROGRAMS = test
|
||||||
|
|
||||||
EXTRA_DIST =
|
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 \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
@XFTLIBS@ @INTLIBS@
|
||||||
|
|
||||||
tableview_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||||
|
|||||||
@@ -19,18 +19,13 @@ static char *options[] = {
|
|||||||
|
|
||||||
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
||||||
{
|
{
|
||||||
(void) self;
|
|
||||||
(void) table;
|
|
||||||
|
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
||||||
{
|
{
|
||||||
(void) self;
|
|
||||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (col1[0] == 0) {
|
if (col1[0] == 0) {
|
||||||
for (i = 0; i < 20; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
@@ -49,8 +44,6 @@ void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
|||||||
|
|
||||||
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
||||||
{
|
{
|
||||||
(void) self;
|
|
||||||
|
|
||||||
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
||||||
col1[row] = data;
|
col1[row] = data;
|
||||||
else
|
else
|
||||||
@@ -66,7 +59,6 @@ static WMTableViewDelegate delegate = {
|
|||||||
|
|
||||||
void clickedTable(WMWidget * w, void *self)
|
void clickedTable(WMWidget * w, void *self)
|
||||||
{
|
{
|
||||||
(void) w;
|
|
||||||
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
||||||
|
|
||||||
WMEditTableViewRow(self, row);
|
WMEditTableViewRow(self, row);
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
#include <WINGs/WINGsP.h>
|
#include <WINGs/WINGsP.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <math.h>
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
#include "wtableview.h"
|
#include "wtableview.h"
|
||||||
|
|
||||||
@@ -276,7 +274,7 @@ static void adjustScrollers(WMTableView * table)
|
|||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
||||||
if (fabs(oprop) <= DBL_EPSILON)
|
if (oprop == 0.0)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->hscroll);
|
ovalue = WMGetScrollerValue(table->hscroll);
|
||||||
|
|
||||||
@@ -292,7 +290,7 @@ static void adjustScrollers(WMTableView * table)
|
|||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
||||||
if (fabs(oprop) <= DBL_EPSILON)
|
if (oprop == 0.0)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->vscroll);
|
ovalue = WMGetScrollerValue(table->vscroll);
|
||||||
|
|
||||||
@@ -334,7 +332,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
case WSIncrementWheel:
|
case WSIncrementWheel:
|
||||||
case WSIncrementLine:
|
case WSIncrementLine:
|
||||||
value += (float)table->rowHeight / size;
|
value += (float)table->rowHeight / size;
|
||||||
if (value > (float)1.0)
|
if (value > 1.0)
|
||||||
value = 1.0;
|
value = 1.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -346,7 +344,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
case WSDecrementPage:
|
case WSDecrementPage:
|
||||||
value -= vpsize / size;
|
value -= vpsize / size;
|
||||||
if (value < (float)0.0)
|
if (value < 0.0)
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -354,7 +352,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
case WSIncrementPage:
|
case WSIncrementPage:
|
||||||
value += vpsize / size;
|
value += vpsize / size;
|
||||||
if (value > (float)1.0)
|
if (value > 1.0)
|
||||||
value = 1.0;
|
value = 1.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -400,7 +398,6 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
static void splitterHandler(XEvent * event, void *data)
|
static void splitterHandler(XEvent * event, void *data)
|
||||||
{
|
{
|
||||||
(void) event;
|
|
||||||
WMTableColumn *column = (WMTableColumn *) data;
|
WMTableColumn *column = (WMTableColumn *) data;
|
||||||
WMTableView *table = column->table;
|
WMTableView *table = column->table;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
@@ -454,8 +451,6 @@ static void splitterHandler(XEvent * event, void *data)
|
|||||||
|
|
||||||
static void realizeTable(void *data, WMNotification * notif)
|
static void realizeTable(void *data, WMNotification * notif)
|
||||||
{
|
{
|
||||||
(void) notif;
|
|
||||||
|
|
||||||
repaintTable(data);
|
repaintTable(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -795,6 +790,7 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
|
|||||||
|
|
||||||
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
||||||
{
|
{
|
||||||
|
WMScroller *scroller;
|
||||||
WMRange range;
|
WMRange range;
|
||||||
WMRect rect;
|
WMRect rect;
|
||||||
int newY, tmp;
|
int newY, tmp;
|
||||||
@@ -802,6 +798,7 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
|||||||
rect = getVisibleRect(table);
|
rect = getVisibleRect(table);
|
||||||
range = rowsInRect(table, rect);
|
range = rowsInRect(table, rect);
|
||||||
|
|
||||||
|
scroller = table->vscroll;
|
||||||
|
|
||||||
if (row < range.position) {
|
if (row < range.position) {
|
||||||
newY = row * table->rowHeight - rect.size.height / 2;
|
newY = row * table->rowHeight - rect.size.height / 2;
|
||||||
@@ -1160,8 +1157,6 @@ static void handleEvents(XEvent * event, void *data)
|
|||||||
|
|
||||||
static void handleResize(W_ViewDelegate * self, WMView * view)
|
static void handleResize(W_ViewDelegate * self, WMView * view)
|
||||||
{
|
{
|
||||||
(void) self;
|
|
||||||
|
|
||||||
reorganizeInterior(view->self);
|
reorganizeInterior(view->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1172,8 +1167,7 @@ static void reorganizeInterior(WMTableView * table)
|
|||||||
WMSize size = getTotalSize(table);
|
WMSize size = getTotalSize(table);
|
||||||
WMView *view = table->view;
|
WMView *view = table->view;
|
||||||
int vw, vh;
|
int vw, vh;
|
||||||
int hsThickness = 0;
|
int hsThickness, vsThickness;
|
||||||
int vsThickness = 0;
|
|
||||||
|
|
||||||
if (table->vscroll)
|
if (table->vscroll)
|
||||||
vsThickness = WMWidgetWidth(table->vscroll);
|
vsThickness = WMWidgetWidth(table->vscroll);
|
||||||
|
|||||||
+8
-7
@@ -8,11 +8,13 @@ DIST_SUBDIRS = $(SUBDIRS) Tests Examples Extras
|
|||||||
libWINGs_la_LDFLAGS = -version-info @WINGS_VERSION@
|
libWINGs_la_LDFLAGS = -version-info @WINGS_VERSION@
|
||||||
libWUtil_la_LDFLAGS = -version-info @WUTIL_VERSION@
|
libWUtil_la_LDFLAGS = -version-info @WUTIL_VERSION@
|
||||||
|
|
||||||
|
dist_bin_SCRIPTS = get-wings-flags get-wutil-flags
|
||||||
|
|
||||||
lib_LTLIBRARIES = libWUtil.la libWINGs.la
|
lib_LTLIBRARIES = libWUtil.la libWINGs.la
|
||||||
|
|
||||||
|
|
||||||
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
||||||
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFT_LIBS@ @FCLIBS@ @LIBM@ @PANGO_LIBS@
|
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@ @PANGOLIBS@
|
||||||
libWUtil_la_LIBADD = @LIBBSD@
|
libWUtil_la_LIBADD = @LIBBSD@
|
||||||
|
|
||||||
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
|
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
|
||||||
@@ -87,12 +89,11 @@ libWUtil_la_SOURCES = \
|
|||||||
wutil.c
|
wutil.c
|
||||||
|
|
||||||
|
|
||||||
AM_CFLAGS = @PANGO_CFLAGS@
|
AM_CFLAGS =
|
||||||
|
|
||||||
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
|
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
|
||||||
-I$(top_srcdir)/WINGs/WINGs -I$(top_builddir)/WINGs/WINGs \
|
-I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||||
-I$(top_builddir)/wrlib -I$(top_srcdir)/src \
|
@XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||||
@XFT_CFLAGS@ @HEADER_SEARCH_PATH@
|
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = WINGs.pc WUtil.pc
|
pkgconfig_DATA = WINGs.pc WUtil.pc
|
||||||
@@ -106,8 +107,8 @@ WINGs.pc: Makefile
|
|||||||
@echo 'Version: $(VERSION)' >> $@
|
@echo 'Version: $(VERSION)' >> $@
|
||||||
@echo 'Requires: wrlib WUtil' >> $@
|
@echo 'Requires: wrlib WUtil' >> $@
|
||||||
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
|
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
|
||||||
@echo 'Libs.private: $(XFT_LIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
@echo 'Libs.private: $(XFTLIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
||||||
@echo 'Cflags: $(inc_search_path) @PANGO_CFLAGS@' >> $@
|
@echo 'Cflags: $(inc_search_path)' >> $@
|
||||||
|
|
||||||
WUtil.pc: Makefile
|
WUtil.pc: Makefile
|
||||||
@echo "Generating $@"
|
@echo "Generating $@"
|
||||||
|
|||||||
+1
-3
@@ -1,9 +1,7 @@
|
|||||||
** API and ABI modifications since wmaker 0.96.0
|
** API and ABI modifications since wmaker 0.92.0
|
||||||
----------------------------------------------------
|
|
||||||
|
|
||||||
** libWINGs **
|
** libWINGs **
|
||||||
<WINGsP.h>
|
<WINGsP.h>
|
||||||
W_KeycodeToKeysym ADDED
|
|
||||||
struct W_DragDestinationInfo: new members added SIZE CHANGE
|
struct W_DragDestinationInfo: new members added SIZE CHANGE
|
||||||
|
|
||||||
<WINGs.h>
|
<WINGs.h>
|
||||||
|
|||||||
+6
-6
@@ -8,25 +8,25 @@
|
|||||||
kojima@windowmaker.info
|
kojima@windowmaker.info
|
||||||
|
|
||||||
|
|
||||||
WINGs is a small widget set with the N*XTSTEP look and feel. Its API
|
WINGs is a small widget set with the N*XTSTEP look and feel. It's API
|
||||||
is inspired in OpenStep and its implementation borrows some ideas
|
is inspired in OpenStep and it's implementation borrows some ideas
|
||||||
from Tk. It has a reasonable set of widgets, sufficient for building
|
from Tk. It has a reasonable set of widgets, sufficient for building
|
||||||
small applications (like a CDPlayer or hacking something like rxvt). It
|
small applications (like a CDPlayer or hacking something like rxvt). It
|
||||||
also has other functions that are usefull for applications, like a
|
also has other functions that are usefull for applications, like a
|
||||||
User Defaults alike configuration manager and a notification system.
|
User Defaults alike configuration manager and a notification system.
|
||||||
|
|
||||||
The library is limited and its design is a little sloppy,
|
The library is limited and it's design is a little sloppy,
|
||||||
so it's not intended to build large or complex applications, like
|
so it's not intended to build large or complex applications, like
|
||||||
anything more complex than a CDPlayer. GNUstep should be used for such
|
anything more complex than a CDPlayer. GNUstep should be used for such
|
||||||
applications.
|
applications.
|
||||||
|
|
||||||
Since WINGs is written in C and is sort of low-level it is small
|
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
|
and faster than say, Motif or even Athena. Knowing Xlib will help you to
|
||||||
workaround some of its limitations, although you'll probably be able to
|
workaround some of it's limitations, although you'll probably be able to
|
||||||
write something like a trivial tic-tac-toe game without knowing much Xlib.
|
write something like a trivial tic-tac-toe game without knowing much Xlib.
|
||||||
|
|
||||||
Some of its functions are designed to support the Window Maker window
|
Some of it's functions are designed to support the Window Maker window
|
||||||
manager (see http://windowmaker.info) In fact, its primary role is to
|
manager (see http://windowmaker.info) In fact, it's primary role is to
|
||||||
support Window Maker. All other uses of it are just an added bonus.
|
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
|
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 \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
@XFTLIBS@ @INTLIBS@ @XLIBS@
|
||||||
|
|
||||||
|
|
||||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||||
@@ -17,5 +17,4 @@ wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
|||||||
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
|
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFT_CFLAGS@ @HEADER_SEARCH_PATH@ \
|
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||||
@PANGO_CFLAGS@
|
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ static W_Class myWidgetClass = 0;
|
|||||||
*/
|
*/
|
||||||
W_Class InitMyWidget(WMScreen * scr)
|
W_Class InitMyWidget(WMScreen * scr)
|
||||||
{
|
{
|
||||||
(void)scr;
|
|
||||||
/* register our widget with WINGs and get our widget class ID */
|
/* register our widget with WINGs and get our widget class ID */
|
||||||
if (!myWidgetClass) {
|
if (!myWidgetClass) {
|
||||||
myWidgetClass = W_RegisterUserWidget();
|
myWidgetClass = W_RegisterUserWidget();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "mywidget.h"
|
#include "mywidget.h"
|
||||||
|
|
||||||
_Noreturn void wAbort(void)
|
void wAbort()
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
#include "logo.xpm"
|
#include "logo.xpm"
|
||||||
|
|
||||||
_Noreturn void wAbort(void)
|
void wAbort()
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ProgName;
|
char *ProgName;
|
||||||
|
|
||||||
_Noreturn void usage(void)
|
void usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage:\n"
|
"usage:\n"
|
||||||
@@ -53,10 +53,13 @@ int main(int argc, char **argv)
|
|||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
WMOpenPanel *oPanel;
|
WMOpenPanel *oPanel;
|
||||||
WMSavePanel *sPanel;
|
WMSavePanel *sPanel;
|
||||||
|
/* RImage *image; */
|
||||||
char *title = NULL;
|
char *title = NULL;
|
||||||
char *initial = "/";
|
char *initial = "/";
|
||||||
int ch;
|
int ch;
|
||||||
int panelType = OPEN_PANEL_TYPE;
|
int panelType = OPEN_PANEL_TYPE;
|
||||||
|
extern char *optarg;
|
||||||
|
extern int optind;
|
||||||
|
|
||||||
if (!dpy) {
|
if (!dpy) {
|
||||||
puts("could not open display");
|
puts("could not open display");
|
||||||
@@ -93,14 +96,14 @@ int main(int argc, char **argv)
|
|||||||
if (panelType == SAVE_PANEL_TYPE) {
|
if (panelType == SAVE_PANEL_TYPE) {
|
||||||
sPanel = WMGetSavePanel(scr);
|
sPanel = WMGetSavePanel(scr);
|
||||||
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
||||||
title, NULL) == True)
|
/*title */ NULL, NULL) == True)
|
||||||
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
||||||
else
|
else
|
||||||
printf("\n");
|
printf("\n");
|
||||||
} else {
|
} else {
|
||||||
oPanel = WMGetOpenPanel(scr);
|
oPanel = WMGetOpenPanel(scr);
|
||||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
||||||
title, NULL) == True)
|
/*title */ NULL, NULL) == True)
|
||||||
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
||||||
else
|
else
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
#include "logo.xpm"
|
#include "logo.xpm"
|
||||||
|
|
||||||
_Noreturn void wAbort(void)
|
void wAbort()
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ProgName;
|
char *ProgName;
|
||||||
|
|
||||||
_Noreturn void usage(void)
|
void usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage:\n"
|
"usage:\n"
|
||||||
@@ -45,6 +45,8 @@ int main(int argc, char **argv)
|
|||||||
char *initial = NULL;
|
char *initial = NULL;
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
int ch;
|
int ch;
|
||||||
|
extern char *optarg;
|
||||||
|
extern int optind;
|
||||||
|
|
||||||
WMInitializeApplication("WMQuery", &argc, argv);
|
WMInitializeApplication("WMQuery", &argc, argv);
|
||||||
|
|
||||||
|
|||||||
+3
-19
@@ -14,7 +14,7 @@
|
|||||||
* This will be called when the application will be terminated because
|
* This will be called when the application will be terminated because
|
||||||
* of a fatal error (only for memory allocation failures ATM).
|
* of a fatal error (only for memory allocation failures ATM).
|
||||||
*/
|
*/
|
||||||
_Noreturn void wAbort(void)
|
void wAbort()
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,6 @@ int windowCount = 0;
|
|||||||
|
|
||||||
void closeAction(WMWidget * self, void *data)
|
void closeAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
WMDestroyWidget(self);
|
WMDestroyWidget(self);
|
||||||
windowCount--;
|
windowCount--;
|
||||||
printf("window closed, window count = %d\n", windowCount);
|
printf("window closed, window count = %d\n", windowCount);
|
||||||
@@ -166,13 +165,10 @@ void testBox(WMScreen * scr)
|
|||||||
|
|
||||||
static void singleClick(WMWidget * self, void *data)
|
static void singleClick(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)self;
|
|
||||||
(void)data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void doubleClick(WMWidget * self, void *data)
|
static void doubleClick(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
WMSelectAllListItems((WMList *) self);
|
WMSelectAllListItems((WMList *) self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,7 +480,6 @@ void testColorPanel(WMScreen * scr)
|
|||||||
|
|
||||||
void sliderCallback(WMWidget * w, void *data)
|
void sliderCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
printf("SLIDER == %i\n", WMGetSliderValue(w));
|
printf("SLIDER == %i\n", WMGetSliderValue(w));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,7 +516,7 @@ void testSlider(WMScreen * scr)
|
|||||||
void testTextField(WMScreen * scr)
|
void testTextField(WMScreen * scr)
|
||||||
{
|
{
|
||||||
WMWindow *win;
|
WMWindow *win;
|
||||||
WMTextField *field, *field2, *field3;
|
WMTextField *field, *field2;
|
||||||
|
|
||||||
windowCount++;
|
windowCount++;
|
||||||
|
|
||||||
@@ -540,11 +535,6 @@ void testTextField(WMScreen * scr)
|
|||||||
WMMoveWidget(field2, 20, 50);
|
WMMoveWidget(field2, 20, 50);
|
||||||
WMSetTextFieldAlignment(field2, WARight);
|
WMSetTextFieldAlignment(field2, WARight);
|
||||||
|
|
||||||
field3 = WMCreateTextField(win);
|
|
||||||
WMResizeWidget(field3, 200, 20);
|
|
||||||
WMMoveWidget(field3, 20, 80);
|
|
||||||
WMSetTextFieldAlignment(field3, WACenter);
|
|
||||||
|
|
||||||
WMRealizeWidget(win);
|
WMRealizeWidget(win);
|
||||||
WMMapSubwidgets(win);
|
WMMapSubwidgets(win);
|
||||||
WMMapWidget(win);
|
WMMapWidget(win);
|
||||||
@@ -759,8 +749,6 @@ void testTabView(WMScreen * scr)
|
|||||||
|
|
||||||
void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize)
|
void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize)
|
||||||
{
|
{
|
||||||
(void)sPtr;
|
|
||||||
|
|
||||||
switch (indView) {
|
switch (indView) {
|
||||||
case 0:
|
case 0:
|
||||||
*minSize = 20;
|
*minSize = 20;
|
||||||
@@ -794,7 +782,6 @@ static void resizeSplitView(XEvent * event, void *data)
|
|||||||
|
|
||||||
void appendSubviewButtonAction(WMWidget * self, void *data)
|
void appendSubviewButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)self;
|
|
||||||
WMSplitView *sPtr = (WMSplitView *) data;
|
WMSplitView *sPtr = (WMSplitView *) data;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
WMLabel *label = WMCreateLabel(sPtr);
|
WMLabel *label = WMCreateLabel(sPtr);
|
||||||
@@ -809,7 +796,6 @@ void appendSubviewButtonAction(WMWidget * self, void *data)
|
|||||||
|
|
||||||
void removeSubviewButtonAction(WMWidget * self, void *data)
|
void removeSubviewButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)self;
|
|
||||||
WMSplitView *sPtr = (WMSplitView *) data;
|
WMSplitView *sPtr = (WMSplitView *) data;
|
||||||
int count = WMGetSplitViewSubviewsCount(sPtr);
|
int count = WMGetSplitViewSubviewsCount(sPtr);
|
||||||
|
|
||||||
@@ -822,14 +808,12 @@ void removeSubviewButtonAction(WMWidget * self, void *data)
|
|||||||
|
|
||||||
void orientationButtonAction(WMWidget * self, void *data)
|
void orientationButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)self;
|
|
||||||
WMSplitView *sPtr = (WMSplitView *) data;
|
WMSplitView *sPtr = (WMSplitView *) data;
|
||||||
WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr));
|
WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void adjustSubviewsButtonAction(WMWidget * self, void *data)
|
void adjustSubviewsButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
(void)self;
|
|
||||||
WMAdjustSplitViewSubviews((WMSplitView *) data);
|
WMAdjustSplitViewSubviews((WMSplitView *) data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -918,7 +902,7 @@ void testSplitView(WMScreen * scr)
|
|||||||
WMMapWidget(win);
|
WMMapWidget(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void testUD(void)
|
void testUD()
|
||||||
{
|
{
|
||||||
WMUserDefaults *defs;
|
WMUserDefaults *defs;
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|||||||
+1
-11
@@ -5,14 +5,4 @@ AUTOMAKE_OPTIONS =
|
|||||||
# is this a kluge? if so, how should i do it?
|
# is this a kluge? if so, how should i do it?
|
||||||
includedir = @includedir@/WINGs
|
includedir = @includedir@/WINGs
|
||||||
|
|
||||||
BUILT_SOURCES = WINGsP.h
|
include_HEADERS = WINGs.h WUtil.h 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 $@ $<
|
|
||||||
|
|||||||
+16
-31
@@ -26,7 +26,7 @@
|
|||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#define WINGS_H_VERSION 20230226
|
#define WINGS_H_VERSION 20150508
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -736,7 +736,7 @@ Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
|||||||
void *cdata);
|
void *cdata);
|
||||||
|
|
||||||
|
|
||||||
extern const char *WMSelectionOwnerDidChangeNotification;
|
extern char *WMSelectionOwnerDidChangeNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
|
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
|
||||||
|
|
||||||
@@ -795,8 +795,6 @@ char* WMGetFontName(WMFont *font);
|
|||||||
|
|
||||||
unsigned int WMFontHeight(WMFont *font);
|
unsigned int WMFontHeight(WMFont *font);
|
||||||
|
|
||||||
void WMGetScaleBaseFromSystemFont(WMScreen *scrPtr, int *alphabetWidth, int *fontHeight);
|
|
||||||
|
|
||||||
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
||||||
|
|
||||||
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
||||||
@@ -977,11 +975,11 @@ WMPoint WMGetViewScreenPosition(WMView *view);
|
|||||||
WMWidget* WMWidgetOfView(WMView *view);
|
WMWidget* WMWidgetOfView(WMView *view);
|
||||||
|
|
||||||
/* notifications */
|
/* notifications */
|
||||||
extern const char *WMViewSizeDidChangeNotification;
|
extern char *WMViewSizeDidChangeNotification;
|
||||||
|
|
||||||
extern const char *WMViewFocusDidChangeNotification;
|
extern char *WMViewFocusDidChangeNotification;
|
||||||
|
|
||||||
extern const char *WMViewRealizedNotification;
|
extern char *WMViewRealizedNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
|
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
|
||||||
|
|
||||||
@@ -1190,9 +1188,9 @@ void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
|
|||||||
|
|
||||||
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
|
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
|
||||||
|
|
||||||
extern const char *WMTextDidChangeNotification;
|
extern char *WMTextDidChangeNotification;
|
||||||
extern const char *WMTextDidBeginEditingNotification;
|
extern char *WMTextDidBeginEditingNotification;
|
||||||
extern const char *WMTextDidEndEditingNotification;
|
extern char *WMTextDidEndEditingNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
|
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
|
||||||
|
|
||||||
@@ -1212,7 +1210,7 @@ void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
|
|||||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||||
WMScrollArrowPosition position);
|
WMScrollArrowPosition position);
|
||||||
|
|
||||||
extern const char *WMScrollerDidScrollNotification;
|
extern char *WMScrollerDidScrollNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
|
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
|
||||||
|
|
||||||
@@ -1291,8 +1289,8 @@ Bool WMListAllowsMultipleSelection(WMList *lPtr);
|
|||||||
Bool WMListAllowsEmptySelection(WMList *lPtr);
|
Bool WMListAllowsEmptySelection(WMList *lPtr);
|
||||||
|
|
||||||
|
|
||||||
extern const char *WMListDidScrollNotification;
|
extern char *WMListDidScrollNotification;
|
||||||
extern const char *WMListSelectionDidChangeNotification;
|
extern char *WMListSelectionDidChangeNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
|
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
|
||||||
|
|
||||||
@@ -1324,7 +1322,7 @@ void WMSortBrowserColumnWithComparer(WMBrowser *bPtr, int column,
|
|||||||
WMCompareDataProc *func);
|
WMCompareDataProc *func);
|
||||||
|
|
||||||
/* Don't free the returned string. */
|
/* Don't free the returned string. */
|
||||||
const char* WMSetBrowserPath(WMBrowser *bPtr, const char *path);
|
char* WMSetBrowserPath(WMBrowser *bPtr, char *path);
|
||||||
|
|
||||||
/* free the returned string */
|
/* free the returned string */
|
||||||
char* WMGetBrowserPath(WMBrowser *bPtr);
|
char* WMGetBrowserPath(WMBrowser *bPtr);
|
||||||
@@ -1462,10 +1460,6 @@ void WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag);
|
|||||||
|
|
||||||
Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr);
|
Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr);
|
||||||
|
|
||||||
int WMSelectPopUpButtonPreviousItem(WMPopUpButton *bPtr);
|
|
||||||
|
|
||||||
int WMSelectPopUpButtonNextItem(WMPopUpButton *bPtr);
|
|
||||||
|
|
||||||
/* ---[ WINGs/wprogressindicator.c ]------------------------------------- */
|
/* ---[ WINGs/wprogressindicator.c ]------------------------------------- */
|
||||||
|
|
||||||
WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent);
|
WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent);
|
||||||
@@ -1500,7 +1494,7 @@ void WMSetColorPanelPickerMode(WMColorPanel *panel, WMColorPanelMode mode);
|
|||||||
|
|
||||||
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
|
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
|
||||||
|
|
||||||
extern const char *WMColorPanelColorChangedNotification;
|
extern char *WMColorPanelColorChangedNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
|
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
|
||||||
|
|
||||||
@@ -1513,7 +1507,7 @@ WMColor* WMGetColorWellColor(WMColorWell *cPtr);
|
|||||||
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
|
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
|
||||||
|
|
||||||
|
|
||||||
extern const char *WMColorWellDidChangeNotification;
|
extern char *WMColorWellDidChangeNotification;
|
||||||
|
|
||||||
|
|
||||||
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */
|
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */
|
||||||
@@ -1533,8 +1527,6 @@ void WMSetScrollViewRelief(WMScrollView *sPtr, WMReliefType type);
|
|||||||
|
|
||||||
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
||||||
|
|
||||||
void WMScrollViewScrollPoint(WMScrollView * sPtr, WMPoint point);
|
|
||||||
|
|
||||||
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
||||||
|
|
||||||
WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr);
|
WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr);
|
||||||
@@ -1847,17 +1839,10 @@ WMAlertPanel* WMCreateAlertPanel(WMScreen *app, WMWindow *owner, const char *tit
|
|||||||
const char *msg, const char *defaultButton,
|
const char *msg, const char *defaultButton,
|
||||||
const char *alternateButton, const char *otherButton);
|
const char *alternateButton, const char *otherButton);
|
||||||
|
|
||||||
WMAlertPanel* WMCreateScaledAlertPanel(WMScreen *app, WMWindow *owner, const char *title,
|
|
||||||
const char *msg, const char *defaultButton,
|
|
||||||
const char *alternateButton, const char *otherButton);
|
|
||||||
|
|
||||||
WMInputPanel* WMCreateInputPanel(WMScreen *app, WMWindow *owner, const char *title,
|
WMInputPanel* WMCreateInputPanel(WMScreen *app, WMWindow *owner, const char *title,
|
||||||
const char *msg, const char *defaultText, const char *okButton,
|
const char *msg, const char *defaultText, const char *okButton,
|
||||||
const char *cancelButton);
|
const char *cancelButton);
|
||||||
|
|
||||||
WMInputPanel* WMCreateScaledInputPanel(WMScreen *app, WMWindow *owner, const char *title,
|
|
||||||
const char *msg, const char *defaultText, const char *okButton,
|
|
||||||
const char *cancelButton);
|
|
||||||
|
|
||||||
WMGenericPanel* WMCreateGenericPanel(WMScreen *scrPtr, WMWindow *owner,
|
WMGenericPanel* WMCreateGenericPanel(WMScreen *scrPtr, WMWindow *owner,
|
||||||
const char *title, const char *defaultButton,
|
const char *title, const char *defaultButton,
|
||||||
@@ -1882,7 +1867,7 @@ void WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag);
|
|||||||
|
|
||||||
void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag);
|
void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag);
|
||||||
|
|
||||||
void WMSetFilePanelDirectory(WMFilePanel *panel, const char *path);
|
void WMSetFilePanelDirectory(WMFilePanel *panel, char *path);
|
||||||
|
|
||||||
/* you can free the returned string */
|
/* you can free the returned string */
|
||||||
char* WMGetFilePanelFileName(WMFilePanel *panel);
|
char* WMGetFilePanelFileName(WMFilePanel *panel);
|
||||||
@@ -1890,7 +1875,7 @@ char* WMGetFilePanelFileName(WMFilePanel *panel);
|
|||||||
void WMFreeFilePanel(WMFilePanel *panel);
|
void WMFreeFilePanel(WMFilePanel *panel);
|
||||||
|
|
||||||
int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
||||||
const char *path, const char *name, char **fileTypes);
|
char *path, const char *name, char **fileTypes);
|
||||||
|
|
||||||
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
|
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
@USE_PANGO@#include <pango/pango.h>
|
#ifdef USE_PANGO
|
||||||
|
#include <pango/pango.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
|
|
||||||
@@ -41,7 +43,7 @@ typedef struct _WINGsConfiguration {
|
|||||||
unsigned mouseWheelDown;
|
unsigned mouseWheelDown;
|
||||||
} _WINGsConfiguration;
|
} _WINGsConfiguration;
|
||||||
|
|
||||||
extern const char *_WINGS_progname;
|
extern char *_WINGS_progname;
|
||||||
extern _WINGsConfiguration WINGsConfiguration;
|
extern _WINGsConfiguration WINGsConfiguration;
|
||||||
extern struct W_Application WMApplication;
|
extern struct W_Application WMApplication;
|
||||||
|
|
||||||
@@ -457,7 +459,9 @@ typedef struct W_Font {
|
|||||||
short refCount;
|
short refCount;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
@USE_PANGO@ PangoLayout *layout;
|
#ifdef USE_PANGO
|
||||||
|
PangoLayout *layout;
|
||||||
|
#endif
|
||||||
} W_Font;
|
} W_Font;
|
||||||
|
|
||||||
#define W_FONTID(f) (f)->font->fid
|
#define W_FONTID(f) (f)->font->fid
|
||||||
@@ -494,8 +498,6 @@ void W_SetPreeditPositon(W_View *view, int x, int y);
|
|||||||
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
||||||
int buflen, KeySym *keysym, Status *status);
|
int buflen, KeySym *keysym, Status *status);
|
||||||
|
|
||||||
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index);
|
|
||||||
|
|
||||||
|
|
||||||
/* ---[ wmisc.c ]--------------------------------------------------------- */
|
/* ---[ wmisc.c ]--------------------------------------------------------- */
|
||||||
|
|
||||||
@@ -686,37 +688,6 @@ void W_BroadcastMessage(W_View *targetParent, XEvent *event);
|
|||||||
|
|
||||||
void W_DispatchMessage(W_View *target, XEvent *event);
|
void W_DispatchMessage(W_View *target, XEvent *event);
|
||||||
|
|
||||||
/* ---[ UTF-8 helpers ]--------------------------------------------------- */
|
|
||||||
|
|
||||||
static inline int oneUTF8CharBackward(const char *str, int len)
|
|
||||||
{
|
|
||||||
const unsigned char *ustr = (const unsigned char *)str;
|
|
||||||
int pos = 0;
|
|
||||||
|
|
||||||
while (len-- > 0 && ustr[--pos] >= 0x80 && ustr[pos] <= 0xbf) ;
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int oneUTF8CharForward(const char *str, int len)
|
|
||||||
{
|
|
||||||
const unsigned char *ustr = (const unsigned char *)str;
|
|
||||||
int pos = 0;
|
|
||||||
|
|
||||||
while (len-- > 0 && ustr[++pos] >= 0x80 && ustr[pos] <= 0xbf) ;
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
// find the beginning of the UTF8 char pointed by str
|
|
||||||
static inline int seekUTF8CharStart(const char *str, int len)
|
|
||||||
{
|
|
||||||
const unsigned char *ustr = (const unsigned char *)str;
|
|
||||||
int pos = 0;
|
|
||||||
|
|
||||||
while (len-- > 0 && ustr[pos] >= 0x80 && ustr[pos] <= 0xbf)
|
|
||||||
--pos;
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
+1
-12
@@ -193,16 +193,6 @@ typedef void WMNotificationObserverAction(void *observerData,
|
|||||||
sizeof(array) / sizeof(array[0]); \
|
sizeof(array) / sizeof(array[0]); \
|
||||||
})
|
})
|
||||||
|
|
||||||
/* These macros can be used to adjust the location and size pixel values in
|
|
||||||
* the panel layouts so that they match the configured size of the system
|
|
||||||
* font (useful with high DPI screens, where you have to increase this size).
|
|
||||||
* The macros require two local variables to be set:
|
|
||||||
* wmScaleWidth: the width of the alphabet in the current system font
|
|
||||||
* wmScaleHeight: the height of the current system font
|
|
||||||
* Use the WMGetScaleBaseFromSystemFont function to set these values.
|
|
||||||
*/
|
|
||||||
#define WMScaleX(value) ((int)((double)value / 177.0 * (double)wmScaleWidth + 0.5))
|
|
||||||
#define WMScaleY(value) ((int)((double)value / 15.0 * (double)wmScaleHeight + 0.5))
|
|
||||||
|
|
||||||
/* ---[ WINGs/memory.c ]-------------------------------------------------- */
|
/* ---[ WINGs/memory.c ]-------------------------------------------------- */
|
||||||
|
|
||||||
@@ -249,7 +239,7 @@ char* wexpandpath(const char *path);
|
|||||||
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
|
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
|
||||||
|
|
||||||
/* don't free the returned string */
|
/* don't free the returned string */
|
||||||
const char* wgethomedir(void);
|
char* wgethomedir(void);
|
||||||
|
|
||||||
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
|
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
|
||||||
|
|
||||||
@@ -864,7 +854,6 @@ Bool WMWritePropListToFile(WMPropList *plist, const char *path);
|
|||||||
|
|
||||||
/* don't free the returned string */
|
/* don't free the returned string */
|
||||||
const char* wusergnusteppath(void);
|
const char* wusergnusteppath(void);
|
||||||
const char* wuserdatapath(void);
|
|
||||||
|
|
||||||
/* Free the returned string when you no longer need it */
|
/* Free the returned string when you no longer need it */
|
||||||
char* wdefaultspathfordomain(const char *domain);
|
char* wdefaultspathfordomain(const char *domain);
|
||||||
|
|||||||
@@ -599,7 +599,7 @@ static void dragSourceResponseTimeOut(void *destView)
|
|||||||
W_DragDestinationInfoClear(info);
|
W_DragDestinationInfoClear(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void W_DragDestinationStopTimer(void)
|
void W_DragDestinationStopTimer()
|
||||||
{
|
{
|
||||||
if (dndDestinationTimer != NULL) {
|
if (dndDestinationTimer != NULL) {
|
||||||
WMDeleteTimerHandler(dndDestinationTimer);
|
WMDeleteTimerHandler(dndDestinationTimer);
|
||||||
|
|||||||
+1
-1
@@ -1080,7 +1080,7 @@ static void dragSourceResponseTimeOut(void *source)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void W_DragSourceStopTimer(void)
|
void W_DragSourceStopTimer()
|
||||||
{
|
{
|
||||||
if (dndSourceTimer != NULL) {
|
if (dndSourceTimer != NULL) {
|
||||||
WMDeleteTimerHandler(dndSourceTimer);
|
WMDeleteTimerHandler(dndSourceTimer);
|
||||||
|
|||||||
+6
-2
@@ -39,7 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const char *wgethomedir(void)
|
char *wgethomedir()
|
||||||
{
|
{
|
||||||
static char *home = NULL;
|
static char *home = NULL;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
@@ -48,7 +48,11 @@ const char *wgethomedir(void)
|
|||||||
if (home)
|
if (home)
|
||||||
return home;
|
return home;
|
||||||
|
|
||||||
tmp = GETENV("HOME");
|
#ifdef HAVE_SECURE_GETENV
|
||||||
|
tmp = secure_getenv("HOME");
|
||||||
|
#else
|
||||||
|
tmp = getenv("HOME");
|
||||||
|
#endif
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
home = wstrdup(tmp);
|
home = wstrdup(tmp);
|
||||||
return home;
|
return home;
|
||||||
|
|||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# [Christophe CURIS, 2015/01/31]
|
||||||
|
# This script is now reporting itself as deprecated (this should have been done
|
||||||
|
# a long time ago), so it should be kept for at least 2 years from now in order
|
||||||
|
# to allow users to update their scripts, and then removed.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo "Error: $0 is deprecated, please use 'pkg-config WINGs ...'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case $1 in
|
||||||
|
--cflags)
|
||||||
|
echo "Warning: $0 is deprecated, please use 'pkg-config WINGs --cflags'" >&2
|
||||||
|
pkg-config WINGs --cflags
|
||||||
|
;;
|
||||||
|
--ldflags|--lflags)
|
||||||
|
echo "Warning: $0 is deprecated, please use 'pkg-config WINGs --libs'" >&2
|
||||||
|
pkg-config WINGs --libs-only-L
|
||||||
|
;;
|
||||||
|
--libs)
|
||||||
|
echo "Warning: $0 is deprecated, please use 'pkg-config WINGs --libs'" >&2
|
||||||
|
pkg-config WINGs --libs
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: $0 is deprecated, please use 'pkg-config WINGs ...'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# [Christophe CURIS, 2015/01/31]
|
||||||
|
# This script is now reporting itself as deprecated (this should have been done
|
||||||
|
# a long time ago), so it should be kept for at least 2 years from now in order
|
||||||
|
# to allow users to update their scripts, and then removed.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo "Error: $0 is deprecated, please use 'pkg-config WUtil ...'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case $1 in
|
||||||
|
--cflags)
|
||||||
|
echo "Warning: $0 is deprecated, please use 'pkg-config WUtil --cflags'" >&2
|
||||||
|
pkg-config WUtil --cflags
|
||||||
|
;;
|
||||||
|
--ldflags|--lflags)
|
||||||
|
echo "Warning: $0 is deprecated, please use 'pkg-config WUtil --libs'" >&2
|
||||||
|
pkg-config WUtil --libs-only-L
|
||||||
|
;;
|
||||||
|
--libs)
|
||||||
|
echo "Warning: $0 is deprecated, please use 'pkg-config WUtil --libs'" >&2
|
||||||
|
pkg-config WUtil --libs
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: $0 is deprecated, please use 'pkg-config WUtil ...'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
+1
-2
@@ -107,8 +107,7 @@ void *wmalloc(size_t size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tmp != NULL)
|
memset(tmp, 0, size);
|
||||||
memset(tmp, 0, size);
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -536,7 +536,7 @@ found_end_define_fname:
|
|||||||
while (*src != '\0') {
|
while (*src != '\0') {
|
||||||
idx = 0;
|
idx = 0;
|
||||||
if (*src == '~') {
|
if (*src == '~') {
|
||||||
const char *home = wgethomedir();
|
char *home = wgethomedir();
|
||||||
while (*home != '\0') {
|
while (*home != '\0') {
|
||||||
if (idx < sizeof(buffer) - 2)
|
if (idx < sizeof(buffer) - 2)
|
||||||
buffer[idx++] = *home;
|
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);
|
macro = menu_parser_find_macro(parser, macro_name);
|
||||||
parser->cond.stack[0].skip =
|
parser->cond.stack[0].skip =
|
||||||
((check_exists) && (macro == NULL)) ||
|
((check_exists) && (macro == NULL)) ||
|
||||||
((!check_exists) && (macro != NULL));
|
((!check_exists) && (macro != NULL)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(parser->cond.stack[0].name, cmd_name, sizeof(parser->cond.stack[0].name) - 1);
|
strcpy(parser->cond.stack[0].name, cmd_name);
|
||||||
parser->cond.stack[0].line = parser->line_number;
|
parser->cond.stack[0].line = parser->line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,6 @@ void menu_parser_define_macro(WMenuParser parser)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
macro = wmalloc(sizeof(*macro));
|
macro = wmalloc(sizeof(*macro));
|
||||||
memset(arg_name, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
|
|
||||||
|
|
||||||
/* Isolate name of macro */
|
/* Isolate name of macro */
|
||||||
idx = 0;
|
idx = 0;
|
||||||
@@ -280,8 +279,7 @@ WParserMacro *menu_parser_find_macro(WMenuParser parser, const char *name)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
return macro;
|
return macro;
|
||||||
check_next_macro:
|
check_next_macro: ;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -393,8 +391,6 @@ void menu_parser_expand_macro(WMenuParser parser, WParserMacro *macro)
|
|||||||
unsigned int size;
|
unsigned int size;
|
||||||
int i, space_left;
|
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 */
|
/* Skip the name of the macro, this was not done by caller */
|
||||||
for (i = 0; macro->name[i] != '\0'; i++)
|
for (i = 0; macro->name[i] != '\0'; i++)
|
||||||
parser->rd++;
|
parser->rd++;
|
||||||
@@ -696,7 +692,7 @@ static void w_create_macro(WMenuParser parser, const char *name, WParserMacroFun
|
|||||||
WParserMacro *macro;
|
WParserMacro *macro;
|
||||||
|
|
||||||
macro = wmalloc(sizeof(*macro));
|
macro = wmalloc(sizeof(*macro));
|
||||||
strncpy(macro->name, name, sizeof(macro->name) - 1);
|
strcpy(macro->name, name);
|
||||||
macro->function = handler;
|
macro->function = handler;
|
||||||
macro->arg_count = -1;
|
macro->arg_count = -1;
|
||||||
macro->next = parser->macros;
|
macro->next = parser->macros;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ CATALOGS = @WINGSMOFILES@
|
|||||||
|
|
||||||
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
||||||
|
|
||||||
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po sr.po
|
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po
|
||||||
|
|
||||||
# WUtil files:
|
# WUtil files:
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
|||||||
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
||||||
nl.po Dutch Alwin <translations@ziggo.nl>
|
nl.po Dutch Alwin <translations@ziggo.nl>
|
||||||
fy.po Frisian Alwin <translations@ziggo.nl>
|
fy.po Frisian Alwin <translations@ziggo.nl>
|
||||||
sr.po Serbian Strahinya Radich <sr@strahinja.org>
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
|
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
|
||||||
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
||||||
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
||||||
"Language: bg\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
|
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
|
||||||
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
||||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
"Language: ca\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
|
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
|
||||||
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||||
"Language-Team: Czech <cz@li.org>\n"
|
"Language-Team: Czech <cz@li.org>\n"
|
||||||
"Language: cs\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: unknown\n"
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
|
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
|
||||||
"Last-Translator: shlomme@gmx.net\n"
|
"Last-Translator: shlomme@gmx.net\n"
|
||||||
"Language-Team: German\n"
|
"Language-Team: German\n"
|
||||||
"Language: de\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
||||||
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
|
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
|
||||||
"Language-Team: Français <fr@li.org>\n"
|
"Language-Team: Français <fr@li.org>\n"
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: unknown\n"
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
|
|||||||
+72
-33
@@ -1,14 +1,14 @@
|
|||||||
# Translation into Western Frisian for Window Maker
|
# Translation into Western Frisian for Window Maker
|
||||||
# Copyright (C) 2015-2019 Window Maker Developers Team
|
# Copyright (C) 2015 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2015.
|
# Original by Alwin <translations@ziggo.nl>, 2015.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: wmaker-0.95.7+\n"
|
"Project-Id-Version: wmaker-0.95.6+\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2016-01-21 16:19+0100\n"
|
"POT-Creation-Date: 2015-06-14 16:10+0200\n"
|
||||||
"PO-Revision-Date: 2016-01-21 00:00+0000\n"
|
"PO-Revision-Date: 2015-06-14 00:00+0000\n"
|
||||||
"Last-Translator: Alwin <translations@ziggo.nl>\n"
|
"Last-Translator: Alwin <translations@ziggo.nl>\n"
|
||||||
"Language-Team: Western Frisian\n"
|
"Language-Team: Western Frisian\n"
|
||||||
"Language: fy\n"
|
"Language: fy\n"
|
||||||
@@ -99,7 +99,7 @@ msgstr "foartidich bestânsein, ferwachte in nije rigel nei '\\'"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "reached end of file while searching '*/' for comment started at line %d"
|
msgid "reached end of file while searching '*/' for comment started at line %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"bestânsein berikt by sykjen nei '*/' foar kommentaar begûnen op rigel %d"
|
"bestânsein berikt by sykje nei '*/' foar kommentaar begûnen op rigel %d"
|
||||||
|
|
||||||
#: ../../WINGs/menuparser.c:344
|
#: ../../WINGs/menuparser.c:344
|
||||||
msgid "missing closing double-quote before end-of-line"
|
msgid "missing closing double-quote before end-of-line"
|
||||||
@@ -111,7 +111,7 @@ msgstr "ûntbrekkend slutend inkeld oanhelteken foar rigelein"
|
|||||||
|
|
||||||
#: ../../WINGs/menuparser.c:380
|
#: ../../WINGs/menuparser.c:380
|
||||||
msgid "too many nested macro expansions, breaking loop"
|
msgid "too many nested macro expansions, breaking loop"
|
||||||
msgstr "te folle neske makro-útwurkingen, syklus ôfbrutsen"
|
msgstr "te folle neste makro-útwurkingen, syklus ôfbrutsen"
|
||||||
|
|
||||||
#: ../../WINGs/menuparser.c:439
|
#: ../../WINGs/menuparser.c:439
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -140,7 +140,7 @@ msgstr "ûntbrekkende slutende '%c' yn bestânsnammeopjefte"
|
|||||||
|
|
||||||
#: ../../WINGs/menuparser.c:503
|
#: ../../WINGs/menuparser.c:503
|
||||||
msgid "too many nested #include's"
|
msgid "too many nested #include's"
|
||||||
msgstr "te folle neske #include's"
|
msgstr "te folle neste #include's"
|
||||||
|
|
||||||
#: ../../WINGs/menuparser.c:568
|
#: ../../WINGs/menuparser.c:568
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -150,11 +150,11 @@ msgstr "koe bestân \"%s\" net fine foar #include"
|
|||||||
#: ../../WINGs/menuparser.c:589
|
#: ../../WINGs/menuparser.c:589
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "missing macro name argument to #%s"
|
msgid "missing macro name argument to #%s"
|
||||||
msgstr "ûntbrekkend makronamme-argumint by #%s"
|
msgstr "ûntbrekkend makronammeargumint by #%s"
|
||||||
|
|
||||||
#: ../../WINGs/menuparser.c:600
|
#: ../../WINGs/menuparser.c:600
|
||||||
msgid "too many nested #if sequences"
|
msgid "too many nested #if sequences"
|
||||||
msgstr "te folle neske #if-rigen"
|
msgstr "te folle neste #if-rigen"
|
||||||
|
|
||||||
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
|
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -168,7 +168,7 @@ msgstr "gjin makronamme fûn foar #define"
|
|||||||
#: ../../WINGs/menuparser_macros.c:187
|
#: ../../WINGs/menuparser_macros.c:187
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "premature end of file while reading arg-list for macro \"%s\""
|
msgid "premature end of file while reading arg-list for macro \"%s\""
|
||||||
msgstr "foartidich bestânsein by ynlêzen arg.-list foar makro \"%s\""
|
msgstr "foartidich bestânsein by ynlêze arg.-list foar makro \"%s\""
|
||||||
|
|
||||||
#: ../../WINGs/menuparser_macros.c:194
|
#: ../../WINGs/menuparser_macros.c:194
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -196,7 +196,7 @@ msgstr ""
|
|||||||
#: ../../WINGs/menuparser_macros.c:253
|
#: ../../WINGs/menuparser_macros.c:253
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "macro \"%s\" already defined, ignoring redefinition"
|
msgid "macro \"%s\" already defined, ignoring redefinition"
|
||||||
msgstr "makro \"%s\" al definiearre, negearret werdefiniearjen"
|
msgstr "makro \"%s\" al definiearre, negearret werdefiniearje"
|
||||||
|
|
||||||
#: ../../WINGs/menuparser_macros.c:346
|
#: ../../WINGs/menuparser_macros.c:346
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -225,7 +225,7 @@ msgstr "te folle arguminten foar makro \"%s\", ferwachte allinnich %d"
|
|||||||
#: ../../WINGs/menuparser_macros.c:530
|
#: ../../WINGs/menuparser_macros.c:530
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "premature end of line while searching for arguments to macro \"%s\""
|
msgid "premature end of line while searching for arguments to macro \"%s\""
|
||||||
msgstr "foartidich rigelein by sykjen nei arguminten by makro \"%s\""
|
msgstr "foartidich rigelein by sykje nei arguminten by makro \"%s\""
|
||||||
|
|
||||||
#: ../../WINGs/menuparser_macros.c:536
|
#: ../../WINGs/menuparser_macros.c:536
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -345,7 +345,7 @@ msgstr "koe grutte foar bestân '%s' net krije"
|
|||||||
#: ../../WINGs/proplist.c:1531
|
#: ../../WINGs/proplist.c:1531
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error reading from file '%s'"
|
msgid "error reading from file '%s'"
|
||||||
msgstr "flater by ynlêzen bestân '%s'"
|
msgstr "flater by ynlêze bestân '%s'"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1578
|
#: ../../WINGs/proplist.c:1578
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -355,32 +355,32 @@ msgstr "%s:koe menubestân net iepenje"
|
|||||||
#: ../../WINGs/proplist.c:1660
|
#: ../../WINGs/proplist.c:1660
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "mkstemp (%s) failed"
|
msgid "mkstemp (%s) failed"
|
||||||
msgstr "oanmeitsjen unyk tydlik bestân (%s) mislearre"
|
msgstr "oanmeitsje unyk tydlik bestân (%s) mislearre"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1670
|
#: ../../WINGs/proplist.c:1670
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "mktemp (%s) failed"
|
msgid "mktemp (%s) failed"
|
||||||
msgstr "oanmeitsjen tydlik bestân (%s) mislearre"
|
msgstr "oanmeitsje tydlik bestân (%s) mislearre"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1677
|
#: ../../WINGs/proplist.c:1677
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "open (%s) failed"
|
msgid "open (%s) failed"
|
||||||
msgstr "iepenjen (%s) mislearre"
|
msgstr "iepenje (%s) mislearre"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1684
|
#: ../../WINGs/proplist.c:1684
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "writing to file: %s failed"
|
msgid "writing to file: %s failed"
|
||||||
msgstr "skriuwen nei bestân: %s mislearre"
|
msgstr "skriuwe nei bestân: %s mislearre"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1693
|
#: ../../WINGs/proplist.c:1693
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "fclose (%s) failed"
|
msgid "fclose (%s) failed"
|
||||||
msgstr "ôfsluten stream (%s) mislearre"
|
msgstr "ôfslute stream (%s) mislearre"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1701
|
#: ../../WINGs/proplist.c:1701
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "rename ('%s' to '%s') failed"
|
msgid "rename ('%s' to '%s') failed"
|
||||||
msgstr "omneamen ('%s' nei '%s') mislearre"
|
msgstr "omneame ('%s' nei '%s') mislearre"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1772
|
#: ../../WINGs/proplist.c:1772
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -388,14 +388,14 @@ msgid "Could not create component %s"
|
|||||||
msgstr "Koe komponint %s net oanmeitsje"
|
msgstr "Koe komponint %s net oanmeitsje"
|
||||||
|
|
||||||
#: ../../WINGs/userdefaults.c:72
|
#: ../../WINGs/userdefaults.c:72
|
||||||
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
|
||||||
msgstr "fariabele WMAKER_USER_ROOT, definiearre mei ûnjildich paad, net brûkt"
|
msgstr "fariabele GNUSTEP_USER_ROOT, definiearre mei ûnjildich paad, net brûkt"
|
||||||
|
|
||||||
#. something happened with the file. just overwrite it
|
#. something happened with the file. just overwrite it
|
||||||
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot read domain from file '%s' when syncing"
|
msgid "cannot read domain from file '%s' when syncing"
|
||||||
msgstr "kin domeinbestân '%s' net ynlêze by syngronisearjen"
|
msgstr "kin domeinbestân '%s' net ynlêze by syngronisearje"
|
||||||
|
|
||||||
#: ../../WINGs/dragcommon.c:60
|
#: ../../WINGs/dragcommon.c:60
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -414,11 +414,11 @@ msgstr "net-stipe ferzje %i foar XDND-berjocht by binnen gean"
|
|||||||
|
|
||||||
#: ../../WINGs/dragsource.c:163
|
#: ../../WINGs/dragsource.c:163
|
||||||
msgid "XDND selection lost during drag operation..."
|
msgid "XDND selection lost during drag operation..."
|
||||||
msgstr "XDND-seleksje ferlern ûnder fersleephanneling..."
|
msgstr "XDND-seleksje ferlern by fersleephanneling..."
|
||||||
|
|
||||||
#: ../../WINGs/dragsource.c:758
|
#: ../../WINGs/dragsource.c:758
|
||||||
msgid "could not get XDND version for target of drop"
|
msgid "could not get XDND version for target of drop"
|
||||||
msgstr "koe XDND-ferzje net krije foar doel fan ferslepen"
|
msgstr "koe XDND-ferzje net krije foar doel fan ferslepe"
|
||||||
|
|
||||||
#: ../../WINGs/dragsource.c:774
|
#: ../../WINGs/dragsource.c:774
|
||||||
msgid "could not get ownership of XDND selection"
|
msgid "could not get ownership of XDND selection"
|
||||||
@@ -456,7 +456,7 @@ msgstr "Kleuren"
|
|||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:568 ../../WINGs/wcolorpanel.c:2720
|
#: ../../WINGs/wcolorpanel.c:568 ../../WINGs/wcolorpanel.c:2720
|
||||||
msgid "Brightness"
|
msgid "Brightness"
|
||||||
msgstr "Helderens"
|
msgstr "Helderheid"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:570 ../../WINGs/wcolorpanel.c:644
|
#: ../../WINGs/wcolorpanel.c:570 ../../WINGs/wcolorpanel.c:644
|
||||||
#: ../../WINGs/wcolorpanel.c:675 ../../WINGs/wcolorpanel.c:706
|
#: ../../WINGs/wcolorpanel.c:675 ../../WINGs/wcolorpanel.c:706
|
||||||
@@ -558,7 +558,7 @@ msgstr "Nij..."
|
|||||||
msgid ""
|
msgid ""
|
||||||
"Color Panel: Could not create directory %s needed to store configurations"
|
"Color Panel: Could not create directory %s needed to store configurations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Kleurepaniel: Koe map %s, nedich om ynstellingen te bewarjen, net oanmeitsje"
|
"Kleurepaniel: Koe map %s, nedich om ynstellingen te bewarje, net oanmeitsje"
|
||||||
|
|
||||||
#. Delete the file, it doesn't belong here
|
#. Delete the file, it doesn't belong here
|
||||||
#: ../../WINGs/wcolorpanel.c:1176 ../../WINGs/wcolorpanel.c:3073
|
#: ../../WINGs/wcolorpanel.c:1176 ../../WINGs/wcolorpanel.c:3073
|
||||||
@@ -568,7 +568,7 @@ msgstr "Bestânsflater"
|
|||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1177
|
#: ../../WINGs/wcolorpanel.c:1177
|
||||||
msgid "Could not create ColorPanel configuration directory"
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
msgstr "Koe ynstellingemap Kleurepaniel net oanmeitsje"
|
msgstr "Koe ynstellingenmap Kleurepaniel net oanmeitsje"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1178 ../../WINGs/wcolorpanel.c:3074
|
#: ../../WINGs/wcolorpanel.c:1178 ../../WINGs/wcolorpanel.c:3074
|
||||||
#: ../../WINGs/wcolorpanel.c:3079 ../../WINGs/wcolorpanel.c:3104
|
#: ../../WINGs/wcolorpanel.c:3079 ../../WINGs/wcolorpanel.c:3104
|
||||||
@@ -593,7 +593,7 @@ msgstr "Fersêding"
|
|||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:2788
|
#: ../../WINGs/wcolorpanel.c:2788
|
||||||
msgid "Hue"
|
msgid "Hue"
|
||||||
msgstr "Tint"
|
msgstr "Tinte"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3012
|
#: ../../WINGs/wcolorpanel.c:3012
|
||||||
msgid "Open Palette"
|
msgid "Open Palette"
|
||||||
@@ -610,7 +610,7 @@ msgstr "kin bestân %s net ferwiderje"
|
|||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3078
|
#: ../../WINGs/wcolorpanel.c:3078
|
||||||
msgid "Couldn't remove file from Configuration Directory !"
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
msgstr "Koe bestân net ferwiderje út ynstellingemap!"
|
msgstr "Koe bestân net ferwiderje út ynstellingenmap!"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3103
|
#: ../../WINGs/wcolorpanel.c:3103
|
||||||
msgid "Rename"
|
msgid "Rename"
|
||||||
@@ -737,12 +737,12 @@ msgstr "Bestân"
|
|||||||
#: ../../WINGs/wfilepanel.c:719
|
#: ../../WINGs/wfilepanel.c:719
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Removing %s failed: %s"
|
msgid "Removing %s failed: %s"
|
||||||
msgstr "Ferwiderjen %s mislearre: %s"
|
msgstr "Ferwiderje %s mislearre: %s"
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:751
|
#: ../../WINGs/wfilepanel.c:751
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occurred browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Der trede in flater op by blêdzjen troch '%s'."
|
msgstr "Der trede in flater op by blêdzje troch '%s'."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:754
|
#: ../../WINGs/wfilepanel.c:754
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -799,7 +799,7 @@ msgstr "Koe biblioteek 'lettertype ynstelle' net inisjalisearje\n"
|
|||||||
#: ../../WINGs/widgets.c:446
|
#: ../../WINGs/widgets.c:446
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "WINGs: could not load widget images file: %s"
|
msgid "WINGs: could not load widget images file: %s"
|
||||||
msgstr "WINGs: Koe ôfbyldingebestân bestjoeringseleminten net lade: %s"
|
msgstr "WINGs: Koe ôfbyldingenbestân bestjoeringseleminten net lade: %s"
|
||||||
|
|
||||||
#: ../../WINGs/widgets.c:542
|
#: ../../WINGs/widgets.c:542
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -824,7 +824,7 @@ msgstr "0 inch"
|
|||||||
|
|
||||||
#: ../../WINGs/wtextfield.c:494
|
#: ../../WINGs/wtextfield.c:494
|
||||||
msgid "only left alignment is supported in textfields"
|
msgid "only left alignment is supported in textfields"
|
||||||
msgstr "allinnich lofts rjochtsjen wurdt stipe yn tekstfjilden"
|
msgstr "allinnich lofts rjochtsje wurdt stipe yn tekstfjilden"
|
||||||
|
|
||||||
#: ../../WINGs/wwindow.c:160
|
#: ../../WINGs/wwindow.c:160
|
||||||
msgid "window title conversion error... using STRING encoding"
|
msgid "window title conversion error... using STRING encoding"
|
||||||
@@ -833,3 +833,42 @@ msgstr "finstertitelomsettingsflater... brûkt STRING-kodearring"
|
|||||||
#: ../../WINGs/wwindow.c:181
|
#: ../../WINGs/wwindow.c:181
|
||||||
msgid "icon title conversion error... using STRING encoding"
|
msgid "icon title conversion error... using STRING encoding"
|
||||||
msgstr "ikoantitelomsettingsflater... brûkt STRING-kodearring"
|
msgstr "ikoantitelomsettingsflater... brûkt STRING-kodearring"
|
||||||
|
|
||||||
|
# Keep next entries for wmaker-0.95.6
|
||||||
|
msgid "Could not open input file \"%s\""
|
||||||
|
msgstr "Koe ynfierbestân \"%s\" net iepenje"
|
||||||
|
|
||||||
|
msgid "Could not create target file \"%s\""
|
||||||
|
msgstr "Koe doelbestân \"%s\" net oanmeitsje"
|
||||||
|
|
||||||
|
msgid "An error occured browsing '%s'."
|
||||||
|
msgstr "Der trede in flater op by blêdzje troch '%s'."
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"invalid characted '%c' in arg-list for macro \"%s\" while expecting "
|
||||||
|
"parameter name"
|
||||||
|
msgstr ""
|
||||||
|
"ûnjildich letterteken '%c' yn arg.-list foar makro \"%s\", ferwachte "
|
||||||
|
"parameternamme"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"invalid characted '%c' in arg-list for macro \"%s\" while expecting ',' "
|
||||||
|
"or ')'"
|
||||||
|
msgstr ""
|
||||||
|
"ûnjildich letterteken '%c' yn arg.-list foar makro \"%s\", ferwachte ',' "
|
||||||
|
"of ')'"
|
||||||
|
|
||||||
|
msgid "unknow directive '#%s'"
|
||||||
|
msgstr "ûnbekende oanwizing '#%s'"
|
||||||
|
|
||||||
|
msgid "found #%s but have no matching #if"
|
||||||
|
msgstr "#%s fûn, mar hat gjin bybehearrende #if"
|
||||||
|
|
||||||
|
msgid "too many nested includes"
|
||||||
|
msgstr "te folle neste #include's"
|
||||||
|
|
||||||
|
msgid "could not find file \"%s\" for include"
|
||||||
|
msgstr "koe bestân \"%s\" net fine foar #include"
|
||||||
|
|
||||||
|
msgid "too many nested macro expansion, breaking loop"
|
||||||
|
msgstr "te folle neste makro-útwurkingen, syklus ôfbrutsen"
|
||||||
|
|||||||
+3
-3
@@ -11,7 +11,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2014-02-18 00:25+0100\n"
|
"PO-Revision-Date: 2014-02-18 00:25+0100\n"
|
||||||
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
|
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
|
||||||
"Language-Team: Hungarian\n"
|
"Language-Team: Hungarian\n"
|
||||||
"Language: hu\n"
|
"Language: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -197,8 +197,8 @@ msgid "Could not create component %s"
|
|||||||
msgstr "Nem sikerült létrehozni a %s elemet"
|
msgstr "Nem sikerült létrehozni a %s elemet"
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WINGs/userdefaults.c:65
|
#: ../../../wmaker-crm/WINGs/userdefaults.c:65
|
||||||
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
|
||||||
msgstr "A WMAKER_USER_ROOT változó be van állítva, de rossz értékre. Nem használom"
|
msgstr "A GNUSTEP_USER_ROOT változó be van állítva, de rossz értékre. Nem használom"
|
||||||
|
|
||||||
#. something happened with the file. just overwrite it
|
#. something happened with the file. just overwrite it
|
||||||
#: ../../../wmaker-crm/WINGs/userdefaults.c:196
|
#: ../../../wmaker-crm/WINGs/userdefaults.c:196
|
||||||
|
|||||||
+9
-3
@@ -1,5 +1,5 @@
|
|||||||
# New translation into Dutch for Window Maker
|
# New translation into Dutch for Window Maker
|
||||||
# Copyright (C) 2014-2019 Window Maker Developers Team
|
# Copyright (C) 2014-2015 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2014.
|
# Original by Alwin <translations@ziggo.nl>, 2014.
|
||||||
#
|
#
|
||||||
@@ -389,9 +389,9 @@ msgid "Could not create component %s"
|
|||||||
msgstr "Kon component %s niet aanmaken"
|
msgstr "Kon component %s niet aanmaken"
|
||||||
|
|
||||||
#: ../../WINGs/userdefaults.c:72
|
#: ../../WINGs/userdefaults.c:72
|
||||||
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"variabele WMAKER_USER_ROOT, gedefinieerd met ongeldig pad, niet gebruikt"
|
"variabele GNUSTEP_USER_ROOT, gedefinieerd met ongeldig pad, niet gebruikt"
|
||||||
|
|
||||||
#. something happened with the file. just overwrite it
|
#. something happened with the file. just overwrite it
|
||||||
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
||||||
@@ -843,6 +843,9 @@ msgstr "Kon invoerbestand \"%s\" niet openen"
|
|||||||
msgid "Could not create target file \"%s\""
|
msgid "Could not create target file \"%s\""
|
||||||
msgstr "Kon doelbestand \"%s\" niet aanmaken"
|
msgstr "Kon doelbestand \"%s\" niet aanmaken"
|
||||||
|
|
||||||
|
msgid "An error occured browsing '%s'."
|
||||||
|
msgstr "Er trad 'n fout op bij bladeren door '%s'."
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"invalid characted '%c' in arg-list for macro \"%s\" while expecting "
|
"invalid characted '%c' in arg-list for macro \"%s\" while expecting "
|
||||||
"parameter name"
|
"parameter name"
|
||||||
@@ -857,6 +860,9 @@ msgstr ""
|
|||||||
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' "
|
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' "
|
||||||
"of ')'"
|
"of ')'"
|
||||||
|
|
||||||
|
msgid "unknow directive '#%s'"
|
||||||
|
msgstr "onbekende aanwijzing '#%s'"
|
||||||
|
|
||||||
msgid "found #%s but have no matching #if"
|
msgid "found #%s but have no matching #if"
|
||||||
msgstr "#%s gevonden, maar heeft geen bijbehorende #if"
|
msgstr "#%s gevonden, maar heeft geen bijbehorende #if"
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
|
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
|
||||||
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
|
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
|
||||||
"Language-Team: Slovak <sk@li.org>\n"
|
"Language-Team: Slovak <sk@li.org>\n"
|
||||||
"Language: sk\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|||||||
-806
@@ -1,806 +0,0 @@
|
|||||||
# 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 кодирање"
|
|
||||||
+13
-38
@@ -1253,34 +1253,22 @@ int WMGetPropListItemCount(WMPropList * plist)
|
|||||||
|
|
||||||
Bool WMIsPLString(WMPropList * plist)
|
Bool WMIsPLString(WMPropList * plist)
|
||||||
{
|
{
|
||||||
if (plist)
|
return (plist->type == WPLString);
|
||||||
return (plist->type == WPLString);
|
|
||||||
else
|
|
||||||
return False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPLData(WMPropList * plist)
|
Bool WMIsPLData(WMPropList * plist)
|
||||||
{
|
{
|
||||||
if (plist)
|
return (plist->type == WPLData);
|
||||||
return (plist->type == WPLData);
|
|
||||||
else
|
|
||||||
return False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPLArray(WMPropList * plist)
|
Bool WMIsPLArray(WMPropList * plist)
|
||||||
{
|
{
|
||||||
if (plist)
|
return (plist->type == WPLArray);
|
||||||
return (plist->type == WPLArray);
|
|
||||||
else
|
|
||||||
return False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPLDictionary(WMPropList * plist)
|
Bool WMIsPLDictionary(WMPropList * plist)
|
||||||
{
|
{
|
||||||
if (plist)
|
return (plist->type == WPLDictionary);
|
||||||
return (plist->type == WPLDictionary);
|
|
||||||
else
|
|
||||||
return False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPropListEqualTo(WMPropList * plist, WMPropList * other)
|
Bool WMIsPropListEqualTo(WMPropList * plist, WMPropList * other)
|
||||||
@@ -1695,7 +1683,6 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
|||||||
if (fprintf(theFile, "%s\n", desc) != strlen(desc) + 1) {
|
if (fprintf(theFile, "%s\n", desc) != strlen(desc) + 1) {
|
||||||
werror(_("writing to file: %s failed"), thePath);
|
werror(_("writing to file: %s failed"), thePath);
|
||||||
wfree(desc);
|
wfree(desc);
|
||||||
fclose(theFile);
|
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1732,7 +1719,7 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
|||||||
* file, and the last component is stripped off. the rest is the
|
* file, and the last component is stripped off. the rest is the
|
||||||
* the hierarchy to be created.
|
* the hierarchy to be created.
|
||||||
*
|
*
|
||||||
* refuses to create anything outside $WMAKER_USER_ROOT
|
* refuses to create anything outside $GNUSTEP_USER_ROOT
|
||||||
*
|
*
|
||||||
* returns 1 on success, 0 on failure
|
* returns 1 on success, 0 on failure
|
||||||
*/
|
*/
|
||||||
@@ -1743,7 +1730,7 @@ int wmkdirhier(const char *path)
|
|||||||
size_t p, plen;
|
size_t p, plen;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
/* Only create directories under $WMAKER_USER_ROOT */
|
/* Only create directories under $GNUSTEP_USER_ROOT */
|
||||||
if ((t = wusergnusteppath()) == NULL)
|
if ((t = wusergnusteppath()) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
if (strncmp(path, t, strlen(t)) != 0)
|
if (strncmp(path, t, strlen(t)) != 0)
|
||||||
@@ -1824,7 +1811,7 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
|
|||||||
/*
|
/*
|
||||||
* remove a directory hierarchy
|
* remove a directory hierarchy
|
||||||
*
|
*
|
||||||
* refuses to remove anything outside $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library
|
* refuses to remove anything outside $GNUSTEP_USER_ROOT
|
||||||
*
|
*
|
||||||
* returns 1 on success, 0 on failure
|
* returns 1 on success, 0 on failure
|
||||||
*
|
*
|
||||||
@@ -1834,27 +1821,15 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
|
|||||||
*/
|
*/
|
||||||
int wrmdirhier(const char *path)
|
int wrmdirhier(const char *path)
|
||||||
{
|
{
|
||||||
const char *libpath;
|
|
||||||
char *udefpath = NULL;
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int error;
|
int error;
|
||||||
|
const char *t;
|
||||||
|
|
||||||
/* Only remove directories under $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library */
|
/* Only remove directories under $GNUSTEP_USER_ROOT */
|
||||||
libpath = wuserdatapath();
|
if ((t = wusergnusteppath()) == NULL)
|
||||||
if (strncmp(path, libpath, strlen(libpath)) == 0)
|
return EPERM;
|
||||||
if (path[strlen(libpath)] == '/')
|
if (strncmp(path, t, strlen(t)) != 0)
|
||||||
goto path_in_valid_tree;
|
return EPERM;
|
||||||
|
|
||||||
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 */
|
/* Shortcut if it doesn't exist to begin with */
|
||||||
if (stat(path, &st) == -1)
|
if (stat(path, &st) == -1)
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MAX_PROPERTY_SIZE 8*1024
|
#define MAX_PROPERTY_SIZE 8*1024
|
||||||
|
|
||||||
const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
||||||
|
|
||||||
typedef struct SelectionHandler {
|
typedef struct SelectionHandler {
|
||||||
WMView *view;
|
WMView *view;
|
||||||
@@ -261,7 +261,7 @@ static WMData *getSelectionData(Display * dpy, Window win, Atom where)
|
|||||||
|
|
||||||
bpi = bits / 8;
|
bpi = bits / 8;
|
||||||
|
|
||||||
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (void *) XFree);
|
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (WMFreeDataProc *) XFree);
|
||||||
WMSetDataFormat(wdata, bits);
|
WMSetDataFormat(wdata, bits);
|
||||||
|
|
||||||
return wdata;
|
return wdata;
|
||||||
|
|||||||
+7
-5
@@ -204,7 +204,7 @@ char *wstrndup(const char *str, size_t len)
|
|||||||
char *wstrconcat(const char *str1, const char *str2)
|
char *wstrconcat(const char *str1, const char *str2)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
size_t slen, slen1;
|
size_t slen;
|
||||||
|
|
||||||
if (!str1 && str2)
|
if (!str1 && str2)
|
||||||
return wstrdup(str2);
|
return wstrdup(str2);
|
||||||
@@ -213,11 +213,13 @@ char *wstrconcat(const char *str1, const char *str2)
|
|||||||
else if (!str1 && !str2)
|
else if (!str1 && !str2)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
slen1 = strlen(str1);
|
slen = strlen(str1) + strlen(str2) + 1;
|
||||||
slen = slen1 + strlen(str2) + 1;
|
|
||||||
str = wmalloc(slen);
|
str = wmalloc(slen);
|
||||||
strcpy(str, str1);
|
if (wstrlcpy(str, str1, slen) >= slen ||
|
||||||
strcpy(str + slen1, str2);
|
wstrlcat(str, str2, slen) >= slen) {
|
||||||
|
wfree(str);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-22
@@ -40,32 +40,36 @@ char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification
|
|||||||
|
|
||||||
static void synchronizeUserDefaults(void *foo);
|
static void synchronizeUserDefaults(void *foo);
|
||||||
|
|
||||||
|
#define DEFAULTS_DIR "/Defaults"
|
||||||
#ifndef HAVE_INOTIFY
|
#ifndef HAVE_INOTIFY
|
||||||
/* Check defaults database for changes every this many milliseconds */
|
/* Check defaults database for changes every this many milliseconds */
|
||||||
/* XXX: this is shared with src/ stuff, put it in some common header */
|
/* XXX: this is shared with src/ stuff, put it in some common header */
|
||||||
#define UD_SYNC_INTERVAL 2000
|
#define UD_SYNC_INTERVAL 2000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *wusergnusteppath(void)
|
const char *wusergnusteppath()
|
||||||
{
|
{
|
||||||
static const char subdir[] = "/" GSUSER_SUBDIR;
|
static const char subdir[] = "/GNUstep";
|
||||||
static char *path = NULL;
|
static char *path = NULL;
|
||||||
char *gspath;
|
char *gspath, *h;
|
||||||
const char *h;
|
|
||||||
int pathlen;
|
int pathlen;
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
/* Value have been already computed, re-use it */
|
/* Value have been already computed, re-use it */
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
gspath = GETENV("WMAKER_USER_ROOT");
|
#ifdef HAVE_SECURE_GETENV
|
||||||
|
gspath = secure_getenv("GNUSTEP_USER_ROOT");
|
||||||
|
#else
|
||||||
|
gspath = getenv("GNUSTEP_USER_ROOT");
|
||||||
|
#endif
|
||||||
if (gspath) {
|
if (gspath) {
|
||||||
gspath = wexpandpath(gspath);
|
gspath = wexpandpath(gspath);
|
||||||
if (gspath) {
|
if (gspath) {
|
||||||
path = gspath;
|
path = gspath;
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
wwarning(_("variable WMAKER_USER_ROOT defined with invalid path, not used"));
|
wwarning(_("variable GNUSTEP_USER_ROOT defined with invalid path, not used"));
|
||||||
}
|
}
|
||||||
|
|
||||||
h = wgethomedir();
|
h = wgethomedir();
|
||||||
@@ -80,19 +84,6 @@ const char *wusergnusteppath(void)
|
|||||||
return path;
|
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 *wdefaultspathfordomain(const char *domain)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
@@ -100,20 +91,31 @@ char *wdefaultspathfordomain(const char *domain)
|
|||||||
size_t slen;
|
size_t slen;
|
||||||
|
|
||||||
gspath = wusergnusteppath();
|
gspath = wusergnusteppath();
|
||||||
slen = strlen(gspath) + strlen("/" DEFAULTS_SUBDIR "/") + strlen(domain) + 1;
|
slen = strlen(gspath) + strlen(DEFAULTS_DIR) + strlen(domain) + 4;
|
||||||
path = wmalloc(slen);
|
path = wmalloc(slen);
|
||||||
|
|
||||||
strcpy(path, gspath);
|
strcpy(path, gspath);
|
||||||
strcat(path, "/" DEFAULTS_SUBDIR "/");
|
strcat(path, DEFAULTS_DIR);
|
||||||
|
strcat(path, "/");
|
||||||
strcat(path, domain);
|
strcat(path, domain);
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: doesn't quite belong to *user*defaults.c */
|
/* XXX: doesn't quite belong to *user*defaults.c */
|
||||||
|
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||||
|
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||||
|
#endif
|
||||||
char *wglobaldefaultspathfordomain(const char *domain)
|
char *wglobaldefaultspathfordomain(const char *domain)
|
||||||
{
|
{
|
||||||
return wstrconcat(PKGCONFDIR "/", domain);
|
char *t = NULL;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
len = strlen( SYSCONFDIR ) + strlen( GLOBAL_DEFAULTS_SUBDIR ) + strlen(domain) + 3;
|
||||||
|
t = wmalloc(len);
|
||||||
|
snprintf(t, len, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||||
|
|
||||||
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
void w_save_defaults_changes(void)
|
void w_save_defaults_changes(void)
|
||||||
|
|||||||
+22
-32
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
struct W_Application WMApplication;
|
struct W_Application WMApplication;
|
||||||
|
|
||||||
const char *_WINGS_progname = NULL;
|
char *_WINGS_progname = NULL;
|
||||||
|
|
||||||
Bool W_ApplicationInitialized(void)
|
Bool W_ApplicationInitialized(void)
|
||||||
{
|
{
|
||||||
@@ -83,7 +83,7 @@ void WMSetResourcePath(const char *path)
|
|||||||
WMApplication.resourcePath = wstrdup(path);
|
WMApplication.resourcePath = wstrdup(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *WMGetApplicationName(void)
|
char *WMGetApplicationName()
|
||||||
{
|
{
|
||||||
return WMApplication.applicationName;
|
return WMApplication.applicationName;
|
||||||
}
|
}
|
||||||
@@ -131,9 +131,7 @@ error:
|
|||||||
|
|
||||||
char *WMPathForResourceOfType(const char *resource, const char *ext)
|
char *WMPathForResourceOfType(const char *resource, const char *ext)
|
||||||
{
|
{
|
||||||
const char *gslocapps, *gssysapps, *gsuserapps;
|
|
||||||
char *path, *appdir;
|
char *path, *appdir;
|
||||||
char buffer[PATH_MAX];
|
|
||||||
size_t slen;
|
size_t slen;
|
||||||
|
|
||||||
path = appdir = NULL;
|
path = appdir = NULL;
|
||||||
@@ -142,12 +140,12 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
|
|||||||
* Paths are searched in this order:
|
* Paths are searched in this order:
|
||||||
* - resourcePath/ext
|
* - resourcePath/ext
|
||||||
* - dirname(argv[0])/ext
|
* - dirname(argv[0])/ext
|
||||||
* - WMAKER_USER_ROOT/Applications/ApplicationName.app/ext
|
* - GNUSTEP_USER_ROOT/Applications/ApplicationName.app/ext
|
||||||
* - GNUSTEP_USER_APPS/ApplicationName.app/ext
|
* - ~/GNUstep/Applications/ApplicationName.app/ext
|
||||||
* - GNUSTEP_LOCAL_APPS/ApplicationName.app/ext
|
* - GNUSTEP_LOCAL_ROOT/Applications/ApplicationName.app/ext
|
||||||
* - /usr/local/lib/GNUstep/Applications/ApplicationName.app/ext
|
* - /usr/local/GNUstep/Applications/ApplicationName.app/ext
|
||||||
* - GNUSTEP_SYSTEM_APPS/ApplicationName.app/ext
|
* - GNUSTEP_SYSTEM_ROOT/Applications/ApplicationName.app/ext
|
||||||
* - /usr/lib/GNUstep/Applications/ApplicationName.app/ext
|
* - /usr/GNUstep/Applications/ApplicationName.app/ext
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (WMApplication.resourcePath) {
|
if (WMApplication.resourcePath) {
|
||||||
@@ -172,40 +170,32 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer), "Applications/%s.app", WMApplication.applicationName);
|
slen = strlen(WMApplication.applicationName) + sizeof("Applications/.app");
|
||||||
path = checkFile(GETENV("WMAKER_USER_ROOT"), buffer, ext, resource);
|
|
||||||
if (path)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
slen = strlen(WMApplication.applicationName) + sizeof("/.app");
|
|
||||||
appdir = wmalloc(slen);
|
appdir = wmalloc(slen);
|
||||||
if (snprintf(appdir, slen, "/%s.app", WMApplication.applicationName) >= slen)
|
if (snprintf(appdir, slen, "Applications/%s.app", WMApplication.applicationName) >= slen)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
gsuserapps = GETENV("GNUSTEP_USER_APPS");
|
path = checkFile(getenv("GNUSTEP_USER_ROOT"), appdir, ext, resource);
|
||||||
if (!gsuserapps) {
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s/Applications", wusergnusteppath());
|
|
||||||
gsuserapps = buffer;
|
|
||||||
}
|
|
||||||
path = checkFile(gsuserapps, appdir, ext, resource);
|
|
||||||
if (path)
|
if (path)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
gslocapps = GETENV("GNUSTEP_LOCAL_APPS");
|
path = checkFile(wusergnusteppath(), appdir, ext, resource);
|
||||||
if (!gslocapps)
|
|
||||||
gslocapps = "/usr/local/lib/GNUstep/Applications";
|
|
||||||
path = checkFile(gslocapps, appdir, ext, resource);
|
|
||||||
if (path)
|
if (path)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
gssysapps = GETENV("GNUSTEP_SYSTEM_APPS");
|
path = checkFile(getenv("GNUSTEP_LOCAL_ROOT"), appdir, ext, resource);
|
||||||
if (!gssysapps)
|
|
||||||
gssysapps = "/usr/lib/GNUstep/Applications";
|
|
||||||
path = checkFile(gssysapps, appdir, ext, resource);
|
|
||||||
if (path)
|
if (path)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
path = checkFile("/usr/GNUstep/System/Applications", appdir, ext, resource); /* falls through */
|
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 */
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (appdir)
|
if (appdir)
|
||||||
|
|||||||
+2
-3
@@ -619,12 +619,11 @@ void WMSetBrowserHasScroller(WMBrowser * bPtr, int hasScroller)
|
|||||||
bPtr->flags.hasScroller = hasScroller;
|
bPtr->flags.hasScroller = hasScroller;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *WMSetBrowserPath(WMBrowser * bPtr, const char *path)
|
char *WMSetBrowserPath(WMBrowser * bPtr, char *path)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *str;
|
char *str;
|
||||||
char *tmp;
|
char *tmp, *retPtr = NULL;
|
||||||
const char *retPtr = NULL;
|
|
||||||
int item;
|
int item;
|
||||||
WMListItem *listItem;
|
WMListItem *listItem;
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -51,7 +51,7 @@ static WMColor *findCloseColor(WMScreen * scr, unsigned short red, unsigned shor
|
|||||||
color->refCount = 1;
|
color->refCount = 1;
|
||||||
color->color = xcolor;
|
color->color = xcolor;
|
||||||
color->alpha = alpha;
|
color->alpha = alpha;
|
||||||
color->flags.exact = 0;
|
color->flags.exact = 1;
|
||||||
color->gc = NULL;
|
color->gc = NULL;
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
@@ -91,7 +91,7 @@ WMColor *WMCreateRGBColor(WMScreen * scr, unsigned short red, unsigned short gre
|
|||||||
color = findCloseColor(scr, red, green, blue, 0xffff);
|
color = findCloseColor(scr, red, green, blue, 0xffff);
|
||||||
}
|
}
|
||||||
if (!color)
|
if (!color)
|
||||||
color = scr->black;
|
color = WMBlackColor(scr);
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ WMColor *WMCreateRGBAColor(WMScreen * scr, unsigned short red, unsigned short gr
|
|||||||
color = findCloseColor(scr, red, green, blue, alpha);
|
color = findCloseColor(scr, red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
if (!color)
|
if (!color)
|
||||||
color = scr->black;
|
color = WMBlackColor(scr);
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-33
@@ -44,7 +44,7 @@
|
|||||||
# include <X11/extensions/shape.h>
|
# include <X11/extensions/shape.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
|
char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bitmaps for magnifying glass cursor
|
* Bitmaps for magnifying glass cursor
|
||||||
@@ -67,6 +67,9 @@ static unsigned char Cursor_bits[] = {
|
|||||||
0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x70
|
0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x70
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Cursor shape-mask */
|
||||||
|
#define Cursor_shape_width 32
|
||||||
|
#define Cursor_shape_height 32
|
||||||
static unsigned char Cursor_shape_bits[] = {
|
static unsigned char Cursor_shape_bits[] = {
|
||||||
0x00, 0x7e, 0x00, 0x00, 0xc0, 0x81, 0x03, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x08,
|
0x00, 0x7e, 0x00, 0x00, 0xc0, 0x81, 0x03, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x08,
|
||||||
0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
|
0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
|
||||||
@@ -394,7 +397,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
|
|||||||
panel->mode = WMWheelModeColorPanel;
|
panel->mode = WMWheelModeColorPanel;
|
||||||
panel->lastChanged = 0;
|
panel->lastChanged = 0;
|
||||||
panel->slidersmode = WMRGBModeColorPanel;
|
panel->slidersmode = WMRGBModeColorPanel;
|
||||||
panel->configurationPath = wstrconcat(wuserdatapath(), "/Colors/");
|
panel->configurationPath = wstrconcat(wusergnusteppath(), "/Library/Colors/");
|
||||||
|
|
||||||
/* Some General Purpose Widgets */
|
/* Some General Purpose Widgets */
|
||||||
panel->colorWell = WMCreateColorWell(panel->win);
|
panel->colorWell = WMCreateColorWell(panel->win);
|
||||||
@@ -1159,18 +1162,21 @@ static void readConfiguration(W_ColorPanel * panel)
|
|||||||
|
|
||||||
DIR *dPtr;
|
DIR *dPtr;
|
||||||
struct dirent *dp;
|
struct dirent *dp;
|
||||||
|
struct stat stat_buf;
|
||||||
int item;
|
int item;
|
||||||
|
|
||||||
if (!wmkdirhier(panel->configurationPath)) {
|
if (stat(panel->configurationPath, &stat_buf) != 0) {
|
||||||
werror(_("Color Panel: Could not create directory %s needed"
|
if (mkdir(panel->configurationPath, S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) != 0) {
|
||||||
" to store configurations"), panel->configurationPath);
|
werror(_("Color Panel: Could not create directory %s needed"
|
||||||
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
" to store configurations"), panel->configurationPath);
|
||||||
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
||||||
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
||||||
_("File Error"),
|
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||||
_("Could not create ColorPanel configuration directory"),
|
_("File Error"),
|
||||||
_("OK"), NULL, NULL);
|
_("Could not create ColorPanel configuration directory"),
|
||||||
|
_("OK"), NULL, NULL);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2259,7 +2265,7 @@ static void wheelPositionSelectionOutBounds(W_ColorPanel * panel, int x, int y)
|
|||||||
|
|
||||||
static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel)
|
static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel)
|
||||||
{
|
{
|
||||||
CPColor from = {};
|
CPColor from;
|
||||||
unsigned long ofs;
|
unsigned long ofs;
|
||||||
|
|
||||||
ofs = panel->coly * panel->wheelMtrx->width + panel->colx;
|
ofs = panel->coly * panel->wheelMtrx->width + panel->colx;
|
||||||
@@ -2382,8 +2388,6 @@ void rgbIntToChar(W_ColorPanel *panel, int *value)
|
|||||||
case RGBhex:
|
case RGBhex:
|
||||||
format = "%0X";
|
format = "%0X";
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
format = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(tmp, format, value[0]);
|
sprintf(tmp, format, value[0]);
|
||||||
@@ -2604,7 +2608,7 @@ static void cmykTextFieldCallback(void *observerData, WMNotification * notificat
|
|||||||
|
|
||||||
static void hsbSliderCallback(WMWidget * w, void *data)
|
static void hsbSliderCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
CPColor cpColor = {};
|
CPColor cpColor;
|
||||||
int value[3];
|
int value[3];
|
||||||
char tmp[4];
|
char tmp[4];
|
||||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||||
@@ -2640,9 +2644,9 @@ static void hsbSliderCallback(WMWidget * w, void *data)
|
|||||||
|
|
||||||
static void hsbTextFieldCallback(void *observerData, WMNotification * notification)
|
static void hsbTextFieldCallback(void *observerData, WMNotification * notification)
|
||||||
{
|
{
|
||||||
CPColor cpColor = {};
|
CPColor cpColor;
|
||||||
int value[3];
|
int value[3];
|
||||||
char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */
|
char tmp[4];
|
||||||
int n;
|
int n;
|
||||||
W_ColorPanel *panel = (W_ColorPanel *) observerData;
|
W_ColorPanel *panel = (W_ColorPanel *) observerData;
|
||||||
|
|
||||||
@@ -3395,9 +3399,6 @@ static void rgbInit(W_ColorPanel * panel)
|
|||||||
case RGBhex:
|
case RGBhex:
|
||||||
format = "%0X";
|
format = "%0X";
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
/* Avoid compiler warning */
|
|
||||||
format = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(tmp, format, panel->color.rgb.red);
|
sprintf(tmp, format, panel->color.rgb.red);
|
||||||
@@ -3450,7 +3451,7 @@ static void hsbInit(W_ColorPanel * panel)
|
|||||||
WMSetSliderValue(panel->hsbSaturationS, value[1]);
|
WMSetSliderValue(panel->hsbSaturationS, value[1]);
|
||||||
WMSetSliderValue(panel->hsbBrightnessS, value[2]);
|
WMSetSliderValue(panel->hsbBrightnessS, value[2]);
|
||||||
|
|
||||||
sprintf(tmp, "%hu", value[0]);
|
sprintf(tmp, "%d", value[0]);
|
||||||
WMSetTextFieldText(panel->hsbHueT, tmp);
|
WMSetTextFieldText(panel->hsbHueT, tmp);
|
||||||
sprintf(tmp, "%d", value[1]);
|
sprintf(tmp, "%d", value[1]);
|
||||||
WMSetTextFieldText(panel->hsbSaturationT, tmp);
|
WMSetTextFieldText(panel->hsbSaturationT, tmp);
|
||||||
@@ -3501,17 +3502,13 @@ static void convertCPColor(CPColor * color)
|
|||||||
old_hue = color->hsv.hue;
|
old_hue = color->hsv.hue;
|
||||||
RRGBtoHSV(&(color->rgb), &(color->hsv));
|
RRGBtoHSV(&(color->rgb), &(color->hsv));
|
||||||
|
|
||||||
/*
|
/* In black the hue is undefined, and may change by conversion
|
||||||
* For pure grey colors, the Hue is generally calculated
|
* Same for white. */
|
||||||
* as 0, but in reality the Hue does not matter.
|
if (((color->rgb.red == 0) &&
|
||||||
*
|
(color->rgb.green == 0) &&
|
||||||
* But in an interactive GUI it is interresting to remember
|
(color->rgb.blue == 0)) ||
|
||||||
* the previous Hue because if user moves away from perfect
|
((color->rgb.red == 0) && (color->rgb.green == 0) && (color->rgb.blue == 255))
|
||||||
* 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;
|
color->hsv.hue = old_hue;
|
||||||
break;
|
break;
|
||||||
case cpHSV:
|
case cpHSV:
|
||||||
|
|||||||
+4
-4
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#define XDND_COLOR_DATA_TYPE "application/X-color"
|
#define XDND_COLOR_DATA_TYPE "application/X-color"
|
||||||
|
|
||||||
const char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
|
char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
|
||||||
|
|
||||||
typedef struct W_ColorWell {
|
typedef struct W_ColorWell {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -173,10 +173,10 @@ WMColorWell *WMCreateColorWell(WMWidget * parent)
|
|||||||
|
|
||||||
void WMSetColorWellColor(WMColorWell * cPtr, WMColor * color)
|
void WMSetColorWellColor(WMColorWell * cPtr, WMColor * color)
|
||||||
{
|
{
|
||||||
if (cPtr->color && cPtr->color != color) {
|
if (cPtr->color)
|
||||||
WMReleaseColor(cPtr->color);
|
WMReleaseColor(cPtr->color);
|
||||||
cPtr->color = WMRetainColor(color);
|
|
||||||
}
|
cPtr->color = WMRetainColor(color);
|
||||||
|
|
||||||
if (cPtr->colorView->flags.realized && cPtr->colorView->flags.mapped)
|
if (cPtr->colorView->flags.realized && cPtr->colorView->flags.mapped)
|
||||||
paintColorWell(cPtr);
|
paintColorWell(cPtr);
|
||||||
|
|||||||
@@ -29,12 +29,6 @@
|
|||||||
# define _(text) (text)
|
# define _(text) (text)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SECURE_GETENV
|
|
||||||
#define GETENV(x) secure_getenv((x))
|
|
||||||
#else
|
|
||||||
#define GETENV(x) getenv((x))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* WINGS_CONFIG_H_ */
|
#endif /* WINGS_CONFIG_H_ */
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -343,7 +343,7 @@ void WMFreeFilePanel(WMFilePanel * panel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, const char *path, const char *name, char **fileTypes)
|
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *path, const char *name, char **fileTypes)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
|
|
||||||
@@ -387,12 +387,12 @@ WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, const cha
|
|||||||
return (panel->flags.canceled ? False : True);
|
return (panel->flags.canceled ? False : True);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WMSetFilePanelDirectory(WMFilePanel * panel, const char *path)
|
void WMSetFilePanelDirectory(WMFilePanel * panel, char *path)
|
||||||
{
|
{
|
||||||
WMList *list;
|
WMList *list;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
int col;
|
int col;
|
||||||
const char *rest;
|
char *rest;
|
||||||
|
|
||||||
rest = WMSetBrowserPath(panel->browser, path);
|
rest = WMSetBrowserPath(panel->browser, path);
|
||||||
if (strcmp(path, "/") == 0)
|
if (strcmp(path, "/") == 0)
|
||||||
@@ -761,7 +761,7 @@ static void goFloppy(WMWidget *widget, void *p_panel)
|
|||||||
static void goHome(WMWidget *widget, void *p_panel)
|
static void goHome(WMWidget *widget, void *p_panel)
|
||||||
{
|
{
|
||||||
WMFilePanel *panel = p_panel;
|
WMFilePanel *panel = p_panel;
|
||||||
const char *home;
|
char *home;
|
||||||
|
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) widget;
|
(void) widget;
|
||||||
|
|||||||
+33
-47
@@ -70,30 +70,37 @@ static Bool hasProperty(FcPattern * pattern, const char *property)
|
|||||||
return False;
|
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)
|
static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
||||||
{
|
{
|
||||||
FcPattern *pattern = NULL;
|
FcPattern *pattern;
|
||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
if (font && font[0] == '-') {
|
if (font[0] == '-') {
|
||||||
pattern = xlfdToFcPattern(font);
|
pattern = xlfdToFcPattern(font);
|
||||||
} else {
|
} else {
|
||||||
pattern = FcNameParse((const FcChar8 *) font);
|
pattern = FcNameParse((const FcChar8 *) font);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pattern) {
|
/*FcPatternPrint(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) {
|
if (size > 0) {
|
||||||
FcPatternDel(pattern, FC_PIXEL_SIZE);
|
FcPatternDel(pattern, FC_PIXEL_SIZE);
|
||||||
@@ -102,6 +109,12 @@ static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
|||||||
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)DEFAULT_SIZE);
|
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);
|
result = (char *)FcNameUnparse(pattern);
|
||||||
FcPatternDestroy(pattern);
|
FcPatternDestroy(pattern);
|
||||||
|
|
||||||
@@ -122,7 +135,7 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
|
|||||||
double size;
|
double size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fontName && fontName[0] == '-') {
|
if (fontName[0] == '-') {
|
||||||
fname = xlfdToFcName(fontName);
|
fname = xlfdToFcName(fontName);
|
||||||
} else {
|
} else {
|
||||||
fname = wstrdup(fontName);
|
fname = wstrdup(fontName);
|
||||||
@@ -174,10 +187,6 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
|
|||||||
pango_layout_set_font_description(layout, description);
|
pango_layout_set_font_description(layout, description);
|
||||||
|
|
||||||
font->layout = layout;
|
font->layout = layout;
|
||||||
|
|
||||||
pango_font_description_free(description);
|
|
||||||
g_object_unref(context);
|
|
||||||
FcPatternDestroy(pattern);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL);
|
assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL);
|
||||||
@@ -201,11 +210,6 @@ void WMReleaseFont(WMFont * font)
|
|||||||
font->refCount--;
|
font->refCount--;
|
||||||
if (font->refCount < 1) {
|
if (font->refCount < 1) {
|
||||||
XftFontClose(font->screen->display, font->font);
|
XftFontClose(font->screen->display, font->font);
|
||||||
#ifdef USE_PANGO
|
|
||||||
if (font->layout) {
|
|
||||||
g_object_unref(font->layout);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (font->name) {
|
if (font->name) {
|
||||||
WMHashRemove(font->screen->fontCache, font->name);
|
WMHashRemove(font->screen->fontCache, font->name);
|
||||||
wfree(font->name);
|
wfree(font->name);
|
||||||
@@ -233,16 +237,6 @@ char *WMGetFontName(WMFont * font)
|
|||||||
return font->name;
|
return font->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WMGetScaleBaseFromSystemFont(WMScreen *scrPtr, int *alphabetWidth, int *fontHeight)
|
|
||||||
{
|
|
||||||
WMFont *font;
|
|
||||||
|
|
||||||
font = WMDefaultSystemFont(scrPtr);
|
|
||||||
*alphabetWidth = WMWidthOfString(font, "abcdefghijklmnopqrstuvwxyz", 26);
|
|
||||||
*fontHeight = WMFontHeight(font);
|
|
||||||
WMReleaseFont(font);
|
|
||||||
}
|
|
||||||
|
|
||||||
WMFont *WMDefaultSystemFont(WMScreen * scrPtr)
|
WMFont *WMDefaultSystemFont(WMScreen * scrPtr)
|
||||||
{
|
{
|
||||||
return WMRetainFont(scrPtr->normalFont);
|
return WMRetainFont(scrPtr->normalFont);
|
||||||
@@ -258,11 +252,7 @@ WMFont *WMSystemFontOfSize(WMScreen * scrPtr, int size)
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
char *fontSpec;
|
char *fontSpec;
|
||||||
|
|
||||||
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, DEFAULT_FONT);
|
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, NULL);
|
||||||
|
|
||||||
if (!fontSpec) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
font = WMCreateFont(scrPtr, fontSpec);
|
font = WMCreateFont(scrPtr, fontSpec);
|
||||||
|
|
||||||
@@ -280,11 +270,7 @@ WMFont *WMBoldSystemFontOfSize(WMScreen * scrPtr, int size)
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
char *fontSpec;
|
char *fontSpec;
|
||||||
|
|
||||||
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, DEFAULT_FONT);
|
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, NULL);
|
||||||
|
|
||||||
if (!fontSpec) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
font = WMCreateFont(scrPtr, fontSpec);
|
font = WMCreateFont(scrPtr, fontSpec);
|
||||||
|
|
||||||
@@ -340,7 +326,7 @@ void WMDrawString(WMScreen * scr, Drawable d, WMColor * color, WMFont * font, in
|
|||||||
|
|
||||||
#ifdef USE_PANGO
|
#ifdef USE_PANGO
|
||||||
previous_text = pango_layout_get_text(font->layout);
|
previous_text = pango_layout_get_text(font->layout);
|
||||||
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
if ((previous_text == NULL) || (strcmp(text, previous_text) != 0))
|
||||||
pango_layout_set_text(font->layout, text, length);
|
pango_layout_set_text(font->layout, text, length);
|
||||||
pango_xft_render_layout(scr->xftdraw, &xftcolor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
pango_xft_render_layout(scr->xftdraw, &xftcolor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
||||||
#else
|
#else
|
||||||
@@ -378,7 +364,7 @@ WMDrawImageString(WMScreen * scr, Drawable d, WMColor * color, WMColor * backgro
|
|||||||
|
|
||||||
#ifdef USE_PANGO
|
#ifdef USE_PANGO
|
||||||
previous_text = pango_layout_get_text(font->layout);
|
previous_text = pango_layout_get_text(font->layout);
|
||||||
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
if ((previous_text == NULL) || (strcmp(text, previous_text) != 0))
|
||||||
pango_layout_set_text(font->layout, text, length);
|
pango_layout_set_text(font->layout, text, length);
|
||||||
pango_xft_render_layout(scr->xftdraw, &textColor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
pango_xft_render_layout(scr->xftdraw, &textColor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
||||||
#else
|
#else
|
||||||
|
|||||||
+2
-2
@@ -700,7 +700,7 @@ static void typefaceClick(WMWidget * w, void *data)
|
|||||||
|
|
||||||
WM_ITERATE_ARRAY(face->sizes, size, i) {
|
WM_ITERATE_ARRAY(face->sizes, size, i) {
|
||||||
if (size != NULL) {
|
if (size != NULL) {
|
||||||
int size_int = (intptr_t) size;
|
int size_int = (int) size;
|
||||||
|
|
||||||
sprintf(buffer, "%i", size_int);
|
sprintf(buffer, "%i", size_int);
|
||||||
|
|
||||||
@@ -802,7 +802,7 @@ static void setFontPanelFontName(FontPanel * panel, const char *family, const ch
|
|||||||
char buffer[32];
|
char buffer[32];
|
||||||
|
|
||||||
if (vsize != NULL) {
|
if (vsize != NULL) {
|
||||||
int size_int = (intptr_t) vsize;
|
int size_int = (int) vsize;
|
||||||
|
|
||||||
sprintf(buffer, "%i", size_int);
|
sprintf(buffer, "%i", size_int);
|
||||||
|
|
||||||
|
|||||||
@@ -253,9 +253,6 @@ WMFrame *WMCreateFrame(WMWidget * parent)
|
|||||||
|
|
||||||
static void destroyFrame(Frame * fPtr)
|
static void destroyFrame(Frame * fPtr)
|
||||||
{
|
{
|
||||||
if (fPtr->textColor)
|
|
||||||
WMReleaseColor(fPtr->textColor);
|
|
||||||
|
|
||||||
if (fPtr->caption)
|
if (fPtr->caption)
|
||||||
wfree(fPtr->caption);
|
wfree(fPtr->caption);
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -385,7 +385,6 @@ static void renderPixmap(W_Screen * screen, Pixmap d, Pixmap mask, char **data,
|
|||||||
if (mask)
|
if (mask)
|
||||||
XDrawPoint(screen->display, mask, screen->monoGC, x, y);
|
XDrawPoint(screen->display, mask, screen->monoGC, x, y);
|
||||||
|
|
||||||
/* FALLTHRU */
|
|
||||||
case '.':
|
case '.':
|
||||||
case 'l':
|
case 'l':
|
||||||
XDrawPoint(screen->display, d, lightGC, x, y);
|
XDrawPoint(screen->display, d, lightGC, x, y);
|
||||||
@@ -945,7 +944,7 @@ void WMSetFocusToWidget(WMWidget * widget)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* WMRealizeWidget-
|
* WMRealizeWidget-
|
||||||
* Realizes the widget and all its children.
|
* Realizes the widget and all it's children.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void WMRealizeWidget(WMWidget * w)
|
void WMRealizeWidget(WMWidget * w)
|
||||||
|
|||||||
@@ -213,32 +213,3 @@ int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int bufl
|
|||||||
#endif
|
#endif
|
||||||
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
|
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;
|
|
||||||
}
|
|
||||||
|
|||||||
+11
-500
@@ -1,10 +1,8 @@
|
|||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
#include <ctype.h>
|
|
||||||
#include <strings.h>
|
|
||||||
|
|
||||||
const char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
||||||
const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
||||||
|
|
||||||
typedef struct W_List {
|
typedef struct W_List {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -29,15 +27,11 @@ typedef struct W_List {
|
|||||||
WMHandlerID *idleID; /* for updating the scroller after adding elements */
|
WMHandlerID *idleID; /* for updating the scroller after adding elements */
|
||||||
|
|
||||||
WMHandlerID *selectID; /* for selecting items in list while scrolling */
|
WMHandlerID *selectID; /* for selecting items in list while scrolling */
|
||||||
WMHandlerID *typeaheadID; /* for clearing typeahead buffer */
|
|
||||||
|
|
||||||
WMScroller *vScroller;
|
WMScroller *vScroller;
|
||||||
|
|
||||||
Pixmap doubleBuffer;
|
Pixmap doubleBuffer;
|
||||||
|
|
||||||
char *typeahead;
|
|
||||||
int typeaheadLen;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int allowMultipleSelection:1;
|
unsigned int allowMultipleSelection:1;
|
||||||
unsigned int allowEmptySelection:1;
|
unsigned int allowEmptySelection:1;
|
||||||
@@ -54,7 +48,6 @@ typedef struct W_List {
|
|||||||
#define DEFAULT_HEIGHT 150
|
#define DEFAULT_HEIGHT 150
|
||||||
|
|
||||||
#define SCROLL_DELAY 100
|
#define SCROLL_DELAY 100
|
||||||
#define TYPEAHEAD_CLEAR_DELAY 700
|
|
||||||
|
|
||||||
static void destroyList(List * lPtr);
|
static void destroyList(List * lPtr);
|
||||||
static void paintList(List * lPtr);
|
static void paintList(List * lPtr);
|
||||||
@@ -69,8 +62,6 @@ static void scrollBackwardSelecting(void *data);
|
|||||||
static void vScrollCallBack(WMWidget * scroller, void *self);
|
static void vScrollCallBack(WMWidget * scroller, void *self);
|
||||||
|
|
||||||
static void toggleItemSelection(WMList * lPtr, int index);
|
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 updateGeometry(WMList * lPtr);
|
||||||
static void didResizeList(W_ViewDelegate * self, WMView * view);
|
static void didResizeList(W_ViewDelegate * self, WMView * view);
|
||||||
@@ -122,9 +113,6 @@ WMList *WMCreateList(WMWidget * parent)
|
|||||||
W_Screen *scrPtr = W_VIEW(parent)->screen;
|
W_Screen *scrPtr = W_VIEW(parent)->screen;
|
||||||
|
|
||||||
lPtr = wmalloc(sizeof(List));
|
lPtr = wmalloc(sizeof(List));
|
||||||
lPtr->typeahead = NULL;
|
|
||||||
lPtr->typeaheadLen = 0;
|
|
||||||
lPtr->typeaheadID = NULL;
|
|
||||||
|
|
||||||
lPtr->widgetClass = WC_List;
|
lPtr->widgetClass = WC_List;
|
||||||
|
|
||||||
@@ -141,8 +129,7 @@ WMList *WMCreateList(WMWidget * parent)
|
|||||||
| ClientMessageMask, handleEvents, lPtr);
|
| ClientMessageMask, handleEvents, lPtr);
|
||||||
|
|
||||||
WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask
|
WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask
|
||||||
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask
|
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask, handleActionEvents, lPtr);
|
||||||
| KeyPressMask, handleActionEvents, lPtr);
|
|
||||||
|
|
||||||
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
||||||
|
|
||||||
@@ -301,14 +288,6 @@ void WMClearList(WMList * lPtr)
|
|||||||
WMDeleteTimerHandler(lPtr->selectID);
|
WMDeleteTimerHandler(lPtr->selectID);
|
||||||
lPtr->selectID = NULL;
|
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) {
|
if (lPtr->view->flags.realized) {
|
||||||
updateScroller(lPtr);
|
updateScroller(lPtr);
|
||||||
}
|
}
|
||||||
@@ -516,16 +495,15 @@ static void paintItem(List * lPtr, int index)
|
|||||||
static void paintList(List * lPtr)
|
static void paintList(List * lPtr)
|
||||||
{
|
{
|
||||||
W_Screen *scrPtr = lPtr->view->screen;
|
W_Screen *scrPtr = lPtr->view->screen;
|
||||||
int i, lim, itemCount;
|
int i, lim;
|
||||||
|
|
||||||
if (!lPtr->view->flags.mapped)
|
if (!lPtr->view->flags.mapped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
if (WMGetArrayItemCount(lPtr->items) > 0) {
|
||||||
if (itemCount > 0) {
|
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > WMGetArrayItemCount(lPtr->items)) {
|
||||||
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > itemCount) {
|
|
||||||
|
|
||||||
lim = itemCount - lPtr->topItem;
|
lim = WMGetArrayItemCount(lPtr->items) - lPtr->topItem;
|
||||||
XClearArea(scrPtr->display, lPtr->view->window, 19,
|
XClearArea(scrPtr->display, lPtr->view->window, 19,
|
||||||
2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21,
|
2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21,
|
||||||
lPtr->view->size.height - lim * lPtr->itemHeight - 3, False);
|
lPtr->view->size.height - lim * lPtr->itemHeight - 3, False);
|
||||||
@@ -842,7 +820,7 @@ void WMSetListSelectionToRange(WMList * lPtr, WMRange range)
|
|||||||
|
|
||||||
void WMSelectAllListItems(WMList * lPtr)
|
void WMSelectAllListItems(WMList * lPtr)
|
||||||
{
|
{
|
||||||
int i, itemCount;
|
int i;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
|
|
||||||
if (!lPtr->flags.allowMultipleSelection)
|
if (!lPtr->flags.allowMultipleSelection)
|
||||||
@@ -855,8 +833,7 @@ void WMSelectAllListItems(WMList * lPtr)
|
|||||||
WMFreeArray(lPtr->selectedItems);
|
WMFreeArray(lPtr->selectedItems);
|
||||||
lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items);
|
lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items);
|
||||||
|
|
||||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) {
|
||||||
for (i = 0; i < itemCount; i++) {
|
|
||||||
item = WMGetFromArray(lPtr->items, i);
|
item = WMGetFromArray(lPtr->items, i);
|
||||||
if (!item->selected) {
|
if (!item->selected) {
|
||||||
item->selected = 1;
|
item->selected = 1;
|
||||||
@@ -882,11 +859,10 @@ void WMSelectAllListItems(WMList * lPtr)
|
|||||||
*/
|
*/
|
||||||
static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis)
|
static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis)
|
||||||
{
|
{
|
||||||
int i, itemCount;
|
int i;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
|
|
||||||
itemCount = WMGetArrayItemCount(lPtr->items);
|
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) {
|
||||||
for (i = 0; i < itemCount; i++) {
|
|
||||||
item = WMGetFromArray(lPtr->items, i);
|
item = WMGetFromArray(lPtr->items, i);
|
||||||
if (item != exceptThis && item->selected) {
|
if (item != exceptThis && item->selected) {
|
||||||
item->selected = 0;
|
item->selected = 0;
|
||||||
@@ -944,85 +920,6 @@ 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)
|
static void handleActionEvents(XEvent * event, void *data)
|
||||||
{
|
{
|
||||||
List *lPtr = (List *) data;
|
List *lPtr = (List *) data;
|
||||||
@@ -1062,7 +959,6 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
WMDeleteTimerHandler(lPtr->selectID);
|
WMDeleteTimerHandler(lPtr->selectID);
|
||||||
lPtr->selectID = NULL;
|
lPtr->selectID = NULL;
|
||||||
}
|
}
|
||||||
WMSetFocusToWidget(lPtr);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LeaveNotify:
|
case LeaveNotify:
|
||||||
@@ -1074,9 +970,6 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr);
|
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WMWidget *parentWidget = WMWidgetOfView(lPtr->view->parent);
|
|
||||||
if (parentWidget)
|
|
||||||
WMSetFocusToWidget(parentWidget);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
@@ -1183,381 +1076,6 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
prevItem = tmp;
|
prevItem = tmp;
|
||||||
}
|
}
|
||||||
break;
|
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)
|
if (lPtr->topItem != topItem)
|
||||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||||
@@ -1605,10 +1123,6 @@ static void destroyList(List * lPtr)
|
|||||||
WMDeleteTimerHandler(lPtr->selectID);
|
WMDeleteTimerHandler(lPtr->selectID);
|
||||||
lPtr->selectID = NULL;
|
lPtr->selectID = NULL;
|
||||||
|
|
||||||
if (lPtr->typeaheadID)
|
|
||||||
WMDeleteTimerHandler(lPtr->typeaheadID);
|
|
||||||
lPtr->typeaheadID = NULL;
|
|
||||||
|
|
||||||
if (lPtr->selectedItems)
|
if (lPtr->selectedItems)
|
||||||
WMFreeArray(lPtr->selectedItems);
|
WMFreeArray(lPtr->selectedItems);
|
||||||
|
|
||||||
@@ -1618,9 +1132,6 @@ static void destroyList(List * lPtr)
|
|||||||
if (lPtr->doubleBuffer)
|
if (lPtr->doubleBuffer)
|
||||||
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
|
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
|
||||||
|
|
||||||
if (lPtr->typeahead)
|
|
||||||
wfree(lPtr->typeahead);
|
|
||||||
|
|
||||||
WMRemoveNotificationObserver(lPtr);
|
WMRemoveNotificationObserver(lPtr);
|
||||||
|
|
||||||
wfree(lPtr);
|
wfree(lPtr);
|
||||||
|
|||||||
+4
-7
@@ -122,14 +122,11 @@ static int fitText(const char *text, WMFont * font, int width, int wrap)
|
|||||||
word1 = word2;
|
word1 = word2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Advance character by character (not byte by byte) */
|
for (i = word1; i < word2; i++) {
|
||||||
i = word1;
|
w = WMWidthOfString(font, text, i);
|
||||||
while (i < word2) {
|
if (w > width) {
|
||||||
int next_i = i + oneUTF8CharForward(text + i, word2 - i);
|
|
||||||
w = WMWidthOfString(font, text, next_i);
|
|
||||||
if (w > width)
|
|
||||||
break;
|
break;
|
||||||
i = next_i;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keep words complete if possible */
|
/* keep words complete if possible */
|
||||||
|
|||||||
+10
-290
@@ -25,7 +25,7 @@ static void handleKeyPress(XEvent * event, void *clientData)
|
|||||||
|
|
||||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||||
|
|
||||||
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
if (ksym == XK_Return && panel->defBtn) {
|
||||||
WMPerformButtonClick(panel->defBtn);
|
WMPerformButtonClick(panel->defBtn);
|
||||||
} else if (ksym == XK_Escape) {
|
} else if (ksym == XK_Escape) {
|
||||||
if (panel->altBtn || panel->othBtn) {
|
if (panel->altBtn || panel->othBtn) {
|
||||||
@@ -89,12 +89,10 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
const char *alternateButton, const char *otherButton)
|
const char *alternateButton, const char *otherButton)
|
||||||
{
|
{
|
||||||
WMAlertPanel *panel;
|
WMAlertPanel *panel;
|
||||||
WMFont *defaultFont;
|
|
||||||
int dw = 0, aw = 0, ow = 0, w;
|
int dw = 0, aw = 0, ow = 0, w;
|
||||||
WMBox *hbox;
|
WMBox *hbox;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
|
|
||||||
defaultFont = WMSystemFontOfSize(scrPtr, 12);
|
|
||||||
panel = wmalloc(sizeof(WMAlertPanel));
|
panel = wmalloc(sizeof(WMAlertPanel));
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
@@ -162,7 +160,6 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMFontHeight(scrPtr->normalFont) * 4, 0, 5);
|
WMFontHeight(scrPtr->normalFont) * 4, 0, 5);
|
||||||
WMSetLabelText(panel->mLbl, msg);
|
WMSetLabelText(panel->mLbl, msg);
|
||||||
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
||||||
WMSetLabelFont(panel->mLbl, defaultFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->hbox = WMCreateBox(panel->vbox);
|
panel->hbox = WMCreateBox(panel->vbox);
|
||||||
@@ -173,13 +170,13 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
|
|
||||||
/* create buttons */
|
/* create buttons */
|
||||||
if (otherButton)
|
if (otherButton)
|
||||||
ow = WMWidthOfString(defaultFont, otherButton, strlen(otherButton));
|
ow = WMWidthOfString(scrPtr->normalFont, otherButton, strlen(otherButton));
|
||||||
|
|
||||||
if (alternateButton)
|
if (alternateButton)
|
||||||
aw = WMWidthOfString(defaultFont, alternateButton, strlen(alternateButton));
|
aw = WMWidthOfString(scrPtr->normalFont, alternateButton, strlen(alternateButton));
|
||||||
|
|
||||||
if (defaultButton)
|
if (defaultButton)
|
||||||
dw = WMWidthOfString(defaultFont, defaultButton, strlen(defaultButton));
|
dw = WMWidthOfString(scrPtr->normalFont, defaultButton, strlen(defaultButton));
|
||||||
|
|
||||||
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
|
|
||||||
@@ -209,187 +206,18 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
WMSetButtonFont(panel->defBtn, defaultFont);
|
|
||||||
}
|
}
|
||||||
if (alternateButton) {
|
if (alternateButton) {
|
||||||
panel->altBtn = WMCreateCommandButton(panel->hbox);
|
panel->altBtn = WMCreateCommandButton(panel->hbox);
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->altBtn), False, True, aw, 0, 5);
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->altBtn), False, True, aw, 0, 5);
|
||||||
WMSetButtonAction(panel->altBtn, alertPanelOnClick, panel);
|
WMSetButtonAction(panel->altBtn, alertPanelOnClick, panel);
|
||||||
WMSetButtonText(panel->altBtn, alternateButton);
|
WMSetButtonText(panel->altBtn, alternateButton);
|
||||||
WMSetButtonFont(panel->altBtn, defaultFont);
|
|
||||||
}
|
}
|
||||||
if (otherButton) {
|
if (otherButton) {
|
||||||
panel->othBtn = WMCreateCommandButton(panel->hbox);
|
panel->othBtn = WMCreateCommandButton(panel->hbox);
|
||||||
WMSetButtonAction(panel->othBtn, alertPanelOnClick, panel);
|
WMSetButtonAction(panel->othBtn, alertPanelOnClick, panel);
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->othBtn), False, True, ow, 0, 5);
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->othBtn), False, True, ow, 0, 5);
|
||||||
WMSetButtonText(panel->othBtn, otherButton);
|
WMSetButtonText(panel->othBtn, otherButton);
|
||||||
WMSetButtonFont(panel->othBtn, defaultFont);
|
|
||||||
}
|
|
||||||
|
|
||||||
WMMapSubwidgets(panel->hbox);
|
|
||||||
|
|
||||||
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress, panel);
|
|
||||||
|
|
||||||
WMRealizeWidget(panel->win);
|
|
||||||
WMMapSubwidgets(panel->win);
|
|
||||||
|
|
||||||
WMReleaseFont(defaultFont);
|
|
||||||
|
|
||||||
return panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMAlertPanel *WMCreateScaledAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|
||||||
const char *title, const char *msg, const char *defaultButton,
|
|
||||||
const char *alternateButton, const char *otherButton)
|
|
||||||
{
|
|
||||||
WMAlertPanel *panel;
|
|
||||||
int dw = 0, aw = 0, ow = 0, w;
|
|
||||||
WMBox *hbox;
|
|
||||||
WMPixmap *icon;
|
|
||||||
int wmScaleWidth, wmScaleHeight;
|
|
||||||
int pwidth, pheight;
|
|
||||||
|
|
||||||
panel = wmalloc(sizeof(WMAlertPanel));
|
|
||||||
|
|
||||||
if (owner) {
|
|
||||||
panel->win = WMCreatePanelWithStyleForWindow(owner, "alertPanel", WMTitledWindowMask);
|
|
||||||
} else {
|
|
||||||
panel->win = WMCreateWindowWithStyle(scrPtr, "alertPanel", WMTitledWindowMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* calculate and set the panel's size */
|
|
||||||
WMGetScaleBaseFromSystemFont(scrPtr, &wmScaleWidth, &wmScaleHeight);
|
|
||||||
pwidth = WMScaleX(400);
|
|
||||||
pheight = WMScaleY(5) /* upper margin */
|
|
||||||
+ 64 /* icon size */
|
|
||||||
+ WMScaleY(5) /* space between icon and divider line */
|
|
||||||
+ 2 /* divider line */
|
|
||||||
+ WMScaleY(5); /* space between divider line and message */
|
|
||||||
if (msg)
|
|
||||||
pheight += WMFontHeight(scrPtr->normalFont) * 4 + WMScaleY(5);
|
|
||||||
pheight += WMScaleY(44);
|
|
||||||
WMResizeWidget(panel->win, pwidth, pheight);
|
|
||||||
|
|
||||||
WMSetWindowInitialPosition(panel->win,
|
|
||||||
(scrPtr->rootView->size.width - pwidth) / 2,
|
|
||||||
(scrPtr->rootView->size.height - pheight) / 2);
|
|
||||||
|
|
||||||
WMSetWindowTitle(panel->win, "");
|
|
||||||
|
|
||||||
panel->vbox = WMCreateBox(panel->win);
|
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->vbox), 0, 0, 0, 0);
|
|
||||||
WMSetBoxHorizontal(panel->vbox, False);
|
|
||||||
WMMapWidget(panel->vbox);
|
|
||||||
|
|
||||||
hbox = WMCreateBox(panel->vbox);
|
|
||||||
WMSetBoxBorderWidth(hbox, WMScaleX(5));
|
|
||||||
WMSetBoxHorizontal(hbox, True);
|
|
||||||
WMMapWidget(hbox);
|
|
||||||
WMAddBoxSubview(panel->vbox, WMWidgetView(hbox), False, True, 64 + 2 * WMScaleY(5), 0, WMScaleY(5));
|
|
||||||
|
|
||||||
panel->iLbl = WMCreateLabel(hbox);
|
|
||||||
WMSetLabelImagePosition(panel->iLbl, WIPImageOnly);
|
|
||||||
WMMapWidget(panel->iLbl);
|
|
||||||
WMAddBoxSubview(hbox, WMWidgetView(panel->iLbl), False, True, 64, 0, 10);
|
|
||||||
icon = WMCreateApplicationIconBlendedPixmap(scrPtr, (RColor *) NULL);
|
|
||||||
if (icon) {
|
|
||||||
WMSetLabelImage(panel->iLbl, icon);
|
|
||||||
WMReleasePixmap(icon);
|
|
||||||
} else {
|
|
||||||
WMSetLabelImage(panel->iLbl, scrPtr->applicationIconPixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (title) {
|
|
||||||
WMFont *largeFont;
|
|
||||||
|
|
||||||
largeFont = WMBoldSystemFontOfSize(scrPtr, 24);
|
|
||||||
|
|
||||||
panel->tLbl = WMCreateLabel(hbox);
|
|
||||||
WMMapWidget(panel->tLbl);
|
|
||||||
WMAddBoxSubview(hbox, WMWidgetView(panel->tLbl), True, True, 64, 0, 0);
|
|
||||||
WMSetLabelText(panel->tLbl, title);
|
|
||||||
WMSetLabelTextAlignment(panel->tLbl, WALeft);
|
|
||||||
WMSetLabelFont(panel->tLbl, largeFont);
|
|
||||||
|
|
||||||
WMReleaseFont(largeFont);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create divider line */
|
|
||||||
|
|
||||||
panel->line = WMCreateFrame(panel->win);
|
|
||||||
WMMapWidget(panel->line);
|
|
||||||
WMAddBoxSubview(panel->vbox, WMWidgetView(panel->line), False, True, 2, 2, WMScaleY(5));
|
|
||||||
WMSetFrameRelief(panel->line, WRGroove);
|
|
||||||
|
|
||||||
if (msg) {
|
|
||||||
panel->mLbl = WMCreateLabel(panel->vbox);
|
|
||||||
WMSetLabelWraps(panel->mLbl, True);
|
|
||||||
WMMapWidget(panel->mLbl);
|
|
||||||
WMAddBoxSubview(panel->vbox, WMWidgetView(panel->mLbl), True, True,
|
|
||||||
WMFontHeight(scrPtr->normalFont) * 4, 0, WMScaleY(5));
|
|
||||||
WMSetLabelText(panel->mLbl, msg);
|
|
||||||
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
|
||||||
}
|
|
||||||
|
|
||||||
panel->hbox = WMCreateBox(panel->vbox);
|
|
||||||
WMSetBoxBorderWidth(panel->hbox, WMScaleX(10));
|
|
||||||
WMSetBoxHorizontal(panel->hbox, True);
|
|
||||||
WMMapWidget(panel->hbox);
|
|
||||||
WMAddBoxSubview(panel->vbox, WMWidgetView(panel->hbox), False, True, WMScaleY(44), 0, 0);
|
|
||||||
|
|
||||||
/* create buttons */
|
|
||||||
if (otherButton)
|
|
||||||
ow = WMWidthOfString(scrPtr->normalFont, otherButton, strlen(otherButton));
|
|
||||||
|
|
||||||
if (alternateButton)
|
|
||||||
aw = WMWidthOfString(scrPtr->normalFont, alternateButton, strlen(alternateButton));
|
|
||||||
|
|
||||||
if (defaultButton)
|
|
||||||
dw = WMWidthOfString(scrPtr->normalFont, defaultButton, strlen(defaultButton));
|
|
||||||
|
|
||||||
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
|
||||||
|
|
||||||
aw += WMScaleX(30);
|
|
||||||
ow += WMScaleX(30);
|
|
||||||
dw += WMScaleX(30);
|
|
||||||
|
|
||||||
w = WMAX(dw, WMAX(aw, ow));
|
|
||||||
if ((w + WMScaleX(10)) * 3 < pwidth) {
|
|
||||||
aw = w;
|
|
||||||
ow = w;
|
|
||||||
dw = w;
|
|
||||||
} else {
|
|
||||||
int t;
|
|
||||||
|
|
||||||
t = pwidth - 4 * WMScaleX(10) - aw - ow - dw;
|
|
||||||
aw += t / 3;
|
|
||||||
ow += t / 3;
|
|
||||||
dw += t / 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defaultButton) {
|
|
||||||
panel->defBtn = WMCreateCommandButton(panel->hbox);
|
|
||||||
WMResizeWidget(panel->defBtn, dw, WMScaleY(24));
|
|
||||||
WMSetButtonAction(panel->defBtn, alertPanelOnClick, panel);
|
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->defBtn), False, True, dw, 0, 0);
|
|
||||||
WMSetButtonText(panel->defBtn, defaultButton);
|
|
||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
|
||||||
}
|
|
||||||
if (alternateButton) {
|
|
||||||
panel->altBtn = WMCreateCommandButton(panel->hbox);
|
|
||||||
WMResizeWidget(panel->altBtn, aw, WMScaleY(24));
|
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->altBtn), False, True, aw, 0, WMScaleX(5));
|
|
||||||
WMSetButtonAction(panel->altBtn, alertPanelOnClick, panel);
|
|
||||||
WMSetButtonText(panel->altBtn, alternateButton);
|
|
||||||
}
|
|
||||||
if (otherButton) {
|
|
||||||
panel->othBtn = WMCreateCommandButton(panel->hbox);
|
|
||||||
WMResizeWidget(panel->othBtn, ow, WMScaleY(24));
|
|
||||||
WMSetButtonAction(panel->othBtn, alertPanelOnClick, panel);
|
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->othBtn), False, True, ow, 0, WMScaleX(5));
|
|
||||||
WMSetButtonText(panel->othBtn, otherButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->hbox);
|
WMMapSubwidgets(panel->hbox);
|
||||||
@@ -421,7 +249,7 @@ static void handleKeyPress2(XEvent * event, void *clientData)
|
|||||||
|
|
||||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||||
|
|
||||||
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
if (ksym == XK_Return && panel->defBtn) {
|
||||||
WMPerformButtonClick(panel->defBtn);
|
WMPerformButtonClick(panel->defBtn);
|
||||||
} else if (ksym == XK_Escape) {
|
} else if (ksym == XK_Escape) {
|
||||||
if (panel->altBtn) {
|
if (panel->altBtn) {
|
||||||
@@ -510,10 +338,8 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
const char *defaultText, const char *okButton, const char *cancelButton)
|
const char *defaultText, const char *okButton, const char *cancelButton)
|
||||||
{
|
{
|
||||||
WMInputPanel *panel;
|
WMInputPanel *panel;
|
||||||
WMFont *defaultFont;
|
|
||||||
int x, dw = 0, aw = 0, w;
|
int x, dw = 0, aw = 0, w;
|
||||||
|
|
||||||
defaultFont = WMSystemFontOfSize(scrPtr, 12);
|
|
||||||
panel = wmalloc(sizeof(WMInputPanel));
|
panel = wmalloc(sizeof(WMInputPanel));
|
||||||
|
|
||||||
if (owner)
|
if (owner)
|
||||||
@@ -545,23 +371,21 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
WMResizeWidget(panel->mLbl, 320 - 40, WMFontHeight(scrPtr->normalFont) * 2);
|
WMResizeWidget(panel->mLbl, 320 - 40, WMFontHeight(scrPtr->normalFont) * 2);
|
||||||
WMSetLabelText(panel->mLbl, msg);
|
WMSetLabelText(panel->mLbl, msg);
|
||||||
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
||||||
WMSetLabelFont(panel->mLbl, defaultFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->text = WMCreateTextField(panel->win);
|
panel->text = WMCreateTextField(panel->win);
|
||||||
WMMoveWidget(panel->text, 20, 85);
|
WMMoveWidget(panel->text, 20, 85);
|
||||||
WMResizeWidget(panel->text, 320 - 40, WMWidgetHeight(panel->text));
|
WMResizeWidget(panel->text, 320 - 40, WMWidgetHeight(panel->text));
|
||||||
WMSetTextFieldText(panel->text, defaultText);
|
WMSetTextFieldText(panel->text, defaultText);
|
||||||
WMSetTextFieldFont(panel->text, defaultFont);
|
|
||||||
|
|
||||||
WMAddNotificationObserver(endedEditingObserver, panel, WMTextDidEndEditingNotification, panel->text);
|
WMAddNotificationObserver(endedEditingObserver, panel, WMTextDidEndEditingNotification, panel->text);
|
||||||
|
|
||||||
/* create buttons */
|
/* create buttons */
|
||||||
if (cancelButton)
|
if (cancelButton)
|
||||||
aw = WMWidthOfString(defaultFont, cancelButton, strlen(cancelButton));
|
aw = WMWidthOfString(scrPtr->normalFont, cancelButton, strlen(cancelButton));
|
||||||
|
|
||||||
if (okButton)
|
if (okButton)
|
||||||
dw = WMWidthOfString(defaultFont, okButton, strlen(okButton));
|
dw = WMWidthOfString(scrPtr->normalFont, okButton, strlen(okButton));
|
||||||
|
|
||||||
w = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
w = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
if (aw > w)
|
if (aw > w)
|
||||||
@@ -582,7 +406,6 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
WMSetButtonFont(panel->defBtn, defaultFont);
|
|
||||||
}
|
}
|
||||||
if (cancelButton) {
|
if (cancelButton) {
|
||||||
x -= w + 10;
|
x -= w + 10;
|
||||||
@@ -592,104 +415,6 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
WMMoveWidget(panel->altBtn, x, 124);
|
WMMoveWidget(panel->altBtn, x, 124);
|
||||||
WMResizeWidget(panel->altBtn, w, 24);
|
WMResizeWidget(panel->altBtn, w, 24);
|
||||||
WMSetButtonText(panel->altBtn, cancelButton);
|
WMSetButtonText(panel->altBtn, cancelButton);
|
||||||
WMSetButtonFont(panel->altBtn, defaultFont);
|
|
||||||
}
|
|
||||||
|
|
||||||
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress2, panel);
|
|
||||||
|
|
||||||
WMRealizeWidget(panel->win);
|
|
||||||
WMMapSubwidgets(panel->win);
|
|
||||||
|
|
||||||
WMSetFocusToWidget(panel->text);
|
|
||||||
|
|
||||||
WMReleaseFont(defaultFont);
|
|
||||||
|
|
||||||
return panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMInputPanel *WMCreateScaledInputPanel(WMScreen * scrPtr, WMWindow * owner, const char *title, const char *msg,
|
|
||||||
const char *defaultText, const char *okButton, const char *cancelButton)
|
|
||||||
{
|
|
||||||
WMInputPanel *panel;
|
|
||||||
int x, dw = 0, aw = 0, w;
|
|
||||||
int wmScaleWidth, wmScaleHeight;
|
|
||||||
|
|
||||||
panel = wmalloc(sizeof(WMInputPanel));
|
|
||||||
|
|
||||||
if (owner)
|
|
||||||
panel->win = WMCreatePanelWithStyleForWindow(owner, "inputPanel", WMTitledWindowMask);
|
|
||||||
else
|
|
||||||
panel->win = WMCreateWindowWithStyle(scrPtr, "inputPanel", WMTitledWindowMask);
|
|
||||||
WMSetWindowTitle(panel->win, "");
|
|
||||||
|
|
||||||
WMGetScaleBaseFromSystemFont(scrPtr, &wmScaleWidth, &wmScaleHeight);
|
|
||||||
WMResizeWidget(panel->win, WMScaleX(320), WMScaleY(160));
|
|
||||||
|
|
||||||
if (title) {
|
|
||||||
WMFont *largeFont;
|
|
||||||
|
|
||||||
largeFont = WMBoldSystemFontOfSize(scrPtr, WMScaleY(24));
|
|
||||||
|
|
||||||
panel->tLbl = WMCreateLabel(panel->win);
|
|
||||||
WMMoveWidget(panel->tLbl, WMScaleX(20), WMScaleY(16));
|
|
||||||
WMResizeWidget(panel->tLbl, WMScaleX(320) - 2 * WMScaleX(20), WMFontHeight(largeFont) + WMScaleY(4));
|
|
||||||
WMSetLabelText(panel->tLbl, title);
|
|
||||||
WMSetLabelTextAlignment(panel->tLbl, WALeft);
|
|
||||||
WMSetLabelFont(panel->tLbl, largeFont);
|
|
||||||
|
|
||||||
WMReleaseFont(largeFont);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msg) {
|
|
||||||
panel->mLbl = WMCreateLabel(panel->win);
|
|
||||||
WMMoveWidget(panel->mLbl, WMScaleX(20), WMScaleY(50));
|
|
||||||
WMResizeWidget(panel->mLbl, WMScaleX(320) - 2 * WMScaleX(20), WMFontHeight(scrPtr->normalFont) * 2);
|
|
||||||
WMSetLabelText(panel->mLbl, msg);
|
|
||||||
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
|
||||||
}
|
|
||||||
|
|
||||||
panel->text = WMCreateTextField(panel->win);
|
|
||||||
WMMoveWidget(panel->text, WMScaleX(20), WMScaleY(85));
|
|
||||||
WMResizeWidget(panel->text, WMScaleX(320) - 2 * WMScaleX(20), WMScaleY(20));
|
|
||||||
WMSetTextFieldText(panel->text, defaultText);
|
|
||||||
|
|
||||||
WMAddNotificationObserver(endedEditingObserver, panel, WMTextDidEndEditingNotification, panel->text);
|
|
||||||
|
|
||||||
/* create buttons */
|
|
||||||
if (cancelButton)
|
|
||||||
aw = WMWidthOfString(scrPtr->normalFont, cancelButton, strlen(cancelButton));
|
|
||||||
|
|
||||||
if (okButton)
|
|
||||||
dw = WMWidthOfString(scrPtr->normalFont, okButton, strlen(okButton));
|
|
||||||
|
|
||||||
w = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
|
||||||
if (aw > w)
|
|
||||||
w = aw;
|
|
||||||
|
|
||||||
w += WMScaleX(30);
|
|
||||||
x = WMScaleX(310);
|
|
||||||
|
|
||||||
if (okButton) {
|
|
||||||
x -= w + WMScaleX(10);
|
|
||||||
|
|
||||||
panel->defBtn = WMCreateCustomButton(panel->win, WBBPushInMask
|
|
||||||
| WBBPushChangeMask | WBBPushLightMask);
|
|
||||||
WMSetButtonAction(panel->defBtn, inputBoxOnClick, panel);
|
|
||||||
WMMoveWidget(panel->defBtn, x, WMScaleY(124));
|
|
||||||
WMResizeWidget(panel->defBtn, w, WMScaleY(24));
|
|
||||||
WMSetButtonText(panel->defBtn, okButton);
|
|
||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
|
||||||
}
|
|
||||||
if (cancelButton) {
|
|
||||||
x -= w + WMScaleX(10);
|
|
||||||
|
|
||||||
panel->altBtn = WMCreateCommandButton(panel->win);
|
|
||||||
WMSetButtonAction(panel->altBtn, inputBoxOnClick, panel);
|
|
||||||
WMMoveWidget(panel->altBtn, x, WMScaleY(124));
|
|
||||||
WMResizeWidget(panel->altBtn, w, WMScaleY(24));
|
|
||||||
WMSetButtonText(panel->altBtn, cancelButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress2, panel);
|
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress2, panel);
|
||||||
@@ -709,7 +434,7 @@ static void handleKeyPress3(XEvent * event, void *clientData)
|
|||||||
|
|
||||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||||
|
|
||||||
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
if (ksym == XK_Return && panel->defBtn) {
|
||||||
WMPerformButtonClick(panel->defBtn);
|
WMPerformButtonClick(panel->defBtn);
|
||||||
} else if (ksym == XK_Escape) {
|
} else if (ksym == XK_Escape) {
|
||||||
if (panel->altBtn) {
|
if (panel->altBtn) {
|
||||||
@@ -732,12 +457,10 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
const char *title, const char *defaultButton, const char *alternateButton)
|
const char *title, const char *defaultButton, const char *alternateButton)
|
||||||
{
|
{
|
||||||
WMGenericPanel *panel;
|
WMGenericPanel *panel;
|
||||||
WMFont *defaultFont;
|
|
||||||
int dw = 0, aw = 0, w;
|
int dw = 0, aw = 0, w;
|
||||||
WMBox *hbox;
|
WMBox *hbox;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
|
|
||||||
defaultFont = WMSystemFontOfSize(scrPtr, 12);
|
|
||||||
panel = wmalloc(sizeof(WMGenericPanel));
|
panel = wmalloc(sizeof(WMGenericPanel));
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
@@ -810,10 +533,10 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
|
|
||||||
/* create buttons */
|
/* create buttons */
|
||||||
if (defaultButton)
|
if (defaultButton)
|
||||||
dw = WMWidthOfString(defaultFont, defaultButton, strlen(defaultButton));
|
dw = WMWidthOfString(scrPtr->normalFont, defaultButton, strlen(defaultButton));
|
||||||
|
|
||||||
if (alternateButton)
|
if (alternateButton)
|
||||||
aw = WMWidthOfString(defaultFont, alternateButton, strlen(alternateButton));
|
aw = WMWidthOfString(scrPtr->normalFont, alternateButton, strlen(alternateButton));
|
||||||
|
|
||||||
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
|
|
||||||
@@ -838,7 +561,6 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
WMSetButtonFont(panel->defBtn, defaultFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(hbox);
|
WMMapSubwidgets(hbox);
|
||||||
@@ -848,7 +570,5 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMRealizeWidget(panel->win);
|
WMRealizeWidget(panel->win);
|
||||||
WMMapSubwidgets(panel->win);
|
WMMapSubwidgets(panel->win);
|
||||||
|
|
||||||
WMReleaseFont(defaultFont);
|
|
||||||
|
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,56 +252,6 @@ WMMenuItem *WMGetPopUpButtonMenuItem(WMPopUpButton * bPtr, int index)
|
|||||||
return WMGetFromArray(bPtr->items, 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)
|
static void paintPopUpButton(PopUpButton * bPtr)
|
||||||
{
|
{
|
||||||
W_Screen *scr = bPtr->view->screen;
|
W_Screen *scr = bPtr->view->screen;
|
||||||
|
|||||||
+4
-1
@@ -181,7 +181,10 @@ static void drawRulerOnPixmap(Ruler * rPtr)
|
|||||||
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
rPtr->fgGC, rPtr->margins.left + m, 23, rPtr->margins.left + m, marks[i % 8] + 23);
|
rPtr->fgGC, rPtr->margins.left + m, 23, rPtr->margins.left + m, marks[i % 8] + 23);
|
||||||
if (i != 0 && i % 8 == 0) {
|
if (i != 0 && i % 8 == 0) {
|
||||||
snprintf(c, sizeof(c), "%hu", ++j);
|
if (j < 10)
|
||||||
|
snprintf(c, 3, "%d", ++j);
|
||||||
|
else
|
||||||
|
snprintf(c, 3, "%2d", ++j);
|
||||||
WMDrawString(rPtr->view->screen, rPtr->drawBuffer, rPtr->fg,
|
WMDrawString(rPtr->view->screen, rPtr->drawBuffer, rPtr->fg,
|
||||||
rPtr->font, rPtr->margins.left + 2 + m, 26, c, 2);
|
rPtr->font, rPtr->margins.left + 2 + m, 26, c, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define AUTOSCROLL_DELAY 40
|
#define AUTOSCROLL_DELAY 40
|
||||||
|
|
||||||
const char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
|
char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
|
||||||
|
|
||||||
typedef struct W_Scroller {
|
typedef struct W_Scroller {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ typedef struct W_SplitView {
|
|||||||
/* TODO: rewrite --Dan */
|
/* TODO: rewrite --Dan */
|
||||||
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
|
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
|
||||||
|
|
||||||
|
#define _AddPSubviewStruct(P) \
|
||||||
|
(WMAddToArray(sPtr->subviews,((void*)P)))
|
||||||
|
|
||||||
#define _GetPSubviewStructAt(i) \
|
#define _GetPSubviewStructAt(i) \
|
||||||
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
|
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
|
||||||
|
|
||||||
|
|||||||
+15
-31
@@ -166,15 +166,12 @@ typedef struct W_Text {
|
|||||||
WMArray *xdndDestinationTypes;
|
WMArray *xdndDestinationTypes;
|
||||||
} Text;
|
} Text;
|
||||||
|
|
||||||
/* not used */
|
|
||||||
#if 0
|
|
||||||
#define NOTIFY(T,C,N,A) {\
|
#define NOTIFY(T,C,N,A) {\
|
||||||
WMNotification *notif = WMCreateNotification(N,T,A);\
|
WMNotification *notif = WMCreateNotification(N,T,A);\
|
||||||
if ((T)->delegate && (T)->delegate->C)\
|
if ((T)->delegate && (T)->delegate->C)\
|
||||||
(*(T)->delegate->C)((T)->delegate,notif);\
|
(*(T)->delegate->C)((T)->delegate,notif);\
|
||||||
WMPostNotification(notif);\
|
WMPostNotification(notif);\
|
||||||
WMReleaseNotification(notif);}
|
WMReleaseNotification(notif);}
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TYPETEXT 0
|
#define TYPETEXT 0
|
||||||
|
|
||||||
@@ -218,11 +215,6 @@ static char *default_bullet[] = {
|
|||||||
" ooo "
|
" 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 handleEvents(XEvent * event, void *data);
|
||||||
static void layOutDocument(Text * tPtr);
|
static void layOutDocument(Text * tPtr);
|
||||||
static void updateScrollers(Text * tPtr);
|
static void updateScrollers(Text * tPtr);
|
||||||
@@ -625,7 +617,7 @@ static void paintText(Text * tPtr)
|
|||||||
TextBlock *tb;
|
TextBlock *tb;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
const char *text;
|
const char *text;
|
||||||
int len, y, c, s, done = False, dir; /* dir 1 = down */
|
int len, y, c, s, done = False, dir /* 1 = down */ ;
|
||||||
WMScreen *scr = tPtr->view->screen;
|
WMScreen *scr = tPtr->view->screen;
|
||||||
Display *dpy = tPtr->view->screen->display;
|
Display *dpy = tPtr->view->screen->display;
|
||||||
Window win = tPtr->view->window;
|
Window win = tPtr->view->window;
|
||||||
@@ -2044,13 +2036,17 @@ static void releaseSelection(Text * tPtr)
|
|||||||
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
|
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
|
||||||
{
|
{
|
||||||
Text *tPtr = view->self;
|
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;
|
WMData *data = NULL;
|
||||||
|
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) selection;
|
(void) selection;
|
||||||
(void) cdata;
|
(void) cdata;
|
||||||
|
|
||||||
if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
|
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
|
||||||
char *text = WMGetTextSelectedStream(tPtr);
|
char *text = WMGetTextSelectedStream(tPtr);
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
@@ -2063,18 +2059,19 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
} else
|
} else
|
||||||
printf("didn't get it\n");
|
printf("didn't get it\n");
|
||||||
|
|
||||||
if (target == XA_TARGETS) {
|
_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||||
Atom supported_type[4];
|
if (target == _TARGETS) {
|
||||||
|
Atom array[4];
|
||||||
|
|
||||||
supported_type[0] = XA_TARGETS;
|
array[0] = _TARGETS;
|
||||||
supported_type[1] = XA_STRING;
|
array[1] = XA_STRING;
|
||||||
supported_type[2] = XA_TEXT;
|
array[2] = TEXT;
|
||||||
supported_type[3] = XA_COMPOUND_TEXT;
|
array[3] = COMPOUND_TEXT;
|
||||||
|
|
||||||
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
data = WMCreateDataWithBytes(&array, sizeof(array));
|
||||||
WMSetDataFormat(data, 32);
|
WMSetDataFormat(data, 32);
|
||||||
|
|
||||||
*type = XA_ATOM;
|
*type = target;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2308,7 +2305,6 @@ static void handleTextKeyPress(Text * tPtr, XEvent * event)
|
|||||||
|
|
||||||
case XK_Return:
|
case XK_Return:
|
||||||
*buffer = '\n';
|
*buffer = '\n';
|
||||||
/* FALLTHRU */
|
|
||||||
default:
|
default:
|
||||||
if (*buffer != 0 && !control_pressed) {
|
if (*buffer != 0 && !control_pressed) {
|
||||||
insertTextInteractively(tPtr, buffer, strlen(buffer));
|
insertTextInteractively(tPtr, buffer, strlen(buffer));
|
||||||
@@ -2548,7 +2544,6 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FALLTHRU */
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
if (tPtr->flags.pointerGrabbed) {
|
if (tPtr->flags.pointerGrabbed) {
|
||||||
tPtr->flags.pointerGrabbed = False;
|
tPtr->flags.pointerGrabbed = False;
|
||||||
@@ -2977,17 +2972,6 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi
|
|||||||
dpy = tPtr->view->screen->display;
|
dpy = tPtr->view->screen->display;
|
||||||
scr = tPtr->view->screen;
|
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->self = tPtr;
|
||||||
tPtr->view->attribs.cursor = scr->textCursor;
|
tPtr->view->attribs.cursor = scr->textCursor;
|
||||||
tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;
|
tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;
|
||||||
|
|||||||
+95
-110
@@ -10,9 +10,9 @@
|
|||||||
#define CURSOR_BLINK_ON_DELAY 600
|
#define CURSOR_BLINK_ON_DELAY 600
|
||||||
#define CURSOR_BLINK_OFF_DELAY 300
|
#define CURSOR_BLINK_OFF_DELAY 300
|
||||||
|
|
||||||
const char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
|
char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
|
||||||
const char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
|
char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
|
||||||
const char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
|
char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
|
||||||
|
|
||||||
typedef struct W_TextField {
|
typedef struct W_TextField {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -122,6 +122,35 @@ static WMSelectionProcs selectionHandler = {
|
|||||||
#define TEXT_WIDTH2(tPtr, start, end) (WMWidthOfString((tPtr)->font, \
|
#define TEXT_WIDTH2(tPtr, start, end) (WMWidthOfString((tPtr)->font, \
|
||||||
&((tPtr)->text[(start)]), (end) - (start)))
|
&((tPtr)->text[(start)]), (end) - (start)))
|
||||||
|
|
||||||
|
static inline int oneUTF8CharBackward(const char *str, int len)
|
||||||
|
{
|
||||||
|
const unsigned char *ustr = (const unsigned char *)str;
|
||||||
|
int pos = 0;
|
||||||
|
|
||||||
|
while (len-- > 0 && ustr[--pos] >= 0x80 && ustr[pos] <= 0xbf) ;
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int oneUTF8CharForward(const char *str, int len)
|
||||||
|
{
|
||||||
|
const unsigned char *ustr = (const unsigned char *)str;
|
||||||
|
int pos = 0;
|
||||||
|
|
||||||
|
while (len-- > 0 && ustr[++pos] >= 0x80 && ustr[pos] <= 0xbf) ;
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
// find the beginning of the UTF8 char pointed by str
|
||||||
|
static inline int seekUTF8CharStart(const char *str, int len)
|
||||||
|
{
|
||||||
|
const unsigned char *ustr = (const unsigned char *)str;
|
||||||
|
int pos = 0;
|
||||||
|
|
||||||
|
while (len-- > 0 && ustr[pos] >= 0x80 && ustr[pos] <= 0xbf)
|
||||||
|
--pos;
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
static void normalizeRange(TextField * tPtr, WMRange * range)
|
static void normalizeRange(TextField * tPtr, WMRange * range)
|
||||||
{
|
{
|
||||||
if (range->position < 0 && range->count < 0)
|
if (range->position < 0 && range->count < 0)
|
||||||
@@ -210,9 +239,9 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
TextField *tPtr = view->self;
|
TextField *tPtr = view->self;
|
||||||
int count;
|
int count;
|
||||||
Display *dpy = tPtr->view->screen->display;
|
Display *dpy = tPtr->view->screen->display;
|
||||||
Atom XA_TARGETS;
|
Atom _TARGETS;
|
||||||
Atom XA_TEXT = XInternAtom(dpy, "TEXT", False);
|
Atom TEXT = XInternAtom(dpy, "TEXT", False);
|
||||||
Atom XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||||
WMData *data;
|
WMData *data;
|
||||||
|
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
@@ -222,7 +251,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
count = tPtr->selection.count < 0
|
count = tPtr->selection.count < 0
|
||||||
? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position;
|
? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position;
|
||||||
|
|
||||||
if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
|
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
|
||||||
|
|
||||||
data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count));
|
data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count));
|
||||||
WMSetDataFormat(data, 8);
|
WMSetDataFormat(data, 8);
|
||||||
@@ -231,19 +260,19 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||||
if (target == XA_TARGETS) {
|
if (target == _TARGETS) {
|
||||||
Atom supported_type[4];
|
Atom supported_type[4];
|
||||||
|
|
||||||
supported_type[0] = XA_TARGETS;
|
supported_type[0] = _TARGETS;
|
||||||
supported_type[1] = XA_STRING;
|
supported_type[1] = XA_STRING;
|
||||||
supported_type[2] = XA_TEXT;
|
supported_type[2] = TEXT;
|
||||||
supported_type[3] = XA_COMPOUND_TEXT;
|
supported_type[3] = COMPOUND_TEXT;
|
||||||
|
|
||||||
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
||||||
WMSetDataFormat(data, 32);
|
WMSetDataFormat(data, 32);
|
||||||
|
|
||||||
*type = XA_ATOM;
|
*type = target;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,13 +446,6 @@ void WMDeleteTextFieldRange(WMTextField * tPtr, WMRange range)
|
|||||||
|
|
||||||
decrToFit(tPtr);
|
decrToFit(tPtr);
|
||||||
|
|
||||||
/* Ensure cursor is visible after deletion */
|
|
||||||
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
|
||||||
tPtr->viewPosition = tPtr->cursorPosition;
|
|
||||||
} else {
|
|
||||||
incrToFit2(tPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,6 +490,11 @@ void WMSetTextFieldAlignment(WMTextField * tPtr, WMAlignment alignment)
|
|||||||
|
|
||||||
tPtr->flags.alignment = alignment;
|
tPtr->flags.alignment = alignment;
|
||||||
|
|
||||||
|
if (alignment != WALeft) {
|
||||||
|
wwarning(_("only left alignment is supported in textfields"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (tPtr->view->flags.realized) {
|
if (tPtr->view->flags.realized) {
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
}
|
}
|
||||||
@@ -634,7 +661,7 @@ static void didResizeTextField(W_ViewDelegate * self, WMView * view)
|
|||||||
|
|
||||||
tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
|
tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
|
||||||
|
|
||||||
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth;
|
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 2 */ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *makeHiddenString(int length)
|
static char *makeHiddenString(int length)
|
||||||
@@ -819,8 +846,8 @@ static void paintTextField(TextField * tPtr)
|
|||||||
count = tPtr->viewPosition;
|
count = tPtr->viewPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
rx = tx + WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]),
|
rx = tPtr->offsetWidth + 1 + WMWidthOfString(tPtr->font, text, count)
|
||||||
count - tPtr->viewPosition);
|
- WMWidthOfString(tPtr->font, text, tPtr->viewPosition);
|
||||||
|
|
||||||
WMDrawImageString(screen, drawbuffer, color, screen->gray,
|
WMDrawImageString(screen, drawbuffer, color, screen->gray,
|
||||||
tPtr->font, rx, ty, &(text[count]), count2);
|
tPtr->font, rx, ty, &(text[count]), count2);
|
||||||
@@ -915,7 +942,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
{
|
{
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
KeySym ksym;
|
KeySym ksym;
|
||||||
const char *textEvent = NULL;
|
char *textEvent = NULL;
|
||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
int count, refresh = 0;
|
int count, refresh = 0;
|
||||||
int control_pressed = 0;
|
int control_pressed = 0;
|
||||||
@@ -938,7 +965,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
switch (ksym) {
|
switch (ksym) {
|
||||||
case XK_Tab:
|
case XK_Tab:
|
||||||
#ifdef XK_ISO_Left_Tab
|
#ifdef XK_ISO_Left_Tab
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_ISO_Left_Tab:
|
case XK_ISO_Left_Tab:
|
||||||
#endif
|
#endif
|
||||||
if (!controled) {
|
if (!controled) {
|
||||||
@@ -975,10 +1001,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef XK_KP_Enter
|
#ifdef XK_KP_Enter
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_KP_Enter:
|
case XK_KP_Enter:
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_Return:
|
case XK_Return:
|
||||||
if (!modified) {
|
if (!modified) {
|
||||||
data = (void *)WMReturnTextMovement;
|
data = (void *)WMReturnTextMovement;
|
||||||
@@ -995,13 +1019,12 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Left
|
#ifdef XK_KP_Left
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_KP_Left:
|
case XK_KP_Left:
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_Left:
|
case XK_Left:
|
||||||
if (tPtr->cursorPosition > 0) {
|
if (tPtr->cursorPosition > 0) {
|
||||||
int i;
|
int i;
|
||||||
|
paintCursor(tPtr);
|
||||||
|
|
||||||
i = tPtr->cursorPosition;
|
i = tPtr->cursorPosition;
|
||||||
i += oneUTF8CharBackward(&tPtr->text[i], i);
|
i += oneUTF8CharBackward(&tPtr->text[i], i);
|
||||||
@@ -1017,8 +1040,9 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
|
|
||||||
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
||||||
tPtr->viewPosition = tPtr->cursorPosition;
|
tPtr->viewPosition = tPtr->cursorPosition;
|
||||||
}
|
refresh = 1;
|
||||||
refresh = 1;
|
} else
|
||||||
|
paintCursor(tPtr);
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1034,13 +1058,12 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Right
|
#ifdef XK_KP_Right
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_KP_Right:
|
case XK_KP_Right:
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_Right:
|
case XK_Right:
|
||||||
if (tPtr->cursorPosition < tPtr->textLen) {
|
if (tPtr->cursorPosition < tPtr->textLen) {
|
||||||
int i;
|
int i;
|
||||||
|
paintCursor(tPtr);
|
||||||
|
|
||||||
i = tPtr->cursorPosition;
|
i = tPtr->cursorPosition;
|
||||||
if (controled) {
|
if (controled) {
|
||||||
@@ -1053,8 +1076,10 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
}
|
}
|
||||||
tPtr->cursorPosition = i;
|
tPtr->cursorPosition = i;
|
||||||
|
|
||||||
incrToFit2(tPtr);
|
refresh = incrToFit2(tPtr);
|
||||||
refresh = 1;
|
|
||||||
|
if (!refresh)
|
||||||
|
paintCursor(tPtr);
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1070,18 +1095,18 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Home
|
#ifdef XK_KP_Home
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_KP_Home:
|
case XK_KP_Home:
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_Home:
|
case XK_Home:
|
||||||
if (!controled) {
|
if (!controled) {
|
||||||
if (tPtr->cursorPosition > 0) {
|
if (tPtr->cursorPosition > 0) {
|
||||||
|
paintCursor(tPtr);
|
||||||
tPtr->cursorPosition = 0;
|
tPtr->cursorPosition = 0;
|
||||||
if (tPtr->viewPosition > 0) {
|
if (tPtr->viewPosition > 0) {
|
||||||
tPtr->viewPosition = 0;
|
tPtr->viewPosition = 0;
|
||||||
}
|
refresh = 1;
|
||||||
refresh = 1;
|
} else
|
||||||
|
paintCursor(tPtr);
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1097,18 +1122,19 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_End
|
#ifdef XK_KP_End
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_KP_End:
|
case XK_KP_End:
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_End:
|
case XK_End:
|
||||||
if (!controled) {
|
if (!controled) {
|
||||||
if (tPtr->cursorPosition < tPtr->textLen) {
|
if (tPtr->cursorPosition < tPtr->textLen) {
|
||||||
|
paintCursor(tPtr);
|
||||||
tPtr->cursorPosition = tPtr->textLen;
|
tPtr->cursorPosition = tPtr->textLen;
|
||||||
tPtr->viewPosition = 0;
|
tPtr->viewPosition = 0;
|
||||||
|
|
||||||
incrToFit(tPtr);
|
refresh = incrToFit(tPtr);
|
||||||
refresh = 1;
|
|
||||||
|
if (!refresh)
|
||||||
|
paintCursor(tPtr);
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1123,7 +1149,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
else
|
else
|
||||||
modified = False;
|
modified = False;
|
||||||
|
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_BackSpace:
|
case XK_BackSpace:
|
||||||
if (!modified) {
|
if (!modified) {
|
||||||
if (tPtr->selection.count) {
|
if (tPtr->selection.count) {
|
||||||
@@ -1152,10 +1177,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
modified = False;
|
modified = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Delete
|
#ifdef XK_KP_Delete
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_KP_Delete:
|
case XK_KP_Delete:
|
||||||
#endif
|
#endif
|
||||||
/* FALLTHRU */
|
|
||||||
case XK_Delete:
|
case XK_Delete:
|
||||||
if (!modified) {
|
if (!modified) {
|
||||||
if (tPtr->selection.count) {
|
if (tPtr->selection.count) {
|
||||||
@@ -1371,25 +1394,7 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
|||||||
tPtr->viewPosition);
|
tPtr->viewPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tPtr->flags.alignment == WARight) {
|
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||||
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 */
|
/* Do not allow text selection in secure textfields */
|
||||||
if (tPtr->flags.secure) {
|
if (tPtr->flags.secure) {
|
||||||
@@ -1422,35 +1427,17 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
|||||||
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
||||||
WMSetFocusToWidget(tPtr);
|
WMSetFocusToWidget(tPtr);
|
||||||
}
|
}
|
||||||
|
if (tPtr->flags.focused) {
|
||||||
|
tPtr->selection.position = tPtr->cursorPosition;
|
||||||
|
tPtr->selection.count = 0;
|
||||||
|
}
|
||||||
if (textWidth < tPtr->usableWidth) {
|
if (textWidth < tPtr->usableWidth) {
|
||||||
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||||
event->xbutton.x - tPtr->usableWidth
|
event->xbutton.x - tPtr->usableWidth
|
||||||
+ textWidth);
|
+ textWidth);
|
||||||
} else
|
} else
|
||||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
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) / 2);
|
|
||||||
} else {
|
|
||||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
|
||||||
}
|
|
||||||
if (tPtr->flags.focused) {
|
|
||||||
tPtr->selection.position = tPtr->cursorPosition;
|
|
||||||
tPtr->selection.count = 0;
|
|
||||||
}
|
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1464,31 +1451,29 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
|||||||
tPtr->selection.count = 0;
|
tPtr->selection.count = 0;
|
||||||
paintTextField(tPtr);
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
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;
|
break;
|
||||||
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
void WHandleEvents(void)
|
void WHandleEvents()
|
||||||
{
|
{
|
||||||
/* Check any expired timers */
|
/* Check any expired timers */
|
||||||
W_CheckTimerHandlers();
|
W_CheckTimerHandlers();
|
||||||
|
|||||||
+3
-5
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
/* the notifications about views */
|
/* the notifications about views */
|
||||||
|
|
||||||
const char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
|
char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
|
||||||
const char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
|
char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
|
||||||
const char *WMViewRealizedNotification = "WMViewRealizedNotification";
|
char *WMViewRealizedNotification = "WMViewRealizedNotification";
|
||||||
|
|
||||||
#define EVENT_MASK \
|
#define EVENT_MASK \
|
||||||
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
|
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
|
||||||
@@ -490,7 +490,6 @@ void W_SetViewBackgroundColor(W_View * view, WMColor * color)
|
|||||||
view->backColor = WMRetainColor(color);
|
view->backColor = WMRetainColor(color);
|
||||||
|
|
||||||
view->attribFlags |= CWBackPixel;
|
view->attribFlags |= CWBackPixel;
|
||||||
view->attribFlags &= ~CWBackPixmap;
|
|
||||||
view->attribs.background_pixel = W_PIXEL(color);
|
view->attribs.background_pixel = W_PIXEL(color);
|
||||||
if (view->flags.realized) {
|
if (view->flags.realized) {
|
||||||
XSetWindowBackground(view->screen->display, view->window, W_PIXEL(color));
|
XSetWindowBackground(view->screen->display, view->window, W_PIXEL(color));
|
||||||
@@ -505,7 +504,6 @@ void W_SetViewBackgroundPixmap(W_View *view, WMPixmap *pix)
|
|||||||
view->backImage = WMRetainPixmap(pix);
|
view->backImage = WMRetainPixmap(pix);
|
||||||
|
|
||||||
view->attribFlags |= CWBackPixmap;
|
view->attribFlags |= CWBackPixmap;
|
||||||
view->attribFlags &= ~CWBackPixel;
|
|
||||||
view->attribs.background_pixmap = pix->pixmap;
|
view->attribs.background_pixmap = pix->pixmap;
|
||||||
if (view->flags.realized) {
|
if (view->flags.realized) {
|
||||||
XSetWindowBackgroundPixmap(view->screen->display, view->window, pix->pixmap);
|
XSetWindowBackgroundPixmap(view->screen->display, view->window, pix->pixmap);
|
||||||
|
|||||||
@@ -395,11 +395,7 @@ static void setWindowMakerHints(WMWindow * win)
|
|||||||
|
|
||||||
memset(&attribs, 0, sizeof(GNUstepWMAttributes));
|
memset(&attribs, 0, sizeof(GNUstepWMAttributes));
|
||||||
attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr | GSExtraFlagsAttr;
|
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_style = win->flags.style;
|
||||||
|
|
||||||
attribs.window_level = win->level;
|
attribs.window_level = win->level;
|
||||||
if (win->flags.documentEdited)
|
if (win->flags.documentEdited)
|
||||||
attribs.extra_flags = GSDocumentEditedFlag;
|
attribs.extra_flags = GSDocumentEditedFlag;
|
||||||
|
|||||||
+12
-33
@@ -446,18 +446,12 @@ static void str2rcolor(RContext * rc, const char *name, RColor * color)
|
|||||||
{
|
{
|
||||||
XColor xcolor;
|
XColor xcolor;
|
||||||
|
|
||||||
if (XParseColor(rc->dpy, rc->cmap, name, &xcolor) != 0) {
|
XParseColor(rc->dpy, rc->cmap, name, &xcolor);
|
||||||
color->alpha = 255;
|
|
||||||
color->red = xcolor.red >> 8;
|
color->alpha = 255;
|
||||||
color->green = xcolor.green >> 8;
|
color->red = xcolor.red >> 8;
|
||||||
color->blue = xcolor.blue >> 8;
|
color->green = xcolor.green >> 8;
|
||||||
} else {
|
color->blue = xcolor.blue >> 8;
|
||||||
/* 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)
|
static void dumpRImage(const char *path, RImage * image)
|
||||||
@@ -617,7 +611,6 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
||||||
/* FALLTHRU */
|
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -644,7 +637,6 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
||||||
/* FALLTHRU */
|
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -679,7 +671,6 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
||||||
/* FALLTHRU */
|
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -1076,8 +1067,6 @@ static void deleteTexture(WMWidget * w, void *data)
|
|||||||
(void) w;
|
(void) w;
|
||||||
|
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
if (section < 0)
|
|
||||||
return;
|
|
||||||
row = WMGetListSelectedItemRow(panel->texLs);
|
row = WMGetListSelectedItemRow(panel->texLs);
|
||||||
item = WMGetListItem(panel->texLs, row);
|
item = WMGetListItem(panel->texLs, row);
|
||||||
titem = (TextureListItem *) item->clientData;
|
titem = (TextureListItem *) item->clientData;
|
||||||
@@ -1136,8 +1125,6 @@ static void changePage(WMWidget * w, void *data)
|
|||||||
|
|
||||||
if (w) {
|
if (w) {
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
if (section < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
WMSelectListItem(panel->texLs, panel->textureIndex[section]);
|
WMSelectListItem(panel->texLs, panel->textureIndex[section]);
|
||||||
|
|
||||||
@@ -1237,8 +1224,6 @@ static void textureDoubleClick(WMWidget * w, void *data)
|
|||||||
|
|
||||||
/* unselect old texture */
|
/* unselect old texture */
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
if (section < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
|
||||||
titem = (TextureListItem *) item->clientData;
|
titem = (TextureListItem *) item->clientData;
|
||||||
@@ -1267,7 +1252,7 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
|
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
|
||||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||||
int width, height, x, y, tmp;
|
int width, height, x, y;
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
|
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
@@ -1296,8 +1281,7 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
|||||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
||||||
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
||||||
|
|
||||||
tmp = WMGetPopUpButtonSelectedItem(panel->secP);
|
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor)
|
||||||
if ((tmp >= 0) && ((1 << tmp) & titem->selectedFor))
|
|
||||||
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||||
else if (titem->selectedFor)
|
else if (titem->selectedFor)
|
||||||
WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||||
@@ -1432,10 +1416,6 @@ static void changeColorPage(WMWidget * w, void *data)
|
|||||||
WMScreen *scr = WMWidgetScreen(panel->box);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
RContext *rc = WMScreenRContext(scr);
|
RContext *rc = WMScreenRContext(scr);
|
||||||
|
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->colP);
|
|
||||||
if (section < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (panel->preview) {
|
if (panel->preview) {
|
||||||
GC gc;
|
GC gc;
|
||||||
|
|
||||||
@@ -1447,6 +1427,7 @@ static void changeColorPage(WMWidget * w, void *data)
|
|||||||
colorOptions[panel->oldcsection].hand.y);
|
colorOptions[panel->oldcsection].hand.y);
|
||||||
}
|
}
|
||||||
if (w) {
|
if (w) {
|
||||||
|
section = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||||
|
|
||||||
panel->oldcsection = section;
|
panel->oldcsection = section;
|
||||||
if (panel->preview)
|
if (panel->preview)
|
||||||
@@ -1747,8 +1728,6 @@ static void colorWellObserver(void *self, WMNotification * n)
|
|||||||
(void) n;
|
(void) n;
|
||||||
|
|
||||||
p = WMGetPopUpButtonSelectedItem(panel->colP);
|
p = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||||
if (p < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
WMReleaseColor(panel->colors[p]);
|
WMReleaseColor(panel->colors[p]);
|
||||||
|
|
||||||
@@ -1840,10 +1819,10 @@ static void createPanel(Panel * p)
|
|||||||
char *tmp;
|
char *tmp;
|
||||||
Bool ok = True;
|
Bool ok = True;
|
||||||
|
|
||||||
panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
|
panel->fprefix = wstrconcat(wusergnusteppath(), "/Library/WindowMaker");
|
||||||
|
|
||||||
if (access(panel->fprefix, F_OK) != 0) {
|
if (access(panel->fprefix, F_OK) != 0) {
|
||||||
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||||
werror("%s", panel->fprefix);
|
werror("%s", panel->fprefix);
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
@@ -1853,7 +1832,7 @@ static void createPanel(Panel * p)
|
|||||||
wfree(panel->fprefix);
|
wfree(panel->fprefix);
|
||||||
panel->fprefix = tmp;
|
panel->fprefix = tmp;
|
||||||
if (access(panel->fprefix, F_OK) != 0) {
|
if (access(panel->fprefix, F_OK) != 0) {
|
||||||
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||||
werror("%s", panel->fprefix);
|
werror("%s", panel->fprefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-187
@@ -2,9 +2,8 @@
|
|||||||
*
|
*
|
||||||
* WPrefs - Window Maker Preferences Program
|
* WPrefs - Window Maker Preferences Program
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2023 Window Maker Team
|
* Copyright (c) 2014 Window Maker Team
|
||||||
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -26,7 +25,7 @@
|
|||||||
/* This structure containts the list of all the check-buttons to display in the
|
/* 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
|
* expert tab of the window with the corresponding information for effect
|
||||||
*/
|
*/
|
||||||
static struct expert_option {
|
static const struct {
|
||||||
const char *label; /* Text displayed to user */
|
const char *label; /* Text displayed to user */
|
||||||
|
|
||||||
int def_state; /* True/False: the default value, if not defined in current config */
|
int def_state; /* True/False: the default value, if not defined in current config */
|
||||||
@@ -72,15 +71,9 @@ static struct expert_option {
|
|||||||
{ N_("Cycle windows only on the active head."),
|
{ N_("Cycle windows only on the active head."),
|
||||||
/* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
|
/* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
|
||||||
|
|
||||||
{ N_("Cycle all windows from all workspaces."),
|
|
||||||
/* default: */ False, OPTION_WMAKER, "CycleAllWorkspaces" },
|
|
||||||
|
|
||||||
{ N_("Ignore minimized windows when cycling."),
|
{ N_("Ignore minimized windows when cycling."),
|
||||||
/* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
|
/* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
|
||||||
|
|
||||||
{ N_("Show app icons in window list."),
|
|
||||||
/* default: */ False, OPTION_WMAKER, "WindowListAppIcons" },
|
|
||||||
|
|
||||||
{ N_("Show switch panel when cycling windows."),
|
{ N_("Show switch panel when cycling windows."),
|
||||||
/* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" },
|
/* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" },
|
||||||
|
|
||||||
@@ -95,7 +88,7 @@ static struct expert_option {
|
|||||||
/* default: */ False, OPTION_WMAKER, "KbdModeLock" },
|
/* default: */ False, OPTION_WMAKER, "KbdModeLock" },
|
||||||
#endif /* XKB_MODELOCK */
|
#endif /* XKB_MODELOCK */
|
||||||
|
|
||||||
{ N_("Snap a window to edge or corner by dragging."),
|
{ N_("Maximize (snap) a window to edge or corner by dragging."),
|
||||||
/* default: */ False, OPTION_WMAKER, "WindowSnapping" },
|
/* default: */ False, OPTION_WMAKER, "WindowSnapping" },
|
||||||
|
|
||||||
{ N_("Distance from edge to begin window snap."),
|
{ N_("Distance from edge to begin window snap."),
|
||||||
@@ -104,39 +97,9 @@ static struct expert_option {
|
|||||||
{ N_("Distance from corner to begin window snap."),
|
{ N_("Distance from corner to begin window snap."),
|
||||||
/* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" },
|
/* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" },
|
||||||
|
|
||||||
{ 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."),
|
|
||||||
/* default: */ False, OPTION_WMAKER, "MoveHalfMaximizedWindowsBetweenScreens" },
|
|
||||||
|
|
||||||
{ N_("Alternative transitions between states for half maximized windows."),
|
|
||||||
/* default: */ False, OPTION_WMAKER, "AlternativeHalfMaximized" },
|
|
||||||
|
|
||||||
{ N_("Move mouse pointer with half maximized windows."),
|
|
||||||
/* default: */ False, OPTION_WMAKER, "PointerWithHalfMaxWindows" },
|
|
||||||
|
|
||||||
{ N_("Open dialogs in the same workspace as their owners."),
|
{ N_("Open dialogs in the same workspace as their owners."),
|
||||||
/* default: */ False, OPTION_WMAKER, "OpenTransientOnOwnerWorkspace" },
|
/* default: */ False, OPTION_WMAKER, "OpenTransientOnOwnerWorkspace" }
|
||||||
|
|
||||||
{ N_("Wrap dock-attached icons around the screen edges."),
|
|
||||||
/* 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
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -154,8 +117,6 @@ typedef struct _Panel {
|
|||||||
WMButton *swi[wlengthof_nocheck(expert_options)];
|
WMButton *swi[wlengthof_nocheck(expert_options)];
|
||||||
|
|
||||||
WMTextField *textfield[wlengthof_nocheck(expert_options)];
|
WMTextField *textfield[wlengthof_nocheck(expert_options)];
|
||||||
WMScrollView *sv;
|
|
||||||
WMWidget *frame;
|
|
||||||
|
|
||||||
} _Panel;
|
} _Panel;
|
||||||
|
|
||||||
@@ -164,134 +125,15 @@ typedef struct _Panel {
|
|||||||
static void changeIntTextfield(void *data, int delta)
|
static void changeIntTextfield(void *data, int delta)
|
||||||
{
|
{
|
||||||
WMTextField *textfield;
|
WMTextField *textfield;
|
||||||
char *text, buffer[12];
|
char *text;
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
textfield = (WMTextField *)data;
|
textfield = (WMTextField *)data;
|
||||||
text = WMGetTextFieldText(textfield);
|
text = WMGetTextFieldText(textfield);
|
||||||
value = atoi(text);
|
value = atoi(text);
|
||||||
wfree(text);
|
|
||||||
value += delta;
|
value += delta;
|
||||||
sprintf(buffer, "%d", value);
|
sprintf(text, "%d", value);
|
||||||
WMSetTextFieldText(textfield, buffer);
|
WMSetTextFieldText(textfield, text);
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
static void downButtonCallback(WMWidget *self, void *data)
|
||||||
@@ -306,19 +148,6 @@ static void upButtonCallback(WMWidget *self, void *data)
|
|||||||
changeIntTextfield(data, 1);
|
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)
|
static void createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) p;
|
_Panel *panel = (_Panel *) p;
|
||||||
@@ -342,7 +171,6 @@ static void createPanel(Panel *p)
|
|||||||
WMSetFrameRelief(f, WRFlat);
|
WMSetFrameRelief(f, WRFlat);
|
||||||
|
|
||||||
udb = WMGetStandardUserDefaults();
|
udb = WMGetStandardUserDefaults();
|
||||||
qsort(expert_options, wlengthof(expert_options), sizeof(expert_options[0]), cmpExpertOptions);
|
|
||||||
for (i = 0; i < wlengthof(expert_options); i++) {
|
for (i = 0; i < wlengthof(expert_options); i++) {
|
||||||
if (expert_options[i].class != OPTION_WMAKER_INT) {
|
if (expert_options[i].class != OPTION_WMAKER_INT) {
|
||||||
panel->swi[i] = WMCreateSwitchButton(f);
|
panel->swi[i] = WMCreateSwitchButton(f);
|
||||||
@@ -417,7 +245,7 @@ static void createPanel(Panel *p)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
wwarning("expert_options[%d].class = %d, this should not happen\n",
|
wwarning("export_options[%d].class = %d, this should not happen\n",
|
||||||
i, expert_options[i].class);
|
i, expert_options[i].class);
|
||||||
#endif
|
#endif
|
||||||
state = expert_options[i].def_state;
|
state = expert_options[i].def_state;
|
||||||
@@ -429,11 +257,6 @@ static void createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->box);
|
WMMapSubwidgets(panel->box);
|
||||||
WMSetScrollViewContentView(sv, WMWidgetView(f));
|
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);
|
WMRealizeWidget(panel->box);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,7 +293,6 @@ static void storeDefaults(_Panel *panel)
|
|||||||
|
|
||||||
text = WMGetTextFieldText(panel->textfield[i]);
|
text = WMGetTextFieldText(panel->textfield[i]);
|
||||||
value = atoi(text);
|
value = atoi(text);
|
||||||
wfree(text);
|
|
||||||
|
|
||||||
SetIntegerForKey(value, expert_options[i].op_name);
|
SetIntegerForKey(value, expert_options[i].op_name);
|
||||||
break;
|
break;
|
||||||
@@ -494,7 +316,6 @@ Panel *InitExpert(WMWidget *parent)
|
|||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeDefaults;
|
panel->callbacks.updateDomain = storeDefaults;
|
||||||
panel->callbacks.prepareForClose = scrollViewPrepareForClose;
|
|
||||||
|
|
||||||
AddSection(panel, ICON_FILE);
|
AddSection(panel, ICON_FILE);
|
||||||
|
|
||||||
|
|||||||
+13
-10
@@ -22,7 +22,6 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
/* workaround for older fontconfig, that doesn't define these constants */
|
/* workaround for older fontconfig, that doesn't define these constants */
|
||||||
#ifndef FC_WEIGHT_NORMAL
|
#ifndef FC_WEIGHT_NORMAL
|
||||||
@@ -522,7 +521,7 @@ static void selectedOption(WMWidget * w, void *data)
|
|||||||
WMListItem *item = WMGetListItem(panel->sizeL, i);
|
WMListItem *item = WMGetListItem(panel->sizeL, i);
|
||||||
int distance;
|
int distance;
|
||||||
|
|
||||||
distance = fabs(size - atoi(item->text));
|
distance = abs(size - atoi(item->text));
|
||||||
|
|
||||||
if (i == 0 || distance < closest) {
|
if (i == 0 || distance < closest) {
|
||||||
closest = distance;
|
closest = distance;
|
||||||
@@ -570,9 +569,6 @@ static void showData(_Panel * panel)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
WMMenuItem *item;
|
WMMenuItem *item;
|
||||||
WMScreen *scr;
|
|
||||||
|
|
||||||
scr = WMWidgetScreen(panel->parent);
|
|
||||||
|
|
||||||
for (i = 0; i < WMGetPopUpButtonNumberOfItems(panel->optionP); i++) {
|
for (i = 0; i < WMGetPopUpButtonNumberOfItems(panel->optionP); i++) {
|
||||||
char *ofont, *font;
|
char *ofont, *font;
|
||||||
@@ -583,12 +579,19 @@ static void showData(_Panel * panel)
|
|||||||
if (ofont)
|
if (ofont)
|
||||||
wfree(ofont);
|
wfree(ofont);
|
||||||
|
|
||||||
if (strcmp(fontOptions[i].option, "SystemFont") == 0)
|
if (strcmp(fontOptions[i].option, "SystemFont") == 0 ||
|
||||||
font = WMGetFontName(WMDefaultSystemFont(scr));
|
strcmp(fontOptions[i].option, "BoldSystemFont") == 0) {
|
||||||
else if (strcmp(fontOptions[i].option, "BoldSystemFont") == 0)
|
char *path;
|
||||||
font = WMGetFontName(WMDefaultBoldSystemFont(scr));
|
WMUserDefaults *defaults;
|
||||||
else
|
|
||||||
|
path = wdefaultspathfordomain("WMGLOBAL");
|
||||||
|
defaults = WMGetDefaultsFromPath(path);
|
||||||
|
wfree(path);
|
||||||
|
font = WMGetUDStringForKey(defaults,
|
||||||
|
fontOptions[i].option);
|
||||||
|
} else {
|
||||||
font = GetStringForKey(fontOptions[i].option);
|
font = GetStringForKey(fontOptions[i].option);
|
||||||
|
}
|
||||||
if (font)
|
if (font)
|
||||||
font = wstrdup(font);
|
font = wstrdup(font);
|
||||||
WMSetMenuItemRepresentedObject(item, font);
|
WMSetMenuItemRepresentedObject(item, font);
|
||||||
|
|||||||
@@ -1,465 +0,0 @@
|
|||||||
/* 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;
|
|
||||||
}
|
|
||||||
+61
-33
@@ -60,6 +60,8 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
|
Bool have_legacy_apercu;
|
||||||
|
|
||||||
WMWidget *parent;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *posF;
|
WMFrame *posF;
|
||||||
@@ -73,13 +75,12 @@ typedef struct _Panel {
|
|||||||
WMButton *posB[wlengthof_nocheck(icon_position_dbvalue)];
|
WMButton *posB[wlengthof_nocheck(icon_position_dbvalue)];
|
||||||
|
|
||||||
WMFrame *animF;
|
WMFrame *animF;
|
||||||
WMPopUpButton *animP;
|
WMButton *animB[wlengthof_nocheck(icon_animation)];
|
||||||
|
|
||||||
WMFrame *optF;
|
WMFrame *optF;
|
||||||
WMButton *arrB;
|
WMButton *arrB;
|
||||||
WMButton *omnB;
|
WMButton *omnB;
|
||||||
WMButton *sclB;
|
WMButton *sclB;
|
||||||
WMButton *marginB;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
WMFrame *frame;
|
WMFrame *frame;
|
||||||
@@ -174,7 +175,6 @@ static void showData(_Panel * panel)
|
|||||||
WMSetButtonSelected(panel->arrB, GetBoolForKey("AutoArrangeIcons"));
|
WMSetButtonSelected(panel->arrB, GetBoolForKey("AutoArrangeIcons"));
|
||||||
WMSetButtonSelected(panel->omnB, GetBoolForKey("StickyIcons"));
|
WMSetButtonSelected(panel->omnB, GetBoolForKey("StickyIcons"));
|
||||||
WMSetButtonSelected(panel->sclB, GetBoolForKey("SingleClickLaunch"));
|
WMSetButtonSelected(panel->sclB, GetBoolForKey("SingleClickLaunch"));
|
||||||
WMSetButtonSelected(panel->marginB, GetBoolForKey("EnforceIconMargin"));
|
|
||||||
|
|
||||||
str = GetStringForKey("IconPosition");
|
str = GetStringForKey("IconPosition");
|
||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
@@ -195,12 +195,20 @@ static void showData(_Panel * panel)
|
|||||||
|
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
i = 0;
|
i = 0;
|
||||||
else if (i > 29)
|
else if (i > 9)
|
||||||
i = 29;
|
i = 9;
|
||||||
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
|
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
|
||||||
|
|
||||||
/* Mini-Previews for Icons */
|
/* Mini-Previews for Icons */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Backward Compatibility:
|
||||||
|
* These settings changed names after 0.95.6, so to avoid breaking user's
|
||||||
|
* config we still support the old names, and silently convert them to the
|
||||||
|
* new settings
|
||||||
|
* This hack should be kept for at least 2 years, that means >= 2017.
|
||||||
|
*/
|
||||||
|
panel->have_legacy_apercu = False;
|
||||||
str = GetStringForKey("MiniwindowPreviewBalloons");
|
str = GetStringForKey("MiniwindowPreviewBalloons");
|
||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
/* New names found, use them in priority */
|
/* New names found, use them in priority */
|
||||||
@@ -212,6 +220,25 @@ static void showData(_Panel * panel)
|
|||||||
} else {
|
} else {
|
||||||
i = minipreview_minimum_size;
|
i = minipreview_minimum_size;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* No new names, try the legacy names */
|
||||||
|
b = GetBoolForKey("MiniwindowApercuBalloons");
|
||||||
|
if (b) {
|
||||||
|
panel->have_legacy_apercu = True;
|
||||||
|
i = GetIntegerForKey("ApercuSize");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In the beginning, the option was coded as a multiple of the icon
|
||||||
|
* size; then it was converted to pixel size
|
||||||
|
*/
|
||||||
|
if (i < 24)
|
||||||
|
i *= GetIntegerForKey("IconSize");
|
||||||
|
|
||||||
|
if (i <= minipreview_minimum_size)
|
||||||
|
i = minipreview_minimum_size + 1; /* +1 to not display as "off" */
|
||||||
|
} else {
|
||||||
|
i = minipreview_minimum_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
WMSetSliderValue(panel->minipreview.slider, i);
|
WMSetSliderValue(panel->minipreview.slider, i);
|
||||||
minipreview_slider_changed(panel->minipreview.slider, panel);
|
minipreview_slider_changed(panel->minipreview.slider, panel);
|
||||||
@@ -221,7 +248,7 @@ static void showData(_Panel * panel)
|
|||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
for (i = 0; i < wlengthof(icon_animation); i++) {
|
for (i = 0; i < wlengthof(icon_animation); i++) {
|
||||||
if (strcasecmp(str, icon_animation[i].db_value) == 0) {
|
if (strcasecmp(str, icon_animation[i].db_value) == 0) {
|
||||||
WMSetPopUpButtonSelectedItem(panel->animP, i);
|
WMPerformButtonClick(panel->animB[i]);
|
||||||
goto found_animation_value;
|
goto found_animation_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -229,7 +256,7 @@ static void showData(_Panel * panel)
|
|||||||
str, icon_animation[0].db_value);
|
str, icon_animation[0].db_value);
|
||||||
}
|
}
|
||||||
/* If we're here, no valid value have been found so we fall-back to the default */
|
/* If we're here, no valid value have been found so we fall-back to the default */
|
||||||
WMSetPopUpButtonSelectedItem(panel->animP, 0);
|
WMPerformButtonClick(panel->animB[0]);
|
||||||
found_animation_value:
|
found_animation_value:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -339,7 +366,7 @@ static void createPanel(Panel * p)
|
|||||||
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
||||||
WMResizeWidget(panel->sizeP, 80, 20);
|
WMResizeWidget(panel->sizeP, 80, 20);
|
||||||
WMMoveWidget(panel->sizeP, 10, 19);
|
WMMoveWidget(panel->sizeP, 10, 19);
|
||||||
for (i = 24; i <= 256; i += 8) {
|
for (i = 24; i <= 96; i += 8) {
|
||||||
sprintf(buf, "%ix%i", i, i);
|
sprintf(buf, "%ix%i", i, i);
|
||||||
WMAddPopUpButtonItem(panel->sizeP, buf);
|
WMAddPopUpButtonItem(panel->sizeP, buf);
|
||||||
}
|
}
|
||||||
@@ -372,57 +399,50 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Animation ****************/
|
/***************** Animation ****************/
|
||||||
panel->animF = WMCreateFrame(panel->box);
|
panel->animF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->animF, 215, 52);
|
WMResizeWidget(panel->animF, 215, 110);
|
||||||
WMMoveWidget(panel->animF, 292, 6);
|
WMMoveWidget(panel->animF, 292, 6);
|
||||||
WMSetFrameTitle(panel->animF, _("Iconification Animation"));
|
WMSetFrameTitle(panel->animF, _("Iconification Animation"));
|
||||||
|
|
||||||
panel->animP = WMCreatePopUpButton(panel->animF);
|
for (i = 0; i < wlengthof(icon_animation); i++) {
|
||||||
WMResizeWidget(panel->animP, 195, 20);
|
panel->animB[i] = WMCreateRadioButton(panel->animF);
|
||||||
WMMoveWidget(panel->animP, 10, 19);
|
WMResizeWidget(panel->animB[i], 192, 20);
|
||||||
for (i = 0; i < wlengthof(icon_animation); i++)
|
WMMoveWidget(panel->animB[i], 12, 16 + i * 22);
|
||||||
WMAddPopUpButtonItem(panel->animP, _(icon_animation[i].label));
|
|
||||||
|
if (i > 0)
|
||||||
|
WMGroupButtons(panel->animB[0], panel->animB[i]);
|
||||||
|
|
||||||
|
WMSetButtonText(panel->animB[i], _(icon_animation[i].label));
|
||||||
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->animF);
|
WMMapSubwidgets(panel->animF);
|
||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->box);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 215, 148);
|
WMResizeWidget(panel->optF, 215, 90);
|
||||||
WMMoveWidget(panel->optF, 292, 72);
|
WMMoveWidget(panel->optF, 292, 130);
|
||||||
/* WMSetFrameTitle(panel->optF, _("Icon Display")); */
|
/* WMSetFrameTitle(panel->optF, _("Icon Display")); */
|
||||||
starty = 8 + 14; /* the last term centers the checkboxes within the panel; subtract 13 for a new option */
|
|
||||||
|
|
||||||
panel->arrB = WMCreateSwitchButton(panel->optF);
|
panel->arrB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->arrB, 198, 26);
|
WMResizeWidget(panel->arrB, 198, 26);
|
||||||
WMMoveWidget(panel->arrB, 12, starty);
|
WMMoveWidget(panel->arrB, 12, 8);
|
||||||
starty += 26;
|
|
||||||
WMSetButtonText(panel->arrB, _("Auto-arrange icons"));
|
WMSetButtonText(panel->arrB, _("Auto-arrange icons"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Keep icons and miniwindows arranged all the time."), WMWidgetView(panel->arrB));
|
WMSetBalloonTextForView(_("Keep icons and miniwindows arranged all the time."), WMWidgetView(panel->arrB));
|
||||||
|
|
||||||
panel->omnB = WMCreateSwitchButton(panel->optF);
|
panel->omnB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->omnB, 198, 26);
|
WMResizeWidget(panel->omnB, 198, 26);
|
||||||
WMMoveWidget(panel->omnB, 12, starty);
|
WMMoveWidget(panel->omnB, 12, 34);
|
||||||
starty += 26;
|
|
||||||
WMSetButtonText(panel->omnB, _("Omnipresent miniwindows"));
|
WMSetButtonText(panel->omnB, _("Omnipresent miniwindows"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Make miniwindows be present in all workspaces."), WMWidgetView(panel->omnB));
|
WMSetBalloonTextForView(_("Make miniwindows be present in all workspaces."), WMWidgetView(panel->omnB));
|
||||||
|
|
||||||
panel->sclB = WMCreateSwitchButton(panel->optF);
|
panel->sclB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->sclB, 198, 26);
|
WMResizeWidget(panel->sclB, 198, 26);
|
||||||
WMMoveWidget(panel->sclB, 12, starty);
|
WMMoveWidget(panel->sclB, 12, 60);
|
||||||
starty += 26;
|
|
||||||
WMSetButtonText(panel->sclB, _("Single click activation"));
|
WMSetButtonText(panel->sclB, _("Single click activation"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Launch applications and restore windows with a single click."), WMWidgetView(panel->sclB));
|
WMSetBalloonTextForView(_("Launch applications and restore windows with a single click."), WMWidgetView(panel->sclB));
|
||||||
|
|
||||||
panel->marginB = WMCreateSwitchButton(panel->optF);
|
|
||||||
WMResizeWidget(panel->marginB, 198, 26);
|
|
||||||
WMMoveWidget(panel->marginB, 12, starty);
|
|
||||||
starty += 26;
|
|
||||||
WMSetButtonText(panel->marginB, _("Enforce icon margin"));
|
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Make sure that the icon image does not protrude into the icon frame."), WMWidgetView(panel->marginB));
|
|
||||||
|
|
||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->box);
|
WMRealizeWidget(panel->box);
|
||||||
@@ -438,7 +458,6 @@ static void storeData(_Panel * panel)
|
|||||||
SetBoolForKey(WMGetButtonSelected(panel->arrB), "AutoArrangeIcons");
|
SetBoolForKey(WMGetButtonSelected(panel->arrB), "AutoArrangeIcons");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->omnB), "StickyIcons");
|
SetBoolForKey(WMGetButtonSelected(panel->omnB), "StickyIcons");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->sclB), "SingleClickLaunch");
|
SetBoolForKey(WMGetButtonSelected(panel->sclB), "SingleClickLaunch");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->marginB), "EnforceIconMargin");
|
|
||||||
|
|
||||||
SetIntegerForKey(WMGetPopUpButtonSelectedItem(panel->sizeP) * 8 + 24, "IconSize");
|
SetIntegerForKey(WMGetPopUpButtonSelectedItem(panel->sizeP) * 8 + 24, "IconSize");
|
||||||
|
|
||||||
@@ -459,8 +478,17 @@ static void storeData(_Panel * panel)
|
|||||||
}
|
}
|
||||||
SetIntegerForKey(i, "MiniPreviewSize");
|
SetIntegerForKey(i, "MiniPreviewSize");
|
||||||
}
|
}
|
||||||
|
if (panel->have_legacy_apercu) {
|
||||||
|
RemoveObjectForKey("MiniwindowApercuBalloons");
|
||||||
|
RemoveObjectForKey("ApercuSize");
|
||||||
|
}
|
||||||
|
|
||||||
SetStringForKey(icon_animation[WMGetPopUpButtonSelectedItem(panel->animP)].db_value, "IconificationStyle");
|
for (i = 0; i < wlengthof(icon_animation); i++) {
|
||||||
|
if (WMGetButtonSelected(panel->animB[i])) {
|
||||||
|
SetStringForKey(icon_animation[i].db_value, "IconificationStyle");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel *InitIcons(WMWidget *parent)
|
Panel *InitIcons(WMWidget *parent)
|
||||||
|
|||||||
+50
-194
@@ -23,8 +23,6 @@
|
|||||||
|
|
||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/select.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
@@ -67,7 +65,7 @@ typedef struct _Panel {
|
|||||||
* First parameter is the internal keyword known by WMaker
|
* First parameter is the internal keyword known by WMaker
|
||||||
* Second is the text displayed to the user
|
* Second is the text displayed to the user
|
||||||
*/
|
*/
|
||||||
static struct keyOption {
|
static const struct {
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *title;
|
const char *title;
|
||||||
} keyOptions[] = {
|
} keyOptions[] = {
|
||||||
@@ -86,14 +84,11 @@ static struct keyOption {
|
|||||||
{ "RHMaximizeKey", N_("Maximize active window right half") },
|
{ "RHMaximizeKey", N_("Maximize active window right half") },
|
||||||
{ "THMaximizeKey", N_("Maximize active window top half") },
|
{ "THMaximizeKey", N_("Maximize active window top half") },
|
||||||
{ "BHMaximizeKey", N_("Maximize active window bottom half") },
|
{ "BHMaximizeKey", N_("Maximize active window bottom half") },
|
||||||
{ "TLCMaximizeKey", N_("Maximize active window top left corner") },
|
{ "LTCMaximizeKey", N_("Maximize active window left top corner") },
|
||||||
{ "TRCMaximizeKey", N_("Maximize active window top right corner") },
|
{ "RTCMaximizeKey", N_("Maximize active window right top corner") },
|
||||||
{ "BLCMaximizeKey", N_("Maximize active window bottom left corner") },
|
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") },
|
||||||
{ "BRCMaximizeKey", N_("Maximize active window bottom right corner") },
|
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") },
|
||||||
{ "MaximusKey", N_("Tile active window") },
|
{ "MaximusKey", N_("Maximus: Tiled maximization ") },
|
||||||
{ "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") },
|
{ "OmnipresentKey", N_("Toggle window omnipresent status") },
|
||||||
{ "RaiseKey", N_("Raise active window") },
|
{ "RaiseKey", N_("Raise active window") },
|
||||||
{ "LowerKey", N_("Lower active window") },
|
{ "LowerKey", N_("Lower active window") },
|
||||||
@@ -103,21 +98,9 @@ static struct keyOption {
|
|||||||
{ "SelectKey", N_("Select active window") },
|
{ "SelectKey", N_("Select active window") },
|
||||||
{ "FocusNextKey", N_("Focus next window") },
|
{ "FocusNextKey", N_("Focus next window") },
|
||||||
{ "FocusPrevKey", N_("Focus previous window") },
|
{ "FocusPrevKey", N_("Focus previous window") },
|
||||||
/* Directional window focus */
|
|
||||||
{ "FocusWindowLeftKey", N_("Focus the window to the left") },
|
|
||||||
{ "FocusWindowRightKey", N_("Focus the window to the right") },
|
|
||||||
{ "FocusWindowUpKey", N_("Focus the window above") },
|
|
||||||
{ "FocusWindowDownKey", N_("Focus the window below") },
|
|
||||||
{ "GroupNextKey", N_("Focus next group window") },
|
{ "GroupNextKey", N_("Focus next group window") },
|
||||||
{ "GroupPrevKey", N_("Focus previous group window") },
|
{ "GroupPrevKey", N_("Focus previous group window") },
|
||||||
|
|
||||||
/* Vim-like Window Marking */
|
|
||||||
{ "MarkSetKey", N_("Mark window: set mark") },
|
|
||||||
{ "MarkUnsetKey", N_("Mark window: unset mark") },
|
|
||||||
{ "MarkBringKey", N_("Mark window: bring marked window here") },
|
|
||||||
{ "MarkJumpKey", N_("Mark window: jump to marked window") },
|
|
||||||
{ "MarkSwapKey", N_("Mark window: swap with marked window") },
|
|
||||||
|
|
||||||
/* Workspace Related */
|
/* Workspace Related */
|
||||||
{ "WorkspaceMapKey", N_("Open workspace pager") },
|
{ "WorkspaceMapKey", N_("Open workspace pager") },
|
||||||
{ "NextWorkspaceKey", N_("Switch to next workspace") },
|
{ "NextWorkspaceKey", N_("Switch to next workspace") },
|
||||||
@@ -163,20 +146,12 @@ static struct keyOption {
|
|||||||
{ "WindowShortcut9Key", N_("Shortcut for window 9") },
|
{ "WindowShortcut9Key", N_("Shortcut for window 9") },
|
||||||
{ "WindowShortcut10Key", N_("Shortcut for window 10") },
|
{ "WindowShortcut10Key", N_("Shortcut for window 10") },
|
||||||
|
|
||||||
/* Head Selection */
|
|
||||||
{ "MoveTo12to6Head", N_("Move to right/bottom/left/top head") },
|
|
||||||
{ "MoveTo6to12Head", N_("Move to left/top/right/bottom head") },
|
|
||||||
|
|
||||||
/* Misc. */
|
/* Misc. */
|
||||||
{ "WindowRelaunchKey", N_("Launch new instance of application") },
|
{ "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") },
|
{ "RunKey", N_("Run application") },
|
||||||
{ "ExitKey", N_("Exit Window Maker") },
|
|
||||||
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") },
|
{ "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
|
#ifdef XKB_MODELOCK
|
||||||
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
|
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
|
||||||
#endif /* XKB_MODELOCK */
|
#endif /* XKB_MODELOCK */
|
||||||
@@ -321,61 +296,25 @@ static int NumLockMask(Display *dpy)
|
|||||||
return mask;
|
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)
|
char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
KeySym ksym, lksym, uksym;
|
KeySym ksym, lksym, uksym;
|
||||||
/* Large enough for several chained chords */
|
char buffer[64];
|
||||||
char buffer[512];
|
char *key = NULL;
|
||||||
char keybuf[64];
|
|
||||||
char *key;
|
|
||||||
unsigned int numlock_mask;
|
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) {
|
while (*capturing) {
|
||||||
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
||||||
WMNextEvent(dpy, &ev);
|
WMNextEvent(dpy, &ev);
|
||||||
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
||||||
numlock_mask = NumLockMask(dpy);
|
numlock_mask = NumLockMask(dpy);
|
||||||
|
|
||||||
/* conditional mask check to get numeric keypad keys */
|
if (xext_xkb_supported)
|
||||||
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
|
/* 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);
|
||||||
|
|
||||||
if (!IsModifierKey(ksym)) {
|
if (!IsModifierKey(ksym)) {
|
||||||
if (convert_case) {
|
if (convert_case) {
|
||||||
@@ -385,95 +324,44 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
|||||||
key = XKeysymToString(ksym);
|
key = XKeysymToString(ksym);
|
||||||
}
|
}
|
||||||
|
|
||||||
keybuf[0] = '\0';
|
*capturing = 0;
|
||||||
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
|
|
||||||
wstrlcat(buffer, keybuf, sizeof(buffer));
|
|
||||||
have_key = True;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WMHandleEvent(&ev);
|
WMHandleEvent(&ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- Phase 2: collect additional chain keys with timeout ---- */
|
if (!key)
|
||||||
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;
|
return NULL;
|
||||||
|
|
||||||
*capturing = 0;
|
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));
|
||||||
|
|
||||||
return wstrdup(buffer);
|
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)
|
static void captureClick(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
@@ -488,37 +376,23 @@ static void captureClick(WMWidget * w, void *data)
|
|||||||
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
shortcut = capture_shortcut(dpy, &panel->capturing, 1);
|
shortcut = capture_shortcut(dpy, &panel->capturing, 1);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
int key_idx = -1;
|
|
||||||
int row = WMGetListSelectedItemRow(panel->actLs);
|
int row = WMGetListSelectedItemRow(panel->actLs);
|
||||||
|
|
||||||
key_idx = isKeySet(panel, shortcut);
|
WMSetTextFieldText(panel->shoT, shortcut);
|
||||||
if (key_idx >= 0 && (key_idx != row)) {
|
if (row >= 0) {
|
||||||
char *msg;
|
if (panel->shortcuts[row])
|
||||||
|
wfree(panel->shortcuts[row]);
|
||||||
|
panel->shortcuts[row] = shortcut;
|
||||||
|
|
||||||
msg = wstrconcat(_("Key shortcut already in use by the "), _(keyOptions[key_idx].title));
|
WMRedisplayWidget(panel->actLs);
|
||||||
WMRunAlertPanel(WMWidgetScreen(w), GetWindow(),
|
|
||||||
_("Error"),
|
|
||||||
msg,
|
|
||||||
_("OK"), NULL, NULL);
|
|
||||||
wfree(msg);
|
|
||||||
wfree(shortcut);
|
|
||||||
} else {
|
} else {
|
||||||
WMSetTextFieldText(panel->shoT, shortcut);
|
wfree(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;
|
panel->capturing = 0;
|
||||||
WMSetButtonText(w, _("Capture"));
|
WMSetButtonText(w, _("Capture"));
|
||||||
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key(s)."));
|
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key."));
|
||||||
XUngrabKeyboard(dpy, CurrentTime);
|
XUngrabKeyboard(dpy, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,9 +404,6 @@ static void clearShortcut(WMWidget * w, void *data)
|
|||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) w;
|
(void) w;
|
||||||
|
|
||||||
/* Cancel any ongoing capture so the keychain loop is unblocked */
|
|
||||||
panel->capturing = 0;
|
|
||||||
|
|
||||||
WMSetTextFieldText(panel->shoT, NULL);
|
WMSetTextFieldText(panel->shoT, NULL);
|
||||||
|
|
||||||
if (row >= 0) {
|
if (row >= 0) {
|
||||||
@@ -622,20 +493,6 @@ 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));
|
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)
|
static void createPanel(Panel * p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) p;
|
_Panel *panel = (_Panel *) p;
|
||||||
@@ -675,7 +532,6 @@ static void createPanel(Panel * p)
|
|||||||
WMSetListUserDrawProc(panel->actLs, paintItem);
|
WMSetListUserDrawProc(panel->actLs, paintItem);
|
||||||
WMHangData(panel->actLs, panel);
|
WMHangData(panel->actLs, panel);
|
||||||
|
|
||||||
qsort(keyOptions, wlengthof(keyOptions), sizeof(keyOptions[0]), cmpKeyOptions);
|
|
||||||
for (i = 0; i < wlengthof(keyOptions); i++) {
|
for (i = 0; i < wlengthof(keyOptions); i++) {
|
||||||
WMAddListItem(panel->actLs, _(keyOptions[i].title));
|
WMAddListItem(panel->actLs, _(keyOptions[i].title));
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-16
@@ -10,20 +10,9 @@ wpdatadir = @wprefs_datadir@
|
|||||||
|
|
||||||
wpdata_DATA = WPrefs.tiff WPrefs.xpm
|
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) \
|
EXTRA_DIST = $(wpdata_DATA) \
|
||||||
KeyboardSettings.c \
|
KeyboardSettings.c \
|
||||||
Themes.c \
|
Themes.c
|
||||||
WPrefs.desktop.in
|
|
||||||
|
|
||||||
DISTCLEANFILES = WPrefs.desktop
|
|
||||||
|
|
||||||
WPrefs_SOURCES = \
|
WPrefs_SOURCES = \
|
||||||
main.c \
|
main.c \
|
||||||
@@ -35,7 +24,6 @@ WPrefs_SOURCES = \
|
|||||||
Expert.c \
|
Expert.c \
|
||||||
Focus.c \
|
Focus.c \
|
||||||
FontSimple.c \
|
FontSimple.c \
|
||||||
HotCornerShortcuts.c \
|
|
||||||
Icons.c \
|
Icons.c \
|
||||||
KeyboardShortcuts.c \
|
KeyboardShortcuts.c \
|
||||||
Menu.c \
|
Menu.c \
|
||||||
@@ -57,11 +45,10 @@ WPrefs_SOURCES = \
|
|||||||
# KeyboardSettings.c \
|
# KeyboardSettings.c \
|
||||||
# Themes.c
|
# Themes.c
|
||||||
|
|
||||||
AM_CFLAGS = @PANGO_CFLAGS@
|
AM_CFLAGS =
|
||||||
|
|
||||||
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
|
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
|
||||||
-I$(top_builddir)/wrlib -I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
|
-I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
||||||
@HEADER_SEARCH_PATH@
|
|
||||||
|
|
||||||
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||||
|
|
||||||
|
|||||||
+20
-81
@@ -22,7 +22,6 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
@@ -291,8 +290,6 @@ static void changedItemPad(WMWidget * w, void *data)
|
|||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
int padn = WMGetPopUpButtonSelectedItem(w);
|
int padn = WMGetPopUpButtonSelectedItem(w);
|
||||||
|
|
||||||
if (padn < 0)
|
|
||||||
return;
|
|
||||||
WMUnmapWidget(panel->itemPad[panel->currentPad]);
|
WMUnmapWidget(panel->itemPad[panel->currentPad]);
|
||||||
WMMapWidget(panel->itemPad[padn]);
|
WMMapWidget(panel->itemPad[padn]);
|
||||||
|
|
||||||
@@ -509,7 +506,7 @@ static void createPanel(_Panel * p)
|
|||||||
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
||||||
|
|
||||||
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
|
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
|
||||||
data->param.pipe.command = "/etc/" GSUSER_SUBDIR "/" DEFAULTS_SUBDIR "/menu.hook";
|
data->param.pipe.command = "/etc/X11/WindowMaker/menu.hook";
|
||||||
|
|
||||||
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
|
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
|
||||||
data->param.pipe.command = "wmconfig --output wmaker";
|
data->param.pipe.command = "wmconfig --output wmaker";
|
||||||
@@ -520,25 +517,19 @@ static void createPanel(_Panel * p)
|
|||||||
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
|
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
|
||||||
data->param.directory.command = "setstyle";
|
data->param.directory.command = "setstyle";
|
||||||
data->param.directory.directory =
|
data->param.directory.directory =
|
||||||
"/usr/share/" PACKAGE_TARNAME "/Themes"
|
"/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
|
||||||
" /usr/local/share/" PACKAGE_TARNAME "/Themes"
|
|
||||||
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Themes";
|
|
||||||
data->param.directory.stripExt = 1;
|
data->param.directory.stripExt = 1;
|
||||||
|
|
||||||
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
|
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
|
||||||
data->param.directory.command = "wmsetbg -u -s";
|
data->param.directory.command = "wmsetbg -u -s";
|
||||||
data->param.directory.directory =
|
data->param.directory.directory =
|
||||||
"/opt/kde2/share/wallpapers"
|
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
|
||||||
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
|
|
||||||
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
|
|
||||||
data->param.directory.stripExt = 1;
|
data->param.directory.stripExt = 1;
|
||||||
|
|
||||||
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
|
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
|
||||||
data->param.directory.command = "wmsetbg -u -t";
|
data->param.directory.command = "wmsetbg -u -t";
|
||||||
data->param.directory.directory =
|
data->param.directory.directory =
|
||||||
"/opt/kde2/share/wallpapers"
|
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
|
||||||
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
|
|
||||||
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
|
|
||||||
data->param.directory.stripExt = 1;
|
data->param.directory.stripExt = 1;
|
||||||
|
|
||||||
smenu = putNewSubmenu(pad, _("Assorted XTerms"));
|
smenu = putNewSubmenu(pad, _("Assorted XTerms"));
|
||||||
@@ -622,13 +613,12 @@ static void createPanel(_Panel * p)
|
|||||||
WMAddNotificationObserver(dataChanged, panel, WMTextDidChangeNotification, panel->pathT);
|
WMAddNotificationObserver(dataChanged, panel, WMTextDidChangeNotification, panel->pathT);
|
||||||
|
|
||||||
label = WMCreateLabel(panel->pathF);
|
label = WMCreateLabel(panel->pathF);
|
||||||
WMResizeWidget(label, width - 20, 90);
|
WMResizeWidget(label, width - 20, 80);
|
||||||
WMMoveWidget(label, 10, 50);
|
WMMoveWidget(label, 10, 50);
|
||||||
WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
|
WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
|
||||||
"or a list of directories with the programs you\n"
|
"or a list of directories with the programs you\n"
|
||||||
"want to have listed in the menu. Ex:\n"
|
"want to have listed in the menu. Ex:\n"
|
||||||
"~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/menu\n"
|
"~/GNUstep/Library/WindowMaker/menu\n" "or\n" "/usr/bin ~/xbin"));
|
||||||
"or\n" "/usr/bin ~/xbin"));
|
|
||||||
|
|
||||||
WMMapSubwidgets(panel->pathF);
|
WMMapSubwidgets(panel->pathF);
|
||||||
|
|
||||||
@@ -923,11 +913,6 @@ static ItemData *parseCommand(WMPropList * item)
|
|||||||
|
|
||||||
data->type = ExecInfo;
|
data->type = ExecInfo;
|
||||||
|
|
||||||
if (parameter == NULL) {
|
|
||||||
wfree(data);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
data->param.exec.command = wstrdup(parameter);
|
data->param.exec.command = wstrdup(parameter);
|
||||||
if (shortcut)
|
if (shortcut)
|
||||||
data->param.exec.shortcut = wstrdup(shortcut);
|
data->param.exec.shortcut = wstrdup(shortcut);
|
||||||
@@ -940,12 +925,6 @@ static ItemData *parseCommand(WMPropList * item)
|
|||||||
* |pipe
|
* |pipe
|
||||||
*/
|
*/
|
||||||
p = parameter;
|
p = parameter;
|
||||||
|
|
||||||
if (p == NULL) {
|
|
||||||
wfree(data);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (isspace(*p) && *p)
|
while (isspace(*p) && *p)
|
||||||
p++;
|
p++;
|
||||||
if (*p == '|') {
|
if (*p == '|') {
|
||||||
@@ -1456,12 +1435,12 @@ static WEditMenu *buildSubmenu(_Panel * panel, WMPropList * pl)
|
|||||||
WSetEditMenuItemImage(item, panel->markerPix[data->type]);
|
WSetEditMenuItemImage(item, panel->markerPix[data->type]);
|
||||||
WSetEditMenuItemData(item, data, (WMCallback *) freeItemData);
|
WSetEditMenuItemData(item, data, (WMCallback *) freeItemData);
|
||||||
} else {
|
} else {
|
||||||
char buf[256];
|
char *buf = wmalloc(1024);
|
||||||
|
snprintf(buf, 1024, _("Invalid menu command \"%s\" with label \"%s\" cleared"),
|
||||||
snprintf(buf, sizeof(buf), _("Invalid menu command \"%s\" with label \"%s\" cleared"),
|
|
||||||
WMGetFromPLString(WMGetFromPLArray(pi, 1)),
|
WMGetFromPLString(WMGetFromPLArray(pi, 1)),
|
||||||
WMGetFromPLString(WMGetFromPLArray(pi, 0)));
|
WMGetFromPLString(WMGetFromPLArray(pi, 0)));
|
||||||
WMRunAlertPanel(scr, panel->parent, _("Warning"), buf, _("OK"), NULL, NULL);
|
WMRunAlertPanel(scr, panel->parent, _("Warning"), buf, _("OK"), NULL, NULL);
|
||||||
|
wfree(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1502,53 +1481,18 @@ static WMPropList *getDefaultMenu(_Panel * panel)
|
|||||||
|
|
||||||
static void showData(_Panel * panel)
|
static void showData(_Panel * panel)
|
||||||
{
|
{
|
||||||
char *menuPath, *labelText;
|
const char *gspath;
|
||||||
char buf[1024];
|
char *menuPath;
|
||||||
WMPropList *pmenu;
|
WMPropList *pmenu;
|
||||||
|
|
||||||
menuPath = wdefaultspathfordomain("WMRootMenu");
|
gspath = wusergnusteppath();
|
||||||
|
|
||||||
|
menuPath = wmalloc(strlen(gspath) + 32);
|
||||||
|
strcpy(menuPath, gspath);
|
||||||
|
strcat(menuPath, "/Defaults/WMRootMenu");
|
||||||
|
|
||||||
pmenu = WMReadPropListFromFile(menuPath);
|
pmenu = WMReadPropListFromFile(menuPath);
|
||||||
|
|
||||||
/* check if WMRootMenu references another file, and if so,
|
|
||||||
if that file is in proplist format */
|
|
||||||
while (WMIsPLString(pmenu)) {
|
|
||||||
char *path = NULL;
|
|
||||||
|
|
||||||
path = wexpandpath(WMGetFromPLString(pmenu));
|
|
||||||
|
|
||||||
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. */
|
|
||||||
|
|
||||||
if (!path)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (access(path, W_OK) < 0) {
|
|
||||||
snprintf(buf, sizeof(buf),
|
|
||||||
_("The menu file \"%s\" referenced by "
|
|
||||||
"WMRootMenu is read-only.\n"
|
|
||||||
"You cannot use WPrefs to modify it."),
|
|
||||||
path);
|
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->parent),
|
|
||||||
panel->parent,
|
|
||||||
_("Warning"), buf,
|
|
||||||
_("OK"), NULL, NULL);
|
|
||||||
panel->dontSave = True;
|
|
||||||
wfree(path);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pmenu = WMReadPropListFromFile(path);
|
|
||||||
menuPath = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pmenu || !WMIsPLArray(pmenu)) {
|
if (!pmenu || !WMIsPLArray(pmenu)) {
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
@@ -1573,14 +1517,6 @@ static void showData(_Panel * panel)
|
|||||||
|
|
||||||
panel->menuPath = menuPath;
|
panel->menuPath = menuPath;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf),
|
|
||||||
_("\n\nWhen saved, the menu will be written to the file\n\"%s\"."),
|
|
||||||
menuPath);
|
|
||||||
labelText = WMGetLabelText(panel->sections[NoInfo][0]);
|
|
||||||
labelText = wstrconcat(labelText, buf);
|
|
||||||
WMSetLabelText(panel->sections[NoInfo][0], labelText);
|
|
||||||
wfree(labelText);
|
|
||||||
|
|
||||||
buildMenuFromPL(panel, pmenu);
|
buildMenuFromPL(panel, pmenu);
|
||||||
|
|
||||||
WMReleasePropList(pmenu);
|
WMReleasePropList(pmenu);
|
||||||
@@ -1621,12 +1557,15 @@ static WMPropList *processData(const char *title, ItemData * data)
|
|||||||
case ExecInfo:
|
case ExecInfo:
|
||||||
if (data->param.exec.command == NULL)
|
if (data->param.exec.command == NULL)
|
||||||
goto return_null;
|
goto return_null;
|
||||||
|
#if 1
|
||||||
if (strpbrk(data->param.exec.command, "&$*|><?`=;")) {
|
if (strpbrk(data->param.exec.command, "&$*|><?`=;")) {
|
||||||
s1 = "SHEXEC";
|
s1 = "SHEXEC";
|
||||||
} else {
|
} else {
|
||||||
s1 = "EXEC";
|
s1 = "EXEC";
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
s1 = "SHEXEC";
|
||||||
|
#endif
|
||||||
|
|
||||||
if (notblank(data->param.exec.shortcut)) {
|
if (notblank(data->param.exec.shortcut)) {
|
||||||
WMAddToPLArray(item, pscut);
|
WMAddToPLArray(item, pscut);
|
||||||
|
|||||||
@@ -381,7 +381,10 @@ static void fillModifierPopUp(WMPopUpButton * pop)
|
|||||||
if (mapping->modifiermap[idx] != 0) {
|
if (mapping->modifiermap[idx] != 0) {
|
||||||
int l;
|
int l;
|
||||||
for (l = 0; l < 4; l++) {
|
for (l = 0; l < 4; l++) {
|
||||||
ksym = W_KeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
if (xext_xkb_supported)
|
||||||
|
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
|
||||||
|
else
|
||||||
|
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0);
|
||||||
if (ksym != NoSymbol)
|
if (ksym != NoSymbol)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -647,7 +650,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
|||||||
umask(permissions);
|
umask(permissions);
|
||||||
permissions = (S_IRWXU | S_IRWXG | S_IRWXO) & (~permissions);
|
permissions = (S_IRWXU | S_IRWXG | S_IRWXO) & (~permissions);
|
||||||
|
|
||||||
path = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart");
|
path = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart");
|
||||||
|
|
||||||
f = fopen(path, "rb");
|
f = fopen(path, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@@ -665,7 +668,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
|||||||
char *tmppath;
|
char *tmppath;
|
||||||
FILE *fo;
|
FILE *fo;
|
||||||
|
|
||||||
tmppath = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart.tmp");
|
tmppath = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart.tmp");
|
||||||
fo = fopen(tmppath, "wb");
|
fo = fopen(tmppath, "wb");
|
||||||
if (!fo) {
|
if (!fo) {
|
||||||
werror(_("could not create temporary file %s"), tmppath);
|
werror(_("could not create temporary file %s"), tmppath);
|
||||||
@@ -748,8 +751,6 @@ static void storeData(_Panel * panel)
|
|||||||
int action;
|
int action;
|
||||||
|
|
||||||
action = WMGetPopUpButtonSelectedItem(panel->mouse_action[i].popup);
|
action = WMGetPopUpButtonSelectedItem(panel->mouse_action[i].popup);
|
||||||
if (action < 0)
|
|
||||||
continue;
|
|
||||||
if (button_list[i].type == T_BUTTON)
|
if (button_list[i].type == T_BUTTON)
|
||||||
db_value = button_actions[action].db_value;
|
db_value = button_actions[action].db_value;
|
||||||
else
|
else
|
||||||
|
|||||||
+6
-6
@@ -77,11 +77,11 @@ static void showData(_Panel * panel)
|
|||||||
if (array)
|
if (array)
|
||||||
wwarning(_("bad value in option IconPath. Using default path list"));
|
wwarning(_("bad value in option IconPath. Using default path list"));
|
||||||
addPathToList(panel->icoL, -1, "~/pixmaps");
|
addPathToList(panel->icoL, -1, "~/pixmaps");
|
||||||
addPathToList(panel->icoL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/Icons");
|
addPathToList(panel->icoL, -1, "~/GNUstep/Library/Icons");
|
||||||
addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
|
addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
|
||||||
addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Icons");
|
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Icons");
|
||||||
addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
|
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Pixmaps");
|
||||||
addPathToList(panel->icoL, -1, "/usr/share/" PACKAGE_TARNAME "/Icons");
|
addPathToList(panel->icoL, -1, "/usr/share/WindowMaker/Icons");
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
||||||
val = WMGetFromPLArray(array, i);
|
val = WMGetFromPLArray(array, i);
|
||||||
@@ -94,8 +94,8 @@ static void showData(_Panel * panel)
|
|||||||
if (array)
|
if (array)
|
||||||
wwarning(_("bad value in option PixmapPath. Using default path list"));
|
wwarning(_("bad value in option PixmapPath. Using default path list"));
|
||||||
addPathToList(panel->pixL, -1, "~/pixmaps");
|
addPathToList(panel->pixL, -1, "~/pixmaps");
|
||||||
addPathToList(panel->pixL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Pixmaps");
|
addPathToList(panel->pixL, -1, "~/GNUstep/Library/WindowMaker/Pixmaps");
|
||||||
addPathToList(panel->pixL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
|
addPathToList(panel->pixL, -1, "/usr/local/share/WindowMaker/Pixmaps");
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
||||||
val = WMGetFromPLArray(array, i);
|
val = WMGetFromPLArray(array, i);
|
||||||
|
|||||||
@@ -196,13 +196,9 @@ static void storeData(_Panel * panel)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->sizeP);
|
i = WMGetPopUpButtonSelectedItem(panel->sizeP);
|
||||||
if (i < 0)
|
|
||||||
return;
|
|
||||||
SetStringForKey(resize_display[i].db_value, "ResizeDisplay");
|
SetStringForKey(resize_display[i].db_value, "ResizeDisplay");
|
||||||
|
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->posiP);
|
i = WMGetPopUpButtonSelectedItem(panel->posiP);
|
||||||
if (i < 0)
|
|
||||||
return;
|
|
||||||
SetStringForKey(move_display[i].db_value, "MoveDisplay");
|
SetStringForKey(move_display[i].db_value, "MoveDisplay");
|
||||||
|
|
||||||
lr = WMGetButtonSelected(panel->lrB);
|
lr = WMGetButtonSelected(panel->lrB);
|
||||||
@@ -284,14 +280,14 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->box);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 255, 96);
|
WMResizeWidget(panel->optF, 255, 94);
|
||||||
WMMoveWidget(panel->optF, 15, 125);
|
WMMoveWidget(panel->optF, 15, 125);
|
||||||
WMSetFrameTitle(panel->optF, _("AppIcon bouncing"));
|
WMSetFrameTitle(panel->optF, _("AppIcon bouncing"));
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(appicon_bouncing); i++) {
|
for (i = 0; i < wlengthof(appicon_bouncing); i++) {
|
||||||
panel->bounceB[i] = WMCreateSwitchButton(panel->optF);
|
panel->bounceB[i] = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->bounceB[i], 237, 26);
|
WMResizeWidget(panel->bounceB[i], 237, 26);
|
||||||
WMMoveWidget(panel->bounceB[i], 9, 16 + i * 26);
|
WMMoveWidget(panel->bounceB[i], 9, 14 + i * 25);
|
||||||
WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label));
|
WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label));
|
||||||
|
|
||||||
if (appicon_bouncing[i].default_value)
|
if (appicon_bouncing[i].default_value)
|
||||||
@@ -306,7 +302,7 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Workspace border ****************/
|
/***************** Workspace border ****************/
|
||||||
panel->borderF = WMCreateFrame(panel->box);
|
panel->borderF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->borderF, 220, 77);
|
WMResizeWidget(panel->borderF, 220, 75);
|
||||||
WMMoveWidget(panel->borderF, 285, 144);
|
WMMoveWidget(panel->borderF, 285, 144);
|
||||||
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
WPrefs.app is the preferences "editor" for the WindowMaker window
|
WPrefs.app is the preferences "editor" for the WindowMaker window
|
||||||
manager. It can be used to set most of the preference options of WindowMaker
|
manager. It can be used to set most of the preference options of WindowMaker
|
||||||
and define its applications menu. It also can change some settings
|
and define it's applications menu. It also can change some settings
|
||||||
that do not belong to WindowMaker.
|
that do not belong to WindowMaker.
|
||||||
|
|
||||||
Although WPrefs.app is designed to be easy to use, you should read the
|
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
|
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
|
with the full path, like /usr/local/GNUstep/Applications/WPrefs.app/WPrefs
|
||||||
Then, dock its application icon. The dock will automatically detect its
|
Then, dock it's application icon. The dock will automatically detect it's
|
||||||
icon and use it.
|
icon and use it.
|
||||||
|
|
||||||
If you change configuration often, you might want to leave WPrefs
|
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.
|
~/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
|
If you don't want or can't use the menu definition section, do not
|
||||||
open its section (or if you do open it, do not Save), or WPrefs will
|
open it's section (or if you do open it, do not Save), or WPrefs will
|
||||||
overwrite your ~/G/D/WMRootMenu file.
|
overwrite your ~/G/D/WMRootMenu file.
|
||||||
|
|
||||||
Only options that have different values than what is found in the
|
Only options that have different values than what is found in the
|
||||||
|
|||||||
+81
-81
@@ -117,21 +117,16 @@ typedef struct _TexturePanel {
|
|||||||
|
|
||||||
} _TexturePanel;
|
} _TexturePanel;
|
||||||
|
|
||||||
enum {
|
#define TYPE_SOLID 0
|
||||||
TYPE_SOLID,
|
#define TYPE_GRADIENT 1
|
||||||
TYPE_GRADIENT,
|
#define TYPE_SGRADIENT 2
|
||||||
TYPE_SGRADIENT,
|
#define TYPE_TGRADIENT 3
|
||||||
TYPE_TGRADIENT,
|
#define TYPE_PIXMAP 4
|
||||||
TYPE_PIXMAP
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
#define PTYPE_TILE 0
|
||||||
PTYPE_TILE,
|
#define PTYPE_SCALE 1
|
||||||
PTYPE_SCALE,
|
#define PTYPE_CENTER 2
|
||||||
PTYPE_CENTER,
|
#define PTYPE_MAXIMIZE 3
|
||||||
PTYPE_MAXIMIZE,
|
|
||||||
PTYPE_FILL
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*--------------------------------------------------------------------------
|
*--------------------------------------------------------------------------
|
||||||
@@ -141,7 +136,7 @@ enum {
|
|||||||
|
|
||||||
/************/
|
/************/
|
||||||
|
|
||||||
static void updateGradButtons(TexturePanel *panel)
|
static void updateGradButtons(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
RImage *image;
|
RImage *image;
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
@@ -185,7 +180,7 @@ static void updateGradButtons(TexturePanel *panel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void updateTGradImage(TexturePanel *panel)
|
static void updateTGradImage(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
RImage *image, *gradient;
|
RImage *image, *gradient;
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
@@ -206,17 +201,19 @@ static void updateTGradImage(TexturePanel *panel)
|
|||||||
to.green = WMGreenComponentOfColor(color) >> 8;
|
to.green = WMGreenComponentOfColor(color) >> 8;
|
||||||
to.blue = WMBlueComponentOfColor(color) >> 8;
|
to.blue = WMBlueComponentOfColor(color) >> 8;
|
||||||
|
|
||||||
if (panel->image->width < 141 || panel->image->height < 91)
|
if (panel->image->width < 141 || panel->image->height < 91) {
|
||||||
image = RMakeTiledImage(panel->image, 141, 91);
|
image = RMakeTiledImage(panel->image, 141, 91);
|
||||||
else
|
} else {
|
||||||
image = RCloneImage(panel->image);
|
image = RCloneImage(panel->image);
|
||||||
|
}
|
||||||
|
|
||||||
if (WMGetButtonSelected(panel->dirhB))
|
if (WMGetButtonSelected(panel->dirhB)) {
|
||||||
gradient = RRenderGradient(image->width, image->height, &from, &to, RHorizontalGradient);
|
gradient = RRenderGradient(image->width, image->height, &from, &to, RHorizontalGradient);
|
||||||
else if (WMGetButtonSelected(panel->dirvB))
|
} else if (WMGetButtonSelected(panel->dirvB)) {
|
||||||
gradient = RRenderGradient(image->width, image->height, &from, &to, RVerticalGradient);
|
gradient = RRenderGradient(image->width, image->height, &from, &to, RVerticalGradient);
|
||||||
else
|
} else {
|
||||||
gradient = RRenderGradient(image->width, image->height, &from, &to, RDiagonalGradient);
|
gradient = RRenderGradient(image->width, image->height, &from, &to, RDiagonalGradient);
|
||||||
|
}
|
||||||
|
|
||||||
RCombineImagesWithOpaqueness(image, gradient, WMGetSliderValue(panel->topaS));
|
RCombineImagesWithOpaqueness(image, gradient, WMGetSliderValue(panel->topaS));
|
||||||
RReleaseImage(gradient);
|
RReleaseImage(gradient);
|
||||||
@@ -228,7 +225,7 @@ static void updateTGradImage(TexturePanel *panel)
|
|||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void updateSGradButtons(TexturePanel *panel)
|
static void updateSGradButtons(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
RImage *image;
|
RImage *image;
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
@@ -267,7 +264,7 @@ static void updateSGradButtons(TexturePanel *panel)
|
|||||||
|
|
||||||
/*********** Gradient ************/
|
/*********** Gradient ************/
|
||||||
|
|
||||||
static void updateSVSlider(WMSlider *sPtr, Bool saturation, WMFont *font, RHSVColor *hsv)
|
static void updateSVSlider(WMSlider * sPtr, Bool saturation, WMFont * font, RHSVColor * hsv)
|
||||||
{
|
{
|
||||||
RImage *image;
|
RImage *image;
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
@@ -315,7 +312,7 @@ static void updateSVSlider(WMSlider *sPtr, Bool saturation, WMFont *font, RHSVCo
|
|||||||
WMReleasePixmap(pixmap);
|
WMReleasePixmap(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void updateHueSlider(WMSlider *sPtr, WMFont *font, RHSVColor *hsv)
|
static void updateHueSlider(WMSlider * sPtr, WMFont * font, RHSVColor * hsv)
|
||||||
{
|
{
|
||||||
RColor *colors[8];
|
RColor *colors[8];
|
||||||
RImage *image;
|
RImage *image;
|
||||||
@@ -356,7 +353,7 @@ static void updateHueSlider(WMSlider *sPtr, WMFont *font, RHSVColor *hsv)
|
|||||||
wfree(colors[i]);
|
wfree(colors[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sliderChangeCallback(WMWidget *w, void *data)
|
static void sliderChangeCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
RHSVColor hsv;
|
RHSVColor hsv;
|
||||||
@@ -420,8 +417,9 @@ static void sliderChangeCallback(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
colors[i] = NULL;
|
colors[i] = NULL;
|
||||||
|
|
||||||
if (panel->gimage != None)
|
if (panel->gimage != None) {
|
||||||
XFreePixmap(WMScreenDisplay(scr), panel->gimage);
|
XFreePixmap(WMScreenDisplay(scr), panel->gimage);
|
||||||
|
}
|
||||||
|
|
||||||
image = RRenderMultiGradient(30, i * WMGetListItemHeight(panel->gcolL), colors, RVerticalGradient);
|
image = RRenderMultiGradient(30, i * WMGetListItemHeight(panel->gcolL), colors, RVerticalGradient);
|
||||||
RConvertImage(WMScreenRContext(scr), image, &panel->gimage);
|
RConvertImage(WMScreenRContext(scr), image, &panel->gimage);
|
||||||
@@ -434,7 +432,7 @@ static void sliderChangeCallback(WMWidget *w, void *data)
|
|||||||
updateGradButtons(panel);
|
updateGradButtons(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void paintGradListItem(WMList *lPtr, int index, Drawable d, char *text, int state, WMRect *rect)
|
static void paintGradListItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) WMGetHangedData(lPtr);
|
TexturePanel *panel = (TexturePanel *) WMGetHangedData(lPtr);
|
||||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||||
@@ -467,7 +465,7 @@ static void paintGradListItem(WMList *lPtr, int index, Drawable d, char *text, i
|
|||||||
WMReleaseColor(gray);
|
WMReleaseColor(gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gradAddCallback(WMWidget *w, void *data)
|
static void gradAddCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
@@ -491,7 +489,7 @@ static void gradAddCallback(WMWidget *w, void *data)
|
|||||||
WMSetButtonEnabled(panel->okB, WMGetListNumberOfRows(panel->gcolL) > 1);
|
WMSetButtonEnabled(panel->okB, WMGetListNumberOfRows(panel->gcolL) > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gradClickCallback(WMWidget *w, void *data)
|
static void gradClickCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
@@ -513,7 +511,7 @@ static void gradClickCallback(WMWidget *w, void *data)
|
|||||||
sliderChangeCallback(panel->gsatS, panel);
|
sliderChangeCallback(panel->gsatS, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gradDeleteCallback(WMWidget *w, void *data)
|
static void gradDeleteCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
@@ -547,7 +545,7 @@ static void gradDeleteCallback(WMWidget *w, void *data)
|
|||||||
|
|
||||||
/*************** Simple Gradient ***************/
|
/*************** Simple Gradient ***************/
|
||||||
|
|
||||||
static void colorWellObserver(void *self, WMNotification *n)
|
static void colorWellObserver(void *self, WMNotification * n)
|
||||||
{
|
{
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) n;
|
(void) n;
|
||||||
@@ -555,7 +553,7 @@ static void colorWellObserver(void *self, WMNotification *n)
|
|||||||
updateSGradButtons(self);
|
updateSGradButtons(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opaqChangeCallback(WMWidget *w, void *data)
|
static void opaqChangeCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
|
|
||||||
@@ -567,7 +565,7 @@ static void opaqChangeCallback(WMWidget *w, void *data)
|
|||||||
|
|
||||||
/****************** Image ******************/
|
/****************** Image ******************/
|
||||||
|
|
||||||
static void updateImage(TexturePanel *panel, const char *path)
|
static void updateImage(TexturePanel * panel, const char *path)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
RImage *image;
|
RImage *image;
|
||||||
@@ -615,12 +613,12 @@ static void updateImage(TexturePanel *panel, const char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void browseImageCallback(WMWidget *w, void *data)
|
static void browseImageCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
WMOpenPanel *opanel;
|
WMOpenPanel *opanel;
|
||||||
WMScreen *scr = WMWidgetScreen(w);
|
WMScreen *scr = WMWidgetScreen(w);
|
||||||
static char *ipath;
|
static char *ipath = NULL;
|
||||||
|
|
||||||
opanel = WMGetOpenPanel(scr);
|
opanel = WMGetOpenPanel(scr);
|
||||||
WMSetFilePanelCanChooseDirectories(opanel, False);
|
WMSetFilePanelCanChooseDirectories(opanel, False);
|
||||||
@@ -672,24 +670,25 @@ static void browseImageCallback(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void buttonCallback(WMWidget *w, void *data)
|
static void buttonCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
|
|
||||||
if (w == panel->okB)
|
if (w == panel->okB) {
|
||||||
(*panel->okAction) (panel->okData);
|
(*panel->okAction) (panel->okData);
|
||||||
else
|
} else {
|
||||||
(*panel->cancelAction) (panel->cancelData);
|
(*panel->cancelAction) (panel->cancelData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void changeTypeCallback(WMWidget *w, void *data)
|
static void changeTypeCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel *) data;
|
TexturePanel *panel = (TexturePanel *) data;
|
||||||
int newType;
|
int newType;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
newType = WMGetPopUpButtonSelectedItem(w);
|
newType = WMGetPopUpButtonSelectedItem(w);
|
||||||
if (newType < 0 || newType == panel->currentType)
|
if (newType == panel->currentType)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (panel->currentType >= 0) {
|
if (panel->currentType >= 0) {
|
||||||
@@ -732,7 +731,7 @@ static void changeTypeCallback(WMWidget *w, void *data)
|
|||||||
* Public functions
|
* Public functions
|
||||||
*--------------------------------------------------------------------------
|
*--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void ShowTexturePanel(TexturePanel *panel)
|
void ShowTexturePanel(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
||||||
Screen *scr = DefaultScreenOfDisplay(dpy);
|
Screen *scr = DefaultScreenOfDisplay(dpy);
|
||||||
@@ -743,24 +742,24 @@ void ShowTexturePanel(TexturePanel *panel)
|
|||||||
WMMapWidget(panel->win);
|
WMMapWidget(panel->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HideTexturePanel(TexturePanel *panel)
|
void HideTexturePanel(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
WMUnmapWidget(panel->win);
|
WMUnmapWidget(panel->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTexturePanelOkAction(TexturePanel *panel, WMCallback *action, void *clientData)
|
void SetTexturePanelOkAction(TexturePanel * panel, WMCallback * action, void *clientData)
|
||||||
{
|
{
|
||||||
panel->okAction = action;
|
panel->okAction = action;
|
||||||
panel->okData = clientData;
|
panel->okData = clientData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTexturePanelCancelAction(TexturePanel *panel, WMCallback *action, void *clientData)
|
void SetTexturePanelCancelAction(TexturePanel * panel, WMCallback * action, void *clientData)
|
||||||
{
|
{
|
||||||
panel->cancelAction = action;
|
panel->cancelAction = action;
|
||||||
panel->cancelData = clientData;
|
panel->cancelData = clientData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *texture)
|
void SetTexturePanelTexture(TexturePanel * panel, const char *name, WMPropList * texture)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
char *str, *type;
|
char *str, *type;
|
||||||
@@ -776,8 +775,9 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 0);
|
p = WMGetFromPLArray(texture, 0);
|
||||||
if (!p)
|
if (!p) {
|
||||||
goto bad_texture;
|
goto bad_texture;
|
||||||
|
}
|
||||||
type = WMGetFromPLString(p);
|
type = WMGetFromPLString(p);
|
||||||
|
|
||||||
/*............................................... */
|
/*............................................... */
|
||||||
@@ -786,10 +786,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
WMSetPopUpButtonSelectedItem(panel->typeP, TYPE_SOLID);
|
WMSetPopUpButtonSelectedItem(panel->typeP, TYPE_SOLID);
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 1);
|
p = WMGetFromPLArray(texture, 1);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
color = WMCreateNamedColor(scr, str, False);
|
color = WMCreateNamedColor(scr, str, False);
|
||||||
|
|
||||||
WMSetColorWellColor(panel->defcW, color);
|
WMSetColorWellColor(panel->defcW, color);
|
||||||
@@ -802,10 +803,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
WMSetPopUpButtonSelectedItem(panel->typeP, TYPE_SGRADIENT);
|
WMSetPopUpButtonSelectedItem(panel->typeP, TYPE_SGRADIENT);
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 1);
|
p = WMGetFromPLArray(texture, 1);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
color = WMCreateNamedColor(scr, str, False);
|
color = WMCreateNamedColor(scr, str, False);
|
||||||
|
|
||||||
WMSetColorWellColor(panel->tcol1W, color);
|
WMSetColorWellColor(panel->tcol1W, color);
|
||||||
@@ -813,10 +815,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 2);
|
p = WMGetFromPLArray(texture, 2);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
color = WMCreateNamedColor(scr, str, False);
|
color = WMCreateNamedColor(scr, str, False);
|
||||||
|
|
||||||
WMSetColorWellColor(panel->tcol2W, color);
|
WMSetColorWellColor(panel->tcol2W, color);
|
||||||
@@ -843,10 +846,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
WMSetSliderValue(panel->topaS, i);
|
WMSetSliderValue(panel->topaS, i);
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 3);
|
p = WMGetFromPLArray(texture, 3);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
color = WMCreateNamedColor(scr, str, False);
|
color = WMCreateNamedColor(scr, str, False);
|
||||||
|
|
||||||
WMSetColorWellColor(panel->tcol1W, color);
|
WMSetColorWellColor(panel->tcol1W, color);
|
||||||
@@ -854,10 +858,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 4);
|
p = WMGetFromPLArray(texture, 4);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
color = WMCreateNamedColor(scr, str, False);
|
color = WMCreateNamedColor(scr, str, False);
|
||||||
|
|
||||||
WMSetColorWellColor(panel->tcol2W, color);
|
WMSetColorWellColor(panel->tcol2W, color);
|
||||||
@@ -868,9 +873,9 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
|
|
||||||
if (panel->imageFile)
|
if (panel->imageFile)
|
||||||
wfree(panel->imageFile);
|
wfree(panel->imageFile);
|
||||||
panel->imageFile = wfindfileinarray(panel->pathList,
|
if ((panel->imageFile = wfindfileinarray(panel->pathList,
|
||||||
WMGetFromPLString(WMGetFromPLArray(texture, 1)));
|
WMGetFromPLString(WMGetFromPLArray(texture, 1)))) !=
|
||||||
if (panel->imageFile != NULL) {
|
NULL) {
|
||||||
|
|
||||||
panel->image = RLoadImage(WMScreenRContext(scr), panel->imageFile, 0);
|
panel->image = RLoadImage(WMScreenRContext(scr), panel->imageFile, 0);
|
||||||
updateTGradImage(panel);
|
updateTGradImage(panel);
|
||||||
@@ -894,10 +899,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
WMSetPopUpButtonSelectedItem(panel->typeP, TYPE_GRADIENT);
|
WMSetPopUpButtonSelectedItem(panel->typeP, TYPE_GRADIENT);
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, 1);
|
p = WMGetFromPLArray(texture, 1);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
color = WMCreateNamedColor(scr, str, False);
|
color = WMCreateNamedColor(scr, str, False);
|
||||||
|
|
||||||
WMSetColorWellColor(panel->defcW, color);
|
WMSetColorWellColor(panel->defcW, color);
|
||||||
@@ -909,10 +915,11 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
XColor xcolor;
|
XColor xcolor;
|
||||||
|
|
||||||
p = WMGetFromPLArray(texture, i);
|
p = WMGetFromPLArray(texture, i);
|
||||||
if (!p)
|
if (!p) {
|
||||||
str = "black";
|
str = "black";
|
||||||
else
|
} else {
|
||||||
str = WMGetFromPLString(p);
|
str = WMGetFromPLString(p);
|
||||||
|
}
|
||||||
|
|
||||||
XParseColor(WMScreenDisplay(scr), WMScreenRContext(scr)->cmap, str, &xcolor);
|
XParseColor(WMScreenDisplay(scr), WMScreenRContext(scr)->cmap, str, &xcolor);
|
||||||
|
|
||||||
@@ -946,9 +953,6 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
case 'M':
|
case 'M':
|
||||||
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_MAXIMIZE);
|
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_MAXIMIZE);
|
||||||
break;
|
break;
|
||||||
case 'F':
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_FILL);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
case 'T':
|
case 'T':
|
||||||
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_TILE);
|
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_TILE);
|
||||||
@@ -997,13 +1001,13 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *GetTexturePanelTextureName(TexturePanel *panel)
|
char *GetTexturePanelTextureName(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
return WMGetTextFieldText(panel->nameT);
|
return WMGetTextFieldText(panel->nameT);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WMPropList *GetTexturePanelTexture(TexturePanel *panel)
|
WMPropList *GetTexturePanelTexture(TexturePanel * panel)
|
||||||
{
|
{
|
||||||
WMPropList *prop = NULL;
|
WMPropList *prop = NULL;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
@@ -1034,10 +1038,6 @@ WMPropList *GetTexturePanelTexture(TexturePanel *panel)
|
|||||||
prop = WMCreatePLArray(WMCreatePLString("mpixmap"),
|
prop = WMCreatePLArray(WMCreatePLString("mpixmap"),
|
||||||
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
|
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
|
||||||
break;
|
break;
|
||||||
case PTYPE_FILL:
|
|
||||||
prop = WMCreatePLArray(WMCreatePLString("fpixmap"),
|
|
||||||
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
|
|
||||||
break;
|
|
||||||
case PTYPE_CENTER:
|
case PTYPE_CENTER:
|
||||||
prop = WMCreatePLArray(WMCreatePLString("cpixmap"),
|
prop = WMCreatePLArray(WMCreatePLString("cpixmap"),
|
||||||
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
|
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
|
||||||
@@ -1104,12 +1104,13 @@ WMPropList *GetTexturePanelTexture(TexturePanel *panel)
|
|||||||
color = WMGetColorWellColor(panel->defcW);
|
color = WMGetColorWellColor(panel->defcW);
|
||||||
str = WMGetColorRGBDescription(color);
|
str = WMGetColorRGBDescription(color);
|
||||||
|
|
||||||
if (WMGetButtonSelected(panel->dirdB))
|
if (WMGetButtonSelected(panel->dirdB)) {
|
||||||
prop = WMCreatePLArray(WMCreatePLString("mdgradient"), WMCreatePLString(str), NULL);
|
prop = WMCreatePLArray(WMCreatePLString("mdgradient"), WMCreatePLString(str), NULL);
|
||||||
else if (WMGetButtonSelected(panel->dirvB))
|
} else if (WMGetButtonSelected(panel->dirvB)) {
|
||||||
prop = WMCreatePLArray(WMCreatePLString("mvgradient"), WMCreatePLString(str), NULL);
|
prop = WMCreatePLArray(WMCreatePLString("mvgradient"), WMCreatePLString(str), NULL);
|
||||||
else
|
} else {
|
||||||
prop = WMCreatePLArray(WMCreatePLString("mhgradient"), WMCreatePLString(str), NULL);
|
prop = WMCreatePLArray(WMCreatePLString("mhgradient"), WMCreatePLString(str), NULL);
|
||||||
|
}
|
||||||
wfree(str);
|
wfree(str);
|
||||||
|
|
||||||
for (i = 0; i < WMGetListNumberOfRows(panel->gcolL); i++) {
|
for (i = 0; i < WMGetListNumberOfRows(panel->gcolL); i++) {
|
||||||
@@ -1130,12 +1131,12 @@ WMPropList *GetTexturePanelTexture(TexturePanel *panel)
|
|||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTexturePanelPixmapPath(TexturePanel *panel, WMPropList *array)
|
void SetTexturePanelPixmapPath(TexturePanel * panel, WMPropList * array)
|
||||||
{
|
{
|
||||||
panel->pathList = array;
|
panel->pathList = array;
|
||||||
}
|
}
|
||||||
|
|
||||||
TexturePanel *CreateTexturePanel(WMWindow *keyWindow)
|
TexturePanel *CreateTexturePanel(WMWindow * keyWindow)
|
||||||
/*CreateTexturePanel(WMScreen *scr)*/
|
/*CreateTexturePanel(WMScreen *scr)*/
|
||||||
{
|
{
|
||||||
TexturePanel *panel;
|
TexturePanel *panel;
|
||||||
@@ -1406,7 +1407,6 @@ TexturePanel *CreateTexturePanel(WMWindow *keyWindow)
|
|||||||
WMAddPopUpButtonItem(panel->arrP, _("Scale"));
|
WMAddPopUpButtonItem(panel->arrP, _("Scale"));
|
||||||
WMAddPopUpButtonItem(panel->arrP, _("Center"));
|
WMAddPopUpButtonItem(panel->arrP, _("Center"));
|
||||||
WMAddPopUpButtonItem(panel->arrP, _("Maximize"));
|
WMAddPopUpButtonItem(panel->arrP, _("Maximize"));
|
||||||
WMAddPopUpButtonItem(panel->arrP, _("Fill"));
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->arrP, 0);
|
WMSetPopUpButtonSelectedItem(panel->arrP, 0);
|
||||||
|
|
||||||
WMMapSubwidgets(panel->imageF);
|
WMMapSubwidgets(panel->imageF);
|
||||||
@@ -1475,7 +1475,7 @@ TexturePanel *CreateTexturePanel(WMWindow *keyWindow)
|
|||||||
|
|
||||||
char *ProgName = "test";
|
char *ProgName = "test";
|
||||||
|
|
||||||
void testOKButton(WMWidget *self, void *data)
|
void testOKButton(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
char *test;
|
char *test;
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
@@ -1504,13 +1504,13 @@ void testOKButton(WMWidget *self, void *data)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void testCancelButton(WMWidget *self, void *data)
|
void testCancelButton(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
wwarning("Exiting test....");
|
wwarning("Exiting test....");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wAbort(void)
|
void wAbort()
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-11
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <X11/Xatom.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_STDNORETURN
|
#ifdef HAVE_STDNORETURN
|
||||||
#include <stdnoreturn.h>
|
#include <stdnoreturn.h>
|
||||||
@@ -517,9 +516,6 @@ void Initialize(WMScreen * scr)
|
|||||||
char **list;
|
char **list;
|
||||||
int i;
|
int i;
|
||||||
char *path;
|
char *path;
|
||||||
long pid;
|
|
||||||
Atom net_wm_pid;
|
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
|
||||||
|
|
||||||
list = RSupportedFileFormats();
|
list = RSupportedFileFormats();
|
||||||
for (i = 0; list[i] != NULL; i++) {
|
for (i = 0; list[i] != NULL; i++) {
|
||||||
@@ -551,11 +547,6 @@ void Initialize(WMScreen * scr)
|
|||||||
|
|
||||||
WMRealizeWidget(WPrefs.win);
|
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));
|
WMSetWindowMiniwindowImage(WPrefs.win, WMGetApplicationIconImage(scr));
|
||||||
|
|
||||||
WMMapWidget(WPrefs.win);
|
WMMapWidget(WPrefs.win);
|
||||||
@@ -584,7 +575,6 @@ void Initialize(WMScreen * scr)
|
|||||||
InitKeyboardSettings(WPrefs.banner);
|
InitKeyboardSettings(WPrefs.banner);
|
||||||
#endif
|
#endif
|
||||||
InitKeyboardShortcuts(WPrefs.banner);
|
InitKeyboardShortcuts(WPrefs.banner);
|
||||||
InitHotCornerShortcuts(WPrefs.banner);
|
|
||||||
InitMouseSettings(WPrefs.banner);
|
InitMouseSettings(WPrefs.banner);
|
||||||
|
|
||||||
InitAppearance(WPrefs.banner);
|
InitAppearance(WPrefs.banner);
|
||||||
@@ -612,7 +602,7 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
|
|||||||
char *path;
|
char *path;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
char mbuf[1069]; /* Size of buffer and extra characters for the sprintfs */
|
char mbuf[1024];
|
||||||
int v1, v2, v3;
|
int v1, v2, v3;
|
||||||
|
|
||||||
path = wdefaultspathfordomain("WindowMaker");
|
path = wdefaultspathfordomain("WindowMaker");
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
[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;
|
|
||||||
+1
-2
@@ -33,7 +33,6 @@
|
|||||||
#include <wraster.h>
|
#include <wraster.h>
|
||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
#include <WINGs/WINGsP.h>
|
|
||||||
|
|
||||||
/* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
|
/* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
|
||||||
#include "../src/wconfig.h"
|
#include "../src/wconfig.h"
|
||||||
@@ -55,6 +54,7 @@
|
|||||||
/****/
|
/****/
|
||||||
|
|
||||||
extern char *NOptionValueChanged;
|
extern char *NOptionValueChanged;
|
||||||
|
extern Bool xext_xkb_supported;
|
||||||
|
|
||||||
typedef struct _Panel Panel;
|
typedef struct _Panel Panel;
|
||||||
|
|
||||||
@@ -155,7 +155,6 @@ Panel *InitDocks(WMWidget *parent);
|
|||||||
Panel *InitExpert(WMWidget *parent);
|
Panel *InitExpert(WMWidget *parent);
|
||||||
Panel *InitFocus(WMWidget *parent);
|
Panel *InitFocus(WMWidget *parent);
|
||||||
Panel *InitFontSimple(WMWidget *parent);
|
Panel *InitFontSimple(WMWidget *parent);
|
||||||
Panel *InitHotCornerShortcuts(WMWidget *parent);
|
|
||||||
Panel *InitIcons(WMWidget *parent);
|
Panel *InitIcons(WMWidget *parent);
|
||||||
Panel *InitKeyboardShortcuts(WMWidget *parent);
|
Panel *InitKeyboardShortcuts(WMWidget *parent);
|
||||||
Panel *InitMenu(WMWidget *parent);
|
Panel *InitMenu(WMWidget *parent);
|
||||||
|
|||||||
@@ -207,15 +207,12 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
static void storeData(_Panel * panel)
|
static void storeData(_Panel * panel)
|
||||||
{
|
{
|
||||||
int tmp = WMGetPopUpButtonSelectedItem(panel->posP);
|
|
||||||
|
|
||||||
if (tmp < 0)
|
|
||||||
return;
|
|
||||||
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
||||||
|
|
||||||
SetStringForKey(WSNamePositions[tmp], "WorkspaceNameDisplayPosition");
|
SetStringForKey(WSNamePositions[WMGetPopUpButtonSelectedItem(panel->posP)],
|
||||||
|
"WorkspaceNameDisplayPosition");
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel *InitWorkspace(WMWidget *parent)
|
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 };
|
static XColor back = { 0, 0xffff, 0xffff, 0xffff, DoRed | DoGreen | DoBlue, 0 };
|
||||||
Display *dpy = W_VIEW_DISPLAY(menu->view);
|
Display *dpy = W_VIEW_DISPLAY(menu->view);
|
||||||
WMScreen *scr = W_VIEW_SCREEN(menu->view);
|
WMScreen *scr = W_VIEW_SCREEN(menu->view);
|
||||||
int x = 0, y = 0;
|
int x, y;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
Bool done = False;
|
Bool done = False;
|
||||||
Window blaw;
|
Window blaw;
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *NOptionValueChanged = "NOptionValueChanged";
|
char *NOptionValueChanged = "NOptionValueChanged";
|
||||||
|
Bool xext_xkb_supported = False;
|
||||||
|
|
||||||
|
|
||||||
#define MAX_DEATHS 64
|
#define MAX_DEATHS 64
|
||||||
|
|
||||||
@@ -64,6 +66,19 @@ static void print_help(const char *progname)
|
|||||||
puts(_(" --help print this message and exit"));
|
puts(_(" --help print this message and exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
static RETSIGTYPE handleDeadChild(int sig)
|
||||||
|
{
|
||||||
|
pid_t pid;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
pid = waitpid(-1, &status, WNOHANG);
|
||||||
|
if (pid > 0) {
|
||||||
|
DeadChildren[DeadChildrenCount++] = pid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void AddDeadChildHandler(pid_t pid, void (*handler) (void *), void *data)
|
void AddDeadChildHandler(pid_t pid, void (*handler) (void *), void *data)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -149,12 +164,17 @@ int main(int argc, char **argv)
|
|||||||
wfatal(_("could not open display %s"), XDisplayName(display_name));
|
wfatal(_("could not open display %s"), XDisplayName(display_name));
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
|
XSynchronize(dpy, 1);
|
||||||
|
#endif
|
||||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||||
if (!scr) {
|
if (!scr) {
|
||||||
wfatal(_("could not initialize application"));
|
wfatal(_("could not initialize application"));
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xext_xkb_supported = XkbQueryExtension(dpy, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
WMPLSetCaseSensitive(False);
|
WMPLSetCaseSensitive(False);
|
||||||
|
|
||||||
Initialize(scr);
|
Initialize(scr);
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ CATALOGS = @WPREFSMOFILES@
|
|||||||
CLEANFILES = $(DOMAIN).pot $(CATALOGS)
|
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 \
|
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 sr.po tr.po uk.po zh_CN.po \
|
it.po ja.po ko.po nl.po pt.po ru.po sk.po uk.po zh_CN.po zh_TW.po
|
||||||
zh_TW.po
|
|
||||||
|
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
$(top_srcdir)/WPrefs.app/Appearance.c \
|
$(top_srcdir)/WPrefs.app/Appearance.c \
|
||||||
@@ -15,7 +14,6 @@ POTFILES = \
|
|||||||
$(top_srcdir)/WPrefs.app/Expert.c \
|
$(top_srcdir)/WPrefs.app/Expert.c \
|
||||||
$(top_srcdir)/WPrefs.app/Focus.c \
|
$(top_srcdir)/WPrefs.app/Focus.c \
|
||||||
$(top_srcdir)/WPrefs.app/FontSimple.c \
|
$(top_srcdir)/WPrefs.app/FontSimple.c \
|
||||||
$(top_srcdir)/WPrefs.app/HotCornerShortcuts.c \
|
|
||||||
$(top_srcdir)/WPrefs.app/Icons.c \
|
$(top_srcdir)/WPrefs.app/Icons.c \
|
||||||
$(top_srcdir)/WPrefs.app/KeyboardShortcuts.c \
|
$(top_srcdir)/WPrefs.app/KeyboardShortcuts.c \
|
||||||
$(top_srcdir)/WPrefs.app/Menu.c \
|
$(top_srcdir)/WPrefs.app/Menu.c \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
File Language Current Maintainer
|
File Language Current Maintainer
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
pt.po Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
|
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>
|
fr.po French Bastien NOCERA <hadess@writeme.com>
|
||||||
Hadess <hadess@infonie.fr>
|
Hadess <hadess@infonie.fr>
|
||||||
Antoine Hulin <antoine@origan.fdn.org>
|
Antoine Hulin <antoine@origan.fdn.org>
|
||||||
@@ -23,7 +23,6 @@ bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
|
|||||||
Anton Zinoviev <zinoviev@debian.org>
|
Anton Zinoviev <zinoviev@debian.org>
|
||||||
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
||||||
et.po Estonian Ivar Smolin <okul@linux.ee>
|
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>
|
nl.po Dutch Alwin <translations@ziggo.nl>
|
||||||
fy.po Frisian Alwin <translations@ziggo.nl>
|
fy.po Frisian Alwin <translations@ziggo.nl>
|
||||||
sr.po Serbian Strahinya Radich <sr@strahinja.org>
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2001-04-18 23:22+03:00\n"
|
"PO-Revision-Date: 2001-04-18 23:22+03:00\n"
|
||||||
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
||||||
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
||||||
"Language: bg\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2003-09-16 23:15+0200\n"
|
"PO-Revision-Date: 2003-09-16 23:15+0200\n"
|
||||||
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
||||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
"Language: ca\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2001-10-14 21:07+0000\n"
|
"PO-Revision-Date: 2001-10-14 21:07+0000\n"
|
||||||
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||||
"Language-Team: czech <cs@li.org>\n"
|
"Language-Team: czech <cs@li.org>\n"
|
||||||
"Language: cs\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: unknown\n"
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
|
|||||||
+1
-2
@@ -18,7 +18,6 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2010-02-02 10:49+0100\n"
|
"PO-Revision-Date: 2010-02-02 10:49+0100\n"
|
||||||
"Last-Translator: Carlos R. Mafra <crmafra@gmail.com>\n"
|
"Last-Translator: Carlos R. Mafra <crmafra@gmail.com>\n"
|
||||||
"Language-Team: German <>\n"
|
"Language-Team: German <>\n"
|
||||||
"Language: de\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -820,7 +819,7 @@ msgstr "Clip in den Vor-/Hintergrund"
|
|||||||
|
|
||||||
#: ../../WPrefs.app/KeyboardShortcuts.c:518
|
#: ../../WPrefs.app/KeyboardShortcuts.c:518
|
||||||
msgid "Toggle keyboard language"
|
msgid "Toggle keyboard language"
|
||||||
msgstr "Tastaturbelegung ändern"
|
msgstr "Tastatursbelegung ändern"
|
||||||
|
|
||||||
#: ../../WPrefs.app/KeyboardShortcuts.c:532
|
#: ../../WPrefs.app/KeyboardShortcuts.c:532
|
||||||
msgid "Shortcut"
|
msgid "Shortcut"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user