Enlightenment CVS committal Author : andreas99 Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h iconify.c settings.c warp.c Log Message: new focuslist with images =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.361 retrieving revision 1.362 diff -u -3 -r1.361 -r1.362 --- E.h 8 Feb 2005 21:11:12 -0000 1.361 +++ E.h 9 Feb 2005 13:45:25 -0000 1.362 @@ -929,6 +929,7 @@ #endif struct { + char icon_mode; char enable; char showsticky; char showshaded; @@ -1892,6 +1893,9 @@ char expose, int image_type, TextClass * tc, TextState * ts, const char *text); +/* iconify.c */ +void UpdateAppIcon(EWin * ewin, int imode); + /* ipc.c */ void __PRINTF__ IpcPrintf(const char *fmt, ...); int HandleIPC(const char *params, Client * c); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -3 -r1.126 -r1.127 --- iconify.c 6 Feb 2005 19:13:31 -0000 1.126 +++ iconify.c 9 Feb 2005 13:45:27 -0000 1.127 @@ -34,7 +34,6 @@ typedef struct _iconbox Iconbox; static void IconboxesConfigSave(void); -static void UpdateAppIcon(EWin * ewin, int imode); static Iconbox *SelectIconboxForEwin(EWin * ewin); /* Systray stuff */ @@ -944,7 +943,7 @@ Efree(ib); } -static void +void UpdateAppIcon(EWin * ewin, int imode) { /* free whatever we had before */ @@ -999,6 +998,20 @@ if (!ewin->icon_image) IB_GetAppIcon(ewin); break; + case 3: + /* try E first, then app */ + if (!ewin->icon_image) + IB_GetEIcon(ewin); + if (!ewin->icon_image) + IB_GetAppIcon(ewin); + break; + case 4: + /* try app first, then E */ + if (!ewin->icon_image) + IB_GetAppIcon(ewin); + if (!ewin->icon_image) + IB_GetEIcon(ewin); + break; default: break; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/settings.c,v retrieving revision 1.130 retrieving revision 1.131 diff -u -3 -r1.130 -r1.131 --- settings.c 29 Jan 2005 07:11:58 -0000 1.130 +++ settings.c 9 Feb 2005 13:45:28 -0000 1.131 @@ -29,6 +29,7 @@ static char tmp_owner_popup_focus; static char tmp_raise_focus; static char tmp_warp_focus; +static int tmp_warp_icon_mode; static char tmp_warp_after_focus; static char tmp_raise_after_focus; @@ -60,6 +61,7 @@ Conf.warplist.showshaded = tmp_showshaded; Conf.warplist.showiconified = tmp_showiconified; Conf.warplist.warpfocused = tmp_warpfocused; + Conf.warplist.icon_mode = tmp_warp_icon_mode; Conf.focus.clickraises = tmp_clickalways; FocusFix(); @@ -71,7 +73,7 @@ SettingsFocus(void) { Dialog *d; - DItem *table, *di, *radio; + DItem *table, *di, *radio, *radio2; if ((d = FindItem("CONFIGURE_FOCUS", 0, LIST_FINDBY_NAME, LIST_TYPE_DIALOG))) { @@ -95,6 +97,7 @@ tmp_showshaded = Conf.warplist.showshaded; tmp_showiconified = Conf.warplist.showiconified; tmp_warpfocused = Conf.warplist.warpfocused; + tmp_warp_icon_mode = Conf.warplist.icon_mode; tmp_clickalways = Conf.focus.clickraises; @@ -283,6 +286,46 @@ DialogItemSetFill(di, 1, 0); DialogItemSeparatorSetOrientation(di, 0); + di = DialogAddItem(table, DITEM_TEXT); + DialogItemSetPadding(di, 2, 2, 2, 2); + DialogItemSetFill(di, 0, 0); + DialogItemSetAlign(di, 0, 512); + DialogItemSetColSpan(di, 2); + DialogItemTextSetText(di, + _ + ("Focuslist image display policy (if one operation fails, try the next):")); + + radio2 = di = DialogAddItem(table, DITEM_RADIOBUTTON); + DialogItemSetPadding(di, 2, 2, 2, 2); + DialogItemSetFill(di, 1, 0); + DialogItemSetColSpan(di, 2); + DialogItemRadioButtonSetText(di, _("First E Icon, then App Icon")); + DialogItemRadioButtonSetFirst(di, radio2); + DialogItemRadioButtonGroupSetVal(di, 3); + + di = DialogAddItem(table, DITEM_RADIOBUTTON); + DialogItemSetPadding(di, 2, 2, 2, 2); + DialogItemSetFill(di, 1, 0); + DialogItemSetColSpan(di, 2); + DialogItemRadioButtonSetText(di, _("First App Icon, then E Icon")); + DialogItemRadioButtonSetFirst(di, radio2); + DialogItemRadioButtonGroupSetVal(di, 4); + + di = DialogAddItem(table, DITEM_RADIOBUTTON); + DialogItemSetPadding(di, 2, 2, 2, 2); + DialogItemSetFill(di, 1, 0); + DialogItemSetColSpan(di, 2); + DialogItemRadioButtonSetText(di, _("None")); + DialogItemRadioButtonSetFirst(di, radio2); + DialogItemRadioButtonGroupSetVal(di, 0); + DialogItemRadioButtonGroupSetValPtr(radio2, &tmp_warp_icon_mode); + + di = DialogAddItem(table, DITEM_SEPARATOR); + DialogItemSetColSpan(di, 2); + DialogItemSetPadding(di, 2, 2, 2, 2); + DialogItemSetFill(di, 1, 0); + DialogItemSeparatorSetOrientation(di, 0); + DialogAddButton(d, _("OK"), CB_ConfigureFocus, 1); DialogAddButton(d, _("Apply"), CB_ConfigureFocus, 0); DialogAddButton(d, _("Close"), CB_ConfigureFocus, 1); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -3 -r1.53 -r1.54 --- warp.c 2 Feb 2005 17:12:06 -0000 1.53 +++ warp.c 9 Feb 2005 13:45:30 -0000 1.54 @@ -116,7 +116,10 @@ } Efree(lst); } - w += (ic->padding.left + ic->padding.right); + if (Conf.warplist.icon_mode != 0) + w += (ic->padding.left + ic->padding.right + 2 * h); + else + w += (ic->padding.left + ic->padding.right); h += (ic->padding.top + ic->padding.bottom); GetPointerScreenAvailableArea(&x, &y, &ww, &hh); x += (ww - w) / 2; @@ -153,13 +156,46 @@ if (warplist[i].ewin) { int state; + int text_h, text_w; + int icon_size = + mh - ((ic->padding.top + ic->padding.bottom) / 2); state = (ewin == warplist[i].ewin) ? STATE_CLICKED : STATE_NORMAL; ImageclassApply(ic, warplist[i].win, mw, mh, 0, 0, state, 0, ST_WARPLIST); - TextclassApply(ic, warplist[i].win, mw, mh, 0, 0, state, 0, tc, - warplist[i].txt); + + /* New icon stuff */ + if (Conf.warplist.icon_mode != 0) + { + TextSize(tc, 0, 0, 0, warplist[i].txt, &text_w, &text_h, 17); + TextDraw(tc, warplist[i].win, 0, 0, state, warplist[i].txt, + icon_size + 1.5 * ic->padding.left, + (mh - text_h) / 2, mw, mh, 0, 0); + + UpdateAppIcon(warplist[i].ewin, Conf.warplist.icon_mode); + + if (!warplist[i].ewin->icon_image) + return; + + imlib_context_set_image(warplist[i].ewin->icon_image); + + imlib_context_set_drawable(warplist[i].win); + + imlib_context_set_blend(1); + imlib_render_image_on_drawable_at_size(ic->padding.left, + (ic->padding.top + + ic->padding.bottom) / + 4, icon_size, + icon_size); + imlib_context_set_blend(0); + + } + else + { + TextclassApply(ic, warplist[i].win, mw, mh, 0, 0, state, 0, + tc, warplist[i].txt); + } } } @@ -325,6 +361,7 @@ } static const CfgItem WarplistCfgItems[] = { + CFG_ITEM_INT(Conf.warplist, icon_mode, 3), CFG_ITEM_BOOL(Conf.warplist, enable, 1), CFG_ITEM_BOOL(Conf.warplist, showsticky, 1), CFG_ITEM_BOOL(Conf.warplist, showshaded, 1), ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs