From: Nickolay V. Shmyrev Date: Sun, 1 Oct 2006 10:50:42 +0000 (+0000) Subject: Don't make sidebar close button insensitive. Fixes bug #357871. X-Git-Tag: EVINCE_0_6_1~13 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=e637fd672cb1fa494600c66dc7b49a7f77c78aa8;p=evince.git Don't make sidebar close button insensitive. Fixes bug #357871. 2006-10-01 Nickolay V. Shmyrev * shell/ev-sidebar.c: (ev_sidebar_init), (ev_sidebar_set_document): Don't make sidebar close button insensitive. Fixes bug #357871. --- diff --git a/ChangeLog b/ChangeLog index cd8ca393..d4d6ce10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-01 Nickolay V. Shmyrev + + * shell/ev-sidebar.c: (ev_sidebar_init), (ev_sidebar_set_document): + + Don't make sidebar close button insensitive. Fixes + bug #357871. + 2006-10-01 Nickolay V. Shmyrev * shell/ev-window.c: (ev_window_setup_action_sensitivity), diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c index ca04157e..90e8c1da 100644 --- a/shell/ev-sidebar.c +++ b/shell/ev-sidebar.c @@ -48,6 +48,7 @@ enum struct _EvSidebarPrivate { GtkWidget *notebook; + GtkWidget *select_button; GtkWidget *menu; GtkWidget *hbox; GtkWidget *label; @@ -331,7 +332,6 @@ ev_sidebar_init (EvSidebar *ev_sidebar) { GtkWidget *hbox; GtkWidget *close_button; - GtkWidget *select_button; GtkWidget *select_hbox; GtkWidget *arrow; GtkWidget *image; @@ -352,12 +352,12 @@ ev_sidebar_init (EvSidebar *ev_sidebar) gtk_box_pack_start (GTK_BOX (ev_sidebar), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); - select_button = gtk_toggle_button_new (); - gtk_button_set_relief (GTK_BUTTON (select_button), GTK_RELIEF_NONE); - g_signal_connect (select_button, "button_press_event", + ev_sidebar->priv->select_button = gtk_toggle_button_new (); + gtk_button_set_relief (GTK_BUTTON (ev_sidebar->priv->select_button), GTK_RELIEF_NONE); + g_signal_connect (ev_sidebar->priv->select_button, "button_press_event", G_CALLBACK (ev_sidebar_select_button_press_cb), ev_sidebar); - g_signal_connect (select_button, "key_press_event", + g_signal_connect (ev_sidebar->priv->select_button, "key_press_event", G_CALLBACK (ev_sidebar_select_button_key_press_cb), ev_sidebar); @@ -373,11 +373,11 @@ ev_sidebar_init (EvSidebar *ev_sidebar) gtk_box_pack_end (GTK_BOX (select_hbox), arrow, FALSE, FALSE, 0); gtk_widget_show (arrow); - gtk_container_add (GTK_CONTAINER (select_button), select_hbox); + gtk_container_add (GTK_CONTAINER (ev_sidebar->priv->select_button), select_hbox); gtk_widget_show (select_hbox); - gtk_box_pack_start (GTK_BOX (hbox), select_button, TRUE, TRUE, 0); - gtk_widget_show (select_button); + gtk_box_pack_start (GTK_BOX (hbox), ev_sidebar->priv->select_button, TRUE, TRUE, 0); + gtk_widget_show (ev_sidebar->priv->select_button); close_button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE); @@ -396,7 +396,7 @@ ev_sidebar_init (EvSidebar *ev_sidebar) ev_sidebar->priv->menu = gtk_menu_new (); g_signal_connect (ev_sidebar->priv->menu, "deactivate", G_CALLBACK (ev_sidebar_menu_deactivate_cb), - select_button); + ev_sidebar->priv->select_button); gtk_menu_attach_to_widget (GTK_MENU (ev_sidebar->priv->menu), GTK_WIDGET (ev_sidebar), ev_sidebar_menu_detach_cb); @@ -409,7 +409,8 @@ ev_sidebar_init (EvSidebar *ev_sidebar) TRUE, TRUE, 0); gtk_widget_show (ev_sidebar->priv->notebook); - gtk_widget_set_sensitive (GTK_WIDGET (ev_sidebar), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (ev_sidebar->priv->notebook), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (ev_sidebar->priv->select_button), FALSE); } /* Public functions */ @@ -515,7 +516,8 @@ ev_sidebar_set_document (EvSidebar *sidebar, if (!has_pages) { gtk_widget_hide (GTK_WIDGET (sidebar)); } else { - gtk_widget_set_sensitive (GTK_WIDGET (sidebar), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (sidebar->priv->notebook), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (sidebar->priv->select_button), TRUE); } }