Commit ca756f8f authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

removed incremental applet saving stuff, now saves them all at once, this

Mon Mar 15 13:32:41 1999  George Lebl  <jirka@5z.com>

        * session.c,*.c: removed incremental applet saving stuff, now
          saves them all at once, this wasn't used under SM anyway and
          it's savings were dubious
parent 1f6318f9
Mon Mar 15 13:32:41 1999 George Lebl <jirka@5z.com>
* session.c,*.c: removed incremental applet saving stuff, now
saves them all at once, this wasn't used under SM anyway and
it's savings were dubious
Mon Mar 15 12:46:00 1999 George Lebl <jirka@5z.com>
* launcher.c,menu.c: add \r\n at the end of a uri_list line
......
Mon Mar 15 13:32:41 1999 George Lebl <jirka@5z.com>
* session.c,*.c: removed incremental applet saving stuff, now
saves them all at once, this wasn't used under SM anyway and
it's savings were dubious
Mon Mar 15 12:46:00 1999 George Lebl <jirka@5z.com>
* launcher.c,menu.c: add \r\n at the end of a uri_list line
......
......@@ -28,7 +28,7 @@ int applet_count = 0;
/*config sync stuff*/
extern int config_sync_timeout;
extern GSList *applets_to_sync;
extern int applets_to_sync;
extern int panels_to_sync;
extern int globals_to_sync;
extern int need_complete_save;
......@@ -475,8 +475,7 @@ register_toy(GtkWidget *applet,
applet_count++;
/*we will need to save this applet's config now*/
if(g_slist_find(applets_to_sync, info)==NULL)
applets_to_sync = g_slist_prepend(applets_to_sync,info);
applets_to_sync = TRUE;
if(panel_widget_add_full(panel, applet, pos, TRUE)==-1) {
GSList *list;
......
......@@ -27,7 +27,7 @@ extern GSList *applets_last;
extern int applet_count;
extern int config_sync_timeout;
extern GSList *applets_to_sync;
extern int applets_to_sync;
extern int panels_to_sync;
extern int globals_to_sync;
extern int need_complete_save;
......@@ -725,8 +725,7 @@ s_panelspot_sync_config(POA_GNOME_PanelSpot *servant,
g_return_if_fail(ext != NULL);
g_return_if_fail(ext->info != NULL);
if(g_slist_find(applets_to_sync, ext->info)==NULL)
applets_to_sync = g_slist_prepend(applets_to_sync,ext->info);
applets_to_sync = TRUE;
panel_config_sync();
}
......
......@@ -16,7 +16,7 @@
#include "panel-include.h"
extern int config_sync_timeout;
extern GSList *applets_to_sync;
extern int applets_to_sync;
extern int panels_to_sync;
extern int globals_to_sync;
extern int need_complete_save;
......
......@@ -45,7 +45,7 @@ extern GlobalConfig global_config;
extern int config_sync_timeout;
extern int panels_to_sync;
extern GSList *applets_to_sync;
extern int applets_to_sync;
extern int globals_to_sync;
extern int need_complete_save;
......
......@@ -33,7 +33,7 @@ static int panel_been_moved = FALSE;
int base_panels = 0;
extern int config_sync_timeout;
extern GSList *applets_to_sync;
extern int applets_to_sync;
extern int panels_to_sync;
extern int globals_to_sync;
extern int need_complete_save;
......@@ -526,8 +526,7 @@ panel_applet_added(GtkWidget *widget, GtkWidget *applet, gpointer data)
gtk_idle_add(panel_applet_added_idle,info);
/*we will need to save this applet's config now*/
if(g_slist_find(applets_to_sync, info)==NULL)
applets_to_sync = g_slist_prepend(applets_to_sync,info);
applets_to_sync = TRUE;
}
static void
......@@ -570,8 +569,7 @@ panel_applet_removed(GtkWidget *widget, GtkWidget *applet, gpointer data)
}
/*we will need to save this applet's config now*/
if(g_slist_find(applets_to_sync, info)==NULL)
applets_to_sync = g_slist_prepend(applets_to_sync,info);
applets_to_sync = TRUE;
}
static void
......@@ -744,11 +742,7 @@ panel_destroy(GtkWidget *widget, gpointer data)
static void
panel_applet_move(GtkWidget *panel,GtkWidget *widget, gpointer data)
{
AppletInfo *info = gtk_object_get_data(GTK_OBJECT(widget),
"applet_info");
if(g_slist_find(applets_to_sync, info)==NULL)
applets_to_sync = g_slist_prepend(applets_to_sync,info);
applets_to_sync = TRUE;
}
static GtkWidget *
......
......@@ -13,7 +13,7 @@ GlobalConfig temp_config;
extern GlobalConfig global_config;
extern int config_sync_timeout;
extern int panels_to_sync;
extern GSList *applets_to_sync;
extern int applets_to_sync;
extern int globals_to_sync;
extern int need_complete_save;
......
......@@ -15,7 +15,7 @@
#include "panel-include.h"
int config_sync_timeout = 0;
GSList *applets_to_sync = NULL;
int applets_to_sync = FALSE;
int panels_to_sync = FALSE;
int globals_to_sync = FALSE;
int need_complete_save = FALSE;
......@@ -404,7 +404,7 @@ save_panel_configuration(gpointer data, gpointer user_data)
static void
do_session_save(GnomeClient *client,
int complete_sync,
GSList *sync_applets,
int sync_applets,
int sync_panels,
int sync_globals)
{
......@@ -430,14 +430,10 @@ do_session_save(GnomeClient *client,
printf("Saving session: 1"); fflush(stdout);
#endif
if(complete_sync) {
if(complete_sync || sync_applets) {
GSList *li;
for(li=applets;li!=NULL;li=g_slist_next(li))
save_applet_configuration(li->data);
} else {
GSList *li;
for(li = sync_applets; li!=NULL; li=g_slist_next(li))
save_applet_configuration(li->data);
}
#ifdef PANEL_DEBUG
printf(" 2"); fflush(stdout);
......@@ -533,29 +529,25 @@ panel_config_sync(void)
applets_to_sync ||
panels_to_sync ||
globals_to_sync) {
GSList *_applets_to_sync = applets_to_sync;
applets_to_sync = NULL;
if (!(gnome_client_get_flags(client) &
GNOME_CLIENT_IS_CONNECTED)) {
do_session_save(client,need_complete_save,
_applets_to_sync,panels_to_sync,
applets_to_sync,panels_to_sync,
globals_to_sync);
need_complete_save = FALSE;
applets_to_sync = FALSE;
panels_to_sync = FALSE;
globals_to_sync = FALSE;
g_slist_free(_applets_to_sync);
} else {
/*prevent possible races by doing this before requesting
save*/
need_complete_save = FALSE;
applets_to_sync = FALSE;
panels_to_sync = FALSE;
globals_to_sync = FALSE;
g_slist_free(_applets_to_sync);
gnome_client_request_save (client, GNOME_SAVE_LOCAL, FALSE,
GNOME_INTERACT_NONE, FALSE, FALSE);
}
}
}
......@@ -575,7 +567,7 @@ panel_session_save (GnomeClient *client,
int is_fast,
gpointer client_data)
{
do_session_save(client,TRUE,NULL,FALSE,FALSE);
do_session_save(client,TRUE,FALSE,FALSE,FALSE);
/* Always successful. */
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment