1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-17 06:35:47 +01:00

Some cleanup after the notification removal in textfields.

This commit is contained in:
dan
1999-05-16 00:45:34 +00:00
parent da36a4ee96
commit 55d51e546d
2 changed files with 12 additions and 28 deletions

View File

@@ -45,9 +45,6 @@ typedef struct W_FilePanel {
unsigned int canFreeFileTypes:1;
unsigned int fileMustExist:1;
unsigned int panelType:1;
/**/
unsigned int ignoreTextChangeNotification:1;
} flags;
} W_FilePanel;
@@ -117,9 +114,6 @@ textChangedObserver(void *observerData, WMNotification *notification)
int col = WMGetBrowserNumberOfColumns(panel->browser) - 1;
int i, textEvent;
if (panel->flags.ignoreTextChangeNotification)
return;
if (!(list = WMGetBrowserListInColumn(panel->browser, col)))
return;
@@ -142,11 +136,8 @@ textChangedObserver(void *observerData, WMNotification *notification)
if (textEvent!=WMDeleteTextEvent) {
WMRange range;
panel->flags.ignoreTextChangeNotification = 1;
WMInsertTextFieldText(panel->fileField, &item->text[textLen],
textLen);
panel->flags.ignoreTextChangeNotification = 0;
WMSetTextFieldCursorPosition(panel->fileField, itemTextLen);
range.position = textLen;
range.count = itemTextLen - textLen;
@@ -571,15 +562,11 @@ browserClick(WMBrowser *bPtr, WMFilePanel *panel)
int col = WMGetBrowserSelectedColumn(bPtr);
WMListItem *item = WMGetBrowserSelectedItemInColumn(bPtr, col);
panel->flags.ignoreTextChangeNotification = 1;
if (!item || item->isBranch)
WMSetTextFieldText(panel->fileField, NULL);
else {
WMSetTextFieldText(panel->fileField, item->text);
}
panel->flags.ignoreTextChangeNotification = 0;
}