aboutsummaryrefslogtreecommitdiffstats
path: root/rfbplayer
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-03-20 12:01:54 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-03-20 12:01:54 +0000
commitc3950071536c5086f9c3a5e18037a6ed2ab25321 (patch)
tree8e167fd1a9ab7a7ba1e6939f626ba27000bf5b46 /rfbplayer
parent8c37e421037901996aba857e8b893111829a0f1b (diff)
downloadtigervnc-c3950071536c5086f9c3a5e18037a6ed2ab25321.tar.gz
tigervnc-c3950071536c5086f9c3a5e18037a6ed2ab25321.zip
Added bigEndian flag support to Options dialog.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@261 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'rfbplayer')
-rw-r--r--rfbplayer/OptionsDialog.h28
-rw-r--r--rfbplayer/resource.h3
-rw-r--r--rfbplayer/rfbplayer.rc37
3 files changed, 39 insertions, 29 deletions
diff --git a/rfbplayer/OptionsDialog.h b/rfbplayer/OptionsDialog.h
index 8a9acfd9..a7052c12 100644
--- a/rfbplayer/OptionsDialog.h
+++ b/rfbplayer/OptionsDialog.h
@@ -43,36 +43,41 @@ protected:
0, (LPARAM)(LPCTSTR)(((*supportedPF)[i]).format_name));
}
SendMessage(combo, CB_SETCURSEL, options->pixelFormatIndex + 1, 0);
- if (options->askPixelFormat) {
- setItemChecked(IDC_ASK_PF, true);
- enableItem(IDC_PIXELFORMAT, false);
- }
setItemChecked(IDC_ACCEPT_BELL, options->acceptBell);
setItemChecked(IDC_ACCEPT_CUT_TEXT, options->acceptCutText);
setItemChecked(IDC_AUTO_STORE_PARAM, options->autoStoreSettings);
setItemChecked(IDC_AUTOPLAY, options->autoPlay);
+ setItemChecked(IDC_BIG_ENDIAN, options->bigEndianFlag);
+ if (options->askPixelFormat) {
+ setItemChecked(IDC_ASK_PF, true);
+ enableItem(IDC_PIXELFORMAT, false);
+ enableItem(IDC_BIG_ENDIAN, false);
+ }
}
virtual bool onOk() {
- if (!isItemChecked(IDC_ASK_PF)) {
+ options->askPixelFormat = isItemChecked(IDC_ASK_PF);
+ options->acceptBell = isItemChecked(IDC_ACCEPT_BELL);
+ options->acceptCutText = isItemChecked(IDC_ACCEPT_CUT_TEXT);
+ options->autoStoreSettings = isItemChecked(IDC_AUTO_STORE_PARAM);
+ options->autoPlay = isItemChecked(IDC_AUTOPLAY);
+ options->bigEndianFlag = isItemChecked(IDC_BIG_ENDIAN);
+ options->writeToRegistry();
+ if (!options->askPixelFormat) {
options->pixelFormatIndex = SendMessage(combo, CB_GETCURSEL, 0, 0) - 1;
if (options->pixelFormatIndex < 0) {
options->autoDetectPF = true;
} else {
options->setPF(&((*supportedPF)[options->pixelFormatIndex]).PF);
+ options->pixelFormat.bigEndian = options->bigEndianFlag;
options->autoDetectPF = false;
}
}
- options->askPixelFormat = isItemChecked(IDC_ASK_PF);
- options->acceptBell = isItemChecked(IDC_ACCEPT_BELL);
- options->acceptCutText = isItemChecked(IDC_ACCEPT_CUT_TEXT);
- options->autoStoreSettings = isItemChecked(IDC_AUTO_STORE_PARAM);
- options->autoPlay = isItemChecked(IDC_AUTOPLAY);
- options->writeToRegistry();
return true;
}
virtual bool onCommand(int item, int cmd) {
if (item == IDC_ASK_PF) {
enableItem(IDC_PIXELFORMAT, !isItemChecked(IDC_ASK_PF));
+ enableItem(IDC_BIG_ENDIAN, !isItemChecked(IDC_ASK_PF));
}
if (item == IDC_DEFAULT) {
SendMessage(combo, CB_SETCURSEL, DEFAULT_PF_INDEX, 0);
@@ -82,6 +87,7 @@ protected:
setItemChecked(IDC_ACCEPT_CUT_TEXT, DEFAULT_ACCEPT_CUT_TEXT);
setItemChecked(IDC_AUTO_STORE_PARAM, DEFAULT_STORE_SETTINGS);
setItemChecked(IDC_AUTOPLAY, DEFAULT_AUTOPLAY);
+ setItemChecked(IDC_BIG_ENDIAN, DEFAULT_BIG_ENDIAN);
}
return false;
}
diff --git a/rfbplayer/resource.h b/rfbplayer/resource.h
index 54b40fcb..8dd87078 100644
--- a/rfbplayer/resource.h
+++ b/rfbplayer/resource.h
@@ -17,6 +17,7 @@
#define IDC_ACCEPT_CUT_TEXT 1010
#define IDC_AUTO_STORE_PARAM 1011
#define IDC_AUTOPLAY 1012
+#define IDC_BIG_ENDIAN 1013
#define ID_OPENFILE 40011
#define ID_CLOSEFILE 40012
#define ID_EXIT 40013
@@ -42,7 +43,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 138
#define _APS_NEXT_COMMAND_VALUE 40045
-#define _APS_NEXT_CONTROL_VALUE 1013
+#define _APS_NEXT_CONTROL_VALUE 1014
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/rfbplayer/rfbplayer.rc b/rfbplayer/rfbplayer.rc
index 6876b7fa..01d7a323 100644
--- a/rfbplayer/rfbplayer.rc
+++ b/rfbplayer/rfbplayer.rc
@@ -223,32 +223,34 @@ BEGIN
LTEXT "Choose the pixel format:",IDC_STATIC,7,7,130,13
END
-IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 187, 181
+IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 187, 194
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Options"
FONT 8, "MS Sans Serif"
BEGIN
- DEFPUSHBUTTON "OK",IDOK,20,160,50,15
- PUSHBUTTON "Cancel",IDCANCEL,75,160,50,15
- GROUPBOX "Pixel format",IDC_STATIC,7,6,173,64
+ DEFPUSHBUTTON "OK",IDOK,20,174,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,75,174,50,14
+ GROUPBOX "Pixel format",IDC_STATIC,7,6,173,79
COMBOBOX IDC_PIXELFORMAT,15,30,145,75,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Ask the pixel format before playing",IDC_ASK_PF,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,52,145,10
- PUSHBUTTON "Default",IDC_DEFAULT,130,160,50,15
+ BS_AUTOCHECKBOX | WS_TABSTOP,15,67,145,10
+ PUSHBUTTON "Default",IDC_DEFAULT,130,174,50,14
LTEXT "Forces the pixel format for the rfb session:",
IDC_STATIC,15,17,145,13
- GROUPBOX "Other",IDC_STATIC,7,75,173,80
+ GROUPBOX "Other",IDC_STATIC,7,90,173,79
CONTROL "Accept the bells",IDC_ACCEPT_BELL,"Button",
- BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,90,145,15
- CONTROL "Accept the cut text",IDC_ACCEPT_CUT_TEXT,"Button",
BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,105,145,15
+ CONTROL "Accept the cut text",IDC_ACCEPT_CUT_TEXT,"Button",
+ BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,120,145,15
CONTROL "Auto store the player settings",IDC_AUTO_STORE_PARAM,
- "Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,120,
- 145,15
- CONTROL "Start play the session when it is opened",IDC_AUTOPLAY,
"Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,135,
145,15
+ CONTROL "Start play the session when it is opened",IDC_AUTOPLAY,
+ "Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,150,
+ 145,9
+ CONTROL "Big endian flag",IDC_BIG_ENDIAN,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,15,52,145,10
END
@@ -302,19 +304,20 @@ BEGIN
VERTGUIDE, 130
VERTGUIDE, 160
TOPMARGIN, 6
- BOTTOMMARGIN, 175
+ BOTTOMMARGIN, 188
HORZGUIDE, 17
HORZGUIDE, 30
+ HORZGUIDE, 42
HORZGUIDE, 52
- HORZGUIDE, 70
- HORZGUIDE, 75
+ HORZGUIDE, 67
+ HORZGUIDE, 85
HORZGUIDE, 90
HORZGUIDE, 105
HORZGUIDE, 120
HORZGUIDE, 135
HORZGUIDE, 150
- HORZGUIDE, 155
- HORZGUIDE, 160
+ HORZGUIDE, 169
+ HORZGUIDE, 174
END
END
#endif // APSTUDIO_INVOKED