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() */
+ /* Squirrel away a copy to be unreferenced in gl_ui_unref() */
g_object_set_data (G_OBJECT (ui_component), "recent-view", recent_view);
gl_debug (DEBUG_UI, "END");
}
+/*****************************************************************************/
+/* Unref wrapper. */
+/*****************************************************************************/
+void
+gl_ui_unref (BonoboUIComponent *ui_component)
+{
+ EggRecentView *recent_view;
+
+ /* Pull out recent view to unreference. */
+ recent_view = g_object_get_data (G_OBJECT(ui_component), "recent-view");
+ if (recent_view) {
+ g_object_unref (recent_view);
+ }
+
+ bonobo_object_unref(ui_component);
+}
+
/*****************************************************************************/
/* Update all verbs of given UI component. */
/*****************************************************************************/
GtkWidget *cursor_info_frame,
GtkWidget *zoom_info_frame);
+void gl_ui_unref (BonoboUIComponent *ui_component);
+
void gl_ui_update_all (BonoboUIComponent *ui_component,
glView *view);
#include <config.h>
-#include "recent-files/egg-recent-view.h"
#include "ui.h"
#include "window.h"
#include "util.h"
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);
+ gl_ui_unref(window->uic);
window->uic = NULL;
}