rhodes 2.4.1.beta.1 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,8 +41,16 @@ CDateTimePickerDialog::~CDateTimePickerDialog ()
41
41
 
42
42
  LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
43
43
  {
44
- SetWindowText(_T("Date"));
45
-
44
+ if ((m_title != NULL) && (strlen(m_title) > 0)) {
45
+ String title = m_title;
46
+ StringW title_w = convertToStringW(title);
47
+ //SetWindowText(title_w.c_str());
48
+ SetDlgItemText(ID_DATETIME_CAPTION, title_w.c_str());
49
+ //GetDlgItem(ID_DATETIME_CAPTION).SetWindowText(title_w.c_str());
50
+ }
51
+ else {
52
+ SetWindowText(_T("Date"));
53
+ }
46
54
  #if defined(_WIN32_WCE)
47
55
 
48
56
  SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
@@ -69,6 +77,12 @@ LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LP
69
77
  }
70
78
  DateTime_SetRange( GetDlgItem(IDC_DATE_CTRL), flags, times);
71
79
 
80
+ SYSTEMTIME start_time;
81
+ if (m_initialTime != 0) {
82
+ UnixTimeToSystemTime(m_initialTime, &start_time);
83
+ DateTime_SetSystemtime( GetDlgItem(IDC_DATE_CTRL), GDT_VALID, &start_time);
84
+ DateTime_SetSystemtime( GetDlgItem(IDC_TIME_CTRL), GDT_VALID, &start_time);
85
+ }
72
86
 
73
87
  GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));
74
88
 
@@ -81,6 +95,8 @@ LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LP
81
95
 
82
96
  DLG_ITEM_SET_FONT_BOLD (IDC_DATE_STATIC);
83
97
  DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);
98
+ DLG_ITEM_SET_FONT_BOLD (ID_DATETIME_CAPTION);
99
+
84
100
 
85
101
  if (m_format == CDateTimeMessage::FORMAT_DATE) {
86
102
  GetDlgItem(IDC_TIME_CTRL).ShowWindow(SW_HIDE);
@@ -155,7 +171,16 @@ CTimePickerDialog::~CTimePickerDialog ()
155
171
 
156
172
  LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
157
173
  {
158
- SetWindowText(_T("Date"));
174
+ if ((m_title != NULL) && (strlen(m_title) > 0)) {
175
+ String title = m_title;
176
+ StringW title_w = convertToStringW(title);
177
+ //SetWindowText(title_w.c_str());
178
+ //GetDlgItem(IDC_TIME_CTRL).SetWindowText(title_w.c_str());
179
+ SetDlgItemText(ID_TIME_CAPTION, title_w.c_str());
180
+ }
181
+ else {
182
+ SetWindowText(_T("Date"));
183
+ }
159
184
 
160
185
  #if defined(_WIN32_WCE)
161
186
 
@@ -169,6 +194,12 @@ LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
169
194
  RHO_ASSERT(SHCreateMenuBar(&mbi));
170
195
  GotoDlgCtrl(GetDlgItem(IDC_TIME_CTRL));
171
196
 
197
+ SYSTEMTIME start_time;
198
+ if (m_initialTime != 0) {
199
+ UnixTimeToSystemTime(m_initialTime, &start_time);
200
+ DateTime_SetSystemtime( GetDlgItem(IDC_TIME_CTRL), GDT_VALID, &start_time);
201
+ }
202
+
172
203
  #else
173
204
 
174
205
  CreateButtons();
@@ -177,6 +208,7 @@ LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
177
208
  #endif
178
209
 
179
210
  DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);
211
+ DLG_ITEM_SET_FONT_BOLD (ID_TIME_CAPTION);
180
212
 
181
213
  return FALSE;
182
214
  }
@@ -203,15 +235,24 @@ LRESULT CTimePickerDialog::OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndC
203
235
  }
204
236
 
205
237
 
238
+ static char ourTitle[1024];
239
+
206
240
  void choose_datetime_with_range(char* callback, char* title,
207
241
  long initial_time, int format, char* data,
208
242
  long min_time, long max_time)
209
243
  {
210
244
  LOG(INFO) + __FUNCTION__ + "callback = " + callback + " title = " + title;
211
245
 
246
+ if (title != NULL) {
247
+ strcpy(ourTitle, title);
248
+ }
249
+ else {
250
+ strcpy(ourTitle, "");
251
+ }
252
+
212
253
  HWND main_wnd = getMainWnd();
213
254
  ::PostMessage(main_wnd, WM_DATETIME_PICKER, 0,
214
- (LPARAM)new CDateTimeMessage(callback, title, initial_time, format, data, min_time, max_time));
255
+ (LPARAM)new CDateTimeMessage(callback, ourTitle, initial_time, format, data, min_time, max_time));
215
256
  }
