Skip to content
Snippets Groups Projects
Commit a6076392 authored by Jerome Guelfucci's avatar Jerome Guelfucci
Browse files

* src/main.c:

	  - save the last user when we are in CLI.
		- free the last user when exiting.


(Old svn revision: 7394)
parent cfa8a003
No related branches found
No related tags found
No related merge requests found
2009-05-23 jeromeg
* src/main.c:
- save the last user when we are in CLI.
- free the last user when exiting.
2009-05-23 jeromeg
* lib/screenshooter-zimage.c: check if one of the fields is
......
......@@ -240,7 +240,7 @@ int main (int argc, char **argv)
gtk_main ();
/* Save preferences */
if (!(fullscreen || window || region))
if (!sd->cli)
{
const gchar *preferences_file =
xfce_resource_save_location (XFCE_RESOURCE_CONFIG,
......@@ -250,9 +250,33 @@ int main (int argc, char **argv)
if (preferences_file != NULL)
screenshooter_write_rc_file (preferences_file, sd);
}
else if (sd->action == UPLOAD)
{
const gchar *preferences_file =
xfce_resource_save_location (XFCE_RESOURCE_CONFIG,
"xfce4/xfce4-screenshooter",
TRUE);
if (preferences_file != NULL)
{
XfceRc *rc;
TRACE ("Open the rc file");
rc = xfce_rc_simple_open (preferences_file, FALSE);
if (rc != NULL)
{
xfce_rc_write_entry (rc, "last_user", sd->last_user);
TRACE ("Flush and close the rc file");
xfce_rc_flush (rc);
xfce_rc_close (rc);
}
}
}
g_free (sd->screenshot_dir);
g_free (sd->app);
g_free (sd->last_user);
g_free (sd);
TRACE ("Ciao");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment