]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/gpdf.cc
Works with cleaner Bonobo toolbar API.
[evince.git] / pdf / xpdf / gpdf.cc
index d7e91347f44c710667421dc9dc0ed8de11f641a6..e61929442b9ec59b35c82276f145b8082308b945 100644 (file)
@@ -41,8 +41,6 @@ extern "C" {
 #include "Error.h"
 #include "config.h"
 
-#define UNTESTED 0
-
 poptContext ctx;
 gint  gpdf_debug=0;
 
@@ -107,7 +105,7 @@ static GnomeUIInfo container_file_menu [] = {
 static GnomeUIInfo container_menu_zoom [] = {
        { GNOME_APP_UI_ITEM, N_("_Zoom in"),
          N_("Increase the size of objects in the PDF"),
-         NULL, zoom_in_cmd },
+         zoom_in_cmd },
        { GNOME_APP_UI_ITEM, N_("_Zoom out"),
          N_("Decrease the size of objects in the PDF"),
          zoom_out_cmd },
@@ -424,7 +422,7 @@ container_set_view (Container *container, Component *component)
        /*
         * Create the remote view and the local ViewFrame.
         */
-       view_frame = gnome_client_site_embeddable_new_view (component->client_site);
+       view_frame = gnome_client_site_new_view (component->client_site);
        component->view_frame = view_frame;
 
        /*
@@ -494,7 +492,7 @@ container_launch_component (GnomeClientSite *client_site,
         * Launch the component.
         */
        object_server = gnome_object_activate_with_goad_id (
-               NULL, component_goad_id, 0, NULL);
+               NULL, component_goad_id, GOAD_ACTIVATE_SHLIB, NULL);
 
        if (object_server == NULL)
                return NULL;
@@ -611,18 +609,12 @@ container_create_menus (Container *container)
 static void
 container_create_toolbar (Container *container)
 {
-       GnomeUIHandlerMenuItem *toolbar;
-
-#if UNTESTED > 0
-       gnome_ui_handler_create_menubar (container->uih);
+       GnomeUIHandlerToolbarItem *toolbar;
 
-       /*
-        * Create the basic menus out of UIInfo structures.
-        */
+       gnome_ui_handler_create_toolbar (container->uih, "pdf");
        toolbar = gnome_ui_handler_toolbar_parse_uiinfo_list_with_data (container_toolbar, container);
-       gnome_ui_handler_toolbar_add_list (container->uih, "/", menu_list);
-       gnome_ui_handler_toolbar_free_list (menu_list);
-#endif
+       gnome_ui_handler_toolbar_add_list (container->uih, "/", toolbar);
+       gnome_ui_handler_toolbar_free_list (toolbar);
 }
 
 static Container *
@@ -690,6 +682,7 @@ main (int argc, char **argv)
 
   if (bonobo_init (orb, NULL, NULL) == FALSE)
     g_error (_("Could not initialize Bonobo!\n"));
+  bonobo_activate ();
 
   view_files = poptGetArgs (ctx);
 
@@ -704,8 +697,8 @@ main (int argc, char **argv)
   
   poptFreeContext (ctx);
 
-  bonobo_activate ();  
   gtk_main ();
        
   return 0;
 }
+