aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-10 04:07:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-03-10 04:07:28 +0800
commit89d666e54338b9f8e8c6574aef45060f2371d8d5 (patch)
treeebf99b47d0190c61a368ff004d7e41da51dbdb4d /widgets/menus
parentf7e0850ff206d1aed3922000a8cba39d7bc8848a (diff)
downloadgsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.tar
gsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.tar.gz
gsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.tar.bz2
gsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.tar.lz
gsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.tar.xz
gsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.tar.zst
gsoc2013-evolution-89d666e54338b9f8e8c6574aef45060f2371d8d5.zip
Bug 610023 - Does not restore "Current View" on startup
Adds a GalViewInstance::loaded signal so EShellView gets notified when the initial view is loaded.
Diffstat (limited to 'widgets/menus')
-rw-r--r--widgets/menus/gal-view-instance.c11
-rw-r--r--widgets/menus/gal-view-instance.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 7b903107fe..05b8709573 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 0b0fd42945..2ca4e86de1 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 */