ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] Re: [PATCH] virtual screens using frame set trees


From: Henrik Enberg
Subject: [RP] Re: [PATCH] virtual screens using frame set trees
Date: Wed Oct 16 11:15:02 2002
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Dan Aloni <address@hidden> writes:

> This patch allows a ratpoison user to manage different sets of 
> frame configurations, thus adding a virtual-screen type of
> functionality. The semantics are:
>
>  * A frame set is defined as a the frames that compose one
>    screen, specifing all there is about these frames: size,
>    mapped windows, etc.

I really like this patch as well.  I made a couple of small changes in
the patch below to make name_frameset and select_frameset return the
current frameset name if called non-interactively (i.e. from a script)
with no arguments.  name_frameset also complains if you call it
interactively without an arg.  This kills the ability to set the name
to NULL, but I'm not sure that is useful.

Now I just need to come up with a good set of keybindings.  Any
suggestions? 

--- src/actions.c.~1~   2002-10-16 17:20:10.000000000 +0200
+++ src/actions.c       2002-10-16 20:06:51.000000000 +0200
@@ -2625,18 +2625,18 @@
 {
   rp_frame_set *set = current_frame_set();
 
+  if (!data && !interactive)
+    return xsprintf ("%s", set->name);
+
   if (data)
     {
-      set->name = xstrdup(data);
-    }
-  else 
-    {
       if (set->name) 
-       {
-         free(set->name);
-       }
-      set->name = NULL;
+       free (set->name);
+
+      set->name = xstrdup (data);
     }
+  else
+    message (" name_frameset: one argument required ");
 
   return NULL;
 }
@@ -2646,6 +2646,9 @@
 {
   screen_info *screen = current_screen();
 
+  if (!data && !interactive)
+    return xsprintf ("%s", current_frame_set ()->name);
+
   if (!data) 
     {
       message (" select_frameset: No name given ");

-- 
Booting... /vmemacs.el



reply via email to

[Prev in Thread] Current Thread [Next in Thread]