Changeset 213
- Timestamp:
- 06/10/06 14:14:55 (2 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 11 modified
-
configure.ac (modified) (1 diff)
-
src/IMainView.h (modified) (1 diff)
-
src/IPrintView.h (added)
-
src/MainPter.cxx (modified) (2 diffs)
-
src/MainPter.h (modified) (1 diff)
-
src/Makefile.am (modified) (1 diff)
-
src/PrintPter.cxx (added)
-
src/PrintPter.h (added)
-
src/epdfview.h (modified) (1 diff)
-
src/gtk/MainView.cxx (modified) (5 diffs)
-
src/gtk/MainView.h (modified) (1 diff)
-
src/gtk/Makefile.am (modified) (1 diff)
-
src/gtk/PreferencesView.cxx (modified) (2 diffs)
-
src/gtk/PreferencesView.h (modified) (1 diff)
-
src/gtk/PrintView.cxx (added)
-
src/gtk/PrintView.h (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r211 r213 47 47 48 48 EPDFVIEW_PATH_CUPS([CUPS], [have_cups=yes]) 49 AM_CONDITIONAL(cups_printing, test "x$have_cups" = "xyes") 49 50 if test "x$have_cups" = "xyes"; then 50 51 AC_SUBST([CUPS_CFLAGS]) -
trunk/src/IMainView.h
r212 r213 511 511 virtual IPreferencesView *getPreferencesView (void) = 0; 512 512 513 #if defined (HAVE_CUPS) 514 /// 515 /// @brief Gets the print's view. 516 /// 517 /// The print view is created each time the presenter 518 /// class this function, with the main view as its parent window. 519 /// 520 /// @return The new print view. The returned pointer must be 521 /// freed by the caller. 522 /// 523 virtual IPrintView *getPrintView (void) = 0; 524 #endif // HAVE_CUPS 525 513 526 /// 514 527 /// @brief Gets the text from the zoom entry. -
trunk/src/MainPter.cxx
r212 r213 446 446 } 447 447 448 #if defined (HAVE_CUPS) 449 /// 450 /// @brief The "print" action was activated. 451 /// 452 void 453 MainPter::printActivated () 454 { 455 PrintPter *print = new PrintPter (); 456 IPrintView *view = getView ().getPrintView (); 457 if ( NULL != view ) 458 { 459 print->setView (view); 460 } 461 else 462 { 463 delete print; 464 } 465 // There's no need to keep a pointer to the presenter because 466 // it will destroy itself when the dialog is closed. 467 } 468 #endif // HAVE_CUPS 469 448 470 /// 449 471 /// @brief The "Preferences" was activated. … … 458 480 preferences->setView (view); 459 481 } 482 else 483 { 484 delete preferences; 485 } 460 486 // There's no need to keep a pointer of the preferences presenter because 461 // when the dialog is closed o fthe application is finished it will487 // when the dialog is closed or the application is finished it will 462 488 // destroy itself. 463 489 } -
trunk/src/MainPter.h
r209 r213 57 57 void outlineActivated (DocumentOutline *outline); 58 58 void preferencesActivated (void); 59 #if defined (HAVE_CUPS) 60 void printActivated (void); 61 #endif // HAVE_CUPS 59 62 void reloadActivated (void); 60 63 void rotateLeftActivated (void); -
trunk/src/Makefile.am
r200 r213 72 72 $(libshell_ldadd) \ 73 73 $(POPPLER_LIBS) 74 75 if cups_printing 76 libepdfview_a_SOURCES += \ 77 IPrintView.h \ 78 PrintPter.cxx \ 79 PrintPter.h 80 81 libepdfview_a_CXXFLAGS += \ 82 $(CUPS_CFLAGS) 83 84 epdfview_LDADD += \ 85 $(CUPS_LIBS) 86 endif 87 -
trunk/src/epdfview.h
r200 r213 40 40 #include <JobRender.h> 41 41 #include <JobSave.h> 42 #if defined (HAVE_CUPS) 43 #endif // HAVE_CUPS 42 44 43 45 #include <IFindView.h> 44 46 #include <IPageView.h> 45 47 #include <IPreferencesView.h> 48 #if defined (HAVE_CUPS) 49 #include <IPrintView.h> 50 #endif // HAVE_CUPS 46 51 #include <IMainView.h> 47 52 #include <FindPter.h> 48 53 #include <PagePter.h> 49 54 #include <PreferencesPter.h> 55 #if defined (HAVE_CUPS) 56 #include <PrintPter.h> 57 #endif // HAVE_CUPS 50 58 #include <MainPter.h> 51 59 -
trunk/src/gtk/MainView.cxx
r212 r213 26 26 #include "PageView.h" 27 27 #include "PreferencesView.h" 28 #if defined (HAVE_CUPS) 29 #include "PrintView.h" 30 #endif // HAVE_CUPS 28 31 #include "MainView.h" 29 32 … … 543 546 } 544 547 545 void 548 void 546 549 MainView::sensitiveZoomWidth (gboolean sensitive) 547 550 { 548 GtkAction *zoomWidth = 551 GtkAction *zoomWidth = 549 552 gtk_ui_manager_get_action (m_UIManager, "/MenuBar/ViewMenu/ZoomWidth"); 550 553 gtk_action_set_sensitive (zoomWidth, sensitive); 551 554 } 552 555 553 void 556 void 554 557 MainView::show (void) 555 { 558 { 556 559 Config &config = Config::getConfig (); 557 560 gtk_window_set_default_size (GTK_WINDOW (m_MainWindow), … … 563 566 } 564 567 565 void 568 void 566 569 MainView::showErrorMessage (const gchar *title, const gchar *body) 567 570 { … … 681 684 return new PreferencesView (GTK_WINDOW (m_MainWindow)); 682 685 } 686 687 #if defined (HAVE_CUPS) 688 IPrintView * 689 MainView::getPrintView () 690 { 691 return new PrintView (GTK_WINDOW (m_MainWindow)); 692 } 693 #endif // HAVE_CUPS 683 694 684 695 void … … 1197 1208 1198 1209 MainPter *pter = (MainPter *)data; 1210 pter->printActivated (); 1199 1211 } 1200 1212 #endif // HAVE_CUPS -
trunk/src/gtk/MainView.h
r212 r213 70 70 IPageView *getPageView (void); 71 71 IPreferencesView *getPreferencesView (void); 72 #if defined (HAVE_CUPS) 73 IPrintView *getPrintView (void); 74 #endif // HAVE_CUPS 72 75 const gchar *getZoomText (void); 73 76 void setTitle (const gchar *title); -
trunk/src/gtk/Makefile.am
r199 r213 17 17 -I$(top_srcdir)/src \ 18 18 $(GTK2_CFLAGS) 19 20 if cups_printing 21 libshell_gtk_a_SOURCES += \ 22 PrintView.cxx \ 23 PrintView.h 24 endif -
trunk/src/gtk/PreferencesView.cxx
r199 r213 27 27 static void preferences_view_browser_command_changed (GtkEntry *, gpointer); 28 28 29 PreferencesView::PreferencesView (GtkWindow *parent) 29 PreferencesView::PreferencesView (GtkWindow *parent): 30 IPreferencesView () 30 31 { 31 32 m_PreferencesDialog = gtk_dialog_new_with_buttons (_("Preferences"), … … 33 34 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, 34 35 NULL); 35 // Utility dialog should no wshow itself in the window list.36 // Utility dialog should not show itself in the window list. 36 37 gtk_window_set_skip_taskbar_hint (GTK_WINDOW (m_PreferencesDialog), TRUE); 37 38 -
trunk/src/gtk/PreferencesView.h
r199 r213 30 30 virtual const gchar *getBrowserCommandLine (void); 31 31 32 GtkWidget *createExternalCommandsTab (void);33 34 32 protected: 35 33 GtkWidget *m_PreferencesDialog; 36 34 GtkWidget *m_BrowserCommandLine; 35 36 GtkWidget *createExternalCommandsTab (void); 37 37 }; 38 38 }
