struct _EvSidebarPrivate {
GtkWidget *notebook;
+ GtkWidget *select_button;
GtkWidget *menu;
GtkWidget *hbox;
GtkWidget *label;
{
GtkWidget *hbox;
GtkWidget *close_button;
- GtkWidget *select_button;
GtkWidget *select_hbox;
GtkWidget *arrow;
GtkWidget *image;
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);
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);
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);
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 */
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);
}
}