You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(102) |
Dec
(255) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(38) |
Feb
(16) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ma...@us...> - 2003-12-29 09:12:36
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv14478
Modified Files:
Images.cpp
Log Message:
Aint it fun - wxSystemSettings only works on wxMSW! Ohwell, use 50,50,50 col for tbar button images then on wxGTK
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- Images.cpp 29 Dec 2003 08:51:22 -0000 1.48
+++ Images.cpp 29 Dec 2003 09:12:33 -0000 1.49
@@ -334,9 +334,13 @@
GetImage(image),
(tmp_new.GetWidth()-32)/2, 2, true
);
+#ifdef __WXMSW__ /* Well, this gives correct colour on MSW */
mdc.SetTextForeground(
wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)
);
+#else /* However, it doesn't work anywhere else, so use 50,50,50 instead */
+ mdc.SetTextForeground(wxColour(50, 50, 50));
+#endif
mdc.GetTextExtent(name, &x, &y);
mdc.DrawText(name, (tmp_new.GetWidth()-x)/2, 36);
#ifndef __WXMSW__ /* Use wxMask for transparency */
@@ -438,7 +442,7 @@
/* Check path validity */
- if (wxDirExists(path)) {
+ if (wxDirExists(path)) {
return path;
} else {
wxLogDebug(wxT("Images were not found in %s."), path.c_str());
|
|
From: <ma...@us...> - 2003-12-29 08:51:25
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv11264
Modified Files:
Images.cpp
Log Message:
Fixed font colour in toolbar buttons and added two fall-back directories for images location
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- Images.cpp 29 Dec 2003 04:34:33 -0000 1.47
+++ Images.cpp 29 Dec 2003 08:51:22 -0000 1.48
@@ -334,7 +334,9 @@
GetImage(image),
(tmp_new.GetWidth()-32)/2, 2, true
);
- mdc.SetTextForeground(wxColour(50, 50, 50));
+ mdc.SetTextForeground(
+ wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)
+ );
mdc.GetTextExtent(name, &x, &y);
mdc.DrawText(name, (tmp_new.GetWidth()-x)/2, 36);
#ifndef __WXMSW__ /* Use wxMask for transparency */
@@ -433,6 +435,34 @@
path.Prepend(wxT(":"));
path.Prepend(wxT("::Resources"));
#endif
+
+
+ /* Check path validity */
+ if (wxDirExists(path)) {
+ return path;
+ } else {
+ wxLogDebug(wxT("Images were not found in %s."), path.c_str());
+
+ path = wxT("../images/default");
+ if (wxDirExists(path)) {
+ wxLogDebug(
+ wxT("Found possible images dir at %s instead."),
+ path.c_str()
+ );
+ return path;
+ }
+
+ path = wxT("../src/images/default");
+ if (wxDirExists(path)) {
+ wxLogDebug(
+ wxT("Found possible images dir at %s instead."),
+ path.c_str()
+ );
+ return path;
+ }
+
+ wxLogError(wxT("Fatal! Unable to find images directory."));
+ return wxEmptyString;
+ }
- return path;
}
|
|
From: <ma...@us...> - 2003-12-29 08:50:53
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv11195
Modified Files:
GUISettingsDlg.cpp
Log Message:
Fixed a few variable redefinition warnings on MSVC6
Index: GUISettingsDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/GUISettingsDlg.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- GUISettingsDlg.cpp 27 Dec 2003 12:38:55 -0000 1.33
+++ GUISettingsDlg.cpp 29 Dec 2003 08:50:50 -0000 1.34
@@ -81,7 +81,8 @@
int font, iconset, tool_align, numlang, numiconsets;
bool show_splash, prompt_exit, show_toolbar, show_menubar,
remember_last;
- wxString tmpname, startpage;
+ wxString tmpname, startpage;
+ short i;
/* Read from config. If no value found, &<field> remains unchanged */
m_config->SetPath(wxT("/General"));
@@ -98,7 +99,7 @@
/* Load iconset data */
m_config->SetPath(wxT("/General/IconSets"));
m_config->Read(wxT("NumIconSets"), &numiconsets, 1);
- for (int i=0; i<numiconsets; i++) {
+ for (i=0; i<numiconsets; i++) {
m_config->Read(
wxString::Format(wxT("%d"), i),
&tmpname,
@@ -112,7 +113,7 @@
/* Load language data */
m_config->SetPath(wxT("/General/Lang"));
m_config->Read(wxT("NumLang"), &numlang, 1);
- for (int i=0; i<numlang; i++) {
+ for (i=0; i<numlang; i++) {
m_config->Read(
wxString::Format(wxT("%d"), i),
&tmpname,
@@ -141,7 +142,7 @@
* The reason for all this mess is that we have *translated* strings
* in choice control, but *un-translated* strings in config.
*/
- for (short i=0;i<GetStartPage()->GetCount();i++) {
+ for (i=0;i<GetStartPage()->GetCount();i++) {
Page *p = (Page*)GetStartPage()->GetClientData(i);
wxString str = mainframe->GetPageList().Find(p)->GetKeyString();
if (str == startpage) {
@@ -170,7 +171,7 @@
* Writes control values to config object.
*/
void CGUISettingsDlg::SaveSettings() {
- int old_tool_align, tool_align;
+ int old_tool_align, tool_align, i;
wxString old_icon_set, icon_set;
bool old_show_tool, show_tool;
bool old_show_menu, show_menu;
@@ -224,7 +225,7 @@
/* Iconsets data */
m_config->SetPath(wxT("/General/IconSets"));
- for (int i=0; i<GetIconSet()->GetCount(); i++) {
+ for (i=0; i<GetIconSet()->GetCount(); i++) {
m_config->Write(
wxString::Format(wxT("%d"), i),
GetIconSet()->GetString(i)
@@ -238,7 +239,7 @@
/* Language data */
m_config->SetPath(wxT("/General/Lang"));
- for (int i=0; i<GetLang()->GetCount(); i++) {
+ for (i=0; i<GetLang()->GetCount(); i++) {
m_config->Write(
wxString::Format(wxT("%d"), i),
GetLang()->GetString(i)
|
|
From: <ma...@us...> - 2003-12-29 07:42:47
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26263
Modified Files:
MainDlg.cpp
Log Message:
Fixed fullscreenmode for wxMSW, added Fullscreen option to menubar and fixed popupmenu positioning while in fullscreen.
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- MainDlg.cpp 29 Dec 2003 06:22:42 -0000 1.45
+++ MainDlg.cpp 29 Dec 2003 07:00:18 -0000 1.46
@@ -573,6 +573,7 @@
#endif
view_menu->Append(ID_VIEW_TBAR, _("ToolBar Alignment"), view_tbar_menu);
+ view_menu->Append(ID_FULLSCREEN, _("Fullscreen"));
/* HELP MENU */
wxMenu *help_menu = new wxMenu();
@@ -854,7 +855,11 @@
menu->Append(ID_ABOUT, _("About..."));
menu->Append(ID_QUIT, _("Exit"));
- PopupMenu(menu, ScreenToClient(wxGetMousePosition()));
+ if (IsFullScreen()) {
+ PopupMenu(menu, wxGetMousePosition());
+ } else {
+ PopupMenu(menu, ScreenToClient(wxGetMousePosition()));
+ }
delete menu;
}
@@ -928,7 +933,10 @@
event.Skip();
break;
case ID_FULLSCREEN:
- ShowFullScreen(!IsFullScreen());
+ ShowFullScreen(
+ !IsFullScreen(),
+ wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION
+ );
break;
case ID_ABOUT:
break;
|
|
From: <ma...@us...> - 2003-12-29 07:06:21
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv27392
Modified Files:
MainDlg.cpp
Log Message:
Fixed fullscreen mode toolbar popupmenu position for wxGTK.
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- MainDlg.cpp 29 Dec 2003 07:00:18 -0000 1.46
+++ MainDlg.cpp 29 Dec 2003 07:06:18 -0000 1.47
@@ -855,11 +855,15 @@
menu->Append(ID_ABOUT, _("About..."));
menu->Append(ID_QUIT, _("Exit"));
+#ifdef __WXMSW__
if (IsFullScreen()) {
PopupMenu(menu, wxGetMousePosition());
} else {
PopupMenu(menu, ScreenToClient(wxGetMousePosition()));
}
+#else
+ PopupMenu(menu, ScreenToClient(wxGetMousePosition()));
+#endif
delete menu;
}
@@ -934,7 +938,7 @@
break;
case ID_FULLSCREEN:
ShowFullScreen(
- !IsFullScreen(),
+ !IsFullScreen(),
wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION
);
break;
|
|
From: <ma...@us...> - 2003-12-29 06:52:34
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv23597 Modified Files: INSTALL TODO Log Message: Updated... Index: INSTALL =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/INSTALL,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- INSTALL 20 Nov 2003 01:27:26 -0000 1.6 +++ INSTALL 29 Dec 2003 06:52:31 -0000 1.7 @@ -1,35 +1,36 @@ INSTALLATION NOTES -Please note that this program is only a user interface to ShareDaemon core. It -sends commands to the core and acts based on what core sends back. If no core +Please note that this program is only a user interface to ShareDaemon core. It +sends commands to the core and acts based on what core sends back. If no core is running, this program doesn't do anything. * Compilation - Currently, there is no automatic configure system, so go to - src/Makefile, and edit the first line to point to the correct location - of your wx-config file. Then simply type 'make', and run the program - with './wxInterface'. There is no 'make install' script yet either. + Just run ./configure at top level of source hierarchy, it should detect + most things automatically. The most common flags for configure are + --with-wx-config, which can be used to specify path to wx-config + script, and --disable-colours, which, naturally, disables colours + during configure/make procedure. Run ./configure --help to see the full + list of options. -- wxWindows patching: src/generic/listctrl.cpp (listctrl.patch) - As wxListCtrl doesn't support columns with width less than 10 under - wxGTK (and possibly under wxMac also), you will need to patch - wxWindows using the listctrl.patch to completely hide columns. The + As wxListCtrl doesn't support columns with width less than 10 under + wxGTK ( and possibly under wxMac also ), you will need to patch + wxWindows using the listctrl.patch to completely hide columns. The column-hiding code will work even if you do not patch wxWindows (column - is considered hidden if its size is less than or equal to 10, but the - 'hidden' columns will then have width 10 instead of zero. Apply the - patch in src/generic/ directory in wxWindows sources, and recompile. + is considered hidden if its size is less than or equal to 10, but the + 'hidden' columns will then have width 10 instead of zero. Apply the + patch in src/generic/ directory in wxWindows sources, and recompile. -- wxWindows patching: src/common/sizer.cpp (flexgridsizer.patch) - Due to missing wxFlexGridSizer::RemoveGrowableCol() method in - wxWindows library, it is also needed to patch src/common/sizer.cpp - file in wxWindows sources for sidebar hiding code to work. Do so - using flexgridsizer.patch file (apply in the src/common directory of - wxWindows sources), and add __HAVE_REMOVE_GROWABLE_COL__ define to - wxInterfce Makefile to enable the hiding code. + Due to missing wxFlexGridSizer::RemoveGrowableCol() method in + wxWindows library, it is also needed to patch src/common/sizer.cpp + file in wxWindows sources for sidebar hiding code to work. Do so + using flexgridsizer.patch file (apply in the src/common directory of + wxWindows sources), and add --has-patched-wxsizer flag to configure. * Note about GTK2 - As GTK2 support in wxWindows library is, according to them, - EXPERIMENTAL, I will not officially support GTK2 either. This doesn't - mean this application won't run with GTK2, it simply means if you run - into problems with GTK2, don't come back crying, switch to GTK1 + As GTK2 support in wxWindows library is, according to them, + EXPERIMENTAL, I will not officially support GTK2 either. This doesn't + mean this application won't run with GTK2, it simply means if you run + into problems with GTK2, don't come back crying, switch to GTK1 instead. You have been warned. Index: TODO =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/TODO,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TODO 22 Dec 2003 22:12:00 -0000 1.12 +++ TODO 29 Dec 2003 06:52:31 -0000 1.13 @@ -3,11 +3,6 @@ ********************************************************************** * Copy lists data (single line and complete list) (ctrl+c/shift+ins). * Recommended sidebar sections for pages: - Server Page - - Add servers - - Update serverlist from URL - - Server settings (autoconnnect etc) - - Log settings Search Page - Search string, start/stop buttons - Search result filters @@ -29,31 +24,32 @@ - Selection of graphs to display * Find out what's the leaking `non-object data` that debug wx detects * Splitter windows don't resize correct after switching to fullscreen + (wxGTK only) * Hack wxToolBar to trigger EVT_LEFT_DOWN mouse events and use those for changing pages instead of EVT_LEFT_CLICK - makes it seem faster. * Detached frames aren't affected by iconset changing. * Listctrl's aren't affected by iconset changing. * Remember toolbar buttons order between sessions, provide some nice - dialog for modifying it. + dialog for modifying it. Hm, or perhaps drag&drop support? * Implement colour selection. Can use the same engine for runtime - updating as I used in CImages::UpdateImages(). + updating as I used in CMainDlg::UpdateImages(). * Implement font selection. Can use the same engine for runtime - updating as I used in CImages::UpdateImages(). + updating as I used in CMainDlg::UpdateImages(). * Implement a wxMac version of detaching engine (will probably need to destroy the page and recreate in new frame). +* Need to store/maintain two lists of pages - one list (implemented) + in CMainDlg to contain pages currently attached to the frame, + and other list (perhaps in wxInterface class?) containing all + loaded pages. Need this to have GUISettingsDlg startup-page + combobox behave correctly, for iconset-changing engine to + also update detached pages. For longer future, this list can + be used for maintaining loaded plugins also. *********************** GTK SYSTRAY BUGS/TODO *********************** * Maintainer: Patrizio Bassi aka Hetfield <het...@us... * ********************************************************************* -* Make it unicode compatible (TOP PRIORITY!). Compile wxWindows with - --with-gtk2 --enable-unicode --enable-debug for testing it. * Make it compatible with ShareDaemon coding standards. http://sharedaemon.sourceforge.net/staticpages/index.php?page=20031220110653863 -* Fix GTK/GTK2 warnings/criticals upon startup/shutdown. -* Use PNG images instead of XPM. Get the PNG image from CImages class - `img->GetImage(wxT("mule"));` * Autodetect which Window Manager is running and use the corresponding trayicon. -* Make tray-icon have transparent background (shows grey background on - KDE 3.1.4). |
|
From: <ma...@us...> - 2003-12-29 06:22:45
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv19967/src
Modified Files:
MainDlg.cpp ServerWnd.cpp
Log Message:
URLs are now highlighted in log box (win32 only), reverted to old flickering iconsetupdating due to refreshing issues.
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- MainDlg.cpp 29 Dec 2003 06:08:48 -0000 1.44
+++ MainDlg.cpp 29 Dec 2003 06:22:42 -0000 1.45
@@ -188,6 +188,11 @@
wxGetApp().mainframe_active = true;
start_up = false;
+ wxLogMessage(_("ShareDaemon wxInterface up and running!"));
+ wxLogMessage(
+ _("Visit http://sharedaemon.sourceforge.net "
+ "for latest updates.")
+ );
}
/****************************************************************** ~CMainDlg */
@@ -1065,8 +1070,6 @@
/* through the list of pages and calling images->UpdateImages on each of them.*/
/******************************************************************************/
void CMainDlg::UpdateImages() {
- Freeze();
-
img->LoadImages();
wxLogDebug(wxT("Updating all pages images..."));
for (size_t i=0;i<pages.GetCount();i++) {
@@ -1093,6 +1096,4 @@
systray->SetIcon(icon);
#endif
- Thaw();
- Refresh();
}
Index: ServerWnd.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- ServerWnd.cpp 29 Dec 2003 06:08:48 -0000 1.53
+++ ServerWnd.cpp 29 Dec 2003 06:22:42 -0000 1.54
@@ -282,7 +282,8 @@
s_bottom->Add(s_log);
wxTextCtrl *txt_logs = new wxTextCtrl(
bottom_panel, ID_LOG, wxEmptyString, wxDefaultPosition,
- wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY
+ wxDefaultSize,
+ wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL
);
new wxLogChain(new wxLogTextCtrl(txt_logs));
s_bottom->Add(txt_logs, 0, wxGROW|wxEXPAND, 5);
|
|
From: <ma...@us...> - 2003-12-29 06:22:45
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv19967 Modified Files: Changelog Log Message: URLs are now highlighted in log box (win32 only), reverted to old flickering iconsetupdating due to refreshing issues. Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- Changelog 29 Dec 2003 03:56:40 -0000 1.118 +++ Changelog 29 Dec 2003 06:22:42 -0000 1.119 @@ -27,6 +27,7 @@ 2003/12/29 Alo Sarv * Fixed win9x font issues; now using system font for bitmapbuttons. + * Log messages are also now passed to log box on server page. 2003/12/28 Alo Sarv * Applied patch 866355: Hetfields GTK-tray improvements: @@ -41,7 +42,6 @@ 2003/12/27 Alo Sarv * New bitmapbuttons are new iconset-theme aware. * Fixed toolbar images updating on iconset changing. - * Removed main frame flickering during iconset changing. 2003/12/26 Alo Sarv * Fixed configure script to be compatible with BSD. |
|
From: <ma...@us...> - 2003-12-29 06:08:51
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18163
Modified Files:
MainDlg.cpp ServerWnd.cpp ServerWnd.h wxInterface.cpp
Log Message:
Log messages are now also directed to server page logs box.
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- MainDlg.cpp 27 Dec 2003 12:38:55 -0000 1.43
+++ MainDlg.cpp 29 Dec 2003 06:08:48 -0000 1.44
@@ -1083,7 +1083,6 @@
img->UpdateImages(pages[i]->content);
}
CreateMyToolBar(true);
- serverwnd->SetLogBookImages();
statisticswnd->GetTree()->GetTreeImages();
statisticswnd->GetTree()->GenerateTree();
@@ -1095,4 +1094,5 @@
#endif
Thaw();
+ Refresh();
}
Index: ServerWnd.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- ServerWnd.cpp 27 Dec 2003 07:18:20 -0000 1.52
+++ ServerWnd.cpp 29 Dec 2003 06:08:48 -0000 1.53
@@ -72,7 +72,6 @@
/* Set the images of static bitmaps on this page. */
GetSSBitmapProvider()->SetBitmap(img->GetImage(wxT("provider")));
- SetLogBookImages();
}
/*
@@ -94,16 +93,6 @@
m_config->Write(wxT("SideBar"), sidebar->IsShown());
}
-/* Set log notebook page images */
-void CServerWnd::SetLogBookImages() {
- m_imagelist = new wxImageList(16, 16);
- m_imagelist->Add(img->GetImage(wxT("log")));
-
- GetLogBook()->AssignImageList(m_imagelist);
- GetLogBook()->SetPageImage(0, 0);
- GetLogBook()->SetPageImage(1, 0);
-}
-
/**
* These three almost identical methods add a line of [text] into the
* corresponding log listctrls, optionally also displaying it in statusbar.
@@ -281,49 +270,22 @@
wxNO_FULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL);
wxFlexGridSizer *s_bottom = new wxFlexGridSizer(1);
s_bottom->AddGrowableCol(0);
- s_bottom->AddGrowableRow(0);
- wxNotebook *logs = new wxNotebook(
- bottom_panel, ID_LOGBOOK, wxDefaultPosition, wxDefaultSize,
- wxNO_FULL_REPAINT_ON_RESIZE
- );
- wxNotebookSizer *s_logs = new wxNotebookSizer(logs);
- wxImageList *imgs = new wxImageList(16, 16);
- imgs->Add(img->GetImage(wxT("log")));
- logs->AssignImageList(imgs);
-
- /* General logs panel */
- wxPanel *p_logs = new wxPanel(
- logs, -1, wxDefaultPosition, wxDefaultSize,
- wxNO_FULL_REPAINT_ON_RESIZE
+ s_bottom->AddGrowableRow(1);
+ wxBoxSizer *s_log = new wxBoxSizer(wxHORIZONTAL);
+ wxStaticBitmap *log_img = new wxStaticBitmap(
+ bottom_panel, -1, img->GetImage(wxT("log")), wxDefaultPosition,
+ wxDefaultSize, 0, wxT("log")
);
- wxFlexGridSizer *sf_logs = new wxFlexGridSizer(1);
- sf_logs->AddGrowableCol(0);
- sf_logs->AddGrowableRow(0);
+ s_log->Add(log_img, 0, wxALL, 5);
+ wxStaticText *log_txt = new wxStaticText(bottom_panel, -1, _("Log"));
+ s_log->Add(log_txt, 0, wxALL, 5);
+ s_bottom->Add(s_log);
wxTextCtrl *txt_logs = new wxTextCtrl(
- p_logs, ID_LOG, wxEmptyString, wxDefaultPosition,
- wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY
- );
- sf_logs->Add(txt_logs, 0, wxGROW|wxALL|wxEXPAND, 0);
- p_logs->SetSizer(sf_logs);
- logs->AddPage(p_logs, _("Log"), true, 0);
-
- /* Debug logs panel */
- wxPanel *p_dlogs = new wxPanel(
- logs, -1, wxDefaultPosition, wxDefaultSize,
- wxNO_FULL_REPAINT_ON_RESIZE
- );
- wxFlexGridSizer *sf_dlogs = new wxFlexGridSizer(1);
- sf_dlogs->AddGrowableCol(0);
- sf_dlogs->AddGrowableRow(0);
- wxTextCtrl *txt_dlogs = new wxTextCtrl(
- p_dlogs, ID_DEBUGLOG, wxEmptyString, wxDefaultPosition,
+ bottom_panel, ID_LOG, wxEmptyString, wxDefaultPosition,
wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY
);
- sf_dlogs->Add(txt_dlogs, 0, wxGROW|wxALL|wxEXPAND, 0);
- p_dlogs->SetSizer(sf_dlogs);
- logs->AddPage(p_dlogs, _("Debug Log"), false, 0);
-
- s_bottom->Add(s_logs, 0, wxGROW|wxEXPAND|wxTOP|wxRIGHT, 5);
+ new wxLogChain(new wxLogTextCtrl(txt_logs));
+ s_bottom->Add(txt_logs, 0, wxGROW|wxEXPAND, 5);
bottom_panel->SetSizer(s_bottom);
/* Split the window and add to sizer */
Index: ServerWnd.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- ServerWnd.h 6 Dec 2003 00:45:36 -0000 1.31
+++ ServerWnd.h 29 Dec 2003 06:08:48 -0000 1.32
@@ -57,7 +57,6 @@
void AddLogLine(wxString text, bool status = false);
void AddDebugLine(wxString text, bool status = false);
void AddServerLogLine(wxString text, bool status = false);
- void SetLogBookImages();
private:
DECLARE_EVENT_TABLE()
Index: wxInterface.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- wxInterface.cpp 24 Dec 2003 07:37:26 -0000 1.13
+++ wxInterface.cpp 29 Dec 2003 06:08:48 -0000 1.14
@@ -48,7 +48,7 @@
bool wxInterface::OnInit() {
int show_splash = true;
mainframe_active = false;
- wxLog::SetActiveTarget(new wxLogStderr());
+ new wxLogChain(new wxLogStderr);
SetVendorName(wxT("ShareDaemon"));
SetAppName(wxT("wxInterface"));
|
|
From: <ma...@us...> - 2003-12-29 04:34:37
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv7064
Modified Files:
Images.cpp Images.h SBPanel.cpp SBPanel.h
Log Message:
Improved documentation of CImages and CSBPanel classes.
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- Images.cpp 29 Dec 2003 03:54:50 -0000 1.46
+++ Images.cpp 29 Dec 2003 04:34:33 -0000 1.47
@@ -30,32 +30,38 @@
#include "Images.h"
+/* List to store all bitmaps in */
#include <wx/listimpl.cpp>
WX_DEFINE_LIST(ListOfBitmaps);
-/* Constructor for CImages class */
+/******************************************************************** CImages */
+/* Constructor for CImages class */
+/* Initialises images list and calls LoadImages to populate it. */
+/******************************************************************************/
CImages::CImages() {
images = ListOfBitmaps(wxKEY_STRING);
tool_img_height = tool_img_width = 0;
LoadImages();
}
-/**
- * Destructor for CImages class. Deletes contents of `images` list
- */
+/******************************************************************* ~CImages */
+/* Destructor for CImages class. Deletes contents of `images` list. */
+/******************************************************************************/
CImages::~CImages() {
images.DeleteContents(true);
images.Clear();
}
-/**
- * This method loads all images into the global variables.
- */
+/***************************************************************** LoadImages */
+/* This method first clears up any contents previously in @images list, and */
+/* then proceeds to populate the list with images loaded from files at */
+/* directory specified by MakePath() method. */
+/* TODO: Put names into temporary wxString array and use for-loop to load 'em.*/
+/******************************************************************************/
void CImages::LoadImages() {
wxString path;
tool_img_width = 32;
- /* Just in case theres anything in there, delete it */
images.DeleteContents(true);
images.Clear();
@@ -243,11 +249,12 @@
);
}
-/**
- * This is an "Images Getter". It finds the requested image by searching
- * the image list by name. If not found, error message is generated,
- * but we still return the pointer (even if its illegal).
- */
+/******************************************************************* GetImage */
+/* This is an "Images Getter". It finds the requested image by searching the */
+/* image list by name. If not found, error message is generated and */
+/* wxNullBitmap returned. */
+/* @name Name of the image to be searched from @images list */
+/******************************************************************************/
wxBitmap& CImages::GetImage(const wxString &name) {
ListOfBitmaps::Node *tmp = images.Find(name);
@@ -262,11 +269,13 @@
return *(tmp->GetData());
}
-/**
- * This method searches recusivly through all children under *parent for
- * wxStaticBitmap type windows and sets their image by looking up the
- * correct image by its name.
- */
+/*************************************************************** UpdateImages */
+/* This method searches recusivly through all children under *parent for */
+/* wxStaticBitmap type windows and sets their image by looking up the */
+/* correct image by its name. */
+/* On wxGTK/wxMac, MBitmapButtons are also searched for and updated. */
+/* @parent Window to start recursive searching from. */
+/******************************************************************************/
void CImages::UpdateImages(wxWindow *parent) {
if (parent->GetClassInfo()->IsKindOf(CLASSINFO(wxStaticBitmap))) {
((wxStaticBitmap*)parent)->SetBitmap(
@@ -285,13 +294,19 @@
}
}
-/**
- * This method makes a new toolbar image. `name` is the label to be printed on
- * the final image, `image` is a name of the image in Images list. we create
- * a new wxBitmap object with width according to the length of width of `name`,
- * and draw the bitmap+text on it. Finally, the generated image is saved back
- * to Images list under the same name (previous version is deleted).
- */
+/******************************************************************************/
+/* This method generates a new image for usage on toolbar from the passed */
+/* name and image by loading the @image into wxMemoryDC, and then drawing */
+/* the text also there. Finally, the image is saved back to @images list */
+/* under @name. The tricky part here is finding out the width of the image */
+/* (which is done in CalcToolBitmapSize). Don't call this method before */
+/* calling CalcToolBitmapSize, otherwise the results from this method might */
+/* be... un-satisfying. Second tricky part here is getting transparency */
+/* working. On wxMSW, we draw background with wxLIGHT_GREY brush (heh, go */
+/* figure :)), elsewhere we use a black wxMask. */
+/* @name String to be printed on the image */
+/* @image Image to be looked up from @images and drawn. */
+/******************************************************************************/
wxBitmap& CImages::MakeToolImage(const wxString &name, const wxString &image) {
wxMemoryDC mdc;
wxBitmap tmp, tmp_new;
@@ -323,9 +338,9 @@
mdc.GetTextExtent(name, &x, &y);
mdc.DrawText(name, (tmp_new.GetWidth()-x)/2, 36);
#ifndef __WXMSW__ /* Use wxMask for transparency */
- wxMask *tmp_mask;
- tmp_mask = new wxMask(tmp_new, wxColour(0,0,0));
- tmp_new.SetMask(tmp_mask);
+ wxMask *tmp_mask;
+ tmp_mask = new wxMask(tmp_new, wxColour(0,0,0));
+ tmp_new.SetMask(tmp_mask);
#endif
mdc.EndDrawing();
@@ -341,7 +356,7 @@
/* calculated text length exceeds what is stored in global variables, update */
/* the global variables with new values. All this is neccesery to do before */
/* calling MakeToolImage(),otherwise the toolbar won't be correctly centered. */
-/* @names wxArrayString containing all toolbar button names. */
+/* @names wxArrayString containing all toolbar button names. */
/******************************************************************************/
void CImages::CalcToolBitmapSize(const wxArrayString &names) {
unsigned int i=0; /* Loop counter */
@@ -363,19 +378,19 @@
}
}
-/****************************************************************** MakePath */
-/* This method creates a platform-dependant path string for accessing images */
-/* from. Since various platforms use various standard locations for resouce */
-/* locations, this method handles it as follows: */
-/* Win32 @executable_path@/images/@iconsetname@/ */
-/* Linux @executable_path@/images/@iconsetname@/ */
-/* Mac OS X */
-/* CodeWarrior :@executable_path@::Resources:images:@iconsetname@ */
-/* GNU gcc @executable_path@/images/@iconsetname@/ */
-/* */
-/* TODO: Use /usr/share area on Linux */
-/* Check various locations, detect if images can be found. */
-/*****************************************************************************/
+/******************************************************************* MakePath */
+/* This method creates a platform-dependant path string for accessing images */
+/* from. Since various platforms use various standard locations for resouce */
+/* locations, this method handles it as follows: */
+/* Win32 @executable_path@/images/@iconsetname@/ */
+/* Linux @executable_path@/images/@iconsetname@/ */
+/* Mac OS X */
+/* CodeWarrior :@executable_path@::Resources:images:@iconsetname@ */
+/* GNU gcc @executable_path@/images/@iconsetname@/ */
+/* */
+/* TODO: Use /usr/share area on Linux */
+/* Check various locations, detect if images can be found. */
+/******************************************************************************/
wxString CImages::MakePath() {
wxString path, apppath;
wxChar sep;
Index: Images.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- Images.h 27 Dec 2003 08:39:04 -0000 1.21
+++ Images.h 29 Dec 2003 04:34:33 -0000 1.22
@@ -31,22 +31,34 @@
#include "defines.h"
#include "MBitmapButton.h"
+/* List to store the images in */
WX_DECLARE_LIST(wxBitmap, ListOfBitmaps);
+/****************************** CImages class *********************************/
+/* This class stores a list of wxBitmap's and provides getting/putting */
+/* functionality. The idea is to keep all images of the interface in one */
+/* place, which makes it easier to do runtime iconsets updating and similar. */
+/* Also, other several images-related methods are here, like MakeToolImage, */
+/* UpdateImages etc. */
+/******************************************************************************/
extern class CImages *img;
class CImages {
public:
- CImages();
- virtual ~CImages();
- wxBitmap& MakeToolImage(const wxString &name, const wxString &image);
- int tool_img_width, tool_img_height;
- void LoadImages();
- wxBitmap& GetImage(const wxString &name);
- void UpdateImages(wxWindow *parent);
- void CalcToolBitmapSize(const wxArrayString &names);
+ CImages(); /* Constructor, empties @images and calls LoadImages() */
+ virtual ~CImages(); /* Destructor, empties @images */
+ wxBitmap& MakeToolImage( /* Generates image for showing in ToolBar */
+ const wxString &name, const wxString &image
+ );
+ int tool_img_width, tool_img_height; /* Toolbar image x/y sizes */
+ void LoadImages(); /* Loads images from files */
+ wxBitmap& GetImage(const wxString &name);/* Returns image named @name */
+ void UpdateImages(wxWindow *parent); /* Recursivly updates GUI images */
+ void CalcToolBitmapSize( /* Calculates image size for toolbar buttons */
+ const wxArrayString &names
+ );
private:
- ListOfBitmaps images;
- wxString MakePath();
+ ListOfBitmaps images; /* The list of wxBitmap's */
+ wxString MakePath();/* Generates platform-dependant path to the files */
};
#endif /* __IMAGES_H__ */
Index: SBPanel.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- SBPanel.cpp 29 Dec 2003 03:54:50 -0000 1.17
+++ SBPanel.cpp 29 Dec 2003 04:34:33 -0000 1.18
@@ -30,17 +30,20 @@
#include "SBPanel.h"
-/**
- * CSBPanel class
- */
BEGIN_EVENT_TABLE(CSBPanel, wxPanel)
EVT_BUTTON(-1, CSBPanel::Toggle)
END_EVENT_TABLE()
-/**
- * Constructor for CSBPanel object. We create a Static Box inside this panel
- * and a "headerbutton" which will then provide us with toggling functionality.
- */
+/******************************************************************* CSBPanel */
+/* Constructor for CSBPanel object. We create a Static Box inside this panel */
+/* and a "headerbutton" which will then provide us with toggling */
+/* functionality. */
+/* @parent Parent window for this control */
+/* @id ID for this panel */
+/* @title String to be used for toggle-button */
+/* @name Name for this panel (used for state saving location) */
+/* @image Name of the image that will be retreived from CImages class */
+/******************************************************************************/
CSBPanel::CSBPanel(
wxWindow *parent, wxWindowID id, const wxString &title,
const wxString &name, const wxString &image
@@ -74,7 +77,7 @@
);
wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
fnt.SetWeight(wxBOLD);
- headerbmpbtn->SetFont(fnt);
+ headerbtn->SetFont(fnt);
header_btn_id = headerbtn->GetId();
mainsizer->Add(headerbtn, 0, wxGROW|wxADJUST_MINSIZE, 5);
@@ -88,10 +91,10 @@
shown = false;
}
-/**
- * Destructor. Save content displayment bool into config object under
- * /ParentName/ThisName
- */
+/****************************************************************** ~CSBPanel */
+/* Destructor. Save content displayment bool into config object under */
+/* ParentName/ThisName */
+/******************************************************************************/
CSBPanel::~CSBPanel() {
m_config->Write(
wxT("/")+GetParent()->GetName()+wxT("/")+GetName(),
@@ -99,12 +102,12 @@
);
}
-/**
- * Toggle method provides functionality for showing/hiding the contents
- * of this panel. First we check that the triggered event actually belongs
- * to our toggler-button. If so, we Hide the content, and call Fit() and
- * Layout() as neccesery.
- */
+/********************************************************************* Toggle */
+/* Toggle method provides functionality for showing/hiding the contents */
+/* of this panel. First we check that the triggered event actually belongs */
+/* to our toggler-button. If so, we Hide the content, and call Layout() as */
+/* neccesery. */
+/******************************************************************************/
void CSBPanel::Toggle(wxCommandEvent &event) {
if (event.GetId() != header_btn_id) {
event.Skip();
@@ -121,13 +124,13 @@
GetParent()->Layout();
}
-/**
- * This method adds contents (a sizer) into the section. We store
- * the pointer to the content sizer locally for easier access.
- * If there is any existing content in CSBPAnel, it is removed.
- * And last, read from config under section /ParentWindowName/SectionName
- * if the new section should be shown or not (default: true)
- */
+/***************************************************************** SetContent */
+/* This method adds contents (a sizer) into the section. We store the pointer */
+/* to the content sizer locally for easier access. If there is any existing */
+/* content in CSBPAnel, it is removed. And last, read from config under */
+/* section /ParentWindowName/SectionName if the new section should be shown */
+/* or not (default: true) and "Toggle" if needed. */
+/******************************************************************************/
void CSBPanel::SetContent(wxSizer *data) {
bool tmp;
@@ -145,22 +148,9 @@
wxT("/")+GetParent()->GetName()+wxT("/")+GetName(), &tmp, true
);
- /**
- * If config instructs us to NOT show the contents, call Toggle()
- * method with nullevent .
- */
if (!tmp) {
wxCommandEvent nullevent;
nullevent.SetId(header_btn_id);
Toggle(nullevent);
}
}
-
-
-
-
-
-
-
-
-
Index: SBPanel.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- SBPanel.h 27 Dec 2003 07:18:20 -0000 1.7
+++ SBPanel.h 29 Dec 2003 04:34:33 -0000 1.8
@@ -34,40 +34,33 @@
#include "MBitmapButton.h"
#include "Images.h"
-#if defined(__WXMSW__) || defined(__GTK2__)
- #define SB_BTN_FONT_SIZE 10
-#else
- #define SB_BTN_FONT_SIZE 12
-#endif
-
-/**
- * SBPanel, or SideBar Panel is a panel with a button on top of it
- * that provides its "closing" and "opening" functionality.
- * Usage:
- * Create new CSBPanel object and call SetContent(wxPanel *data) to
- * populate the panel with contents. You CAN NOT set two contents to
- * one section, but calling SetContent() at later time will replace
- * current contents with new contents.
- */
+/******************************************************************************/
+/* SBPanel, or SideBar Panel is a panel with a button on top of it that */
+/* provides its "closing" and "opening" functionality. */
+/* Usage: */
+/* Create new CSBPanel object and call SetContent(wxPanel *data) to populate */
+/* the panel with contents. You CAN NOT set two contents to one section, but */
+/* calling SetContent() at later time will replace current contents with new */
+/* contents. */
+/******************************************************************************/
class CSBPanel : public wxPanel {
public:
- CSBPanel(
+ CSBPanel( /* Constructor, creates header button */
wxWindow *parent, wxWindowID id,
const wxString &title, const wxString &name,
const wxString &image = wxEmptyString
);
- virtual ~CSBPanel();
+ virtual ~CSBPanel(); /* Destructor, saves toggle state */
- void SetContent(wxSizer *data);
- void Toggle(wxCommandEvent &event);
+ void SetContent(wxSizer *data); /* Set @data as content */
+ void Toggle(wxCommandEvent &event);/* Toggles displayment of @content */
private:
DECLARE_EVENT_TABLE();
-
- wxStaticBoxSizer *mainsizer;
- wxSizer *content;
- int header_btn_id;
- bool shown;
- bool use_image;
+ wxStaticBoxSizer *mainsizer; /* Main sizer of this control */
+ wxSizer *content; /* The content of this control */
+ int header_btn_id; /* ID of the header toggle button */
+ bool shown; /* Wether @content is shown or not */
+ bool use_image; /* Wether image is used in headerbtn */
};
#endif
|
|
From: <ma...@us...> - 2003-12-29 03:56:43
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv2102 Modified Files: Changelog Log Message: win9x issues Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- Changelog 28 Dec 2003 05:38:00 -0000 1.117 +++ Changelog 29 Dec 2003 03:56:40 -0000 1.118 @@ -25,6 +25,9 @@ # This also helps in backtracking changes, or reviewing development history. # ############################################################################### +2003/12/29 Alo Sarv + * Fixed win9x font issues; now using system font for bitmapbuttons. + 2003/12/28 Alo Sarv * Applied patch 866355: Hetfields GTK-tray improvements: * GTK2 compatibility. |
|
From: <ma...@us...> - 2003-12-29 03:54:53
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1896
Modified Files:
SBPanel.cpp Images.cpp
Log Message:
Fixes win9x problems; Bitmapbuttons now use system font.
Index: SBPanel.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- SBPanel.cpp 27 Dec 2003 07:18:20 -0000 1.16
+++ SBPanel.cpp 29 Dec 2003 03:54:50 -0000 1.17
@@ -62,18 +62,20 @@
this, -1, title, image, wxDefaultPosition,
wxDefaultSize, wxNO_BORDER
);
- headerbmpbtn->SetFont(
- wxFont(SB_BTN_FONT_SIZE, wxROMAN, wxNORMAL, wxBOLD)
- );
+ wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
+ fnt.SetWeight(wxBOLD);
+ headerbmpbtn->SetFont(fnt);
+
header_btn_id = headerbmpbtn->GetId();
mainsizer->Add(headerbmpbtn, 0, wxGROW);
} else {
wxButton *headerbtn = new wxButton(
this, -1, title, wxDefaultPosition, wxDefaultSize, 0
);
- headerbtn->SetFont(
- wxFont(SB_BTN_FONT_SIZE, wxROMAN, wxNORMAL, wxBOLD)
- );
+ wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
+ fnt.SetWeight(wxBOLD);
+ headerbmpbtn->SetFont(fnt);
+
header_btn_id = headerbtn->GetId();
mainsizer->Add(headerbtn, 0, wxGROW|wxADJUST_MINSIZE, 5);
}
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- Images.cpp 27 Dec 2003 14:27:51 -0000 1.45
+++ Images.cpp 29 Dec 2003 03:54:50 -0000 1.46
@@ -300,11 +300,10 @@
tmp_new = wxBitmap(tool_img_width, tool_img_height);
mdc.SelectObject(tmp_new);
-#ifdef __WXMAC__
- mdc.SetFont(wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT));
-#else
- mdc.SetFont(wxFont(10, wxDECORATIVE, wxNORMAL, wxBOLD));
-#endif
+ wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
+ fnt.SetWeight(wxBOLD);
+ mdc.SetFont(fnt);
+
mdc.SetPen(*wxTRANSPARENT_PEN);
mdc.BeginDrawing();
@@ -351,11 +350,9 @@
wxBitmap tmp(100, 100);
mdc.SelectObject(tmp);
-#ifdef __WXMAC__
- mdc.SetFont(wxFont(10, wxDEFAULT, wxNORMAL, wxNORMAL));
-#else
- mdc.SetFont(wxFont(10, wxDECORATIVE, wxNORMAL, wxBOLD));
-#endif
+ wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
+ fnt.SetWeight(wxBOLD);
+ mdc.SetFont(fnt);
for (i=0;i<names.GetCount();i++) {
mdc.GetTextExtent(names.Item(i), &x, &y);
|
|
From: <mik...@us...> - 2003-12-28 13:07:04
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv15345 Modified Files: ChangeLog Log Message: Version 0.1.3pre1 Index: ChangeLog =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChangeLog 28 Dec 2003 12:35:14 -0000 1.15 +++ ChangeLog 28 Dec 2003 13:07:01 -0000 1.16 @@ -23,7 +23,11 @@ ----------------------------------------------------------- +Version : 0.1.3pre1 +------------- + 28/12/2003 Mikael Barbeaux + * Put tag version * Updated Eclipse project files & Makefiles * Fixed Condition bugs under Win 95 / 98 / Me. The SignalObjectAndWait kernel function wasn't implemented |
|
From: <mik...@us...> - 2003-12-28 12:52:45
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web
In directory sc8-pr-cvs1:/tmp/cvs-serv13218
Modified Files:
Makefile.win .cdtbuild Makefile.lin Makefile.bsd Makefile.osx
Log Message:
28/12/2003 Mikael Barbeaux
* Fixed Condition bugs under Win 95 / 98 / Me. The
SignalObjectAndWait kernel function wasn't implemented
on thoses operating systems.
Index: Makefile.win
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/Makefile.win,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Makefile.win 28 Dec 2003 12:35:14 -0000 1.12
+++ Makefile.win 28 Dec 2003 12:52:38 -0000 1.13
@@ -60,7 +60,7 @@
src/Main.o
$(BIN) : $(OBJECTS)
- $(CC) $(CCFLAGS) -o $(BIN) $(OBJECTS) $(LIBRARIES_DIR) $(LIBS)
+ $(CC) -o $(BIN) $(OBJECTS) $(LIBRARIES_DIR) $(LIBS)
%.o : %.cpp
$(CC) $(CCFLAGS) $(INCLUDE_DIRS) -o $@ -c $<
Index: .cdtbuild
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/.cdtbuild,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- .cdtbuild 28 Dec 2003 12:35:14 -0000 1.4
+++ .cdtbuild 28 Dec 2003 12:52:38 -0000 1.5
@@ -14,6 +14,7 @@
</optionReference>
<optionReference defaultValue="" id="cygwin.gnu.compiler.debugging.other"/>
<optionReference defaultValue="true" id="cygwin.gnu.compiler.warnings.pedantic"/>
+ <optionReference defaultValue="-march=athlon-xp" id="cygwin.compiler.optimization.flags"/>
</toolReference>
<toolReference id="cdt.build.tool.cygwin.gnu.c.compiler">
<optionReference defaultValue="Optimize most (-O3)" id="cygwin.gnu.c.compiler.general.optimization.level"/>
Index: Makefile.lin
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/Makefile.lin,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Makefile.lin 26 Dec 2003 23:08:52 -0000 1.9
+++ Makefile.lin 28 Dec 2003 12:52:38 -0000 1.10
@@ -53,7 +53,7 @@
src/Main.o
$(BIN) : $(OBJECTS)
- $(CC) $(CCFLAGS) -o $(BIN) $(OBJECTS) $(LIBS)
+ $(CC) -o $(BIN) $(OBJECTS) $(LIBS)
%.o : %.cpp
$(CC) $(CCFLAGS) -o $@ -c $<
Index: Makefile.bsd
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/Makefile.bsd,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Makefile.bsd 26 Dec 2003 23:08:52 -0000 1.9
+++ Makefile.bsd 28 Dec 2003 12:52:38 -0000 1.10
@@ -54,7 +54,7 @@
src/Main.o
$(BIN) : $(OBJECTS)
- $(CC) $(CCFLAGS) -o $(BIN) $(OBJECTS) $(LIBS)
+ $(CC) -o $(BIN) $(OBJECTS) $(LIBS)
%.o : %.cpp
$(CC) $(CCFLAGS) -o $@ -c $<
Index: Makefile.osx
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/Makefile.osx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Makefile.osx 26 Dec 2003 23:08:52 -0000 1.9
+++ Makefile.osx 28 Dec 2003 12:52:38 -0000 1.10
@@ -54,7 +54,7 @@
src/Main.o
$(BIN) : $(OBJECTS)
- $(CC) $(CCFLAGS) -o $(BIN) $(OBJECTS) $(LIBS)
+ $(CC) -o $(BIN) $(OBJECTS) $(LIBS)
%.o : %.cpp
$(CC) $(CCFLAGS) -o $@ -c $<
|
|
From: <mik...@us...> - 2003-12-28 12:52:41
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/thread In directory sc8-pr-cvs1:/tmp/cvs-serv13218/src/thread Modified Files: Thread.cpp Log Message: 28/12/2003 Mikael Barbeaux * Fixed Condition bugs under Win 95 / 98 / Me. The SignalObjectAndWait kernel function wasn't implemented on thoses operating systems. Index: Thread.cpp =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/thread/Thread.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Thread.cpp 26 Dec 2003 22:56:42 -0000 1.2 +++ Thread.cpp 28 Dec 2003 12:52:38 -0000 1.3 @@ -132,8 +132,9 @@ throw ThreadException(ThreadExcp, "Cannot allocate the thread.", "Thread::start"); #ifdef _WIN32_ + DWORD thread_id; if((*thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) launch, - this, 0 ,0)) == 0) + this, 0 , &thread_id)) == 0) throw ThreadException(ThreadExcp, "Cannot create the thread.", "Thread::start"); #else |
|
From: <mik...@us...> - 2003-12-28 12:35:17
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv11052 Modified Files: Makefile.win ChangeLog Added Files: .cdtbuild .cdtproject .project Log Message: 28/12/2003 Mikael Barbeaux * Updated Eclipse project files & Makefiles Index: Makefile.win =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/Makefile.win,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile.win 28 Dec 2003 12:27:24 -0000 1.11 +++ Makefile.win 28 Dec 2003 12:35:14 -0000 1.12 @@ -6,7 +6,7 @@ ###################################################### # MinGW direcoty -MINGW_DIR = G:/Dev-Cpp +MINGW_DIR = G:/MinGW # Your flags from the C++ compiler CCFLAGS = -O3 Index: ChangeLog =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ChangeLog 28 Dec 2003 12:27:24 -0000 1.14 +++ ChangeLog 28 Dec 2003 12:35:14 -0000 1.15 @@ -24,6 +24,7 @@ ----------------------------------------------------------- 28/12/2003 Mikael Barbeaux + * Updated Eclipse project files & Makefiles * Fixed Condition bugs under Win 95 / 98 / Me. The SignalObjectAndWait kernel function wasn't implemented on thoses operating systems. |
|
From: <mik...@us...> - 2003-12-28 12:33:08
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv10287 Removed Files: .cdtbuild .cdtproject .project Log Message: 27/12/2003 Mikael Barbeaux * Updating Eclipse project files --- .cdtbuild DELETED --- --- .cdtproject DELETED --- --- .project DELETED --- |
|
From: <mik...@us...> - 2003-12-28 12:27:29
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/thread
In directory sc8-pr-cvs1:/tmp/cvs-serv9738/src/thread
Modified Files:
Condition.cpp Condition.h
Log Message:
28/12/2003 Mikael Barbeaux
* Fixed Condition bugs under Win 95 / 98 / Me. The
SignalObjectAndWait kernel function wasn't implemented
on thoses operating systems.
Index: Condition.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/thread/Condition.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Condition.cpp 24 Dec 2003 13:03:54 -0000 1.2
+++ Condition.cpp 28 Dec 2003 12:27:24 -0000 1.3
@@ -88,8 +88,20 @@
/* Waits indefinitively for the semaphore to
release the mutex. */
HANDLE *mutex_t = (HANDLE*) mutex;
- if(::SignalObjectAndWait(*mutex_t, condition->semaphore,
- INFINITE, false) != WAIT_OBJECT_0) {
+ DWORD ret = ::SignalObjectAndWait(*mutex_t,
+ condition->semaphore,
+ INFINITE, false);
+ /**
+ * Under Windows 95/98/Me, SignalObjectAndWait
+ * kernel function isn't implemented. In that
+ * case, you need to make the signal manually...
+ */
+ if(GetLastError() == 120) {
+ // Signals and waits for object
+ unlock();
+ ret = WaitForSingleObject(condition->semaphore, INFINITE);
+ }
+ if(ret != WAIT_OBJECT_0) {
// semaphore is invalid
unlock();
throw ThreadException(ConditionExcp, "Invalid semaphore.",
@@ -104,8 +116,20 @@
LeaveCriticalSection(&(condition->waiting_lock));
if(last_waiter) {
// Wait for all waiting threads to leave the mutex.
- if(::SignalObjectAndWait(condition->waiters_done, *mutex_t,
- INFINITE, false) != WAIT_OBJECT_0) {
+ DWORD ret = ::SignalObjectAndWait(condition->waiters_done,
+ *mutex_t, INFINITE, false);
+
+ /**
+ * Under Windows 95/98/Me, SignalObjectAndWait
+ * kernel function isn't implemented. In that
+ * case, you need to make the signal manually...
+ */
+ if(GetLastError() == 120) {
+ PulseEvent(condition->waiters_done);
+ ret = WaitForSingleObject(*mutex, INFINITE);
+ }
+
+ if(ret != WAIT_OBJECT_0) {
// the mutex is invalid
unlock();
throw ThreadException(ConditionExcp, "Invalid mutex.",
Index: Condition.h
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/thread/Condition.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Condition.h 24 Dec 2003 13:03:54 -0000 1.2
+++ Condition.h 28 Dec 2003 12:27:24 -0000 1.3
@@ -35,7 +35,7 @@
#define _WIN32_WINNT 0x0400
#endif
#include <windows.h>
-
+
typedef struct {
// Number of threads waiting for the condition
int nb_waiting;
|
|
From: <mik...@us...> - 2003-12-28 12:27:27
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv9738 Modified Files: Makefile.win ChangeLog Log Message: 28/12/2003 Mikael Barbeaux * Fixed Condition bugs under Win 95 / 98 / Me. The SignalObjectAndWait kernel function wasn't implemented on thoses operating systems. Index: Makefile.win =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/Makefile.win,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.win 26 Dec 2003 23:08:52 -0000 1.10 +++ Makefile.win 28 Dec 2003 12:27:24 -0000 1.11 @@ -32,7 +32,7 @@ INCLUDE_DIRS = -I"$(MINGW_DIR)/include/c++" -I"$(MINGW_DIR)/include/c++/mingw32" INLUCDE_DIRS += -I"$(MINGW_DIR)/include/c++/backward" -I"$(MINGW_DIR)/include" LIBRARIES_DIR = -L"$(MINGW_DIR)/lib" -LIBS = -L"$(MINGW_DIR)/lib" $(MINGW_DIR)/lib/libws2_32.a +LIBS = -lws2_32 OBJECTS = src/exceptions/Exception.o \ src/exceptions/ThreadException.o \ Index: ChangeLog =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ChangeLog 27 Dec 2003 11:56:06 -0000 1.13 +++ ChangeLog 28 Dec 2003 12:27:24 -0000 1.14 @@ -23,6 +23,11 @@ ----------------------------------------------------------- +28/12/2003 Mikael Barbeaux + * Fixed Condition bugs under Win 95 / 98 / Me. The + SignalObjectAndWait kernel function wasn't implemented + on thoses operating systems. + 27/12/2003 Mikael Barbeaux * Fixed a Win32 compilation bug, should work perfectly now. * Fixed a bug about rebinding sockets on the same address. |
|
From: <ma...@us...> - 2003-12-28 05:38:03
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv21596 Modified Files: Changelog Log Message: Patch 866355 Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- Changelog 27 Dec 2003 07:39:53 -0000 1.116 +++ Changelog 28 Dec 2003 05:38:00 -0000 1.117 @@ -25,6 +25,16 @@ # This also helps in backtracking changes, or reviewing development history. # ############################################################################### +2003/12/28 Alo Sarv + * Applied patch 866355: Hetfields GTK-tray improvements: + * GTK2 compatibility. + * Unicode compatibility. + * Now uses global CImages class images for icon. + * Fixed transparency issues in KDE. + * Fixed segfault on exit. + * Fixed GTK warnings/criticals. + * General code cleanup and optimization. + 2003/12/27 Alo Sarv * New bitmapbuttons are new iconset-theme aware. * Fixed toolbar images updating on iconset changing. |
|
From: <ma...@us...> - 2003-12-28 05:34:24
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv21055
Modified Files:
SysTray.cpp SysTray.h TrayCoreEngine.c TrayCoreEngine.h
Log Message:
* Applied patch 866355: Hetfields GTK-tray improvements:
* GTK2 compatibility
* Unicode compatibility
* PNG compatibility
* Fixed transparency issues on KDE
* Fixed Segfault on exit
* Removed GTK warnings/criticals
* General code cleanup and optimization.
Index: SysTray.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SysTray.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- SysTray.cpp 19 Dec 2003 03:01:14 -0000 1.12
+++ SysTray.cpp 28 Dec 2003 05:34:17 -0000 1.13
@@ -111,10 +111,6 @@
/* On wxGTK, we use GTK systray */
#elif defined(__WXGTK__)
-//****************************************************
-//HERE STARTS THE UNIX&MAC SYSTRAY INTEGRATION CLASS
-//****************************************************
-
/***************************************************************
This tray has been taken from Tiku's xmule implementation,
changing events handling and adding some features.
@@ -122,21 +118,21 @@
[...1060 lines suppressed...]
m_pLimits = new int[nEntries];
m_pColors = new COLORREF[nEntries];
+
// copy values
for(int i = 0;i < nEntries;i++)
- {// begin copy
+ {
m_pLimits[i] = pLimits[i];
m_pColors[i] = pColors[i];
- }// end copy
+ }
+
m_nEntries = nEntries;
return true;
-}// end SetColorLevels
+}
#else /* not __WXMSW__ and not __WXGTK__ */
#warning No native systray implemented for your port.
Index: SysTray.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SysTray.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- SysTray.h 19 Dec 2003 03:01:14 -0000 1.6
+++ SysTray.h 28 Dec 2003 05:34:17 -0000 1.7
@@ -48,13 +48,8 @@
DECLARE_EVENT_TABLE()
};
-
-#elif defined(__WXGTK__)
-
-//****************************************************
-//HERE STARTS THE UNIX&MAC SYSTRAY INTEGRATION CLASS
-//****************************************************
-
+#endif
+#ifdef __WXGTK__
/***************************************************************
This tray has been taken from Tiku's xmule implementation,
changing events handling and adding some features.
@@ -62,30 +57,36 @@
Hetfield aka Patrizio Bassi <het...@us...>
****************************************************************/
-//WxWindows function
-#include "wx/window.h"
//GTK Core functions
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
+#include <glib.h>
+//window manager detection
#include <X11/Xatom.h>
+//ip detection
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <stdio.h>
//GTK Tray personalized from Tiku's one
#include "TrayCoreEngine.h"
//Value definition
#define GetRValue(rgb) (((rgb)>>16)&0xff)
#define GetGValue(rgb) (((rgb)>>8)&0xff)
#define GetBValue(rgb) ((rgb)&0xff)
+#define UNLIMITED 0xFFFF
-// SysTray Integration Class, provided for Unix&Mac Systems
class CSysTray {
public:
-
//Core functions
+
//Constructor
CSysTray(int=3);
//Distructor
- ~CSysTray();
+ virtual ~CSysTray();
//Graphics functions
@@ -98,10 +99,10 @@
//Sets Colors
bool SetColorLevels(int* pLimits,COLORREF* pColors, int nEntries);
-
private:
- //these functions are provided for your convenience. Not used anymore.
+ //event driven functions (not used)
+
void ShowContextMenu();
void HideShowGUI();
void ChangeGUISettings();
@@ -139,6 +140,7 @@
int m_nEntries;
};
+
#endif /* __WXGTK__ */
Index: TrayCoreEngine.c
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/TrayCoreEngine.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- TrayCoreEngine.c 19 Dec 2003 03:01:14 -0000 1.1
+++ TrayCoreEngine.c 28 Dec 2003 05:34:17 -0000 1.2
@@ -28,6 +28,8 @@
#include "TrayCoreEngine.h"
+#ifndef __GTK2__
+
#define SYSTEM_TRAY_REQUEST_DOCK 0
#define SYSTEM_TRAY_BEGIN_MESSAGE 1
#define SYSTEM_TRAY_CANCEL_MESSAGE 2
@@ -1543,3 +1545,375 @@
(Window)gtk_plug_get_id (GTK_PLUG (icon)),
id, 0, 0);*/
}
+#endif
+
+#ifdef __GTK2__
+
+#define SYSTEM_TRAY_REQUEST_DOCK 0
+#define SYSTEM_TRAY_BEGIN_MESSAGE 1
+#define SYSTEM_TRAY_CANCEL_MESSAGE 2
+
+static GtkPlugClass *parent_class = NULL;
+
+static void egg_tray_icon_init (EggTrayIcon *icon);
+static void egg_tray_icon_class_init (EggTrayIconClass *klass);
+
+static void egg_tray_icon_unrealize (GtkWidget *widget);
+
+static void egg_tray_icon_update_manager_window (EggTrayIcon *icon);
+
+GType
+egg_tray_icon_get_type (void)
+{
+ static GType our_type = 0;
+
+ our_type = g_type_from_name("EggTrayIcon");
+
+ if (our_type == 0)
+ {
+ static const GTypeInfo our_info =
+ {
+ sizeof (EggTrayIconClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) egg_tray_icon_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EggTrayIcon),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) egg_tray_icon_init
+ };
+
+ our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
+ }
+ else if (parent_class == NULL) {
+ /* we're reheating the old class from a previous instance - engage ugly hack =( */
+ egg_tray_icon_class_init((EggTrayIconClass *)g_type_class_peek(our_type));
+ }
+
+ return our_type;
+}
+
+static void
+egg_tray_icon_init (EggTrayIcon *icon)
+{
+ icon->stamp = 1;
+
+ gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
+}
+
+static void
+egg_tray_icon_class_init (EggTrayIconClass *klass)
+{
+ GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ widget_class->unrealize = egg_tray_icon_unrealize;
+}
+
+static GdkFilterReturn
+egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
+{
+ EggTrayIcon *icon = user_data;
+ XEvent *xev = (XEvent *)xevent;
+
+ if (xev->xany.type == ClientMessage &&
+ xev->xclient.message_type == icon->manager_atom &&
+ xev->xclient.data.l[1] == icon->selection_atom)
+ {
+ egg_tray_icon_update_manager_window (icon);
+ }
+ else if (xev->xany.window == icon->manager_window)
+ {
+ if (xev->xany.type == DestroyNotify)
+ {
+ egg_tray_icon_update_manager_window (icon);
+ }
+ }
+
+ return GDK_FILTER_CONTINUE;
+}
+
+static void
+egg_tray_icon_unrealize (GtkWidget *widget)
+{
+ EggTrayIcon *icon = EGG_TRAY_ICON (widget);
+ GdkWindow *root_window;
+
+ if (icon->manager_window != None)
+ {
+ GdkWindow *gdkwin;
+
+#if HAVE_GTK_MULTIHEAD
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
+ icon->manager_window);
+#else
+ gdkwin = gdk_window_lookup (icon->manager_window);
+#endif
+
+ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+ }
+
+#if HAVE_GTK_MULTIHEAD
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
+#else
+ root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
+#endif
+
+ gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+}
+
+static void
+egg_tray_icon_send_manager_message (EggTrayIcon *icon,
+ long message,
+ Window window,
+ long data1,
+ long data2,
+ long data3)
+{
+ XClientMessageEvent ev;
+ Display *display;
+
+ ev.type = ClientMessage;
+ ev.window = window;
+ ev.message_type = icon->system_tray_opcode_atom;
+ ev.format = 32;
+ ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
+ ev.data.l[1] = message;
+ ev.data.l[2] = data1;
+ ev.data.l[3] = data2;
+ ev.data.l[4] = data3;
+
+#if HAVE_GTK_MULTIHEAD
+ display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+#else
+ display = gdk_display;
+#endif
+
+ gdk_error_trap_push ();
+ XSendEvent (display,
+ icon->manager_window, False, NoEventMask, (XEvent *)&ev);
+ XSync (display, False);
+ gdk_error_trap_pop ();
+}
+
+static void
+egg_tray_icon_send_dock_request (EggTrayIcon *icon)
+{
+ egg_tray_icon_send_manager_message (icon,
+ SYSTEM_TRAY_REQUEST_DOCK,
+ icon->manager_window,
+ gtk_plug_get_id (GTK_PLUG (icon)),
+ 0, 0);
+}
+
+static void
+egg_tray_icon_update_manager_window (EggTrayIcon *icon)
+{
+ Display *xdisplay;
+
+#if HAVE_GTK_MULTIHEAD
+ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+#else
+ xdisplay = gdk_display;
+#endif
+
+ if (icon->manager_window != None)
+ {
+ GdkWindow *gdkwin;
+
+#if HAVE_GTK_MULTIHEAD
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+#else
+ gdkwin = gdk_window_lookup (icon->manager_window);
+#endif
+
+ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+ }
+
+ XGrabServer (xdisplay);
+
+ icon->manager_window = XGetSelectionOwner (xdisplay,
+ icon->selection_atom);
+
+ if (icon->manager_window != None)
+ XSelectInput (xdisplay,
+ icon->manager_window, StructureNotifyMask);
+
+ XUngrabServer (xdisplay);
+ XFlush (xdisplay);
+
+ if (icon->manager_window != None)
+ {
+ GdkWindow *gdkwin;
+
+#if HAVE_GTK_MULTIHEAD
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+#else
+ gdkwin = gdk_window_lookup (icon->manager_window);
+#endif
+
+ gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+
+ /* Send a request that we'd like to dock */
+ egg_tray_icon_send_dock_request (icon);
+ }
+}
+
+EggTrayIcon *
+egg_tray_icon_new_for_xscreen (Screen *xscreen, const char *name)
+{
+ EggTrayIcon *icon;
+ char buffer[256];
+ GdkWindow *root_window;
+
+ g_return_val_if_fail (xscreen != NULL, NULL);
+
+ icon = g_object_new (EGG_TYPE_TRAY_ICON, NULL);
+ gtk_window_set_title (GTK_WINDOW (icon), name);
+
+#if HAVE_GTK_MULTIHEAD
+ /* FIXME: this code does not compile, screen is undefined. Now try
+ * getting the GdkScreen from xscreen (:. Dunno how to solve this
+ * (there is prolly some easy way I cant think of right now)
+ */
+ gtk_plug_construct_for_display (GTK_PLUG (icon),
+ gdk_screen_get_display (screen), 0);
+#else
+ gtk_plug_construct (GTK_PLUG (icon), 0);
+#endif
+
+ gtk_widget_realize (GTK_WIDGET (icon));
+
+ /* Now see if there's a manager window around */
+ g_snprintf (buffer, sizeof (buffer),
+ "_NET_SYSTEM_TRAY_S%d",
+ XScreenNumberOfScreen (xscreen));
+
+ icon->selection_atom = XInternAtom (DisplayOfScreen (xscreen),
+ buffer, False);
+
+ icon->manager_atom = XInternAtom (DisplayOfScreen (xscreen),
+ "MANAGER", False);
+
+ icon->system_tray_opcode_atom = XInternAtom (DisplayOfScreen (xscreen),
+ "_NET_SYSTEM_TRAY_OPCODE", False);
+
+ egg_tray_icon_update_manager_window (icon);
+
+#if HAVE_GTK_MULTIHEAD
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (screen));
+#else
+ root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
+#endif
+
+ /* Add a root window filter so that we get changes on MANAGER */
+ gdk_window_add_filter (root_window,
+ egg_tray_icon_manager_filter, icon);
+
+ return icon;
+}
+
+#if HAVE_GTK_MULTIHEAD
+EggTrayIcon *
+egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
+{
+ EggTrayIcon *icon;
+ char buffer[256];
+
+ g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+
+ return egg_tray_icon_new_for_xscreen (GDK_SCREEN_XSCREEN (screen), name);
+}
+#endif
+
+EggTrayIcon*
+egg_tray_icon_new (const gchar *name)
+{
+ return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_display), name);
+}
+
+guint
+egg_tray_icon_send_message (EggTrayIcon *icon,
+ gint timeout,
+ const gchar *message,
+ gint len)
+{
+ guint stamp;
+
+ g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0);
+ g_return_val_if_fail (timeout >= 0, 0);
+ g_return_val_if_fail (message != NULL, 0);
+
+ if (icon->manager_window == None)
+ return 0;
+
+ if (len < 0)
+ len = strlen (message);
+
+ stamp = icon->stamp++;
+
+ /* Get ready to send the message */
+ egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
+ (Window)gtk_plug_get_id (GTK_PLUG (icon)),
+ timeout, len, stamp);
+
+ /* Now to send the actual message */
+ gdk_error_trap_push ();
+ while (len > 0)
+ {
+ XClientMessageEvent ev;
+ Display *xdisplay;
+
+#if HAVE_GTK_MULTIHEAD
+ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+#else
+ xdisplay = gdk_display;
+#endif
+
+ ev.type = ClientMessage;
+ ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
+ ev.format = 8;
+ ev.message_type = XInternAtom (xdisplay,
+ "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
+ if (len > 20)
+ {
+ memcpy (&ev.data, message, 20);
+ len -= 20;
+ message += 20;
+ }
+ else
+ {
+ memcpy (&ev.data, message, len);
+ len = 0;
+ }
+
+ XSendEvent (xdisplay,
+ icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
+ XSync (xdisplay, False);
+ }
+ gdk_error_trap_pop ();
+
+ return stamp;
+}
+
+void
+egg_tray_icon_cancel_message (EggTrayIcon *icon,
+ guint id)
+{
+ g_return_if_fail (EGG_IS_TRAY_ICON (icon));
+ g_return_if_fail (id > 0);
+
+ egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
+ (Window)gtk_plug_get_id (GTK_PLUG (icon)),
+ id, 0, 0);
+}
+
+#endif
+
Index: TrayCoreEngine.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/TrayCoreEngine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- TrayCoreEngine.h 19 Dec 2003 03:01:14 -0000 1.1
+++ TrayCoreEngine.h 28 Dec 2003 05:34:17 -0000 1.2
@@ -35,7 +35,6 @@
#include <gtk/gtkprivate.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
-#include <gdk/gdkx.h>
#include <gdk/gdk.h>
#include <gtk/gtksocket.h>
#include <stdarg.h>
@@ -83,6 +82,11 @@
#define min(a,b) ((a)<(b)?(a):(b))
+
+
+
+#ifndef __GTK2__
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -191,6 +195,62 @@
}
#endif /* __cplusplus */
+#endif //gtk2
+
+#ifdef __GTK2__
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
+#define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
+#define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
+#define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
+#define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
+#define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
+
+typedef struct _EggTrayIcon EggTrayIcon;
+typedef struct _EggTrayIconClass EggTrayIconClass;
+
+struct _EggTrayIcon
+{
+ GtkPlug parent_instance;
+
+ guint stamp;
+
+ Atom selection_atom;
+ Atom manager_atom;
+ Atom system_tray_opcode_atom;
+ Window manager_window;
+};
+
+struct _EggTrayIconClass
+{
+ GtkPlugClass parent_class;
+};
+
+GType egg_tray_icon_get_type (void);
+
+#if EGG_TRAY_ENABLE_MULTIHEAD
+EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
+ const gchar *name);
+#endif
+
+EggTrayIcon *egg_tray_icon_new (const gchar *name);
+
+guint egg_tray_icon_send_message (EggTrayIcon *icon,
+ gint timeout,
+ const char *message,
+ gint len);
+void egg_tray_icon_cancel_message (EggTrayIcon *icon,
+ guint id);
+
+
+
+G_END_DECLS
+
+#endif //gtk2
#endif /* __EGG_TRAY_ICON_H__ */
+
+
|
|
From: <ma...@us...> - 2003-12-27 14:27:55
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26888
Modified Files:
Images.cpp
Log Message:
Whops, forgot to ifdef GenImage
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- Images.cpp 27 Dec 2003 08:39:04 -0000 1.44
+++ Images.cpp 27 Dec 2003 14:27:51 -0000 1.45
@@ -273,9 +273,11 @@
GetImage(parent->GetName())
);
}
+#ifndef __WXMSW__
if (parent->GetClassInfo()->IsKindOf(CLASSINFO(MBitmapButton))) {
((MBitmapButton*)parent)->GenImage();
}
+#endif
wxWindowList controls;
controls = parent->GetChildren();
for (unsigned int i=0;i<controls.GetCount();i++) {
|
|
From: <ma...@us...> - 2003-12-27 12:38:59
|
Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9898
Modified Files:
GUISettingsDlg.cpp MainDlg.cpp MainDlg.h
Log Message:
Fixed most bugs in page detaching engine that new pages-list handling produced.
Index: GUISettingsDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/GUISettingsDlg.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- GUISettingsDlg.cpp 27 Dec 2003 07:39:54 -0000 1.32
+++ GUISettingsDlg.cpp 27 Dec 2003 12:38:55 -0000 1.33
@@ -131,7 +131,24 @@
GetShowTool()->SetValue(show_toolbar);
GetShowMenu()->SetValue(show_menubar);
GetRememberLast()->SetValue(remember_last);
- GetStartPage()->SetStringSelection(_(startpage));
+
+ /**
+ * The StartPage choice box is generated from mainframe pagelist,
+ * so its safe to do this here w/o much error-checking...
+ * We iterate on the choice contents, look up the key string matching
+ * our client-data in choice and compare that keystring to what we
+ * have in m_config. If match is found, set selection to that one.
+ * The reason for all this mess is that we have *translated* strings
+ * in choice control, but *un-translated* strings in config.
+ */
+ for (short i=0;i<GetStartPage()->GetCount();i++) {
+ Page *p = (Page*)GetStartPage()->GetClientData(i);
+ wxString str = mainframe->GetPageList().Find(p)->GetKeyString();
+ if (str == startpage) {
+ GetStartPage()->SetStringSelection(p->short_title);
+ break;
+ }
+ }
switch (tool_align) {
case wxTB_HORIZONTAL: tool_align = 0; break;
@@ -197,10 +214,12 @@
Page *start_page = (Page*)GetStartPage()->GetClientData(
GetStartPage()->GetSelection()
);
- m_config->Write(
- wxT("StartPage"),
- mainframe->GetPageList().Find(start_page)->GetKeyString()
- );
+ if (start_page != NULL) {
+ wxPageListNode* nod = mainframe->GetPageList().Find(start_page);
+ if (nod != NULL) {
+ m_config->Write(wxT("StartPage"), nod->GetKeyString());
+ }
+ }
m_config->Write(wxT("Remember last"), GetRememberLast()->GetValue());
/* Iconsets data */
@@ -245,25 +264,7 @@
/* If iconset setting was changed update the images in gui */
if (old_icon_set != icon_set) {
- mainframe->Freeze();
-
- img->LoadImages();
- img->UpdateImages(mainframe);
- mainframe->CreateMyToolBar(true);
- serverwnd->SetLogBookImages();
- statisticswnd->GetTree()->GetTreeImages();
- statisticswnd->GetTree()->GenerateTree();
-
- wxIcon icon;
- icon.CopyFromBitmap(img->GetImage(wxT("mule")));
- mainframe->SetIcon(icon);
-#ifdef wxHAS_TASK_BAR_ICON
- #ifdef __WXMSW__
- systray->SetIcon(icon);
- #endif
-#endif
-
- mainframe->Thaw();
+ mainframe->UpdateImages();
}
}
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- MainDlg.cpp 27 Dec 2003 07:39:54 -0000 1.42
+++ MainDlg.cpp 27 Dec 2003 12:38:55 -0000 1.43
@@ -95,13 +95,14 @@
/******************************************************************************/
void DetachedFrame::OnClose(wxCommandEvent &event) {
cnt->content->Hide();
+ Hide();
if (wxGetApp().mainframe_active) {
cnt->content->Reparent(mainframe);
mainframe->AddPage(cnt, true);
} else {
delete cnt;
}
- Destroy();
+ event.Skip();
}
BEGIN_EVENT_TABLE(CMainDlg, wxFrame)
@@ -246,14 +247,19 @@
if (cur_page == NULL) {
start_up = true; /* Assume startup */
} else if (to_show == wxEmptyString) {
+ wxLogDebug(wxT("wxEmptyString passed for showing."));
return false; /* Nothing to show */
} else if (to_show == wxT("")) {
+ wxLogDebug(wxT("Empty string passed for showing."));
return false; /* Nothing to show */
} else if (pages.Find(cur_page)->GetKeyString() == to_show) {
+ wxLogDebug(wxT("Page `%s` is already shown!"), to_show.c_str());
return false; /* Already shown */
} else if (pages.Find(to_show) == NULL) {
+ wxLogDebug(wxT("Page `%s` not found."), to_show.c_str());
return false; /* Not found */
}
+
wxLogDebug(wxT("Setting active page to `%s`"), to_show.c_str());
Page *new_page = pages.Find(to_show)->GetData();
if (new_page == NULL) {
@@ -950,16 +956,23 @@
pages.DeleteObject(page);
pages.DeleteContents(false);
- delete GetToolBar()->RemoveTool(page->id);
+ if (GetToolBar() != NULL) {
+ delete GetToolBar()->RemoveTool(page->id);
+ }
+ if (GetMenuBar() != NULL) {
+ delete GetMenuBar()->FindItem(page->id);
+ }
GetToolBar()->Realize();
start_up = true;
if (!pages.IsEmpty()) {
+ cur_page = NULL;
SetActivePage(pages.Item(0)->GetKeyString());
}
UpdateToolBar();
UpdateMenuBar();
+ start_up = false;
}
/************************************************************** DetachCurPage */
@@ -970,6 +983,10 @@
/* from pages list. */
/******************************************************************************/
void CMainDlg::DetachCurPage() {
+ wxLogDebug(
+ wxT("Detaching page `%s`."),
+ GetCurPage()->short_title.c_str()
+ );
new DetachedFrame(
NULL, -1, GetCurPage()->short_title, wxDefaultPosition,
GetCurPage()->content->GetSize(), wxDEFAULT_FRAME_STYLE|
@@ -1041,4 +1058,41 @@
CreateMyToolBar();
CreateMyMenuBar();
}
+}
+
+/*************************************************************** UpdateImages */
+/* This method updates all images in GUI (including detached frames) by going */
+/* through the list of pages and calling images->UpdateImages on each of them.*/
+/******************************************************************************/
+void CMainDlg::UpdateImages() {
+ Freeze();
+
+ img->LoadImages();
+ wxLogDebug(wxT("Updating all pages images..."));
+ for (size_t i=0;i<pages.GetCount();i++) {
+ if (pages.IsEmpty()) {
+ break;
+ }
+ wxLogDebug(
+ wxT("Count = %d Current = %d"), pages.GetCount(), i
+ );
+ wxLogDebug(
+ wxT("Updating `%s` page images."),
+ pages[i]->short_title.c_str()
+ );
+ img->UpdateImages(pages[i]->content);
+ }
+ CreateMyToolBar(true);
+ serverwnd->SetLogBookImages();
+ statisticswnd->GetTree()->GetTreeImages();
+ statisticswnd->GetTree()->GenerateTree();
+
+ wxIcon icon;
+ icon.CopyFromBitmap(img->GetImage(wxT("mule")));
+ SetIcon(icon);
+#if defined(wxHAS_TASK_BAR_ICON) && defined(__WXMSW__)
+ systray->SetIcon(icon);
+#endif
+
+ Thaw();
}
Index: MainDlg.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- MainDlg.h 26 Dec 2003 11:36:32 -0000 1.17
+++ MainDlg.h 27 Dec 2003 12:38:55 -0000 1.18
@@ -134,6 +134,7 @@
bool updatebars = false
);
void AddPage(Page *page, bool updatebars = false); /* Adds new page */
+ void UpdateImages(); /* Updates images */
wxLocale &m_locale; /* Localization object */
/* These need to be publically available */
@@ -226,7 +227,7 @@
bool start_up; /* Should we remember last page between sessions */
wxFlexGridSizer *m_mainsizer; /* Main frame sizer */
Page *cur_page; /* Current active dialog page */
- PageList pages; /* List of loaded dialog pages */
+ PageList pages; /* List of dialog pages in this frame */
};
#endif
|
|
From: <mik...@us...> - 2003-12-27 11:56:09
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/server/network In directory sc8-pr-cvs1:/tmp/cvs-serv3326/src/server/network Modified Files: ServerSocket.cpp Log Message: 27/12/2003 Mikael Barbeaux * Fixed a Win32 compilation bug, should work perfectly now. Index: ServerSocket.cpp =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/server/network/ServerSocket.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ServerSocket.cpp 27 Dec 2003 11:42:39 -0000 1.4 +++ ServerSocket.cpp 27 Dec 2003 11:56:06 -0000 1.5 @@ -99,7 +99,7 @@ #ifdef _WIN32_ ::closesocket(server_id); #else - cout << "close " << ::close(server_id) << endl; + ::close(server_id); #endif // Change server socket state @@ -126,7 +126,8 @@ throw SocketException(CantCreateSockExcp, "Cannot create server socket.", "ServerSocket::validate"); int t = (int) true; - int ret = setsockopt(server_id, SOL_SOCKET, SO_REUSEADDR, &t, sizeof(t)); + int ret = setsockopt(server_id, SOL_SOCKET, SO_REUSEADDR, + (const char*) &t, sizeof(t)); if(ret < 0) throw SocketException(CantCreateSockExcp, "Cannot initialize socket option.", "ServerSocket::validate"); |
|
From: <mik...@us...> - 2003-12-27 11:56:09
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv3326 Modified Files: ChangeLog Log Message: 27/12/2003 Mikael Barbeaux * Fixed a Win32 compilation bug, should work perfectly now. Index: ChangeLog =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChangeLog 27 Dec 2003 11:42:39 -0000 1.12 +++ ChangeLog 27 Dec 2003 11:56:06 -0000 1.13 @@ -24,6 +24,7 @@ ----------------------------------------------------------- 27/12/2003 Mikael Barbeaux + * Fixed a Win32 compilation bug, should work perfectly now. * Fixed a bug about rebinding sockets on the same address. * Fixed a bug about accepting sockets and closing server. |