1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +01:00

Remove LITE config option

Why?

     1. The reason for its existence is to "Disable some stuff that are
        duplicated in kde", and I don't think I will ever need that.
        Furthermore, even the description in the configure script reads
        "disable some stuff (dont use it)".

     2. It makes the code uglier at some places, e.g.,

         #ifdef LITE
                {
         #if 0
                }
         #endif
         #else

                if (!wRootMenuPerformShortcut(event)) {
         #endif

        which by the way is the ugliness which motivated this patch.

     3. Does not even compile anymore. It fails with

          CC dockedapp.o
          CC event.o
       event.c: In function 'executeButtonAction:
       event.c:711: error: WScreen has no member named root_menu
       event.c:712: error: WScreen has no member named root_menu
       event.c:713: error: WScreen has no member named root_menu
       event.c:715: error: WScreen has no member named root_menu
       event.c:720: error: WScreen has no member named switch_menu
       event.c:721: error: WScreen has no member named switch_menu
       event.c:722: error: WScreen has no member named switch_menu
       event.c:724: error: WScreen has no member named switch_menu
       make[2]: *** [event.o] Error 1
       make[1]: *** [all] Error 2
       make: *** [all-recursive] Error 1

       But instead of fixing this (it would be trivial), let's get
       rid of the whole ugliness altogether.
This commit is contained in:
Carlos R. Mafra
2009-08-23 18:25:59 +02:00
parent 874b0fadf5
commit fe736e849c
14 changed files with 6 additions and 89 deletions

View File

@@ -32,9 +32,7 @@
#include <stdint.h>
#include <unistd.h>
#include <ctype.h>
#if 0
#include <nana.h>
#endif
#include "WindowMaker.h"
#include "wcore.h"
#include "framewin.h"
@@ -81,19 +79,12 @@ MENU_SCROLL_STEPS_US, MENU_SCROLL_DELAY_US}};
static void menuMouseDown(WObjDescriptor * desc, XEvent * event);
static void menuExpose(WObjDescriptor * desc, XEvent * event);
static void menuTitleDoubleClick(WCoreWindow * sender, void *data, XEvent * event);
static void menuTitleMouseDown(WCoreWindow * sender, void *data, XEvent * event);
static void menuCloseClick(WCoreWindow * sender, void *data, XEvent * event);
static void updateTexture(WMenu * menu);
#ifndef LITE
static int saveMenuRecurs(WMPropList * menus, WScreen * scr, WMenu * menu);
static int restoreMenuRecurs(WScreen * scr, WMPropList * menus, WMenu * menu, char *path);
#endif /* !LITE */
static void selectEntry(WMenu * menu, int entry_no);
static void closeCascade(WMenu * menu);
@@ -2332,7 +2323,6 @@ void wMenuSaveState(WScreen * scr)
menus = WMCreatePLDictionary(NULL, NULL);
#ifndef LITE
if (scr->switch_menu && scr->switch_menu->flags.buttoned) {
key = WMCreatePLString("SwitchMenu");
saveMenuInfo(menus, scr->switch_menu, key);
@@ -2343,7 +2333,6 @@ void wMenuSaveState(WScreen * scr)
if (saveMenuRecurs(menus, scr, scr->root_menu))
save_menus = 1;
#endif /* !LITE */
if (scr->workspace_menu && scr->workspace_menu->flags.buttoned) {
key = WMCreatePLString("WorkspaceMenu");
saveMenuInfo(menus, scr->workspace_menu, key);
@@ -2359,8 +2348,6 @@ void wMenuSaveState(WScreen * scr)
WMReleasePropList(menus);
}
#ifndef LITE
static Bool getMenuPath(WMenu * menu, char *buffer, int bufSize)
{
Bool ok = True;
@@ -2416,7 +2403,6 @@ static Bool saveMenuRecurs(WMPropList * menus, WScreen * scr, WMenu * menu)
}
return save_menus;
}
#endif /* !LITE */
#define COMPLAIN(key) wwarning(_("bad value in menus state info: %s"), key)
@@ -2461,12 +2447,10 @@ static int restoreMenu(WScreen * scr, WMPropList * menu, int which)
if (!getMenuInfo(menu, &x, &y, &lowered))
return False;
#ifndef LITE
if (which & WSS_SWITCHMENU) {
OpenSwitchMenu(scr, x, y, False);
pmenu = scr->switch_menu;
}
#endif /* !LITE */
if (pmenu) {
int width = MENUW(pmenu);
@@ -2494,7 +2478,6 @@ static int restoreMenu(WScreen * scr, WMPropList * menu, int which)
return False;
}
#ifndef LITE
static int restoreMenuRecurs(WScreen * scr, WMPropList * menus, WMenu * menu, char *path)
{
WMPropList *key, *entry;
@@ -2557,7 +2540,6 @@ static int restoreMenuRecurs(WScreen * scr, WMPropList * menus, WMenu * menu, ch
return res;
}
#endif /* !LITE */
void wMenuRestoreState(WScreen * scr)
{
@@ -2581,13 +2563,11 @@ void wMenuRestoreState(WScreen * scr)
WMReleasePropList(skey);
restoreMenu(scr, menu, WSS_SWITCHMENU);
#ifndef LITE
if (!scr->root_menu) {
OpenRootMenu(scr, scr->scr_width * 2, 0, False);
wMenuUnmap(scr->root_menu);
}
restoreMenuRecurs(scr, menus, scr->root_menu, "");
#endif /* !LITE */
}
void OpenWorkspaceMenu(WScreen * scr, int x, int y)
@@ -2595,12 +2575,11 @@ void OpenWorkspaceMenu(WScreen * scr, int x, int y)
WMenu *menu, *parent;
WMenuEntry *entry;
#ifndef LITE
if (!scr->root_menu) {
OpenRootMenu(scr, scr->scr_width * 2, 0, False);
wMenuUnmap(scr->root_menu);
}
#endif
menu = scr->workspace_menu;
if (menu) {
if (menu->flags.mapped) {