335 GtkWidget *close_button;
336 GtkWidget *select_hbox;
337 GtkWidget *separator;
343 ev_sidebar->priv->page_model = (GtkTreeModel *)
351 hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
352 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
353 ev_sidebar->priv->hbox = hbox;
354 gtk_box_pack_start (GTK_BOX (ev_sidebar), hbox,
FALSE,
FALSE, 0);
355 gtk_widget_show (hbox);
358 separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
359 gtk_box_pack_start (GTK_BOX (ev_sidebar), separator,
FALSE,
FALSE, 0);
360 gtk_widget_show (separator);
362 ev_sidebar->priv->select_button = gtk_toggle_button_new ();
363 gtk_button_set_relief (GTK_BUTTON (ev_sidebar->priv->select_button), GTK_RELIEF_NONE);
364 g_signal_connect (ev_sidebar->priv->select_button,
"button_press_event",
367 g_signal_connect (ev_sidebar->priv->select_button,
"key_press_event",
371 select_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
373 ev_sidebar->priv->label = gtk_label_new (
"");
374 gtk_box_pack_start (GTK_BOX (select_hbox),
375 ev_sidebar->priv->label,
377 gtk_widget_show (ev_sidebar->priv->label);
379 arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
380 gtk_box_pack_end (GTK_BOX (select_hbox), arrow,
FALSE,
FALSE, 0);
381 gtk_widget_show (arrow);
383 gtk_container_add (GTK_CONTAINER (ev_sidebar->priv->select_button), select_hbox);
384 gtk_widget_show (select_hbox);
386 gtk_box_set_center_widget (GTK_BOX (hbox), ev_sidebar->priv->select_button);
387 gtk_widget_show (ev_sidebar->priv->select_button);
389 close_button = gtk_button_new_from_icon_name (
"window-close-symbolic", GTK_ICON_SIZE_BUTTON);
390 gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE);
391 g_signal_connect (close_button,
"clicked",
394 gtk_box_pack_end (GTK_BOX (hbox), close_button,
FALSE,
FALSE, 0);
395 gtk_widget_show (close_button);
397 ev_sidebar->priv->menu = gtk_menu_new ();
398 g_signal_connect (ev_sidebar->priv->menu,
"deactivate",
400 ev_sidebar->priv->select_button);
401 gtk_menu_attach_to_widget (GTK_MENU (ev_sidebar->priv->menu),
402 GTK_WIDGET (ev_sidebar),
404 gtk_widget_show (ev_sidebar->priv->menu);
406 ev_sidebar->priv->notebook = gtk_notebook_new ();
407 gtk_notebook_set_show_border (GTK_NOTEBOOK (ev_sidebar->priv->notebook),
FALSE);
408 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (ev_sidebar->priv->notebook),
FALSE);
409 gtk_box_pack_start (GTK_BOX (ev_sidebar), ev_sidebar->priv->notebook,
411 gtk_widget_show (ev_sidebar->priv->notebook);
413 gtk_widget_set_sensitive (GTK_WIDGET (ev_sidebar->priv->notebook),
FALSE);
414 gtk_widget_set_sensitive (GTK_WIDGET (ev_sidebar->priv->select_button),
FALSE);