gl_ui_util_set_verb_list_sensitive (ui_component, doc_verbs, FALSE);
/* Status bar */
+ gl_debug (DEBUG_UI, "START Setup status bar.");
+
bonobo_ui_component_set_prop (ui_component,
"/status", "hidden", "0", NULL);
bonobo_ui_component_set_prop (ui_component,
"/status/Zoom", "hidden", "0", NULL);
+ gl_debug (DEBUG_UI, "END Setup status bar.");
+
- /* add a GeditRecentView object */
+ /* add an eggRecentView object */
recent_model = gl_recent_get_model ();
recent_view =
EGG_RECENT_VIEW (egg_recent_view_bonobo_new (ui_component,
- "/menu/File/Recents"));
+ "/menu/File/Recents"));
egg_recent_view_set_model (recent_view, recent_model);
g_signal_connect (G_OBJECT (recent_view), "activate",
G_CALLBACK (gl_file_open_recent), win);
+ /* Hack: squirrel away a copy to be unreferenced in gl_window_destroy() */
+ g_object_set_data (G_OBJECT (ui_component), "recent-view", recent_view);
+
gl_debug (DEBUG_UI, "END");
}
#include <config.h>
+#include "recent-files/egg-recent-view.h"
#include "ui.h"
#include "window.h"
#include "util.h"
window = GL_WINDOW (gtk_object);
window_list = g_list_remove (window_list, window);
+ if (window->uic) {
+ EggRecentView *recent_view;
+
+ /* Hack: pull out recent view to unreference. */
+ recent_view = g_object_get_data (G_OBJECT(window->uic), "recent-view");
+ if (recent_view) {
+ g_object_unref (recent_view);
+ }
+
+ bonobo_object_unref(window->uic);
+ window->uic = NULL;
+ }
+
if (GTK_OBJECT_CLASS (parent_class)->destroy) {
GTK_OBJECT_CLASS (parent_class)->destroy (gtk_object);
}