mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Remove multiple inheritance bullshit.
This commit is contained in:
parent
86fa3523c4
commit
2d0294e0ea
@ -27,7 +27,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RDFMenuToolbarBase.h"
|
||||
#include "MozillaApp.h"
|
||||
#include "BrowserFrame.h" /* for fe_reuseBrowser() */
|
||||
#include "IconGroup.h"
|
||||
#include "View.h"
|
||||
@ -73,21 +72,11 @@ XFE_RDFMenuToolbarBase::XFE_RDFMenuToolbarBase( XFE_Frame * frame,
|
||||
_dropLastAccess(0)
|
||||
{
|
||||
XP_ASSERT( _frame != NULL );
|
||||
|
||||
XFE_MozillaApp::theApp()->registerInterest(
|
||||
XFE_MozillaApp::updateToolbarAppearance,
|
||||
this,
|
||||
(XFE_FunctionNotification)updateIconAppearance_cb);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/* virtual */
|
||||
XFE_RDFMenuToolbarBase::~XFE_RDFMenuToolbarBase()
|
||||
{
|
||||
XFE_MozillaApp::theApp()->unregisterInterest(
|
||||
XFE_MozillaApp::updateToolbarAppearance,
|
||||
this,
|
||||
(XFE_FunctionNotification)updateIconAppearance_cb);
|
||||
|
||||
if (_dropAddressBuffer)
|
||||
{
|
||||
XtFree(_dropAddressBuffer);
|
||||
@ -308,16 +297,6 @@ XFE_RDFMenuToolbarBase::pane_mapping_eh(Widget submenu,
|
||||
|
||||
*cont = True;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
XFE_CALLBACK_DEFN(XFE_RDFMenuToolbarBase,updateIconAppearance)
|
||||
(XFE_NotificationCenter * /*obj*/,
|
||||
void * /*clientData*/,
|
||||
void * /*callData*/)
|
||||
{
|
||||
// Update the appearance
|
||||
updateAppearance();
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void
|
||||
XFE_RDFMenuToolbarBase::getPixmapsForEntry(HT_Resource entry,
|
||||
Pixmap * pixmapOut,
|
||||
@ -520,11 +499,6 @@ XFE_RDFMenuToolbarBase::prepareToUpdateRoot()
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/* virtual */ void
|
||||
XFE_RDFMenuToolbarBase::updateAppearance()
|
||||
{
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/* virtual */ void
|
||||
XFE_RDFMenuToolbarBase::updateToolbarFolderName()
|
||||
{
|
||||
}
|
||||
@ -1361,14 +1335,6 @@ XFE_RDFMenuToolbarBase::formatItem(HT_Resource entry,
|
||||
{
|
||||
strcpy (buf, "-------------------------");
|
||||
}
|
||||
#if DONT_HACK
|
||||
// hack hack hack
|
||||
else if (HT_IsURLBar(entry))
|
||||
{
|
||||
strcpy (buf, "<URLBar RSN>" );
|
||||
}
|
||||
// end hack hack hack
|
||||
#endif
|
||||
else if (name || url)
|
||||
{
|
||||
fe_FormatDocTitle (name, url, buf, 1024);
|
||||
@ -1389,6 +1355,7 @@ XFE_RDFMenuToolbarBase::formatItem(HT_Resource entry,
|
||||
|
||||
loc = (char *) fe_ConvertToLocaleEncoding (charset,
|
||||
(unsigned char *) buf);
|
||||
|
||||
xmstring = XmStringSegmentCreate (loc, "HEADING",
|
||||
XmSTRING_DIRECTION_L_TO_R, False);
|
||||
if (loc != buf)
|
||||
@ -1397,14 +1364,12 @@ XFE_RDFMenuToolbarBase::formatItem(HT_Resource entry,
|
||||
}
|
||||
}
|
||||
|
||||
if (xmstring)
|
||||
if (!xmstring)
|
||||
{
|
||||
return (xmstring);
|
||||
}
|
||||
else
|
||||
{
|
||||
return XmStringCreateLtoR ("", XmFONTLIST_DEFAULT_TAG);
|
||||
xmstring = XmStringCreateLtoR ("", XmFONTLIST_DEFAULT_TAG);
|
||||
}
|
||||
|
||||
return (xmstring);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void
|
||||
|
@ -45,8 +45,7 @@ typedef struct _ItemCallbackStruct
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class XFE_RDFMenuToolbarBase : public XFE_NotificationCenter,
|
||||
public XFE_RDFBase
|
||||
class XFE_RDFMenuToolbarBase : public XFE_RDFBase
|
||||
{
|
||||
public:
|
||||
XFE_RDFMenuToolbarBase (XFE_Frame * frame,
|
||||
@ -141,9 +140,6 @@ protected:
|
||||
// Gets called when the whole thing needs updating
|
||||
virtual void prepareToUpdateRoot ();
|
||||
|
||||
// Gets called to update icon appearance
|
||||
virtual void updateAppearance ();
|
||||
|
||||
// Gets called when the personal toolbar folder's name changes
|
||||
virtual void updateToolbarFolderName ();
|
||||
|
||||
@ -201,9 +197,6 @@ private:
|
||||
void createPixmaps ();
|
||||
|
||||
Widget getLastMoreMenu (Widget menu);
|
||||
|
||||
// update the icon appearance
|
||||
XFE_CALLBACK_DECL(updateIconAppearance)
|
||||
};
|
||||
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "RDFToolbar.h"
|
||||
#include "Logo.h"
|
||||
#include "MozillaApp.h"
|
||||
|
||||
#include "prefapi.h"
|
||||
#include "felocale.h"
|
||||
@ -116,6 +117,11 @@ XFE_RDFToolbar::XFE_RDFToolbar(XFE_Frame * frame,
|
||||
this,
|
||||
(XFE_FunctionNotification)updateToolbarAppearance_cb);
|
||||
#endif
|
||||
|
||||
XFE_MozillaApp::theApp()->registerInterest(
|
||||
XFE_MozillaApp::updateToolbarAppearance,
|
||||
this,
|
||||
(XFE_FunctionNotification)updateIconAppearance_cb);
|
||||
}
|
||||
|
||||
|
||||
@ -138,6 +144,11 @@ XFE_RDFToolbar::~XFE_RDFToolbar()
|
||||
this,
|
||||
(XFE_FunctionNotification)updateToolbarAppearance_cb);
|
||||
#endif
|
||||
|
||||
XFE_MozillaApp::theApp()->unregisterInterest(
|
||||
XFE_MozillaApp::updateToolbarAppearance,
|
||||
this,
|
||||
(XFE_FunctionNotification)updateIconAppearance_cb);
|
||||
}
|
||||
#ifdef NOT_YET
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -162,6 +173,17 @@ XFE_CALLBACK_DEFN(XFE_RDFToolbar, updateToolbarAppearance)(XFE_NotificationCente
|
||||
}
|
||||
#endif /*NOT_YET*/
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
XFE_CALLBACK_DEFN(XFE_RDFToolbar,updateIconAppearance)
|
||||
(XFE_NotificationCenter * /*obj*/,
|
||||
void * /*clientData*/,
|
||||
void * /*callData*/)
|
||||
{
|
||||
// Update the appearance
|
||||
updateAppearance();
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void
|
||||
XFE_RDFToolbar::update()
|
||||
{
|
||||
|
@ -82,7 +82,9 @@ protected:
|
||||
// Override RDFMenuToolbarBase methods
|
||||
virtual void prepareToUpdateRoot ();
|
||||
virtual void updateRoot ();
|
||||
virtual void updateAppearance ();
|
||||
|
||||
// Gets called to update icon appearance
|
||||
virtual void updateAppearance ();
|
||||
|
||||
private:
|
||||
XFE_Frame * _frame;
|
||||
@ -93,6 +95,9 @@ private:
|
||||
static void tooltipCB(Widget, XtPointer, XmString *, Boolean *);
|
||||
static void docStringSetCB(Widget, XtPointer, XmString *, Boolean *);
|
||||
static void docStringCB(Widget, XtPointer, unsigned char, XmString);
|
||||
|
||||
// update the icon appearance
|
||||
XFE_CALLBACK_DECL(updateIconAppearance)
|
||||
};
|
||||
|
||||
#endif /*_xfe_rdftoolbar_*/
|
||||
|
Loading…
Reference in New Issue
Block a user