Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

settings-gconf.cpp File Reference

#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <celengine/body.h>
#include <celengine/galaxy.h>
#include <celengine/render.h>
#include "settings-gconf.h"
#include "common.h"

Include dependency graph for settings-gconf.cpp:

Go to the source code of this file.

Functions

void applySettingsGConfMain (AppData *app, GConfClient *client)
void applySettingsGConfPre (AppData *app, GConfClient *client)
static void confAltSurfaceName (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confAmbientLight (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confFullScreen (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confGalaxyLightGain (GConfClient *, guint, GConfEntry *e, AppData *)
static void confLabels (GConfClient *, guint, GConfEntry *, AppData *app)
static void confOrbits (GConfClient *, guint, GConfEntry *, AppData *app)
static void confRender (GConfClient *, guint, GConfEntry *, AppData *app)
static void confShowLocalTime (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confStarStyle (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confVerbosity (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confVisualMagnitude (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confWinHeight (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confWinWidth (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confWinX (GConfClient *, guint, GConfEntry *e, AppData *app)
static void confWinY (GConfClient *, guint, GConfEntry *e, AppData *app)
static void gcSetFlag (int type, const char *name, gboolean value, GConfClient *client)
void gcSetLabelMode (int flag, gboolean state, GConfClient *client)
void gcSetOrbitMask (int flag, gboolean state, GConfClient *client)
void gcSetRenderFlag (int flag, gboolean state, GConfClient *client)
void initSettingsGConf (AppData *app)
void initSettingsGConfNotifiers (AppData *app)
static int readGConfLabels (GConfClient *client)
static int readGConfOrbits (GConfClient *client)
static int readGConfRender (GConfClient *client)
void saveSettingsGConf (AppData *app)


Function Documentation

void applySettingsGConfMain AppData app,
GConfClient *  client
 

Definition at line 96 of file settings-gconf.cpp.

References readGConfLabels(), readGConfOrbits(), readGConfRender(), setSaneAltSurface(), setSaneAmbientLight(), setSaneGalaxyLightGain(), setSaneStarStyle(), setSaneVerbosity(), and setSaneVisualMagnitude().

Referenced by initRealize().

00097 {
00098         int rf, om, lm;
00099         
00100         /* All settings that need sanity checks get them */
00101         setSaneAmbientLight(app, gconf_client_get_float(client, "/apps/celestia/ambientLight", NULL));
00102         setSaneVisualMagnitude(app, gconf_client_get_float(client, "/apps/celestia/visualMagnitude", NULL));
00103         setSaneGalaxyLightGain(gconf_client_get_float(client, "/apps/celestia/galaxyLightGain", NULL));
00104         setSaneVerbosity(app, gconf_client_get_int(client, "/apps/celestia/verbosity", NULL));
00105         setSaneStarStyle(app, (Renderer::StarStyle)gconf_client_get_int(client, "/apps/celestia/starStyle", NULL));
00106         setSaneAltSurface(app, gconf_client_get_string(client, "/apps/celestia/altSurfaceName", NULL));
00107         
00108         app->showLocalTime = gconf_client_get_bool(client, "/apps/celestia/showLocalTime", NULL);
00109         
00110         /* Render Flags */
00111         rf = readGConfRender(app->client);
00112         app->renderer->setRenderFlags(rf);
00113 
00114         /* Orbit Mode */
00115         om = readGConfOrbits(app->client);
00116         app->renderer->setOrbitMask(om);
00117         
00118         /* Label Mode */
00119         lm = readGConfLabels(app->client);
00120         app->renderer->setLabelMode(lm);
00121 }

void applySettingsGConfPre AppData app,
GConfClient *  client
 

Definition at line 79 of file settings-gconf.cpp.

References setSaneWinPosition(), and setSaneWinSize().

Referenced by main().

00080 {
00081         int sizeX, sizeY, positionX, positionY;
00082         
00083         /* Error checking occurs as values are used */
00084         sizeX = gconf_client_get_int(client, "/apps/celestia/winWidth", NULL);
00085         sizeY = gconf_client_get_int(client, "/apps/celestia/winHeight", NULL);
00086         positionX = gconf_client_get_int(client, "/apps/celestia/winX", NULL);
00087         positionY = gconf_client_get_int(client, "/apps/celestia/winY", NULL);
00088         app->fullScreen = gconf_client_get_bool(client, "/apps/celestia/fullScreen", NULL);
00089         
00090         setSaneWinSize(app, sizeX, sizeY);
00091         setSaneWinPosition(app, positionX, positionY);
00092 }

static void confAltSurfaceName GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 379 of file settings-gconf.cpp.

References setSaneAltSurface().

Referenced by initSettingsGConfNotifiers().

00380 {
00381         const char* value = gconf_value_get_string(e->value);
00382         
00383         if (string(value) == app->simulation->getActiveObserver()->getDisplayedSurface())
00384                 return;
00385         
00386         setSaneAltSurface(app, (char*)value);
00387 }

static void confAmbientLight GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 287 of file settings-gconf.cpp.

References abs(), and setSaneAmbientLight().

Referenced by initSettingsGConfNotifiers().

00288 {
00289         float value = gconf_value_get_float(e->value);
00290         
00291         /* Comparing floats is tricky. Three decimal places is "close enough." */
00292         if (abs(value - app->renderer->getAmbientLightLevel()) < 0.001)
00293                 return;
00294         
00295         setSaneAmbientLight(app, value);
00296 }

static void confFullScreen GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 349 of file settings-gconf.cpp.

Referenced by initSettingsGConfNotifiers().

00350 {
00351         gboolean value = gconf_value_get_bool(e->value);
00352         
00353         /* There is no way to determine if the window is actually full screen */
00354         if (value == app->fullScreen)
00355                 return;
00356         
00357         /* The Action handler for full-screen toggles for us, so we set it opposite
00358          * of what is wanted, and... */
00359         app->fullScreen = !value;
00360         
00361         /* ... tickle it. */
00362         gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(gtk_action_group_get_action(app->agMain, "FullScreen")), value);
00363 }

static void confGalaxyLightGain GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData
[static]
 

Definition at line 312 of file settings-gconf.cpp.

References abs(), and setSaneGalaxyLightGain().

Referenced by initSettingsGConfNotifiers().

00313 {
00314         float value = gconf_value_get_float(e->value);
00315         
00316         if (abs(value - Galaxy::getLightGain()) < 0.001)
00317                 return;
00318         
00319         setSaneGalaxyLightGain(value);
00320 }

static void confLabels GConfClient *  ,
guint  ,
GConfEntry *  ,
AppData app
[static]
 

Definition at line 205 of file settings-gconf.cpp.

References readGConfLabels().

Referenced by initSettingsGConfNotifiers().

00206 {
00207         int oldLabels = app->renderer->getLabelMode();
00208         
00209         /* Reload all the labels */
00210         int newLabels = readGConfLabels(app->client);
00211 
00212         /* Set label flags */
00213         if (newLabels != oldLabels)
00214                 app->renderer->setLabelMode(newLabels);
00215 }

static void confOrbits GConfClient *  ,
guint  ,
GConfEntry *  ,
AppData app
[static]
 

Definition at line 233 of file settings-gconf.cpp.

References readGConfOrbits().

Referenced by initSettingsGConfNotifiers().

00234 {
00235         int oldOrbit = app->renderer->getOrbitMask();
00236         
00237         /* Reload all the orbits */
00238         int newOrbit = readGConfOrbits(app->client);
00239 
00240         /* Set orbit flags */
00241         if (newOrbit != oldOrbit)
00242                 app->renderer->setOrbitMask(newOrbit);
00243 }

static void confRender GConfClient *  ,
guint  ,
GConfEntry *  ,
AppData app
[static]
 

Definition at line 219 of file settings-gconf.cpp.

References readGConfRender().

Referenced by initSettingsGConfNotifiers().

00220 {
00221         int oldRender = app->renderer->getRenderFlags();
00222         
00223         /* Reload all the render flags */
00224         int newRender = readGConfRender(app->client);
00225 
00226         /* Set render flags */
00227         if (newRender != oldRender)
00228                 app->renderer->setRenderFlags(newRender);
00229 }

static void confShowLocalTime GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 324 of file settings-gconf.cpp.

References updateTimeZone().

Referenced by initSettingsGConfNotifiers().

00325 {
00326         gboolean value = gconf_value_get_bool(e->value);
00327         
00328         if (value == app->showLocalTime)
00329                 return;
00330 
00331         app->showLocalTime = value;
00332         updateTimeZone(app, app->showLocalTime);
00333 }

static void confStarStyle GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 367 of file settings-gconf.cpp.

References setSaneStarStyle().

Referenced by initSettingsGConfNotifiers().

00368 {
00369         int value = gconf_value_get_int(e->value);
00370         
00371         if (value == app->renderer->getStarStyle())
00372                 return;
00373         
00374         setSaneStarStyle(app, (Renderer::StarStyle)value);
00375 }

static void confVerbosity GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 337 of file settings-gconf.cpp.

References setSaneVerbosity().

Referenced by initSettingsGConfNotifiers().

00338 {
00339         int value = gconf_value_get_int(e->value);
00340         
00341         if (value == app->core->getHudDetail())
00342                 return;
00343         
00344         setSaneVerbosity(app, value);
00345 }

static void confVisualMagnitude GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 300 of file settings-gconf.cpp.

References abs(), and setSaneVisualMagnitude().

Referenced by initSettingsGConfNotifiers().

00301 {
00302         float value = gconf_value_get_float(e->value);
00303         
00304         if (abs(value - app->simulation->getFaintestVisible()) < 0.001)
00305                 return;
00306         
00307         setSaneVisualMagnitude(app, value);
00308 }

static void confWinHeight GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 257 of file settings-gconf.cpp.

References getWinHeight(), getWinWidth(), and setSaneWinSize().

Referenced by initSettingsGConfNotifiers().

00258 {
00259         int h = gconf_value_get_int(e->value);
00260 
00261         if (h != getWinHeight(app))
00262                 setSaneWinSize(app, getWinWidth(app), h);
00263 }

static void confWinWidth GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 247 of file settings-gconf.cpp.

References getWinHeight(), getWinWidth(), and setSaneWinSize().

Referenced by initSettingsGConfNotifiers().

00248 {
00249         int w = gconf_value_get_int(e->value);
00250 
00251         if (w != getWinWidth(app))
00252                 setSaneWinSize(app, w, getWinHeight(app));
00253 }

static void confWinX GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 267 of file settings-gconf.cpp.

References getWinX(), getWinY(), and setSaneWinPosition().

Referenced by initSettingsGConfNotifiers().

00268 {
00269         int x = gconf_value_get_int(e->value);
00270 
00271         if (x != getWinX(app))
00272                 setSaneWinPosition(app, x, getWinY(app));
00273 }

static void confWinY GConfClient *  ,
guint  ,
GConfEntry *  e,
AppData app
[static]
 

Definition at line 277 of file settings-gconf.cpp.

References getWinX(), getWinY(), and setSaneWinPosition().

Referenced by initSettingsGConfNotifiers().

00278 {
00279         int y = gconf_value_get_int(e->value);
00280 
00281         if (y != getWinY(app))
00282                 setSaneWinPosition(app, getWinX(app), y);
00283 }

static void gcSetFlag int  type,
const char *  name,
gboolean  value,
GConfClient *  client
[static]
 

Definition at line 456 of file settings-gconf.cpp.

References Label, and Render.

Referenced by gcSetLabelMode(), gcSetOrbitMask(), and gcSetRenderFlag().

00457 {
00458         gchar key[60];
00459         switch (type)
00460         {
00461                 case Render: sprintf(key, "%s%s", "/apps/celestia/render/", name); break;
00462                 case Orbit: sprintf(key, "%s%s", "/apps/celestia/orbits/", name); break;
00463                 case Label: sprintf(key, "%s%s", "/apps/celestia/labels/", name); break;
00464         }
00465         
00466         gconf_client_set_bool(client, key, value, NULL);
00467 }

void gcSetLabelMode int  flag,
gboolean  state,
GConfClient *  client
 

Definition at line 184 of file settings-gconf.cpp.

References gcSetFlag(), and Label.

Referenced by setLabelMode().

00185 {
00186         switch (flag)
00187         {
00188                 case Renderer::StarLabels: gcSetFlag(Label, "star", state, client); break;
00189                 case Renderer::PlanetLabels: gcSetFlag(Label, "planet", state, client); break;
00190                 case Renderer::MoonLabels: gcSetFlag(Label, "moon", state, client); break;
00191                 case Renderer::ConstellationLabels: gcSetFlag(Label, "constellation", state, client); break;
00192                 case Renderer::GalaxyLabels: gcSetFlag(Label, "galaxy", state, client); break;
00193                 case Renderer::AsteroidLabels: gcSetFlag(Label, "asteroid", state, client); break;
00194                 case Renderer::SpacecraftLabels: gcSetFlag(Label, "spacecraft", state, client); break;
00195                 case Renderer::LocationLabels: gcSetFlag(Label, "location", state, client); break;
00196                 case Renderer::CometLabels: gcSetFlag(Label, "comet", state, client); break;
00197                 case Renderer::NebulaLabels: gcSetFlag(Label, "nebula", state, client); break;
00198                 case Renderer::OpenClusterLabels: gcSetFlag(Label, "openCluster", state, client); break;
00199                 case Renderer::I18nConstellationLabels: gcSetFlag(Label, "i18n", state, client); break;
00200         }
00201 }

void gcSetOrbitMask int  flag,
gboolean  state,
GConfClient *  client
 

Definition at line 168 of file settings-gconf.cpp.

References gcSetFlag().

Referenced by setOrbitMask().

00169 {
00170         switch (flag)
00171         {
00172                 case Body::Planet: gcSetFlag(Orbit, "planet", state, client); break;
00173                 case Body::Moon: gcSetFlag(Orbit, "moon", state, client); break;
00174                 case Body::Asteroid: gcSetFlag(Orbit, "asteroid", state, client); break;
00175                 case Body::Spacecraft: gcSetFlag(Orbit, "spacecraft", state, client); break;
00176                 case Body::Comet: gcSetFlag(Orbit, "comet", state, client); break;
00177                 case Body::Invisible: gcSetFlag(Orbit, "invisible", state, client); break;
00178                 case Body::Unknown: gcSetFlag(Orbit, "unknown", state, client); break;
00179         }
00180 }

void gcSetRenderFlag int  flag,
gboolean  state,
GConfClient *  client
 

Definition at line 140 of file settings-gconf.cpp.

References gcSetFlag(), and Render.

Referenced by setRenderFlag().

00141 {
00142         switch (flag)
00143         {
00144                 case Renderer::ShowStars: gcSetFlag(Render, "stars", state, client); break;
00145                 case Renderer::ShowPlanets: gcSetFlag(Render, "planets", state, client); break;
00146                 case Renderer::ShowGalaxies: gcSetFlag(Render, "galaxies", state, client); break;
00147                 case Renderer::ShowDiagrams: gcSetFlag(Render, "diagrams", state, client); break;
00148                 case Renderer::ShowCloudMaps: gcSetFlag(Render, "cloudMaps", state, client); break;
00149                 case Renderer::ShowOrbits: gcSetFlag(Render, "orbits", state, client); break;
00150                 case Renderer::ShowCelestialSphere: gcSetFlag(Render, "celestialSphere", state, client); break;
00151                 case Renderer::ShowNightMaps: gcSetFlag(Render, "nightMaps", state, client); break;
00152                 case Renderer::ShowAtmospheres: gcSetFlag(Render, "atmospheres", state, client); break;
00153                 case Renderer::ShowSmoothLines: gcSetFlag(Render, "smoothLines", state, client); break;
00154                 case Renderer::ShowEclipseShadows: gcSetFlag(Render, "eclipseShadows", state, client); break;
00155                 case Renderer::ShowRingShadows: gcSetFlag(Render, "ringShadows", state, client); break;
00156                 case Renderer::ShowBoundaries: gcSetFlag(Render, "boundaries", state, client); break;
00157                 case Renderer::ShowAutoMag: gcSetFlag(Render, "autoMag", state, client); break;
00158                 case Renderer::ShowCometTails: gcSetFlag(Render, "cometTails", state, client); break;
00159                 case Renderer::ShowMarkers: gcSetFlag(Render, "markers", state, client); break;
00160                 case Renderer::ShowPartialTrajectories: gcSetFlag(Render, "partialTrajectories", state, client); break;
00161                 case Renderer::ShowNebulae: gcSetFlag(Render, "nebulae", state, client); break;
00162                 case Renderer::ShowOpenClusters: gcSetFlag(Render, "openClusters", state, client); break;
00163         }
00164 }

void initSettingsGConf AppData app  ) 
 

Definition at line 49 of file settings-gconf.cpp.

Referenced by main().

00050 {
00051         app->client = gconf_client_get_default();
00052         gconf_client_add_dir(app->client, "/apps/celestia", GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
00053 }

void initSettingsGConfNotifiers AppData app  ) 
 

Definition at line 57 of file settings-gconf.cpp.

References confAltSurfaceName(), confAmbientLight(), confFullScreen(), confGalaxyLightGain(), confLabels(), confOrbits(), confRender(), confShowLocalTime(), confStarStyle(), confVerbosity(), confVisualMagnitude(), confWinHeight(), confWinWidth(), confWinX(), and confWinY().

Referenced by main().

00058 {
00059         /* Add preference client notifiers. */
00060         gconf_client_notify_add (app->client, "/apps/celestia/labels", (GConfClientNotifyFunc)confLabels, app, NULL, NULL);
00061         gconf_client_notify_add (app->client, "/apps/celestia/render", (GConfClientNotifyFunc)confRender, app, NULL, NULL);
00062         gconf_client_notify_add (app->client, "/apps/celestia/orbits", (GConfClientNotifyFunc)confOrbits, app, NULL, NULL);
00063         gconf_client_notify_add (app->client, "/apps/celestia/winWidth", (GConfClientNotifyFunc)confWinWidth, app, NULL, NULL);
00064         gconf_client_notify_add (app->client, "/apps/celestia/winHeight", (GConfClientNotifyFunc)confWinHeight, app, NULL, NULL);
00065         gconf_client_notify_add (app->client, "/apps/celestia/winX", (GConfClientNotifyFunc)confWinX, app, NULL, NULL);
00066         gconf_client_notify_add (app->client, "/apps/celestia/winY", (GConfClientNotifyFunc)confWinY, app, NULL, NULL);
00067         gconf_client_notify_add (app->client, "/apps/celestia/ambientLight", (GConfClientNotifyFunc)confAmbientLight, app, NULL, NULL);
00068         gconf_client_notify_add (app->client, "/apps/celestia/visualMagnitude", (GConfClientNotifyFunc)confVisualMagnitude, app, NULL, NULL);
00069         gconf_client_notify_add (app->client, "/apps/celestia/galaxyLightGain", (GConfClientNotifyFunc)confGalaxyLightGain, app, NULL, NULL);
00070         gconf_client_notify_add (app->client, "/apps/celestia/showLocalTime", (GConfClientNotifyFunc)confShowLocalTime, app, NULL, NULL);
00071         gconf_client_notify_add (app->client, "/apps/celestia/verbosity", (GConfClientNotifyFunc)confVerbosity, app, NULL, NULL);
00072         gconf_client_notify_add (app->client, "/apps/celestia/fullScreen", (GConfClientNotifyFunc)confFullScreen, app, NULL, NULL);
00073         gconf_client_notify_add (app->client, "/apps/celestia/starStyle", (GConfClientNotifyFunc)confStarStyle, app, NULL, NULL);
00074         gconf_client_notify_add (app->client, "/apps/celestia/altSurfaceName", (GConfClientNotifyFunc)confAltSurfaceName, app, NULL, NULL);
00075 }

static int readGConfLabels GConfClient *  client  )  [static]
 

Definition at line 435 of file settings-gconf.cpp.

Referenced by applySettingsGConfMain(), and confLabels().

00436 {
00437         int lm = Renderer::NoLabels;
00438         lm |= Renderer::StarLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/star", NULL);
00439         lm |= Renderer::PlanetLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/planet", NULL);
00440         lm |= Renderer::MoonLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/moon", NULL);
00441         lm |= Renderer::ConstellationLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/constellation", NULL);
00442         lm |= Renderer::GalaxyLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/galaxy", NULL);
00443         lm |= Renderer::AsteroidLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/asteroid", NULL);
00444         lm |= Renderer::SpacecraftLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/spacecraft", NULL);
00445         lm |= Renderer::LocationLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/location", NULL);
00446         lm |= Renderer::CometLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/comet", NULL);
00447         lm |= Renderer::NebulaLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/nebula", NULL);
00448         lm |= Renderer::OpenClusterLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/openCluster", NULL);
00449         lm |= Renderer::I18nConstellationLabels  * gconf_client_get_bool(client, "/apps/celestia/labels/i18n", NULL);
00450         
00451         return lm;
00452 }

static int readGConfOrbits GConfClient *  client  )  [static]
 

Definition at line 419 of file settings-gconf.cpp.

Referenced by applySettingsGConfMain(), and confOrbits().

00420 {
00421         int om = 0;
00422         om |= Body::Planet * gconf_client_get_bool(client, "/apps/celestia/orbits/planet",  NULL);
00423         om |= Body::Moon * gconf_client_get_bool(client, "/apps/celestia/orbits/moon",  NULL);
00424         om |= Body::Asteroid * gconf_client_get_bool(client, "/apps/celestia/orbits/asteroid",  NULL);
00425         om |= Body::Comet * gconf_client_get_bool(client, "/apps/celestia/orbits/comet",  NULL);
00426         om |= Body::Spacecraft * gconf_client_get_bool(client, "/apps/celestia/orbits/spacecraft",  NULL);
00427         om |= Body::Invisible * gconf_client_get_bool(client, "/apps/celestia/orbits/invisible",  NULL);
00428         om |= Body::Unknown * gconf_client_get_bool(client, "/apps/celestia/orbits/unknown",  NULL);
00429         
00430         return om;
00431 }

static int readGConfRender GConfClient *  client  )  [static]
 

Definition at line 391 of file settings-gconf.cpp.

Referenced by applySettingsGConfMain(), and confRender().

00392 {
00393         int rf = Renderer::ShowNothing;
00394         rf |= Renderer::ShowStars * gconf_client_get_bool(client, "/apps/celestia/render/stars",  NULL);
00395         rf |= Renderer::ShowPlanets * gconf_client_get_bool(client, "/apps/celestia/render/planets",  NULL);
00396         rf |= Renderer::ShowGalaxies * gconf_client_get_bool(client, "/apps/celestia/render/galaxies",  NULL);
00397         rf |= Renderer::ShowDiagrams * gconf_client_get_bool(client, "/apps/celestia/render/diagrams",  NULL);
00398         rf |= Renderer::ShowCloudMaps * gconf_client_get_bool(client, "/apps/celestia/render/cloudMaps",  NULL);
00399         rf |= Renderer::ShowOrbits * gconf_client_get_bool(client, "/apps/celestia/render/orbits",  NULL);
00400         rf |= Renderer::ShowCelestialSphere * gconf_client_get_bool(client, "/apps/celestia/render/celestialSphere",  NULL);
00401         rf |= Renderer::ShowNightMaps * gconf_client_get_bool(client, "/apps/celestia/render/nightMaps",  NULL);
00402         rf |= Renderer::ShowAtmospheres * gconf_client_get_bool(client, "/apps/celestia/render/atmospheres",  NULL);
00403         rf |= Renderer::ShowSmoothLines * gconf_client_get_bool(client, "/apps/celestia/render/smoothLines",  NULL);
00404         rf |= Renderer::ShowEclipseShadows * gconf_client_get_bool(client, "/apps/celestia/render/eclipseShadows",  NULL);
00405         rf |= Renderer::ShowRingShadows * gconf_client_get_bool(client, "/apps/celestia/render/ringShadows",  NULL);
00406         rf |= Renderer::ShowBoundaries * gconf_client_get_bool(client, "/apps/celestia/render/boundaries",  NULL);
00407         rf |= Renderer::ShowAutoMag * gconf_client_get_bool(client, "/apps/celestia/render/autoMag",  NULL);
00408         rf |= Renderer::ShowCometTails * gconf_client_get_bool(client, "/apps/celestia/render/cometTails",  NULL);
00409         rf |= Renderer::ShowMarkers * gconf_client_get_bool(client, "/apps/celestia/render/markers",  NULL);
00410         rf |= Renderer::ShowPartialTrajectories * gconf_client_get_bool(client, "/apps/celestia/render/partialTrajectories",  NULL);
00411         rf |= Renderer::ShowNebulae * gconf_client_get_bool(client, "/apps/celestia/render/nebulae",  NULL);
00412         rf |= Renderer::ShowOpenClusters * gconf_client_get_bool(client, "/apps/celestia/render/openClusters",  NULL);
00413         
00414         return rf;
00415 }

void saveSettingsGConf AppData app  ) 
 

Definition at line 125 of file settings-gconf.cpp.

References getWinHeight(), getWinWidth(), getWinX(), and getWinY().

Referenced by actionQuit().

00126 {
00127         /* Save window position */
00128         gconf_client_set_int(app->client, "/apps/celestia/winX", getWinX(app), NULL);
00129         gconf_client_set_int(app->client, "/apps/celestia/winY", getWinY(app), NULL);
00130         
00131         /* Save window  size */
00132         gconf_client_set_int(app->client, "/apps/celestia/winWidth", getWinWidth(app), NULL);
00133         gconf_client_set_int(app->client, "/apps/celestia/winHeight", getWinHeight(app), NULL);
00134         
00135         g_object_unref (G_OBJECT (app->client));
00136 }


Generated on Sat Jan 14 22:32:03 2006 for Celestia by  doxygen 1.4.1