1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

Variable workspace_count moved to the workspace object in the global namespace

The variable workspace_count, that contains the number of workspaces
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_count.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-10-08 00:56:30 +02:00
committed by Carlos R. Mafra
parent f60e65001b
commit 9e103a46e9
13 changed files with 87 additions and 87 deletions

View File

@@ -494,7 +494,7 @@ static void saveSettings(WMButton *button, InspectorPanel *panel)
}
i = WMGetPopUpButtonSelectedItem(panel->wsP) - 1;
if (i >= 0 && i < panel->frame->screen_ptr->workspace_count) {
if (i >= 0 && i < w_global.workspace.count) {
value = WMCreatePLString(panel->frame->screen_ptr->workspaces[i]->name);
different |= insertAttribute(dict, winDic, AStartWorkspace, value, flags);
WMReleasePropList(value);
@@ -932,7 +932,7 @@ static void revertSettings(WMButton *button, InspectorPanel *panel)
n = wDefaultGetStartWorkspace(wwin->screen_ptr, wm_instance, wm_class);
if (n >= 0 && n < wwin->screen_ptr->workspace_count)
if (n >= 0 && n < w_global.workspace.count)
WMSetPopUpButtonSelectedItem(panel->wsP, n + 1);
else
WMSetPopUpButtonSelectedItem(panel->wsP, 0);
@@ -1529,11 +1529,11 @@ static void create_tab_icon_workspace(WWindow *wwin, InspectorPanel *panel, int
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 < w_global.workspace.count; i++)
WMAddPopUpButtonItem(panel->wsP, scr->workspaces[i]->name);
i = wDefaultGetStartWorkspace(wwin->screen_ptr, wwin->wm_instance, wwin->wm_class);
if (i >= 0 && i <= wwin->screen_ptr->workspace_count)
if (i >= 0 && i <= w_global.workspace.count)
WMSetPopUpButtonSelectedItem(panel->wsP, i + 1);
else
WMSetPopUpButtonSelectedItem(panel->wsP, 0);