#
# LXP: Generated at 09-02-07 16:13
#
# This patch modifies the icewm adding new features
# 1.- new look lookXP and new themes
# 2.- allows pixmaps for mouse over in buttons
# 3.- allows left pixmaps in menus (top middle and botom)
# 4.- adds a new script to session manager: (restart)
# 5.- Other bugs fixed or little changes
# 6.- adds amixer 
# 7.- aapm shows graphic status and notifications
#
# In order to use the new features you have to configure with:
# ./configure --enable-lookxp
# or rpmbuild --with lookxp
#
#
#          LXP Team (http://lxp.sourceforge.net)
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/aapm.h lxp-icewm-1.2.30/src/aapm.h
--- icewm-1.2.30/src/aapm.h	2006-12-24 17:05:00.000000000 +0100
+++ lxp-icewm-1.2.30/src/aapm.h	2007-01-16 10:26:35.000000000 +0100
@@ -3,6 +3,8 @@
 
 #include "ywindow.h"
 #include "ytimer.h"
+#include "ymsgbox.h"
+
 
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 #define APMDEV "/dev/apm"
@@ -22,7 +24,7 @@
 } bat_info;
   
 
-class YApm: public YWindow, public YTimerListener {
+class YApm: public YWindow, public YTimerListener, public YActionListener, public YMsgBoxListener {
 public:
     YApm(YWindow *aParent = 0);
     virtual ~YApm();
@@ -31,6 +33,14 @@
 
     void updateToolTip();
     virtual bool handleTimer(YTimer *t);
+    void msgBox(char *message);
+    void msgBoxClose();
+    void notifyLowBattery();
+    void notifyAC_on();
+    void notifyAC_off();
+    virtual void handleMsgBox(YMsgBox *, int);
+    virtual void handleButton(const XButtonEvent &button);
+    virtual void actionPerformed(YAction*, unsigned int);
 
 private:
     YTimer *apmTimer;
@@ -39,12 +49,24 @@
     int calcInitialWidth();
     int calcWidth(const char *s, int count);
 
+    void ApmStr(char *s, bool Tool);
     void AcpiStr(char *s, bool Tool);
     void PmuStr(char *, const bool);
     int ignore_directory_bat_entry(struct dirent *de);
 
+
+    float percent;
+    int   rtime;
+    int   plugged;
+    int   charging;
+    int   notified;
+    YMsgBox *fApmDialog;
+
     static YColor *apmBg;
     static YColor *apmFg;
+    static YColor *apmFull;
+    static YColor *apmEmpty;
+    static YColor *apmBorder;
     static ref<YFont> apmFont;
 
     // display mode: pmu, acpi or apm info
@@ -60,6 +82,7 @@
     //(file)name of ac adapter
     char *acpiACName;
     char *fCurrentState;
+    char *fCurrentStateTool;
 
     void updateState();
 };
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/amixer.h lxp-icewm-1.2.30/src/amixer.h
--- icewm-1.2.30/src/amixer.h	1970-01-01 01:00:00.000000000 +0100
+++ lxp-icewm-1.2.30/src/amixer.h	2007-01-19 18:00:01.000000000 +0100
@@ -0,0 +1,74 @@
+#ifndef linux
+#undef CONFIG_APPLET_MIXER
+#elif CONFIG_APPLET_MIXER
+
+#include "ywindow.h"
+#include "ytooltip.h"
+#include "ytimer.h"
+
+#include <stdio.h>
+
+#define USE_PIXMAP 1
+
+#define PIX_NUM 5
+
+#define mixerDEV "/dev/mixer"
+//#define mixerDEV "/dev/snd/controlC0"
+
+// http://www.4front-tech.com/pguide/oss.pdf
+
+class MYWindow: public YWindow {
+public:
+    MYWindow(YWindow *aParent):
+	YWindow(aParent) {
+#ifdef CONFIG_TOOLTIP
+    fToolTip=0;
+    fToolTipTimer=0;
+#endif
+    }
+    virtual void handleCrossing(const XCrossingEvent &crossing);
+    virtual void setToolTip(const char *tip);
+private:
+#ifdef CONFIG_TOOLTIP
+    YToolTip *fToolTip;
+#endif
+    static YTimer *fToolTipTimer;
+};
+
+
+class YMixer: public MYWindow, public YTimerListener {
+	public:
+		YMixer(YWindow *aParent = 0);
+		virtual ~YMixer();
+
+		virtual void paint(Graphics &g, const YRect &r);
+
+		void updateToolTip();
+		void updateMute();
+		virtual bool handleTimer(YTimer *t);
+
+		virtual void handleButton(const XButtonEvent &button);
+
+	private:
+		YTimer *mixerTimer;
+
+#if USE_PIXMAP
+		int init_pixmaps();
+#endif
+		
+		int bar_height;
+
+		int mixer_fd;
+		int mixer_init();
+		int mixer_read();
+		int mixer_write(int);
+		int mixer_ismuted();
+		int mixer_mute();
+		int mixer_unmute();
+
+		int last_val;
+		int last_muted;
+		ref<YPixmap> PixMix[PIX_NUM];
+		ref<YPixmap> PixMute;
+};
+#endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/atasks.h lxp-icewm-1.2.30/src/atasks.h
--- icewm-1.2.30/src/atasks.h	2006-12-24 17:05:00.000000000 +0100
+++ lxp-icewm-1.2.30/src/atasks.h	2007-01-06 05:04:52.000000000 +0100
@@ -43,6 +43,7 @@
     bool fFlashOn;
     time_t fFlashStart;
     int selected;
+    int over; //LXP
     YTimer *fFlashTimer;
     static YTimer *fRaiseTimer;
 };
