X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-window.c;h=a7debed616902f9ba72360aefe5ecd877ed343be;hb=46746347b389f78dfd026b511600fbe46b019bc1;hp=5f522c15ab840fdce6d6d17bfaac088f31611240;hpb=764836d36a1391ed0bc03841c68ed768e7ec94b6;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index 5f522c15..a7debed6 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -23,7 +23,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -433,11 +433,6 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) ev_window_set_action_sensitive (ev_window, ZOOM_CONTROL_ACTION, has_pages); ev_window_set_action_sensitive (ev_window, NAVIGATION_ACTION, FALSE); - /* Help menu */ -#ifdef G_OS_WIN32 - ev_window_set_action_sensitive (ev_window, "HelpContents", FALSE); -#endif - ev_window_update_actions (ev_window); } @@ -3572,6 +3567,7 @@ ev_window_run_presentation (EvWindow *window) gboolean fullscreen_window = TRUE; guint current_page; guint rotation; + gboolean inverted_colors; if (EV_WINDOW_IS_PRESENTATION (window)) return; @@ -3583,8 +3579,11 @@ ev_window_run_presentation (EvWindow *window) current_page = ev_document_model_get_page (window->priv->model); rotation = ev_document_model_get_rotation (window->priv->model); - window->priv->presentation_view = - ev_view_presentation_new (window->priv->document, current_page, rotation); + inverted_colors = ev_document_model_get_inverted_colors (window->priv->model); + window->priv->presentation_view = ev_view_presentation_new (window->priv->document, + current_page, + rotation, + inverted_colors); g_signal_connect_swapped (window->priv->presentation_view, "finished", G_CALLBACK (ev_window_view_presentation_finished), window); @@ -3813,6 +3812,7 @@ ev_window_cmd_edit_toolbar (GtkAction *action, EvWindow *ev_window) { GtkWidget *dialog; GtkWidget *editor; + GtkWidget *content_area; EggEditableToolbar *toolbar; dialog = gtk_dialog_new_with_buttons (_("Toolbar Editor"), @@ -3821,9 +3821,10 @@ ev_window_cmd_edit_toolbar (GtkAction *action, EvWindow *ev_window) GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)), 5); - gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2); + gtk_box_set_spacing (GTK_BOX (content_area), 2); gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 400); @@ -3834,7 +3835,7 @@ ev_window_cmd_edit_toolbar (GtkAction *action, EvWindow *ev_window) gtk_container_set_border_width (GTK_CONTAINER (editor), 5); gtk_box_set_spacing (GTK_BOX (EGG_TOOLBAR_EDITOR (editor)), 5); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), editor); + gtk_container_add (GTK_CONTAINER (content_area), editor); egg_editable_toolbar_set_edit_mode (toolbar, TRUE); @@ -3936,13 +3937,19 @@ ev_window_cmd_view_autoscroll (GtkAction *action, EvWindow *ev_window) ev_view_autoscroll_start (EV_VIEW (ev_window->priv->view)); } +#if OFFLINE_HELP_ENABLED +#define EV_HELP "ghelp:evince" +#else +#define EV_HELP "http://library.gnome.org/users/evince/stable/" +#endif + static void ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window) { GError *error = NULL; gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (ev_window)), - "ghelp:evince", + EV_HELP, gtk_get_current_event_time (), &error); if (error) { @@ -4199,7 +4206,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) "GNU General Public License for more details.\n"), N_("You should have received a copy of the GNU General Public License " "along with Evince; if not, write to the Free Software Foundation, Inc., " - "59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n") + "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n") }; char *license_trans; @@ -4301,12 +4308,13 @@ ev_window_sidebar_visibility_changed_cb (EvSidebar *ev_sidebar, action = gtk_action_group_get_action (ev_window->priv->action_group, "ViewSidebar"); if (!EV_WINDOW_IS_PRESENTATION (ev_window)) { - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - GTK_WIDGET_VISIBLE (ev_sidebar)); + gboolean visible = gtk_widget_get_visible (GTK_WIDGET (ev_sidebar)); + + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible); if (ev_window->priv->metadata) ev_metadata_set_boolean (ev_window->priv->metadata, "sidebar_visibility", - GTK_WIDGET_VISIBLE (ev_sidebar)); + visible); } } @@ -4625,7 +4633,7 @@ find_bar_visibility_changed_cb (EggFindBar *find_bar, { gboolean visible; - visible = GTK_WIDGET_VISIBLE (find_bar); + visible = gtk_widget_get_visible (GTK_WIDGET (find_bar)); if (ev_window->priv->document && EV_IS_DOCUMENT_FIND (ev_window->priv->document)) { @@ -4935,7 +4943,7 @@ ev_window_key_press_event (GtkWidget *widget, */ if (priv->view) { g_object_ref (priv->view); - if (GTK_WIDGET_IS_SENSITIVE (priv->view)) + if (gtk_widget_is_sensitive (priv->view)) handled = gtk_widget_event (priv->view, (GdkEvent*) event); g_object_unref (priv->view); } @@ -4946,7 +4954,7 @@ ev_window_key_press_event (GtkWidget *widget, if (priv->menubar_accel_keyval != 0 && event->keyval == priv->menubar_accel_keyval && modifier == priv->menubar_accel_modifier) { - if (!GTK_WIDGET_VISIBLE (priv->menubar)) { + if (!gtk_widget_get_visible (priv->menubar)) { g_signal_connect (priv->menubar, "deactivate", G_CALLBACK (menubar_deactivate_cb), ev_window); @@ -5409,7 +5417,7 @@ window_configure_event_cb (EvWindow *window, GdkEventConfigure *event, gpointer if (!window->priv->metadata) return FALSE; - state = gdk_window_get_state (GTK_WIDGET (window)->window); + state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (window))); if (!(state & GDK_WINDOW_STATE_FULLSCREEN)) { if (!ev_window_is_empty (window) && window->priv->document) {