On Sat, 23 Mar 2013, Haroldo Santos escribió:
> A LOT. Very practical - there is a dockapp for it but it has some
> problems: the theme only matches the default wm theme.
>
> Having Drawers inside WM would be a really nice addition.
Nice :-)
I saw the code. It has a lot of very good things, but is a very big patch.
Perhaps, we should do multiple patches for this new code:
1. Add new icons.
2. Old code style clean (spaces, tabs, ...).
3. Prepare old code for new code. Example:
- if (type == WM_CLIP) {
+ switch(type) {
+ case WM_CLIP:
if (scr->clip_icon)
return scr->clip_icon;
btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMClip",
TILE_CLIP);
btn->icon->core->descriptor.handle_expose = clipIconExpose;
- btn->icon->core->descriptor.handle_enternotify =
clipEnterNotify;
- btn->icon->core->descriptor.handle_leavenotify =
clipLeaveNotify;
x_pos = 0;
- } else {
+ break;
+ case WM_DOCK:
+ default: /* to avoid a warning about btn and x_pos, basically */
btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMDock",
TILE_NORMAL);
x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
+ break;
+ case WM_DRAWER:
+ if (name == NULL)
+ name = findUniqueName(scr, "Drawer");
+ btn = wAppIconCreateForDock(scr, NULL, name, "WMDrawer",
TILE_DRAWER);
+ btn->icon->core->descriptor.handle_expose = drawerIconExpose;
+ x_pos = 0;
}
can be only:
- if (type == WM_CLIP) {
+ switch(type) {
+ case WM_CLIP:
if (scr->clip_icon)
return scr->clip_icon;
btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMClip",
TILE_CLIP);
btn->icon->core->descriptor.handle_expose = clipIconExpose;
- btn->icon->core->descriptor.handle_enternotify =
clipEnterNotify;
- btn->icon->core->descriptor.handle_leavenotify =
clipLeaveNotify;
x_pos = 0;
- } else {
+ break;
+ case WM_DOCK:
+ default: /* to avoid a warning about btn and x_pos, basically */
btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMDock",
TILE_NORMAL);
x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
}
About the default: probably we can set x_pos before the switch and btn to NULL.
The x_pos = 0 is a problem about icon creation and icon position (as I said in
my pts.tgz patch). I will think again about it after these patches.
4. Add new code (probably multiple patches).
5. Remove old icons.
...
Now is too hard check this patch.
Cheers.
kix.
PS. But very nice patch.
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to [email protected].