summaryrefslogtreecommitdiff
path: root/xedit.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2004-08-16 16:36:16 +0000
committerKristian Høgsberg <krh@redhat.com>2004-08-16 16:36:16 +0000
commit6b12ddbb33c8722e50e7f69f456ba0ba72b76ddd (patch)
tree6dc1ed1e5b008f3ce289ef72986761931d03336e /xedit.c
parentd980ac394b3f828ce3c03d5894218d712d7b2846 (diff)
As discussed and agreed on on the release-wranglers meeting of August 16,XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901
I'm committing the patch from bug #1060 to back out unconditional Xprint functionality. Back out Xprint changes. Revert xman to CVS of June 5, revert xlogo to CVS of May 8, revert xedit to CVS of April 25, to back out unconditional Xprint support. Fix up Xprint config logic to be like the rest of the extensions: BuildXprint is a one-stop option for disabling everything Xprint related. XprtServer controls building Xprt, BuildXprintLib controls building Xprint libs and BuildXprintClients controls building clients related to Xprint. BuiltXprint defaults to YES and the other options respects relevant settings, i.e. BuildServer and BuildServersOnly. Build Xaw regardless of BuildXprintLib setting. Only build xphelloworld, xplsprinters and xprehashprinterlist when BuildXprintClients it YES. Disable building xmore, it has always supported XawPrintShell. Make Xprint support depend on BuildXprintLib.
Diffstat (limited to 'xedit.c')
-rw-r--r--xedit.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/xedit.c b/xedit.c
index ccab87d..8648c06 100644
--- a/xedit.c
+++ b/xedit.c
@@ -41,7 +41,6 @@ static XtActionsRec actions[] = {
{"quit", QuitAction},
{"save-file", SaveFile},
{"load-file", LoadFile},
-{"print-file", PrintFile},
{"find-file", FindFile},
{"cancel-find-file", CancelFindFile},
{"file-completion", FileCompletion},
@@ -72,6 +71,7 @@ static XawTextPositionInfo infos[3];
Widget topwindow, textwindow, messwidget, labelwindow, filenamewindow;
Widget scratch, hpane, vpanes[2], labels[3], texts[3], forms[3], positions[3];
Widget options_popup, dirlabel, dirwindow;
+Boolean international;
Boolean line_edit;
XawTextWrapMode wrapmodes[3];
@@ -111,11 +111,6 @@ static XtResource resources[] = {
#undef Offset
-String fallback_resources[] = {
- "*international: True", /* set this globally for ALL widgets to avoid wiered crashes */
- NULL
-};
-
int
main(int argc, char *argv[])
{
@@ -123,7 +118,7 @@ main(int argc, char *argv[])
unsigned num_loaded = 0;
XtSetLanguageProc(NULL, NULL, NULL);
- topwindow = XtAppInitialize(&appcon, "Xedit", NULL, 0, &argc, argv, fallback_resources, NULL, 0);
+ topwindow = XtAppInitialize(&appcon, "Xedit", NULL, 0, &argc, argv, NULL, NULL, 0);
XtAppAddActions(appcon, actions, XtNumber(actions));
XtOverrideTranslations
@@ -245,8 +240,9 @@ main(int argc, char *argv[])
flags = 0;
XtSetArg(args[num_args], XtNstring, NULL); num_args++;
}
- source = XtVaCreateWidget("textSource",
- multiSrcObjectClass, topwindow,
+ source = XtVaCreateWidget("textSource", international ?
+ multiSrcObjectClass
+ : asciiSrcObjectClass, topwindow,
XtNtype, XawAsciiFile,
XtNeditType, XawtextEdit,
NULL, NULL);
@@ -306,7 +302,6 @@ makeButtonsAndBoxes(Widget parent)
MakeCommandButton(b_row, "quit", DoQuit);
MakeCommandButton(b_row, "save", DoSave);
MakeCommandButton(b_row, "load", DoLoad);
- MakeCommandButton(b_row, "print", DoPrint);
filenamewindow = MakeStringBox(b_row, "filename", NULL);
}
hintswindow = XtCreateManagedWidget("bc_label", labelWidgetClass,
@@ -352,10 +347,15 @@ makeButtonsAndBoxes(Widget parent)
textwindow = XtCreateManagedWidget(editWindow, asciiTextWidgetClass,
vpanes[0], arglist, num_args);
num_args = 0;
+ XtSetArg(arglist[num_args], XtNinternational, &international); ++num_args;
+ XtGetValues(textwindow, arglist, num_args);
+
+ num_args = 0;
XtSetArg(arglist[num_args], XtNtype, XawAsciiFile); ++num_args;
XtSetArg(arglist[num_args], XtNeditType, XawtextEdit); ++num_args;
- scratch = XtVaCreateWidget("textSource",
- multiSrcObjectClass, topwindow,
+ scratch = XtVaCreateWidget("textSource", international ?
+ multiSrcObjectClass
+ : asciiSrcObjectClass, topwindow,
XtNtype, XawAsciiFile,
XtNeditType, XawtextEdit,
NULL, NULL);