@@ -60,7 +61,7 @@
     TaskBarApp *getLast() const { return fLast; }
 
     void relayout() { fNeedRelayout = true; }
-    void relayoutNow();
+    bool relayoutNow(); //LXP
 
     virtual void handleClick(const XButtonEvent &up, int count);
     virtual void paint(Graphics &g, const YRect &r);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/atray.h lxp-icewm-1.2.30/src/atray.h
--- icewm-1.2.30/src/atray.h	2006-12-24 17:05:00.000000000 +0100
+++ lxp-icewm-1.2.30/src/atray.h	2007-01-06 05:04:52.000000000 +0100
@@ -67,7 +67,7 @@
     int getRequiredWidth();
 
     void relayout() { fNeedRelayout = true; }
-    void relayoutNow();
+    bool relayoutNow();
 
     virtual void handleClick(const XButtonEvent &up, int count);
     virtual void paint(Graphics &g, const YRect &r);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/aworkspaces.h lxp-icewm-1.2.30/src/aworkspaces.h
--- icewm-1.2.30/src/aworkspaces.h	2006-12-24 17:05:00.000000000 +0100
+++ lxp-icewm-1.2.30/src/aworkspaces.h	2007-01-19 17:20:51.000000000 +0100
@@ -19,7 +19,6 @@
     virtual void actionPerformed(YAction *button, unsigned int modifiers);
     virtual ref<YFont> getFont();
     virtual YColor * getColor();
-    virtual YSurface getSurface();
 
 private:
     static YTimer *fRaiseTimer;
@@ -49,10 +48,16 @@
 
 extern ref<YPixmap> workspacebuttonPixmap;
 extern ref<YPixmap> workspacebuttonactivePixmap;
+#ifdef TASKBUTTON_OVER
+extern ref<YPixmap> workspacebuttonoverPixmap; //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
 extern ref<YPixbuf> workspacebuttonPixbuf;
 extern ref<YPixbuf> workspacebuttonactivePixbuf;
+#ifdef TASKBUTTON_OVER
+extern ref<YPixbuf> workspacebuttonoverPixbuf;
+#endif
 #endif
 
 #endif
--- ./src/default.h.00	2006-12-24 17:05:00.000000000 +0100
+++ ./src/default.h	2007-07-22 13:04:33.000000000 +0200
@@ -4,6 +4,8 @@
 #include "yconfig.h"
 
 /************************************************************************************************************************************************************/
+XIV(bool, disableCtrlAltDelWin,			false)
+XIV(bool, disableTaskBarMenu,			false)
 XIV(int, focusMode,                             1)
 XIV(bool, clickFocus,                           true)
 XIV(bool, focusOnAppRaise,                      false) 
@@ -54,7 +56,9 @@
 XIV(bool, taskBarShowAllWindows,                false)
 XIV(bool, taskBarShowWindowIcons,               true)
 XIV(bool, taskBarAutoHide,                      false)
+#ifndef CONFIG_LOOK_WINXP
 XIV(bool, taskBarDoubleHeight,                  false)
+#endif
 XIV(bool, taskBarWorkspacesLeft,                true)
 XIV(bool, taskBarShowCPUStatus,                 true)
 XIV(bool, taskBarShowNetStatus,                 true)
@@ -180,6 +184,8 @@
 #if defined(CFGDEF) && !defined(NO_CONFIGURE)
 
 cfoption icewm_preferences[] = {
+    OBV("DisableCtrlAltDelWin",                 &disableCtrlAltDelWin,          "Disable Ctrl+Alt-Del window"),
+    OBV("DisableTaskBarMenu",                   &disableTaskBarMenu,            "Disable right click task bar menu"),
     OBV("ClickToFocus",                         &clickFocus,                    "Focus windows by clicking"),
     OBV("FocusOnAppRaise",                      &focusOnAppRaise,               "Focus windows when application requests to raise"),
     OBV("RequestFocusOnAppRaise",                      &requestFocusOnAppRaise,               "Request focus (flashing in taskbar) when application requests raise"),
@@ -274,7 +280,9 @@
     OBV("TaskBarShowCPUStatus",                 &taskBarShowCPUStatus,          "Show CPU status on task bar (Linux             & Solaris)"),
     OBV("TaskBarShowNetStatus",                 &taskBarShowNetStatus,          "Show network status on task bar (Linux only)"),
     OBV("TaskBarShowCollapseButton",            &taskBarShowCollapseButton,     "Show a button to collapse the taskbar"),
+#ifndef CONFIG_LOOK_WINXP
     OBV("TaskBarDoubleHeight",                  &taskBarDoubleHeight,           "Use double-height task bar"),
+#endif
     OBV("TaskBarWorkspacesLeft",                &taskBarWorkspacesLeft,         "Place workspace pager on left, not right"),
     OBV("TaskBarLaunchOnSingleClick",           &taskBarLaunchOnSingleClick,    "Execute taskbar applet commands (like MailCommand,     ClockCommand,   ...) on single click"),
 #endif
@@ -382,6 +390,7 @@
     OKV("KeyWinOccupyAll",                      gKeyWinOccupyAll,               ""),
     OKV("KeyWinLower",                          gKeyWinLower,                   ""),
     OKV("KeyWinClose",                          gKeyWinClose,                   ""),
+    OKV("KeyWinKill",                           gKeyWinKill,                    ""),
     OKV("KeyWinRestore",                        gKeyWinRestore,                 ""),
     OKV("KeyWinPrev",                           gKeyWinPrev,                    ""),
     OKV("KeyWinNext",                           gKeyWinNext,                    ""),
