rhodes 3.3.2 → 3.3.3.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/Manifest.txt +4 -0
- data/Rakefile +2 -2
- data/doc/device-caps.txt +2 -2
- data/doc/rhodes-api.txt +0 -3
- data/installer/rhostudio-moto.nsi +14 -48
- data/installer/rhostudio.nsi +12 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +167 -46
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +15 -15
- data/platform/android/build/android.rake +36 -24
- data/platform/iphone/Classes/MapView/GoogleGeocoder.h +2 -1
- data/platform/iphone/Classes/MapView/GoogleGeocoder.m +44 -6
- data/platform/iphone/Classes/MapView/MapViewController.m +10 -1
- data/platform/shared/common/ExtManager.cpp +103 -0
- data/platform/shared/common/ExtManager.h +101 -0
- data/platform/shared/common/RhodesApp.cpp +3 -2
- data/platform/shared/common/RhodesApp.h +3 -0
- data/platform/shared/common/map/GeocodingMapEngine.cpp +24 -1
- data/platform/shared/common/map/GeocodingMapEngine.h +3 -0
- data/platform/shared/logging/RhoLogConf.cpp +2 -1
- data/platform/shared/net/HttpServer.cpp +1 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +6 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +8 -0
- data/platform/wm/rhodes/DateTimePicker.cpp +38 -8
- data/platform/wm/rhodes/DateTimePicker.h +4 -0
- data/platform/wm/rhodes/LogOptionsDlg.cpp +16 -0
- data/platform/wm/rhodes/LogOptionsDlg.h +3 -2
- data/platform/wm/rhodes/LogView.cpp +21 -1
- data/platform/wm/rhodes/LogView.h +3 -1
- data/platform/wm/rhodes/MainWindow.cpp +1 -2
- data/platform/wm/rhodes/MapView/MapViewManager.cpp +16 -2
- data/platform/wm/rhodes/MapView/MapViewManager.h +2 -0
- data/platform/wm/rhodes/Rhodes.cpp +2 -1
- data/platform/wm/rhodes/Rhodes.rc +7 -6
- data/platform/wm/rhodes/rho/rubyext/RhoSignature.cpp +303 -147
- data/platform/wm/rhodes/rho/rubyext/RhoSignature.h +22 -16
- data/platform/wm/rhoelements.sln +3 -3
- data/platform/wp7/RhoRubyLib/common/RhoFile.cs +16 -0
- data/platform/wp7/RhoRubyLib/net/HttpServer.cs +5 -5
- data/platform/wp7/RhoRubyLib/views/RhoView.xaml +1 -1
- data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +36 -3
- data/rakefile.rb +2 -2
- data/res/generators/rhogen.rb +5 -0
- data/res/generators/templates/application/app/layout.erb +6 -2
- data/res/generators/templates/application/public/js/jquery-wp7-patch.js +149 -0
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Montana.sln +29 -7
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Montana.vcproj +316 -0
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/montana.vsprops +15 -0
- data/version +1 -1
- metadata +11 -5
@@ -348,6 +348,7 @@ void CRhodesApp::run()
|
|
348
348
|
|
349
349
|
LOG(INFO) + "RhodesApp thread shutdown";
|
350
350
|
|
351
|
+
getExtManager().close();
|
351
352
|
rubyext::CGeoLocation::Destroy();
|
352
353
|
sync::CSyncThread::Destroy();
|
353
354
|
|
@@ -855,7 +856,7 @@ int CRhodesApp::determineFreeListeningPort()
|
|
855
856
|
serv_addr.sin_len = sizeof(serv_addr);
|
856
857
|
#endif
|
857
858
|
serv_addr.sin_family = AF_INET;
|
858
|
-
serv_addr.sin_addr.s_addr = htonl(
|
859
|
+
serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
859
860
|
serv_addr.sin_port = htons((short)listenPort);
|
860
861
|
|
861
862
|
LOG(INFO) + "Trying to bind of " + listenPort + " port...";
|
@@ -869,7 +870,7 @@ int CRhodesApp::determineFreeListeningPort()
|
|
869
870
|
serv_addr.sin_len = sizeof(serv_addr);
|
870
871
|
#endif
|
871
872
|
serv_addr.sin_family = AF_INET;
|
872
|
-
serv_addr.sin_addr.s_addr = htonl(
|
873
|
+
serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
873
874
|
serv_addr.sin_port = htons(0);
|
874
875
|
|
875
876
|
LOG(INFO) + "Trying to bind on dynamic port...";
|
@@ -37,6 +37,7 @@
|
|
37
37
|
#include "net/HttpServer.h"
|
38
38
|
#include "SplashScreen.h"
|
39
39
|
#include "AppMenu.h"
|
40
|
+
#include "ExtManager.h"
|
40
41
|
|
41
42
|
#undef DEFAULT_LOGCATEGORY
|
42
43
|
#define DEFAULT_LOGCATEGORY "RhodesApp"
|
@@ -60,6 +61,7 @@ private:
|
|
60
61
|
CSplashScreen m_oSplashScreen;
|
61
62
|
CAppMenu m_oAppMenu;
|
62
63
|
CRhoTimer m_oTimer;
|
64
|
+
CExtManager m_oExtManager;
|
63
65
|
|
64
66
|
String m_strLoadingPagePath, m_strLoadingPngPath;
|
65
67
|
String m_strStartUrl, m_strOptionsUrl, m_strRhobundleReloadUrl;//, m_strFirstStartUrl;
|
@@ -136,6 +138,7 @@ public:
|
|
136
138
|
CAppMenu& getAppMenu (void) { return m_oAppMenu; }
|
137
139
|
CSplashScreen& getSplashScreen(){return m_oSplashScreen;}
|
138
140
|
CRhoTimer& getTimer(){ return m_oTimer; }
|
141
|
+
CExtManager& getExtManager(){ return m_oExtManager; }
|
139
142
|
|
140
143
|
boolean sendLog(const String& strCallbackUrl);
|
141
144
|
|
@@ -388,4 +388,27 @@ void rho_geoimpl_do_geocoding(rho_param* p, const char* callback, int callback_t
|
|
388
388
|
}
|
389
389
|
}
|
390
390
|
|
391
|
-
|
391
|
+
void rho_geocoding_parse_json_responce(const char* data, char* adress_buf, int max_adress_length, double* latitude, double* longitude, int* is_adress_ok, int* is_coords_ok) {
|
392
|
+
|
393
|
+
rho::String adress;
|
394
|
+
bool coord_ok = false;
|
395
|
+
bool adress_ok = false;
|
396
|
+
bool is_result = rho::common::map::parse_json(data, latitude, longitude, &adress, &coord_ok, &adress_ok);
|
397
|
+
|
398
|
+
*is_adress_ok = 0;
|
399
|
+
*is_coords_ok = 0;
|
400
|
+
|
401
|
+
if (is_result) {
|
402
|
+
if (adress_ok) {
|
403
|
+
if (adress.length() > (max_adress_length-1)) {
|
404
|
+
adress = adress.substr(0, max_adress_length-1);
|
405
|
+
}
|
406
|
+
strcpy(adress_buf, adress.c_str());
|
407
|
+
*is_adress_ok = 1;
|
408
|
+
}
|
409
|
+
if (coord_ok) {
|
410
|
+
*is_coords_ok = 1;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
414
|
+
}
|
@@ -101,6 +101,9 @@ extern "C" {
|
|
101
101
|
|
102
102
|
|
103
103
|
void rho_geoimpl_do_geocoding(rho_param* p, const char* callback, int callback_tag);
|
104
|
+
|
105
|
+
void rho_geocoding_parse_json_responce(const char* data, char* adress_buf, int max_adress_length, double* latitude, double* longitude, int* is_adress_ok, int* is_coords_ok);
|
106
|
+
|
104
107
|
#ifdef __cplusplus
|
105
108
|
}
|
106
109
|
#endif
|
@@ -78,7 +78,8 @@ void LogSettings::closeRemoteLog()
|
|
78
78
|
|
79
79
|
void LogSettings::initRemoteLog()
|
80
80
|
{
|
81
|
-
|
81
|
+
|
82
|
+
#if defined( OS_PLATFORM_MOTCE )// && !defined (APP_BUILD_CAPABILITY_BARCODE)
|
82
83
|
//TODO: remote log prevent loading app - stuck on loading.png when no barcode. very strange!
|
83
84
|
OSVERSIONINFO osv = {0};
|
84
85
|
osv.dwOSVersionInfoSize = sizeof(osv);
|
@@ -381,7 +381,7 @@ bool CHttpServer::init()
|
|
381
381
|
memset(&sa, 0, sizeof(sa));
|
382
382
|
sa.sin_family = AF_INET;
|
383
383
|
sa.sin_port = htons((uint16_t)m_port);
|
384
|
-
sa.sin_addr.s_addr =
|
384
|
+
sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
385
385
|
if (bind(m_listener, (const sockaddr *)&sa, sizeof(sa)) == SOCKET_ERROR) {
|
386
386
|
RAWLOG_ERROR2("Can not bind to port %d: %d", m_port, RHO_NET_ERROR_CODE);
|
387
387
|
close_listener();
|
@@ -70,6 +70,7 @@ extern void Init_NavBar(void);
|
|
70
70
|
extern void Init_RhoEvent(void);
|
71
71
|
extern void Init_Calendar(void);
|
72
72
|
extern void Init_Extensions(void);
|
73
|
+
extern void init_rhoext_Signature();
|
73
74
|
|
74
75
|
//RhoSupport extension
|
75
76
|
extern void Init_RhoSupport(void);
|
@@ -220,7 +221,12 @@ void RhoRubyStart()
|
|
220
221
|
Init_WebView();
|
221
222
|
Init_RhoConf();
|
222
223
|
Init_Alert();
|
224
|
+
#if defined(WINDOWS_PLATFORM)
|
225
|
+
init_rhoext_Signature();
|
226
|
+
#else
|
223
227
|
Init_SignatureCapture();
|
228
|
+
#endif
|
229
|
+
|
224
230
|
Init_RhoBluetooth();
|
225
231
|
Init_RhodesNativeViewManager();
|
226
232
|
Init_Camera();
|
@@ -2319,6 +2319,14 @@
|
|
2319
2319
|
RelativePath="..\..\shared\common\BundleManager.cpp"
|
2320
2320
|
>
|
2321
2321
|
</File>
|
2322
|
+
<File
|
2323
|
+
RelativePath="..\..\shared\common\ExtManager.cpp"
|
2324
|
+
>
|
2325
|
+
</File>
|
2326
|
+
<File
|
2327
|
+
RelativePath="..\..\shared\common\ExtManager.h"
|
2328
|
+
>
|
2329
|
+
</File>
|
2322
2330
|
<File
|
2323
2331
|
RelativePath="..\..\shared\common\InputStream.h"
|
2324
2332
|
>
|
@@ -51,7 +51,7 @@ extern "C" int rho_sys_get_screen_width();
|
|
51
51
|
|
52
52
|
extern "C" HWND getMainWnd();
|
53
53
|
|
54
|
-
CDateTimePickerDialog::CDateTimePickerDialog (const CDateTimeMessage *msg)
|
54
|
+
CDateTimePickerDialog::CDateTimePickerDialog (const CDateTimeMessage *msg) : m_hWndCommandBar(0)
|
55
55
|
{
|
56
56
|
m_returnTime = 0;
|
57
57
|
m_format = msg->m_format;
|
@@ -65,6 +65,16 @@ CDateTimePickerDialog::~CDateTimePickerDialog ()
|
|
65
65
|
{
|
66
66
|
}
|
67
67
|
|
68
|
+
LRESULT CDateTimePickerDialog::OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
|
69
|
+
{
|
70
|
+
if ( m_hWndCommandBar )
|
71
|
+
::DestroyWindow(m_hWndCommandBar);
|
72
|
+
|
73
|
+
m_hWndCommandBar = 0;
|
74
|
+
|
75
|
+
return FALSE;
|
76
|
+
}
|
77
|
+
|
68
78
|
LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
69
79
|
{
|
70
80
|
if ((m_title != NULL) && (strlen(m_title) > 0)) {
|
@@ -112,10 +122,15 @@ LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LP
|
|
112
122
|
|
113
123
|
GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));
|
114
124
|
|
115
|
-
#
|
125
|
+
#elif defined( OS_PLATFORM_MOTCE )
|
126
|
+
|
127
|
+
//CreateButtons();
|
128
|
+
//GotoDlgCtrl(m_btnOk);
|
129
|
+
SetWindowLong(GWL_STYLE,(long)WS_BORDER);
|
130
|
+
m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
|
131
|
+
CommandBar_AddAdornments(m_hWndCommandBar, CMDBAR_OK, 0 );
|
116
132
|
|
117
|
-
|
118
|
-
GotoDlgCtrl(m_btnOk);
|
133
|
+
CommandBar_Show(m_hWndCommandBar, TRUE);
|
119
134
|
|
120
135
|
#endif
|
121
136
|
|
@@ -183,7 +198,7 @@ LRESULT CDateTimePickerDialog::OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*h
|
|
183
198
|
}
|
184
199
|
|
185
200
|
|
186
|
-
CTimePickerDialog::CTimePickerDialog (const CDateTimeMessage *msg)
|
201
|
+
CTimePickerDialog::CTimePickerDialog (const CDateTimeMessage *msg) : m_hWndCommandBar(0)
|
187
202
|
{
|
188
203
|
m_returnTime = 0;
|
189
204
|
m_format = msg->m_format;
|
@@ -195,6 +210,16 @@ CTimePickerDialog::~CTimePickerDialog ()
|
|
195
210
|
{
|
196
211
|
}
|
197
212
|
|
213
|
+
LRESULT CTimePickerDialog::OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
|
214
|
+
{
|
215
|
+
if ( m_hWndCommandBar )
|
216
|
+
::DestroyWindow(m_hWndCommandBar);
|
217
|
+
|
218
|
+
m_hWndCommandBar = 0;
|
219
|
+
|
220
|
+
return FALSE;
|
221
|
+
}
|
222
|
+
|
198
223
|
LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
199
224
|
{
|
200
225
|
if ((m_title != NULL) && (strlen(m_title) > 0)) {
|
@@ -226,10 +251,15 @@ LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
|
|
226
251
|
DateTime_SetSystemtime( GetDlgItem(IDC_TIME_CTRL), GDT_VALID, &start_time);
|
227
252
|
}
|
228
253
|
|
229
|
-
#
|
254
|
+
#elif defined( OS_PLATFORM_MOTCE )
|
255
|
+
|
256
|
+
//CreateButtons();
|
257
|
+
//GotoDlgCtrl(m_btnOk);
|
258
|
+
SetWindowLong(GWL_STYLE,(long)WS_BORDER);
|
259
|
+
m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
|
260
|
+
CommandBar_AddAdornments(m_hWndCommandBar, CMDBAR_OK, 0 );
|
230
261
|
|
231
|
-
|
232
|
-
GotoDlgCtrl(m_btnOk);
|
262
|
+
CommandBar_Show(m_hWndCommandBar, TRUE);
|
233
263
|
|
234
264
|
#endif
|
235
265
|
|
@@ -97,6 +97,7 @@ public:
|
|
97
97
|
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
98
98
|
LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
99
99
|
LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
100
|
+
LRESULT OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
100
101
|
private:
|
101
102
|
int m_format;
|
102
103
|
time_t m_returnTime;
|
@@ -104,6 +105,7 @@ private:
|
|
104
105
|
const char *m_title;
|
105
106
|
time_t m_min_time;
|
106
107
|
time_t m_max_time;
|
108
|
+
HWND m_hWndCommandBar;
|
107
109
|
};
|
108
110
|
|
109
111
|
|
@@ -132,12 +134,14 @@ private:
|
|
132
134
|
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
133
135
|
LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
134
136
|
LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
137
|
+
LRESULT OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
135
138
|
|
136
139
|
private:
|
137
140
|
int m_format;
|
138
141
|
time_t m_returnTime;
|
139
142
|
time_t m_initialTime;
|
140
143
|
const char *m_title;
|
144
|
+
HWND m_hWndCommandBar;
|
141
145
|
};
|
142
146
|
|
143
147
|
|
@@ -29,6 +29,16 @@
|
|
29
29
|
|
30
30
|
#include "logging/RhoLog.h"
|
31
31
|
|
32
|
+
LRESULT CLogOptionsDlg::OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
|
33
|
+
{
|
34
|
+
if ( m_hWndCommandBar )
|
35
|
+
::DestroyWindow(m_hWndCommandBar);
|
36
|
+
|
37
|
+
m_hWndCommandBar = 0;
|
38
|
+
|
39
|
+
return FALSE;
|
40
|
+
}
|
41
|
+
|
32
42
|
LRESULT CLogOptionsDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
33
43
|
{
|
34
44
|
#if defined( OS_WINCE ) && !defined (OS_PLATFORM_MOTCE)
|
@@ -44,6 +54,12 @@ LRESULT CLogOptionsDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
|
|
44
54
|
mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
|
45
55
|
mbi.dwFlags = SHCMBF_HMENU;
|
46
56
|
SHCreateMenuBar(&mbi);
|
57
|
+
#else
|
58
|
+
SetWindowLong(GWL_STYLE,(long)WS_BORDER);
|
59
|
+
|
60
|
+
m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
|
61
|
+
CommandBar_AddAdornments(m_hWndCommandBar, CMDBAR_OK, 0 );
|
62
|
+
CommandBar_Show(m_hWndCommandBar, TRUE);
|
47
63
|
#endif //OS_WINCE
|
48
64
|
|
49
65
|
SendDlgItemMessage(IDC_CBXLEVELS,CB_ADDSTRING,0, (LPARAM)_T("Trace"));
|
@@ -33,7 +33,7 @@ class CLogOptionsDlg :
|
|
33
33
|
public CDialogImpl<CLogOptionsDlg>
|
34
34
|
{
|
35
35
|
public:
|
36
|
-
|
36
|
+
CLogOptionsDlg() : m_hWndCommandBar(0) {}
|
37
37
|
~CLogOptionsDlg(){}
|
38
38
|
|
39
39
|
#if defined(OS_WINDOWS)
|
@@ -49,12 +49,13 @@ BEGIN_MSG_MAP(CLogOptionsDlg)
|
|
49
49
|
END_MSG_MAP()
|
50
50
|
|
51
51
|
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
52
|
-
|
52
|
+
LRESULT OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
|
53
53
|
LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
54
54
|
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
55
55
|
|
56
56
|
private:
|
57
57
|
void saveOptions();
|
58
|
+
HWND m_hWndCommandBar;
|
58
59
|
};
|
59
60
|
|
60
61
|
|
@@ -39,6 +39,16 @@
|
|
39
39
|
rho::common::CMutex CLogView::m_ViewFlushLock;
|
40
40
|
#endif
|
41
41
|
|
42
|
+
LRESULT CLogView::OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
|
43
|
+
{
|
44
|
+
if ( m_hWndCommandBar )
|
45
|
+
::DestroyWindow(m_hWndCommandBar);
|
46
|
+
|
47
|
+
m_hWndCommandBar = 0;
|
48
|
+
|
49
|
+
return FALSE;
|
50
|
+
}
|
51
|
+
|
42
52
|
LRESULT CLogView::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
43
53
|
{
|
44
54
|
#if defined( OS_WINCE )
|
@@ -58,6 +68,16 @@ LRESULT CLogView::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|
58
68
|
SHCreateMenuBar(&mbi);
|
59
69
|
|
60
70
|
// SendDlgItemMessage(IDC_LOGEDIT,WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT),0);
|
71
|
+
#else
|
72
|
+
SetWindowLong(GWL_STYLE,(long)WS_BORDER);
|
73
|
+
ShowWindow(SW_MAXIMIZE);
|
74
|
+
|
75
|
+
m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
|
76
|
+
CommandBar_AddAdornments(m_hWndCommandBar, 0, 0 );
|
77
|
+
HMENU menu = LoadMenu(0, MAKEINTRESOURCE(IDR_LOGMENUBAR));
|
78
|
+
CommandBar_InsertMenubarEx(m_hWndCommandBar, 0, (LPTSTR)menu, 0);
|
79
|
+
CommandBar_DrawMenuBar(m_hWndCommandBar, 0);
|
80
|
+
CommandBar_Show(m_hWndCommandBar, TRUE);
|
61
81
|
#endif
|
62
82
|
|
63
83
|
loadLogText();
|
@@ -156,7 +176,7 @@ LRESULT CLogView::OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL&
|
|
156
176
|
}
|
157
177
|
::MoveWindow( GetDlgItem(IDC_LOGEDIT), 0,0, LOWORD(lParam), HIWORD(lParam), TRUE );
|
158
178
|
#else
|
159
|
-
::MoveWindow( GetDlgItem(IDC_LOGEDIT), 0,
|
179
|
+
::MoveWindow( GetDlgItem(IDC_LOGEDIT), 0,CommandBar_Height( m_hWndCommandBar ), LOWORD(lParam), HIWORD(lParam), TRUE );
|
160
180
|
#endif
|
161
181
|
return 0;
|
162
182
|
}
|
@@ -89,11 +89,12 @@ class CLogView :
|
|
89
89
|
#endif
|
90
90
|
{
|
91
91
|
HBRUSH m_hBrush;
|
92
|
+
HWND m_hWndCommandBar;
|
92
93
|
|
93
94
|
void loadLogText();
|
94
95
|
public:
|
95
96
|
CLogView() :
|
96
|
-
m_hBrush ( NULL )
|
97
|
+
m_hBrush ( NULL ), m_hWndCommandBar(0)
|
97
98
|
#if defined(OS_WINDOWS)
|
98
99
|
, m_pFindDialog(NULL), m_findText(L""), m_findParams(FR_DOWN)
|
99
100
|
#endif
|
@@ -155,6 +156,7 @@ END_MSG_MAP()
|
|
155
156
|
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
|
156
157
|
|
157
158
|
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
159
|
+
LRESULT OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
158
160
|
|
159
161
|
LRESULT OnBack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
160
162
|
LRESULT OnOptions(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
@@ -47,7 +47,6 @@
|
|
47
47
|
#include "ext/rho/rhoruby.h"
|
48
48
|
#include "rubyext/WebView.h"
|
49
49
|
#include "camera/Camera.h"
|
50
|
-
#include "rubyext/RhoSignature.h"
|
51
50
|
#include "sync/SyncThread.h"
|
52
51
|
#include "common/RhoFilePath.h"
|
53
52
|
#include "common/RhoFile.h"
|
@@ -927,7 +926,7 @@ bool Rhodes_WM_ProcessBeforeNavigate(LPCTSTR url)
|
|
927
926
|
{
|
928
927
|
LOG(TRACE) + "OnBeforeNavigate2: " + url;
|
929
928
|
|
930
|
-
|
929
|
+
RHODESAPP().getExtManager().onBeforeNavigate();
|
931
930
|
|
932
931
|
const wchar_t *to_remove;
|
933
932
|
if ( (to_remove = wcsstr(url, L"rho_open_target=_blank")) != 0)
|
@@ -78,7 +78,7 @@ class DrawingDeviceMapViewImpl : public WmDrawingDeviceImpl {
|
|
78
78
|
static DrawingDeviceMapViewImpl ourDrawingDevice;
|
79
79
|
|
80
80
|
|
81
|
-
CRhoMapViewDlg::CRhoMapViewDlg () : m_hBrush(0), m_hMemBitmap(0)
|
81
|
+
CRhoMapViewDlg::CRhoMapViewDlg () : m_hBrush(0), m_hMemBitmap(0), m_hWndCommandBar(0)
|
82
82
|
{
|
83
83
|
}
|
84
84
|
|
@@ -86,6 +86,16 @@ CRhoMapViewDlg::~CRhoMapViewDlg ()
|
|
86
86
|
{
|
87
87
|
}
|
88
88
|
|
89
|
+
LRESULT CRhoMapViewDlg::OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
|
90
|
+
{
|
91
|
+
if ( m_hWndCommandBar )
|
92
|
+
::DestroyWindow(m_hWndCommandBar);
|
93
|
+
|
94
|
+
m_hWndCommandBar = 0;
|
95
|
+
|
96
|
+
return FALSE;
|
97
|
+
}
|
98
|
+
|
89
99
|
LRESULT CRhoMapViewDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
90
100
|
{
|
91
101
|
SetWindowText(_T("MapView"));
|
@@ -103,7 +113,11 @@ LRESULT CRhoMapViewDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
|
|
103
113
|
mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
|
104
114
|
|
105
115
|
SHCreateMenuBar(&mbi);
|
106
|
-
#
|
116
|
+
#else
|
117
|
+
m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
|
118
|
+
CommandBar_AddAdornments(m_hWndCommandBar, 0, 0 );
|
119
|
+
CommandBar_Show(m_hWndCommandBar, TRUE);
|
120
|
+
#endif //OS_WINCE
|
107
121
|
|
108
122
|
//::SetWindowLong(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd,
|
109
123
|
// GWL_EXSTYLE,
|
@@ -132,6 +132,7 @@ class CRhoMapViewDlg : public //CDialog
|
|
132
132
|
{
|
133
133
|
HBRUSH m_hBrush;
|
134
134
|
HBITMAP m_hMemBitmap;
|
135
|
+
HWND m_hWndCommandBar;
|
135
136
|
public:
|
136
137
|
CRhoMapViewDlg ();
|
137
138
|
~CRhoMapViewDlg ();
|
@@ -155,6 +156,7 @@ public:
|
|
155
156
|
|
156
157
|
public:
|
157
158
|
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
159
|
+
LRESULT OnDestroyDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
|
158
160
|
LRESULT OnDraw(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
159
161
|
LRESULT OnSliderScroll(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
160
162
|
LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|