Changeset 45

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

Added support for native language and added the Spanish and Catalan translations.

Location:
trunk
Files:
3 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/IDocument.cxx

    r43 r45  
    7373    { 
    7474        case DocumentErrorNone: 
    75             errorMessage = g_strdup (_("No error")); 
     75            errorMessage = g_strdup (_("No error.")); 
    7676            break; 
    7777        case DocumentErrorOpenFile: 
     
    8888            break; 
    8989        case DocumentErrorHighlightFile: 
    90             errorMessage = g_strdup (_("Nonexistent or invlid highlight file.")); 
     90            errorMessage = g_strdup (_("Nonexistent or invalid highlight file.")); 
    9191            break; 
    9292        case DocumentErrorBadPrinter: 
     
    106106            break; 
    107107        default: 
    108             errorMessage = g_strdup_printf (_("Unknown error (%d)"), errorCode);             
     108            errorMessage = g_strdup_printf (_("Unknown error (%d)."), errorCode);             
    109109    } 
    110110 
  • trunk/src/Makefile.am

    r33 r45  
    3333 
    3434epdfview_CXXFLAGS = \ 
     35    -DLOCALEDIR='"$(datadir)/locale"'   \ 
    3536    $(GLIB_CFLAGS)  \ 
    3637    $(POPPLER_CFLAGS)   \ 
  • trunk/src/gtk/MainView.cxx

    r44 r45  
    3131// Constants. 
    3232static gint CURRENT_PAGE_POS = 5; 
     33static gint PAGE_VIEW_PADDING = 12; 
     34static gint SCROLLBARS_SIZE = 20; 
    3335 
    3436// Forward delarations. 
     
    370372    g_assert (NULL != width && "Tried to save the width to a NULL pointer."); 
    371373    g_assert (NULL != height && "Tried to save the height to a NULL pointer."); 
    372      
    373     *width = m_PageView->allocation.width - 12; 
    374     *height = m_PageViewScroll->allocation.height - 12; 
     374    
     375    gint scrollSize = SCROLLBARS_SIZE + PAGE_VIEW_PADDING * 2; 
     376    *width = m_PageViewScroll->allocation.width - scrollSize; 
     377    *height = m_PageViewScroll->allocation.height - scrollSize; 
    375378} 
    376379 
     
    420423                                    GTK_POLICY_AUTOMATIC); 
    421424    m_PageView = gtk_image_new  (); 
     425    gtk_misc_set_padding (GTK_MISC (m_PageView),  
     426                          PAGE_VIEW_PADDING, PAGE_VIEW_PADDING); 
    422427    gtk_scrolled_window_add_with_viewport ( 
    423428            GTK_SCROLLED_WINDOW (m_PageViewScroll), m_PageView); 
     
    431436{         
    432437    GtkActionGroup *actionGroup = gtk_action_group_new ("ePDFView"); 
     438    // Set the translation domain for labels and tooltips. 
     439    gtk_action_group_set_translation_domain (actionGroup, PACKAGE); 
    433440    // The data passed to all actions is the presenter 
    434441    gtk_action_group_add_actions (actionGroup, g_NormalEntries, 
  • trunk/src/main.cxx

    r43 r45  
    1919#include <stdlib.h> 
    2020#include <gettext.h> 
     21#include <locale.h> 
    2122#include <gtk/gtk.h> 
    2223#include <IMainView.h> 
     
    2930main (int argc, char **argv) 
    3031{ 
     32    // Enable NLS support. 
     33    setlocale (LC_ALL, ""); 
     34    bindtextdomain (PACKAGE, LOCALEDIR); 
     35    bind_textdomain_codeset (PACKAGE, "UTF-8"); 
     36    textdomain (PACKAGE); 
    3137    // Initialize the GTK library. 
    3238    gtk_init (&argc, &argv);