Changeset 37

Show
Ignore:
Timestamp:
04/12/06 06:40:10 (3 years ago)
Author:
jordi
Message:

The gtk shell can rotate and go to any page forward and backward. Also to the first and the last page.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gtk/MainView.cxx

    r36 r37  
    3030static void main_window_go_to_next_page_cb (GtkWidget *, gpointer); 
    3131static void main_window_go_to_previous_page_cb (GtkWidget *, gpointer); 
     32static void main_window_rotate_left (GtkWidget *, gpointer); 
     33static void main_window_rotate_right (GtkWidget *, gpointer); 
    3234static void main_window_open_file_cb (GtkWidget *, gpointer); 
    3335static void main_window_quit_cb (GtkWidget *, gpointer); 
     
    269271        { "ZoomFit", GTK_STOCK_ZOOM_FIT, _("Zoom to _Fit"), NULL, NULL, NULL }, 
    270272        { "ZoomWidth", NULL, _("Zoom to _Width"), NULL, NULL, NULL }, 
    271         { "RotateRight", GTK_STOCK_REDO, _("Rotate _Right"), NULL, NULL, NULL}, 
    272         { "RotateLeft", GTK_STOCK_UNDO, _("Rotate Left"), NULL, NULL, NULL}, 
     273        { "RotateRight", GTK_STOCK_REDO, _("Rotate _Right"), NULL, NULL, G_CALLBACK (main_window_rotate_right)}, 
     274        { "RotateLeft", GTK_STOCK_UNDO, _("Rotate Left"), NULL, NULL, G_CALLBACK (main_window_rotate_left)}, 
    273275        { "GoToFirstPage", GTK_STOCK_GOTO_FIRST, _("_First Page"), "Home", NULL, G_CALLBACK (main_window_go_to_first_page_cb) }, 
    274276        { "GoToNextPage", GTK_STOCK_GO_FORWARD, _("_Next Page"), "Page_Down", NULL, G_CALLBACK (main_window_go_to_next_page_cb) }, 
     
    351353 
    352354void 
    353 main_window_go_to_first_page_cb (GtkWidget *, gpointer) 
    354 { 
    355 } 
    356  
    357 void 
    358 main_window_go_to_last_page_cb (GtkWidget *, gpointer) 
    359 { 
    360 } 
    361  
    362 void 
    363 main_window_go_to_next_page_cb (GtkWidget *, gpointer) 
    364 { 
    365 } 
    366  
    367 void 
    368 main_window_go_to_previous_page_cb (GtkWidget *, gpointer) 
    369 { 
     355main_window_go_to_first_page_cb (GtkWidget *widget, gpointer data) 
     356{ 
     357    g_assert ( NULL != data && "The data parameter is NULL."); 
     358 
     359    MainPter *pter = (MainPter *)data; 
     360    pter->goToFirstPageActivated (); 
     361} 
     362 
     363void 
     364main_window_go_to_last_page_cb (GtkWidget *widget, gpointer data) 
     365{ 
     366    g_assert ( NULL != data && "The data parameter is NULL."); 
     367 
     368    MainPter *pter = (MainPter *)data; 
     369    pter->goToLastPageActivated (); 
     370} 
     371 
     372void 
     373main_window_go_to_next_page_cb (GtkWidget *widget, gpointer data) 
     374{ 
     375    g_assert ( NULL != data && "The data parameter is NULL."); 
     376 
     377    MainPter *pter = (MainPter *)data; 
     378    pter->goToNextPageActivated (); 
     379} 
     380 
     381void 
     382main_window_go_to_previous_page_cb (GtkWidget *widget, gpointer data) 
     383{ 
     384    g_assert ( NULL != data && "The data parameter is NULL."); 
     385 
     386    MainPter *pter = (MainPter *)data; 
     387    pter->goToPreviousPageActivated (); 
     388} 
     389 
     390void 
     391main_window_rotate_left (GtkWidget *widget, gpointer data) 
     392{ 
     393    g_assert ( NULL != data && "The data parameter is NULL."); 
     394 
     395    MainPter *pter = (MainPter *)data; 
     396    pter->rotateLeftActivated (); 
     397} 
     398 
     399void 
     400main_window_rotate_right (GtkWidget *widget, gpointer data) 
     401{ 
     402    g_assert ( NULL != data && "The data parameter is NULL."); 
     403 
     404    MainPter *pter = (MainPter *)data; 
     405    pter->rotateRightActivated (); 
    370406} 
    371407