diff options
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | vncviewer/OptionsDialog.cxx | 25 | ||||
-rw-r--r-- | vncviewer/OptionsDialog.h | 3 |
3 files changed, 27 insertions, 3 deletions
diff --git a/vncviewer/CMakeLists.txt b/vncviewer/CMakeLists.txt index 9aa985af..9acceedf 100644 --- a/vncviewer/CMakeLists.txt +++ b/vncviewer/CMakeLists.txt @@ -53,7 +53,7 @@ else() add_executable(vncviewer ${VNCVIEWER_SOURCES}) endif() -target_link_libraries(vncviewer rfb network rdr os ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES}) +target_link_libraries(vncviewer rfb network rdr os ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES} ${H264_LIBRARIES}) if(WIN32) target_link_libraries(vncviewer msimg32) diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx index 3250038b..c56427ef 100644 --- a/vncviewer/OptionsDialog.cxx +++ b/vncviewer/OptionsDialog.cxx @@ -164,6 +164,11 @@ void OptionsDialog::loadOptions(void) case encodingHextile: hextileButton->setonly(); break; +#ifdef HAVE_H264 + case encodingH264: + h264Button->setonly(); + break; +#endif case encodingRaw: rawButton->setonly(); break; @@ -327,6 +332,10 @@ void OptionsDialog::storeOptions(void) preferredEncoding.setParam(encodingName(encodingZRLE)); else if (hextileButton->value()) preferredEncoding.setParam(encodingName(encodingHextile)); +#ifdef HAVE_H264 + else if (h264Button->value()) + preferredEncoding.setParam(encodingName(encodingH264)); +#endif else if (rawButton->value()) preferredEncoding.setParam(encodingName(encodingRaw)); @@ -436,6 +445,7 @@ void OptionsDialog::createCompressionPage(int tx, int ty, int tw, int th) Fl_Group *group = new Fl_Group(tx, ty, tw, th, _("Compression")); int orig_tx, orig_ty; + int col1_ty, col2_ty; int half_width, full_width; int height; @@ -459,7 +469,7 @@ void OptionsDialog::createCompressionPage(int tx, int ty, int tw, int th) /* VNC encoding box */ ty += GROUP_LABEL_OFFSET; - height = GROUP_MARGIN * 2 + TIGHT_MARGIN * 3 + RADIO_HEIGHT * 4; + height = GROUP_MARGIN * 2 + TIGHT_MARGIN * 4 + RADIO_HEIGHT * 5; encodingGroup = new Fl_Group(tx, ty, half_width, height, _("Preferred encoding")); encodingGroup->box(FL_ENGRAVED_BOX); @@ -490,6 +500,15 @@ void OptionsDialog::createCompressionPage(int tx, int ty, int tw, int th) hextileButton->type(FL_RADIO_BUTTON); ty += RADIO_HEIGHT + TIGHT_MARGIN; +#ifdef HAVE_H264 + h264Button = new Fl_Round_Button(LBLRIGHT(tx, ty, + RADIO_MIN_WIDTH, + RADIO_HEIGHT, + "H.264")); + h264Button->type(FL_RADIO_BUTTON); + ty += RADIO_HEIGHT + TIGHT_MARGIN; +#endif + rawButton = new Fl_Round_Button(LBLRIGHT(tx, ty, RADIO_MIN_WIDTH, RADIO_HEIGHT, @@ -501,6 +520,7 @@ void OptionsDialog::createCompressionPage(int tx, int ty, int tw, int th) ty += GROUP_MARGIN - TIGHT_MARGIN; encodingGroup->end(); + col1_ty = ty; /* Second column */ tx = orig_tx + half_width + INNER_MARGIN; @@ -549,10 +569,11 @@ void OptionsDialog::createCompressionPage(int tx, int ty, int tw, int th) ty += GROUP_MARGIN - TIGHT_MARGIN; colorlevelGroup->end(); + col2_ty = ty; /* Back to normal */ tx = orig_tx; - ty += INNER_MARGIN; + ty = (col1_ty > col2_ty ? col1_ty : col2_ty) + INNER_MARGIN; /* Checkboxes */ compressionCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty, diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h index 6ed7b3f9..42c075ed 100644 --- a/vncviewer/OptionsDialog.h +++ b/vncviewer/OptionsDialog.h @@ -80,6 +80,9 @@ protected: Fl_Round_Button *tightButton; Fl_Round_Button *zrleButton; Fl_Round_Button *hextileButton; +#ifdef HAVE_H264 + Fl_Round_Button *h264Button; +#endif Fl_Round_Button *rawButton; Fl_Group *colorlevelGroup; |