Changeset 42

Show
Ignore:
Timestamp:
04/12/06 12:12:23 (2 years ago)
Author:
jordi
Message:

The stock icons are now stored in the $(pkgdatadir)/pixmap instead. Also, the UI definition is kept on a file (epdfview-ui.xml) which is installed on $(pkgdatadir)/ui.

Location:
trunk
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/data/Makefile.am

    r40 r42  
    11# Process this file with automake to produce a Makefile.in file. 
    22 
    3 stockdir = $(datadir)/pixmaps/epdfview 
     3stockdir = $(pkgdatadir)/pixmaps 
    44stock_DATA =    \ 
    55    stock_rotate-90.png \ 
    66    stock_rotate-270.png    \ 
    7     stock_zoom-page-width.png    
     7    stock_zoom-page-width.png 
     8 
     9uidir = $(pkgdatadir)/ui 
     10ui_DATA =   \ 
     11    epdfview-ui.xml 
  • trunk/src/gtk/MainView.cxx

    r41 r42  
    375375        { "About", GTK_STOCK_ABOUT, "_About", NULL, NULL, NULL } 
    376376    }; 
    377      
    378     gchar * uiString =  
    379         "<ui>" 
    380         "  <menubar name='MenuBar'>" 
    381         "    <menu action='FileMenu'>" 
    382         "      <menuitem name='OpenFile' action='OpenFile'/>" 
    383         "      <separator/>" 
    384         "      <menuitem name='Quit' action='Quit'/>" 
    385         "    </menu>" 
    386         "    <menu action='ViewMenu'>" 
    387         "      <menuitem name='ZoomIn' action='ZoomIn'/>" 
    388         "      <menuitem name='ZoomOut' action='ZoomOut'/>" 
    389         "      <menuitem name='ZoomFit' action='ZoomFit'/>" 
    390         "      <menuitem name='ZoomWidth' action='ZoomWidth'/>" 
    391         "      <separator />" 
    392         "      <menuitem name='RotateRight' action='RotateRight'/>" 
    393         "      <menuitem name='RotateLeft' action='RotateLeft'/>" 
    394         "    </menu>" 
    395         "    <menu action='GoMenu'>" 
    396         "      <menuitem name='GoToFirstPage' action='GoToFirstPage'/>" 
    397         "      <menuitem name='GoToPreviousPage' action='GoToPreviousPage'/>" 
    398         "      <menuitem name='GoToNextPage' action='GoToNextPage'/>" 
    399         "      <menuitem name='GoToLastPage' action='GoToLastPage'/>" 
    400         "    </menu>" 
    401         "    <menu action='HelpMenu'>" 
    402         "      <menuitem name='About' action='About'/>" 
    403         "    </menu>" 
    404         "  </menubar>" 
    405         "  <toolbar name='ToolBar'>" 
    406         "    <toolitem name='OpenFile' action='OpenFile'/>" 
    407         "    <separator/>" 
    408         "    <toolitem name='GoToPreviousPage' action='GoToPreviousPage'/>" 
    409         "    <toolitem name='GoToNextPage' action='GoToNextPage'/>" 
    410         "    <separator/>" 
    411         "    <toolitem name='ZoomIn' action='ZoomIn'/>" 
    412         "    <toolitem name='ZoomOut' action='ZoomOut'/>" 
    413         "    <toolitem name='ZoomFit' action='ZoomFit'/>" 
    414         "    <toolitem name='ZoomWidth' action='ZoomWidth'/>" 
    415         "  </toolbar>" 
    416         "</ui>"; 
    417      
     377         
    418378    GtkActionGroup *actionGroup = gtk_action_group_new ("ePDFView"); 
    419379    // The data passed to all actions is the presenter 
     
    424384     
    425385    GError *error = NULL; 
    426     if ( !gtk_ui_manager_add_ui_from_string (m_UIManager, uiString, 
    427                                              strlen (uiString), &error) ) 
     386    if ( !gtk_ui_manager_add_ui_from_file (m_UIManager,  
     387                                           DATADIR"/ui/epdfview-ui.xml",  
     388                                           &error) ) 
    428389    { 
    429390        g_message (_("Error building UI manager: %s\n"), error->message); 
  • trunk/src/gtk/Makefile.am

    r40 r42  
    88 
    99libshell_gtk_a_CXXFLAGS =   \ 
    10     -DDATADIR='"$(datadir)"'    \ 
     10    -DDATADIR='"$(pkgdatadir)"' \ 
    1111    -I$(top_srcdir)/src \ 
    1212    $(GTK2_CFLAGS) 
  • trunk/src/gtk/StockIcons.cxx

    r40 r42  
    4343    for ( int iconIndex = 0 ; iconIndex < numIcons ; iconIndex++ ) 
    4444    { 
    45         gchar *fileName = g_strdup_printf ("%s/pixmaps/epdfview/%s", DATADIR, 
     45        gchar *fileName = g_strdup_printf ("%s/pixmaps/%s", DATADIR, 
    4646                stockIcons[iconIndex].iconFile); 
    4747        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (fileName, NULL);