Ejemplo n.º 1
0
static void
load_session (gboolean                  use_factory,
	      GNOME_GThumb_Application  app,
	      CORBA_Environment        *env)
{
	int i, n;

	gnome_config_push_prefix (gnome_client_get_config_prefix (master_client));

	n = gnome_config_get_int ("Session/locations");
	for (i = 0; i < n; i++) {
		char *key;
		char *location;

		key = g_strdup_printf ("Session/location%d", i);
		location = gnome_config_get_string (key);

		if (uri_scheme_is_file (location) && path_is_file (location))
			open_viewer_window (location, use_factory, app, env);
		else
			open_browser_window (location, TRUE, use_factory, app, env);

		g_free (location);
		g_free (key);
	}

	gnome_config_pop_prefix ();
}
Ejemplo n.º 2
0
static EMemoConduitCfg *
memoconduit_load_configuration (guint32 pilot_id)
{
	EMemoConduitCfg *c;
	GnomePilotConduitManagement *management;
	GnomePilotConduitConfig *config;
	gchar prefix[256];


	g_snprintf (prefix, 255, "/gnome-pilot.d/e-memo-conduit/Pilot_%u/",
		    pilot_id);

	c = g_new0 (EMemoConduitCfg,1);
	g_assert (c != NULL);

	c->pilot_id = pilot_id;

	management = gnome_pilot_conduit_management_new ("e_memo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID);
	g_object_ref_sink (management);
	config = gnome_pilot_conduit_config_new (management, pilot_id);
	g_object_ref_sink (config);
	if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type))
		c->sync_type = GnomePilotConduitSyncTypeNotSet;
	g_object_unref (config);
	g_object_unref (management);

	/* Custom settings */
	gnome_config_push_prefix (prefix);

	if (!e_cal_get_sources (&c->source_list, E_CAL_SOURCE_TYPE_JOURNAL, NULL))
		c->source_list = NULL;
	if (c->source_list) {
		c->source = e_pilot_get_sync_source (c->source_list);
		if (!c->source)
			c->source = e_source_list_peek_source_any (c->source_list);
		if (c->source) {
			g_object_ref (c->source);
		} else {
			g_object_unref (c->source_list);
			c->source_list = NULL;
		}
	}

	c->secret = gnome_config_get_bool ("secret=FALSE");
	c->priority = gnome_config_get_int ("priority=3");
	c->last_uri = gnome_config_get_string ("last_uri");

	gnome_config_pop_prefix ();

	return c;
}
Ejemplo n.º 3
0
static void main_window_create_panes(void)
{
	main_window.main_vertical_pane = gtk_vpaned_new ();
	gtk_widget_show (main_window.main_vertical_pane);
	gnome_app_set_contents (GNOME_APP (main_window.window), main_window.main_vertical_pane);

	main_window.main_horizontal_pane = gtk_hpaned_new ();
	gtk_widget_show (main_window.main_horizontal_pane);
	gtk_paned_pack1 (GTK_PANED (main_window.main_vertical_pane), main_window.main_horizontal_pane, FALSE, TRUE);

	gtk_signal_connect (GTK_OBJECT (main_window.window), "size_allocate", GTK_SIGNAL_FUNC (classbrowser_accept_size), NULL);
	move_classbrowser_position();
	if (gnome_config_get_int ("gPHPEdit/main_window/classbrowser_hidden=0") == 1)
		classbrowser_hide();
}
Ejemplo n.º 4
0
void preferences_init (void)
{
  preferences = g_malloc (sizeof (Preferences));
  preferences->mouse_control =
    gnome_config_get_bool ("/atomix/Control/MouseControl=true");
  preferences->keyboard_control =
    gnome_config_get_bool ("/atomix/Control/KeyboardControl=false");
  preferences->hide_cursor =
    gnome_config_get_bool ("/atomix/Control/HideCursor=true");
  preferences->lazy_dragging =
    gnome_config_get_bool ("/atomix/Control/LazyDragging=true");
  preferences->mouse_sensitivity =
    gnome_config_get_int ("/atomix/Control/MouseSensitivity=8");
  preferences->score_time_enabled =
    gnome_config_get_bool ("/atomix/Global/EnableScoreAndTimeLimit=true");
}