This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  0d031dfa4e8df084dc17822508ee897df52f6d45 (commit)
       via  ae407c81ae8d8e40b504041455cf4ada0a35e1a8 (commit)
      from  836a5643d7e9f2cf387d9a2528979aa071fd4dd8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/0d031dfa4e8df084dc17822508ee897df52f6d45

commit 0d031dfa4e8df084dc17822508ee897df52f6d45
Author: Carlos R. Mafra <[email protected]>
Date:   Mon Jan 16 16:09:21 2012 +0000

    wtext killing spree
    
    After using WINGs wInputDialog() to handle renaming the workspace
    upon Ctrl+left click on the workspace menu, all functions in src/text.c
    become unused.

diff --git a/src/Makefile.am b/src/Makefile.am
index eb025e9..0521d11 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -97,9 +97,7 @@ wmaker_SOURCES =              wmspec.h        wmspec.c        
workspace.c -   workspace.h -   text.c -        text.h
+       workspace.h
 
 EXTRA_wmaker_SOURCES = osdep_bsd.c osdep_darwin.c osdep_linux.c osdep_stub.c
 
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index ccb207b..9e2c5f4 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -79,11 +79,7 @@ typedef struct WObjDescriptor {
     void *self;                               /* the object that will be 
called */
     /* event handlers */
     void (*handle_expose)(struct WObjDescriptor *sender, XEvent *event);
-
     void (*handle_mousedown)(struct WObjDescriptor *sender, XEvent *event);
-
-    void (*handle_anything)(struct WObjDescriptor *sender, XEvent *event);
-
     void (*handle_enternotify)(struct WObjDescriptor *sender, XEvent *event);
     void (*handle_leavenotify)(struct WObjDescriptor *sender, XEvent *event);
 
diff --git a/src/text.c b/src/text.c
deleted file mode 100644
index 3fc10e9..0000000
--- a/src/text.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/********************************************************************
- * text.c -- a basic text field                                     *
- * Copyright (C) 1997 Robin D. Clark                                *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, write to the Free Software      *
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
- *                                                                  *
- *   Author: Rob Clark                                              *
- * Internet: [email protected]                                      *
- *  Address: 609 8th Street                                         *
- *           Huntington Beach, CA 92648-4632                        *
- ********************************************************************/
-
-#include "wconfig.h"
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "WindowMaker.h"
-#include "funcs.h"
-#include "text.h"
-#include "actions.h"
-
-/* X11R5 don't have this */
-#ifndef IsPrivateKeypadKey
-#define IsPrivateKeypadKey(keysym) -    (((KeySym)(keysym) >= 0x11000000) && 
((KeySym)(keysym) <= 0x1100FFFF))
-#endif
-
-extern Cursor wCursor[WCUR_LAST];
-
-/********************************************************************
- * The event handler for the text-field:                            *
- ********************************************************************/
-static void textEventHandler(WObjDescriptor * desc, XEvent * event);
-
-static void handleExpose(WObjDescriptor * desc, XEvent * event);
-
-static void textInsert(WTextInput * wtext, char *txt);
-
-/********************************************************************
- * handleKeyPress                                                   *
- *   handle cursor keys, regular keys, etc.  Inserts characters in  *
- *   text field, at cursor position, if it is a "Normal" key.  If   *
- *   ksym is the delete key, backspace key, etc., the appropriate   *
- *   action is performed on the text in the text field.  Does not   *
- *   refresh the text field                                         *
- *                                                                  *
- * Args:   wText - the text field                                   *
- *         ksym  - the key that was pressed                         *
- * Return: True, unless the ksym is ignored                         *
- * Global: modifier - the bitfield that keeps track of the modifier *
- *                    keys that are down                            *
- ********************************************************************/
-static int handleKeyPress(WTextInput * wtext, XKeyEvent * event)
-{
-       KeySym ksym;
-       char buffer[32];
-       int count;
-
-       count = XLookupString(event, buffer, 32, &ksym, NULL);
-
-       /* Ignore these keys: */
-       if (IsFunctionKey(ksym) || IsKeypadKey(ksym) ||
-           IsMiscFunctionKey(ksym) || IsPFKey(ksym) || 
IsPrivateKeypadKey(ksym))
-               /* If we don't handle it, make sure it isn't a key that
-                * the window manager needs to see */
-               return False;
-
-       /* Take care of the cursor keys.. ignore up and down
-        * cursor keys */
-       else if (IsCursorKey(ksym)) {
-               int length = wtext->text.length;
-               switch (ksym) {
-               case XK_Home:
-               case XK_Begin:
-                       wtext->text.endPos = 0;
-                       break;
-               case XK_Left:
-                       wtext->text.endPos--;
-                       break;
-               case XK_Right:
-                       wtext->text.endPos++;
-                       break;
-               case XK_End:
-                       wtext->text.endPos = length;
-                       break;
-               default:
-                       return False;
-               }
-               /* make sure that the startPos and endPos have values
-                * that make sense  (ie the are in [0..length] ) */
-               if (wtext->text.endPos < 0)
-                       wtext->text.endPos = 0;
-               if (wtext->text.endPos > length)
-                       wtext->text.endPos = length;
-               wtext->text.startPos = wtext->text.endPos;
-       } else {
-               switch (ksym) {
-                       /* Ignore these keys: */
-               case XK_Escape:
-                       wtext->canceled = True;
-               case XK_Return:
-                       wtext->done = True;
-                       break;
-               case XK_Tab:
-               case XK_Num_Lock:
-                       break;
-
-               case XK_Delete:
-                       /* delete after cursor */
-                       if ((wtext->text.endPos == wtext->text.startPos) &&
-                           (wtext->text.endPos < wtext->text.length))
-                               wtext->text.endPos++;
-                       textInsert(wtext, "");
-                       break;
-               case XK_BackSpace:
-                       /* delete before cursor */
-                       if ((wtext->text.endPos == wtext->text.startPos) && 
(wtext->text.startPos > 0))
-                               wtext->text.startPos--;
-                       textInsert(wtext, "");
-                       break;
-               default:
-                       if (count == 1 && !iscntrl(buffer[0])) {
-                               buffer[count] = 0;
-                               textInsert(wtext, buffer);
-                       }
-               }
-       }
-       return True;
-}
-
-/********************************************************************
- * textXYtoPos                                                      *
- *   given X coord, return position in array                        *
- ********************************************************************/
-static int textXtoPos(WTextInput * wtext, int x)
-{
-       int pos;
-       x -= wtext->xOffset;
-
-       for (pos = 0; wtext->text.txt[pos] != '0'; pos++) {
-               if (x < 0)
-                       break;
-               else
-                       x -= WMWidthOfString(wtext->font, 
&(wtext->text.txt[pos]), 1);
-       }
-
-       return pos;
-}
-
-/********************************************************************
- * wTextCreate                                                      *
- *   create an instance of a text class                             *
- *                                                                  *
- * Args:                                                            *
- * Return:                                                          *
- * Global: dpy - the display                                        *
- ********************************************************************/
-WTextInput *wTextCreate(WCoreWindow * core, int x, int y, int width, int 
height)
-{
-       WTextInput *wtext;
-
-       wtext = wmalloc(sizeof(WTextInput));
-       wtext->core = wCoreCreate(core, x, y, width, height);
-       wtext->core->descriptor.handle_anything = &textEventHandler;
-       wtext->core->descriptor.handle_expose = &handleExpose;
-       wtext->core->descriptor.parent_type = WCLASS_TEXT_INPUT;
-       wtext->core->descriptor.parent = wtext;
-
-       wtext->font = core->screen_ptr->menu_entry_font;
-
-       XDefineCursor(dpy, wtext->core->window, wCursor[WCUR_TEXT]);
-
-       /* setup the text: */
-       wtext->text.txt = (char *)wmalloc(sizeof(char));
-       wtext->text.txt[0] = '0';
-       wtext->text.length = 0;
-       wtext->text.startPos = 0;
-       wtext->text.endPos = 0;
-
-       {
-               XGCValues gcv;
-
-               gcv.foreground = core->screen_ptr->black_pixel;
-               gcv.background = core->screen_ptr->white_pixel;
-               gcv.line_width = 1;
-               gcv.function = GXcopy;
-
-               wtext->gc = XCreateGC(dpy, wtext->core->window,
-                                     (GCForeground | GCBackground | GCFunction 
| GCLineWidth), &gcv);
-
-               /* set up the regular context */
-               gcv.foreground = core->screen_ptr->black_pixel;
-               gcv.background = core->screen_ptr->white_pixel;
-               gcv.line_width = 1;
-               gcv.function = GXcopy;
-
-               wtext->regGC = XCreateGC(dpy, wtext->core->window,
-                                        (GCForeground | GCBackground | 
GCFunction | GCLineWidth), &gcv);
-
-               /* set up the inverted context */
-               gcv.function = GXcopyInverted;
-
-               wtext->invGC = XCreateGC(dpy, wtext->core->window,
-                                        (GCForeground | GCBackground | 
GCFunction | GCLineWidth), &gcv);
-
-               /* and set the background! */
-               XSetWindowBackground(dpy, wtext->core->window, gcv.background);
-       }
-
-       /* Figure out the y-offset... */
-       wtext->yOffset = (height - WMFontHeight(wtext->font)) / 2;
-       wtext->xOffset = wtext->yOffset;
-
-       wtext->canceled = False;
-       wtext->done = False;    /* becomes True when the user    *
-                                * hits "Return" key             */
-
-       XMapRaised(dpy, wtext->core->window);
-       return wtext;
-}
-
-/********************************************************************
- * wTextDestroy                                                     *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return:                                                          *
- * Global: dpy    - the display                                     *
- ********************************************************************/
-void wTextDestroy(WTextInput * wtext)
-{
-       XFreeGC(dpy, wtext->gc);
-       XFreeGC(dpy, wtext->regGC);
-       XFreeGC(dpy, wtext->invGC);
-       wfree(wtext->text.txt);
-       wCoreDestroy(wtext->core);
-       wfree(wtext);
-}
-
-/* The text-field consists of a frame drawn around the outside,
- * and a textbox inside.  The space between the frame and the
- * text-box is the xOffset,yOffset.  When the text needs refreshing,
- * we only have to redraw the part inside the text-box, and we can
- * leave the frame.  If we get an expose event, or for some reason
- * need to redraw the frame, wTextPaint will redraw the frame, and
- * then call wTextRefresh to redraw the text-box */
-
-/********************************************************************
- * textRefresh                                                     *
- *   Redraw the text field.  Call this after messing with the text  *
- *   field.  wTextRefresh re-draws the inside of the text field. If *
- *   the frame-area of the text-field needs redrawing, call         *
- *   wTextPaint()                                                   *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return: none                                                     *
- * Global: dpy    - the display                                     *
- ********************************************************************/
-static void textRefresh(WTextInput * wtext)
-{
-       WScreen *scr = wtext->core->screen_ptr;
-       char *ptr = wtext->text.txt;
-       int x1, x2, y1, y2;
-
-       /* x1,y1 is the upper left corner of the text box */
-       x1 = wtext->xOffset;
-       y1 = wtext->yOffset;
-       /* x2,y2 is the lower right corner of the text box */
-       x2 = wtext->core->width - wtext->xOffset;
-       y2 = wtext->core->height - wtext->yOffset;
-
-       /* Fill in the text field.  Use the invGC to draw the rectangle,
-        * becuase then it will be the background color */
-       XFillRectangle(dpy, wtext->core->window, wtext->invGC, x1, y1, x2 - x1, 
y2 - y1);
-
-       /* Draw the text normally */
-       WMDrawImageString(scr->wmscreen, wtext->core->window,
-                         scr->black, scr->white, wtext->font, x1, y1, ptr, 
wtext->text.length);
-
-       /* Draw the selected text */
-       if (wtext->text.startPos != wtext->text.endPos) {
-               int sp, ep;
-               /* we need sp < ep */
-               if (wtext->text.startPos > wtext->text.endPos) {
-                       sp = wtext->text.endPos;
-                       ep = wtext->text.startPos;
-               } else {
-                       sp = wtext->text.startPos;
-                       ep = wtext->text.endPos;
-               }
-
-               /* x1,y1 is now the upper-left of the selected area */
-               x1 += WMWidthOfString(wtext->font, ptr, sp);
-               /* and x2,y2 is the lower-right of the selected area */
-               ptr += sp * sizeof(char);
-               x2 = x1 + WMWidthOfString(wtext->font, ptr, (ep - sp));
-               /* Fill in the area  where the selected text will go:     *
-                * use the regGC to draw the rectangle, becuase then it   *
-                * will be the color of the non-selected text             */
-               XFillRectangle(dpy, wtext->core->window, wtext->regGC, x1, y1, 
x2 - x1, y2 - y1);
-
-               /* Draw the selected text. Inverse bg and fg colors for 
selection */
-               WMDrawImageString(scr->wmscreen, wtext->core->window,
-                                 scr->white, scr->black, wtext->font, x1, y1, 
ptr, (ep - sp));
-       }
-
-       /* And draw a quick little line for the cursor position */
-       x1 = WMWidthOfString(wtext->font, wtext->text.txt, wtext->text.endPos)
-           + wtext->xOffset;
-       XDrawLine(dpy, wtext->core->window, wtext->regGC, x1, 2, x1, 
wtext->core->height - 3);
-}
-
-/********************************************************************
- * wTextPaint                                                       *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return:                                                          *
- * Global: dpy    - the display                                     *
- ********************************************************************/
-void wTextPaint(WTextInput * wtext)
-{
-       /* refresh */
-       textRefresh(wtext);
-
-       /* Draw box */
-       XDrawRectangle(dpy, wtext->core->window, wtext->gc, 0, 0,
-                      wtext->core->width - 1, wtext->core->height - 1);
-}
-
-/********************************************************************
- * wTextGetText                                                     *
- *   return the string in the text field wText.  DO NOT FREE THE    *
- *   RETURNED STRING!                                               *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return: the text in the text field (NULL terminated)             *
- * Global:                                                          *
- ********************************************************************/
-char *wTextGetText(WTextInput * wtext)
-{
-       if (!wtext->canceled)
-               return wtext->text.txt;
-       else
-               return NULL;
-}
-
-/********************************************************************
- * wTextPutText                                                     *
- *   Put the string txt in the text field wText.  The text field    *
- *   needs to be explicitly refreshed after wTextPutText by calling *
- *   wTextRefresh().                                                *
- *   The string txt is copied                                       *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- *         txt    - the new text string... freed by the text field! *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-void wTextPutText(WTextInput * wtext, char *txt)
-{
-       int length = strlen(txt);
-
-       /* no memory leaks!  free the old txt */
-       if (wtext->text.txt != NULL)
-               wfree(wtext->text.txt);
-
-       wtext->text.txt = (char *)wmalloc((length + 1) * sizeof(char));
-       strcpy(wtext->text.txt, txt);
-       wtext->text.length = length;
-       /* By default No text is selected, and the cursor is at the end */
-       wtext->text.startPos = length;
-       wtext->text.endPos = length;
-}
-
-/********************************************************************
- * textInsert                                                      *
- *   Insert some text at the cursor.  (if startPos != endPos,       *
- *   replace the selected text, otherwise insert)                   *
- *   The string txt is copied.                                      *
- *                                                                  *
- * Args:   wText  - the text field                                  *
- *         txt    - the new text string... freed by the text field! *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-static void textInsert(WTextInput * wtext, char *txt)
-{
-       char *newTxt;
-       int newLen, txtLen, i, j;
-       int sp, ep;
-
-       /* we need sp < ep */
-       if (wtext->text.startPos > wtext->text.endPos) {
-               sp = wtext->text.endPos;
-               ep = wtext->text.startPos;
-       } else {
-               sp = wtext->text.startPos;
-               ep = wtext->text.endPos;
-       }
-
-       txtLen = strlen(txt);
-       newLen = wtext->text.length + txtLen - (ep - sp) + 1;
-
-       newTxt = (char *)malloc(newLen * sizeof(char));
-
-       /* copy the old text up to sp */
-       for (i = 0; i < sp; i++)
-               newTxt[i] = wtext->text.txt[i];
-
-       /* insert new text */
-       for (j = 0; j < txtLen; j++, i++)
-               newTxt[i] = txt[j];
-
-       /* copy old text after ep */
-       for (j = ep; j < wtext->text.length; j++, i++)
-               newTxt[i] = wtext->text.txt[j];
-
-       newTxt[i] = '0';
-
-       /* By default No text is selected, and the cursor is at the end
-        * of inserted text */
-       wtext->text.startPos = sp + txtLen;
-       wtext->text.endPos = sp + txtLen;
-
-       wfree(wtext->text.txt);
-       wtext->text.txt = newTxt;
-       wtext->text.length = newLen - 1;
-}
-
-/********************************************************************
- * wTextSelect                                                      *
- *   Select some text.  If start == end, then the cursor is moved   *
- *   to that position.  If end == -1, then the text from start to   *
- *   the end of the text entered in the text field is selected.     *
- *   The text field is not automatically re-drawn!  You must call   *
- *   wTextRefresh to re-draw the text field.                        *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- *         start  - the beginning of the selected text              *
- *         end    - the end of the selected text                    *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-void wTextSelect(WTextInput * wtext, int start, int end)
-{
-       if (end == -1)
-               wtext->text.endPos = wtext->text.length;
-       else
-               wtext->text.endPos = end;
-       wtext->text.startPos = start;
-}
-
-/********************************************************************
- * textEventHandler -- handles and dispatches all the events that   *
- *   the text field class supports                                  *
- *                                                                  *
- * Args:   desc - all we need to know about this object             *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-static void textEventHandler(WObjDescriptor * desc, XEvent * event)
-{
-       WTextInput *wtext = desc->parent;
-       int handled = False;    /* has the event been handled */
-
-       switch (event->type) {
-       case MotionNotify:
-               /* If the button isn't down, we don't care about the
-                * event, but otherwise we want to adjust the selected
-                * text so we can wTextRefresh() */
-               if (event->xmotion.state & (Button1Mask | Button3Mask | 
Button2Mask)) {
-                       handled = True;
-                       wtext->text.endPos = textXtoPos(wtext, 
event->xmotion.x);
-               }
-               break;
-
-       case ButtonPress:
-               handled = True;
-               wtext->text.startPos = textXtoPos(wtext, event->xbutton.x);
-               wtext->text.endPos = wtext->text.startPos;
-               break;
-
-       case ButtonRelease:
-               handled = True;
-               wtext->text.endPos = textXtoPos(wtext, event->xbutton.x);
-               break;
-
-       case KeyPress:
-               handled = handleKeyPress(wtext, &event->xkey);
-               break;
-
-       case EnterNotify:
-               handled = True;
-               break;
-
-       case LeaveNotify:
-               handled = True;
-               break;
-
-       default:
-               break;
-       }
-
-       if (handled)
-               textRefresh(wtext);
-       else
-               WMHandleEvent(event);
-
-       return;
-}
-
-static void handleExpose(WObjDescriptor * desc, XEvent * event)
-{
-       wTextPaint(desc->parent);
-}

