diff options
Diffstat (limited to 'vncviewer/OptionsDialog.cxx')
-rw-r--r-- | vncviewer/OptionsDialog.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
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, |