[evolution] Bug 610023 - Does not restore "Current View" on startup
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 610023 - Does not restore "Current View" on startup
- Date: Tue, 9 Mar 2010 20:09:44 +0000 (UTC)
commit 89d666e54338b9f8e8c6574aef45060f2371d8d5
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Mar 9 15:07:28 2010 -0500
Bug 610023 - Does not restore "Current View" on startup
Adds a GalViewInstance::loaded signal so EShellView gets notified when
the initial view is loaded.
shell/e-shell-view.c | 4 ++++
widgets/menus/gal-view-instance.c | 11 +++++++++++
widgets/menus/gal-view-instance.h | 1 +
3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 0be1dc1..9a8ec9c 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -1594,5 +1594,9 @@ e_shell_view_new_view_instance (EShellView *shell_view,
view_instance, "changed",
G_CALLBACK (shell_view_update_view_id), shell_view);
+ g_signal_connect_swapped (
+ view_instance, "loaded",
+ G_CALLBACK (shell_view_update_view_id), shell_view);
+
return view_instance;
}
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 7b90310..05b8709 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -51,6 +51,7 @@ G_DEFINE_TYPE (GalViewInstance, gal_view_instance, G_TYPE_OBJECT)
enum {
DISPLAY_VIEW,
CHANGED,
+ LOADED,
LAST_SIGNAL
};
@@ -196,6 +197,15 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ gal_view_instance_signals [LOADED] =
+ g_signal_new ("loaded",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GalViewInstanceClass, loaded),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
klass->display_view = NULL;
klass->changed = NULL;
}
@@ -436,6 +446,7 @@ gal_view_instance_load (GalViewInstance *instance)
if (!instance->loaded) {
load_current_view (instance);
instance->loaded = TRUE;
+ g_signal_emit (instance, gal_view_instance_signals[LOADED], 0);
}
}
diff --git a/widgets/menus/gal-view-instance.h b/widgets/menus/gal-view-instance.h
index 0b0fd42..2ca4e86 100644
--- a/widgets/menus/gal-view-instance.h
+++ b/widgets/menus/gal-view-instance.h
@@ -66,6 +66,7 @@ typedef struct {
void (*display_view) (GalViewInstance *instance,
GalView *view);
void (*changed) (GalViewInstance *instance);
+ void (*loaded) (GalViewInstance *instance);
} GalViewInstanceClass;
/* Standard functions */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]