http://repo.or.cz/w/wmaker-crm.git/commit/ae407c81ae8d8e40b504041455cf4ada0a35e1a8

commit ae407c81ae8d8e40b504041455cf4ada0a35e1a8
Author: Carlos R. Mafra <[email protected]>
Date:   Mon Jan 16 05:31:06 2012 +0000

    Fix non-ascii workspace rename via menu
    
    As pointed out in the comments in
    
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=304480
    
    it's not possible to rename workspaces with non-ascii characters -- more
    precisely characters which require deadkeys with your particular keyboard.
    
    According to the investigation made by Rodolfo Peñas:
    
    http://lists.windowmaker.org/dev/msg02529.html
    
    the fundamental issue behind this bug is the fact that XLookupString can't
    handle deadkeys.
    
    So either we do something radical or live with the bug.
    
    However -- as Rodolfo also pointed out -- renaming the workspaces via the
    Clip works with non-ascii chars. The reason is that the Clip uses a input 
dialog
    function from WINGs to handle the renaming.
    
    So instead of doing the low-level handling of text inside the menu in order
    to rename workspaces, just fire up the same WINGs input dialog to handle it.
    It works and the old function editEntry() can be removed.
    
    Furthermore, it makes the whole set of functions in src/wtext.c useless, and
    they are removed in the next patch.
    
    Overall, 600 lines of code are gone now.
    
    But not everything is perfect. When the input dialog pops up it appears
    partially covered by the menu itself and one is required to move it a bit
    in order to input text. I feel like this small inconvenient is worth for
    the moment. As fixing that might lead to other good stuff later on.
    
    So let's do it.
    
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/src/menu.c b/src/menu.c
index 11e6a7f..ea943b1 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -42,6 +42,7 @@
 #include "text.h"
 #include "xinerama.h"
 #include "workspace.h"
