mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
fixed a bug with workspace switching
This commit is contained in:
@@ -163,6 +163,7 @@ Changes since version 0.80.2:
|
|||||||
- moved out font name conversion code from getstyle/setstyle/convertfonts and made it support fontsets
|
- moved out font name conversion code from getstyle/setstyle/convertfonts and made it support fontsets
|
||||||
- Converted all menu and po files to UTF-8
|
- Converted all menu and po files to UTF-8
|
||||||
- Updated de.po (Thomas Otto <3.1415926535897932384626433832@gmx.net>)
|
- Updated de.po (Thomas Otto <3.1415926535897932384626433832@gmx.net>)
|
||||||
|
- fixed a crash bug when switching workspaces
|
||||||
|
|
||||||
Changes since version 0.80.1:
|
Changes since version 0.80.1:
|
||||||
.............................
|
.............................
|
||||||
|
|||||||
@@ -51,11 +51,10 @@ showData(_Panel *panel)
|
|||||||
WMSetButtonSelected(panel->swi[1], WMGetUDBoolForKey(udb, "NoXSetStuff"));
|
WMSetButtonSelected(panel->swi[1], WMGetUDBoolForKey(udb, "NoXSetStuff"));
|
||||||
WMSetButtonSelected(panel->swi[2], GetBoolForKey("SaveSessionOnExit"));
|
WMSetButtonSelected(panel->swi[2], GetBoolForKey("SaveSessionOnExit"));
|
||||||
WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
|
WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
|
||||||
WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling"));
|
WMSetButtonSelected(panel->swi[4], GetBoolForKey("DontConfirmKill"));
|
||||||
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
|
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking"));
|
||||||
WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
|
|
||||||
//if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
//if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
||||||
WMSetButtonSelected(panel->swi[7], GetBoolForKey("AntialiasedText"));
|
WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -68,7 +67,7 @@ createPanel(Panel *p)
|
|||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
for (i=0; i<8; i++) {
|
for (i=0; i<7; i++) {
|
||||||
panel->swi[i] = WMCreateSwitchButton(panel->box);
|
panel->swi[i] = WMCreateSwitchButton(panel->box);
|
||||||
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
|
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
|
||||||
WMMoveWidget(panel->swi[i], 20, 20+i*25);
|
WMMoveWidget(panel->swi[i], 20, 20+i*25);
|
||||||
@@ -78,13 +77,12 @@ createPanel(Panel *p)
|
|||||||
WMSetButtonText(panel->swi[1], _("Do not set non-WindowMaker specific parameters (do not use xset)."));
|
WMSetButtonText(panel->swi[1], _("Do not set non-WindowMaker specific parameters (do not use xset)."));
|
||||||
WMSetButtonText(panel->swi[2], _("Automatically save session when exiting Window Maker."));
|
WMSetButtonText(panel->swi[2], _("Automatically save session when exiting Window Maker."));
|
||||||
WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects."));
|
WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects."));
|
||||||
WMSetButtonText(panel->swi[4], _("Use Windoze style cycling."));
|
WMSetButtonText(panel->swi[4], _("Disable confirmation panel for the Kill command."));
|
||||||
WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
|
WMSetButtonText(panel->swi[5], _("Disable selection animation for selected icons."));
|
||||||
WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons."));
|
WMSetButtonText(panel->swi[6], _("Smooth font edges (needs restart)."));
|
||||||
WMSetButtonText(panel->swi[7], _("Smooth font edges (needs restart)."));
|
|
||||||
|
|
||||||
//if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
//if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
||||||
WMSetButtonEnabled(panel->swi[7], True);
|
WMSetButtonEnabled(panel->swi[6], True);
|
||||||
|
|
||||||
WMRealizeWidget(panel->box);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->box);
|
WMMapSubwidgets(panel->box);
|
||||||
@@ -104,11 +102,10 @@ storeDefaults(_Panel *panel)
|
|||||||
|
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "SaveSessionOnExit");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "SaveSessionOnExit");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
|
|
||||||
//if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
//if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "AntialiasedText");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ typedef struct _WPrefs {
|
|||||||
WMFrame *banner;
|
WMFrame *banner;
|
||||||
WMLabel *nameL;
|
WMLabel *nameL;
|
||||||
WMLabel *versionL;
|
WMLabel *versionL;
|
||||||
WMLabel *creditsL;
|
|
||||||
WMLabel *statusL;
|
WMLabel *statusL;
|
||||||
|
|
||||||
Panel *currentPanel;
|
Panel *currentPanel;
|
||||||
@@ -323,38 +322,30 @@ createMainWindow(WMScreen *scr)
|
|||||||
WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP);
|
WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP);
|
||||||
WMSetFrameRelief(WPrefs.banner, WRFlat);
|
WMSetFrameRelief(WPrefs.banner, WRFlat);
|
||||||
|
|
||||||
font = WMCreateFont(scr, "Lucida Sans,Comic Sans MS,Times New Roman,serif:bold:pixelsize=24");
|
font = WMCreateFont(scr, "Lucida Sans,Times New Roman,serif:bold:pixelsize=24");
|
||||||
if (!font)
|
if (!font)
|
||||||
font = WMBoldSystemFontOfSize(scr, 24);
|
font = WMBoldSystemFontOfSize(scr, 24);
|
||||||
WPrefs.nameL = WMCreateLabel(WPrefs.banner);
|
WPrefs.nameL = WMCreateLabel(WPrefs.banner);
|
||||||
WMSetLabelTextAlignment(WPrefs.nameL, WACenter);
|
WMSetLabelTextAlignment(WPrefs.nameL, WACenter);
|
||||||
WMResizeWidget(WPrefs.nameL, FRAME_WIDTH-20, 30);
|
WMResizeWidget(WPrefs.nameL, FRAME_WIDTH-20, 60);
|
||||||
WMMoveWidget(WPrefs.nameL, 10, 25);
|
WMMoveWidget(WPrefs.nameL, 10, 60);
|
||||||
WMSetLabelFont(WPrefs.nameL, font);
|
WMSetLabelFont(WPrefs.nameL, font);
|
||||||
WMSetLabelText(WPrefs.nameL, _("Window Maker Preferences Utility"));
|
WMSetLabelText(WPrefs.nameL, _("Window Maker Preferences"));
|
||||||
WMReleaseFont(font);
|
WMReleaseFont(font);
|
||||||
|
|
||||||
WPrefs.versionL = WMCreateLabel(WPrefs.banner);
|
WPrefs.versionL = WMCreateLabel(WPrefs.banner);
|
||||||
WMResizeWidget(WPrefs.versionL, FRAME_WIDTH-20, 20);
|
WMResizeWidget(WPrefs.versionL, FRAME_WIDTH-20, 20);
|
||||||
WMMoveWidget(WPrefs.versionL, 10, 65);
|
WMMoveWidget(WPrefs.versionL, 10, 100);
|
||||||
WMSetLabelTextAlignment(WPrefs.versionL, WACenter);
|
WMSetLabelTextAlignment(WPrefs.versionL, WACenter);
|
||||||
sprintf(buffer, _("Version %s for Window Maker %s or newer"), WVERSION,
|
sprintf(buffer, _("Version %s"), VERSION);
|
||||||
WMVERSION);
|
|
||||||
WMSetLabelText(WPrefs.versionL, buffer);
|
WMSetLabelText(WPrefs.versionL, buffer);
|
||||||
|
|
||||||
WPrefs.statusL = WMCreateLabel(WPrefs.banner);
|
WPrefs.statusL = WMCreateLabel(WPrefs.banner);
|
||||||
WMResizeWidget(WPrefs.statusL, FRAME_WIDTH-20, 60);
|
WMResizeWidget(WPrefs.statusL, FRAME_WIDTH-20, 60);
|
||||||
WMMoveWidget(WPrefs.statusL, 10, 100);
|
WMMoveWidget(WPrefs.statusL, 10, 150);
|
||||||
WMSetLabelTextAlignment(WPrefs.statusL, WACenter);
|
WMSetLabelTextAlignment(WPrefs.statusL, WACenter);
|
||||||
WMSetLabelText(WPrefs.statusL, _("Starting..."));
|
WMSetLabelText(WPrefs.statusL, _("Starting..."));
|
||||||
|
|
||||||
WPrefs.creditsL = WMCreateLabel(WPrefs.banner);
|
|
||||||
WMResizeWidget(WPrefs.creditsL, FRAME_WIDTH-20, 60);
|
|
||||||
WMMoveWidget(WPrefs.creditsL, 10, FRAME_HEIGHT-60);
|
|
||||||
WMSetLabelTextAlignment(WPrefs.creditsL, WACenter);
|
|
||||||
WMSetLabelText(WPrefs.creditsL, _("Programming/Design: Alfredo K. Kojima\n"
|
|
||||||
"Artwork: Marco van Hylckama Vlieg, Largo et al\n"
|
|
||||||
"More Programming: James Thompson et al"));
|
|
||||||
|
|
||||||
|
|
||||||
WMMapSubwidgets(WPrefs.win);
|
WMMapSubwidgets(WPrefs.win);
|
||||||
@@ -416,7 +407,6 @@ changeSection(WMWidget *self, void *data)
|
|||||||
|
|
||||||
if (WPrefs.currentPanel == NULL) {
|
if (WPrefs.currentPanel == NULL) {
|
||||||
WMDestroyWidget(WPrefs.nameL);
|
WMDestroyWidget(WPrefs.nameL);
|
||||||
WMDestroyWidget(WPrefs.creditsL);
|
|
||||||
WMDestroyWidget(WPrefs.versionL);
|
WMDestroyWidget(WPrefs.versionL);
|
||||||
WMDestroyWidget(WPrefs.statusL);
|
WMDestroyWidget(WPrefs.statusL);
|
||||||
|
|
||||||
@@ -722,9 +712,7 @@ Initialize(WMScreen *scr)
|
|||||||
|
|
||||||
WMRealizeWidget(WPrefs.scrollV);
|
WMRealizeWidget(WPrefs.scrollV);
|
||||||
|
|
||||||
WMSetLabelText(WPrefs.statusL,
|
WMSetLabelText(WPrefs.statusL, "");
|
||||||
_("WPrefs is free software and is distributed WITHOUT ANY\n"
|
|
||||||
"WARRANTY under the terms of the GNU General Public License."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,6 @@
|
|||||||
|
|
||||||
/****/
|
/****/
|
||||||
|
|
||||||
#define WVERSION "0.45"
|
|
||||||
#define WMVERSION "0.65.x"
|
|
||||||
|
|
||||||
extern char *NOptionValueChanged;
|
extern char *NOptionValueChanged;
|
||||||
|
|
||||||
typedef struct _Panel Panel;
|
typedef struct _Panel Panel;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ main(int argc, char **argv)
|
|||||||
for (i=1; i<argc; i++) {
|
for (i=1; i<argc; i++) {
|
||||||
if (strcmp(argv[i], "-version")==0
|
if (strcmp(argv[i], "-version")==0
|
||||||
|| strcmp(argv[i], "--version")==0) {
|
|| strcmp(argv[i], "--version")==0) {
|
||||||
printf("WPrefs (Window Maker) %s\n", WVERSION);
|
printf("WPrefs (Window Maker) %s\n", VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (strcmp(argv[i], "-display")==0) {
|
} else if (strcmp(argv[i], "-display")==0) {
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ menuIndexForWindow(WMenu *menu, WWindow *wwin, int old_pos)
|
|||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (menu->entry_no == 0)
|
if (menu->entry_no <= old_pos)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#define WS(i) ((WWindow*)menu->entries[i]->clientdata)->frame->workspace
|
#define WS(i) ((WWindow*)menu->entries[i]->clientdata)->frame->workspace
|
||||||
@@ -326,12 +326,12 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
|||||||
it = entry->flags.indicator_type;
|
it = entry->flags.indicator_type;
|
||||||
ion = entry->flags.indicator_on;
|
ion = entry->flags.indicator_on;
|
||||||
|
|
||||||
wMenuRemoveItem(switchmenu, i);
|
|
||||||
|
|
||||||
if (!IS_OMNIPRESENT(wwin) && idx < 0) {
|
if (!IS_OMNIPRESENT(wwin) && idx < 0) {
|
||||||
idx = menuIndexForWindow(switchmenu, wwin, i);
|
idx = menuIndexForWindow(switchmenu, wwin, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wMenuRemoveItem(switchmenu, i);
|
||||||
|
|
||||||
entry = wMenuInsertCallback(switchmenu, idx, t,
|
entry = wMenuInsertCallback(switchmenu, idx, t,
|
||||||
focusWindow, wwin);
|
focusWindow, wwin);
|
||||||
wfree(t);
|
wfree(t);
|
||||||
|
|||||||
Reference in New Issue
Block a user