Validate focus list icon mode. Use defs for icon modes.
SVN revision: 47354
This commit is contained in:
parent
252616e1cb
commit
60054a9bdc
|
@ -30,6 +30,7 @@
|
|||
#include "ewins.h"
|
||||
#include "hints.h"
|
||||
#include "iclass.h"
|
||||
#include "icons.h"
|
||||
#include "menus.h"
|
||||
|
||||
extern const ContainerOps IconboxOps;
|
||||
|
@ -1714,19 +1715,19 @@ _DlgFillContainer(Dialog * d, DItem * table, void *data)
|
|||
_
|
||||
("Snapshot Windows, Use application icon, Use Enlightenment Icon"));
|
||||
DialogItemRadioButtonSetFirst(di, radio);
|
||||
DialogItemRadioButtonGroupSetVal(di, 0);
|
||||
DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_SNAP);
|
||||
|
||||
di = DialogAddItem(table, DITEM_RADIOBUTTON);
|
||||
DialogItemSetText(di,
|
||||
_
|
||||
("Use application icon, Use Enlightenment Icon, Snapshot Window"));
|
||||
DialogItemRadioButtonSetFirst(di, radio);
|
||||
DialogItemRadioButtonGroupSetVal(di, 1);
|
||||
DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_APP_IMG_SNAP);
|
||||
|
||||
di = DialogAddItem(table, DITEM_RADIOBUTTON);
|
||||
DialogItemSetText(di, _("Use Enlightenment Icon, Snapshot Window"));
|
||||
DialogItemRadioButtonSetFirst(di, radio);
|
||||
DialogItemRadioButtonGroupSetVal(di, 2);
|
||||
DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_IMG_APP_SNAP);
|
||||
DialogItemRadioButtonGroupSetValPtr(radio, &dd->icon_mode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "focus.h"
|
||||
#include "grabs.h"
|
||||
#include "hints.h"
|
||||
#include "icons.h"
|
||||
#include "settings.h"
|
||||
#include "timers.h"
|
||||
#include "xwin.h"
|
||||
|
@ -888,19 +889,19 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__)
|
|||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetText(di, _("First E Icon, then App Icon"));
|
||||
DialogItemRadioButtonSetFirst(di, radio2);
|
||||
DialogItemRadioButtonGroupSetVal(di, 4);
|
||||
DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_IMG_APP);
|
||||
|
||||
di = DialogAddItem(table, DITEM_RADIOBUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetText(di, _("First App Icon, then E Icon"));
|
||||
DialogItemRadioButtonSetFirst(di, radio2);
|
||||
DialogItemRadioButtonGroupSetVal(di, 3);
|
||||
DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_APP_IMG);
|
||||
|
||||
di = DialogAddItem(table, DITEM_RADIOBUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetText(di, _("None"));
|
||||
DialogItemRadioButtonSetFirst(di, radio2);
|
||||
DialogItemRadioButtonGroupSetVal(di, 0);
|
||||
DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_NONE);
|
||||
DialogItemRadioButtonGroupSetValPtr(radio2, &dd->focuslist.icon_mode);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,12 @@
|
|||
#include "windowmatch.h"
|
||||
#include "xwin.h"
|
||||
|
||||
#define EWIN_ICON_TYPE_NONE 0
|
||||
#define EWIN_ICON_TYPE_APP 1
|
||||
#define EWIN_ICON_TYPE_IMG 2
|
||||
#define EWIN_ICON_TYPE_SNAP 3
|
||||
#define EWIN_ICON_TYPE_FB 4
|
||||
|
||||
static int
|
||||
NetwmIconFindBestSize(unsigned int *val, unsigned int len, int size)
|
||||
{
|
||||
|
|
13
src/icons.h
13
src/icons.h
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2007 Kim Woelders
|
||||
* Copyright (C) 2004-2010 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -27,11 +27,12 @@
|
|||
#include "eimage.h"
|
||||
#include "ewins.h"
|
||||
|
||||
#define EWIN_ICON_TYPE_NONE 0
|
||||
#define EWIN_ICON_TYPE_APP 1
|
||||
#define EWIN_ICON_TYPE_IMG 2
|
||||
#define EWIN_ICON_TYPE_SNAP 3
|
||||
#define EWIN_ICON_TYPE_FB 4
|
||||
#define EWIN_ICON_MODE_SNAP 0 /* Iconbox */
|
||||
#define EWIN_ICON_MODE_NONE 0 /* Focus list */
|
||||
#define EWIN_ICON_MODE_APP_IMG_SNAP 1
|
||||
#define EWIN_ICON_MODE_IMG_APP_SNAP 2
|
||||
#define EWIN_ICON_MODE_APP_IMG 3
|
||||
#define EWIN_ICON_MODE_IMG_APP 4
|
||||
|
||||
EImage *EwinIconImageGet(EWin * ewin, int size, int mode);
|
||||
|
||||
|
|
|
@ -158,7 +158,12 @@ WarpFocusWinShow(WarpFocusWin * fw)
|
|||
w += pad->left + pad->right;
|
||||
h += pad->top + pad->bottom;
|
||||
if (Conf.warplist.icon_mode != 0)
|
||||
w += h;
|
||||
{
|
||||
if (Conf.warplist.icon_mode != EWIN_ICON_MODE_APP_IMG &&
|
||||
Conf.warplist.icon_mode != EWIN_ICON_MODE_IMG_APP)
|
||||
Conf.warplist.icon_mode = EWIN_ICON_MODE_APP_IMG;
|
||||
w += h;
|
||||
}
|
||||
fw->mw = w; /* Focus list item size */
|
||||
fw->mh = h;
|
||||
|
||||
|
@ -486,7 +491,7 @@ static const CfgItem WarplistCfgItems[] = {
|
|||
CFG_ITEM_BOOL(Conf.warplist, warpfocused, 1),
|
||||
CFG_ITEM_BOOL(Conf.warplist, raise_on_select, 1),
|
||||
CFG_ITEM_BOOL(Conf.warplist, warp_on_select, 0),
|
||||
CFG_ITEM_INT(Conf.warplist, icon_mode, 3),
|
||||
CFG_ITEM_INT(Conf.warplist, icon_mode, EWIN_ICON_MODE_APP_IMG),
|
||||
};
|
||||
#define N_CFG_ITEMS (sizeof(WarplistCfgItems)/sizeof(CfgItem))
|
||||
|
||||
|
|
Loading…
Reference in New Issue