summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-21 20:04:54 +0300
committermonsta <[email protected]>2015-09-01 13:10:22 +0300
commit7698492c68b9803372f781c052004953cc8d59cb (patch)
treed4ca86f16bef3d28284e7ff1bacc4fd7f6763ab9
parentc9b5afb6c3e16f8f650a230b0f717178bc7fd329 (diff)
downloadmate-utils-7698492c68b9803372f781c052004953cc8d59cb.tar.bz2
mate-utils-7698492c68b9803372f781c052004953cc8d59cb.tar.xz
logview: remember active log for next application run
from https://git.gnome.org/browse/gnome-system-log/commit/?id=4e8122013893df6a8dc0e79ff27e9fe5047cf481
-rw-r--r--logview/logview-manager.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/logview/logview-manager.c b/logview/logview-manager.c
index a87da3ec..54b5320b 100644
--- a/logview/logview-manager.c
+++ b/logview/logview-manager.c
@@ -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) {