[gnome-system-log] Store the selected log
- From: Sebastien Bacher <sbacher src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-log] Store the selected log
- Date: Tue, 10 Apr 2012 21:20:12 +0000 (UTC)
commit 4e8122013893df6a8dc0e79ff27e9fe5047cf481
Author: Sebastien Bacher <seb128 ubuntu com>
Date: Thu Apr 5 17:43:51 2012 +0200
Store the selected log
so the selection restored when the application is restarted
(Closes: #673584)
src/logview-manager.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/logview-manager.c b/src/logview-manager.c
index 6d6bfb0..df8e4ea 100644
--- a/src/logview-manager.c
+++ b/src/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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]