summaryrefslogtreecommitdiff
path: root/source3/utils/regedit_dialog.c
Commit message (Collapse)AuthorAgeFilesLines
* source3: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig2019-06-301-3/+2
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* utils: Update error check for new string conversion wrapperSwen Schillig2019-04-111-5/+3
| | | | | | | | | | | The new string conversion wrappers detect and flag errors which occured during the string to integer conversion. Those modifications required an update of the callees error checks. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* utils: Use wrapper for string to integer conversionSwen Schillig2019-03-011-2/+3
| | | | | | | | | | | | In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/utils/Günther Deschner2016-09-281-13/+13
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* regedit: Fix format-nonliteral warningAmitay Isaacs2016-08-241-0/+6
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:utils: rename variables in regedit_*.c to fix shadow warningsStefan Metzmacher2014-11-251-7/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* regedit: handle del and backspace in hexeditorChris Davis2014-10-011-1/+5
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: grow hexedit buffer as the user typesChris Davis2014-10-011-1/+1
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add a button to resize hexedit bufferChris Davis2014-10-011-2/+46
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add a number input boxChris Davis2014-10-011-12/+112
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: don't expand single line text field buffer with cursor movementChris Davis2014-10-011-1/+24
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: handle DEL key in text fieldsChris Davis2014-10-011-0/+3
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: adjust some variable names to make them more distinctChris Davis2014-10-011-19/+19
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: flesh out search dialog and simplify search optsChris Davis2014-10-011-7/+79
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: don't use subwindows in hexeditChris Davis2014-10-011-2/+2
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: use pad as a canvas for dialogsChris Davis2014-10-011-23/+56
| | | | | | | | | | | Drawing in a pad allows the dialog to maintain the same size even when the terminal window is shrunk to some awkwardly small size. It also helps avoid hacks needed to update positions of subwindows when the panel is moved. Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: move cursor to edited value in list and report edit errorsChris Davis2014-10-011-9/+17
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Introduce a new API to build the dialogs.Chris Davis2014-10-011-834/+1634
| | | | | | | | | | | | | | | This helps make new dialogs easier to create, because it provides some common building blocks and a consistent way to deal with user input. Dialogs are divided into sections that stack vertically, and common sections for typical UI things like text boxes, option lists, and buttons are provided. The old dialogs are rewritten to use this API. Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add padding to fit REG_MULTI_SZ to the text fieldChris Davis2014-10-011-8/+21
| | | | | | | | | This fixes a bug loading REG_MULTI_SZ values into the editor dialog, since ncurses fields don't handle newline characters. Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add search feature.Chris Davis2014-10-011-0/+14
| | | | | | | | | | | | | | | | | | Open up a search input with '/'. 'x' key gets the next result. This patch also ensures that keys are always sorted, so that the search order matches the order the keys appear on screen. TODO: + flesh out search interface + find previous + search values Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Mark string values if they contain unprintable chars.C. Davis2013-04-291-1/+1
| | | | | | | Also, edit the values in bin mode to avoid screen glitches. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Add an edit binary command.C. Davis2013-04-291-8/+15
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Handle zero-length buffers better with hexedit.C. Davis2013-04-291-0/+2
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Simplify the editor dialog input loop.C. Davis2013-04-291-47/+56
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Fix white space and wrap long lines.C. Davis2013-04-291-6/+8
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Enable using tab to cycle thru dialog buttons.C. Davis2013-04-291-13/+65
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Restore cursor position when user tabs to a field.C. Davis2013-04-291-0/+5
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Reduce magic numbers in edit dialog, clean up edit dialog creation.C. Davis2013-04-291-79/+183
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Update dialog position on screen resize.C. Davis2013-04-291-45/+90
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Handle term resizes.C. Davis2013-04-291-2/+2
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Edit binary values with hexedit.C. Davis2013-04-291-26/+117
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Add an input dialog.C. Davis2013-04-291-66/+176
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Simplify notice dialogs, don't overwrite existing values.C. Davis2013-04-291-47/+76
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Add new value type selection dialog.C. Davis2013-04-291-1/+114
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Save contents of value editor.C. Davis2013-04-291-16/+128
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Value editor changes.C. Davis2013-04-291-60/+138
| | | | | | | | | | * Handle tab and back-tab for navigating among sections of the editor dialog. * Read in REG_MULTI_SZ values into a multi-line form field. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Some work on dialogs.C. Davis2013-04-291-17/+212
| | | | | | | | | | * Make dialogs modal with a separate getch() loop to avoid extra complexity keeping track of dialogs and getting the result. * Start work on the value editor dialog. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Improve calculation for centering dialogs.C. Davis2013-04-291-10/+32
| | | | | | | Add some sanity checks to avoid crashing. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Introduce dialog windows.C. Davis2013-04-291-0/+233
Link to ncurses "panels" library to support popup dialog windows, and begin working on a small dialog library. Right now, it is useful for "yes/no" confirmation popups, but later it'll be used for more complex forms for editing values. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>