1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-06-18 08:25:23 +02:00

changed indentation to use spaces only

This commit is contained in:
dan
2004-10-12 21:28:27 +00:00
parent 5912898b06
commit 6830b05716
240 changed files with 35951 additions and 35773 deletions
+1
View File
@@ -242,3 +242,4 @@ int main(int argc, char **argv)
return 0; return 0;
} }
+9 -4
View File
@@ -19,13 +19,15 @@ static char *options[] = {
}; };
int numberOfRows(WMTableViewDelegate *self, WMTableView *table) int
numberOfRows(WMTableViewDelegate *self, WMTableView *table)
{ {
return 20; return 20;
} }
void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row) void*
valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
{ {
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column);*/ /*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column);*/
int i; int i;
@@ -46,7 +48,8 @@ void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
} }
void setValueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row, void
setValueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row,
void *data) void *data)
{ {
if ((int)WMGetTableColumnId(column) == 1) if ((int)WMGetTableColumnId(column) == 1)
@@ -65,7 +68,8 @@ static WMTableViewDelegate delegate = {
void clickedTable(WMWidget *w, void *self) void
clickedTable(WMWidget *w, void *self)
{ {
int row = WMGetTableViewClickedRow((WMTableView*)self); int row = WMGetTableViewClickedRow((WMTableView*)self);
@@ -133,3 +137,4 @@ main(int argc, char **argv)
return 0; return 0;
} }
+72 -51
View File
@@ -57,9 +57,9 @@ static char *SelectionColor = "#bbbbcc";
static void stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc, static void
WMColor *textColor, WMFont *font, void *data, stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc, WMColor *textColor,
WMRect rect, Bool selected) WMFont *font, void *data, WMRect rect, Bool selected)
{ {
int x, y; int x, y;
XRectangle rects[1]; XRectangle rects[1];
@@ -91,8 +91,9 @@ static void stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
static void pixmapDraw(WMScreen *scr, Drawable d, GC gc, GC sgc, static void
WMPixmap *pixmap, WMRect rect, Bool selected) pixmapDraw(WMScreen *scr, Drawable d, GC gc, GC sgc, WMPixmap *pixmap,
WMRect rect, Bool selected)
{ {
int x, y; int x, y;
XRectangle rects[1]; XRectangle rects[1];
@@ -135,8 +136,9 @@ static void pixmapDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
static void SECellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) SECellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
StringEditorData *strdata = (StringEditorData*)self->data; StringEditorData *strdata = (StringEditorData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -149,8 +151,9 @@ static void SECellPainter(WMTableColumnDelegate *self,
} }
static void selectedSECellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) selectedSECellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
StringEditorData *strdata = (StringEditorData*)self->data; StringEditorData *strdata = (StringEditorData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -163,8 +166,8 @@ static void selectedSECellPainter(WMTableColumnDelegate *self,
} }
static void beginSECellEdit(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row) beginSECellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
{ {
StringEditorData *strdata = (StringEditorData*)self->data; StringEditorData *strdata = (StringEditorData*)self->data;
WMRect rect = WMTableViewRectForCell(strdata->table, column, row); WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
@@ -178,8 +181,8 @@ static void beginSECellEdit(WMTableColumnDelegate *self,
} }
static void endSECellEdit(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row) endSECellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
{ {
StringEditorData *strdata = (StringEditorData*)self->data; StringEditorData *strdata = (StringEditorData*)self->data;
char *text; char *text;
@@ -191,7 +194,8 @@ static void endSECellEdit(WMTableColumnDelegate *self,
} }
WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *parent) WMTableColumnDelegate*
WTCreateStringEditorDelegate(WMTableView *parent)
{ {
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate)); WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent); WMScreen *scr = WMWidgetScreen(parent);
@@ -221,8 +225,9 @@ WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *parent)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
static void ESCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) ESCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
EnumSelectorData *strdata = (EnumSelectorData*)self->data; EnumSelectorData *strdata = (EnumSelectorData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -236,8 +241,9 @@ static void ESCellPainter(WMTableColumnDelegate *self,
} }
static void selectedESCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) selectedESCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
EnumSelectorData *strdata = (EnumSelectorData*)self->data; EnumSelectorData *strdata = (EnumSelectorData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -251,8 +257,8 @@ static void selectedESCellPainter(WMTableColumnDelegate *self,
} }
static void beginESCellEdit(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row) beginESCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
{ {
EnumSelectorData *strdata = (EnumSelectorData*)self->data; EnumSelectorData *strdata = (EnumSelectorData*)self->data;
WMRect rect = WMTableViewRectForCell(strdata->table, column, row); WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
@@ -269,8 +275,8 @@ static void beginESCellEdit(WMTableColumnDelegate *self,
} }
static void endESCellEdit(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row) endESCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
{ {
EnumSelectorData *strdata = (EnumSelectorData*)self->data; EnumSelectorData *strdata = (EnumSelectorData*)self->data;
int option; int option;
@@ -282,7 +288,8 @@ static void endESCellEdit(WMTableColumnDelegate *self,
} }
WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *parent) WMTableColumnDelegate*
WTCreateEnumSelectorDelegate(WMTableView *parent)
{ {
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate)); WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent); WMScreen *scr = WMWidgetScreen(parent);
@@ -310,8 +317,9 @@ WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *parent)
} }
void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate, void
char **options, int count) WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate, char **options,
int count)
{ {
EnumSelectorData *data = (EnumSelectorData*)delegate->data; EnumSelectorData *data = (EnumSelectorData*)delegate->data;
int i; int i;
@@ -334,8 +342,9 @@ void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate,
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
static void BSCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) BSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data; BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -354,8 +363,9 @@ static void BSCellPainter(WMTableColumnDelegate *self,
} }
static void selectedBSCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) selectedBSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data; BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -375,8 +385,8 @@ static void selectedBSCellPainter(WMTableColumnDelegate *self,
static void beginBSCellEdit(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row) beginBSCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
{ {
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data; BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
WMRect rect = WMTableViewRectForCell(strdata->table, column, row); WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
@@ -390,8 +400,8 @@ static void beginBSCellEdit(WMTableColumnDelegate *self,
} }
static void endBSCellEdit(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row) endBSCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
{ {
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data; BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
int value; int value;
@@ -402,7 +412,8 @@ static void endBSCellEdit(WMTableColumnDelegate *self,
} }
WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent) WMTableColumnDelegate*
WTCreateBooleanSwitchDelegate(WMTableView *parent)
{ {
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate)); WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent); WMScreen *scr = WMWidgetScreen(parent);
@@ -437,8 +448,9 @@ WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
static void SCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) SCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
StringData *strdata = (StringData*)self->data; StringData *strdata = (StringData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -451,8 +463,9 @@ static void SCellPainter(WMTableColumnDelegate *self,
} }
static void selectedSCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) selectedSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
StringData *strdata = (StringData*)self->data; StringData *strdata = (StringData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -465,7 +478,8 @@ static void selectedSCellPainter(WMTableColumnDelegate *self,
} }
WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *parent) WMTableColumnDelegate*
WTCreateStringDelegate(WMTableView *parent)
{ {
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate)); WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent); WMScreen *scr = WMWidgetScreen(parent);
@@ -490,8 +504,9 @@ WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *parent)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
static void PCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) PCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
StringData *strdata = (StringData*)self->data; StringData *strdata = (StringData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -504,8 +519,9 @@ static void PCellPainter(WMTableColumnDelegate *self,
} }
static void selectedPCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) selectedPCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
StringData *strdata = (StringData*)self->data; StringData *strdata = (StringData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -518,7 +534,8 @@ static void selectedPCellPainter(WMTableColumnDelegate *self,
} }
WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView *table) WMTableColumnDelegate*
WTCreatePixmapDelegate(WMTableView *table)
{ {
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate)); WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(table); WMScreen *scr = WMWidgetScreen(table);
@@ -541,8 +558,9 @@ WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView *table)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
static void drawPSCell(WMTableColumnDelegate *self, Drawable d, static void
WMTableColumn *column, int row, Bool selected) drawPSCell(WMTableColumnDelegate *self, Drawable d, WMTableColumn *column,
int row, Bool selected)
{ {
StringData *strdata = (StringData*)self->data; StringData *strdata = (StringData*)self->data;
WMTableView *table = WMGetTableColumnTableView(column); WMTableView *table = WMGetTableColumnTableView(column);
@@ -579,21 +597,24 @@ static void drawPSCell(WMTableColumnDelegate *self, Drawable d,
} }
static void PSCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) PSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
drawPSCell(self, d, column, row, False); drawPSCell(self, d, column, row, False);
} }
static void selectedPSCellPainter(WMTableColumnDelegate *self, static void
WMTableColumn *column, int row, Drawable d) selectedPSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row, Drawable d)
{ {
drawPSCell(self, d, column, row, True); drawPSCell(self, d, column, row, True);
} }
WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent) WMTableColumnDelegate*
WTCreatePixmapStringDelegate(WMTableView *parent)
{ {
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate)); WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent); WMScreen *scr = WMWidgetScreen(parent);
+105 -56
View File
@@ -33,7 +33,8 @@ static void rearrangeHeader(WMTableView *table);
static WMRange rowsInRect(WMTableView *table, WMRect rect); static WMRange rowsInRect(WMTableView *table, WMRect rect);
WMTableColumn *WMCreateTableColumn(char *title) WMTableColumn*
WMCreateTableColumn(char *title)
{ {
WMTableColumn *col = wmalloc(sizeof(WMTableColumn)); WMTableColumn *col = wmalloc(sizeof(WMTableColumn));
@@ -56,19 +57,22 @@ WMTableColumn *WMCreateTableColumn(char *title)
} }
void WMSetTableColumnId(WMTableColumn *column, void *id) void
WMSetTableColumnId(WMTableColumn *column, void *id)
{ {
column->id = id; column->id = id;
} }
void *WMGetTableColumnId(WMTableColumn *column) void*
WMGetTableColumnId(WMTableColumn *column)
{ {
return column->id; return column->id;
} }
void WMSetTableColumnWidth(WMTableColumn *column, unsigned width) void
WMSetTableColumnWidth(WMTableColumn *column, unsigned width)
{ {
if (column->maxWidth == 0) if (column->maxWidth == 0)
column->width = WMAX(column->minWidth, width); column->width = WMAX(column->minWidth, width);
@@ -81,15 +85,16 @@ void WMSetTableColumnWidth(WMTableColumn *column, unsigned width)
} }
void WMSetTableColumnDelegate(WMTableColumn *column, void
WMTableColumnDelegate *delegate) WMSetTableColumnDelegate(WMTableColumn *column, WMTableColumnDelegate *delegate)
{ {
column->delegate = delegate; column->delegate = delegate;
} }
void WMSetTableColumnConstraints(WMTableColumn *column, void
unsigned minWidth, unsigned maxWidth) WMSetTableColumnConstraints(WMTableColumn *column, unsigned minWidth,
unsigned maxWidth)
{ {
wassertr(maxWidth == 0 || minWidth <= maxWidth); wassertr(maxWidth == 0 || minWidth <= maxWidth);
@@ -103,13 +108,15 @@ void WMSetTableColumnConstraints(WMTableColumn *column,
} }
void WMSetTableColumnEditable(WMTableColumn *column, Bool flag) void
WMSetTableColumnEditable(WMTableColumn *column, Bool flag)
{ {
column->editable = ((flag==0) ? 0 : 1); column->editable = ((flag==0) ? 0 : 1);
} }
WMTableView *WMGetTableColumnTableView(WMTableColumn *column) WMTableView*
WMGetTableColumnTableView(WMTableColumn *column)
{ {
return column->table; return column->table;
} }
@@ -192,7 +199,8 @@ static void handleEvents(XEvent *event, void *data);
static void handleTableEvents(XEvent *event, void *data); static void handleTableEvents(XEvent *event, void *data);
static void repaintTable(WMTableView *table); static void repaintTable(WMTableView *table);
static WMSize getTotalSize(WMTableView *table) static WMSize
getTotalSize(WMTableView *table)
{ {
WMSize size; WMSize size;
int i; int i;
@@ -214,7 +222,8 @@ static WMSize getTotalSize(WMTableView *table)
} }
static WMRect getVisibleRect(WMTableView *table) static WMRect
getVisibleRect(WMTableView *table)
{ {
WMSize size = getTotalSize(table); WMSize size = getTotalSize(table);
WMRect rect; WMRect rect;
@@ -239,7 +248,8 @@ static WMRect getVisibleRect(WMTableView *table)
} }
static void scrollToPoint(WMTableView *table, int x, int y) static void
scrollToPoint(WMTableView *table, int x, int y)
{ {
WMSize size = getTotalSize(table); WMSize size = getTotalSize(table);
int i; int i;
@@ -285,7 +295,8 @@ static void scrollToPoint(WMTableView *table, int x, int y)
} }
static void adjustScrollers(WMTableView *table) static void
adjustScrollers(WMTableView *table)
{ {
WMSize size = getTotalSize(table); WMSize size = getTotalSize(table);
WMSize vsize = WMGetViewSize(table->tableView); WMSize vsize = WMGetViewSize(table->tableView);
@@ -326,7 +337,8 @@ static void adjustScrollers(WMTableView *table)
} }
static void doScroll(WMWidget *self, void *data) static void
doScroll(WMWidget *self, void *data)
{ {
WMTableView *table = (WMTableView*)data; WMTableView *table = (WMTableView*)data;
float value; float value;
@@ -485,13 +497,15 @@ splitterHandler(XEvent *event, void *data)
} }
static void realizeTable(void *data, WMNotification *notif) static void
realizeTable(void *data, WMNotification *notif)
{ {
repaintTable(data); repaintTable(data);
} }
WMTableView *WMCreateTableView(WMWidget *parent) WMTableView*
WMCreateTableView(WMWidget *parent)
{ {
WMTableView *table = wmalloc(sizeof(WMTableView)); WMTableView *table = wmalloc(sizeof(WMTableView));
WMScreen *scr = WMWidgetScreen(parent); WMScreen *scr = WMWidgetScreen(parent);
@@ -605,7 +619,8 @@ WMTableView *WMCreateTableView(WMWidget *parent)
} }
void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column) void
WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
{ {
WMScreen *scr = WMWidgetScreen(table); WMScreen *scr = WMWidgetScreen(table);
@@ -649,7 +664,8 @@ void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
} }
void WMSetTableViewHeaderHeight(WMTableView *table, unsigned height) void
WMSetTableViewHeaderHeight(WMTableView *table, unsigned height)
{ {
table->headerHeight = height; table->headerHeight = height;
@@ -657,13 +673,15 @@ void WMSetTableViewHeaderHeight(WMTableView *table, unsigned height)
} }
void WMSetTableViewDelegate(WMTableView *table, WMTableViewDelegate *delegate) void
WMSetTableViewDelegate(WMTableView *table, WMTableViewDelegate *delegate)
{ {
table->delegate = delegate; table->delegate = delegate;
} }
void WMSetTableViewAction(WMTableView *table, WMAction *action, void *clientData) void
WMSetTableViewAction(WMTableView *table, WMAction *action, void *clientData)
{ {
table->action = action; table->action = action;
@@ -671,46 +689,51 @@ void WMSetTableViewAction(WMTableView *table, WMAction *action, void *clientData
} }
void *WMGetTableViewClickedColumn(WMTableView *table) void*
WMGetTableViewClickedColumn(WMTableView *table)
{ {
return table->clickedColumn; return table->clickedColumn;
} }
int WMGetTableViewClickedRow(WMTableView *table) int
WMGetTableViewClickedRow(WMTableView *table)
{ {
return table->clickedRow; return table->clickedRow;
} }
WMArray *WMGetTableViewSelectedRows(WMTableView *table) WMArray*
WMGetTableViewSelectedRows(WMTableView *table)
{ {
return table->selectedRows; return table->selectedRows;
} }
WMView *WMGetTableViewDocumentView(WMTableView *table) WMView*
WMGetTableViewDocumentView(WMTableView *table)
{ {
return table->tableView; return table->tableView;
} }
void *WMTableViewDataForCell(WMTableView *table, WMTableColumn *column, void*
int row) WMTableViewDataForCell(WMTableView *table, WMTableColumn *column, int row)
{ {
return (*table->delegate->valueForCell)(table->delegate, column, row); return (*table->delegate->valueForCell)(table->delegate, column, row);
} }
void WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column, void
int row, void *data) WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column, int row,
void *data)
{ {
(*table->delegate->setValueForCell)(table->delegate, column, row, data); (*table->delegate->setValueForCell)(table->delegate, column, row, data);
} }
WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column, WMRect
int row) WMTableViewRectForCell(WMTableView *table, WMTableColumn *column, int row)
{ {
WMRect rect; WMRect rect;
int i; int i;
@@ -742,20 +765,23 @@ WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column,
} }
void WMSetTableViewDataSource(WMTableView *table, void *source) void
WMSetTableViewDataSource(WMTableView *table, void *source)
{ {
table->dataSource = source; table->dataSource = source;
} }
void *WMGetTableViewDataSource(WMTableView *table) void*
WMGetTableViewDataSource(WMTableView *table)
{ {
return table->dataSource; return table->dataSource;
} }
void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag) void
WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag)
{ {
if (flag) { if (flag) {
if (tPtr->hasHScroller) if (tPtr->hasHScroller)
@@ -790,7 +816,8 @@ void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag)
#if 0 #if 0
/* not supported by now */ /* not supported by now */
void WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag) void
WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag)
{ {
if (flag) { if (flag) {
if (tPtr->hasVScroller) if (tPtr->hasVScroller)
@@ -824,7 +851,8 @@ void WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag)
} }
#endif #endif
void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color) void
WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
{ {
W_SetViewBackgroundColor(table->tableView, color); W_SetViewBackgroundColor(table->tableView, color);
@@ -837,7 +865,8 @@ void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
} }
void WMSetTableViewGridColor(WMTableView *table, WMColor *color) void
WMSetTableViewGridColor(WMTableView *table, WMColor *color)
{ {
WMReleaseColor(table->gridColor); WMReleaseColor(table->gridColor);
table->gridColor = WMRetainColor(color); table->gridColor = WMRetainColor(color);
@@ -848,7 +877,8 @@ void WMSetTableViewGridColor(WMTableView *table, WMColor *color)
void WMSetTableViewRowHeight(WMTableView *table, int height) void
WMSetTableViewRowHeight(WMTableView *table, int height)
{ {
table->rowHeight = height; table->rowHeight = height;
@@ -856,7 +886,8 @@ void WMSetTableViewRowHeight(WMTableView *table, int height)
} }
void WMScrollTableViewRowToVisible(WMTableView *table, int row) void
WMScrollTableViewRowToVisible(WMTableView *table, int row)
{ {
WMScroller *scroller; WMScroller *scroller;
WMRange range; WMRange range;
@@ -883,7 +914,8 @@ void WMScrollTableViewRowToVisible(WMTableView *table, int row)
static void drawGrid(WMTableView *table, WMRect rect) static void
drawGrid(WMTableView *table, WMRect rect)
{ {
WMScreen *scr = WMWidgetScreen(table); WMScreen *scr = WMWidgetScreen(table);
Display *dpy = WMScreenDisplay(scr); Display *dpy = WMScreenDisplay(scr);
@@ -934,7 +966,8 @@ static void drawGrid(WMTableView *table, WMRect rect)
} }
static WMRange columnsInRect(WMTableView *table, WMRect rect) static WMRange
columnsInRect(WMTableView *table, WMRect rect)
{ {
WMTableColumn *column; WMTableColumn *column;
int pos; int pos;
@@ -965,7 +998,8 @@ static WMRange columnsInRect(WMTableView *table, WMRect rect)
} }
static WMRange rowsInRect(WMTableView *table, WMRect rect) static WMRange
rowsInRect(WMTableView *table, WMRect rect)
{ {
WMRange range; WMRange range;
int rh = table->rowHeight; int rh = table->rowHeight;
@@ -980,7 +1014,8 @@ static WMRange rowsInRect(WMTableView *table, WMRect rect)
} }
static void drawRow(WMTableView *table, int row, WMRect clipRect) static void
drawRow(WMTableView *table, int row, WMRect clipRect)
{ {
int i; int i;
WMRange cols = columnsInRect(table, clipRect); WMRange cols = columnsInRect(table, clipRect);
@@ -1002,7 +1037,8 @@ static void drawRow(WMTableView *table, int row, WMRect clipRect)
#if 0 #if 0
static void drawFullRow(WMTableView *table, int row) static void
drawFullRow(WMTableView *table, int row)
{ {
int i; int i;
WMTableColumn *column; WMTableColumn *column;
@@ -1023,7 +1059,8 @@ static void drawFullRow(WMTableView *table, int row)
#endif #endif
static void setRowSelected(WMTableView *table, unsigned row, Bool flag) static void
setRowSelected(WMTableView *table, unsigned row, Bool flag)
{ {
int repaint = 0; int repaint = 0;
@@ -1045,7 +1082,8 @@ static void setRowSelected(WMTableView *table, unsigned row, Bool flag)
} }
static void repaintTable(WMTableView *table) static void
repaintTable(WMTableView *table)
{ {
WMRect rect; WMRect rect;
WMRange rows; WMRange rows;
@@ -1089,7 +1127,8 @@ static void repaintTable(WMTableView *table)
} }
static void stopRowEdit(WMTableView *table, int row) static void
stopRowEdit(WMTableView *table, int row)
{ {
int i; int i;
WMTableColumn *column; WMTableColumn *column;
@@ -1105,7 +1144,8 @@ static void stopRowEdit(WMTableView *table, int row)
void WMEditTableViewRow(WMTableView *table, int row) void
WMEditTableViewRow(WMTableView *table, int row)
{ {
int i; int i;
WMTableColumn *column; WMTableColumn *column;
@@ -1128,7 +1168,8 @@ void WMEditTableViewRow(WMTableView *table, int row)
} }
void WMSelectTableViewRow(WMTableView *table, int row) void
WMSelectTableViewRow(WMTableView *table, int row)
{ {
if (table->clickedRow >= 0) if (table->clickedRow >= 0)
setRowSelected(table, table->clickedRow, False); setRowSelected(table, table->clickedRow, False);
@@ -1147,7 +1188,8 @@ void WMSelectTableViewRow(WMTableView *table, int row)
} }
void WMReloadTableView(WMTableView *table) void
WMReloadTableView(WMTableView *table)
{ {
if (table->editingRow >= 0) if (table->editingRow >= 0)
stopRowEdit(table, table->editingRow); stopRowEdit(table, table->editingRow);
@@ -1180,13 +1222,15 @@ void WMReloadTableView(WMTableView *table)
} }
void WMNoteTableViewNumberOfRowsChanged(WMTableView *table) void
WMNoteTableViewNumberOfRowsChanged(WMTableView *table)
{ {
WMReloadTableView(table); WMReloadTableView(table);
} }
static void handleTableEvents(XEvent *event, void *data) static void
handleTableEvents(XEvent *event, void *data)
{ {
WMTableView *table = (WMTableView*)data; WMTableView *table = (WMTableView*)data;
int row; int row;
@@ -1234,7 +1278,8 @@ static void handleTableEvents(XEvent *event, void *data)
} }
static void handleEvents(XEvent *event, void *data) static void
handleEvents(XEvent *event, void *data)
{ {
WMTableView *table = (WMTableView*)data; WMTableView *table = (WMTableView*)data;
WMScreen *scr = WMWidgetScreen(table); WMScreen *scr = WMWidgetScreen(table);
@@ -1249,13 +1294,15 @@ static void handleEvents(XEvent *event, void *data)
} }
static void handleResize(W_ViewDelegate *self, WMView *view) static void
handleResize(W_ViewDelegate *self, WMView *view)
{ {
reorganizeInterior(view->self); reorganizeInterior(view->self);
} }
static void reorganizeInterior(WMTableView *table) static void
reorganizeInterior(WMTableView *table)
{ {
int width; int width;
int height; int height;
@@ -1309,7 +1356,8 @@ static void reorganizeInterior(WMTableView *table)
} }
static void rearrangeHeader(WMTableView *table) static void
rearrangeHeader(WMTableView *table)
{ {
int width; int width;
int count; int count;
@@ -1338,3 +1386,4 @@ static void rearrangeHeader(WMTableView *table)
handleResize(table->view->delegate, table->view); handleResize(table->view->delegate, table->view);
} }
+1
View File
@@ -49,3 +49,4 @@ int main(int argc, char **argv)
return 0; return 0;
} }
+5 -4
View File
@@ -4,12 +4,12 @@
/* /*
Update: Franck Wolff <frawolff@club-internet.fr> Update: Franck Wolff <frawolff@club-internet.fr>
----------------------------------------------------------------------- -----------------------------------------------------------------------
List of updated functions : List of updated functions :
- main : - main :
add -s option for a save panel... add -s option for a save panel...
----------------------------------------------------------------------- -----------------------------------------------------------------------
*/ */
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
WMPixmap *pixmap; WMPixmap *pixmap;
WMOpenPanel *oPanel; WMOpenPanel *oPanel;
WMSavePanel *sPanel; WMSavePanel *sPanel;
/* RImage *image;*/ /* RImage *image;*/
char *title = NULL; char *title = NULL;
char *initial = "/"; char *initial = "/";
int ch; int ch;
@@ -123,3 +123,4 @@ int main(int argc, char **argv)
} }
return 0; return 0;
} }
+5 -2
View File
@@ -23,7 +23,8 @@ wAbort()
char *ProgName; char *ProgName;
void usage(void) void
usage(void)
{ {
fprintf(stderr, fprintf(stderr,
"usage:\n" "usage:\n"
@@ -44,7 +45,8 @@ void usage(void)
exit(0); exit(0);
} }
int main(int argc, char **argv) int
main(int argc, char **argv)
{ {
Display *dpy = XOpenDisplay(""); Display *dpy = XOpenDisplay("");
WMScreen *scr; WMScreen *scr;
@@ -98,3 +100,4 @@ int main(int argc, char **argv)
printf("\n"); printf("\n");
return 0; return 0;
} }
+5 -4
View File
@@ -28,7 +28,7 @@ Display *dpy;
int windowCount = 0; int windowCount = 0;
void void
closeAction(WMWidget *self, void *data) closeAction(WMWidget *self, void *data)
{ {
WMDestroyWidget(self); WMDestroyWidget(self);
windowCount--; windowCount--;
@@ -117,13 +117,13 @@ testFrame(WMScreen *scr)
/*static void /*static void
resizedWindow(void *self, WMNotification *notif) resizedWindow(void *self, WMNotification *notif)
{ {
WMView *view = (WMView*)WMGetNotificationObject(notif); WMView *view = (WMView*)WMGetNotificationObject(notif);
WMSize size = WMGetViewSize(view); WMSize size = WMGetViewSize(view);
WMResizeWidget((WMWidget*)self, size.width, size.height); WMResizeWidget((WMWidget*)self, size.width, size.height);
}*/ }*/
void void
testBox(WMScreen *scr) testBox(WMScreen *scr)
@@ -1071,3 +1071,4 @@ main(int argc, char **argv)
return 0; return 0;
} }
+3 -2
View File
@@ -464,6 +464,7 @@ typedef void WMAction2(void *self, void *clientData);
typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text, typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text,
int state, WMRect *rect); int state, WMRect *rect);
/* /*
typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr, typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
unsigned int oldWidth, unsigned int oldWidth,
@@ -570,7 +571,7 @@ typedef struct W_DragSourceProcs {
void (*beganDrag)(WMView *self, WMPoint *point); void (*beganDrag)(WMView *self, WMPoint *point);
void (*endedDrag)(WMView *self, WMPoint *point, Bool deposited); void (*endedDrag)(WMView *self, WMPoint *point, Bool deposited);
WMData* (*fetchDragData)(WMView *self, char *type); WMData* (*fetchDragData)(WMView *self, char *type);
/* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/ /*Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
} WMDragSourceProcs; } WMDragSourceProcs;
@@ -1363,7 +1364,7 @@ WMPixmap* WMGetMenuItemMixedStatePixmap(WMMenuItem *item);
WMMenu* WMGetMenuItemSubmenu(WMMenuItem *item); WMMenu* WMGetMenuItemSubmenu(WMMenuItem *item);
Bool WMGetMenuItemHasSubmenu(WMMenuItem *item); Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
*/ */
/* ....................................................................... */ /* ....................................................................... */
+2 -1
View File
@@ -296,7 +296,7 @@ typedef struct W_Screen {
struct W_Pixmap *altUnmountIcon; struct W_Pixmap *altUnmountIcon;
struct W_Pixmap *magnifyIcon; struct W_Pixmap *magnifyIcon;
/* struct W_Pixmap *altMagnifyIcon;*/ /*struct W_Pixmap *altMagnifyIcon;*/
struct W_Pixmap *wheelIcon; struct W_Pixmap *wheelIcon;
struct W_Pixmap *grayIcon; struct W_Pixmap *grayIcon;
struct W_Pixmap *rgbIcon; struct W_Pixmap *rgbIcon;
@@ -649,3 +649,4 @@ void W_FreeViewXdndPart(WMView *view);
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* _WINGSP_H_ */ #endif /* _WINGSP_H_ */
+4 -2
View File
@@ -65,11 +65,13 @@
#endif #endif
/* Stuff for setting the sockets into non-blocking mode. */ /* Stuff for setting the sockets into non-blocking mode. */
/*#ifdef __POSIX_SOURCE /*
#ifdef __POSIX_SOURCE
# define NONBLOCK_OPT O_NONBLOCK # define NONBLOCK_OPT O_NONBLOCK
#else #else
# define NONBLOCK_OPT FNDELAY # define NONBLOCK_OPT FNDELAY
#endif*/ #endif
*/
#define NONBLOCK_OPT O_NONBLOCK #define NONBLOCK_OPT O_NONBLOCK
+1
View File
@@ -272,3 +272,4 @@ W_FreeViewXdndPart(WMView *view)
if (view->dragImage) if (view->dragImage)
WMReleasePixmap(view->dragImage); WMReleasePixmap(view->dragImage);
} }
+2 -1
View File
@@ -60,7 +60,8 @@ static WMArray *inputHandler=NULL;
static void static void
rightNow(struct timeval *tv) { rightNow(struct timeval *tv)
{
X_GETTIMEOFDAY(tv); X_GETTIMEOFDAY(tv);
} }
+1
View File
@@ -935,3 +935,4 @@ int main (void)
return 0; return 0;
} }
#endif /* SNPRINTF_TEST */ #endif /* SNPRINTF_TEST */
+1
View File
@@ -531,3 +531,4 @@ destroyBalloon(Balloon *bPtr)
wfree(bPtr); wfree(bPtr);
} }
+2 -1
View File
@@ -640,7 +640,7 @@ scrollCallback(WMWidget *scroller, void *self)
if (bPtr->firstVisibleColumn != newFirst) if (bPtr->firstVisibleColumn != newFirst)
scrollToColumn(bPtr, newFirst, False); scrollToColumn(bPtr, newFirst, False);
/* else /*else
WMSetScrollerParameters(bPtr->scroller, floatValue, WMSetScrollerParameters(bPtr->scroller, floatValue,
bPtr->maxVisibleColumns/(float)bPtr->columnCount); bPtr->maxVisibleColumns/(float)bPtr->columnCount);
*/ */
@@ -1261,3 +1261,4 @@ createTruncatedString(WMFont *font, char *text, int *textLen, int width)
} }
return textBuf; return textBuf;
} }
+6 -5
View File
@@ -38,15 +38,15 @@
/* BUG There's something fishy with shaped windows */ /* BUG There's something fishy with shaped windows */
/* Whithout shape extension the magnified image is completely broken -Dan */ /* Whithout shape extension the magnified image is completely broken -Dan */
#if 0 #if 0
#ifdef SHAPE # ifdef SHAPE
#define SHAPE_WAS_DEFINED # define SHAPE_WAS_DEFINED
#undef SHAPE # undef SHAPE
#endif # endif
#endif #endif
#ifdef SHAPE #ifdef SHAPE
#include <X11/extensions/shape.h> # include <X11/extensions/shape.h>
#endif #endif
@@ -3784,3 +3784,4 @@ getShift(unsigned char value)
#undef SHAPE_WAS_DEFINED #undef SHAPE_WAS_DEFINED
#define SHAPE #define SHAPE
#endif #endif
+1 -1
View File
@@ -273,7 +273,7 @@ WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName, WMFontFlags flags)
multiByte = False; multiByte = False;
} }
} else if (multiByte) { if (multiByte) {
font = WMCreateFontSet(scrPtr, fontName); font = WMCreateFontSet(scrPtr, fontName);
} else { } else {
font = WMCreateNormalFont(scrPtr, fontName); font = WMCreateNormalFont(scrPtr, fontName);
+1
View File
@@ -275,3 +275,4 @@ destroyFrame(Frame *fPtr)
wfree(fPtr); wfree(fPtr);
} }
+185 -185
View File
@@ -21,96 +21,96 @@
#define CHECK_BUTTON_ON_HEIGHT 16 #define CHECK_BUTTON_ON_HEIGHT 16
static char *CHECK_BUTTON_ON[] = { static char *CHECK_BUTTON_ON[] = {
" %", " %",
" .............%#", " .............%#",
" ........... .%#", " ........... .%#",
" .......... #.%#", " .......... #.%#",
" ......... #%.%#", " ......... #%.%#",
" ........ #%..%#", " ........ #%..%#",
" ... #.. #%...%#", " ... #.. #%...%#",
" ... #% #%....%#", " ... #% #%....%#",
" ... % #%.....%#", " ... % #%.....%#",
" ... #%......%#", " ... #%......%#",
" ... #%.......%#", " ... #%.......%#",
" ...#%........%#", " ...#%........%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" %%%%%%%%%%%%%%#", " %%%%%%%%%%%%%%#",
"%###############"}; "%###############"};
#define CHECK_BUTTON_OFF_WIDTH 16 #define CHECK_BUTTON_OFF_WIDTH 16
#define CHECK_BUTTON_OFF_HEIGHT 16 #define CHECK_BUTTON_OFF_HEIGHT 16
static char *CHECK_BUTTON_OFF[] = { static char *CHECK_BUTTON_OFF[] = {
" %", " %",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" .............%#", " .............%#",
" %%%%%%%%%%%%%%#", " %%%%%%%%%%%%%%#",
"%###############"}; "%###############"};
#define RADIO_BUTTON_ON_WIDTH 15 #define RADIO_BUTTON_ON_WIDTH 15
#define RADIO_BUTTON_ON_HEIGHT 15 #define RADIO_BUTTON_ON_HEIGHT 15
static char *RADIO_BUTTON_ON[] = { static char *RADIO_BUTTON_ON[] = {
".....%%%%%.....", ".....%%%%%.....",
"...%%#####%%...", "...%%#####%%...",
"..%##.....%.%..", "..%##.....%.%..",
".%#%.. .....", ".%#%.. .....",
".%#. ...", ".%#. ...",
"%#.. .. ", "%#.. .. ",
"%#. . ", "%#. . ",
"%#. . ", "%#. . ",
"%#. . ", "%#. . ",
"%#. . ", "%#. . ",
".%%. . .", ".%%. . .",
".%.. . .", ".%.. . .",
"..%... .. ..", "..%... .. ..",
".... ..... ...", ".... ..... ...",
"..... .....", "..... .....",
}; };
#define RADIO_BUTTON_OFF_WIDTH 15 #define RADIO_BUTTON_OFF_WIDTH 15
#define RADIO_BUTTON_OFF_HEIGHT 15 #define RADIO_BUTTON_OFF_HEIGHT 15
static char *RADIO_BUTTON_OFF[] = { static char *RADIO_BUTTON_OFF[] = {
".....%%%%%.....", ".....%%%%%.....",
"...%%#####%%...", "...%%#####%%...",
"..%##.......%..", "..%##.......%..",
".%#%...........", ".%#%...........",
".%#............", ".%#............",
"%#............ ", "%#............ ",
"%#............ ", "%#............ ",
"%#............ ", "%#............ ",
"%#............ ", "%#............ ",
"%#............ ", "%#............ ",
".%%.......... .", ".%%.......... .",
".%........... .", ".%........... .",
"..%......... ..", "..%......... ..",
".... ..... ...", ".... ..... ...",
"..... .....", "..... .....",
}; };
static char *BUTTON_ARROW[] = { static char *BUTTON_ARROW[] = {
"..................", "..................",
"....##....#### ...", "....##....#### ...",
"...#.%....#... ...", "...#.%....#... ...",
"..#..%#####... ...", "..#..%#####... ...",
".#............ ...", ".#............ ...",
"#............. ...", "#............. ...",
".#............ ...", ".#............ ...",
"..#.. ...", "..#.. ...",
"...#. ............", "...#. ............",
"....# ............" "....# ............"
}; };
#define BUTTON_ARROW_WIDTH 18 #define BUTTON_ARROW_WIDTH 18
@@ -118,16 +118,16 @@ static char *BUTTON_ARROW[] = {
static char *BUTTON_ARROW2[] = { static char *BUTTON_ARROW2[] = {
" ", " ",
" ## ####. ", " ## ####. ",
" # % # . ", " # % # . ",
" # %##### . ", " # %##### . ",
" # . ", " # . ",
"# . ", "# . ",
" # . ", " # . ",
" # .......... ", " # .......... ",
" # . ", " # . ",
" #. " " #. "
}; };
#define BUTTON_ARROW2_WIDTH 18 #define BUTTON_ARROW2_WIDTH 18
@@ -135,12 +135,12 @@ static char *BUTTON_ARROW2[] = {
static char *SCROLLER_DIMPLE[] = { static char *SCROLLER_DIMPLE[] = {
".%###.", ".%###.",
"%#%%%%", "%#%%%%",
"#%%...", "#%%...",
"#%.. ", "#%.. ",
"#%. ", "#%. ",
".%. ." ".%. ."
}; };
#define SCROLLER_DIMPLE_WIDTH 6 #define SCROLLER_DIMPLE_WIDTH 6
@@ -148,27 +148,27 @@ static char *SCROLLER_DIMPLE[] = {
static char *SCROLLER_ARROW_UP[] = { static char *SCROLLER_ARROW_UP[] = {
"....%....", "....%....",
"....#....", "....#....",
"...%#%...", "...%#%...",
"...###...", "...###...",
"..%###%..", "..%###%..",
"..#####..", "..#####..",
".%#####%.", ".%#####%.",
".#######.", ".#######.",
"%#######%" "%#######%"
}; };
static char *HI_SCROLLER_ARROW_UP[] = { static char *HI_SCROLLER_ARROW_UP[] = {
" % ", " % ",
" % ", " % ",
" %%% ", " %%% ",
" %%% ", " %%% ",
" %%%%% ", " %%%%% ",
" %%%%% ", " %%%%% ",
" %%%%%%% ", " %%%%%%% ",
" %%%%%%% ", " %%%%%%% ",
"%%%%%%%%%" "%%%%%%%%%"
}; };
#define SCROLLER_ARROW_UP_WIDTH 9 #define SCROLLER_ARROW_UP_WIDTH 9
@@ -176,27 +176,27 @@ static char *HI_SCROLLER_ARROW_UP[] = {
static char *SCROLLER_ARROW_DOWN[] = { static char *SCROLLER_ARROW_DOWN[] = {
"%#######%", "%#######%",
".#######.", ".#######.",
".%#####%.", ".%#####%.",
"..#####..", "..#####..",
"..%###%..", "..%###%..",
"...###...", "...###...",
"...%#%...", "...%#%...",
"....#....", "....#....",
"....%...." "....%...."
}; };
static char *HI_SCROLLER_ARROW_DOWN[] = { static char *HI_SCROLLER_ARROW_DOWN[] = {
"%%%%%%%%%", "%%%%%%%%%",
" %%%%%%% ", " %%%%%%% ",
" %%%%%%% ", " %%%%%%% ",
" %%%%% ", " %%%%% ",
" %%%%% ", " %%%%% ",
" %%% ", " %%% ",
" %%% ", " %%% ",
" % ", " % ",
" % " " % "
}; };
#define SCROLLER_ARROW_DOWN_WIDTH 9 #define SCROLLER_ARROW_DOWN_WIDTH 9
@@ -205,27 +205,27 @@ static char *HI_SCROLLER_ARROW_DOWN[] = {
static char *SCROLLER_ARROW_LEFT[] = { static char *SCROLLER_ARROW_LEFT[] = {
"........%", "........%",
"......%##", "......%##",
"....%####", "....%####",
"..%######", "..%######",
"%########", "%########",
"..%######", "..%######",
"....%####", "....%####",
"......%##", "......%##",
"........%" "........%"
}; };
static char *HI_SCROLLER_ARROW_LEFT[] = { static char *HI_SCROLLER_ARROW_LEFT[] = {
" %", " %",
" %%%", " %%%",
" %%%%%", " %%%%%",
" %%%%%%%", " %%%%%%%",
"%%%%%%%%%", "%%%%%%%%%",
" %%%%%%%", " %%%%%%%",
" %%%%%", " %%%%%",
" %%%", " %%%",
" %" " %"
}; };
#define SCROLLER_ARROW_LEFT_WIDTH 9 #define SCROLLER_ARROW_LEFT_WIDTH 9
@@ -233,27 +233,27 @@ static char *HI_SCROLLER_ARROW_LEFT[] = {
static char *SCROLLER_ARROW_RIGHT[] = { static char *SCROLLER_ARROW_RIGHT[] = {
"%........", "%........",
"##%......", "##%......",
"####%....", "####%....",
"######%..", "######%..",
"########%", "########%",
"######%..", "######%..",
"####%....", "####%....",
"##%......", "##%......",
"%........" "%........"
}; };
static char *HI_SCROLLER_ARROW_RIGHT[] = { static char *HI_SCROLLER_ARROW_RIGHT[] = {
"% ", "% ",
"%%% ", "%%% ",
"%%%%% ", "%%%%% ",
"%%%%%%% ", "%%%%%%% ",
"%%%%%%%%%", "%%%%%%%%%",
"%%%%%%% ", "%%%%%%% ",
"%%%%% ", "%%%%% ",
"%%% ", "%%% ",
"% " "% "
}; };
#define SCROLLER_ARROW_RIGHT_WIDTH 9 #define SCROLLER_ARROW_RIGHT_WIDTH 9
@@ -261,14 +261,14 @@ static char *HI_SCROLLER_ARROW_RIGHT[] = {
static char *POPUP_INDICATOR[] = { static char *POPUP_INDICATOR[] = {
" #==", " #==",
" ......%#==", " ......%#==",
" ......%#%%", " ......%#%%",
" ......%#%%", " ......%#%%",
" %%%%%%%#%%", " %%%%%%%#%%",
"#########%%", "#########%%",
"==%%%%%%%%%", "==%%%%%%%%%",
"==%%%%%%%%%" "==%%%%%%%%%"
}; };
#define POPUP_INDICATOR_WIDTH 11 #define POPUP_INDICATOR_WIDTH 11
@@ -277,13 +277,13 @@ static char *POPUP_INDICATOR[] = {
static char *PULLDOWN_INDICATOR[] = { static char *PULLDOWN_INDICATOR[] = {
"=#######=", "=#######=",
"=%===== =", "=%===== =",
"==%=== ==", "==%=== ==",
"==%=== ==", "==%=== ==",
"===%= ===", "===%= ===",
"===%= ===", "===%= ===",
"====%====" "====%===="
}; };
#define PULLDOWN_INDICATOR_WIDTH 9 #define PULLDOWN_INDICATOR_WIDTH 9
#define PULLDOWN_INDICATOR_HEIGHT 7 #define PULLDOWN_INDICATOR_HEIGHT 7
@@ -293,16 +293,16 @@ static char *PULLDOWN_INDICATOR[] = {
#define CHECK_MARK_HEIGHT 10 #define CHECK_MARK_HEIGHT 10
static char *CHECK_MARK[] = { static char *CHECK_MARK[] = {
"======== ", "======== ",
"======= #", "======= #",
"====== #%", "====== #%",
"===== #%=", "===== #%=",
" #== #%==", " #== #%==",
" #% #%===", " #% #%===",
" % #%====", " % #%====",
" #%=====", " #%=====",
" #%======", " #%======",
"#%======="}; "#%======="};
#define STIPPLE_WIDTH 8 #define STIPPLE_WIDTH 8
+1 -1
View File
@@ -35,7 +35,7 @@ W_InitIMStuff(WMScreen *scr)
return False; return False;
} }
// XGetIMValues(scr->display, //XGetIMValues(scr->display,
} }
+2
View File
@@ -255,3 +255,5 @@ destroyLabel(Label *lPtr)
wfree(lPtr); wfree(lPtr);
} }
+2 -2
View File
@@ -271,7 +271,7 @@ WMGetMenuItemMixedStatePixmap(WMMenuItem *item)
} }
/* #if 0
void void
WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu) WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu)
{ {
@@ -292,5 +292,5 @@ WMGetMenuItemHasSubmenu(WMMenuItem *item)
{ {
return item->submenu != NULL; return item->submenu != NULL;
} }
#endif
*/
+1
View File
@@ -264,3 +264,4 @@ WMDrawPixmap(WMPixmap *pixmap, Drawable d, int x, int y)
XCopyArea(scr->display, pixmap->pixmap, d, scr->clipGC, 0, 0, XCopyArea(scr->display, pixmap->pixmap, d, scr->clipGC, 0, 0,
pixmap->width, pixmap->height, x, y); pixmap->width, pixmap->height, x, y);
} }
+2
View File
@@ -796,3 +796,5 @@ destroyPopUpButton(PopUpButton *bPtr)
wfree(bPtr); wfree(bPtr);
} }
+1
View File
@@ -598,3 +598,4 @@ WMGetGrabbedRulerMargin(WMRuler * rPtr)
return 0; return 0;
return rPtr->flags.whichMarker; return rPtr->flags.whichMarker;
} }
+16 -15
View File
@@ -5,11 +5,11 @@
#include "WINGsP.h" #include "WINGsP.h"
/* /*
char *WMSplitViewDidResizeSubviewsNotification char *WMSplitViewDidResizeSubviewsNotification
= "WMSplitViewDidResizeSubviewsNotification"; = "WMSplitViewDidResizeSubviewsNotification";
char *WMSplitViewWillResizeSubviewsNotification char *WMSplitViewWillResizeSubviewsNotification
= "WMSplitViewWillResizeSubviewsNotification"; = "WMSplitViewWillResizeSubviewsNotification";
*/ */
typedef struct W_SplitViewSubview { typedef struct W_SplitViewSubview {
WMView *view; WMView *view;
@@ -48,28 +48,28 @@ typedef struct W_SplitView {
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews) #define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
#define _AddPSubviewStruct(P) \ #define _AddPSubviewStruct(P) \
(WMAddToArray(sPtr->subviews,((void*)P))) (WMAddToArray(sPtr->subviews,((void*)P)))
#define _GetPSubviewStructAt(i) \ #define _GetPSubviewStructAt(i) \
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i))) ((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
#define _GetSubviewAt(i) \ #define _GetSubviewAt(i) \
(((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->view) (((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->view)
#define _GetMinSizeAt(i) \ #define _GetMinSizeAt(i) \
(((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->minSize) (((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->minSize)
#define _GetMaxSizeAt(i) \ #define _GetMaxSizeAt(i) \
(((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->maxSize) (((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->maxSize)
#define _GetSizeAt(i) \ #define _GetSizeAt(i) \
(((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->size) (((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->size)
#define _GetPosAt(i) \ #define _GetPosAt(i) \
(((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->pos) (((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))->pos)
#define _GetSplitViewSize() \ #define _GetSplitViewSize() \
((sPtr->flags.vertical) ? sPtr->view->size.width : sPtr->view->size.height) ((sPtr->flags.vertical) ? sPtr->view->size.width : sPtr->view->size.height)
static void destroySplitView(WMSplitView *sPtr); static void destroySplitView(WMSplitView *sPtr);
static void paintSplitView(WMSplitView *sPtr); static void paintSplitView(WMSplitView *sPtr);
@@ -730,7 +730,7 @@ WMAddSplitViewSubview(WMSplitView *sPtr, WMView *subview)
WMAddToArray(sPtr->subviews, p); WMAddToArray(sPtr->subviews, p);
reparentView(sPtr, subview, 0); reparentView(sPtr, subview, 0);
/* /*
We should have something like that... We should have something like that...
WMSetViewNotifySizeChanges(subview, True); WMSetViewNotifySizeChanges(subview, True);
@@ -741,7 +741,7 @@ WMAddSplitViewSubview(WMSplitView *sPtr, WMView *subview)
WMAddNotificationObserver(handleSubviewResized, sPtr, WMAddNotificationObserver(handleSubviewResized, sPtr,
WMViewMoveDidChangeNotification, WMViewMoveDidChangeNotification,
subview); subview);
*/ */
if (wasMapped) { if (wasMapped) {
W_MapView(subview); W_MapView(subview);
@@ -843,9 +843,9 @@ WMSetSplitViewVertical(WMSplitView *sPtr, Bool flag)
sPtr->flags.vertical = vertical; sPtr->flags.vertical = vertical;
/* if (sPtr->view->flags.mapped && sPtr->view->flags.realized)*/ /* if (sPtr->view->flags.mapped && sPtr->view->flags.realized)*/
handleViewResized(sPtr, NULL); handleViewResized(sPtr, NULL);
/* else /* else
sPtr->flags.adjustOnPaint = 1; sPtr->flags.adjustOnPaint = 1;
*/ */
} }
@@ -869,3 +869,4 @@ WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
sPtr->resizeSubviewsProc = proc; sPtr->resizeSubviewsProc = proc;
} }
#endif #endif
+1
View File
@@ -1042,3 +1042,4 @@ WMDestroyTabViewItem(WMTabViewItem *item)
wfree(item); wfree(item);
} }
+26 -24
View File
@@ -215,8 +215,10 @@ static unsigned char STIPPLE_BITS[] = {
static char *default_bullet[] = { static char *default_bullet[] = {
"6 6 4 1", "6 6 4 1",
" c None s None", ". c black", " c None s None",
"X c white", "o c #808080", ". c black",
"X c white",
"o c #808080",
" ... ", " ... ",
".XX.. ", ".XX.. ",
".XX..o", ".XX..o",
@@ -376,7 +378,7 @@ sectionWasSelected(Text *tPtr, TextBlock *tb, XRectangle *rect, int s)
return False; return False;
} }
_selEnd: rect->x = tb->sections[s].x + lw; _selEnd: rect->x = tb->sections[s].x + lw;
lw = 0; lw = 0;
while(++i <= tb->sections[s].end) { while(++i <= tb->sections[s].end) {
@@ -409,7 +411,7 @@ _selEnd: rect->x = tb->sections[s].x + lw;
if (selected) { if (selected) {
rect->y = tb->sections[s]._y - tPtr->vpos; rect->y = tb->sections[s]._y - tPtr->vpos;
rect->height = tb->sections[s].h; rect->height = tb->sections[s].h;
if(tb->graphic) { printf("DEBUG: graphic s%d h%d\n", s,tb->sections[s].h);} if(tb->graphic) { printf("DEBUG: graphic s%d h%d\n", s,tb->sections[s].h);}
} }
return selected; return selected;
@@ -512,14 +514,14 @@ setSelectionProperty(WMText *tPtr, WMFont *font, WMColor *color, int underlined)
if(isFont && tPtr->currentTextBlock) { if(isFont && tPtr->currentTextBlock) {
TextBlock *tb = tPtr->currentTextBlock; TextBlock *tb = tPtr->currentTextBlock;
printf("%d %d %d\n", tPtr->sel.y, tPtr->sel.h, tPtr->sel.w); printf("%d %d %d\n", tPtr->sel.y, tPtr->sel.h, tPtr->sel.w);
tPtr->sel.y = 3 + tb->sections[0]._y; tPtr->sel.y = 3 + tb->sections[0]._y;
tPtr->sel.h = tb->sections[tb->nsections-1]._y - tb->sections[0]._y; tPtr->sel.h = tb->sections[tb->nsections-1]._y - tb->sections[0]._y;
tPtr->sel.w = tb->sections[tb->nsections-1].w; tPtr->sel.w = tb->sections[tb->nsections-1].w;
if(tb->sections[tb->nsections-1]._y != tb->sections[0]._y) { if(tb->sections[tb->nsections-1]._y != tb->sections[0]._y) {
tPtr->sel.x = 0; tPtr->sel.x = 0;
} }
printf("%d %d %d\n\n\n", tPtr->sel.y, tPtr->sel.h, tPtr->sel.w); printf("%d %d %d\n\n\n", tPtr->sel.y, tPtr->sel.h, tPtr->sel.w);
} }
} }
@@ -605,7 +607,7 @@ getFirstNonGraphicBlockFor(TextBlock *tb, short dir)
static Bool static Bool
updateStartForCurrentTextBlock(Text *tPtr, int x, int y, int *dir, updateStartForCurrentTextBlock(Text *tPtr, int x, int y, int *dir,
TextBlock *tb) TextBlock *tb)
{ {
if (tPtr->flags.monoFont && tb->graphic) { if (tPtr->flags.monoFont && tb->graphic) {
tb = getFirstNonGraphicBlockFor(tb, *dir); tb = getFirstNonGraphicBlockFor(tb, *dir);
@@ -704,7 +706,7 @@ paintText(Text *tPtr)
break; break;
} }
_getSibling: _getSibling:
if(dir) { if(dir) {
if(tb->next) if(tb->next)
tb = tb->next; tb = tb->next;
@@ -1013,7 +1015,7 @@ updateCursorPosition(Text *tPtr)
tPtr->cursor.x = x; tPtr->cursor.x = x;
/* scroll the bars if the cursor is not visible */ /* scroll the bars if the cursor is not visible */
if(tPtr->flags.editable && tPtr->cursor.x != -23) { if(tPtr->flags.editable && tPtr->cursor.x != -23) {
if(tPtr->cursor.y+tPtr->cursor.h if(tPtr->cursor.y+tPtr->cursor.h
> tPtr->vpos+tPtr->visible.y+tPtr->visible.h) { > tPtr->vpos+tPtr->visible.y+tPtr->visible.h) {
@@ -1217,7 +1219,7 @@ _doneV:
pos = 1; pos = 1;
tPtr->cursor.x += gw; tPtr->cursor.x += gw;
} else { } else {
printf("first %d\n", tb->first); printf("first %d\n", tb->first);
if(tb->prior) { if(tb->prior) {
if(tb->prior->graphic) pos = 1; if(tb->prior->graphic) pos = 1;
else pos = tb->prior->used; else pos = tb->prior->used;
@@ -1717,7 +1719,7 @@ _layOut:
} }
/* not yet fully ready. but is already VERY FAST for a 3Mbyte file ;-) */ /* not yet fully ready. but is already VERY FAST for a 3Mbyte file ;-) */
if(0&&tPtr->flags.laidOut if(0&&tPtr->flags.laidOut
&& tb->next && tb->next->sections && tb->next->nsections>0 && tb->next && tb->next->sections && tb->next->nsections>0
&& (tPtr->vpos + tPtr->visible.h && (tPtr->vpos + tPtr->visible.h
@@ -1729,19 +1731,19 @@ _layOut:
int lh = ltb->sections[ltb->nsections-1].h; int lh = ltb->sections[ltb->nsections-1].h;
int ss, sd; int ss, sd;
lh += 1 + tPtr->visible.y + ltb->sections[ltb->nsections-1].max_d; lh += 1 + tPtr->visible.y + ltb->sections[ltb->nsections-1].max_d;
printf("it's %d\n", tPtr->visible.y + ltb->sections[ltb->nsections-1].max_d); printf("it's %d\n", tPtr->visible.y + ltb->sections[ltb->nsections-1].max_d);
y += layOutLine(tPtr, items, nitems, x, y); y += layOutLine(tPtr, items, nitems, x, y);
ss= ly+lh-y; ss= ly+lh-y;
sd = tPtr->docHeight-y; sd = tPtr->docHeight-y;
printf("dif %d-%d: %d\n", ss, sd, ss-sd); printf("dif %d-%d: %d\n", ss, sd, ss-sd);
y += tb->next->sections[0]._y-y; y += tb->next->sections[0]._y-y;
nitems = 0; nitems = 0;
printf("nitems%d\n", nitems); printf("nitems%d\n", nitems);
if(ss-sd!=0) if(ss-sd!=0)
y = tPtr->docHeight+ss-sd; y = tPtr->docHeight+ss-sd;
break; break;
} else { } else {
@@ -2230,11 +2232,11 @@ autoSelectText(Text *tPtr, int clicks)
switch(tb->text[tPtr->tpos]) { switch(tb->text[tPtr->tpos]) {
case ' ': return; case ' ': return;
/* /*
case '<': case '>': behind = '<'; ahead = '>'; break; case '<': case '>': behind = '<'; ahead = '>'; break;
case '{': case '}': behind = '{'; ahead = '}'; break; case '{': case '}': behind = '{'; ahead = '}'; break;
case '[': case ']': behind = '['; ahead = ']'; break; case '[': case ']': behind = '['; ahead = ']'; break;
*/ */
default: behind = ahead = ' '; default: behind = ahead = ' ';
} }
@@ -2302,7 +2304,7 @@ fontChanged(void *observerData, WMNotification *notification)
{ {
WMText *tPtr = (WMText *) observerData; WMText *tPtr = (WMText *) observerData;
WMFont *font = (WMFont *)WMGetNotificationClientData(notification); WMFont *font = (WMFont *)WMGetNotificationClientData(notification);
printf("fontChanged\n"); printf("fontChanged\n");
if(!tPtr || !font) if(!tPtr || !font)
return; return;
@@ -3007,7 +3009,7 @@ getStream(WMText *tPtr, int sel, int array)
} }
} }
_gSnext:tb = tb->next; _gSnext:tb = tb->next;
} }
/* +1 for the end of string, let's be nice */ /* +1 for the end of string, let's be nice */
+2 -2
View File
@@ -666,7 +666,7 @@ handleEvents(XEvent *event, void *clientData)
} }
} }
break; break;
/* /*
* was causing windows to ignore commands like closeWindow * was causing windows to ignore commands like closeWindow
* after the windows is iconized/restored or a workspace change * after the windows is iconized/restored or a workspace change
* if this is really needed, put the MapNotify portion too and * if this is really needed, put the MapNotify portion too and
@@ -679,7 +679,7 @@ handleEvents(XEvent *event, void *clientData)
WMMapWidget(win); WMMapWidget(win);
break; break;
*/ */
case DestroyNotify: case DestroyNotify:
destroyWindow(win); destroyWindow(win);
break; break;
+98 -98
View File
@@ -173,111 +173,111 @@ static WMTabViewDelegate tabviewDelegate = {
/* XPM */ /* XPM */
static char * blueled_xpm[] = { static char * blueled_xpm[] = {
"8 8 17 1", "8 8 17 1",
" c None", " c None",
". c #020204", ". c #020204",
"+ c #16B6FC", "+ c #16B6FC",
"@ c #176AFC", "@ c #176AFC",
"# c #163AFC", "# c #163AFC",
"$ c #72D2FC", "$ c #72D2FC",
"% c #224CF4", "% c #224CF4",
"& c #76D6FC", "& c #76D6FC",
"* c #16AAFC", "* c #16AAFC",
"= c #CEE9FC", "= c #CEE9FC",
"- c #229EFC", "- c #229EFC",
"; c #164CFC", "; c #164CFC",
"> c #FAFEFC", "> c #FAFEFC",
", c #2482FC", ", c #2482FC",
"' c #1652FC", "' c #1652FC",
") c #1E76FC", ") c #1E76FC",
"! c #1A60FC", "! c #1A60FC",
" .... ", " .... ",
" .=>-@. ", " .=>-@. ",
".=>$@@'.", ".=>$@@'.",
".=$@!;;.", ".=$@!;;.",
".!@*+!#.", ".!@*+!#.",
".#'*+*,.", ".#'*+*,.",
" .@)@,. ", " .@)@,. ",
" .... "}; " .... "};
/* XPM */ /* XPM */
static char *blueled2_xpm[] = { static char *blueled2_xpm[] = {
/* width height num_colors chars_per_pixel */ /* width height num_colors chars_per_pixel */
" 8 8 17 1", " 8 8 17 1",
/* colors */ /* colors */
". c None", ". c None",
"# c #090909", "# c #090909",
"a c #4b63a4", "a c #4b63a4",
"b c #011578", "b c #011578",
"c c #264194", "c c #264194",
"d c #04338c", "d c #04338c",
"e c #989dac", "e c #989dac",
"f c #011a7c", "f c #011a7c",
"g c #465c9c", "g c #465c9c",
"h c #03278a", "h c #03278a",
"i c #6175ac", "i c #6175ac",
"j c #011e74", "j c #011e74",
"k c #043a90", "k c #043a90",
"l c #042f94", "l c #042f94",
"m c #0933a4", "m c #0933a4",
"n c #022184", "n c #022184",
"o c #012998", "o c #012998",
/* pixels */ /* pixels */
"..####..", "..####..",
".#aimn#.", ".#aimn#.",
"#aechnf#", "#aechnf#",
"#gchnjf#", "#gchnjf#",
"#jndknb#", "#jndknb#",
"#bjdddl#", "#bjdddl#",
".#nono#.", ".#nono#.",
"..####.." "..####.."
}; };
/* XPM */ /* XPM */
static char * hand_xpm[] = { static char * hand_xpm[] = {
"22 21 19 1", "22 21 19 1",
" c None", " c None",
". c #030305", ". c #030305",
"+ c #7F7F7E", "+ c #7F7F7E",
"@ c #B5B5B6", "@ c #B5B5B6",
"# c #C5C5C6", "# c #C5C5C6",
"$ c #969697", "$ c #969697",
"% c #FDFDFB", "% c #FDFDFB",
"& c #F2F2F4", "& c #F2F2F4",
"* c #E5E5E4", "* c #E5E5E4",
"= c #ECECEC", "= c #ECECEC",
"- c #DCDCDC", "- c #DCDCDC",
"; c #D2D2D0", "; c #D2D2D0",
"> c #101010", "> c #101010",
", c #767674", ", c #767674",
"' c #676767", "' c #676767",
") c #535355", ") c #535355",
"! c #323234", "! c #323234",
"~ c #3E3C56", "~ c #3E3C56",
"{ c #333147", "{ c #333147",
" ", " ",
" ..... ", " ..... ",
" ..+@##$. ", " ..+@##$. ",
" .%%%&@.......... ", " .%%%&@.......... ",
" .%*%%&#%%%%%%%%%$. ", " .%*%%&#%%%%%%%%%$. ",
" .*#%%%%%%%%%&&&&==. ", " .*#%%%%%%%%%&&&&==. ",
" .-%%%%%%%%%=*-;;;#$. ", " .-%%%%%%%%%=*-;;;#$. ",
" .-%%%%%%%%&..>..... ", " .-%%%%%%%%&..>..... ",
" >-%%%%%%%%%*#+. ", " >-%%%%%%%%%*#+. ",
" >-%%%%%%%%%*@,. ", " >-%%%%%%%%%*@,. ",
" >#%%%%%%%%%*@'. ", " >#%%%%%%%%%*@'. ",
" >$&&%%%%%%=... ", " >$&&%%%%%%=... ",
" .+@@;=&%%&;$,> ", " .+@@;=&%%&;$,> ",
" .',$@####$+). ", " .',$@####$+). ",
" .!',+$++,'. ", " .!',+$++,'. ",
" ..>>>>>. ", " ..>>>>>. ",
" ", " ",
" ~~{{{~~ ", " ~~{{{~~ ",
" {{{{{{{{{{{ ", " {{{{{{{{{{{ ",
" ~~{{{~~ ", " ~~{{{~~ ",
" "}; " "};
@@ -1594,7 +1594,7 @@ updateColorPreviewBox(_Panel *panel, int elements)
paintText(scr, d, panel->colors[7], panel->normalFont, 30, 180, 90, 20, paintText(scr, d, panel->colors[7], panel->normalFont, 30, 180, 90, 20,
WALeft, _("Highlighted")); WALeft, _("Highlighted"));
} }
/* /*
if (elements & ICONT_COL) { if (elements & ICONT_COL) {
WRITE(_("Focused Window"), panel->colors[8], panel->boldFont, WRITE(_("Focused Window"), panel->colors[8], panel->boldFont,
155, 130, 64); 155, 130, 64);
@@ -1798,7 +1798,7 @@ createPanel(Panel *p)
WMAddPopUpButtonItem(panel->secP, _("Titlebar of Menus")); WMAddPopUpButtonItem(panel->secP, _("Titlebar of Menus"));
WMAddPopUpButtonItem(panel->secP, _("Menu Items")); WMAddPopUpButtonItem(panel->secP, _("Menu Items"));
WMAddPopUpButtonItem(panel->secP, _("Icon Background")); WMAddPopUpButtonItem(panel->secP, _("Icon Background"));
/* WMAddPopUpButtonItem(panel->secP, _("Workspace Backgrounds")); /* WMAddPopUpButtonItem(panel->secP, _("Workspace Backgrounds"));
*/ */
WMSetPopUpButtonSelectedItem(panel->secP, 0); WMSetPopUpButtonSelectedItem(panel->secP, 0);
WMSetPopUpButtonAction(panel->secP, changePage, panel); WMSetPopUpButtonAction(panel->secP, changePage, panel);
+2 -1
View File
@@ -168,7 +168,6 @@ createImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
} }
static void static void
createPanel(Panel *p) createPanel(Panel *p)
{ {
@@ -533,3 +532,5 @@ InitConfigurations(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -134,3 +134,4 @@ InitExpert(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -374,3 +374,4 @@ InitFocus(WMScreen *scr, WMWindow *win)
return panel; return panel;
} }
+95 -95
View File
@@ -147,108 +147,108 @@ static char *textureOptions[] = {
/* XPM */ /* XPM */
static char * hand_xpm[] = { static char * hand_xpm[] = {
"22 21 19 1", "22 21 19 1",
" c None", " c None",
". c #030305", ". c #030305",
"+ c #7F7F7E", "+ c #7F7F7E",
"@ c #B5B5B6", "@ c #B5B5B6",
"# c #C5C5C6", "# c #C5C5C6",
"$ c #969697", "$ c #969697",
"% c #FDFDFB", "% c #FDFDFB",
"& c #F2F2F4", "& c #F2F2F4",
"* c #E5E5E4", "* c #E5E5E4",
"= c #ECECEC", "= c #ECECEC",
"- c #DCDCDC", "- c #DCDCDC",
"; c #D2D2D0", "; c #D2D2D0",
"> c #101010", "> c #101010",
", c #767674", ", c #767674",
"' c #676767", "' c #676767",
") c #535355", ") c #535355",
"! c #323234", "! c #323234",
"~ c #3E3C56", "~ c #3E3C56",
"{ c #333147", "{ c #333147",
" ", " ",
" ..... ", " ..... ",
" ..+@##$. ", " ..+@##$. ",
" .%%%&@.......... ", " .%%%&@.......... ",
" .%*%%&#%%%%%%%%%$. ", " .%*%%&#%%%%%%%%%$. ",
" .*#%%%%%%%%%&&&&==. ", " .*#%%%%%%%%%&&&&==. ",
" .-%%%%%%%%%=*-;;;#$. ", " .-%%%%%%%%%=*-;;;#$. ",
" .-%%%%%%%%&..>..... ", " .-%%%%%%%%&..>..... ",
" >-%%%%%%%%%*#+. ", " >-%%%%%%%%%*#+. ",
" >-%%%%%%%%%*@,. ", " >-%%%%%%%%%*@,. ",
" >#%%%%%%%%%*@'. ", " >#%%%%%%%%%*@'. ",
" >$&&%%%%%%=... ", " >$&&%%%%%%=... ",
" .+@@;=&%%&;$,> ", " .+@@;=&%%&;$,> ",
" .',$@####$+). ", " .',$@####$+). ",
" .!',+$++,'. ", " .!',+$++,'. ",
" ..>>>>>. ", " ..>>>>>. ",
" ", " ",
" ~~{{{~~ ", " ~~{{{~~ ",
" {{{{{{{{{{{ ", " {{{{{{{{{{{ ",
" ~~{{{~~ ", " ~~{{{~~ ",
" "}; " "};
static char *up_arrow_xpm[] = { static char *up_arrow_xpm[] = {
"9 9 3 1", "9 9 3 1",
". c #acaaac", ". c #acaaac",
"% c #525552", "% c #525552",
"# c #000000", "# c #000000",
"....%....", "....%....",
"....#....", "....#....",
"...%#%...", "...%#%...",
"...###...", "...###...",
"..%###%..", "..%###%..",
"..#####..", "..#####..",
".%#####%.", ".%#####%.",
".#######.", ".#######.",
"%#######%" "%#######%"
}; };
static char *down_arrow_xpm[] = { static char *down_arrow_xpm[] = {
"9 9 3 1", "9 9 3 1",
". c #acaaac", ". c #acaaac",
"% c #525552", "% c #525552",
"# c #000000", "# c #000000",
"%#######%", "%#######%",
".#######.", ".#######.",
".%#####%.", ".%#####%.",
"..#####..", "..#####..",
"..%###%..", "..%###%..",
"...###...", "...###...",
"...%#%...", "...%#%...",
"....#....", "....#....",
"....%...." "....%...."
}; };
static char *alt_up_arrow_xpm[] = { static char *alt_up_arrow_xpm[] = {
"9 9 2 1", "9 9 2 1",
". c #ffffff", ". c #ffffff",
"% c #525552", "% c #525552",
"....%....", "....%....",
"....%....", "....%....",
"...%%%...", "...%%%...",
"...%%%...", "...%%%...",
"..%%%%%..", "..%%%%%..",
"..%%%%%..", "..%%%%%..",
".%%%%%%%.", ".%%%%%%%.",
".%%%%%%%.", ".%%%%%%%.",
"%%%%%%%%%" "%%%%%%%%%"
}; };
static char *alt_down_arrow_xpm[] = { static char *alt_down_arrow_xpm[] = {
"9 9 2 1", "9 9 2 1",
". c #ffffff", ". c #ffffff",
"% c #525552", "% c #525552",
"%%%%%%%%%", "%%%%%%%%%",
".%%%%%%%.", ".%%%%%%%.",
".%%%%%%%.", ".%%%%%%%.",
"..%%%%%..", "..%%%%%..",
"..%%%%%..", "..%%%%%..",
"...%%%...", "...%%%...",
"...%%%...", "...%%%...",
"....%....", "....%....",
"....%...." "....%...."
}; };
/* XPM */ /* XPM */
@@ -444,8 +444,8 @@ dumpRImage(char *path, RImage *image)
} }
/*static int /*static int
isPixmap(WMPropList *prop) isPixmap(WMPropList *prop)
{ {
WMPropList *p; WMPropList *p;
char *s; char *s;
@@ -455,7 +455,7 @@ isPixmap(WMPropList *prop)
return 1; return 1;
else else
return 0; return 0;
}*/ }*/
static Pixmap static Pixmap
renderTexture(WMScreen *scr, WMPropList *texture, int width, int height, renderTexture(WMScreen *scr, WMPropList *texture, int width, int height,
@@ -951,7 +951,7 @@ paintTextField(void *data, int section)
WMSetTextFieldText(panel->fontT, getFontSampleString(panel)); WMSetTextFieldText(panel->fontT, getFontSampleString(panel));
// "ABCDEFGHIKLMNOPQRSTUVXYWZabcdefghiklmnopqrstuvxywz0123456789\x00e0\x00e6\x00e7\x00eb\x00ee\x00f0\x00f1\x00f3\x00f9\x00fd\x00c0\x00c6\x00c7\x00cb\x00ce\x00d0\x00d1\x00d3\x00d9\x00dd"); // "ABCDEFGHIKLMNOPQRSTUVXYWZabcdefghiklmnopqrstuvxywz0123456789\x00e0\x00e6\x00e7\x00eb\x00ee\x00f0\x00f1\x00f3\x00f9\x00fd\x00c0\x00c6\x00c7\x00cb\x00ce\x00d0\x00d1\x00d3\x00d9\x00dd");
break; break;
/* luckily all these happen to have the MultiByte chars in the same places */ /* luckily all these happen to have the MultiByte chars in the same places */
case 5: /* Japanese jisx0208.1983 */ case 5: /* Japanese jisx0208.1983 */
WMSetTextFieldText(panel->fontT, getFontSampleString(panel)); WMSetTextFieldText(panel->fontT, getFontSampleString(panel));
// "Window Maker ÀßÄê¥æ¡¼¥Æ¥£¥ê¥Æ¥£"); // "Window Maker ÀßÄê¥æ¡¼¥Æ¥£¥ê¥Æ¥£");
+2 -1
View File
@@ -246,7 +246,7 @@ createPanel(Panel *p)
panel->optF = WMCreateFrame(panel->box); panel->optF = WMCreateFrame(panel->box);
WMResizeWidget(panel->optF, 260, 70); WMResizeWidget(panel->optF, 260, 70);
WMMoveWidget(panel->optF, 25, 150); WMMoveWidget(panel->optF, 25, 150);
/* WMSetFrameTitle(panel->optF, _("Icon Display"));*/ /* WMSetFrameTitle(panel->optF, _("Icon Display"));*/
panel->arrB = WMCreateSwitchButton(panel->optF); panel->arrB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->arrB, 235, 20); WMResizeWidget(panel->arrB, 235, 20);
@@ -356,3 +356,4 @@ InitIcons(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+3 -2
View File
@@ -96,7 +96,7 @@ createPanel(Panel *p)
panel->dmsT = WMCreateTextField(panel->delaF); panel->dmsT = WMCreateTextField(panel->delaF);
WMResizeWidget(panel->dmsT, 50, 20); WMResizeWidget(panel->dmsT, 50, 20);
WMMoveWidget(panel->dmsT, 345, 25); WMMoveWidget(panel->dmsT, 345, 25);
/* WMSetTextFieldAlignment(panel->dmsT, WARight);*/ /* WMSetTextFieldAlignment(panel->dmsT, WARight);*/
panel->dmsL = WMCreateLabel(panel->delaF); panel->dmsL = WMCreateLabel(panel->delaF);
WMResizeWidget(panel->dmsL, 30, 16); WMResizeWidget(panel->dmsL, 30, 16);
@@ -137,7 +137,7 @@ createPanel(Panel *p)
panel->rmsT = WMCreateTextField(panel->rateF); panel->rmsT = WMCreateTextField(panel->rateF);
WMResizeWidget(panel->rmsT, 50, 20); WMResizeWidget(panel->rmsT, 50, 20);
WMMoveWidget(panel->rmsT, 345, 25); WMMoveWidget(panel->rmsT, 345, 25);
/* WMSetTextFieldAlignment(panel->rmsT, WARight);*/ /* WMSetTextFieldAlignment(panel->rmsT, WARight);*/
panel->rmsL = WMCreateLabel(panel->rateF); panel->rmsL = WMCreateLabel(panel->rateF);
WMResizeWidget(panel->rmsL, 30, 16); WMResizeWidget(panel->rmsL, 30, 16);
@@ -182,3 +182,4 @@ InitKeyboardSettings(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+2 -4
View File
@@ -134,10 +134,7 @@ static char *keyOptions[] = {
/* from Xlib */ /* from Xlib */
static void static void
XConvertCase(sym, lower, upper) XConvertCase(register KeySym sym, KeySym *lower, KeySym *upper)
register KeySym sym;
KeySym *lower;
KeySym *upper;
{ {
*lower = sym; *lower = sym;
*upper = sym; *upper = sym;
@@ -654,3 +651,4 @@ InitKeyboardShortcuts(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -240,3 +240,4 @@ InitMenuPreferences(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -860,3 +860,4 @@ InitMouseSettings(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -348,3 +348,4 @@ InitPaths(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -359,3 +359,4 @@ InitPreferences(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+9 -4
View File
@@ -1504,7 +1504,7 @@ CreateTexturePanel(WMWindow *keyWindow)
WMSetButtonText(panel->browB, _("Browse...")); WMSetButtonText(panel->browB, _("Browse..."));
WMSetButtonAction(panel->browB, browseImageCallback, panel); WMSetButtonAction(panel->browB, browseImageCallback, panel);
/* panel->dispB = WMCreateCommandButton(panel->imageF); /* panel->dispB = WMCreateCommandButton(panel->imageF);
WMResizeWidget(panel->dispB, 90, 24); WMResizeWidget(panel->dispB, 90, 24);
WMMoveWidget(panel->dispB, 190, 80); WMMoveWidget(panel->dispB, 190, 80);
WMSetButtonText(panel->dispB, _("Show")); WMSetButtonText(panel->dispB, _("Show"));
@@ -1619,17 +1619,21 @@ testOKButton(WMWidget *self, void *data)
} }
void testCancelButton(WMWidget *self, void *data){ void
testCancelButton(WMWidget *self, void *data)
{
wwarning("Exiting test...."); wwarning("Exiting test....");
exit(0); exit(0);
} }
void wAbort() void
wAbort()
{ {
exit(1); exit(1);
} }
int main(int argc, char **argv) int
main(int argc, char **argv)
{ {
TexturePanel *panel; TexturePanel *panel;
@@ -1661,3 +1665,4 @@ int main(int argc, char **argv)
return 0; return 0;
} }
#endif #endif
+1
View File
@@ -258,3 +258,4 @@ InitThemes(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+6 -6
View File
@@ -136,16 +136,16 @@ save(WMWidget *w, void *data)
XEvent ev; XEvent ev;
/* puts("gathering data");*/ /* puts("gathering data");*/
for (i=0; i<WPrefs.sectionCount; i++) { for (i=0; i<WPrefs.sectionCount; i++) {
PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]); PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]);
if ((rec->callbacks.flags & INITIALIZED_PANEL)) if ((rec->callbacks.flags & INITIALIZED_PANEL))
savePanelData((Panel*)rec); savePanelData((Panel*)rec);
} }
/* puts("compressing data");*/ /* puts("compressing data");*/
/* compare the user dictionary with the global and remove redundant data */ /* compare the user dictionary with the global and remove redundant data */
keyList = WMGetPLDictionaryKeys(GlobalDB); keyList = WMGetPLDictionaryKeys(GlobalDB);
/* puts(WMGetPropListDescription(WindowMakerDB, False));*/ /* puts(WMGetPropListDescription(WindowMakerDB, False));*/
for (i=0; i<WMGetPropListItemCount(keyList); i++) { for (i=0; i<WMGetPropListItemCount(keyList); i++) {
key = WMGetFromPLArray(keyList, i); key = WMGetFromPLArray(keyList, i);
@@ -162,9 +162,9 @@ save(WMWidget *w, void *data)
if (WMIsPropListEqualTo(p1, p2)) if (WMIsPropListEqualTo(p1, p2))
WMRemoveFromPLDictionary(WindowMakerDB, key); WMRemoveFromPLDictionary(WindowMakerDB, key);
} }
/* puts(WMGetPropListDescription(WindowMakerDB, False));*/ /* puts(WMGetPropListDescription(WindowMakerDB, False));*/
WMReleasePropList(keyList); WMReleasePropList(keyList);
/* puts("storing data");*/ /* puts("storing data");*/
WMWritePropListToFile(WindowMakerDB, WindowMakerDBPath, True); WMWritePropListToFile(WindowMakerDB, WindowMakerDBPath, True);
@@ -422,7 +422,7 @@ changeSection(WMWidget *self, void *data)
WMSetFrameRelief(WPrefs.banner, WRGroove); WMSetFrameRelief(WPrefs.banner, WRGroove);
/* WMMapWidget(WPrefs.undosBtn); /* WMMapWidget(WPrefs.undosBtn);
WMMapWidget(WPrefs.undoBtn); WMMapWidget(WPrefs.undoBtn);
*/ */
WMMapWidget(WPrefs.saveBtn); WMMapWidget(WPrefs.saveBtn);
+1
View File
@@ -460,3 +460,4 @@ InitWindowHandling(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -375,3 +375,4 @@ InitWorkspace(WMScreen *scr, WMWidget *parent)
return panel; return panel;
} }
+1
View File
@@ -3,3 +3,4 @@ typedef struct W_DoubleTest DoubleTest;
DoubleTest *CreateDoubleTest(WMWidget *parent, char *text); DoubleTest *CreateDoubleTest(WMWidget *parent, char *text);
+1
View File
@@ -185,3 +185,4 @@ main(int argc, char **argv)
WMHandleEvent(&event); WMHandleEvent(&event);
} }
} }
+18 -16
View File
@@ -1,9 +1,9 @@
/* Grok X modifier mappings for shortcuts. /* Grok X modifier mappings for shortcuts.
Most of this code was taken from src/event-Xt.c in XEmacs 20.3-b17. Most of this code was taken from src/event-Xt.c in XEmacs 20.3-b17.
The copyright(s) from the original XEmacs code are included below. The copyright(s) from the original XEmacs code are included below.
Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */ Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */
/* /*
* More changes for WPrefs by Alfredo Kojima, Aug 1998 * More changes for WPrefs by Alfredo Kojima, Aug 1998
@@ -14,22 +14,22 @@
Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1996 Ben Wing. Copyright (C) 1996 Ben Wing.
This file is part of XEmacs. This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any Free Software Foundation; either version 2, or (at your option) any
later version. later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <string.h> #include <string.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
@@ -267,3 +267,5 @@ ModifierFromKey(Display *dpy, char *key)
else else
return -1; return -1;
} }
+1
View File
@@ -110,3 +110,4 @@ typedef struct {
#define WMFHideApplication 12 #define WMFHideApplication 12
#endif #endif
+1
View File
@@ -514,3 +514,4 @@ extern const char *WMNWorkspaceNameChanged;
extern const char *WMNResetStacking; extern const char *WMNResetStacking;
#endif #endif
+1
View File
@@ -70,3 +70,4 @@ void wUnfullscreenWindow(WWindow *wwin);
#endif #endif
+1
View File
@@ -98,3 +98,4 @@ Bool wAppIconChangeImage(WAppIcon *icon, char *file);
void wAppIconMove(WAppIcon *aicon, int x, int y); void wAppIconMove(WAppIcon *aicon, int x, int y);
#endif #endif
+1 -1
View File
@@ -79,7 +79,7 @@ makeMainWindow(WScreen *scr, Window window)
wwin->client_win = window; wwin->client_win = window;
wwin->main_window = window; wwin->main_window = window;
wwin->wm_hints = XGetWMHints(dpy, window); wwin->wm_hints = XGetWMHints(dpy, window);
/* if (!MyXFetchName(dpy, window, &(wwin->frame->title))) { /* if (!MyXFetchName(dpy, window, &(wwin->frame->title))) {
wwin->frame->title = NULL; wwin->frame->title = NULL;
} }
*/ */
+1
View File
@@ -71,3 +71,4 @@ void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
#endif #endif
#endif #endif
+1 -1
View File
@@ -183,7 +183,7 @@ wClientConfigure(WWindow *wwin, XConfigureRequestEvent *xcre)
int nx, ny, nwidth, nheight; int nx, ny, nwidth, nheight;
int ofs_x, ofs_y; int ofs_x, ofs_y;
/* printf("configure event: %d %d %d %d\n", xcre->x, xcre->y, xcre->width, xcre->height);*/ /* printf("configure event: %d %d %d %d\n", xcre->x, xcre->y, xcre->width, xcre->height);*/
if (wwin==NULL) { if (wwin==NULL) {
/* /*
+1
View File
@@ -136,3 +136,4 @@ wColormapAllowClientInstallation(WScreen *scr, Bool starting)
XSync(dpy, False); XSync(dpy, False);
} }
} }
+2 -2
View File
@@ -318,8 +318,8 @@ StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
/* /*
* place window in center of current head * place window in center of current head
*/ */
WMPoint center = wGetPointToCenterRectInHead(scr, WMPoint center =
wGetHeadForPointerLocation(scr), wGetPointToCenterRectInHead(scr, wGetHeadForPointerLocation(scr),
0, 0); 0, 0);
OpenSwitchMenu(scr, center.x, center.y, False); OpenSwitchMenu(scr, center.x, center.y, False);
} }
+55 -55
View File
@@ -31,70 +31,70 @@ static unsigned char MENU_SHADE_INDICATOR_XBM_DATA[] = {
/* the first one is for normal state, the second is for when /* the first one is for normal state, the second is for when
* the button is pushed */ * the button is pushed */
static char *PRED_CLOSE_XPM[] = { static char *PRED_CLOSE_XPM[] = {
"10 10 3 1", "10 10 3 1",
" c #000000", " c #000000",
". c #616561", ". c #616561",
"X c None", "X c None",
" .XXXXXX. ", " .XXXXXX. ",
". .XXXX. .", ". .XXXX. .",
"X. .XX. .X", "X. .XX. .X",
"XX. .. .XX", "XX. .. .XX",
"XXX. .XXX", "XXX. .XXX",
"XXX. .XXX", "XXX. .XXX",
"XX. .. .XX", "XX. .. .XX",
"X. .XX. .X", "X. .XX. .X",
". .XXXX. .", ". .XXXX. .",
" .XXXXXX. "}; " .XXXXXX. "};
static char *PRED_BROKEN_CLOSE_XPM[] = { static char *PRED_BROKEN_CLOSE_XPM[] = {
"10 10 3 1", "10 10 3 1",
" c #000000", " c #000000",
". c #616561", ". c #616561",
"X c None", "X c None",
" .XXXXXX. ", " .XXXXXX. ",
". .XXXX. .", ". .XXXX. .",
"X. XXXX .X", "X. XXXX .X",
"XXXXXXXXXX", "XXXXXXXXXX",
"XXXXXXXXXX", "XXXXXXXXXX",
"XXXXXXXXXX", "XXXXXXXXXX",
"XXXXXXXXXX", "XXXXXXXXXX",
"X. XXXX .X", "X. XXXX .X",
". .XXXX. .", ". .XXXX. .",
" .XXXXXX. "}; " .XXXXXX. "};
static char *PRED_KILL_XPM[] = { static char *PRED_KILL_XPM[] = {
"10 10 3 1", "10 10 3 1",
" c #000000", " c #000000",
". c #616561", ". c #616561",
"X c None", "X c None",
" .XXXXXX. ", " .XXXXXX. ",
". XXXXXX .", ". XXXXXX .",
"XXXXXXXXXX", "XXXXXXXXXX",
"XXX .. XXX", "XXX .. XXX",
"XXX. .XXX", "XXX. .XXX",
"XXX. .XXX", "XXX. .XXX",
"XXX .. XXX", "XXX .. XXX",
"XXXXXXXXXX", "XXXXXXXXXX",
". XXXXXX .", ". XXXXXX .",
" .XXXXXX. "}; " .XXXXXX. "};
static char *PRED_ICONIFY_XPM[] = { static char *PRED_ICONIFY_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"..........", "..........",
"..........", "..........",
"..........", "..........",
".########.", ".########.",
".########.", ".########.",
".########.", ".########.",
".########.", ".########.",
".########.", ".########.",
".########.", ".########.",
".........." ".........."
}; };
#ifdef XKB_BUTTON_HINT #ifdef XKB_BUTTON_HINT
+1 -1
View File
@@ -876,7 +876,7 @@ static void rereadDefaults(void);
#if 0 #if 0
static void static void
rereadDefaults(void) rereadDefaults(void)
{ {
/* must defer the update because accessing X data from a /* must defer the update because accessing X data from a
* signal handler can mess up Xlib */ * signal handler can mess up Xlib */
+4 -3
View File
@@ -67,10 +67,10 @@
extern WPreferences wPreferences; extern WPreferences wPreferences;
static WMPoint getCenter(WScreen *scr, int width, int height) static WMPoint
getCenter(WScreen *scr, int width, int height)
{ {
return wGetPointToCenterRectInHead(scr, return wGetPointToCenterRectInHead(scr, wGetHeadForPointerLocation(scr),
wGetHeadForPointerLocation(scr),
width, height); width, height);
} }
@@ -2012,3 +2012,4 @@ wShowGNUstepPanel(WScreen *scr)
gnustepPanel = panel; gnustepPanel = panel;
} }
+1
View File
@@ -516,3 +516,4 @@ DestroyDockAppSettingsPanel(AppSettingsPanel *panel)
wfree(panel); wfree(panel);
} }
+10 -5
View File
@@ -118,8 +118,10 @@ extern char WDelayedActionSet;
static void saveTimestamp(XEvent *event); static void saveTimestamp(XEvent *event);
static void handleColormapNotify(); static void handleColormapNotify();
static void handleMapNotify(), handleUnmapNotify(); static void handleMapNotify();
static void handleButtonPress(), handleExpose(); static void handleUnmapNotify();
static void handleButtonPress();
static void handleExpose();
static void handleDestroyNotify(); static void handleDestroyNotify();
static void handleConfigureRequest(); static void handleConfigureRequest();
static void handleMapRequest(); static void handleMapRequest();
@@ -749,12 +751,12 @@ handleButtonPress(XEvent *event)
XAllowEvents(dpy, AsyncPointer, CurrentTime); XAllowEvents(dpy, AsyncPointer, CurrentTime);
} }
/* if (wPreferences.focus_mode == WKF_CLICK) {*/ /* if (wPreferences.focus_mode == WKF_CLICK) {*/
if (wPreferences.ignore_focus_click) { if (wPreferences.ignore_focus_click) {
XAllowEvents(dpy, AsyncPointer, CurrentTime); XAllowEvents(dpy, AsyncPointer, CurrentTime);
} }
XAllowEvents(dpy, ReplayPointer, CurrentTime); XAllowEvents(dpy, ReplayPointer, CurrentTime);
/* }*/ /* }*/
XSync(dpy, 0); XSync(dpy, 0);
} else if (desc->parent_type == WCLASS_APPICON } else if (desc->parent_type == WCLASS_APPICON
|| desc->parent_type == WCLASS_MINIWINDOW || desc->parent_type == WCLASS_MINIWINDOW
@@ -1790,7 +1792,8 @@ handleMotionNotify(XEvent *event)
wMenuScroll(menu, event); wMenuScroll(menu, event);
} }
} }
#if 0
#if 0 // what is with this? -Dan
if (event->xmotion.subwindow == None) if (event->xmotion.subwindow == None)
return; return;
@@ -1851,3 +1854,5 @@ handleVisibilityNotify(XEvent *event)
wwin->flags.obscured = wwin->flags.obscured =
(event->xvisibility.state == VisibilityFullyObscured); (event->xvisibility.state == VisibilityFullyObscured);
} }
+91 -91
View File
@@ -1,115 +1,115 @@
#include "wconfig.h" #include "wconfig.h"
static char *PRED_XKBGROUP1_XPM[] = { static char *PRED_XKBGROUP1_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"........##", "........##",
".......###", ".......###",
"..########", "..########",
"..########", "..########",
"......####", "......####",
".....#####", ".....#####",
"..########", "..########",
"..########", "..########",
"........##", "........##",
"........##" "........##"
}; };
#ifdef LANGUAGE_TH #ifdef LANGUAGE_TH
static char *PRED_XKBGROUP2_XPM[] = { static char *PRED_XKBGROUP2_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"#..###..##", "#..###..##",
".#..#.#..#", ".#..#.#..#",
".#...###..", ".#...###..",
"#...####..", "#...####..",
"##..####..", "##..####..",
"##..####..", "##..####..",
"##..####..", "##..####..",
"##..####..", "##..####..",
"##..####..", "##..####..",
"##.#####.#" "##.#####.#"
}; };
#elif defined LANGUAGE_SK #elif defined LANGUAGE_SK
static char *PRED_XKBGROUP2_XPM[] = { static char *PRED_XKBGROUP2_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"####..####", "####..####",
"####..####", "####..####",
"##......##", "##......##",
"##......##", "##......##",
"####..####", "####..####",
"#........#", "#........#",
"#........#", "#........#",
"####..####", "####..####",
"###....###", "###....###",
"##......##"}; "##......##"};
#elif defined LANGUAGE_EL #elif defined LANGUAGE_EL
static char *PRED_XKBGROUP2_XPM[] = { static char *PRED_XKBGROUP2_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"##..######", "##..######",
"##..##....", "##..##....",
"......####", "......####",
"##..##....", "##..##....",
"##..######", "##..######",
"..........", "..........",
"##########", "##########",
"..........", "..........",
"##########", "##########",
"##########"}; "##########"};
#else #else
static char *PRED_XKBGROUP2_XPM[] = { static char *PRED_XKBGROUP2_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"##########", "##########",
"#...##...#", "#...##...#",
"..........", "..........",
"..........", "..........",
"..........", "..........",
"..........", "..........",
"#........#", "#........#",
"##......##", "##......##",
"###....###", "###....###",
"####..####" "####..####"
}; };
#endif #endif
static char *PRED_XKBGROUP3_XPM[] = { static char *PRED_XKBGROUP3_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"..........", "..........",
"..........", "..........",
"..##..##..", "..##..##..",
"..##..##..", "..##..##..",
"..........", "..........",
"..........", "..........",
"..######..", "..######..",
"...####...", "...####...",
"....##....", "....##....",
".........." ".........."
}; };
static char *PRED_XKBGROUP4_XPM[] = { static char *PRED_XKBGROUP4_XPM[] = {
" 10 10 2 1", " 10 10 2 1",
". c #000000", ". c #000000",
"# c None", "# c None",
"..........", "..........",
".########.", ".########.",
".#..##..#.", ".#..##..#.",
".#..##..#.", ".#..##..#.",
".########.", ".########.",
".#......#.", ".#......#.",
".##....##.", ".##....##.",
".###..###.", ".###..###.",
".########.", ".########.",
".........." ".........."
}; };
+1
View File
@@ -728,3 +728,4 @@ wsobserver(void *self, WMNotification *notif)
#endif /* GNOME_STUFF */ #endif /* GNOME_STUFF */
+1 -2
View File
@@ -564,8 +564,7 @@ wIconStore(WIcon *icon)
/* /*
void void wIconChangeIconWindow(WIcon *icon, Window new_window);
wIconChangeIconWindow(WIcon *icon, Window new_window);
*/ */
static void static void
+7 -6
View File
@@ -146,7 +146,7 @@
#include "kwm.h" #include "kwm.h"
/*#define DEBUG1 /*#define DEBUG1
*/ */
/******* Global ******/ /******* Global ******/
extern Time LastFocusChange; extern Time LastFocusChange;
@@ -1660,7 +1660,7 @@ wKWMSetUsableAreaHint(WScreen *scr, int workspace)
* the next time the area changes, we won't know what should * the next time the area changes, we won't know what should
* be the new final area. This protocol isn't worth a shit :/ * be the new final area. This protocol isn't worth a shit :/
*/ */
/* /*
* According to Matthias Ettrich: * According to Matthias Ettrich:
* Indeed, there's no protocol to deal with the area yet in case several * Indeed, there's no protocol to deal with the area yet in case several
* clients want to influence it. It is sufficent, though, if it is clear * clients want to influence it. It is sufficent, though, if it is clear
@@ -1846,9 +1846,8 @@ wKWMSelectRootRegion(WScreen *scr, int x, int y, int w, int h, Bool control)
} }
static void
observer(void *self, WMNotification *notif)
static void observer(void *self, WMNotification *notif)
{ {
WScreen *scr = (WScreen*)self; WScreen *scr = (WScreen*)self;
WWindow *wwin = (WWindow*)WMGetNotificationObject(notif); WWindow *wwin = (WWindow*)WMGetNotificationObject(notif);
@@ -1924,7 +1923,8 @@ static void observer(void *self, WMNotification *notif)
} }
static void wsobserver(void *self, WMNotification *notif) static void
wsobserver(void *self, WMNotification *notif)
{ {
WScreen *scr = (WScreen*)WMGetNotificationObject(notif); WScreen *scr = (WScreen*)WMGetNotificationObject(notif);
const char *name = WMGetNotificationName(notif); const char *name = WMGetNotificationName(notif);
@@ -1952,3 +1952,4 @@ static void wsobserver(void *self, WMNotification *notif)
#endif /* KWM_HINTS */ #endif /* KWM_HINTS */
+1
View File
@@ -812,3 +812,4 @@ main(int argc, char **argv)
EventLoop(); EventLoop();
return -1; return -1;
} }
+37 -38
View File
@@ -70,9 +70,9 @@ typedef struct DirMenuReaderData {
} DirMenuReaderData; } DirMenuReaderData;
/* /*
typedef struct GNOMEMenuReaderData { typedef struct GNOMEMenuReaderData {
} GNOMEMenuReaderData; } GNOMEMenuReaderData;
*/ */
@@ -132,9 +132,9 @@ static WRootMenuReader DirMenuReaderData = {
}; };
/* /*
WRootMenuReader GNOMEMenuReaderData = { WRootMenuReader GNOMEMenuReaderData = {
}; };
*/ */
@@ -148,7 +148,8 @@ static char linebuf[LINESIZE];
/* ---------- proplist ---------- */ /* ---------- proplist ---------- */
static WRootMenuData *pl_openMenuFile(WMPropList *pl) static WRootMenuData*
pl_openMenuFile(WMPropList *pl)
{ {
PLRootMenuData *data = wmalloc(sizeof(PLRootMenuData)); PLRootMenuData *data = wmalloc(sizeof(PLRootMenuData));
@@ -165,21 +166,21 @@ static WRootMenuData *pl_openMenuFile(WMPropList *pl)
} }
static Bool pl_hasMoreData(WRootMenuData *data) static Bool
pl_hasMoreData(WRootMenuData *data)
{ {
} }
static Bool pl_nextCommand(WRootMenuData *data, static Bool
char **title, pl_nextCommand(WRootMenuData *data, char **title, char **command,
char **command, char **parameter, char **shortcut)
char **parameter,
char **shortcut)
{ {
} }
static void pl_closeMenuFile(WRootMenuData *data) static void
pl_closeMenuFile(WRootMenuData *data)
{ {
if (data->submenu) if (data->submenu)
wfree(data->submenu); wfree(data->submenu);
@@ -195,7 +196,8 @@ static void pl_closeMenuFile(WRootMenuData *data)
/* ---------- text ---------- */ /* ---------- text ---------- */
static WRootMenuData *text_openMenuFile(char *path) static WRootMenuData*
text_openMenuFile(char *path)
{ {
TextMenuReaderData *data; TextMenuReaderData *data;
@@ -210,21 +212,21 @@ static WRootMenuData *text_openMenuFile(char *path)
} }
static Bool text_hasMoreData(WRootMenuData *data) static Bool
text_hasMoreData(WRootMenuData *data)
{ {
} }
static Bool text_nextCommand(WRootMenuData *data, static Bool
char **title, text_nextCommand(WRootMenuData *data, char **title, char **command,
char **command, char **parameter, char **shortcut)
char **parameter,
char **shortcut)
{ {
} }
static void text_closeMenuFile(WRootMenuData *data) static void
text_closeMenuFile(WRootMenuData *data)
{ {
} }
@@ -232,7 +234,8 @@ static void text_closeMenuFile(WRootMenuData *data)
/* ---------- directory ---------- */ /* ---------- directory ---------- */
static WRootMenuData *dir_openMenuFile(char *paths, time_t *timestamp) static WRootMenuData*
dir_openMenuFile(char *paths, time_t *timestamp)
{ {
DirMenuReaderData *data; DirMenuReaderData *data;
char **dirs; char **dirs;
@@ -292,27 +295,25 @@ static WRootMenuData *dir_openMenuFile(char *paths, time_t *timestamp)
} }
static Bool dir_hasMoreData(WRootMenuData *data) static Bool
dir_hasMoreData(WRootMenuData *data)
{ {
} }
static Bool dir_nextCommand(WRootMenuData *data, static Bool
char **title, dir_nextCommand(WRootMenuData *data, char **title, char **command,
char **command, char **parameter, char **shortcut)
char **parameter,
char **shortcut)
{ {
} }
static void dir_closeMenuFile(WRootMenuData *data) static void
dir_closeMenuFile(WRootMenuData *data)
{ {
} }
WRootMenuData*
OpenMenu(char *path, time_t *menuTime)
WRootMenuData *OpenMenu(char *path, time_t *menuTime)
{ {
proplist pl; proplist pl;
struct stat stat_buf; struct stat stat_buf;
@@ -366,10 +367,8 @@ WRootMenuData *OpenMenu(char *path, time_t *menuTime)
} }
WRootMenuData*
WRootMenuData *ReopenRootMenu(time_t *checkTime, ReopenRootMenu(time_t *checkTime, char **menuPath, time_t *menuTimestamp)
char **menuPath,
time_t *menuTimestamp)
{ {
proplist pl; proplist pl;
struct stat stat_buf; struct stat stat_buf;
+4 -4
View File
@@ -939,7 +939,7 @@ ExpandOptions(WScreen *scr, char *cmdline)
XFree(selection); XFree(selection);
return out; return out;
error: error:
wfree(out); wfree(out);
if (selection) if (selection)
XFree(selection); XFree(selection);
@@ -1002,7 +1002,7 @@ GetShortcutString(char *text)
char *buffer = NULL; char *buffer = NULL;
char *k; char *k;
int modmask = 0; int modmask = 0;
/* KeySym ksym;*/ /* KeySym ksym;*/
int control = 0; int control = 0;
char *tmp; char *tmp;
@@ -1050,11 +1050,11 @@ GetShortcutString(char *text)
buffer = wstrappend(buffer, text); buffer = wstrappend(buffer, text);
/* get key */ /* get key */
/* ksym = XStringToKeysym(text); /* ksym = XStringToKeysym(text);
tmp = keysymToString(ksym, modmask); tmp = keysymToString(ksym, modmask);
puts(tmp); puts(tmp);
buffer = wstrappend(buffer, tmp); buffer = wstrappend(buffer, tmp);
*/ */
wfree(tmp); wfree(tmp);
return buffer; return buffer;
+12 -11
View File
@@ -111,11 +111,11 @@ setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
WSETUFLAG(wwin, no_resizebar, 0); WSETUFLAG(wwin, no_resizebar, 0);
WSETUFLAG(wwin, no_resizable, 0); WSETUFLAG(wwin, no_resizable, 0);
} }
/* /*
if (mwm_hints->decorations & MWM_DECOR_BORDER) { if (mwm_hints->decorations & MWM_DECOR_BORDER) {
# ifdef DEBUG # ifdef DEBUG
fprintf(stderr,"(BORDER) "); fprintf(stderr,"(BORDER) ");
# endif # endif
} }
*/ */
@@ -134,11 +134,11 @@ setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
WSETUFLAG(wwin, no_close_button, 0); WSETUFLAG(wwin, no_close_button, 0);
WSETUFLAG(wwin, no_closable, 0); WSETUFLAG(wwin, no_closable, 0);
} }
/* /*
if (mwm_hints->decorations & MWM_DECOR_MENU) { if (mwm_hints->decorations & MWM_DECOR_MENU) {
# ifdef DEBUG # ifdef DEBUG
fprintf(stderr,"(MENU) "); fprintf(stderr,"(MENU) ");
# endif # endif
} }
*/ */
@@ -149,11 +149,11 @@ setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
WSETUFLAG(wwin, no_miniaturize_button, 0); WSETUFLAG(wwin, no_miniaturize_button, 0);
WSETUFLAG(wwin, no_miniaturizable, 0); WSETUFLAG(wwin, no_miniaturizable, 0);
} }
/* /*
if (mwm_hints->decorations & MWM_DECOR_MAXIMIZE) { if (mwm_hints->decorations & MWM_DECOR_MAXIMIZE) {
# ifdef DEBUG # ifdef DEBUG
fprintf(stderr,"(MAXIMIZE) "); fprintf(stderr,"(MAXIMIZE) ");
# endif # endif
} }
*/ */
# ifdef DEBUG # ifdef DEBUG
@@ -186,9 +186,9 @@ setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
} }
/* /*
if (mwm_hints->functions & MWM_FUNC_MOVE) { if (mwm_hints->functions & MWM_FUNC_MOVE) {
# ifdef DEBUG # ifdef DEBUG
fprintf(stderr,"(MOVE) "); fprintf(stderr,"(MOVE) ");
# endif # endif
} }
*/ */
if (mwm_hints->functions & MWM_FUNC_MINIMIZE) { if (mwm_hints->functions & MWM_FUNC_MINIMIZE) {
@@ -261,3 +261,4 @@ wMWMCheckClientHints(WWindow *wwin)
#endif /* MWM_HINTS */ #endif /* MWM_HINTS */
+1
View File
@@ -2432,3 +2432,4 @@ InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
} }
} }
} }
+4 -3
View File
@@ -46,7 +46,7 @@
* DEF_XPM_CLOSENESS specifies the XpmCloseness * DEF_XPM_CLOSENESS specifies the XpmCloseness
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
WPixmap * WPixmap*
wPixmapCreateFromXPMData(WScreen *scr, char **data) wPixmapCreateFromXPMData(WScreen *scr, char **data)
{ {
RImage *image; RImage *image;
@@ -82,7 +82,7 @@ wPixmapCreateFromXPMData(WScreen *scr, char **data)
* *
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
WPixmap * WPixmap*
wPixmapCreateFromXBMData(WScreen *scr, char *data, char *mask, wPixmapCreateFromXBMData(WScreen *scr, char *data, char *mask,
int width, int height, unsigned long fg, int width, int height, unsigned long fg,
unsigned long bg) unsigned long bg)
@@ -211,7 +211,7 @@ wPixmapCreate(WScreen *scr, Pixmap image, Pixmap mask)
* continues as no mask was supplied. * continues as no mask was supplied.
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
WPixmap * WPixmap*
wPixmapLoadXBMFile(WScreen *scr, char *path, char *mask_path) wPixmapLoadXBMFile(WScreen *scr, char *path, char *mask_path)
{ {
WPixmap *pix; WPixmap *pix;
@@ -269,3 +269,4 @@ wPixmapDestroy(WPixmap *pix)
wfree(pix); wfree(pix);
} }
+1 -2
View File
@@ -56,8 +56,7 @@ extern WPreferences wPreferences;
* interactive window placement is in moveres.c * interactive window placement is in moveres.c
*/ */
extern void extern void InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
unsigned width, unsigned height); unsigned width, unsigned height);
+1
View File
@@ -62,3 +62,4 @@ wFreeColor(WScreen *scr, unsigned long pixel)
XFreeColors(dpy, scr->w_colormap, colors, 1, 0); XFreeColors(dpy, scr->w_colormap, colors, 1, 0);
} }
} }
+3 -2
View File
@@ -1170,7 +1170,7 @@ parseCascade(WScreen *scr, WMenu *menu, FILE *file, char *file_name)
file_name); file_name);
return menu; return menu;
error: error:
return menu; return menu;
} }
@@ -1830,7 +1830,7 @@ OpenRootMenu(WScreen *scr, int x, int y, int keyboard)
definition = WDRootMenu->dictionary; definition = WDRootMenu->dictionary;
/* /*
definition = PLGetDomain(domain); definition = PLGetDomain(domain);
*/ */
if (definition) { if (definition) {
@@ -1888,3 +1888,4 @@ OpenRootMenu(WScreen *scr, int x, int y, int keyboard)
} }
#endif /* !LITE */ #endif /* !LITE */
+2 -1
View File
@@ -1289,7 +1289,7 @@ wSessionConnectManager(char **argv, int argc)
puts("connected to the session manager"); puts("connected to the session manager");
#endif #endif
/* IceSetIOErrorHandler(iceIOErrorHandler);*/ /* IceSetIOErrorHandler(iceIOErrorHandler);*/
/* check for session manager clients */ /* check for session manager clients */
iceConn = SmcGetIceConnection(smcConn); iceConn = SmcGetIceConnection(smcConn);
@@ -1376,3 +1376,4 @@ wSessionIsManaged(void)
} }
#endif /* !XSMP_ENABLED */ #endif /* !XSMP_ENABLED */
+3 -1
View File
@@ -44,7 +44,8 @@ extern XContext wStackContext;
extern WPreferences wPreferences; extern WPreferences wPreferences;
static void notifyStackChange(WCoreWindow *frame, char *detail) static void
notifyStackChange(WCoreWindow *frame, char *detail)
{ {
WWindow *wwin = wWindowFor(frame->window); WWindow *wwin = wWindowFor(frame->window);
@@ -613,3 +614,4 @@ ChangeStackingLevel(WCoreWindow *frame, int new_level)
wLowerFrame(frame); wLowerFrame(frame);
} }
} }
+1 -2
View File
@@ -759,7 +759,7 @@ StartUp(Bool defaultScreenOnly)
wStackContext = XUniqueContext(); wStackContext = XUniqueContext();
wVEdgeContext = XUniqueContext(); wVEdgeContext = XUniqueContext();
/* _XA_VERSION = XInternAtom(dpy, "VERSION", False);*/ /* _XA_VERSION = XInternAtom(dpy, "VERSION", False);*/
#ifdef HAVE_XINTERNATOMS #ifdef HAVE_XINTERNATOMS
XInternAtoms(dpy, atomNames, sizeof(atomNames)/sizeof(char*), XInternAtoms(dpy, atomNames, sizeof(atomNames)/sizeof(char*),
@@ -1175,4 +1175,3 @@ manageAllWindows(WScreen *scr, int crashRecovery)
} }
+1
View File
@@ -454,3 +454,4 @@ wsobserver(void *self, WMNotification *notif)
#endif /* !LITE */ #endif /* !LITE */
+46 -46
View File
@@ -1,4 +1,4 @@
/********************************************************************\ /********************************************************************
* text.c -- a basic text field * * text.c -- a basic text field *
* Copyright (C) 1997 Robin D. Clark * * Copyright (C) 1997 Robin D. Clark *
* * * *
@@ -20,7 +20,7 @@
* Internet: rclark@cs.hmc.edu * * Internet: rclark@cs.hmc.edu *
* Address: 609 8th Street * * Address: 609 8th Street *
* Huntington Beach, CA 92648-4632 * * Huntington Beach, CA 92648-4632 *
\********************************************************************/ ********************************************************************/
#include "wconfig.h" #include "wconfig.h"
@@ -55,9 +55,9 @@
extern Cursor wCursor[WCUR_LAST]; extern Cursor wCursor[WCUR_LAST];
/********************************************************************\ /********************************************************************
* The event handler for the text-field: * * The event handler for the text-field: *
\********************************************************************/ ********************************************************************/
static void textEventHandler( WObjDescriptor *desc, XEvent *event ); static void textEventHandler( WObjDescriptor *desc, XEvent *event );
static void handleExpose( WObjDescriptor *desc, XEvent *event ); static void handleExpose( WObjDescriptor *desc, XEvent *event );
@@ -67,7 +67,7 @@ static void textInsert( WTextInput *wtext, char *txt );
static void blink(void *data); static void blink(void *data);
#endif #endif
/********************************************************************\ /********************************************************************
* handleKeyPress * * handleKeyPress *
* handle cursor keys, regular keys, etc. Inserts characters in * * handle cursor keys, regular keys, etc. Inserts characters in *
* text field, at cursor position, if it is a "Normal" key. If * * text field, at cursor position, if it is a "Normal" key. If *
@@ -80,10 +80,10 @@ static void blink(void *data);
* Return: True, unless the ksym is ignored * * Return: True, unless the ksym is ignored *
* Global: modifier - the bitfield that keeps track of the modifier * * Global: modifier - the bitfield that keeps track of the modifier *
* keys that are down * * keys that are down *
\********************************************************************/ ********************************************************************/
static int static int
handleKeyPress( WTextInput *wtext, XKeyEvent *event ) handleKeyPress( WTextInput *wtext, XKeyEvent *event )
{ {
KeySym ksym; KeySym ksym;
char buffer[32]; char buffer[32];
int count; int count;
@@ -165,17 +165,17 @@ handleKeyPress( WTextInput *wtext, XKeyEvent *event )
} }
} }
return True; return True;
} }
/********************************************************************\ /********************************************************************
* textXYtoPos * * textXYtoPos *
* given X coord, return position in array * * given X coord, return position in array *
\********************************************************************/ ********************************************************************/
static int static int
textXtoPos( WTextInput *wtext, int x ) textXtoPos( WTextInput *wtext, int x )
{ {
int pos; int pos;
x -= wtext->xOffset; x -= wtext->xOffset;
@@ -188,19 +188,19 @@ textXtoPos( WTextInput *wtext, int x )
} }
return pos; return pos;
} }
/********************************************************************\ /********************************************************************
* wTextCreate * * wTextCreate *
* create an instance of a text class * * create an instance of a text class *
* * * *
* Args: * * Args: *
* Return: * * Return: *
* Global: dpy - the display * * Global: dpy - the display *
\********************************************************************/ ********************************************************************/
WTextInput * WTextInput *
wTextCreate( WCoreWindow *core, int x, int y, int width, int height ) wTextCreate( WCoreWindow *core, int x, int y, int width, int height )
{ {
WTextInput *wtext; WTextInput *wtext;
ENTER("wTextCreate"); ENTER("wTextCreate");
@@ -272,18 +272,18 @@ wTextCreate( WCoreWindow *core, int x, int y, int width, int height )
LEAVE("wTextCreate"); LEAVE("wTextCreate");
return wtext; return wtext;
} }
/********************************************************************\ /********************************************************************
* wTextDestroy * * wTextDestroy *
* * * *
* Args: wtext - the text field * * Args: wtext - the text field *
* Return: * * Return: *
* Global: dpy - the display * * Global: dpy - the display *
\********************************************************************/ ********************************************************************/
void void
wTextDestroy( WTextInput *wtext ) wTextDestroy( WTextInput *wtext )
{ {
ENTER("wTextDestroy") ENTER("wTextDestroy")
#if 0 #if 0
@@ -299,7 +299,7 @@ wTextDestroy( WTextInput *wtext )
wfree( wtext ); wfree( wtext );
LEAVE("wTextDestroy"); LEAVE("wTextDestroy");
} }
/* The text-field consists of a frame drawn around the outside, /* The text-field consists of a frame drawn around the outside,
@@ -311,7 +311,7 @@ wTextDestroy( WTextInput *wtext )
* then call wTextRefresh to redraw the text-box */ * then call wTextRefresh to redraw the text-box */
/********************************************************************\ /********************************************************************
* textRefresh * * textRefresh *
* Redraw the text field. Call this after messing with the text * * Redraw the text field. Call this after messing with the text *
* field. wTextRefresh re-draws the inside of the text field. If * * field. wTextRefresh re-draws the inside of the text field. If *
@@ -321,7 +321,7 @@ wTextDestroy( WTextInput *wtext )
* Args: wtext - the text field * * Args: wtext - the text field *
* Return: none * * Return: none *
* Global: dpy - the display * * Global: dpy - the display *
\********************************************************************/ ********************************************************************/
static void static void
textRefresh(WTextInput *wtext) textRefresh(WTextInput *wtext)
{ {
@@ -383,16 +383,16 @@ textRefresh(WTextInput *wtext)
} }
/********************************************************************\ /********************************************************************
* wTextPaint * * wTextPaint *
* * * *
* Args: wtext - the text field * * Args: wtext - the text field *
* Return: * * Return: *
* Global: dpy - the display * * Global: dpy - the display *
\********************************************************************/ ********************************************************************/
void void
wTextPaint( WTextInput *wtext ) wTextPaint( WTextInput *wtext )
{ {
ENTER("wTextPaint"); ENTER("wTextPaint");
/* refresh */ /* refresh */
@@ -403,10 +403,10 @@ wTextPaint( WTextInput *wtext )
wtext->core->width-1, wtext->core->height-1); wtext->core->width-1, wtext->core->height-1);
LEAVE("wTextPaint"); LEAVE("wTextPaint");
} }
/********************************************************************\ /********************************************************************
* wTextGetText * * wTextGetText *
* return the string in the text field wText. DO NOT FREE THE * * return the string in the text field wText. DO NOT FREE THE *
* RETURNED STRING! * * RETURNED STRING! *
@@ -414,17 +414,17 @@ wTextPaint( WTextInput *wtext )
* Args: wtext - the text field * * Args: wtext - the text field *
* Return: the text in the text field (NULL terminated) * * Return: the text in the text field (NULL terminated) *
* Global: * * Global: *
\********************************************************************/ ********************************************************************/
char * char *
wTextGetText( WTextInput *wtext ) wTextGetText( WTextInput *wtext )
{ {
if (!wtext->canceled) if (!wtext->canceled)
return wtext->text.txt; return wtext->text.txt;
else else
return NULL; return NULL;
} }
/********************************************************************\ /********************************************************************
* wTextPutText * * wTextPutText *
* Put the string txt in the text field wText. The text field * * Put the string txt in the text field wText. The text field *
* needs to be explicitly refreshed after wTextPutText by calling * * needs to be explicitly refreshed after wTextPutText by calling *
@@ -435,10 +435,10 @@ wTextGetText( WTextInput *wtext )
* txt - the new text string... freed by the text field! * * txt - the new text string... freed by the text field! *
* Return: none * * Return: none *
* Global: * * Global: *
\********************************************************************/ ********************************************************************/
void void
wTextPutText( WTextInput *wtext, char *txt ) wTextPutText( WTextInput *wtext, char *txt )
{ {
int length = strlen(txt); int length = strlen(txt);
/* no memory leaks! free the old txt */ /* no memory leaks! free the old txt */
@@ -451,9 +451,9 @@ wTextPutText( WTextInput *wtext, char *txt )
/* By default No text is selected, and the cursor is at the end */ /* By default No text is selected, and the cursor is at the end */
wtext->text.startPos = length; wtext->text.startPos = length;
wtext->text.endPos = length; wtext->text.endPos = length;
} }
/********************************************************************\ /********************************************************************
* textInsert * * textInsert *
* Insert some text at the cursor. (if startPos != endPos, * * Insert some text at the cursor. (if startPos != endPos, *
* replace the selected text, otherwise insert) * * replace the selected text, otherwise insert) *
@@ -463,10 +463,10 @@ wTextPutText( WTextInput *wtext, char *txt )
* txt - the new text string... freed by the text field! * * txt - the new text string... freed by the text field! *
* Return: none * * Return: none *
* Global: * * Global: *
\********************************************************************/ ********************************************************************/
static void static void
textInsert( WTextInput *wtext, char *txt ) textInsert( WTextInput *wtext, char *txt )
{ {
char *newTxt; char *newTxt;
int newLen, txtLen, i,j; int newLen, txtLen, i,j;
int sp,ep; int sp,ep;
@@ -510,9 +510,9 @@ textInsert( WTextInput *wtext, char *txt )
wfree(wtext->text.txt); wfree(wtext->text.txt);
wtext->text.txt = newTxt; wtext->text.txt = newTxt;
wtext->text.length = newLen-1; wtext->text.length = newLen-1;
} }
/********************************************************************\ /********************************************************************
* wTextSelect * * wTextSelect *
* Select some text. If start == end, then the cursor is moved * * Select some text. If start == end, then the cursor is moved *
* to that position. If end == -1, then the text from start to * * to that position. If end == -1, then the text from start to *
@@ -525,16 +525,16 @@ textInsert( WTextInput *wtext, char *txt )
* end - the end of the selected text * * end - the end of the selected text *
* Return: none * * Return: none *
* Global: * * Global: *
\********************************************************************/ ********************************************************************/
void void
wTextSelect( WTextInput *wtext, int start, int end ) wTextSelect( WTextInput *wtext, int start, int end )
{ {
if( end == -1 ) if( end == -1 )
wtext->text.endPos = wtext->text.length; wtext->text.endPos = wtext->text.length;
else else
wtext->text.endPos = end; wtext->text.endPos = end;
wtext->text.startPos = start; wtext->text.startPos = start;
} }
#if 0 #if 0
static void static void
@@ -561,17 +561,17 @@ blink(void *data)
} }
#endif #endif
/********************************************************************\ /********************************************************************
* textEventHandler -- handles and dispatches all the events that * * textEventHandler -- handles and dispatches all the events that *
* the text field class supports * * the text field class supports *
* * * *
* Args: desc - all we need to know about this object * * Args: desc - all we need to know about this object *
* Return: none * * Return: none *
* Global: * * Global: *
\********************************************************************/ ********************************************************************/
static void static void
textEventHandler( WObjDescriptor *desc, XEvent *event ) textEventHandler( WObjDescriptor *desc, XEvent *event )
{ {
WTextInput *wtext = desc->parent; WTextInput *wtext = desc->parent;
int handled = False; /* has the event been handled */ int handled = False; /* has the event been handled */
@@ -644,7 +644,7 @@ textEventHandler( WObjDescriptor *desc, XEvent *event )
WMHandleEvent(event); WMHandleEvent(event);
return; return;
} }
static void static void
+2 -2
View File
@@ -1,4 +1,4 @@
/********************************************************************\ /********************************************************************
* text.h -- a basic text field * * text.h -- a basic text field *
* Copyright (C) 1997 Robin D. Clark * * Copyright (C) 1997 Robin D. Clark *
* * * *
@@ -20,7 +20,7 @@
* Internet: rclark@cs.hmc.edu * * Internet: rclark@cs.hmc.edu *
* Address: 609 8th Street * * Address: 609 8th Street *
* Huntington Beach, CA 92648-4632 * * Huntington Beach, CA 92648-4632 *
\********************************************************************/ ********************************************************************/
#ifndef __TEXT_H__ #ifndef __TEXT_H__
#define __TEXT_H__ #define __TEXT_H__
+1
View File
@@ -374,3 +374,4 @@ wUserMenuGet(WScreen *scr, WWindow *wwin)
} }
#endif /* USER_MENU */ #endif /* USER_MENU */
+4 -4
View File
@@ -229,7 +229,7 @@
/* list of paths to look for the config files, searched in order /* list of paths to look for the config files, searched in order
* of appearance */ * of appearance */
#define DEF_CONFIG_PATHS \ #define DEF_CONFIG_PATHS \
"~/GNUstep/Library/WindowMaker:"PKGDATADIR "~/GNUstep/Library/WindowMaker:"PKGDATADIR
#define DEF_MENU_FILE "menu" #define DEF_MENU_FILE "menu"
@@ -253,17 +253,17 @@
/* pixmap path */ /* pixmap path */
#define DEF_PIXMAP_PATHS \ #define DEF_PIXMAP_PATHS \
"(\"~/pixmaps\",\"~/GNUstep/Library/WindowMaker/Pixmaps\",\""PIXMAPDIR"\")" "(\"~/pixmaps\",\"~/GNUstep/Library/WindowMaker/Pixmaps\",\""PIXMAPDIR"\")"
#ifdef USER_MENU #ifdef USER_MENU
#define GLOBAL_USER_MENU_PATH PKGDATADIR"/UserMenus" #define GLOBAL_USER_MENU_PATH PKGDATADIR"/UserMenus"
#define DEF_USER_MENU_PATHS \ #define DEF_USER_MENU_PATHS \
"~/GNUstep/Library/WindowMaker/UserMenus:"GLOBAL_USER_MENU_PATH "~/GNUstep/Library/WindowMaker/UserMenus:"GLOBAL_USER_MENU_PATH
#endif #endif
/* icon path */ /* icon path */
#define DEF_ICON_PATHS \ #define DEF_ICON_PATHS \
"(\"~/pixmaps\",\"~/GNUstep/Library/Icons\",\"/usr/include/X11/pixmaps/\",\""PIXMAPDIR"\")" "(\"~/pixmaps\",\"~/GNUstep/Library/Icons\",\"/usr/include/X11/pixmaps/\",\""PIXMAPDIR"\")"
/* window title to use for untitled windows */ /* window title to use for untitled windows */
+2 -4
View File
@@ -596,10 +596,7 @@ getBool(WMPropList *key, WMPropList *value)
} }
/* WARNING: Do not free the value returned by this function!! */
/*
* WARNING: Do not free value returned by this!!
*/
static char* static char*
getString(WMPropList *key, WMPropList *value) getString(WMPropList *key, WMPropList *value)
{ {
@@ -611,3 +608,4 @@ getString(WMPropList *key, WMPropList *value)
return WMGetFromPLString(value); return WMGetFromPLString(value);
} }
+3 -2
View File
@@ -866,7 +866,7 @@ wManageWindow(WScreen *scr, Window window)
/* get geometry stuff */ /* get geometry stuff */
wClientGetNormalHints(wwin, &wattribs, True, &x, &y, &width, &height); wClientGetNormalHints(wwin, &wattribs, True, &x, &y, &width, &height);
/* printf("wManageWindow: %d %d %d %d\n", x, y, width, height);*/ /* printf("wManageWindow: %d %d %d %d\n", x, y, width, height);*/
/* get colormap windows */ /* get colormap windows */
GetColormapWindows(wwin); GetColormapWindows(wwin);
@@ -1783,7 +1783,7 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
if (wwin->flags.is_gnustep == 0) if (wwin->flags.is_gnustep == 0)
wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED); wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED);
/* if (wPreferences.auto_focus)*/ /* if (wPreferences.auto_focus)*/
wSetFocusTo(scr, wwin); wSetFocusTo(scr, wwin);
wWindowResetMouseGrabs(wwin); wWindowResetMouseGrabs(wwin);
@@ -3448,3 +3448,4 @@ windowIconifyClick(WCoreWindow *sender, void *data, XEvent *event)
} }
} }
} }
+1 -1
View File
@@ -282,7 +282,7 @@ typedef struct WWindow {
app */ app */
unsigned int buttons_dont_fit:1; unsigned int buttons_dont_fit:1;
unsigned int rebuild_texture:1;/* the window was resized and unsigned int rebuild_texture:1; /* the window was resized and
* gradients should be re-rendered */ * gradients should be re-rendered */
unsigned int needs_full_repaint:1;/* does a full repaint of the unsigned int needs_full_repaint:1;/* does a full repaint of the
* window next time it's painted */ * window next time it's painted */
+2 -2
View File
@@ -375,7 +375,7 @@ makeMakeShortcutMenu(WScreen *scr, WMenu *menu)
WMenu *menu; WMenu *menu;
*/ */
int i; int i;
/* /*
menu = wMenuCreate(scr, NULL, False); menu = wMenuCreate(scr, NULL, False);
if (!menu) { if (!menu) {
wwarning(_("could not create submenu for window menu")); wwarning(_("could not create submenu for window menu"));
@@ -507,7 +507,7 @@ createWindowMenu(WScreen *scr)
wMenuEntrySetCascade(menu, entry, wMenuEntrySetCascade(menu, entry,
makeMakeShortcutMenu(scr, makeOptionsMenu(scr))); makeMakeShortcutMenu(scr, makeOptionsMenu(scr)));
/* /*
entry = wMenuAddCallback(menu, _("Select Shortcut"), NULL, NULL); entry = wMenuAddCallback(menu, _("Select Shortcut"), NULL, NULL);
wMenuEntrySetCascade(menu, entry, makeMakeShortcutMenu(scr)); wMenuEntrySetCascade(menu, entry, makeMakeShortcutMenu(scr));
*/ */
+1 -1
View File
@@ -646,7 +646,7 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
WMPostNotificationName(WMNWorkspaceChanged, scr, (void*)workspace); WMPostNotificationName(WMNWorkspaceChanged, scr, (void*)workspace);
/* XSync(dpy, False); */ /* XSync(dpy, False); */
} }
+12 -6
View File
@@ -33,13 +33,14 @@ Atom _XA_XdndFinished;
Atom _XA_WINDOWMAKER_XDNDEXCHANGE; Atom _XA_WINDOWMAKER_XDNDEXCHANGE;
/* /*
Atom _XA_MOTIF_DRAG_RECEIVER_INFO; Atom _XA_MOTIF_DRAG_RECEIVER_INFO;
Atom _XA_MOTIF_DRAG_AND_DROP_MESSAGE; Atom _XA_MOTIF_DRAG_AND_DROP_MESSAGE;
*/ */
Atom atom_support; Atom atom_support;
void wXDNDInitializeAtoms() void
wXDNDInitializeAtoms()
{ {
_XA_XdndAware = XInternAtom(dpy, "XdndAware", False); _XA_XdndAware = XInternAtom(dpy, "XdndAware", False);
@@ -60,7 +61,9 @@ void wXDNDInitializeAtoms()
*/ */
} }
void wXDNDMakeAwareness(Window window) { void
wXDNDMakeAwareness(Window window)
{
long int xdnd_version = 3; long int xdnd_version = 3;
/* /*
MotifDragReceiverInfo info; MotifDragReceiverInfo info;
@@ -85,7 +88,9 @@ void wXDNDMakeAwareness(Window window) {
*/ */
} }
void wXDNDClearAwareness(Window window) { void
wXDNDClearAwareness(Window window)
{
//long int xdnd_version = 3; //long int xdnd_version = 3;
XDeleteProperty (dpy, window, _XA_XdndAware); XDeleteProperty (dpy, window, _XA_XdndAware);
} }
@@ -333,3 +338,4 @@ wXDNDProcessClientMessage(XClientMessageEvent *event)
} }
#endif #endif
+8 -8
View File
@@ -236,9 +236,9 @@ wGetHeadForWindow(WWindow *wwin)
/* /*
int int
wGetHeadForPoint(WScreen *scr, WMPoint point, int *flags) wGetHeadForPoint(WScreen *scr, WMPoint point, int *flags)
{ {
int i; int i;
// paranoia // paranoia
@@ -249,7 +249,7 @@ wGetHeadForPoint(WScreen *scr, WMPoint point, int *flags)
*flags = XFLAG_NONE; *flags = XFLAG_NONE;
for (i = 0; i < scr->xine_info.count; i++) { for (i = 0; i < scr->xine_info.count; i++) {
#if 0 #if 0
int yy, xx; int yy, xx;
xx = scr->xine_info.screens[i].pos.x + scr->xine_info.screens[i].size.width; xx = scr->xine_info.screens[i].pos.x + scr->xine_info.screens[i].size.width;
@@ -259,20 +259,20 @@ wGetHeadForPoint(WScreen *scr, WMPoint point, int *flags)
point.x < xx && point.y < yy) { point.x < xx && point.y < yy) {
return i; return i;
} }
#else #else
XineramaScreenInfo *xsi = &scr->xine_info.screens[i]; XineramaScreenInfo *xsi = &scr->xine_info.screens[i];
if ((unsigned)(point.x - xsi->x_org) < xsi->width && if ((unsigned)(point.x - xsi->x_org) < xsi->width &&
(unsigned)(point.y - xsi->y_org) < xsi->height) (unsigned)(point.y - xsi->y_org) < xsi->height)
return i; return i;
#endif #endif
} }
*flags |= XFLAG_DEAD; *flags |= XFLAG_DEAD;
return scr->xine_primary_head; return scr->xine_primary_head;
} }
*/ */
+34 -33
View File
@@ -1,31 +1,31 @@
/* Grok X modifier mappings for shortcuts. /* Grok X modifier mappings for shortcuts.
Most of this code was taken from src/event-Xt.c in XEmacs 20.3-b17. Most of this code was taken from src/event-Xt.c in XEmacs 20.3-b17.
The copyright(s) from the original XEmacs code are included below. The copyright(s) from the original XEmacs code are included below.
Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */ Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */
/* The event_stream interface for X11 with Xt, and/or tty frames. /* The event_stream interface for X11 with Xt, and/or tty frames.
Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1996 Ben Wing. Copyright (C) 1996 Ben Wing.
This file is part of XEmacs. This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any Free Software Foundation; either version 2, or (at your option) any
later version. later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "wconfig.h" #include "wconfig.h"
@@ -230,31 +230,31 @@ x_reset_modifier_mapping (Display *display)
#if 0 #if 0
if (warned_about_overlapping_modifiers) if (warned_about_overlapping_modifiers)
wwarning ("\n" wwarning ("\n"
" Two distinct modifier keys (such as Meta and Hyper) cannot generate\n" " Two distinct modifier keys (such as Meta and Hyper) cannot generate\n"
" the same modifier bit, because Emacs won't be able to tell which\n" " the same modifier bit, because Emacs won't be able to tell which\n"
" modifier was actually held down when some other key is pressed. It\n" " modifier was actually held down when some other key is pressed. It\n"
" won't be able to tell Meta-x and Hyper-x apart, for example. Change\n" " won't be able to tell Meta-x and Hyper-x apart, for example. Change\n"
" one of these keys to use some other modifier bit. If you intend for\n" " one of these keys to use some other modifier bit. If you intend for\n"
" these keys to have the same behavior, then change them to have the\n" " these keys to have the same behavior, then change them to have the\n"
" same keysym as well as the same modifier bit.\n"); " same keysym as well as the same modifier bit.\n");
if (warned_about_predefined_modifiers) if (warned_about_predefined_modifiers)
wwarning ("\n" wwarning ("\n"
" The semantics of the modifier bits ModShift, ModLock, and ModControl\n" " The semantics of the modifier bits ModShift, ModLock, and ModControl\n"
" are predefined. It does not make sense to assign ModControl to any\n" " are predefined. It does not make sense to assign ModControl to any\n"
" keysym other than Control_L or Control_R, or to assign any modifier\n" " keysym other than Control_L or Control_R, or to assign any modifier\n"
" bits to the \"control\" keysyms other than ModControl. You can't\n" " bits to the \"control\" keysyms other than ModControl. You can't\n"
" turn a \"control\" key into a \"meta\" key (or vice versa) by simply\n" " turn a \"control\" key into a \"meta\" key (or vice versa) by simply\n"
" assigning the key a different modifier bit. You must also make that\n" " assigning the key a different modifier bit. You must also make that\n"
" key generate an appropriate keysym (Control_L, Meta_L, etc).\n"); " key generate an appropriate keysym (Control_L, Meta_L, etc).\n");
/* No need to say anything more for warned_about_duplicate_modifiers. */ /* No need to say anything more for warned_about_duplicate_modifiers. */
if (warned_about_overlapping_modifiers || warned_about_predefined_modifiers) if (warned_about_overlapping_modifiers || warned_about_predefined_modifiers)
wwarning ("\n" wwarning ("\n"
" The meanings of the modifier bits Mod1 through Mod5 are determined\n" " The meanings of the modifier bits Mod1 through Mod5 are determined\n"
" by the keysyms used to control those bits. Mod1 does NOT always\n" " by the keysyms used to control those bits. Mod1 does NOT always\n"
" mean Meta, although some non-ICCCM-compliant programs assume that.\n"); " mean Meta, although some non-ICCCM-compliant programs assume that.\n");
#endif #endif
XFreeModifiermap(x_modifier_keymap); XFreeModifiermap(x_modifier_keymap);
} }
@@ -296,3 +296,4 @@ wXModifierInitialize(void)
{ {
x_reset_modifier_mapping(dpy); x_reset_modifier_mapping(dpy);
} }
+1
View File
@@ -194,3 +194,4 @@ FormatXError(Display *dpy, XErrorEvent *error, char *buffer, int size)
sprintf(buffer, " Error serial: %li\n", error->serial); sprintf(buffer, " Error serial: %li\n", error->serial);
return; return;
} }
+2 -1
View File
@@ -33,7 +33,8 @@ hide(void *foo, int item, Time time)
} }
int notify_print( int id, XEvent *event, void *data ) int
notify_print( int id, XEvent *event, void *data )
{ {
printf( "Got notification 0x%x, window 0x%lx, data '%s'\n", printf( "Got notification 0x%x, window 0x%lx, data '%s'\n",
id, event->xclient.data.l[1], (char *) data ); id, event->xclient.data.l[1], (char *) data );
+1 -1
View File
@@ -89,7 +89,7 @@ newwin(void *foo, int item, Time time)
/* /*
attr.flags |= GSWindowStyleAttr; attr.flags |= GSWindowStyleAttr;
attr.window_style = NSTitledWindowMask|NSClosableWindowMask; attr.window_style = NSTitledWindowMask|NSClosableWindowMask;
*/ */
WMSetWindowAttributes(dpy, win, &attr); WMSetWindowAttributes(dpy, win, &attr);
+1 -1
View File
@@ -204,7 +204,7 @@ LoadJPEG(RContext *rc, char *file_name, int *width, int *height)
*width = cinfo.image_width; *width = cinfo.image_width;
*height = cinfo.image_height; *height = cinfo.image_height;
bye: bye:
jpeg_destroy_decompress(&cinfo); jpeg_destroy_decompress(&cinfo);
fclose(file); fclose(file);
+1
View File
@@ -806,3 +806,4 @@ readBlackBoxStyle(char *path)
} }
} }
#endif #endif
+2 -1
View File
@@ -66,7 +66,8 @@ gethomedir()
void wAbort() void
wAbort()
{ {
exit(0); exit(0);
} }
+18 -18
View File
@@ -501,7 +501,7 @@ parseTexture(RContext *rc, char *text)
GETSTRORGOTO(val, tmp, 1, error); GETSTRORGOTO(val, tmp, 1, error);
/* /*
if (toupper(type[0]) == 'T' || toupper(type[0]) == 'C') if (toupper(type[0]) == 'T' || toupper(type[0]) == 'C')
pixmap = LoadJPEG(rc, tmp, &iwidth, &iheight); pixmap = LoadJPEG(rc, tmp, &iwidth, &iheight);
*/ */
@@ -744,7 +744,7 @@ parseTexture(RContext *rc, char *text)
texture->pixmap = pixmap; texture->pixmap = pixmap;
success = 1; success = 1;
function_cleanup: function_cleanup:
if (argv) { if (argv) {
int i; int i;
for (i=0; i<argc; i++) { for (i=0; i<argc; i++) {
@@ -1280,22 +1280,22 @@ print_help(char *ProgName)
puts("Sets the workspace background to the specified image or a texture and optionally update Window Maker configuration"); puts("Sets the workspace background to the specified image or a texture and optionally update Window Maker configuration");
puts(""); puts("");
#define P(m) puts(m) #define P(m) puts(m)
P(" -display display to use"); P(" -display display to use");
P(" -d, --dither dither image"); P(" -d, --dither dither image");
P(" -m, --match match colors"); P(" -m, --match match colors");
P(" -S, --smooth smooth scaled image"); P(" -S, --smooth smooth scaled image");
P(" -b, --back-color <color> background color"); P(" -b, --back-color <color> background color");
P(" -t, --tile tile image"); P(" -t, --tile tile image");
P(" -e, --center center image"); P(" -e, --center center image");
P(" -s, --scale scale image (default)"); P(" -s, --scale scale image (default)");
P(" -a, --maxscale scale image and keep aspect ratio"); P(" -a, --maxscale scale image and keep aspect ratio");
P(" -u, --update-wmaker update WindowMaker domain database"); P(" -u, --update-wmaker update WindowMaker domain database");
P(" -D, --update-domain <domain> update <domain> database"); P(" -D, --update-domain <domain> update <domain> database");
P(" -c, --colors <cpc> colors per channel to use"); P(" -c, --colors <cpc> colors per channel to use");
P(" -p, --parse <texture> proplist style texture specification"); P(" -p, --parse <texture> proplist style texture specification");
P(" -w, --workspace <workspace> update background for the specified workspace"); P(" -w, --workspace <workspace> update background for the specified workspace");
P(" --version show version of wmsetbg and exit"); P(" --version show version of wmsetbg and exit");
P(" --help show this help and exit"); P(" --help show this help and exit");
#undef P #undef P
} }

Some files were not shown because too many files have changed in this diff Show More