Minor code changes

Fixed Tour Guide bug (go to the first object in the list did not work).
Improved quality for jpg screenshots. "Version" label on the splash
added to localization. Small changes in Star Browser and Eclipses.
pull/110/head
Alexell 2016-11-17 16:43:03 +03:00 committed by Hleb Valoshka
parent 748ec19a41
commit 061b390f94
7 changed files with 21 additions and 7 deletions

View File

@ -90,7 +90,7 @@ bool CaptureGLBufferToJPEG(const string& filename,
jpeg_set_defaults(&cinfo);
// jpeg_set_quality(&cinfo, quality, TRUE);
jpeg_set_quality(&cinfo, 90, TRUE);
jpeg_start_compress(&cinfo, TRUE);

View File

@ -71,6 +71,7 @@ _("About Celestia");
_("OK");
_("Celestia");
_("Copyright (C) 2001-2016, Celestia Development Team");
_("http://celestiaproject.net/");
_("Celestia is free software and comes with absolutely no warranty.");
_("Authors");
_("Clint Weisbrod");

View File

@ -57,7 +57,7 @@ bool InitEclipseFinderColumns(HWND listView)
bind_textdomain_codeset("celestia", CurrentCP());
columns[0].pszText = _("Planet");
columns[0].cx = 50;
columns[0].cx = 65;
columns[1].pszText = _("Satellite");
columns[1].cx = 65;
columns[2].pszText = _("Date");
@ -65,7 +65,7 @@ bool InitEclipseFinderColumns(HWND listView)
columns[3].pszText = _("Start");
columns[3].cx = 55;
columns[4].pszText = _("Duration");
columns[4].cx = 55;
columns[4].cx = 135;
bind_textdomain_codeset("celestia", "UTF8");
for (i = 0; i < nColumns; i++)

View File

@ -10,12 +10,15 @@
// of the License, or (at your option) any later version.
#include "winsplash.h"
#include <celutil/util.h>
#include <celutil/winutil.h>
#include <string>
#include <winuser.h>
#include <commctrl.h>
#include "res/resource.h"
#include <iostream>
using namespace std;
@ -137,8 +140,9 @@ SplashWindow::paint(HDC hDC)
HFONT hFont = reinterpret_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT));
SelectObject(hDC, hFont);
string text = string("Version " VERSION_STRING "\n") + message;
// string s;
// s += UTF8ToCurrentCP(_("Version: "));
string text = UTF8ToCurrentCP(_("Version: ")) + string(VERSION_STRING "\n") + message;
DrawText(hDC, text.c_str(), text.length(), &r, DT_LEFT | DT_VCENTER);
}

View File

@ -62,11 +62,13 @@ bool InitStarBrowserColumns(HWND listView)
columns[0].cx = 100;
columns[1].pszText = _("Distance (ly)");
columns[1].fmt = LVCFMT_RIGHT;
columns[1].cx = 75;
columns[1].cx = 115;
columns[2].pszText = _("App. mag");
columns[2].fmt = LVCFMT_RIGHT;
columns[2].cx = 65;
columns[3].pszText = _("Abs. mag");
columns[3].fmt = LVCFMT_RIGHT;
columns[3].cx = 65;
columns[4].pszText = _("Type");
bind_textdomain_codeset("celestia", "UTF8");

View File

@ -41,10 +41,12 @@ BOOL APIENTRY TourGuideProc(HWND hDlg,
return EndDialog(hDlg, 0);
SetWindowLong(hDlg, DWL_USER, lParam);
guide->selectedDest = NULL;
// guide->selectedDest = NULL;
HWND hwnd = GetDlgItem(hDlg, IDC_COMBO_TOURGUIDE);
const DestinationList* destinations = guide->appCore->getDestinations();
Destination* dest = (*destinations)[0];
guide->selectedDest = dest;
if (hwnd != NULL && destinations != NULL)
{
for (DestinationList::const_iterator iter = destinations->begin();

View File

@ -74,6 +74,9 @@ static BOOL APIENTRY ViewOptionsProc(HWND hDlg,
case IDC_SHOWECLIPTICGRID:
renderer->setRenderFlags(renderFlags ^ Renderer::ShowEclipticGrid);
break;
case IDC_SHOWECLIPTIC:
renderer->setRenderFlags(renderFlags ^ Renderer::ShowEcliptic);
break;
case IDC_SHOWCLOUDS:
renderer->setRenderFlags(renderFlags ^ Renderer::ShowCloudMaps);
break;
@ -306,6 +309,8 @@ void ViewOptionsDialog::SetControls(HWND hDlg)
(renderFlags & Renderer::ShowGalacticGrid)? BST_CHECKED:BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_SHOWECLIPTICGRID, BM_SETCHECK,
(renderFlags & Renderer::ShowEclipticGrid)? BST_CHECKED:BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_SHOWECLIPTIC, BM_SETCHECK,
(renderFlags & Renderer::ShowEcliptic)? BST_CHECKED:BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_SHOWCLOUDS, BM_SETCHECK,
(renderFlags & Renderer::ShowCloudMaps)? BST_CHECKED:BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_SHOWCLOUDSHADOWS, BM_SETCHECK,