]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-navigation-action.c
Allow making backend modules resident. This is needed only for some
[evince.git] / shell / ev-navigation-action.c
index 9da89f993c10149f9248799ecdecc8cbb51ef35a..6a5e3a522ddce0623b10baaf7123ad21539566d9 100644 (file)
@@ -60,9 +60,8 @@ ev_navigation_action_history_changed (EvHistory *history,
 {
        EvNavigationAction *action = EV_NAVIGATION_ACTION (data);
        
 {
        EvNavigationAction *action = EV_NAVIGATION_ACTION (data);
        
-       gtk_action_set_sensitive (action, ev_history_get_n_links (history) > 0);
-       
-       return;
+       gtk_action_set_sensitive (GTK_ACTION (action),
+                                 ev_history_get_n_links (history) > 0);
 }
 
 void
 }
 
 void
@@ -75,7 +74,7 @@ ev_navigation_action_set_history (EvNavigationAction *action,
                                   (gpointer) &action->priv->history);
        
        g_signal_connect_object (history, "changed",
                                   (gpointer) &action->priv->history);
        
        g_signal_connect_object (history, "changed",
-                                ev_navigation_action_history_changed,
+                                G_CALLBACK (ev_navigation_action_history_changed),
                                 action, 0);
 }
 
                                 action, 0);
 }
 
@@ -134,12 +133,12 @@ build_menu (EvNavigationAction *action)
        EvHistory *history = action->priv->history;
        int start, end, i;
 
        EvHistory *history = action->priv->history;
        int start, end, i;
 
-       menu = GTK_MENU_SHELL (gtk_menu_new ());
-
-       if (history == NULL) {
-               return GTK_WIDGET (menu);
+       if (history == NULL || ev_history_get_n_links (history) <= 0) {
+               return NULL;
        }
 
        }
 
+       menu = GTK_MENU_SHELL (gtk_menu_new ());
+
        start = 0;
        end = ev_history_get_n_links (history);
 
        start = 0;
        end = ev_history_get_n_links (history);