mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Changed initial workspace specification in window attributes panel.
This commit is contained in:
@@ -494,15 +494,17 @@ okEditTexture(void *data)
|
|||||||
|
|
||||||
HideTexturePanel(panel->texturePanel);
|
HideTexturePanel(panel->texturePanel);
|
||||||
|
|
||||||
|
if (titem->current) {
|
||||||
name = GetTexturePanelTextureName(panel->texturePanel);
|
name = GetTexturePanelTextureName(panel->texturePanel);
|
||||||
|
|
||||||
|
free(titem->title);
|
||||||
|
titem->title = name;
|
||||||
|
}
|
||||||
|
|
||||||
prop = GetTexturePanelTexture(panel->texturePanel);
|
prop = GetTexturePanelTexture(panel->texturePanel);
|
||||||
|
|
||||||
str = PLGetDescription(prop);
|
str = PLGetDescription(prop);
|
||||||
|
|
||||||
free(titem->title);
|
|
||||||
titem->title = name;
|
|
||||||
|
|
||||||
PLRelease(titem->prop);
|
PLRelease(titem->prop);
|
||||||
titem->prop = prop;
|
titem->prop = prop;
|
||||||
|
|
||||||
|
|||||||
@@ -461,14 +461,12 @@ saveSettings(WMButton *button, InspectorPanel *panel)
|
|||||||
free(icon_file);
|
free(icon_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WMGetButtonSelected(panel->curRb) != 0) {
|
{
|
||||||
value = PLMakeString("");
|
|
||||||
insertAttribute(dict, winDic, AStartWorkspace, value, &different, flags);
|
|
||||||
PLRelease(value);
|
|
||||||
} else if (WMGetButtonSelected(panel->setRb) != 0) {
|
|
||||||
int i = WMGetPopUpButtonSelectedItem(panel->wsP);
|
int i = WMGetPopUpButtonSelectedItem(panel->wsP);
|
||||||
|
|
||||||
if (i < panel->frame->screen_ptr->workspace_count) {
|
i--;
|
||||||
|
|
||||||
|
if (i>=0 && i < panel->frame->screen_ptr->workspace_count) {
|
||||||
value = PLMakeString(panel->frame->screen_ptr->workspaces[i]->name);
|
value = PLMakeString(panel->frame->screen_ptr->workspaces[i]->name);
|
||||||
insertAttribute(dict, winDic, AStartWorkspace, value, &different, flags);
|
insertAttribute(dict, winDic, AStartWorkspace, value, &different, flags);
|
||||||
PLRelease(value);
|
PLRelease(value);
|
||||||
@@ -795,6 +793,8 @@ applySettings(WMButton *button, InspectorPanel *panel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
revertSettings(WMButton *button, InspectorPanel *panel)
|
revertSettings(WMButton *button, InspectorPanel *panel)
|
||||||
{
|
{
|
||||||
@@ -910,10 +910,9 @@ revertSettings(WMButton *button, InspectorPanel *panel)
|
|||||||
n = wDefaultGetStartWorkspace(wwin->screen_ptr, wm_instance, wm_class);
|
n = wDefaultGetStartWorkspace(wwin->screen_ptr, wm_instance, wm_class);
|
||||||
|
|
||||||
if (n >= 0 && n < wwin->screen_ptr->workspace_count) {
|
if (n >= 0 && n < wwin->screen_ptr->workspace_count) {
|
||||||
WMPerformButtonClick(panel->setRb);
|
WMSetPopUpButtonSelectedItem(panel->wsP, n+1);
|
||||||
WMSetPopUpButtonSelectedItem(panel->wsP, n);
|
|
||||||
} else {
|
} else {
|
||||||
WMPerformButtonClick(panel->curRb);
|
WMSetPopUpButtonSelectedItem(panel->wsP, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1285,21 +1284,10 @@ createInspectorForWindow(WWindow *wwin)
|
|||||||
WMResizeWidget(panel->wsFrm, PWIDTH - (2 * 15), 70);
|
WMResizeWidget(panel->wsFrm, PWIDTH - (2 * 15), 70);
|
||||||
WMSetFrameTitle(panel->wsFrm, _("Initial Workspace"));
|
WMSetFrameTitle(panel->wsFrm, _("Initial Workspace"));
|
||||||
|
|
||||||
panel->curRb = WMCreateRadioButton(panel->wsFrm);
|
|
||||||
WMMoveWidget(panel->curRb, 10, 15);
|
|
||||||
WMResizeWidget(panel->curRb, frame_width - (2 * 10), 20);
|
|
||||||
WMSetButtonText(panel->curRb, _("Nowhere in particular"));
|
|
||||||
|
|
||||||
|
|
||||||
panel->setRb = WMCreateRadioButton(panel->wsFrm);
|
|
||||||
WMMoveWidget(panel->setRb, 10, 40);
|
|
||||||
WMResizeWidget(panel->setRb, 25, 20);
|
|
||||||
WMGroupButtons(panel->curRb, panel->setRb);
|
|
||||||
WMSetButtonText(panel->setRb, NULL);
|
|
||||||
|
|
||||||
panel->wsP = WMCreatePopUpButton(panel->wsFrm);
|
panel->wsP = WMCreatePopUpButton(panel->wsFrm);
|
||||||
WMMoveWidget(panel->wsP, 30, 40);
|
WMMoveWidget(panel->wsP, 20, 30);
|
||||||
WMResizeWidget(panel->wsP, PWIDTH - (2 * 15) - 25 - 10 - (2 * 5), 20);
|
WMResizeWidget(panel->wsP, PWIDTH - (2 * 15) - (2 * 20), 20);
|
||||||
|
WMAddPopUpButtonItem(panel->wsP, _("Nowhere in particular"));
|
||||||
for (i = 0; i < wwin->screen_ptr->workspace_count; i++) {
|
for (i = 0; i < wwin->screen_ptr->workspace_count; i++) {
|
||||||
WMAddPopUpButtonItem(panel->wsP, scr->workspaces[i]->name);
|
WMAddPopUpButtonItem(panel->wsP, scr->workspaces[i]->name);
|
||||||
}
|
}
|
||||||
@@ -1307,12 +1295,9 @@ createInspectorForWindow(WWindow *wwin)
|
|||||||
i = wDefaultGetStartWorkspace(wwin->screen_ptr, wwin->wm_instance,
|
i = wDefaultGetStartWorkspace(wwin->screen_ptr, wwin->wm_instance,
|
||||||
wwin->wm_class);
|
wwin->wm_class);
|
||||||
if (i >= 0 && i <= wwin->screen_ptr->workspace_count) {
|
if (i >= 0 && i <= wwin->screen_ptr->workspace_count) {
|
||||||
WMSetButtonSelected(panel->curRb, False);
|
|
||||||
WMSetButtonSelected(panel->setRb, True);
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->wsP, i);
|
WMSetPopUpButtonSelectedItem(panel->wsP, i);
|
||||||
} else {
|
} else {
|
||||||
WMSetButtonSelected(panel->curRb, True);
|
WMSetPopUpButtonSelectedItem(panel->wsP, 0);
|
||||||
WMSetButtonSelected(panel->setRb, False);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* application wide attributes */
|
/* application wide attributes */
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ typedef struct InspectorPanel {
|
|||||||
WMButton *browseIconBtn;
|
WMButton *browseIconBtn;
|
||||||
|
|
||||||
WMFrame *wsFrm;
|
WMFrame *wsFrm;
|
||||||
WMButton *curRb;
|
|
||||||
WMButton *setRb;
|
|
||||||
WMPopUpButton *wsP;
|
WMPopUpButton *wsP;
|
||||||
|
|
||||||
/* 5th page. application wide attributes */
|
/* 5th page. application wide attributes */
|
||||||
|
|||||||
Reference in New Issue
Block a user