[Pkg-wmaker-commits] [wmaker] 14/21: wmaker: Print error dialog when attempting to delete an in-use workspace.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Jan 9 16:06:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmaker.

commit 15ae70b159c9728b7a270bd68f4630808cc0f471
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Thu Oct 1 21:51:16 2015 -0400

    wmaker: Print error dialog when attempting to delete an in-use workspace.
---
 src/workspace.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/workspace.c b/src/workspace.c
index e3efcfd..23da1ef 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -50,6 +50,7 @@
 #include "xinerama.h"
 #include "event.h"
 #include "wsmap.h"
+#include "dialog.h"
 
 #define MC_NEW          0
 #define MC_DESTROY_LAST 1
@@ -142,8 +143,13 @@ Bool wWorkspaceDelete(WScreen * scr, int workspace)
 	/* verify if workspace is in use by some window */
 	tmp = scr->focused_window;
 	while (tmp) {
-		if (!IS_OMNIPRESENT(tmp) && tmp->frame->workspace == workspace)
+		if (!IS_OMNIPRESENT(tmp) && tmp->frame->workspace == workspace) {
+			char buf[256];
+			snprintf(buf, sizeof(buf), _("Workspace \"%s\" in use; cannot delete"),
+				 scr->workspaces[workspace]->name);
+			wMessageDialog(scr, _("Error"), buf, _("OK"), NULL, NULL);
 			return False;
+		}
 		tmp = tmp->prev;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmaker.git



More information about the Pkg-wmaker-commits mailing list