diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-14 19:02:22 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-14 19:02:22 -0200 |
commit | 038f559845ac8b8b45f5a53537b011e169d45f59 (patch) | |
tree | 5403751e67ea55365f3caf7a1f65dfbb0869d465 /main.c | |
parent | cc62903f999ba0c5076861888106365e3561f775 (diff) |
Xgc now in Technicolor
Added a simple Xgc-color resources file.
Corrected a bug that would prevent it from showing 100 in percent
label, due to using a buffer of 3 bytes.
Hardcode "test area" foreground&background to black&white.
Remove a few hardcoded resource values to better work with the new
resources file (some settings may require moving data from Xgc-color
to Xgc, if you don't have a color display).
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -371,12 +371,14 @@ main(int argc, char *argv[]) gcchoiceargs[0].value = (XtArgVal) fontchoice; foregroundchoice = XtCreateManagedWidget("foreground",formWidgetClass,GCform, gcchoiceargs,XtNumber(gcchoiceargs)); - foregroundtext = create_text_choice(foregroundchoice,TForeground,4,50); + foregroundtext = create_text_choice(foregroundchoice,TForeground,9,50); + /* FIXME 9 characters may not be the proper choice; really it + * should understand a more proper pixel specification... */ gcchoiceargs[1].value = (XtArgVal) foregroundchoice; backgroundchoice = XtCreateManagedWidget("background",formWidgetClass,GCform, gcchoiceargs,XtNumber(gcchoiceargs)); - backgroundtext = create_text_choice(backgroundchoice,TBackground,4,50); + backgroundtext = create_text_choice(backgroundchoice,TBackground,9,50); gcchoiceargs[1].value = (XtArgVal) NULL; gcchoiceargs[0].value = (XtArgVal) foregroundchoice; @@ -607,18 +609,8 @@ clear_result_window(void) static void set_foreground_and_background(void) { - static XtResource resources[] = { - {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - XtOffsetOf(XStuff, foreground), XtRString, XtDefaultForeground}, - {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), - XtOffsetOf(XStuff, background), XtRString, XtDefaultBackground} - }; - - XtGetApplicationResources(bigdaddy, (XtPointer) &X, resources, - XtNumber(resources), NULL, (Cardinal) 0); - - X.gcv.foreground = X.foreground; - X.gcv.background = X.background; + X.gcv.foreground = X.foreground = 0; + X.gcv.background = X.background = 0xffffffff; X.fontname = "6x10"; GC_change_font(X.fontname,FALSE); |