Add icon to indicator if needed.

This commit is contained in:
ramiro 1998-05-15 11:23:24 +00:00
Родитель c9ae415b14
Коммит 643dba7680
3 изменённых файлов: 39 добавлений и 0 удалений

Просмотреть файл

@ -440,6 +440,37 @@ XFE_PersonalToolbar::getIndicatorItem()
}
//////////////////////////////////////////////////////////////////////////
void
XFE_PersonalToolbar::configureIndicatorItem(BM_Entry * entry)
{
Widget indicator = getIndicatorItem();
if (XfeIsAlive(indicator))
{
if (fe_globalPrefs.toolbar_style == BROWSER_TOOLBAR_TEXT_ONLY)
{
XtVaSetValues(indicator,
XmNpixmap, XmUNSPECIFIED_PIXMAP,
XmNpixmapMask, XmUNSPECIFIED_PIXMAP,
//XmNbuttonLayout, XmBUTTON_LABEL_ONLY,
NULL);
}
else
{
Pixmap pixmap;
Pixmap pixmapMask;
getPixmapsForEntry(entry,&pixmap,&pixmapMask,NULL,NULL);
XtVaSetValues(indicator,
XmNpixmap, pixmap,
XmNpixmapMask, pixmapMask,
//XmNbuttonLayout, XmBUTTON_LABEL_ON_RIGHT,
NULL);
}
}
}
//////////////////////////////////////////////////////////////////////////
void
XFE_PersonalToolbar::setRaised(XP_Bool state)
{
XP_ASSERT( XfeIsAlive(m_toolBar) );

Просмотреть файл

@ -53,6 +53,8 @@ public:
Widget getLastItem ();
Widget getIndicatorItem ();
void configureIndicatorItem (BM_Entry * entry);
void setRaised (XP_Bool);
void addEntry (const char * address,

Просмотреть файл

@ -387,6 +387,9 @@ XFE_PersonalDrop::dragMotion()
{
_personalToolbar->setDropTargetItem(target,
_dropEventX - XfeX(target));
// The argument should really be a (BM_Entry *)
_personalToolbar->configureIndicatorItem(NULL);
}
// Otherwise use the last item
else
@ -397,6 +400,9 @@ XFE_PersonalDrop::dragMotion()
if (XfeIsAlive(last))
{
_personalToolbar->setDropTargetItem(last,10000);
// The argument should really be a (BM_Entry *)
_personalToolbar->configureIndicatorItem(NULL);
}
}
}