Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2005-04-08 05:28:38 (GMT)
committer Jonathan Blandford <jrb@src.gnome.org>2005-04-08 05:28:38 (GMT)
commitfa65a5177e3045d1ddd3f0c7d60b831a5134d57a (patch)
treeefffcb3c53e00a918c12ed07036fe953790eafe8 /shell/ev-window.c
parentbb24964d2d9593e35ff5693129d8cb0a688be47b (diff)
Big reworking to make completions work iff we have >= GTK-2.7.0
Fri Apr 8 01:12:24 2005 Jonathan Blandford <jrb@redhat.com> * shell/ev-page-action.h: * shell/ev-page-action.c: (ev_page_action_widget_init), (ev_page_action_widget_class_init), (page_changed_cb), (create_tool_item), (update_page_cache), (build_new_tree_cb), (get_filter_model_from_model), (match_selected_cb), (display_completion_text), (match_completion), (update_model), (connect_proxy), (ev_page_action_set_property), (ev_page_action_get_property), (ev_page_action_set_document), (ev_page_action_set_model), (ev_page_action_class_init): Big reworking to make completions work iff we have >= GTK-2.7.0 * shell/ev-sidebar-links.c: (ev_sidebar_links_set_property), (ev_sidebar_links_get_property), (ev_sidebar_links_class_init), (job_finished_cb): We now have a 'model' property that is set when the links are loaded. This can be caught with "notify::model" * shell/ev-window.c: (sidebar_widget_model_set), (ev_window_init): listen for the model to be set, and propagate it to the action.
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index c351502..eb50e1c 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -2292,6 +2292,22 @@ load_chrome (void)
}
static void
+sidebar_widget_model_set (EvSidebarLinks *ev_sidebar_links,
+ GParamSpec *pspec,
+ EvWindow *ev_window)
+{
+ GtkTreeModel *model;
+ GtkAction *action;
+
+ g_object_get (G_OBJECT (ev_sidebar_links),
+ "model", &model,
+ NULL);
+
+ action = gtk_action_group_get_action (ev_window->priv->action_group, PAGE_SELECTOR_ACTION);
+ ev_page_action_set_model (EV_PAGE_ACTION (action), model);
+}
+
+static void
ev_window_init (EvWindow *ev_window)
{
GtkActionGroup *action_group;
@@ -2404,6 +2420,10 @@ ev_window_init (EvWindow *ev_window)
/* Stub sidebar, for now */
sidebar_widget = ev_sidebar_links_new ();
+ g_signal_connect (sidebar_widget,
+ "notify::model",
+ G_CALLBACK (sidebar_widget_model_set),
+ ev_window);
gtk_widget_show (sidebar_widget);
ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
"index",