lib/DtWidget/McdePrefs.c and include/Dt/McdePrefs.h: the reference's
preferences window -- a row of icon tabs from appconfig/icons/C (the active
one pressed), the tab's form under it, no OK or Cancel. A tab's form is
built the first time it is shown; Escape closes, the close box only hides
it. McdePrefsRow() puts a right-aligned label left of a widget and stacks
the rows; McdePrefsSeparator() draws the group lines.
Values are kept in ~/.dt/<prog>.conf as KEY=VALUE (English, the tab shown
last as lasttab=) -- McdePrefsConf.c does that without X, so test_prefs
tests it without a display: get/set, keep the other keys, replace instead of
doubling, no comment pile-up.
dtpad is the first user: Options > Preferences... opens two tabs, "Editing"
(Wrap to fit, Overstrike) and "Window" (Status line). A change goes to the
Dt Editor at once, the Options menu's toggle follows, and the value is
written. At start dtpad overlays ~/.dt/dtpad.conf over its X resources, so
the next start has it.
Measured under Xvfb with xdotool:
- Options > Preferences... shows the icon tabs and the rows
(docs/screenshots/leopard/dtpad-preferences-mcde.png);
- switching "Wrap to fit" on writes "wrap=1" into ~/.dt/dtpad.conf (cat;
the header is written once, lasttab=Editing is kept);
- starting dtpad with "wrap=1" and "status=1" in that file shows the
status line (Line: 1 Total: 1) without any menu being touched -- the
change survives a restart;
- Escape closes the window;
- make check in lib/DtWidget: test_prefs PASS.
Open: dtfile's Prefs.c and dtcalendar (t0149, not built yet) are not moved
to it -- dtpad proves the building block; Command+, still finds a program's
menu entry through the old name heuristic instead of an explicit
registration. Both are follow-up tasks.
42 lines
1.1 KiB
Makefile
42 lines
1.1 KiB
Makefile
unixdir = $(CDE_INSTALLATION_TOP)/app-defaults/C
|
|
|
|
MAINTAINERCLEANFILES = Makefile.in
|
|
|
|
lib_LTLIBRARIES = libDtWidget.la
|
|
|
|
AM_CPPFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" $(DT_INCDIR)
|
|
|
|
libDtWidget_la_CFLAGS = -DI18N_MSG -DMULTIBYTE
|
|
|
|
# in order to try to keep lib versions the same across platforms, (2.1.0)
|
|
if BSD
|
|
libDtWidget_la_LDFLAGS = -version-info 2:1:0
|
|
else
|
|
libDtWidget_la_LDFLAGS = -version-info 3:0:1
|
|
endif
|
|
|
|
if SOLARIS
|
|
libDtWidget_la_CFLAGS += -DNO_REGCOMP
|
|
libDtWidget_la_LIBADD = -lw -lintl
|
|
endif
|
|
|
|
|
|
libDtWidget_la_SOURCES = ComboBox.c Control.c DialogBox.c \
|
|
DtMsgs.c DtStrDefs.c EditAreaData.c \
|
|
EditCalls.c Editor.c Icon.c \
|
|
MenuButton.c NewCvt.c SearchCalls.c \
|
|
SearchDlg.c SpinBox.c TitleBox.c \
|
|
View.c McdePrefs.c McdePrefsConf.c
|
|
|
|
# cpp this...
|
|
BUILT_SOURCES = UNIXbindings
|
|
CLEANFILES = UNIXbindings
|
|
|
|
check_PROGRAMS = test_prefs
|
|
test_prefs_SOURCES = test_prefs.c McdePrefsConf.c
|
|
TESTS = test_prefs
|
|
|
|
UNIXbindings: UNIXbindings.cpp
|
|
$(RM) $@
|
|
$(GENCPP) -P -DXCOMM=# $(AM_CPPFLAGS) $< > $@
|