X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8704bf74fba8523e2e174bd5a8195b5202009cd0..a7c8e710e944fc12a81a19d06fe415a92e86bb13:/src/motif/xmcombo/xmcombo.c diff --git a/src/motif/xmcombo/xmcombo.c b/src/motif/xmcombo/xmcombo.c index f612df4e95..b5e148b629 100644 --- a/src/motif/xmcombo/xmcombo.c +++ b/src/motif/xmcombo/xmcombo.c @@ -91,6 +91,9 @@ * Cambridge, MA 02139, USA. * */ +#ifdef __VMS +#include +#endif #include #include @@ -116,8 +119,10 @@ #include /* --- Systemspezifische Definitionen */ -#ifdef VMS +#if defined(VMS) #define strcasecmp(s1, s2) strcmp(s1, s2) +#elif defined(__EMX__) +#define strcasecmp stricmp #endif /* --- sonstiger Quark */ @@ -448,7 +453,7 @@ XmComboBoxClassRec xmComboBoxClassRec = { /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, - /* tm_table */ NULL, + /* tm_table */ XtInheritTranslations, /* Changed from NULL: Bug #406153 */ /* query_geometry */ (XtGeometryHandler) QueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL @@ -552,7 +557,10 @@ static XtActionsRec actions[] = { * durchgefuehrt werden. */ static XtTranslations NewEditTranslations, NewEditTranslationsNE, - NewListTranslations, NewListTranslationsE; +#ifdef NODRAGNDROP + NewListTranslations, +#endif + NewListTranslationsE; static XtConvertArgRec ConverterScreenConvertArg[] = { { XtBaseOffset, (XtPointer) XtOffset(Widget, core.screen), @@ -787,6 +795,7 @@ static int WidgetToScreen(Widget w) if ( ScreenOfDisplay(display, i) == screen ) return i; XtError("WidgetToScreen: data structures are destroyed."); + return 0; /* to avoid a compiler warning */ } /* WidgetToScreen */ /* -------------------------------------------------------------------- @@ -799,7 +808,6 @@ static void DoDropDownLayout(XmComboBoxWidget w) Position abs_x, abs_y; Dimension ArrowWidth, ListWidth, ListHeight; Dimension ScreenHeight, LabelWidth; - Window Decoration; XWindowChanges WindowChanges; /* @@ -1258,7 +1266,7 @@ static struct { String Resource; int Flag; } { XmNbackground, BACKGROUND } }; -static UpdateColors(XmComboBoxWidget w, int flags) +static int UpdateColors(XmComboBoxWidget w, int flags) { Pixel Color; int i, size = XtNumber(ColorResources); @@ -1414,7 +1422,7 @@ static Boolean SetValues(XmComboBoxWidget current, XmComboBoxWidget req, * dauerhaft dargestellt wird. */ if ( newW->combobox.ScrollBarDisplayPolicy != - current->combobox.ScrollBarDisplayPolicy ) + current->combobox.ScrollBarDisplayPolicy ) { if ( newW->combobox.StaticList ) XtVaSetValues(newW->combobox.ListCtrl, XmNscrollBarDisplayPolicy, newW->combobox.ScrollBarDisplayPolicy, @@ -1422,7 +1430,8 @@ static Boolean SetValues(XmComboBoxWidget current, XmComboBoxWidget req, else XtWarning( "XmComboBox: ScrollBarDisplayPolicy can not be changed when StaticList == False." - ); +); + } /* Anzahl der in der Liste gleichzeitig darstellbaren Eintraege */ if ( current->combobox.VisibleItemCount != newW->combobox.VisibleItemCount ) { @@ -1432,11 +1441,11 @@ static Boolean SetValues(XmComboBoxWidget current, XmComboBoxWidget req, Update = True; } if ( current->combobox.AutomaticSelection != - newW->combobox.AutomaticSelection ) + newW->combobox.AutomaticSelection ) { XtVaSetValues(newW->combobox.ListCtrl, XmNautomaticSelection, newW->combobox.AutomaticSelection, NULL); - + } /* * benutzter Font: hier erhalten Liste und Eingabefeld jeweils die * gleiche Fontliste, wohingegen das Label getrennt behandelt wird. @@ -1591,6 +1600,8 @@ static void GetValuesAlmost(XmComboBoxWidget w, ArgList args, break; } break; + case RWIGNORE: + ; } /* case read mode */ } /* if entry found */ } /* for every mirrored entry */ @@ -2084,7 +2095,7 @@ static void EditVerifyCallback(Widget w, XtPointer pClientData, XmStringTable Items; int *SelectionList; int SelectionCount; - int i, ItemCount, Start, End; + int i, ItemCount, Start; char *pItem; Boolean Ignore; @@ -2316,9 +2327,8 @@ static Boolean FetchLabelTypeResource(Widget w, char *RscName, char *RscClass, unsigned char *pUChar) { - XrmValue RscValue, RscDest; + XrmValue RscValue; String RepresentationType; - int AInt; if ( FetchResource(w, FullName, FullClass, RscName, RscClass, @@ -2565,7 +2575,6 @@ static void InitMirrorResources(XmComboBoxWidget w) XmStringTable AStringTable; Pixmap APixmap; XmFontList AFontList; - XrmValue RscValue; String AString; KeySym AKeySym; int i, size = XtNumber(ResourceMirror); @@ -2713,8 +2722,6 @@ static void Initialize(Widget request, XmComboBoxWidget newW, Widget w; Arg args[10]; int n = 0; - XmString xmstr; - Pixel BackgroundColor; /* * Da zu allem Ueberfluss die einzelnen Instanzen einer XmComboBox @@ -3061,7 +3068,7 @@ Widget XmComboBoxGetLabelWidget(Widget w) * Deleted Zeigt an, ob der Eintrag geloescht wurde (True) * oder sich nur veraenderte (False) */ -static UpdateComboBox(XmComboBoxWidget w, int Index, Boolean Deleted) +static int UpdateComboBox(XmComboBoxWidget w, int Index, Boolean Deleted) { int OldIndex, ItemCount;