> > Anyway, I think that entire block should actually be moved
> > out into a separate "GXditview-color" app-defaults file.
> > That's the more traditional way of handling color
> > customizations, since the colors are not necessary as
> > builtin fallbacks, and everybody can specify their own
> > colors via Xdefaults anyway.
> 
> Patches are welcome.  My knowledge of X11 programming and
> app-defaults is basically nonexistent.

See the attached files.  These are meant to be copied to
/etc/X11/app-defaults (or wherever your distro normally puts
application defaults) as "GXditview" and "GXditview-color"
(without the ".ad").  The "-color" version just includes the
normal app-defaults file and augments it with color resources.

(Note that although the "#include" looks like a cpp directive,
cpp is not invoked (in contrast to loading a defaults file
with xrdb, which invokes cpp by default); this "#include"
is processed by Xlib itself.)

The "GXditview.ad" file (without the "-color") is to be
processed and embedded in xditview as the builtin fallback
just like before.


GXditview*shapeStyle: rectangle

GXditview.paned.allowResize:         true
GXditview.paned.label.skipAdjust:    true
GXditview.paned.viewport.skipAdjust: false
GXditview.paned.viewport.showGrip:   false
GXditview.paned.viewport.allowVert:  true
GXditview.paned.viewport.allowHoriz: true
GXditview.paned.viewport.forceBars:  true
! viewport size = papersize * resol + scrollbarthickness + 1
! letter size paper
!GXditview.paned.viewport.width:     652
!GXditview.paned.viewport.height:    840
! a4 size paper
GXditview.paned.viewport.width:      635
GXditview.paned.viewport.height:     892
GXditview.paned.viewport.Scrollbar.thickness: 14

GXditview.paned.translations: #augment \
  <Key>Next:      NextPage()\n\
  <Key>n:         NextPage()\n\
  <Key>space:     NextPage()\n\
  <Key>Return:    NextPage()\n\
  <Key>Prior:     PreviousPage()\n\
  <Key>p:         PreviousPage()\n\
  <Key>b:         PreviousPage()\n\
  <Key>BackSpace: PreviousPage()\n\
  <Key>Delete:    PreviousPage()\n\
  <Key>g:         SelectPage()\n\
  <Key>o:         OpenFile()\n\
  <Key>r:         Rerasterize()\n\
  <Key>q:         Quit()
GXditview.paned.viewport.clip.translations: #augment \
  <Btn1Down>:     XawPositionSimpleMenu(menu) MenuPopup(menu)
GXditview.paned.label.translations: #augment \
  <Btn1Down>:     XawPositionSimpleMenu(menu) MenuPopup(menu)
GXditview.paned.viewport.vertical.accelerators: #override \
  <Key>k:     StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
  <Key>j:     StartScroll(Forward)  NotifyScroll(FullLength) EndScroll()\n\
  <Key>Up:    StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
  <Key>Down:  StartScroll(Forward)  NotifyScroll(FullLength) EndScroll()
GXditview.paned.viewport.horizontal.accelerators: #override \
  <Key>h:     StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
  <Key>l:     StartScroll(Forward)  NotifyScroll(FullLength) EndScroll()\n\
  <Key>Left:  StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
  <Key>Right: StartScroll(Forward)  NotifyScroll(FullLength) EndScroll()

GXditview.menu.nextPage.label:     Next Page
GXditview.menu.previousPage.label: Previous Page
GXditview.menu.selectPage.label:   Goto Page
GXditview.menu.print.label:        Print
GXditview.menu.openFile.label:     Open
GXditview.menu.quit.label:         Quit

GXditview.promptShell.allowShellResize: true
GXditview.promptShell.promptDialog.value.translations: #override \
  <Key>Return: Accept() \n\
  <Key>Escape: Cancel()

GXditview.promptShell.promptDialog.accept.label: Accept
GXditview.promptShell.promptDialog.accept.translations: #override \
  <BtnUp>: Accept() unset()

GXditview.promptShell.promptDialog.cancel.label: Cancel
GXditview.promptShell.promptDialog.cancel.translations: #override \
  <BtnUp>: Cancel() unset()

#include "GXditview"

GXditview.paned.viewport.Scrollbar.background: Thistle
GXditview.paned.viewport.Scrollbar.foreground: Orchid
GXditview.paned.viewport.Scrollbar.thumb: None
GXditview.paned.viewport.dvi.background: LemonChiffon
GXditview.paned.viewport.background: Thistle
GXditview.paned.label.background: PeachPuff
GXditview.menu.background: Gold
GXditview.promptShell.promptDialog*background: Gold
GXditview.promptShell.promptDialog.accept.background: DarkOliveGreen1
GXditview.promptShell.promptDialog.cancel.background: RosyBrown1
GXditview.promptShell.promptDialog.value.background: Khaki

Reply via email to