Commit 4e812201 authored by Sébastien Bacher's avatar Sébastien Bacher
Browse files

Store the selected log

so the selection restored when the application is restarted
(Closes: #673584)
parent be42bcaf
......@@ -284,6 +284,8 @@ logview_manager_set_active_log (LogviewManager *manager,
LogviewLog *log)
{
LogviewLog *old_log = NULL;
GFile *file;
char *path;
g_assert (LOGVIEW_IS_MANAGER (manager));
......@@ -293,6 +295,12 @@ logview_manager_set_active_log (LogviewManager *manager,
manager->priv->active_log = g_object_ref (log);
file = logview_log_get_gfile (log);
path = g_file_get_path (file);
logview_prefs_store_active_logfile (logview_prefs_get (), path);
g_free (path);
g_object_unref (file);
g_signal_emit (manager, signals[ACTIVE_CHANGED], 0, log, old_log, NULL);
if (old_log) {
......
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