|
From: <ma...@us...> - 2003-12-17 09:47:42
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv4751/src
Modified Files:
MainDlg.cpp MainDlg.h Makefile.am defines.h
Log Message:
* Toolbar context menu (right-click on empty space on toolbar to get it)
* Fullscreen switch
* Initial support for detaching dialog pages into separate frames (currently disabled
by default due to its experimental nature)
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- MainDlg.cpp 17 Dec 2003 05:16:01 -0000 1.24
+++ MainDlg.cpp 17 Dec 2003 09:47:35 -0000 1.25
@@ -43,14 +43,62 @@
class CStatusBar *statusbar;
class CToolBar *toolbar;
-BEGIN_EVENT_TABLE(CMainDlg,wxFrame)
- /* Shutdown event */
- EVT_CLOSE(CMainDlg::OnCloseWindow)
- /* Menu/Toolbar events */
- EVT_TOOL(-1, CMainDlg::MenuOrToolEvent)
+/******************************************************************************/
+/* MyToolBar class - only needed for event table - actual event handling is */
+/* done in CMainDlg. */
+/******************************************************************************/
+BEGIN_EVENT_TABLE(MyToolBar, wxToolBar)
+ EVT_RIGHT_DOWN(CMainDlg::ToolRightClick) /* Toolbar Rclick */
END_EVENT_TABLE()
+/* Constructor - doesn't do anything */
+MyToolBar::MyToolBar(
+ wxWindow *parent, wxWindowID id, const wxPoint &pos,
+ const wxSize &size, long style
+) : wxToolBar(parent, id, pos, size, style) {
+}
-/*
+/******************************************************************************/
+/* DetachedFrame class */
+/******************************************************************************/
+BEGIN_EVENT_TABLE(DetachedFrame, wxFrame)
+ EVT_CLOSE(DetachedFrame::OnClose)
+END_EVENT_TABLE()
+/* Constructor - sets content of frame to what was passed to us in `content` */
+DetachedFrame::DetachedFrame(
+ wxWindow *parent, wxWindowID id, const wxString &title,
+ const wxPoint &position, const wxSize& size, long style,
+ wxLocale &l, wxWindow *content
+) : wxFrame( parent, id, title, position, size, style ), m_locale(l) {
+ cnt = content;
+ wxFlexGridSizer *s = new wxFlexGridSizer(1);
+ s->AddGrowableCol(0);
+ s->AddGrowableRow(0);
+ cnt->Reparent(this);
+ s->Add(cnt, 0, wxGROW|wxEXPAND|wxALL, 5);
+ SetSizer(s);
+ Layout();
+ Show();
+}
+
+/* Frame close event - sends content back to main frame */
+void DetachedFrame::OnClose(wxCommandEvent &event) {
+ cnt->Hide();
+ if (mainframe != NULL) {
+ cnt->Reparent(mainframe);
+ mainframe->CreateMyToolBar();
+ }
+ Destroy();
+}
+
+/******************************************************************************/
+/* CMainDlg class */
+/******************************************************************************/
+BEGIN_EVENT_TABLE(CMainDlg, wxFrame)
+ EVT_CLOSE(CMainDlg::OnCloseWindow) /* Shutdown event */
+ EVT_TOOL(-1, CMainDlg::MenuOrToolEvent) /* Menu/Toolbar events */
+END_EVENT_TABLE()
+
+/**
* Main dialog constructor. Creates toolbar on the top, statusbar on the
* bottom and loads the sub-dialogs (serverwnd, searchwnd etc).
*/
@@ -180,18 +228,12 @@
#endif
/* Clean up our mess before leaving */
- delete serverwnd;
- delete transferwnd;
- delete searchwnd;
- delete sharedfileswnd;
- delete messageswnd;
- delete statisticswnd;
wxMenuBar *mb = GetMenuBar();
if (mb != NULL) {
SetMenuBar(NULL);
delete mb;
}
- wxToolBar *tb = GetToolBar();
+ MyToolBar *tb = (MyToolBar*)GetToolBar();
if (tb != NULL) {
SetToolBar(NULL);
delete tb;
@@ -232,7 +274,7 @@
int tool_align;
/* Just in case we have some old toolbar hanging around, delete it. */
- wxToolBar *toolbar = GetToolBar();
+ MyToolBar *toolbar = (MyToolBar*)GetToolBar();
delete toolbar;
SetToolBar(NULL);
@@ -247,8 +289,8 @@
);
/* Construct the toolbar object */
- wxToolBar *tb = new wxToolBar(
- this, -1, wxDefaultPosition, wxDefaultSize,
+ MyToolBar *tb = new MyToolBar(
+ this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize,
tool_align|wxNO_BORDER|wxTB_3DBUTTONS|wxTB_FLAT
);
@@ -334,7 +376,7 @@
if (
wxMessageBox(
_("Close ShareDaemon wxInterface?"),
- _("Question"),
+ _("Question"),
wxYES_NO|wxCENTRE|wxICON_QUESTION
) == wxNO) {
return;
@@ -561,25 +603,28 @@
* Here we update menubar view menu radio buttons.
*/
void CMainDlg::UpdateMenuBar() {
-#ifdef wxHAS_RADIO_MENU_ITEMS
+ int tmp;
if (GetMenuBar() == NULL) {
return;
}
- if (GetCurPage() == serverwnd) {
- GetViewServerWnd()->Check();
- } else if (GetCurPage() == searchwnd) {
- GetViewSearchWnd()->Check();
- } else if (GetCurPage() == transferwnd) {
- GetViewTransferWnd()->Check();
- } else if (GetCurPage() == sharedfileswnd) {
- GetViewSharedWnd()->Check();
- } else if (GetCurPage() == messageswnd) {
- GetViewMessagesWnd()->Check();
- } else if (GetCurPage() == statisticswnd) {
- GetViewStatisticsWnd()->Check();
+ m_config->Read(wxT("/General/Toolbar Alignment"), &tmp, wxTB_HORIZONTAL);
+ switch (tmp) {
+ case wxTB_HORIZONTAL:
+ GetMenuBar()->FindItem(ID_VIEW_TBAR_ALIGN_HOR)->Check();
+ break;
+ case wxTB_VERTICAL:
+ GetMenuBar()->FindItem(ID_VIEW_TBAR_ALIGN_VER)->Check();
+ break;
+ default:
+ break;
}
-#endif
+
+ m_config->Read(wxT("/General/Show ToolBar"), &tmp, true);
+ GetMenuBar()->Check(ID_VIEW_TOOLBAR, tmp);
+
+ m_config->Read(wxT("/General/Show MenuBar"), &tmp, false);
+ GetMenuBar()->Check(ID_VIEW_MENUBAR, tmp);
}
/**
@@ -596,7 +641,7 @@
case ID_EDIT_GUI_SETTINGS:
ShowGUISettingsDlg();
break;
- case ID_VIEW_SERVERS:
+ case ID_VIEW_SERVERS: /* Menubar events */
ShowPage(serverwnd);
break;
case ID_VIEW_SEARCH:
@@ -689,9 +734,185 @@
if (event.GetEventType() == wxEVT_COMMAND_TOOL_CLICKED) {
ToolEvent(event);
MenuEvent(event);
+ PopUpMenuEvents(event);
UpdateToolButtons();
UpdateMenuBar();
} else {
event.Skip();
}
+}
+
+/**
+ * Called from MyToolBar class event table upon right mouse click event in
+ * toolbar, this method generates a popupmenu with various controls and
+ * displays it.
+ */
+void CMainDlg::ToolRightClick(wxMouseEvent &event) {
+ int tmp; /* Temporary storage for values read from config */
+
+ wxMenu *menu = new wxMenu(); /* Popup menu */
+
+ menu->Append(ID_RMENU_SERVERS, _("Servers"));
+ menu->Append(ID_RMENU_SEARCH, _("Search"));
+ menu->Append(ID_RMENU_TRANSFER, _("Transfer"));
+ menu->Append(ID_RMENU_SHARED_FILES, _("Shared Files"));
+ menu->Append(ID_RMENU_MESSAGES, _("Messages"));
+ menu->Append(ID_RMENU_STATISTICS, _("Statistics"));
+ menu->AppendSeparator();
+
+ menu->AppendCheckItem(ID_RMENU_MENUBAR, _("Show MenuBar"));
+ m_config->Read(wxT("/General/Show MenuBar"), &tmp, false);
+ if (tmp) {
+ menu->FindItem(ID_RMENU_MENUBAR)->Check(tmp);
+ }
+
+ menu->AppendCheckItem(ID_RMENU_TOOLBAR, _("Show ToolBar"));
+ m_config->Read(wxT("/General/Show ToolBar"), &tmp, true);
+ if (tmp) {
+ menu->FindItem(ID_RMENU_TOOLBAR)->Check(tmp);
+ }
+
+ wxMenu *tbar_menu = new wxMenu();
+#ifdef wxHAS_RADIO_MENU_ITEMS
+ tbar_menu->AppendRadioItem(ID_RMENU_TBAR_ALIGN_HOR, _("Horizontal"));
+ tbar_menu->AppendRadioItem(ID_RMENU_TBAR_ALIGN_VER, _("Vertical"));
+ m_config->Read(wxT("/General/Toolbar Alignment"), &tmp,wxTB_HORIZONTAL);
+ switch (tmp) {
+ case wxTB_HORIZONTAL:
+ tbar_menu->FindItem(ID_RMENU_TBAR_ALIGN_HOR)->Check();
+ break;
+ case wxTB_VERTICAL:
+ tbar_menu->FindItem(ID_RMENU_TBAR_ALIGN_VER)->Check();
+ break;
+ default:
+ break;
+ }
+#else
+ tbar_menu->Append(ID_RMENU_TBAR_ALIGN_HOR, _("Horizontal"));
+ tbar_menu->Append(ID_RMENU_TBAR_ALIGN_VER, _("Vertical"));
+#endif
+ menu->Append(ID_RMENU_TBAR, _("ToolBar Alignment"), tbar_menu);
+ menu->AppendSeparator();
+#if 0 /* Needs some work, disabled for now */
+ menu->Append(ID_DETACH, _("Detach current page"));
+ menu->AppendSeparator();
+#endif
+ menu->Append(ID_EDIT_GUI_SETTINGS, _("Preferences"));
+ menu->Append(ID_FULLSCREEN, _("Fullscreen"));
+ menu->Append(ID_ABOUT, _("About..."));
+ menu->Append(ID_QUIT, _("Exit"));
+
+ PopupMenu(menu, ScreenToClient(wxGetMousePosition()));
+ delete menu;
+}
+
+/**
+ * Usually called from CMainDlg::MenuOrToolEvent, this filters out toolbar
+ * popup menu ID's from the event and handles them if neccesery. Otherwise,
+ * the event will be skipped to be handled by other handlers.
+ */
+void CMainDlg::PopUpMenuEvents(wxCommandEvent &event) {
+ switch (event.GetId()) {
+ case ID_RMENU_SERVERS:
+ ShowPage(serverwnd);
+ break;
+ case ID_RMENU_SEARCH:
+ ShowPage(searchwnd);
+ break;
+ case ID_RMENU_TRANSFER:
+ ShowPage(transferwnd);
+ break;
+ case ID_RMENU_SHARED_FILES:
+ ShowPage(sharedfileswnd);
+ break;
+ case ID_RMENU_MESSAGES:
+ ShowPage(messageswnd);
+ break;
+ case ID_RMENU_STATISTICS:
+ ShowPage(statisticswnd);
+ break;
+ case ID_RMENU_MENUBAR:
+ if (GetMenuBar() == NULL) {
+ m_config->Write(wxT("/General/Show MenuBar"), true);
+ } else {
+ m_config->Write(wxT("/General/Show MenuBar"), false);
+ }
+ CreateMyMenuBar();
+ break;
+ case ID_RMENU_TOOLBAR:
+ if (GetToolBar() == NULL) {
+ m_config->Write(wxT("/General/Show ToolBar"), true);
+ } else {
+ m_config->Write(wxT("/General/Show ToolBar"), false);
+ }
+ CreateMyToolBar();
+ break;
+ case ID_RMENU_TBAR_ALIGN_HOR:
+ m_config->Write(wxT("/General/Toolbar Alignment"), wxTB_HORIZONTAL);
+ CreateMyToolBar();
+ break;
+ case ID_RMENU_TBAR_ALIGN_VER:
+ m_config->Write(wxT("/General/Toolbar Alignment"), wxTB_VERTICAL);
+ CreateMyToolBar();
+ break;
+ case ID_DETACH:
+ DetachCurPage();
+ break;
+ case ID_EDIT_GUI_SETTINGS:
+ ShowGUISettingsDlg();
+ break;
+ case ID_FULLSCREEN:
+ if (!IsFullScreen()) {
+ ShowFullScreen(true);
+ } else {
+ ShowFullScreen(false);
+ }
+ break;
+ case ID_ABOUT:
+ break;
+ case ID_QUIT:
+ Close();
+ break;
+ default:
+ event.Skip();
+ break;
+ }
+}
+
+/**
+ * This method removes target `page` from the frame by removing from main sizer
+ * and removing the corresponding toolbar button. We set start_up true here to
+ * trick ShowPage() method into thinking its startup and not call Remove... on
+ * the page anymore.
+ */
+void CMainDlg::RemovePage(wxWindow *page) {
+ m_mainsizer->Remove(page);
+ if (page == serverwnd) {
+ GetToolBar()->RemoveTool(ID_BTN_SERVERS);
+ } else if (page == searchwnd) {
+ GetToolBar()->RemoveTool(ID_BTN_SEARCH);
+ } else if (page == transferwnd) {
+ GetToolBar()->RemoveTool(ID_BTN_TRANSFER);
+ } else if (page == sharedfileswnd) {
+ GetToolBar()->RemoveTool(ID_BTN_SHARED_FILES);
+ } else if (page == messageswnd) {
+ GetToolBar()->RemoveTool(ID_BTN_MESSAGES);
+ } else if (page == statisticswnd) {
+ GetToolBar()->RemoveTool(ID_BTN_STATISTICS);
+ }
+ start_up = true;
+}
+
+/**
+ * This method calls RemovePage() to remove current page from this frame and
+ * then proceeeds to create a new frame that will serve has host for the page
+ * from now on.
+ */
+void CMainDlg::DetachCurPage() {
+ RemovePage(GetCurPage());
+ DetachedFrame *f = new DetachedFrame(
+ NULL, -1, GetCurPage()->GetName(), wxDefaultPosition,
+ wxSize(780, 580), wxDEFAULT_FRAME_STYLE|
+ wxNO_FULL_REPAINT_ON_RESIZE, m_locale, GetCurPage()
+ );
}
Index: MainDlg.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- MainDlg.h 17 Dec 2003 05:16:01 -0000 1.10
+++ MainDlg.h 17 Dec 2003 09:47:35 -0000 1.11
@@ -43,112 +43,143 @@
#include "Images.h"
#include "GUISettingsDlg.h"
-/*
- * Constants for MainDlg
+/* Constants for MainDlg */
+#define ID_QUIT 100
+#define ID_ABOUT wxID_ABOUT
+
+/**
+ * This class is only needed for catching some specific events (see the event
+ * table. Actual event handling is still done in CMainDlg.
*/
+class MyToolBar : public wxToolBar {
+public:
+ MyToolBar(wxWindow *parent, wxWindowID id = -1,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long style = wxTB_HORIZONTAL|wxNO_BORDER
+ ); /* Constructor */
+private:
+ DECLARE_EVENT_TABLE() /* Event table declaration */
+};
-#define ID_QUIT 100
-#define ID_ABOUT 101
+/* This very small class usually shows a frame with one dialog page as content*/
+class DetachedFrame : public wxFrame {
+public:
+ DetachedFrame(
+ wxWindow *parent, wxWindowID, const wxString &title,
+ const wxPoint& pos, const wxSize& size,
+ long style, wxLocale &m_locale, wxWindow *content
+ ); /* Constructor */
+ wxLocale &m_locale; /* Localization variable */
+private:
+ DECLARE_EVENT_TABLE() /* Event table declaration */
+ void OnClose(wxCommandEvent &event); /* Window closing event */
+ wxWindow *cnt; /* Contents of the frame */
+};
/*
* MainDlg class. The main dialog functions like Toolbar and Statusbar
* stuff go in here.
*/
extern class CMainDlg *mainframe;
-class CMainDlg: public wxFrame
-{
+class CMainDlg: public wxFrame {
+friend class MyToolBar;
public:
/* Constructors and destructors */
CMainDlg( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint& pos, const wxSize& size,
long style, wxLocale &m_locale
- );
- ~CMainDlg();
- void CreateMyToolBar();
- void CreateMyMenuBar();
+ ); /* Constructor */
+ ~CMainDlg(); /* Destructor */
+ inline void CreateMyToolBar(); /* (re)Creates toolbar */
+ inline void CreateMyMenuBar(); /* (re)Creates menubar */
wxLocale &m_locale;
- /**
- * These need to be publically available, other classes
- * might need to access them.
+ /**
+ * These need to be publically available, other classes
+ * might need to access them.
*/
- wxStaticText* GetStatusText() {
- return (wxStaticText*) FindWindow( ID_STATUS_TXT );
+ wxStaticText* GetStatusText() { /* Statusbar text */
+ return (wxStaticText*) FindWindow( ID_STATUS_TXT );
}
- wxStaticText* GetStatusUsers() {
- return (wxStaticText*) FindWindow( ID_STATUS_USERS );
+ wxStaticText* GetStatusUsers() { /* Statusbar users count number */
+ return (wxStaticText*) FindWindow( ID_STATUS_USERS );
}
- wxStaticText* GetStatusFiles() {
- return (wxStaticText*) FindWindow( ID_STATUS_FILES );
+ wxStaticText* GetStatusFiles() { /* Statusbar files count number */
+ return (wxStaticText*) FindWindow( ID_STATUS_FILES );
}
- wxStaticText* GetStatusUpload() {
- return (wxStaticText*) FindWindow( ID_STATUS_UPLOAD );
+ wxStaticText* GetStatusUpload() { /* Statusbar upload speed number */
+ return (wxStaticText*) FindWindow( ID_STATUS_UPLOAD );
}
- wxStaticText* GetStatusDload() {
- return (wxStaticText*) FindWindow( ID_STATUS_DLOAD );
+ wxStaticText* GetStatusDload() { /* Statusbar dload speed number */
+ return (wxStaticText*) FindWindow( ID_STATUS_DLOAD );
}
- wxStaticText* GetStatusConnection() {
- return (wxStaticText*) FindWindow( ID_STATUS_CONNECTION );
+ wxStaticText* GetStatusConnection() { /* Statusbar server name text */
+ return (wxStaticText*) FindWindow( ID_STATUS_CONNECTION );
}
private:
DECLARE_EVENT_TABLE()
/* Member event handler functions */
- void MenuOrToolEvent(wxCommandEvent &event);
- void MenuEvent(wxCommandEvent &event);
- void ToolEvent(wxCommandEvent &event);
- void OnCloseWindow(wxCloseEvent &event);
+ void MenuOrToolEvent(wxCommandEvent &event); /* All tbar/mbar events */
+ void MenuEvent(wxCommandEvent &event); /* Menubar events */
+ void ToolEvent(wxCommandEvent &event); /* Toolbar events */
+ void OnCloseWindow(wxCloseEvent &event); /* Window closing event */
+ void ToolRightClick(wxMouseEvent &event);/* Toolbar right-click event */
+ void PopUpMenuEvents(wxCommandEvent &event);/* Tbar popup-menu events */
/* Member functions */
- void CreateSysTray();
- void LoadAndShowDialogPages();
- void ConnectToAnyServer();
- bool ShowPage(wxWindow* dlg);
- void ShowGUISettingsDlg();
- void UpdateToolButtons();
- void UpdateMenuBar();
+ void CreateSysTray(); /* Creates system tray icon */
+ void LoadAndShowDialogPages(); /* Loads dialog pages */
+ void ConnectToAnyServer(); /* Sends "connect" command to core */
+ inline bool ShowPage(wxWindow* dlg); /* Displays page `dlg` */
+ void ShowGUISettingsDlg(); /* Displays GUI settings dialog */
+ void UpdateToolButtons(); /* Updates toolbar buttons */
+ void UpdateMenuBar(); /* Updates menubar objects */
+ void RemovePage(wxWindow *page); /* Removes `page` from frame */
+ void DetachCurPage(); /* Detaches current page into new frame */
/* Getters */
wxWindow* GetCurPage() { return activewnd; }
- wxMenuItem* GetViewMenuBar() {
+ wxMenuItem* GetViewMenuBar() { /* View menu object "View Menubar" */
return GetMenuBar()->FindItem(ID_VIEW_MENUBAR);
}
- wxMenuItem* GetViewToolBar() {
+ wxMenuItem* GetViewToolBar() { /* View menu object "View Toolbar" */
return GetMenuBar()->FindItem(ID_VIEW_TOOLBAR);
}
- wxMenuItem* GetViewServerWnd() {
+ wxMenuItem* GetViewServerWnd() { /* View menu object "Server Page" */
return GetMenuBar()->FindItem(ID_VIEW_SERVERS);
}
- wxMenuItem* GetViewSearchWnd() {
+ wxMenuItem* GetViewSearchWnd() { /* View menu object "Search Page" */
return GetMenuBar()->FindItem(ID_VIEW_SEARCH);
}
- wxMenuItem* GetViewTransferWnd() {
+ wxMenuItem* GetViewTransferWnd() {/* View menu object "Transfer Page" */
return GetMenuBar()->FindItem(ID_VIEW_TRANSFER);
}
- wxMenuItem* GetViewSharedWnd() {
+ wxMenuItem* GetViewSharedWnd() {/* View menu object "Shared Files..." */
return GetMenuBar()->FindItem(ID_VIEW_SHARED_FILES);
}
- wxMenuItem* GetViewMessagesWnd() {
+ wxMenuItem* GetViewMessagesWnd() {/* View menu object "Messages P..." */
return GetMenuBar()->FindItem(ID_VIEW_MESSAGES);
}
- wxMenuItem* GetViewStatisticsWnd() {
+ wxMenuItem* GetViewStatisticsWnd() {/* View menu object "Statisti..." */
return GetMenuBar()->FindItem(ID_VIEW_STATISTICS);
}
- wxStaticBitmap* GetBmpStatusConnection() {
+ wxStaticBitmap* GetBmpStatusConnection() {/* Statusbar connection bmp */
return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_CONNECTION );
}
- wxStaticBitmap* GetBmpStatusDload() {
+ wxStaticBitmap* GetBmpStatusDload() { /* Statusbar download bitmap */
return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_DLOAD );
}
- wxStaticBitmap* GetBmpStatusUpload() {
+ wxStaticBitmap* GetBmpStatusUpload() { /* Statusbar upload bitmap */
return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_UPLOAD );
}
- wxStaticBitmap* GetBmpStatusFiles() {
+ wxStaticBitmap* GetBmpStatusFiles() { /* Statusbar files bitmap */
return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_FILES );
}
- wxStaticBitmap* GetBmpStatusUsers() {
+ wxStaticBitmap* GetBmpStatusUsers() { /* Statusbar users bitmap */
return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_USERS );
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.am 12 Dec 2003 10:36:10 -0000 1.2
+++ Makefile.am 17 Dec 2003 09:47:35 -0000 1.3
@@ -30,9 +30,12 @@
.cpp.o :
@echo -e -n "$(ACTIONCOLOR)Compiling $(INPUTCOLOR)$<$(ACTIONCOLOR) to "
@echo -e -n "$(OUTPUTCOLOR)$@$(ACTIONCOLOR)@PRINT_CPP_FLAGS@: $(ATTENTIONCOLOR)"
- @if @CXX@ @CXX_FLAGS@ @CPP_FLAGS@ @INCLUDE@ -c -o $@ $<; then \
+ @if @CXX@ @CXX_FLAGS@ @CPP_FLAGS@ @INCLUDE@ -c -o $@ $< 2>.err; then \
echo -e "$(WELLCOLOR)ok.$(ACTIONCOLOR)"; \
else \
+ echo -e "failed:"; \
+ cat .err; \
+ echo -e "$(DEFAULTCOLOR)"; \
false; \
fi;
Index: defines.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/defines.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- defines.h 17 Dec 2003 05:16:01 -0000 1.40
+++ defines.h 17 Dec 2003 09:47:35 -0000 1.41
@@ -70,7 +70,7 @@
/* ID codes for our controls */
enum {
- ID_BTN_CONNECT = 1000,
+ ID_BTN_CONNECT = 1000, /* Toolbar buttons */
ID_BTN_SERVERS,
ID_BTN_TRANSFER,
ID_BTN_SEARCH,
@@ -79,13 +79,16 @@
ID_BTN_STATISTICS,
ID_BTN_GUISETTINGS,
ID_BTN_CORESETTINGS,
+ ID_TOOLBAR, /* Toolbar itself */
+ ID_DETACH, /* Deatch_Current_page menubar object */
+ ID_FULLSCREEN, /* Fullscreen switch (in menu) */
/* Menubar */
- ID_FILE_CONNECT,
+ ID_FILE_CONNECT, /* Menubar file menu items */
ID_FILE_EXIT,
- ID_EDIT_GUI_SETTINGS,
+ ID_EDIT_GUI_SETTINGS, /* Menubar edit menu items */
ID_EDIT_CORE_SETTINGS,
- ID_VIEW_SERVERS,
+ ID_VIEW_SERVERS, /* Menubar view menu items */
ID_VIEW_TRANSFER,
ID_VIEW_SEARCH,
ID_VIEW_SHARED_FILES,
@@ -96,8 +99,21 @@
ID_VIEW_TBAR,
ID_VIEW_TBAR_ALIGN_HOR,
ID_VIEW_TBAR_ALIGN_VER,
- ID_HELP_HELP,
+ ID_HELP_HELP, /* Menubar help menu items */
ID_HELP_ABOUT,
+
+ /* Toolbar popup menu */
+ ID_RMENU_SERVERS,
+ ID_RMENU_TRANSFER,
+ ID_RMENU_SEARCH,
+ ID_RMENU_SHARED_FILES,
+ ID_RMENU_MESSAGES,
+ ID_RMENU_STATISTICS,
+ ID_RMENU_MENUBAR,
+ ID_RMENU_TOOLBAR,
+ ID_RMENU_TBAR_ALIGN_HOR,
+ ID_RMENU_TBAR_ALIGN_VER,
+ ID_RMENU_TBAR,
/* Server page */
ID_SERVER_SPLITTER_HORIZONTAL,
|