1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-30 12:34:07 +02:00

Compare commits

..

3 Commits

Author SHA1 Message Date
gryf 02d2d0f2e3 Additional function for checking head
Added function for checking head of certain location. This function is
used for determinig head bounduary.
2017-01-16 21:25:17 +01:00
gryf 58561dc08a Fix for unmaximize.
New way for traverse windows introduced an regression for maximize
toggle from keyboard. Bring the maximize toggle back.
2017-01-16 21:05:45 +01:00
gryf 54aae6c062 Enabling moving window in cycles.
WindowMaker have a Maximus feature expanded by ability to resize windows
to half screen (horizontally and vertically). Although, there was no way
to move windows between different heads (while screen is spanned between
different monitors - heads - if there was no xinerama used). This patch
enables possibility for moving windows between states. Assuming we have
a window on first head, maximize left would make the window occupy left
half of the screen. Assuming we have another head right of the first
head, following scenario will be possible:

- maximize right will make window occupy entire free space (just like
  ordinary maximizing will do)
- another maximize right will make window be maximized half right of the
  first screen
- another maximize right will make window be maximized half left on
  second screen
- another maximize right will make window be maximized on second screen
- another maximize right will make window be maximized half right on
  second screen
- another maximize right will make no effect

So it will cycle between half screen/fullscreen making window to travel
from left to right. Same goes for opposite direction.
2017-01-15 21:07:07 +01:00
516 changed files with 12491 additions and 30308 deletions
-45
View File
@@ -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
+2 -2
View File
@@ -210,7 +210,7 @@ various fixes/enhancements to WINGs
Yoav Yerushalmi <yoav@mit.edu> Yoav Yerushalmi <yoav@mit.edu>
Fixed -visualid for screens that can do multiple depths. Another fix in Fixed -visualid for screens that can do multiple depths. Another fix in
libproplist. Chooses best depth in screen. libproplist. Chooses best depth in screen.
FRBall <frb@umr.edu> FRBall <frb@umr.edu>
@@ -218,7 +218,7 @@ dgradient fix
"]d" <id@windowmaker.info> "]d" <id@windowmaker.info>
Window list menu miniaturized/hidden hints, XDE support, XKB lock Window list menu miniaturized/hidden hints, XDE support, XKB lock
language status, WINGs enhancements, bug fixes, window commands menu language status, WINGs enhancements, bug fixes, window commands menu
enhancement, window move/resize by keyboard. GNUstepGlow.tiff icon, enhancement, window move/resize by keyboard. GNUstepGlow.tiff icon,
WINGs color panel, Appearance section icon(s) WINGs color panel, Appearance section icon(s)
+5 -5
View File
@@ -3,8 +3,8 @@
--------------------------- ---------------------------
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
@@ -16,8 +16,8 @@ wmaker-dev@googlegroups.com Please, USE THIS FORM!!!
[ ] crashed [ ] crashed
[ ] configuration option does not work [ ] configuration option does not work
[ ] weird behavior [ ] weird behavior
[ ] cosmetic [ ] cosmetic
[ ] some problem with WPrefs [ ] some problem with WPrefs
[ ] others: ................................... [ ] others: ...................................
2. Detailed description of what happened: 2. Detailed description of what happened:
@@ -28,7 +28,7 @@ wmaker-dev@googlegroups.com Please, USE THIS FORM!!!
4. Configure time options you specified: 4. Configure time options you specified:
[ ] --enable-kanji [ ] --enable-kanji
[ ] --disable-shape [ ] --disable-shape
[ ] --enable-single-icon [ ] --enable-single-icon
[ ] --enable-modelock [ ] --enable-modelock
[ ] Others: ....................... [ ] Others: .......................
+2 -2
View File
@@ -1,5 +1,5 @@
Newly added Newly added
- after a crash, wmaker will forget the hidden state of the apps and just - after a crash, wmaker will forget the hidden state of the apps and just
show their windows minimized. normal restart is unaffected show their windows minimized. normal restart is unaffected
- after a crash, wmaker will completely mess the window's saved geometries - after a crash, wmaker will completely mess the window's saved geometries
and maximizing will have weird results. restart is unaffected and maximizing will have weird results. restart is unaffected
@@ -16,7 +16,7 @@ Newly added
in the session/allow docking it if yes. in the session/allow docking it if yes.
- the SHELL environment variable support in the apps menu was removed - the SHELL environment variable support in the apps menu was removed
because of a problem with tcsh. If ~/.tcshrc contains "stty erase ^H", because of a problem with tcsh. If ~/.tcshrc contains "stty erase ^H",
it will block and the cmd will not be executed. it will block and the cmd will not be executed.
- mouse grab being done in client window (in wWindowResetMouseGrabs()) - mouse grab being done in client window (in wWindowResetMouseGrabs())
instead of the frame window. If grab is done in frame, titlebar buttons instead of the frame window. If grab is done in frame, titlebar buttons
dont work well dont work well
+1 -1
View File
@@ -51,4 +51,4 @@ of this license document, but changing it is not allowed.
Ok, the purpose of this license is simple Ok, the purpose of this license is simple
and you just and you just
DO WHAT THE FUCK YOU WANT TO. DO WHAT THE FUCK YOU WANT TO.
+67 -204
View File
@@ -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>)
@@ -2810,7 +2673,7 @@ Changes since version 0.92.0:
platforms with a recent pkg-config (debian unstable/sid for one) platforms with a recent pkg-config (debian unstable/sid for one)
- Fixed buggy handling of UTF8 characters in textfields in WINGs. - Fixed buggy handling of UTF8 characters in textfields in WINGs.
(Stanislav Maslovski <stanislav.maslovski@gmail.com>) (Stanislav Maslovski <stanislav.maslovski@gmail.com>)
- Fixed segfault in WPrefs when some font description is missing from the - Fixed segfault in WPrefs when some font description is missing from the
configuration file (Stanislav Maslovski <stanislav.maslovski@gmail.com>) configuration file (Stanislav Maslovski <stanislav.maslovski@gmail.com>)
- Removed WINGs' dependency on rgb.txt (from X11) and issues with locating it - Removed WINGs' dependency on rgb.txt (from X11) and issues with locating it
on the filesystem for different systems/distributions. on the filesystem for different systems/distributions.
@@ -2891,11 +2754,11 @@ Changes since version 0.80.2:
- Removed obsoleted acconfig.h and implemented its functionality using - Removed obsoleted acconfig.h and implemented its functionality using
AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends. AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
This will definitely enforce the need to use autoconf 2.5x This will definitely enforce the need to use autoconf 2.5x
- Added Xft2 support to WINGs, for rendering antialiased fonts with - Added Xft2 support to WINGs, for rendering antialiased fonts with
transparency. Details in WINGs/ChangeLog. transparency. Details in WINGs/ChangeLog.
- Fixed problem with long, preset workspace names (Wanderlei Antonio Cavassin - Fixed problem with long, preset workspace names (Wanderlei Antonio Cavassin
<cavassin@conectiva.com.br>) <cavassin@conectiva.com.br>)
- Added kinput2 bug workaround to stock WMWindowAttributes (Seiichi SATO - Added kinput2 bug workaround to stock WMWindowAttributes (Seiichi SATO
<sato@cvs-net.co.jp>) <sato@cvs-net.co.jp>)
- Added Belarusian translation (Ihar Viarheichyk <iverg@mail.ru>) - Added Belarusian translation (Ihar Viarheichyk <iverg@mail.ru>)
- Fixed wrlib not to load braindead images with 0 sized width or height - Fixed wrlib not to load braindead images with 0 sized width or height
@@ -2966,7 +2829,7 @@ Changes since version 0.80.2:
- Made maximize behave differently with keyboard/mouse for xinerama - Made maximize behave differently with keyboard/mouse for xinerama
(Peter Zijlstra <a.p.zijlstra@chello.nl>) (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- A few leftover xinerama fixes (Peter Zijlstra <a.p.zijlstra@chello.nl>) - A few leftover xinerama fixes (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Extended the 'strut' to multiple heads - Extended the 'strut' to multiple heads
(Peter Zijlstra <a.p.zijlstra@chello.nl>) (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Icon placement now takes into account the new xinerama extended 'strut' - Icon placement now takes into account the new xinerama extended 'strut'
(Peter Zijlstra <a.p.zijlstra@chello.nl>) (Peter Zijlstra <a.p.zijlstra@chello.nl>)
@@ -3012,7 +2875,7 @@ Changes since version 0.80.2:
by Peter Zijlstra <a.p.zijlstra@chello.nl>) by Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate - Applied patch to enhance the Virtual Desktop behaviour, and to integrate
it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>) it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied a few xinerama and placement fixes (Peter Zijlstra - Applied a few xinerama and placement fixes (Peter Zijlstra
<a.p.zijlstra@chello.nl>) <a.p.zijlstra@chello.nl>)
- Fixed memory leak in dock code. - Fixed memory leak in dock code.
- Fixed and enhanced the text wrapping in WINGs. - Fixed and enhanced the text wrapping in WINGs.
@@ -3036,7 +2899,7 @@ Changes since version 0.80.2:
- MacOS X style window switching panel (navigate through windows with Alt-Tab - MacOS X style window switching panel (navigate through windows with Alt-Tab
or arrow keys) or arrow keys)
- Added support for NET_WM_NAME/NET_WM_ICON_NAME - Added support for NET_WM_NAME/NET_WM_ICON_NAME
- Moved out font name conversion code from getstyle/setstyle/convertfonts and - Moved out font name conversion code from getstyle/setstyle/convertfonts and
made it support fontsets made it support fontsets
- Converted all menu and po files to UTF-8 - Converted all menu and po files to UTF-8
- Updated de.po (Thomas Otto <3.1415926535897932384626433832@gmx.net>) - Updated de.po (Thomas Otto <3.1415926535897932384626433832@gmx.net>)
@@ -3059,8 +2922,8 @@ Changes since version 0.80.0:
WMState.<number> file on multihead system. WMState.<number> file on multihead system.
- Fixed problem with keyboard shortcuts executed an every screen for - Fixed problem with keyboard shortcuts executed an every screen for
multihead systems. multihead systems.
- Updated traditional chinese translations - Updated traditional chinese translations
- Fixed buglet in non-caching rootmenu option - Fixed buglet in non-caching rootmenu option
("John H. Robinson, IV" <jhriv@ucsd.edu>) ("John H. Robinson, IV" <jhriv@ucsd.edu>)
- Added Malay translation - Added Malay translation
- Fixed problem with kcalc not having a miniaturize button. - Fixed problem with kcalc not having a miniaturize button.
@@ -3081,7 +2944,7 @@ Changes since version 0.80.0:
- Added Greek (el) language pixmap (Michalis Kabrianis <Michalis@bigfoot.com>) - Added Greek (el) language pixmap (Michalis Kabrianis <Michalis@bigfoot.com>)
- Fixes icons being reduced twice when icon size != 64x64 - Fixes icons being reduced twice when icon size != 64x64
Eduardo Pereira Habkost <ehabkost@conectiva.com.br> Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
- Fixed a bug that crashed wmaker when selecting the "Start alternate window - Fixed a bug that crashed wmaker when selecting the "Start alternate window
manager" option in the crashing dialog panel. manager" option in the crashing dialog panel.
- Window Maker will now use the WINDOWMAKER_ALT_WM environment variable (if - Window Maker will now use the WINDOWMAKER_ALT_WM environment variable (if
it is defined) to overwrite the default hardcoded fallback window manager. it is defined) to overwrite the default hardcoded fallback window manager.
@@ -3090,7 +2953,7 @@ Changes since version 0.80.0:
"Keep on Top" option is active. "Keep on Top" option is active.
- Added ability to browse for files/directories in the WPrefs menu editor. - Added ability to browse for files/directories in the WPrefs menu editor.
- Added Czech translations of documentation (Jiri Hnidek <Jiri.Hnidek@vslib.cz>) - Added Czech translations of documentation (Jiri Hnidek <Jiri.Hnidek@vslib.cz>)
- Fixed segfault with incomplete WM_CLASS specifications. - Fixed segfault with incomplete WM_CLASS specifications.
- Fixed a bug about arranging subviews in a WMBox after removing a subview - Fixed a bug about arranging subviews in a WMBox after removing a subview
and a memleak occuring in the same situation. and a memleak occuring in the same situation.
- Fixed a bug in wdread - Fixed a bug in wdread
@@ -3102,7 +2965,7 @@ Changes since version 0.80.0:
Changes since version 0.70.0: Changes since version 0.70.0:
............................. .............................
- Disabled window birth animation by default (while it was ok with normal - Disabled window birth animation by default (while it was ok with normal
windows, it was very annoying with menus editing in WPrefs.app) windows, it was very annoying with menus editing in WPrefs.app)
- Added ability to shade/unshade a window using the mouse wheel. - Added ability to shade/unshade a window using the mouse wheel.
- Fixed compilation for systems that required -lintl for WINGs - Fixed compilation for systems that required -lintl for WINGs
@@ -3119,7 +2982,7 @@ Changes since version 0.70.0:
saving dock/clip/session information on exit. saving dock/clip/session information on exit.
- Added an internal strcasecmp() to WINGs (only on systems where's not present) - Added an internal strcasecmp() to WINGs (only on systems where's not present)
- Deminiaturizing a window that is also shaded, will perform an unshade too. - Deminiaturizing a window that is also shaded, will perform an unshade too.
(Note that this only applies to deminiaturizing shaded windows. Unhiding (Note that this only applies to deminiaturizing shaded windows. Unhiding
an application will keep the shaded/unshaded state of windows.) an application will keep the shaded/unshaded state of windows.)
- Removed compile time option for definable cursors and made them available by - Removed compile time option for definable cursors and made them available by
default. default.
@@ -3127,7 +2990,7 @@ Changes since version 0.70.0:
will unhide the application. will unhide the application.
- Added || pipe menu for generating non-cached menus - Added || pipe menu for generating non-cached menus
- Removed the collapse appicons thing. - Removed the collapse appicons thing.
- Added real appicon sharing (apps of the same kind will have a single shared - Added real appicon sharing (apps of the same kind will have a single shared
appicon). appicon).
- Fixed user and global defaults domain merging to preserve values present in - Fixed user and global defaults domain merging to preserve values present in
global but not in user, in sub-dictionaries. global but not in user, in sub-dictionaries.
@@ -3158,7 +3021,7 @@ Changes since version 0.65.1:
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>) (Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
- fixed crash with broken apps that set null WM_CLASS - fixed crash with broken apps that set null WM_CLASS
- fixed crash when with gnome panel and multi-screens, some menu - fixed crash when with gnome panel and multi-screens, some menu
updates and applied various other patches from updates and applied various other patches from
(Crutcher Dunnavant <crutcher@redhat.com>) (Crutcher Dunnavant <crutcher@redhat.com>)
- po file fixes (Crutcher Dunnavant <crutcher@redhat.com>) - po file fixes (Crutcher Dunnavant <crutcher@redhat.com>)
- replaced I18N_MB with I18N in one place in src/wconfig.h.in - replaced I18N_MB with I18N in one place in src/wconfig.h.in
@@ -3187,7 +3050,7 @@ Changes since version 0.65.1:
More details about this can be found in WINGs/ChangeLog and WINGs/NEWS. More details about this can be found in WINGs/ChangeLog and WINGs/NEWS.
Say bye, bye libPropList =) Say bye, bye libPropList =)
- rewrote all Window Maker code to use the new WINGs based proplist functions. - rewrote all Window Maker code to use the new WINGs based proplist functions.
- fixed a few compilation warnings and a problem caused by an uninitialized - fixed a few compilation warnings and a problem caused by an uninitialized
variable. variable.
@@ -3229,7 +3092,7 @@ Changes since version 0.64.0:
- use Hermes in wrlib - use Hermes in wrlib
- removed MOUSE_WS_WHEEL #defines - removed MOUSE_WS_WHEEL #defines
- fixed bug with multibyte text on libc5 systems (Osamu Ajiki <osam-a@astroarts.co.jp>) - fixed bug with multibyte text on libc5 systems (Osamu Ajiki <osam-a@astroarts.co.jp>)
- fixed race conditions on signal handlers - fixed race conditions on signal handlers
- SIGINT will gently exit, SIGTERM will not be handled - SIGINT will gently exit, SIGTERM will not be handled
- When Window Maker calls wmsetbg to set the background, it will consider the - When Window Maker calls wmsetbg to set the background, it will consider the
value of the DisableDithering option and pass the right switch to wmsetbg. value of the DisableDithering option and pass the right switch to wmsetbg.
@@ -3240,7 +3103,7 @@ Changes since version 0.64.0:
desktop level. desktop level.
- Fixed incorrect parsing of display and screen number from $DISPLAY. - Fixed incorrect parsing of display and screen number from $DISPLAY.
- Organized the inspector panel a bit better. - Organized the inspector panel a bit better.
- Replaced bags with arrays wherever appropriate. This will improve - Replaced bags with arrays wherever appropriate. This will improve
performance a bit. performance a bit.
- Made the Gnome tasklist skip the windows with the "Skip window list" flag - Made the Gnome tasklist skip the windows with the "Skip window list" flag
enabled. (Bastien Nocera <hadess@hadess.net>) enabled. (Bastien Nocera <hadess@hadess.net>)
@@ -3258,11 +3121,11 @@ Changes since version 0.64.0:
- Added retain/release mechanism for RImages. RDestroyImage() has become - Added retain/release mechanism for RImages. RDestroyImage() has become
obsolete. More about this can be found in wrlib/Changelog and wrlib/NEWS. obsolete. More about this can be found in wrlib/Changelog and wrlib/NEWS.
- Small API change in WINGs to allow images with alpha blending set as the - Small API change in WINGs to allow images with alpha blending set as the
application icons be shown correctly. More about this in WINGs/Changelog application icons be shown correctly. More about this in WINGs/Changelog
and WINGs/NEWS. and WINGs/NEWS.
- Made images with alpha blending be shown correctly in the panels and the - Made images with alpha blending be shown correctly in the panels and the
icon chooser. icon chooser.
- The icon image set to be shown in panels ("Logo.WMPanel") will be - The icon image set to be shown in panels ("Logo.WMPanel") will be
automatically updated if its entry in WMWindowAttributes changes (without automatically updated if its entry in WMWindowAttributes changes (without
a need to restart as until now). a need to restart as until now).
- Fixed a bug in the icon chooser dialog that made the selected icon look - Fixed a bug in the icon chooser dialog that made the selected icon look
@@ -3282,7 +3145,7 @@ Changes since version 0.64.0:
Changes since version 0.63.1: Changes since version 0.63.1:
............................. .............................
- fixed messup in get-{wings,wutil,wraster}-flags - fixed messup in get-{wings,wutil,wraster}-flags
- fixed #wmdatadir# substitution in wmaker.inst - fixed #wmdatadir# substitution in wmaker.inst
(Seiichi SATO <sato@cvs-net.co.jp>) (Seiichi SATO <sato@cvs-net.co.jp>)
- Removed spurious focus disabling for GNUstep applications - but retain - Removed spurious focus disabling for GNUstep applications - but retain
code that lets GNUstep apps control their window titlebar. code that lets GNUstep apps control their window titlebar.
@@ -3323,7 +3186,7 @@ Changes since version 0.62.1:
- added wmagnify utility - added wmagnify utility
- changed behaviour of control/shift double click on titlebar for maximize - changed behaviour of control/shift double click on titlebar for maximize
- updated getstyle to account for extendspace options - updated getstyle to account for extendspace options
- fixed weird color bug in jpeg loader - fixed weird color bug in jpeg loader
(Alban Hertroys <dalroi@wit401310.student.utwente.nl>) (Alban Hertroys <dalroi@wit401310.student.utwente.nl>)
- improved and simplified fonts configuration for multibyte languages - improved and simplified fonts configuration for multibyte languages
(Tomohiro KUBOTA <kubota@debian.or.jp>) (Tomohiro KUBOTA <kubota@debian.or.jp>)
@@ -3337,7 +3200,7 @@ Changes since version 0.62.1:
- fixed bug with incorrect window placement using automatic placement, while - fixed bug with incorrect window placement using automatic placement, while
there were shaded windows on other workspaces there were shaded windows on other workspaces
- fixed some buffer overflow issues in WINGs - fixed some buffer overflow issues in WINGs
- fixed bug with WPrefs.app not selecting the menu appearance options after - fixed bug with WPrefs.app not selecting the menu appearance options after
startup. startup.
- replaced free() with wfree() wherever appropriate - replaced free() with wfree() wherever appropriate
- fixed some memory leaks generated by wstrappend() - fixed some memory leaks generated by wstrappend()
@@ -3401,7 +3264,7 @@ Changes since version 0.61.1:
- changed semantics of GNUstep window attribute hints - changed semantics of GNUstep window attribute hints
- added get-wings-flags and get-wutil-flags with the same purpose as - added get-wings-flags and get-wutil-flags with the same purpose as
get-wraster-flags, but for compiling and linking with WINGs/WUtil get-wraster-flags, but for compiling and linking with WINGs/WUtil
- fixed bug handling non-string values given to string valued options in - fixed bug handling non-string values given to string valued options in
defaults.c defaults.c
- fixed colormap_window crash bug (appears when launching some apps from dock, - fixed colormap_window crash bug (appears when launching some apps from dock,
or removing apps from gnome panel etc) or removing apps from gnome panel etc)
@@ -3420,7 +3283,7 @@ Changes since version 0.61.1:
- added Jim Knoble <jmknoble@pobox.com>'s cursor thing patch - added Jim Knoble <jmknoble@pobox.com>'s cursor thing patch
- fixed lock of wmaker when clicking on menu multiple times - fixed lock of wmaker when clicking on menu multiple times
- made transients appear near their owner - made transients appear near their owner
- fixed crash bug with broken java implementations (Miguel Covarrubias - fixed crash bug with broken java implementations (Miguel Covarrubias
<mcovarr@tigr.org>) <mcovarr@tigr.org>)
- made Revert on attributes panel apply the reverted changes immediately - made Revert on attributes panel apply the reverted changes immediately
to avoid inconsistent internal state to avoid inconsistent internal state
@@ -3438,7 +3301,7 @@ Changes since version 0.61.0:
- fixed OPEN_MENU - fixed OPEN_MENU
- fixed crash when moving a shaded window with keyboard - fixed crash when moving a shaded window with keyboard
- fixed problem with window shortcut assignment from the menu - fixed problem with window shortcut assignment from the menu
- fixed problem with fonts in WINGs (Masahide -mac- NODA - fixed problem with fonts in WINGs (Masahide -mac- NODA
<mac@flab.fujitsu.co.jp>) <mac@flab.fujitsu.co.jp>)
- fixed multihead bugs (Morten Bøgeskov" <mb@dbc.dk>) - fixed multihead bugs (Morten Bøgeskov" <mb@dbc.dk>)
- fixed crashing bug when saving session information. - fixed crashing bug when saving session information.
@@ -3465,7 +3328,7 @@ Changes since version 0.60.0:
- added missing kbd shortcut definitions for window shortcuts - added missing kbd shortcut definitions for window shortcuts
(Michael Smith <mjsmith@spirit.com.au>) (Michael Smith <mjsmith@spirit.com.au>)
- fixed floppy button layout in filepanel (Matthew Ashton <mrashton@home.com>) - fixed floppy button layout in filepanel (Matthew Ashton <mrashton@home.com>)
- fixed bug with documentedited close button (Felipe A. Rodriguez - fixed bug with documentedited close button (Felipe A. Rodriguez
<farz@mindspring.com>) <farz@mindspring.com>)
- fixed some buffer overflows - fixed some buffer overflows
- fixed some problem with the alpha - fixed some problem with the alpha
@@ -3481,7 +3344,7 @@ Changes since version 0.60.0:
- removed drop shadow for text on title bar code. (TITLE_TEXT_SHADOW) - removed drop shadow for text on title bar code. (TITLE_TEXT_SHADOW)
- text on title bar is now possible to be drawn by plugin. See NEWS. - text on title bar is now possible to be drawn by plugin. See NEWS.
- WPrefs: added support for button4/5 - WPrefs: added support for button4/5
- fixed scrolling of menus outside screen (Vito Caputo - fixed scrolling of menus outside screen (Vito Caputo
<swivel@virtual-webworld.com) <swivel@virtual-webworld.com)
- added dialog window for menu commands that can't be executed - added dialog window for menu commands that can't be executed
- fixed crash when deiconifying windows when icons are disabled - fixed crash when deiconifying windows when icons are disabled
@@ -3511,7 +3374,7 @@ Changes since version 0.53.0:
- fixed crash when changing icon of window without WM_CLASS - fixed crash when changing icon of window without WM_CLASS
- added hysteresys for offscreen menu scrollback - added hysteresys for offscreen menu scrollback
- fixed bug with IgnoreFocusClick - fixed bug with IgnoreFocusClick
- fixed crash with windows with width == 1 (Alban Hertroys - fixed crash with windows with width == 1 (Alban Hertroys
<dalroi@wit401310.student.utwente.nl>) <dalroi@wit401310.student.utwente.nl>)
- added SHEXEC command - added SHEXEC command
- fixed resizebarback for SHADOW_RESIZEBAR ( jim knoble jmknoble@pobox.com) - fixed resizebarback for SHADOW_RESIZEBAR ( jim knoble jmknoble@pobox.com)
@@ -3631,7 +3494,7 @@ Changes since version 0.51.1:
- fixed bug with window that can get focus if both shaded and hidden. - fixed bug with window that can get focus if both shaded and hidden.
- maximize for full screen - maximize for full screen
- fixed problem with frame drawing in non-opaque - fixed problem with frame drawing in non-opaque
- fixed installation path prob [jmknoble@pobox.com] - fixed installation path prob [jmknoble@pobox.com]
- fixed bug moving window when only one window is on screen - fixed bug moving window when only one window is on screen
- fixed bug with ignored GNUstep attributes - fixed bug with ignored GNUstep attributes
@@ -3727,7 +3590,7 @@ Changes since version 0.50.1:
- fixed wmsetbg - fixed wmsetbg
- fixed parsing of WorkspaceSpecificBack - fixed parsing of WorkspaceSpecificBack
- fixed initial workspace for new windows - fixed initial workspace for new windows
- added the workspace button proxy thingy for GNOME - added the workspace button proxy thingy for GNOME
- added more GNOME compatibility fixes - added more GNOME compatibility fixes
- fixed bug in %a() macro in root menu - fixed bug in %a() macro in root menu
@@ -3901,7 +3764,7 @@ Changes since version 0.19.3:
............................. .............................
- fixed crash when closing windows in autoraise - fixed crash when closing windows in autoraise
- fixed a memory leak - fixed a memory leak
- fixed a crash when closing Lotus Notes - fixed a crash when closing Lotus Notes
- rewrote colormap code - rewrote colormap code
- incomplete multihead support - incomplete multihead support
@@ -4014,7 +3877,7 @@ Changes since version 0.17.5:
............................. .............................
- fixed handling of signals when the X event queue is empty - fixed handling of signals when the X event queue is empty
- fixed blank window titles - fixed blank window titles
- made current workspace entry be disabled in Move To window menu command, and - made current workspace entry be disabled in Move To window menu command, and
in the Clip's Move To submenu. in the Clip's Move To submenu.
- fixed menu width calculation - fixed menu width calculation
@@ -4025,7 +3888,7 @@ Changes since version 0.17.5:
- added a hack to make everything work even if NumLock or ScrollLock is on - added a hack to make everything work even if NumLock or ScrollLock is on
- added a little more verbosity to error messages - added a little more verbosity to error messages
- fixed kluged workspace menu in clip - fixed kluged workspace menu in clip
- removed workspace menu mapped through the microbutton in the clip. - removed workspace menu mapped through the microbutton in the clip.
- remade clip button layout to be more usable - remade clip button layout to be more usable
- fixed bug with keepontop and apps with Motif hints (x11amp) - fixed bug with keepontop and apps with Motif hints (x11amp)
- changed menu border drawing - changed menu border drawing
@@ -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
@@ -4091,7 +3954,7 @@ Changes since version 0.17.3:
- fixed bug with rootmenu that caused twin menus to be left mapped - fixed bug with rootmenu that caused twin menus to be left mapped
- added DontConfirmKill option to remove confirmation panel for Kill - added DontConfirmKill option to remove confirmation panel for Kill
- fixed bug with hide of app with wmaker menu - fixed bug with hide of app with wmaker menu
- changed all NSsomething internal flags for the GNUstep attributes to - changed all NSsomething internal flags for the GNUstep attributes to
WMsomething WMsomething
Changes since version 0.17.2: Changes since version 0.17.2:
@@ -4099,7 +3962,7 @@ Changes since version 0.17.2:
- fixed bug in attributes panel with Disable Resizebar - fixed bug in attributes panel with Disable Resizebar
- fixed save in attribs panel with windows other than the client leader - fixed save in attribs panel with windows other than the client leader
- bug in attribs panel with Revert that made it save attributes with the - bug in attribs panel with Revert that made it save attributes with the
wrong name wrong name
- fixed (by kluging) bugs related to destroying dialog panels in a bad order - fixed (by kluging) bugs related to destroying dialog panels in a bad order
- fixed various bug with hide in empty screens - fixed various bug with hide in empty screens
@@ -4206,7 +4069,7 @@ Changes since version 0.16.0:
- Added autoscroll for scrollers in WINGs. - Added autoscroll for scrollers in WINGs.
- Optimized WMList and WMBrowser in WINGs. - Optimized WMList and WMBrowser in WINGs.
- Button2 on clip opens workspace menu - Button2 on clip opens workspace menu
- Changed cycling colors of selected icons. - Changed cycling colors of selected icons.
- Made icon chooser display a better rendering of alpha-channeled icons. - Made icon chooser display a better rendering of alpha-channeled icons.
- Sorted list/browser entries. - Sorted list/browser entries.
- Fixed bug in timer code that was causing some timer events to be lost. - Fixed bug in timer code that was causing some timer events to be lost.
@@ -4243,11 +4106,11 @@ Changes since version 0.15.1:
- clicking on the appicon switches to the workspace where the app was last - clicking on the appicon switches to the workspace where the app was last
focused before unhiding focused before unhiding
- fixed problem with aspect ratio setting (gr_osview etc.) - fixed problem with aspect ratio setting (gr_osview etc.)
- changed some extensions in the default config/data files and removed - changed some extensions in the default config/data files and removed
Sound.{xpm,tif} because it seem to be copyrighted. Sound.{xpm,tif} because it seem to be copyrighted.
- added icon selection panel - added icon selection panel
- changed selection indication of icons. Removed SClipColor option - changed selection indication of icons. Removed SClipColor option
- simplified animation speed options (IconSlideDelay, IconDelayStep, - simplified animation speed options (IconSlideDelay, IconDelayStep,
MenuScrollDelay, MenuScrollStep etc. etc) to IconSlideSpeed etc. MenuScrollDelay, MenuScrollStep etc. etc) to IconSlideSpeed etc.
- removed Start miniaturized/hidden items from Dock/Clip and added them - removed Start miniaturized/hidden items from Dock/Clip and added them
as attributes as attributes
@@ -4319,7 +4182,7 @@ Changes since version 0.15.0:
window is correctly updated if the font size is changed while running. window is correctly updated if the font size is changed while running.
- Deleted unnecessary redrawing code in moveres.c. - Deleted unnecessary redrawing code in moveres.c.
- Many fixes to moveres.c. - Many fixes to moveres.c.
- Put all the keys from defaults.c in WindowMaker domain database. - Put all the keys from defaults.c in WindowMaker domain database.
- Fixed a crashing bug when workspace names were as long (or longer) as - Fixed a crashing bug when workspace names were as long (or longer) as
MAX_WORKSPACENAME_WIDTH (16 characters). In this case a right click on a MAX_WORKSPACENAME_WIDTH (16 characters). In this case a right click on a
window title caused WindowMaker to crash. window title caused WindowMaker to crash.
@@ -4622,7 +4485,7 @@ Changes since version 0.12.1:
Changes since version 0.12.0: Changes since version 0.12.0:
............................. .............................
- now maintained by Matthew Hawkins <matt@mail.goldweb.com.au> while our - now maintained by Matthew Hawkins <matt@mail.goldweb.com.au> while our
esteemed friend Alfredo is away. Have a great holiday in Japan, mate! esteemed friend Alfredo is away. Have a great holiday in Japan, mate!
- fixed __DuMmY install problems - fixed __DuMmY install problems
- made NextMenuBehaviour and ScrollableMenus run-time configuration options - made NextMenuBehaviour and ScrollableMenus run-time configuration options
@@ -4634,7 +4497,7 @@ Changes since version 0.11.1:
- added Launch command in dock menu - added Launch command in dock menu
- fixed manual window placement - fixed manual window placement
- fixed problem during installation in po/ directory - fixed problem during installation in po/ directory
- changed Command format for dock state - changed Command format for dock state
- added OffiX DND support for the dock - added OffiX DND support for the dock
- added Move To submenu in window commands menu - added Move To submenu in window commands menu
- right click on root window does not deselect windows (to allow workspace - right click on root window does not deselect windows (to allow workspace
@@ -4650,7 +4513,7 @@ Changes since version 0.11.1:
Changes since version 0.11.0: Changes since version 0.11.0:
............................. .............................
- fixed bug with menus that caused wmaker to crash - fixed bug with menus that caused wmaker to crash
- brought program parameter dialog box back - brought program parameter dialog box back
- fixed autoplacement - fixed autoplacement
- changed window matching precedence for WMWindowAttributes (complete, just - changed window matching precedence for WMWindowAttributes (complete, just
@@ -4671,7 +4534,7 @@ Changes since version 0.10.2:
- fixed maximize bug - fixed maximize bug
- added a widget set and new dialog panels - added a widget set and new dialog panels
- fixed titlebar update after font change - fixed titlebar update after font change
- renamed back _WINDOWMAKER_COMMAND to _WINDOWMAKER_WM_FUNCTION - renamed back _WINDOWMAKER_COMMAND to _WINDOWMAKER_WM_FUNCTION
- fixed bug with miniaturization of bad behaved apps (vtcl) - fixed bug with miniaturization of bad behaved apps (vtcl)
Changes since version 0.10.1: Changes since version 0.10.1:
@@ -4721,7 +4584,7 @@ pipe
- more apps can be docked (ghostview et. al) - more apps can be docked (ghostview et. al)
- fixed diagonal/horizontal resize detection to be like in NS - fixed diagonal/horizontal resize detection to be like in NS
- simplified titlebar button code: removed possibility to add more buttons - simplified titlebar button code: removed possibility to add more buttons
- fixed window gravity handling (xclock -geometry 100x100-0-0) - fixed window gravity handling (xclock -geometry 100x100-0-0)
- removed shadeable window attribute, added DontMoveOff - removed shadeable window attribute, added DontMoveOff
- window resize with Meta-Click3 on window - window resize with Meta-Click3 on window
- fixed bug that caused keyboard locks if a invalid key was used in a shortcut - fixed bug that caused keyboard locks if a invalid key was used in a shortcut
@@ -4831,20 +4694,20 @@ has quit. (probably the same problem with XFMail and others)
- better handling of long text - better handling of long text
- limited windowlist menu width - limited windowlist menu width
- fixed arrange icons - fixed arrange icons
- changed geometry display to account for base size if it's not in - changed geometry display to account for base size if it's not in
the technical drawing style the technical drawing style
- meta-dbl-click on appicon does hide others - meta-dbl-click on appicon does hide others
- changed RaiseOnFocus option with RaiseDelay - changed RaiseOnFocus option with RaiseDelay
- dbl-click on root window or open submenu entry brings the root menu - dbl-click on root window or open submenu entry brings the root menu
to the cursor. to the cursor.
- removed AllowMenuLowering option and made menu ontopness work like on dock - removed AllowMenuLowering option and made menu ontopness work like on dock
- changed meta-click on dock with meta-dbl-click, to change ontopness - changed meta-click on dock with meta-dbl-click, to change ontopness
- moved gradient and image code to a library. - moved gradient and image code to a library.
- added support for icons with alpha channel - added support for icons with alpha channel
- simplified dithering setup - simplified dithering setup
- many clean ups - many clean ups
- not-so-good looking gradients for 8bpp - not-so-good looking gradients for 8bpp
- changed application menu stuff - changed application menu stuff
- started wmaker client library. Try out test/test.c - started wmaker client library. Try out test/test.c
@@ -4889,7 +4752,7 @@ Changes since version 0.4.2:
- fixed docking on left side dock - fixed docking on left side dock
- fixed bug in window command menu - fixed bug in window command menu
- fixed bug in narrow windows with NEWSTYLE enabled - fixed bug in narrow windows with NEWSTYLE enabled
- fixed Hide Others crash - fixed Hide Others crash
- I18N fixes - I18N fixes
- hopefully stable again - hopefully stable again
@@ -4934,13 +4797,13 @@ 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:
............................ ............................
- fixed bug that caused window frames to be left after window closure - fixed bug that caused window frames to be left after window closure
- submenus are opened to the left/right if it is too close to the right/left - submenus are opened to the left/right if it is too close to the right/left
edge (not perfect, but better than before) edge (not perfect, but better than before)
- remember window state (shade) on restart - remember window state (shade) on restart
- fixed resize bug - fixed resize bug
@@ -4957,14 +4820,14 @@ Changes since version 0.3.0:
- added diagonal gradients - added diagonal gradients
- ignoreHideOthers window flag - ignoreHideOthers window flag
- optimized/fixed window raising and lowering - optimized/fixed window raising and lowering
- fixed menu handling: don't need to click on the menu after - fixed menu handling: don't need to click on the menu after
it's opened to select items, just drag the pointer it's opened to select items, just drag the pointer
- _GNUSTEP_WM_RESIZE_WINDOW, _GNUSTEP_WM_RESIZED_WINDOW protocols - _GNUSTEP_WM_RESIZE_WINDOW, _GNUSTEP_WM_RESIZED_WINDOW protocols
- application specified titlebar button pixmaps - application specified titlebar button pixmaps
- 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
@@ -4985,10 +4848,10 @@ with accidental dbl-clicks on the root menu.
- remade application group code (more stable) - remade application group code (more stable)
- undid stacking code change from 0.2.0 - undid stacking code change from 0.2.0
- fixed bug that caused hangs (not sure) - fixed bug that caused hangs (not sure)
- fixed bug that caused window_count error and associated crashes - fixed bug that caused window_count error and associated crashes
- remade application defined menus - remade application defined menus
- vertical gradient - vertical gradient
- I18N support - I18N support
- fixed multiple window selection bug with windows in other workspaces - fixed multiple window selection bug with windows in other workspaces
- changed workspace numbering - changed workspace numbering
- fixed problem with series of X errors when a window is destroyed - fixed problem with series of X errors when a window is destroyed
@@ -5026,7 +4889,7 @@ you focus a shaded window
- fixed bug that allowed on top window to be lowered - fixed bug that allowed on top window to be lowered
- disappearing xconsole and other initial-state==IconicState windows fixed - disappearing xconsole and other initial-state==IconicState windows fixed
- menus open always inside screen area - menus open always inside screen area
- open submenus are moved with their parents - open submenus are moved with their parents
- keyboard support - keyboard support
- faster menu drawing - faster menu drawing
- hide for applications that use window_group hint fixed (LyX et al) - hide for applications that use window_group hint fixed (LyX et al)
@@ -5089,7 +4952,7 @@ Changes since version 0.0.4:
- added cpp preprocessing - added cpp preprocessing
- zombie process bug fixed - zombie process bug fixed
- interactive and dumb (cascade) window placement - interactive and dumb (cascade) window placement
- floating transient windows - floating transient windows
- disable mapped submenu entry on parent - disable mapped submenu entry on parent
- added colormap handling stolen from fvwm (temporary) - added colormap handling stolen from fvwm (temporary)
@@ -5097,10 +4960,10 @@ Changes since version 0.0.4:
Changes since version 0.0.3: Changes since version 0.0.3:
............................ ............................
- hide application implemented (just for apps that have the window_group - hide application implemented (just for apps that have the window_group
field of WMHints set or the WM_CLIENT_LEADER property set, field of WMHints set or the WM_CLIENT_LEADER property set,
apparently most Xt based apps) apparently most Xt based apps)
- fixed a crashing bug caused by icons - fixed a crashing bug caused by icons
- internal change on button pixmap structure and other places - internal change on button pixmap structure and other places
- handling of property changes on mapped windows - handling of property changes on mapped windows
- fixed bug in event handling (MapRequest) - fixed bug in event handling (MapRequest)
+370 -370
View File
File diff suppressed because it is too large Load Diff
+5 -43
View File
@@ -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
+47 -529
View File
@@ -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 state of the window while using
half-maximized feature. Unmaximized window have its state saved during that
process, which was use to unmaximize it. For example, if there is a window,
which is maximized on the half left side of the screen, and while requesting
left-half-maximized, it become unmaximized with size and dimension restored to
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 window always
can be unmaximzied using appropriate keyboard shortcut or by selecting
"Unmaximize" from 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 previously defined key combination), so it
become:
┌┬───────┬────────┬─────────────────┬┐
├┘ ├────────┤ ├┤
│ │ │ ├┤
│ │ │ ├┤
│ │ │ ├┤
│ │ │ └┤
├┬┐ └────────┼┬┬┐ │
└┴┴───────────────┴┴┴┴───────────────┘
In this example there is an assumption that WindowMaker is configured, that
maximized windows wont cover mini icons nor 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-maxmimize:
┌┬────────────────┬────────┬────────┬┐
├┘ │ ├────────┼┤
│ │ │ ├┤
│ │ │ ├┤
│ │ │ ├┤
│ │ │ ├┤
├┬┐ ├┬┬┐ └────────┘│
└┴┴───────────────┴┴┴┴───────────────┘
And final activation of right-half-maxmimize:
┌┬────────────────┬───────┬─────────┬┐
├┘ ├───────┤ ├┤
│ │ │ ├┤
│ │ │ ├┤
│ ├───────┘ ├┤
│ │ └┤
├┬┐ ├┬┬┐ │
└┴┴───────────────┴┴┴┴───────────────┘
Where window is restored its size (but not position, since it it on different
head now). Moving 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
@@ -893,7 +411,7 @@ The 4 corner images will be copied in their original sizes and the rest will
be scaled to the final panel size. be scaled to the final panel size.
background_image, width and height are optional. If you leave them out, background_image, width and height are optional. If you leave them out,
a gray panel will be used. If your machine is not very fast, you may want a gray panel will be used. If your machine is not very fast, you may want
to use it. to use it.
@@ -916,7 +434,7 @@ Antialiased font support
With the addition of Xft2 support in the WINGs library, now With the addition of Xft2 support in the WINGs library, now
Window Maker can display antialiased text with TrueType or any scalable fonts. Window Maker can display antialiased text with TrueType or any scalable fonts.
You can pick fonts for Window Maker in the Font configuration section of You can pick fonts for Window Maker in the Font configuration section of
WPrefs. WPrefs.
Antialiased text is enabled by default, but can be disabled by adding Antialiased text is enabled by default, but can be disabled by adding
@@ -950,7 +468,7 @@ These are to be proplist format menus, for example:
or, in case you want a submenu: or, in case you want a submenu:
(("Submenu", (("Submenu",
("Foobar", EXEC, foobar), ("Foobar", EXEC, foobar),
("Blabla", EXEC, blabla))) ("Blabla", EXEC, blabla)))
@@ -993,7 +511,7 @@ shading and unshading respectfully.
However, to avoid unwanted triggers of shading/unshading the window, two However, to avoid unwanted triggers of shading/unshading the window, two
consecutive mouse wheel events in the same direction are required. The consecutive mouse wheel events in the same direction are required. The
trigger won't occur if the events are separated by more than a double-click's trigger won't occur if the events are separated by more than a double-click's
worth of time, which is technically speaking like making a double-click with worth of time, which is technically speaking like making a double-click with
the button that corresponds to the mouse wheel direction. the button that corresponds to the mouse wheel direction.
@@ -1098,7 +616,7 @@ Less dependencies
starting with 0.70.0 libPropList is no longer required to build Window starting with 0.70.0 libPropList is no longer required to build Window
Maker. PropList handling code was added to WINGs being now better Maker. PropList handling code was added to WINGs being now better
integrated with all the rest. For more details check the Changelog and the integrated with all the rest. For more details check the Changelog and the
following files: following files:
./WINGs/ChangeLog ./WINGs/ChangeLog
./WINGs/NEWS ./WINGs/NEWS
@@ -1171,9 +689,9 @@ behavior regarding workspaces you can now (use WPrefs.app to do this).
Client supplied icons Client supplied icons
--------------------- ---------------------
Window Maker saves the client supplied icons in Window Maker saves the client supplied icons in
~/GNUstep/Library/WindowMaker/CachedPixmaps in XPM format for later use ~/GNUstep/Library/WindowMaker/CachedPixmaps in XPM format for later use
when the app is no longer running (to have the image to display for docked when the app is no longer running (to have the image to display for docked
icons for example). icons for example).
Until recently the XPM images saved by Window Maker were incorrect, but a Until recently the XPM images saved by Window Maker were incorrect, but a
@@ -1181,9 +699,9 @@ recent fix in the code to save XPM's fixed them. But with this fix, all
previously saved XPM's in that directory are no longer readable (they give previously saved XPM's in that directory are no longer readable (they give
wrong images on screen or fail to load). wrong images on screen or fail to load).
To avoid the need for the user to fix this by hand editing WMWindowAttributes To avoid the need for the user to fix this by hand editing WMWindowAttributes
and removing all references to icons in ~/GNUstep/Library/WindowMaker/CachedPixmaps and removing all references to icons in ~/GNUstep/Library/WindowMaker/CachedPixmaps
which can be annoying, new code was added to Window Maker to permit the which can be annoying, new code was added to Window Maker to permit the
regeneration of images in ~/GNUstep/Library/WindowMaker/CachedPixmaps if they are missing. regeneration of images in ~/GNUstep/Library/WindowMaker/CachedPixmaps if they are missing.
With this addition, all you need to do to fix your old broken images, is to With this addition, all you need to do to fix your old broken images, is to
@@ -1285,7 +803,7 @@ performance increases can go up to 150%
Weendoze Window Cycling (alt-tab) Weendoze Window Cycling (alt-tab)
--------------------------------- ---------------------------------
Window cycling was changed to weendoze style. Window cycling was changed to weendoze style.
NoBorder Window Attribute NoBorder Window Attribute
@@ -1381,7 +899,7 @@ arguments. To code new plugin, please see plugin.h for more information.
User Menu User Menu
--------- ---------
The user menu is now a compile time option disabled by default. The user menu is now a compile time option disabled by default.
Supply --enable-usermenu to configure to enable it. Supply --enable-usermenu to configure to enable it.
@@ -1515,7 +1033,7 @@ New Options
MenuStyle=<style>; will change the menu texture style. MenuStyle=<style>; will change the menu texture style.
<style> can be: <style> can be:
normal (default): for the traditional one texture per item, with bevels in normal (default): for the traditional one texture per item, with bevels in
each each
singleTexture: for a single texture that spans the whole menu, with bevels singleTexture: for a single texture that spans the whole menu, with bevels
@@ -1532,7 +1050,7 @@ where <texture> is any of the textures you normally use in titlebars and
other places. other places.
If the style file/theme does not contain a ResizebarBack option, setstyle If the style file/theme does not contain a ResizebarBack option, setstyle
will automatically hack it so that wmaker will make the theme work like will automatically hack it so that wmaker will make the theme work like
before. before.
@@ -1633,7 +1151,7 @@ Full Screen Maximization
The FullMaximize window attribute will allow the window to The FullMaximize window attribute will allow the window to
be maximized to the full size of the screen (ignoring anything be maximized to the full size of the screen (ignoring anything
like titlebar, resizebar, dock, panels etc). It should be useful like titlebar, resizebar, dock, panels etc). It should be useful
for programs that must use the whole screen, like games or things for programs that must use the whole screen, like games or things
like presentation programs. like presentation programs.
@@ -1642,7 +1160,7 @@ like presentation programs.
KDE Application Menu script KDE Application Menu script
--------------------------- ---------------------------
wkdemenu.pl is a converter from KDE application menu structures to wmaker wkdemenu.pl is a converter from KDE application menu structures to wmaker
menu that can be used as a piped menu. Look wkdemenu.sh for how to use it. menu that can be used as a piped menu. Look wkdemenu.sh for how to use it.
@@ -1672,14 +1190,14 @@ Window Maker has become a GNU program (part of the GNU Project).
Title text drop shadow Title text drop shadow
---------------------- ----------------------
drop shadow option added for titlebar text. This is a compile time drop shadow option added for titlebar text. This is a compile time
option which needs to be defined in src/wconfig.h after you run option which needs to be defined in src/wconfig.h after you run
configure and before you run make. configure and before you run make.
New options and syntax for your WindowMaker domain file are: New options and syntax for your WindowMaker domain file are:
Shadow = yes/no; Shadow = yes/no;
FShadowColor = <color>; FShadowColor = <color>;
PShadowColor = <color>; PShadowColor = <color>;
UShadowColor = <color>; UShadowColor = <color>;
MShadowColor = <color>; MShadowColor = <color>;
@@ -1743,7 +1261,7 @@ it will scale the pixmap by keeping the aspect ratio (maximize or maxpect).
The option only works for workspace backgrounds. The option only works for workspace backgrounds.
Also added IGNORE_PPOSITION compile time flag, which is equivalent Also added IGNORE_PPOSITION compile time flag, which is equivalent
to NoPPosition from fvwm. to NoPPosition from fvwm.
@@ -1754,7 +1272,7 @@ to NoPPosition from fvwm.
KDE and GNOME KDE and GNOME
------------- -------------
Added full support for GNOME and KWM hints. Added full support for GNOME and KWM hints.
Read the INSTALL file to see how enable them. Read the INSTALL file to see how enable them.
Everything in the so called GNOME window manager bla bla bla pseudo-spec is Everything in the so called GNOME window manager bla bla bla pseudo-spec is
@@ -1763,13 +1281,13 @@ implemented.
As for KDE stuff, it implements 90% of everything kwm does, adds some As for KDE stuff, it implements 90% of everything kwm does, adds some
Window Maker specific extensions to it and still uses half of the memory Window Maker specific extensions to it and still uses half of the memory
kwm does, which should be enough to let you dump kwm ;) For details on what kwm does, which should be enough to let you dump kwm ;) For details on what
exactly is implemented, see comments in src/kwm.c Read the README.KDE file exactly is implemented, see comments in src/kwm.c Read the README.KDE file
for more information. for more information.
WARNING: Some KDE hints are badly designed, so doing things like using WARNING: Some KDE hints are badly designed, so doing things like using
kpanel's desktop switcher/pager and Window Maker's internal workspace kpanel's desktop switcher/pager and Window Maker's internal workspace
management functions to create, destroy and rename workspaces at the same management functions to create, destroy and rename workspaces at the same
time might cause unknown effects. To be on the safe side, only time might cause unknown effects. To be on the safe side, only
use either of them to manage workspaces. Switching workspaces is hopefully, use either of them to manage workspaces. Switching workspaces is hopefully,
safe, so you can switch workspaces from wherever you want. safe, so you can switch workspaces from wherever you want.
@@ -1784,7 +1302,7 @@ workspaces. The WorkspaceBack is used as the default background image.
Example: Example:
WorkspaceSpecificBack = ((solid, red), (cpixmap, ship.jpg, gray), (), WorkspaceSpecificBack = ((solid, red), (cpixmap, ship.jpg, gray), (),
(dgradient, red, blue)) (dgradient, red, blue))
This will set the background image of workspace 1 to (solid, 0), This will set the background image of workspace 1 to (solid, 0),
@@ -1813,8 +1331,8 @@ WindowMaker/README.themes file.
New Texture Type New Texture Type
---------------- ----------------
Textured gradients will tile a texture pixmap and combine it with a gradient, Textured gradients will tile a texture pixmap and combine it with a gradient,
using an arbitrary opaqueness. using an arbitrary opaqueness.
Syntax is (thgradient, <file>, <opaqueness>, <color1>, <color2>) Syntax is (thgradient, <file>, <opaqueness>, <color1>, <color2>)
(tvgradient, <file>, <opaqueness>, <color1>, <color2>) (tvgradient, <file>, <opaqueness>, <color1>, <color2>)
@@ -1871,7 +1389,7 @@ raising/lowering there is a time threshold before raising/lowering.
The thresholds can be changed in wconfig.h by changing one or both of 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 to practically do not auto raise unless clicked, big value, will make the Clip to practically do not auto raise unless clicked,
but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved. but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved.
@@ -1885,7 +1403,7 @@ the old format is still supported. The new format is documented
in the WindowMaker/README.themes file. in the WindowMaker/README.themes file.
Root Menu Root Menu
--------- ---------
The -noext option for OPEN_MENU will strip whatever is after the last . The -noext option for OPEN_MENU will strip whatever is after the last .
@@ -1913,7 +1431,7 @@ WDesktopLevel
If you have a 5 button mouse and want to give some utility for If you have a 5 button mouse and want to give some utility for
the extra 2 buttons, edit the appropriate line in src/wconfig.h the extra 2 buttons, edit the appropriate line in src/wconfig.h
Clicking Button4 in the root window will switch you to the previous Clicking Button4 in the root window will switch you to the previous
workspace and Button5 will do that for the next. workspace and Button5 will do that for the next.
@@ -1939,7 +1457,7 @@ Hysteresis for menu item selection
Hopefully it's intelligent enough, so you won't notice it. Hopefully it's intelligent enough, so you won't notice it.
In case you want to know what's it, it's equivalent to that In case you want to know what's it, it's equivalent to that
(insanely long) 2 second delay present in that Windoze95 menu, (insanely long) 2 second delay present in that Windoze95 menu,
but more useful than annoying (I hope :). To see it, do the following but more useful than annoying (I hope :). To see it, do the following
with your current wmaker version and later with 0.20.3: with your current wmaker version and later with 0.20.3:
@@ -2028,7 +1546,7 @@ make
make install make install
You also don't need to worry about GNOME libPropList incompatibilities You also don't need to worry about GNOME libPropList incompatibilities
anymore. anymore.
Bug with focus lost in sloppy focus fixed Bug with focus lost in sloppy focus fixed
@@ -2067,11 +1585,11 @@ optimize it and remove a few hundred of bytes, then use --disable-sound or
--- 0.20.0 --- 0.20.0
Multihead support. wmaker will now manage all screens that are attached to the Multihead support. wmaker will now manage all screens that are attached to the
display. display.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
It does so from a single process (instead of spawning a new process for each It does so from a single process (instead of spawning a new process for each
screen, like fvwm does). This keeps memory usage a lot lower than fvwm. screen, like fvwm does). This keeps memory usage a lot lower than fvwm.
@@ -2169,7 +1687,7 @@ c3 can be v or h (meaning vertical or horizontal)
case is insensitive. case is insensitive.
For example, For example,
IconPosition = blh; IconPosition = blh;
is the old iconPosition position. is the old iconPosition position.
@@ -2226,7 +1744,7 @@ submenus was removed, so a menu that looked like:
( Applications, ( Applications,
("Xterm", EXEC, "xterm"), ("Xterm", EXEC, "xterm"),
( (
(Paint, (Paint,
("Gimp", EXEC, "gimp"), ("Gimp", EXEC, "gimp"),
("XV", EXEC, "xv") ("XV", EXEC, "xv")
@@ -2250,7 +1768,7 @@ Misc
---- ----
NUMLOCK_HACK is back. This time it works and is enabled by default. NUMLOCK_HACK is back. This time it works and is enabled by default.
If you think you don't need it and promise me that you won't send If you think you don't need it and promise me that you won't send
"bug" reports saying that shortcuts stop working after a while, you can "bug" reports saying that shortcuts stop working after a while, you can
disable it ;) It will save some memory and CPU. disable it ;) It will save some memory and CPU.
@@ -2294,7 +1812,7 @@ New Options
----------- -----------
PixmapPath was split to PixmapPath and IconPath. PixmapPath is the path PixmapPath was split to PixmapPath and IconPath. PixmapPath is the path
for the pixmaps used as textures and IconPath is for the icons. for the pixmaps used as textures and IconPath is for the icons.
Don't forget to add IconPath to your current configuration file. Don't forget to add IconPath to your current configuration file.
There's also a new library in ~/GNUstep/Library/Icons. You should place There's also a new library in ~/GNUstep/Library/Icons. You should place
@@ -2340,7 +1858,7 @@ Misc. Changes
Removed --with-gnome and made MWM_HINTS defined by default. Removed --with-gnome and made MWM_HINTS defined by default.
This means that "GNOME support" will work with no additional This means that "GNOME support" will work with no additional
flags passed to configure. flags passed to configure.
Added support for KDE, by adding a DisableWorkspaceMouseActions option. Added support for KDE, by adding a DisableWorkspaceMouseActions option.
Set it to YES and run krootwm to be able to use everything in kfm. Set it to YES and run krootwm to be able to use everything in kfm.
@@ -2367,7 +1885,7 @@ Interface Changes
----------------- -----------------
** Configuration of docked applications is now done in a panel instead of ** Configuration of docked applications is now done in a panel instead of
in the menu. in the menu.
** Added a command menu for application icons ** Added a command menu for application icons
@@ -2545,7 +2063,7 @@ Now, selecting icons is as easy as clicking in the file name in a list.
Simplified Options Simplified Options
------------------ ------------------
IconSlideStep, IconSlideSlowDown and IconSlideDelay were merged to IconSlideStep, IconSlideSlowDown and IconSlideDelay were merged to
IconSlideSpeed IconSlideSpeed
MenuScrollStep and MenuScrollDelay were merged to MenuScrollSpeed MenuScrollStep and MenuScrollDelay were merged to MenuScrollSpeed
@@ -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.
@@ -3343,7 +2861,7 @@ thus, making a menu with entries like:
(mhgradient, colorX, color1, color2, color3, ..., colorn) (mhgradient, colorX, color1, color2, color3, ..., colorn)
(mvgradient, colorX, color1, color2, color3, ..., colorn) (mvgradient, colorX, color1, color2, color3, ..., colorn)
You can put any number of colors >= 2. You can put any number of colors >= 2.
colorX is a special color that is used as the solid color of the colorX is a special color that is used as the solid color of the
texture when wmaker needs a solid color (like in miniwindow title and texture when wmaker needs a solid color (like in miniwindow title and
@@ -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:
{ {
@@ -3434,13 +2952,13 @@ then you can merge both and have:
The configuration format has changed!! Forget everything about the old The configuration format has changed!! Forget everything about the old
format. format.
dockapp was removed and the old version will not work anymore. dockapp was removed and the old version will not work anymore.
the dialogs require tcl/tk. they will be rewritten in plain C the dialogs require tcl/tk. they will be rewritten in plain C
These are some tips for people upgrading from older versions and don't want These are some tips for people upgrading from older versions and don't want
too many unused files around. There is no problem if you decide to keep too many unused files around. There is no problem if you decide to keep
them for a while. them for a while.
you can rm -r ~/gnustep if you don't want anything from there you can rm -r ~/gnustep if you don't want anything from there
+17 -17
View File
@@ -8,7 +8,7 @@
by by
Alfredo K. Kojima Alfredo K. Kojima
Dan Pascu Dan Pascu
@@ -21,19 +21,19 @@
Congratulations! You have purchased an extremely fine Congratulations! You have purchased an extremely fine
device that would give you thousands of years of trouble-free device that would give you thousands of years of trouble-free
service, except that you undoubtedly will destroy it via some service, except that you undoubtedly will destroy it via some
typical bonehead consumer maneuver. Which is why we ask you typical bonehead consumer maneuver. Which is why we ask you
to PLEASE FOR GOD'S SAKE READ THIS OWNER'S MANUAL CAREFULLY to PLEASE FOR GOD'S SAKE READ THIS OWNER'S MANUAL CAREFULLY
BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN'T BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN'T
YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND
FIDDLED WITH THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO FIDDLED WITH THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO
ONCE SHOVED A POLISH SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER ONCE SHOVED A POLISH SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER
AND SET IT ON "FAST FORWARD", THIS CHILD ALSO IS FIDDLING AND SET IT ON "FAST FORWARD", THIS CHILD ALSO IS FIDDLING
WITH THE KNOBS, RIGHT? AND YOU'RE JUST NOW STARTING TO READ WITH THE KNOBS, RIGHT? AND YOU'RE JUST NOW STARTING TO READ
THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE
DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU
KNOW THAT? KNOW THAT?
-- Dave Barry, "Read This First!" -- Dave Barry, "Read This First!"
@@ -67,7 +67,7 @@ Documentation
Read before asking. Read before asking.
* README files all over the source tree have info related to the stuff * README files all over the source tree have info related to the stuff
in the directories. in the directories.
* INSTALL has installation instructions and some troubleshooting tips. * INSTALL has installation instructions and some troubleshooting tips.
You're meant to read it if you are compiling the sources. You're meant to read it if you are compiling the sources.
@@ -112,7 +112,7 @@ Directories & Files in the Source Tree
* util/ has various utility programs. * util/ has various utility programs.
* WPrefs.app/ is the configuration program. * WPrefs.app/ is the configuration program.
* src/wconfig.h has compile time options you can change to select some * src/wconfig.h has compile time options you can change to select some
options/features and other stuff. options/features and other stuff.
@@ -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
@@ -203,13 +203,13 @@ while keeping a nice appearance and good functionality, follow the items bellow:
fully supported). Make sure to always keep NumLock and ScrollLock turned off. fully supported). Make sure to always keep NumLock and ScrollLock turned off.
- turn on DisableAnimations. You can also specify --disable-animation at compile - turn on DisableAnimations. You can also specify --disable-animation at compile
time to the configure script. time to the configure script.
- strip down the default IconPath and PixmapPath entries to contain only - strip down the default IconPath and PixmapPath entries to contain only
the paths that you really have in your system. the paths that you really have in your system.
- do not use large images in the root background - do not use large images in the root background
- 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.
@@ -225,7 +225,7 @@ To enable it, hit the Control+Shift+NumLock or Shift+NumLock key combination.
You should hear the speaker beeping. To disable it, do the same thing. You should hear the speaker beeping. To disable it, do the same thing.
To control the mouse the numeric keypad is used as follows: To control the mouse the numeric keypad is used as follows:
- 4 (left arrow), 7 (Home), 8 (up arrow), 9 (PgUp), 6 (right arrow), - 4 (left arrow), 7 (Home), 8 (up arrow), 9 (PgUp), 6 (right arrow),
3 (PgDn), 2 (down arrow) and 1 (End) move the mouse to the corresponding 3 (PgDn), 2 (down arrow) and 1 (End) move the mouse to the corresponding
direction; direction;
- holding one of the above keys and then holding the 5 key will move the - holding one of the above keys and then holding the 5 key will move the
@@ -311,5 +311,5 @@ 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
+1 -1
View File
@@ -23,7 +23,7 @@ They have the following meanings:
none The cursor is inherited from the parent window (often, none The cursor is inherited from the parent window (often,
this means the root window). this means the root window).
builtin Use the cursor named <cursor-name> from X11's set of builtin Use the cursor named <cursor-name> from X11's set of
built-in cursors. The names are the same as you use built-in cursors. The names are the same as you use
with 'xsetroot -cursor_name'. See the xsetroot(1) man with 'xsetroot -cursor_name'. See the xsetroot(1) man
+1 -1
View File
@@ -46,7 +46,7 @@ Maybe some day:
Never: (so, dont even bother to ask) Never: (so, dont even bother to ask)
====== ======
- different themes for each workspace. Unless you give us a SGI/Power Onyx - different themes for each workspace. Unless you give us a SGI/Power Onyx
with 2 CPUs ;). with 2 CPUs ;).
- anything that requires the mouse pointer to be jumped by WindowMaker to - anything that requires the mouse pointer to be jumped by WindowMaker to
somewhere. This is *terrible* behaviour. And it's not just IMO. somewhere. This is *terrible* behaviour. And it's not just IMO.
- rewrite to use Gtk... I wont even bother to explain why... - rewrite to use Gtk... I wont even bother to explain why...
+3 -3
View File
@@ -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:
@@ -205,7 +205,7 @@ Example .gitconfig
ui = auto ui = auto
[apply] [apply]
whitespace = fix whitespace = fix
+16 -22
View File
@@ -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:
............................ ............................
@@ -69,7 +63,7 @@ Changes since wmaker 0.80.1:
- Fixed small memory leak in the font panel code. - Fixed small memory leak in the font panel code.
- Fixed call to qsort in WMSortArray. - Fixed call to qsort in WMSortArray.
- Fixed a memleak in the file panel. - Fixed a memleak in the file panel.
- Double/triple-click selection in text widgets - Double/triple-click selection in text widgets
(Vitaly Ovtchinnikov <ov@rbcmail.ru>) (Vitaly Ovtchinnikov <ov@rbcmail.ru>)
- Fixed bug in tableview (clicked row callback got incorrect row) - Fixed bug in tableview (clicked row callback got incorrect row)
(Carlos Torres <vlaadbrain@operamail.com>) (Carlos Torres <vlaadbrain@operamail.com>)
@@ -108,7 +102,7 @@ Changes since wmaker 0.70.0:
............................ ............................
- added an internal strcasecmp() (only on systems where is not present) - added an internal strcasecmp() (only on systems where is not present)
- removed some redundant includes of ../src/config.h when wconfig.h is - removed some redundant includes of ../src/config.h when wconfig.h is
included too included too
- removed a wsyserror() message when reading a property list from file - removed a wsyserror() message when reading a property list from file
(the programmer should decide if to give that message or just ignore). (the programmer should decide if to give that message or just ignore).
@@ -123,7 +117,7 @@ Changes since wmaker 0.65.0:
related error when text was selected in a textfiled. related error when text was selected in a textfiled.
- moved wstrdup(), wstrconcat() and wstrappend() from memory.c to string.c - moved wstrdup(), wstrconcat() and wstrappend() from memory.c to string.c
- added property list handling code making libPropList unnecessary and - added property list handling code making libPropList unnecessary and
obsolete. Backward compatibility is provided through the obsolete. Backward compatibility is provided through the
WINGs/proplist-compat.h header file which has #defines from old libPropList WINGs/proplist-compat.h header file which has #defines from old libPropList
function names to new function names with minimal changes. Read this function names to new function names with minimal changes. Read this
header file and the NEWS file for more details about this subject. header file and the NEWS file for more details about this subject.
@@ -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
@@ -203,7 +197,7 @@ changes since wmaker 0.63.1:
changes since wmaker 0.62.1: changes since wmaker 0.62.1:
............................ ............................
- added WRuler widget - added WRuler widget
- added WText widget (rtf multiline text widget) - added WText widget (rtf multiline text widget)
Nwanua Elumeze <nwanua@colorado.edu> Nwanua Elumeze <nwanua@colorado.edu>
- added a new AUTO option for the UseMultiByte option - added a new AUTO option for the UseMultiByte option
- added WMRaiseWidget()/WMLowerWidget() - added WMRaiseWidget()/WMLowerWidget()
@@ -223,7 +217,7 @@ changes since wmaker 0.62.1:
- added WMGetListSelectedItems() - added WMGetListSelectedItems()
- added WMSetListAllowMultipleSelection(), WMListAllowsMultipleSelection(). - added WMSetListAllowMultipleSelection(), WMListAllowsMultipleSelection().
- added WMSetListAllowEmptySelection(), WMListAllowsEmptySelection(). - added WMSetListAllowEmptySelection(), WMListAllowsEmptySelection().
- WMListSelectionDidChangeNotification passes NULL as the notification - WMListSelectionDidChangeNotification passes NULL as the notification
client data (previously passed the selected item row). client data (previously passed the selected item row).
- added WMUnselectListItem(), WMSelectAllListItems(), WMUnselectAllListItems() - added WMUnselectListItem(), WMSelectAllListItems(), WMUnselectAllListItems()
- better behavior of wheel mices in WMList. Simple mouse wheel events - better behavior of wheel mices in WMList. Simple mouse wheel events
@@ -249,8 +243,8 @@ changes since wmaker 0.62.1:
str1 with str2 and returns that in a newly malloc'ed string. str1 with str2 and returns that in a newly malloc'ed string.
Be sure to rename wstrappend with wstrconcat in your code too, else Be sure to rename wstrappend with wstrconcat in your code too, else
hazardous things can happen! hazardous things can happen!
- implemented a new wstrappend() function. wstrappend(dst, src) will append - implemented a new wstrappend() function. wstrappend(dst, src) will append
src to dst modifing dst and returning a pointer to it. No new string is src to dst modifing dst and returning a pointer to it. No new string is
generated, except if dst is NULL, in which case its the same as calling generated, except if dst is NULL, in which case its the same as calling
wstrdup(src). wstrdup(src).
dst can ONLY be NULL or a dynamically allocated string (obtained from a dst can ONLY be NULL or a dynamically allocated string (obtained from a
@@ -340,7 +334,7 @@ changes since wmaker 0.61.1:
item that is beyond the total number of items present in the popup button. item that is beyond the total number of items present in the popup button.
- changed names of functions for SplitView to be consistent. Some contained - changed names of functions for SplitView to be consistent. Some contained
SubView while other Subview. Now all have Subview. SubView while other Subview. Now all have Subview.
- fixed a bug in how input events were posted. Establishing 2 or more input - fixed a bug in how input events were posted. Establishing 2 or more input
handlers for the same file descriptor, handling different (read/write/except) handlers for the same file descriptor, handling different (read/write/except)
events, caused wrong handlers to be called. events, caused wrong handlers to be called.
- Reimplemented the input and idle handlers with WMBag to avoid a functional - Reimplemented the input and idle handlers with WMBag to avoid a functional
@@ -352,7 +346,7 @@ changes since wmaker 0.61.1:
2. if new_size is 0, call wfree(old), and return NULL. 2. if new_size is 0, call wfree(old), and return NULL.
3. if both old is a valid pointer and new_size>0, call realloc. 3. if both old is a valid pointer and new_size>0, call realloc.
- added wstrerror(int errnum) to return the string associated with errnum. - added wstrerror(int errnum) to return the string associated with errnum.
- new wsyserrorwithcode(int error, const char* fmt, ...), similar to - new wsyserrorwithcode(int error, const char* fmt, ...), similar to
wsyserror(), but printing the message for the specified error code. wsyserror(), but printing the message for the specified error code.
- added 3 new classes: WMData, WMHost and WMConnection - added 3 new classes: WMData, WMHost and WMConnection
- fixed a big memory leak in the color panel code (from Pascal Hofstee). - fixed a big memory leak in the color panel code (from Pascal Hofstee).
@@ -363,7 +357,7 @@ changes since wmaker 0.61.0:
- added WMGetTextFieldFont() - added WMGetTextFieldFont()
- escape key in panels (craig nellist <crn@ozemail.com.au>) - escape key in panels (craig nellist <crn@ozemail.com.au>)
- applied patch with fixes and enhancements to textfield - applied patch with fixes and enhancements to textfield
(Franck Wolff <wolff@cybercable.fr>) (Franck Wolff <wolff@cybercable.fr>)
- changed WMList to use WMBag internally, instead of a linked list - changed WMList to use WMBag internally, instead of a linked list
- replaced WMAddSortedListItem() with WMSortListItems() - replaced WMAddSortedListItem() with WMSortListItems()
@@ -443,10 +437,10 @@ changes since wmaker 0.53.0:
The notifications will still work, but using the delegate is preferable The notifications will still work, but using the delegate is preferable
How to convert old code to delegate callbacks: How to convert old code to delegate callbacks:
1 - create a variable (static or dynamic) of the type of the 1 - create a variable (static or dynamic) of the type of the
delegate for the widget type. delegate for the widget type.
2 - Replace the notification observers with the equivalent 2 - Replace the notification observers with the equivalent
delegate callbacks. delegate callbacks.
3 - Put pointers to the callbacks in the delegate variable. 3 - Put pointers to the callbacks in the delegate variable.
Take a look in wfilepanel.c to see how it is used there. Take a look in wfilepanel.c to see how it is used there.
@@ -486,7 +480,7 @@ changes since wmaker 0.51.2:
- added WMColorWellDidChangeNotification - added WMColorWellDidChangeNotification
- added wfindfileinarray() - added wfindfileinarray()
- fixed bug in window title setting - fixed bug in window title setting
(MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>) (MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>)
changes since wmaker 0.51.1: changes since wmaker 0.51.1:
@@ -617,7 +611,7 @@ I don't remember everything, but here it goes:
The same panel will be reused every time you call for it, unless you free it. The same panel will be reused every time you call for it, unless you free it.
- changed semantics of WMCreateFont() so that it returns NULL if the requested - changed semantics of WMCreateFont() so that it returns NULL if the requested
font can't be loaded font can't be loaded
- removed WMAddDestroyCallback() - removed WMAddDestroyCallback()
- fixed bug in WMRemovePopUpButtonItem() - fixed bug in WMRemovePopUpButtonItem()
- added function for user specified item height in WMList - added function for user specified item height in WMList
- added WMSetPopUpButtonText(). It will set the default text in the button - added WMSetPopUpButtonText(). It will set the default text in the button
+1 -1
View File
@@ -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
+2 -3
View File
@@ -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;
+6 -6
View File
@@ -5,26 +5,26 @@ 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
include_HEADERS = wtableview.h wtabledelegates.h include_HEADERS = wtableview.h wtabledelegates.h
lib_LTLIBRARIES = libExtraWINGs.la lib_LTLIBRARIES = libExtraWINGs.la
noinst_PROGRAMS = tableview noinst_PROGRAMS = test
EXTRA_DIST = EXTRA_DIST =
libExtraWINGs_la_SOURCES = \ libExtraWINGs_la_SOURCES = \
wtableview.c \ wtableview.c \
wtabledelegates.c \ wtabledelegates.c \
wtableview.h \ wtableview.h \
wtabledelegates.h wtabledelegates.h
AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@
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);
+4 -4
View File
@@ -11,15 +11,15 @@ WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *table);
WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent); WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent);
WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *table); WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *table);
WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *table); WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *table);
void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate, void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate,
char **options, int count); char **options, int count);
WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent); WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
+8 -14
View File
@@ -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);
+9 -8
View File
@@ -8,17 +8,19 @@ 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
# wbutton.c # wbutton.c
libWINGs_la_SOURCES = \ libWINGs_la_SOURCES = \
configuration.c \ configuration.c \
dragcommon.c \ dragcommon.c \
@@ -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 $@"
+5 -7
View File
@@ -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>
@@ -390,13 +388,13 @@ Property lists handling code
---------------------------- ----------------------------
Code to handle property lists was added to WINGs. It is more robust Code to handle property lists was added to WINGs. It is more robust
than the libPropList code, mostly because some conflicting concepts than the libPropList code, mostly because some conflicting concepts
borrowed from UserDefaults (which libPropList use) are no longer used in borrowed from UserDefaults (which libPropList use) are no longer used in
the WINGs property lists code. These borrowed concepts conflicted with the the WINGs property lists code. These borrowed concepts conflicted with the
retain/release mechanism of property lists and could lead in certain cases retain/release mechanism of property lists and could lead in certain cases
to segmentation faults when executing libPropList based code. But the worse to segmentation faults when executing libPropList based code. But the worse
part was that these libPropList problems were practically unsolvable without part was that these libPropList problems were practically unsolvable without
removing one of those conflicting concepts and without a complete redesign. removing one of those conflicting concepts and without a complete redesign.
The new WINGs property lists code is also better integrated with the other The new WINGs property lists code is also better integrated with the other
data types from WINGs and is actively maintained. data types from WINGs and is actively maintained.
@@ -471,10 +469,10 @@ All WM...IconImage() functions operate on RImages
and will also convert the RImage to a WMPixmap with a threshold of 128 and will also convert the RImage to a WMPixmap with a threshold of 128
and will use that pixmap for the appicon image. If that doesn't satisfy and will use that pixmap for the appicon image. If that doesn't satisfy
you, you can make a call to WMSetApplicationIconPixmap() on your own to you, you can make a call to WMSetApplicationIconPixmap() on your own to
set whatever WMPixmap you see fit for the appicon. set whatever WMPixmap you see fit for the appicon.
- WMSetApplicationIconPixmap() will set the WMPixmap to be used for the - WMSetApplicationIconPixmap() will set the WMPixmap to be used for the
appicon and for the panels appicon and for the panels
If you use only one of the above functions, the corresponding image/pixmap If you use only one of the above functions, the corresponding image/pixmap
+12 -12
View File
@@ -3,35 +3,35 @@
by by
Alfredo Kengi Kojima Alfredo Kengi Kojima
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
reference manual, distributed as a PDF by Apple. The function names, reference manual, distributed as a PDF by Apple. The function names,
structs and most of the intrinsics are very close to OpenStep classes. structs and most of the intrinsics are very close to OpenStep classes.
Internationalization: Internationalization:
@@ -66,7 +66,7 @@ Widgets provided by WINGs:
- input box - input box
- file panel - file panel
- color panel - color panel
- alert panel - alert panel
- font panel - font panel
If you think you can code the following, please do. They are needed by If you think you can code the following, please do. They are needed by
+4 -5
View File
@@ -2,14 +2,14 @@
AUTOMAKE_OPTIONS = AUTOMAKE_OPTIONS =
noinst_PROGRAMS = wtest wmquery wmfile testmywidget 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
wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
@@ -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@
-1
View File
@@ -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();
+1 -1
View File
@@ -4,7 +4,7 @@
#include "mywidget.h" #include "mywidget.h"
_Noreturn void wAbort(void) void wAbort()
{ {
exit(1); exit(1);
} }
+4 -4
View File
@@ -8,16 +8,16 @@ ftp.windowmaker.info</u></font><Br>
</center> </center>
<b><i>Window Maker</b> <b><i>Window Maker</b>
<Img src=upbtn.xpm></i>is the GNU window manager <Img src=upbtn.xpm></i>is the GNU window manager
for the X Window System. It was for the X Window System. It was
designed to emulate the look and feel of part of the NEXTSTEP(tm) GUI. Its designed to emulate the look and feel of part of the NEXTSTEP(tm) GUI. Its
supposed to be relatively fast and small, feature rich, easy to configure and supposed to be relatively fast and small, feature rich, easy to configure and
easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm). easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm).
<p> <p>
<b>Window Maker</b> was designed keeping integration with GNUstep in <b>Window Maker</b> was designed keeping integration with GNUstep in
mind and is the mind and is the
"official" window manager for it. It is also part of the GNU project "official" window manager for it. It is also part of the GNU project
(<u>www.gnu.org</u>) (<u>www.gnu.org</u>)
<p> <p>
<b>What is <i>GNUstep?</i></b><p> <b>What is <i>GNUstep?</i></b><p>
+7 -4
View File
@@ -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");
+5 -3
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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;
@@ -252,7 +254,7 @@ typedef struct W_Screen {
Atom wmIconDragOffsetAtom; Atom wmIconDragOffsetAtom;
Atom wmStateAtom; /* WM_STATE */ Atom wmStateAtom; /* WM_STATE */
Atom utf8String; Atom utf8String;
Atom netwmName; Atom netwmName;
@@ -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 ]--------------------------------------------------------- */
+1 -12
View File
@@ -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);
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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;
+33
View File
@@ -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
+33
View File
@@ -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
View File
@@ -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
View File
@@ -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;
} }
+2 -6
View File
@@ -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;
+2 -2
View File
@@ -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 = \
@@ -71,7 +71,7 @@ POTFILES += \
SUFFIXES = .po .mo SUFFIXES = .po .mo
.po.mo: .po.mo:
$(AM_V_GEN)$(MSGFMT) -c -o $@ $< $(AM_V_GEN)$(MSGFMT) -c -o $@ $<
-1
View File
@@ -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
----- -----
-1
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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"
+2 -3
View File
@@ -3,10 +3,10 @@
# #
# Initial translation # Initial translation
# Gudio Scholz <guido.scholz@bayernline.de> # Gudio Scholz <guido.scholz@bayernline.de>
# #
# Adapted to versions 0.80 ff. # Adapted to versions 0.80 ff.
# Torsten Marek <shlomme@gmx.net> # Torsten Marek <shlomme@gmx.net>
# #
msgid "" msgid ""
msgstr "" msgstr ""
@@ -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"
-1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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"
-1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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);
-6
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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);
-3
View File
@@ -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
View File
@@ -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)
-29
View File
@@ -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
View File
@@ -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);
+10 -290
View File
@@ -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;
} }
-50
View File
@@ -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
View File
@@ -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
View File
@@ -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;
+3
View File
@@ -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
View File
@@ -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;
+66 -110
View File
@@ -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;
@@ -239,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 */
@@ -251,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);
@@ -260,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;
} }
@@ -446,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);
} }
@@ -497,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);
} }
@@ -663,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)
@@ -848,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);
@@ -944,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;
@@ -967,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) {
@@ -1004,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;
@@ -1024,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);
@@ -1046,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;
@@ -1063,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) {
@@ -1082,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;
@@ -1099,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;
@@ -1126,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;
@@ -1152,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) {
@@ -1181,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) {
@@ -1400,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) {
@@ -1451,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;
@@ -1493,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
View File
@@ -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
View File
@@ -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);
-4
View File
@@ -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
View File
@@ -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);
} }
} }
+2 -2
View File
@@ -68,7 +68,7 @@ typedef struct _Panel {
WMButton *autoDelayB[wlengthof_nocheck(auto_delay)][wlengthof_nocheck(autoDelayPresetValues)]; WMButton *autoDelayB[wlengthof_nocheck(auto_delay)][wlengthof_nocheck(autoDelayPresetValues)];
WMTextField *autoDelayT[wlengthof_nocheck(auto_delay)]; WMTextField *autoDelayT[wlengthof_nocheck(auto_delay)];
WMLabel *autoDelayMsL[wlengthof_nocheck(auto_delay)]; WMLabel *autoDelayMsL[wlengthof_nocheck(auto_delay)];
WMFrame *dockF; WMFrame *dockF;
WMButton *docksB[wlengthof_nocheck(dock_config)]; WMButton *docksB[wlengthof_nocheck(dock_config)];
} _Panel; } _Panel;
@@ -267,7 +267,7 @@ static void createPanel(Panel *p)
WMSetBalloonTextForView(_(dock_config[i].balloon_text), WMWidgetView(panel->docksB[i])); WMSetBalloonTextForView(_(dock_config[i].balloon_text), WMWidgetView(panel->docksB[i]));
WMSetButtonAction(panel->docksB[i], pushDockButton, panel); WMSetButtonAction(panel->docksB[i], pushDockButton, panel);
} }
WMMapSubwidgets(panel->dockF); WMMapSubwidgets(panel->dockF);
if (xis) if (xis)
+8 -187
View File
@@ -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);
+16 -13
View File
@@ -1,9 +1,9 @@
/* FontSimple.c- simplified font configuration panel /* FontSimple.c- simplified font configuration panel
* *
* WPrefs - Window Maker Preferences Program * WPrefs - Window Maker Preferences Program
* *
* Copyright (c) 1998-2004 Alfredo K. Kojima * Copyright (c) 1998-2004 Alfredo K. Kojima
* *
* 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
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@@ -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);
-465
View File
@@ -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
View File
@@ -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
View File
@@ -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));
} }
+4 -17
View File
@@ -4,26 +4,15 @@ AUTOMAKE_OPTIONS =
wpexecbindir = @wprefs_bindir@ wpexecbindir = @wprefs_bindir@
wpexecbin_PROGRAMS = WPrefs wpexecbin_PROGRAMS = WPrefs
wpdatadir = @wprefs_datadir@ 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
View File
@@ -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);
+6 -5
View File
@@ -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
View File
@@ -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);
+3 -7
View File
@@ -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"));
+16 -16
View File
@@ -3,12 +3,12 @@
========== ==========
The WindowMaker Prerefences Application The WindowMaker Prerefences Application
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
user guide to be fully aware of all available options and other features user guide to be fully aware of all available options and other features
@@ -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
@@ -26,7 +26,7 @@ option in the attributes panel for the WPrefs window. Of course, it will
use some memory, but by leaving it hidden it'll probably be swapped out and use some memory, but by leaving it hidden it'll probably be swapped out and
stay there until you unhide it. stay there until you unhide it.
WPrefs is still under development. Some of the configuration options are WPrefs is still under development. Some of the configuration options are
not yet configurable from WPrefs, notably the appearance related options. not yet configurable from WPrefs, notably the appearance related options.
It might contain bugs that can corrupt your configuration files, so backup It might contain bugs that can corrupt your configuration files, so backup
the contents of the ~/GNUstep/Defaults directory before using it. the contents of the ~/GNUstep/Defaults directory before using it.
@@ -37,19 +37,19 @@ License
------- -------
Like Window Maker, WPrefs is distributed with through the General Public Like Window Maker, WPrefs is distributed with through the General Public
License (as stated in the file COPYING). License (as stated in the file COPYING).
Notes Notes
----- -----
The mouse speed configuration is saved as a call for xset in 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
system-wide configuration file is saved. system-wide configuration file is saved.
WPrefs only supports property list menus. If you have a plain text file WPrefs only supports property list menus. If you have a plain text file
@@ -68,13 +68,13 @@ WPrefs will be built automatically and installed with the rest of WindowMaker.
Customized Installation Customized Installation
----------------------- -----------------------
By default, WPrefs.app will be installed in the GNUstep applications directory, By default, WPrefs.app will be installed in the GNUstep applications directory,
which is /usr/local/GNUstep/Applications. If you want to install it somewhere which is /usr/local/GNUstep/Applications. If you want to install it somewhere
else, like in /some_weird_path/Applications, set the GNUSTEP_LOCAL_ROOT else, like in /some_weird_path/Applications, set the GNUSTEP_LOCAL_ROOT
environment variable to some_weird_path before running configure for environment variable to some_weird_path before running configure for
WindowMaker. You can also configure Window Maker supplying the --with-gnustepdir WindowMaker. You can also configure Window Maker supplying the --with-gnustepdir
option to configure, like ./configure --with-gnustepdir=/usr/GNUstep/Applications option to configure, like ./configure --with-gnustepdir=/usr/GNUstep/Applications
If you change your mind after installing, you can move the .app directory If you change your mind after installing, you can move the .app directory
to one of the following GNUstep/Applications directories: to one of the following GNUstep/Applications directories:
/usr/GNUstep/Applications /usr/GNUstep/Applications
@@ -93,7 +93,7 @@ Credits
------- -------
User interface design, programming and a few icons: User interface design, programming and a few icons:
Alfredo K. Kojima <kojima@windowmaker.info> Alfredo K. Kojima <kojima@windowmaker.info>
Additional programming: Additional programming:
James Thompson <jamest@math.ksu.edu> James Thompson <jamest@math.ksu.edu>
@@ -108,7 +108,7 @@ Icon and image artwork:
WindowMaker WindowMaker
----------- -----------
If for some weird reason you end up with this preferences program and If for some weird reason you end up with this preferences program and
don't have Window Maker yet, you can get more information about it at don't have Window Maker yet, you can get more information about it at
http://windowmaker.info and download it at ftp://ftp.windowmaker.info http://windowmaker.info and download it at ftp://ftp.windowmaker.info
@@ -116,6 +116,6 @@ http://windowmaker.info and download it at ftp://ftp.windowmaker.info
Contact Contact
------- -------
Send comments and bug reports to kojima@windowmaker.info Send comments and bug reports to kojima@windowmaker.info
Use the WindowMaker BUGFORM to report bugs. Use the WindowMaker BUGFORM to report bugs.
+81 -81
View File
@@ -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
View File
@@ -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");
-9
View File
@@ -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
View File
@@ -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);
+2 -5
View File
@@ -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)
+1 -1
View File
@@ -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;

Some files were not shown because too many files have changed in this diff Show More