+#include "dialog.h"
 
 /****** Global Variables ******/
 
@@ -1146,86 +1147,6 @@ void wMenuSetEnabled(WMenu * menu, int index, int enable)
        paintEntry(menu->brother, index, index == menu->selected_entry);
 }
 
-/* ====================================================================== */
-
-static void editEntry(WMenu * menu, WMenuEntry * entry)
-{
-       WTextInput *text;
-       XEvent event;
-       WObjDescriptor *desc;
-       char *t;
-       int done = 0;
-       Window old_focus;
-       int old_revert;
-
-       menu->flags.editing = 1;
-
-       text = wTextCreate(menu->menu, 1, menu->entry_height * entry->order,
-                          menu->menu->width - 2, menu->entry_height - 1);
-
-       wTextPutText(text, entry->text);
-       XGetInputFocus(dpy, &old_focus, &old_revert);
-       XSetInputFocus(dpy, text->core->window, RevertToNone, CurrentTime);
-
-       if (XGrabKeyboard(dpy, text->core->window, True, GrabModeAsync, 
GrabModeAsync, CurrentTime) != GrabSuccess) {
-               wwarning(_("could not grab keyboard"));
-               wTextDestroy(text);
-
-               wSetFocusTo(menu->frame->screen_ptr, 
menu->frame->screen_ptr->focused_window);
-               return;
-       }
-
-       while (!done && !text->done) {
-               XSync(dpy, 0);
-               XAllowEvents(dpy, AsyncKeyboard | AsyncPointer, CurrentTime);
-               XSync(dpy, 0);
-               WMNextEvent(dpy, &event);
-
-               if (XFindContext(dpy, event.xany.window, wWinContext, (XPointer 
*) & desc) == XCNOENT)
-                       desc = NULL;
-
-               if ((desc != NULL) && (desc->handle_anything != NULL)) {
-
-                       (*desc->handle_anything) (desc, &event);
-
-               } else {
-                       switch (event.type) {
-                       case ButtonPress:
-                               XAllowEvents(dpy, ReplayPointer, CurrentTime);
-                               done = 1;
-
-                       default:
-                               WMHandleEvent(&event);
-                               break;
-                       }
-               }
-       }
-
-       XSetInputFocus(dpy, old_focus, old_revert, CurrentTime);
-
-       wSetFocusTo(menu->frame->screen_ptr, 
menu->frame->screen_ptr->focused_window);
-
-       t = wTextGetText(text);
-       /* if !t, the user has canceled editing */
-       if (t) {
-               if (entry->text)
-                       wfree(entry->text);
-               entry->text = wstrdup(t);
-
-               menu->flags.realized = 0;
-       }
-       wTextDestroy(text);
-
-       XUngrabKeyboard(dpy, CurrentTime);
-
-       if (t && menu->on_edit)
-               (*menu->on_edit) (menu, entry);
-
-       menu->flags.editing = 0;
-
-       if (!menu->flags.realized)
-               wMenuRealize(menu);
-}
 
 static void selectEntry(WMenu * menu, int entry_no)
 {
@@ -1832,7 +1753,19 @@ static void menuMouseDown(WObjDescriptor * desc, XEvent 
* event)
                entry = menu->entries[entry_no];
 
                if (!close_on_exit && (bev->state & ControlMask) && smenu && 
entry->flags.editable) {
-                       editEntry(smenu, entry);
+                       char buffer[128];
+                       char *name;
+                       int number = entry_no - 2; /* Entries "New" and 
"Destroy Last" appear before workspaces */
+
+                       name = wstrdup(scr->workspaces[number]->name);
+                       snprintf(buffer, sizeof(buffer), _("Type the name for 
workspace %i:"), number + 1);
+
+                       if (wInputDialog(scr, _("Rename Workspace"), buffer, 
&name))
+                               wWorkspaceRename(scr, number, name);
+
+                       if (name)
+                               wfree(name);
+
                        goto byebye;
                } else if (bev->state & ControlMask) {
                        goto byebye;

-----------------------------------------------------------------------

Summary of changes:
 src/Makefile.am   |    4 +-
 src/WindowMaker.h |    4 -
 src/menu.c        |   95 ++--------
 src/text.c        |  531 -----------------------------------------------------
 4 files changed, 15 insertions(+), 619 deletions(-)
 delete mode 100644 src/text.c


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("Fork from the last available CVS version of Window Maker")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to