216
257
 
217
258
 
@@ -193,22 +193,25 @@ BEGIN
193
193
  PUSHBUTTON "Cancel",IDCANCEL,97,87,50,14
194
194
  END
195
195
 
196
- IDD_DATETIME_PICKER DIALOG 0, 0, 172, 186
197
- STYLE DS_SETFONT | WS_POPUP | WS_SYSMENU
196
+ IDD_DATETIME_PICKER DIALOGEX 0, 0, 172, 186
197
+ STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
198
+ CAPTION "DateTime Picker"
198
199
  FONT 8, "Microsoft Sans Serif"
199
200
  BEGIN
200
- CONTROL "",IDC_TIME_CTRL,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,7,36,143,15
201
- CONTROL "",IDC_DATE_CTRL,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,7,11,143,15
202
- LTEXT "Time:",IDC_TIME_STATIC,7,26,25,10
203
- LTEXT "Date:",IDC_DATE_STATIC,7,3,27,8
201
+ CONTROL "",IDC_TIME_CTRL,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,7,54,143,15
202
+ CONTROL "",IDC_DATE_CTRL,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,7,29,143,15
203
+ LTEXT "Time:",IDC_TIME_STATIC,7,44,25,10
204
+ LTEXT "Date:",IDC_DATE_STATIC,7,21,27,8
205
+ LTEXT "DateTime Picker",ID_DATETIME_CAPTION,9,6,141,8
204
206
  END
205
207
 
206
- IDD_TIME_PICKER DIALOG 0, 0, 172, 186
208
+ IDD_TIME_PICKER DIALOGEX 0, 0, 172, 186
207
209
  STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU
208
210
  FONT 8, "MS Shell Dlg"
209
211
  BEGIN
210
- CONTROL "",IDC_TIME_CTRL,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,7,11,143,15
211
- LTEXT "Time:",IDC_TIME_STATIC,7,3,27,8
212
+ CONTROL "",IDC_TIME_CTRL,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,7,29,143,15
213
+ LTEXT "Time:",IDC_TIME_STATIC,7,21,27,8
214
+ LTEXT "Time Picker",ID_TIME_CAPTION,9,6,142,8
212
215
  END
213
216
 
214
217
  IDD_BLUETOOTH_DISCOVER DIALOG 0, 0, 172, 186
@@ -35,6 +35,7 @@
35
35
  #define IDC_EDIT1 1006
36
36
  #define IDC_MSGCLASSES 1006
37
37
  #define IDC_EDIT2 1007
38
+ #define ID_DATETIME_CAPTION 1007
38
39
  #define IDC_MSGEXCLUDE 1008
39
40
  #define IDC_SYNCSTATUS 1009
40
41
  #define IDC_BUTTON2 1010
@@ -46,6 +47,7 @@
46
47
  #define IDC_BT_LIST 1020
47
48
  #define IDC_SLIDER1 1020
48
49
  #define IDC_SLIDER_ZOOM 1020
50
+ #define ID_TIME_CAPTION 1021
49
51
  #define IDC_BUTTON1 1022
50
52
  #define IDC_BT_CANCEL 1022
51
53
  #define IDC_BT_STATIC 1023
@@ -87,7 +89,7 @@
87
89
  #ifndef APSTUDIO_READONLY_SYMBOLS
88
90
  #define _APS_NEXT_RESOURCE_VALUE 125
89
91
  #define _APS_NEXT_COMMAND_VALUE 40031
90
- #define _APS_NEXT_CONTROL_VALUE 1021
92
+ #define _APS_NEXT_CONTROL_VALUE 1022
91
93
  #define _APS_NEXT_SYMED_VALUE 111
92
94
  #endif
93
95
  #endif
@@ -3,7 +3,7 @@ require "lib/rhodes.rb"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = %q{rhodes}
6
- s.version = "2.4.1.beta.1"
6
+ s.version = Rhodes::VERSION
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Rhomobile"]
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhodes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196393
5
- prerelease: 6
4
+ hash: 29
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 4
9
9
  - 1
10
- - beta
11
- - 1
12
- version: 2.4.1.beta.1
10
+ version: 2.4.1
13
11
  platform: ruby
14
12
  authors:
15
13
  - Rhomobile
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2011-04-20 00:00:00 Z
18
+ date: 2011-04-21 00:00:00 Z
21
19
  dependencies:
22
20
  - !ruby/object:Gem::Dependency
23
21
  name: templater