1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00
Commit Graph

46 Commits

Author SHA1 Message Date
Christophe CURIS
0c659c1618 WINGs: removed unnecessary size checks in WMGetBrowserPaths
The function is building strings from the directory names into an allocated
buffer, but the function took time first to calculate the exact size needed
for the resulting string, so the check on wstrlcat's result will never
fail.

As we still use wstrlcat it is not possible to overrun the buffer, we would
just return a truncated string in the list instead of return no list at all
but the case where it would happen is impossible.

This should fix Coverity #50111 (Resource leak) which was present in the
code of one of the related early return.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:42:18 +00:00
Christophe CURIS
7a39f32816 WINGs: fix possible NULL pointer dereference (Coverity #50197)
As pointed by Coverity, the 'paintItem' function in the WMBrowser widget
is checking for nullity of its text argument, but before that it called the
strlen function which crashes on NULL pointer. This patch moves the strlen
call to the right place and reduce the lifespan of 'textLen' to highlight
incorrect tries to use the variable.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Christophe CURIS
d65430137d WINGs: fix memory leak in WMGetBrowserPaths (Coverity #50111)
As reported by Coverity, in the (rare) case where the wstrlcat would fail
the array for the result would not be freed before returning.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Amadeusz Sławiński
41c943e900 WINGs: Value stored to 'columnX' is never read
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-18 23:00:17 +01:00
Christophe CURIS
ea74fe8871 WINGs: Marked args as unused for compiler in event callback code
The WINGs toolkit dispatch events on widgets using callbacks, which means
having a fixed argument list for the handling function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
702764a7b0 WINGs: Marked args as unused for compiler in widget resize callback code
WINGs dispatches window resize events using callback functions, which
means having a fixed argument list for that function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
a1119f8dd3 WINGs: Added 'const' attribute to functions in wbrowser, wcolorpanel, wfilepanel and wfontpanel
This makes both the API and local function const-correct on their
input parameters.
2013-05-09 16:56:28 +01:00
Tamas TEVESZ
14863cd3b1 WINGs: Bounded string ops
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
a71a604ab1 WINGs: Make wmalloc() intialize allocated memory to 0
- Accordingly remove individual memsets, for now from WINGs only.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
dan
054f954390 Applied some patches from Balaton Zoltan <balaton@eik.bme.hu>
- small fix for compilation in a different directory than the source
- fixed some warnings on 64bit platforms
2006-01-22 15:53:44 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
1e92274495 - Updated WINGs/NEWS with info about hw the API changed how how things
are affected. Fixes for old code too.
- Double buffering in WMList. All widgets or apps using WMList and
  having user drawing porcedures in place will inherit this double
  buffering automatically too.
- New functions in WINGs: WMGetColorAlpha(), WMIsAAFont()
- Misc code cleanups in WINGs and src/dialog.c
2002-10-16 04:05:45 +00:00
dan
2b2fecac12 - Added double buffering when drawing a WMFrame title with an AA font to avoid
flickering.
- Added double buffering when drawing WMList items to avoid flickering
- Shared xft drawable
- Renamed AASystemFont and AABoldSystemFont to AntialiasedSystemFont
  respectively AntialiasedBoldSystemFont in WMGLOBAL
- WMCreateFont falls back to normal fonts if antialiased fonts cannot be
  created (even if enabled)
2002-10-13 18:25:36 +00:00
dan
a2b404b5b3 - API change in WINGs for WMDraw*String().
WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
  arguments. WMDrawImageString() receives 2 colors (text & background).
  This is to allow easy extension for Xft/Xrender and hide X low level details
- Added alpha channel to WMColor. 2 new functions also:
  WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Removed obsoleted acconfig.h and implemented its functionality using
  AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
  This will definitely enforce the need to use autoconf 2.5x
2002-10-08 08:26:06 +00:00
dan
e4a53ba71e fixed some Bool flags passed to WINgs functions to always set 1 or 0 values internally 2002-03-28 04:20:30 +00:00
dan
d40425c388 Fixed mem leak in browser code. 2000-11-01 03:40:36 +00:00
dan
497e34b6b8 - Replaced all free() with wfree() where appropriate
- Fixed some memory leaks
2000-10-31 14:57:22 +00:00
dan
ed39c92de0 Code to allow multiple selection in WMBrowser 2000-10-03 20:52:15 +00:00
dan
de99155948 - Fixed some issues with WMBrowser and the file panel that were
introduced by the latest changes in the WMList code (multiple and empty
  selection).
- added WMSetBrowserAllowMultipleSelection(), WMSetBrowserAllowEmptySelection()
  WMBrowserAllowsMultipleSelection() and WMBrowserAllowsEmptySelection().
2000-10-02 06:59:18 +00:00
dan
b2478b634f - the list multiple selection code is working now. it still needs some
minor work and cleanup.
- made some bag and array functions to return void instead of int.
- a few new array functions.
- better handling of mouse wheel.

!!! make clean after this update before you rebuild. some enums changed.
2000-10-01 23:26:03 +00:00
dan
6973f07f30 Remake of the WMList code to allow multiple selection. Not complete yet.
It will not even compile. I Will finish it later today.
2000-09-28 03:09:57 +00:00
dan
7f74ea8081 Small bugfix, and more updates to typedef'ed functions. 2000-09-25 02:00:55 +00:00
kojima
449a5fde76 fixed misc bugs 2000-04-02 00:04:06 +00:00
dan
d425538578 Changed the browser to use bold fonts for branches. Hardcoded for now. 1999-11-02 21:17:07 +00:00
kojima
94f4483dbd multiview and vertical splitview
some bug fixes
configurable default font size
etc
1999-10-27 22:32:12 +00:00
kojima
80fb09a74e replaced free() with wfree() everywhere
fixed bug in wlist that caused colorpanel to crash
1999-10-09 20:07:23 +00:00
kojima
e82c30b205 replaced linked list with WMBag in WMList
replaced WMAddSorted*** with WMSort***
fixed crash bug in icon chooser
1999-10-03 03:47:21 +00:00
kojima
5e4625dafe many bug fixes, finished some delegate code, updated menu file bug from EXEC
to SHEXEC, updated french translations
1999-05-29 21:41:25 +00:00
dan
64fcfedd48 Fixed some bugs in browser code, related to delegates when setting title of
browser.
1999-05-16 12:40:47 +00:00
kojima
dd2d71fc9b started Appearance update in WPrefs
added tabbed view
changed some callbacks to delegate like stuff (textfield and browser)
1999-05-15 17:38:05 +00:00
dan
6fc9e2a2e5 - fixed a bug with setting initial path in browsers.
- made the paths selector in WPrefs.app use the open file panel.
1999-05-04 23:14:47 +00:00
kojima
4a473b8ad7 *** empty log message *** 1999-04-10 18:27:21 +00:00
kojima
09f8126a38 Bug fixed in wbrowser 1999-03-18 19:53:01 +00:00
kojima
7f9f88940d Initial update from my source tree. For 0.52.0 1999-03-15 23:41:22 +00:00
dan
c56756dc73 Update for 0.52.0. This is a test version, which brings the Appearance
section to WPrefs for testing purposes.
1999-03-14 22:35:50 +00:00
dan
ea5d3bcde3 Some fixes over 0.51.2-pre2, in WINGs, wwindow.c, and FAQ 1999-03-10 15:47:10 +00:00
dan
088c0ac230 Update for 0.51.2-pre2 1999-03-09 14:58:01 +00:00
dan
60980735fe syncing with latst changes, because cvs will be moved 1999-02-23 14:46:39 +00:00
dan
e7495baff7 0.51.1 pre snapshot. Be careful, it may be buggy. It fixes some bugs though. 1999-02-17 11:06:40 +00:00
dan
cb320b2fc3 Update to Window Maker 0.50.2 1999-01-11 12:28:12 +00:00
dan
0261c32636 Code update for Window Maker version 0.50.0
Read changes in ChangeLog and NEWS
1999-01-06 15:22:33 +00:00
dan
345d980be3 Window Maker 0.20.3 1998-11-27 12:26:46 +00:00
dan
9007a6575d This update includes the 0.20.3pre3 code 1998-11-23 11:32:19 +00:00
dan
9af1c6c415 Updating to version 0.20.2
Many bug fixes.
1998-10-21 14:43:47 +00:00
scottc
9d2e6ef9f1 Initial revision 1998-09-29 22:36:29 +00:00