245 GtkTreeSelection *selection;
247 GdkPixbuf *text_icon = NULL;
248 GdkPixbuf *attachment_icon = NULL;
249 GdkPixbuf *highlight_icon = NULL;
250 GdkPixbuf *strike_out_icon = NULL;
251 GdkPixbuf *underline_icon = NULL;
252 GdkPixbuf *squiggly_icon = NULL;
254 priv = sidebar_annots->priv;
260 gtk_tree_view_set_model (GTK_TREE_VIEW (priv->
tree_view), list);
261 g_object_unref (list);
263 g_object_unref (job);
269 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->
tree_view));
270 gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
273 g_signal_connect (selection,
"changed",
283 for (l = job->
annots; l; l = g_list_next (l)) {
288 gboolean found =
FALSE;
291 page_label = g_strdup_printf (
_(
"Page %d"),
293 gtk_tree_store_append (model, &iter, NULL);
294 gtk_tree_store_set (model, &iter,
302 const gchar *modified;
304 GtkTreeIter child_iter;
305 GdkPixbuf *pixbuf = NULL;
314 markup = g_strdup_printf (
"<span weight=\"bold\">%s</span>\n%s",
317 markup = g_strdup_printf (
"<span weight=\"bold\">%s</span>", label);
323 text_icon = gtk_widget_render_icon_pixbuf (priv->
tree_view,
325 GTK_ICON_SIZE_BUTTON);
329 if (!attachment_icon) {
330 attachment_icon = gtk_widget_render_icon_pixbuf (priv->
tree_view,
332 GTK_ICON_SIZE_BUTTON);
334 pixbuf = attachment_icon;
338 if (!highlight_icon) {
340 highlight_icon = gtk_widget_render_icon_pixbuf (priv->
tree_view,
341 GTK_STOCK_SELECT_ALL,
342 GTK_ICON_SIZE_BUTTON);
344 pixbuf = highlight_icon;
348 if (!strike_out_icon) {
349 strike_out_icon = gtk_widget_render_icon_pixbuf (priv->
tree_view,
350 GTK_STOCK_STRIKETHROUGH,
351 GTK_ICON_SIZE_BUTTON);
353 pixbuf = strike_out_icon;
356 if (!underline_icon) {
357 underline_icon = gtk_widget_render_icon_pixbuf (priv->
tree_view,
359 GTK_ICON_SIZE_BUTTON);
361 pixbuf = underline_icon;
364 if (!squiggly_icon) {
365 squiggly_icon = gtk_widget_render_icon_pixbuf (priv->
tree_view,
367 GTK_ICON_SIZE_BUTTON);
369 pixbuf = squiggly_icon;
374 gtk_tree_store_append (model, &child_iter, &iter);
375 gtk_tree_store_set (model, &child_iter,
385 gtk_tree_store_remove (model, &iter);
388 gtk_tree_view_set_model (GTK_TREE_VIEW (priv->
tree_view),
389 GTK_TREE_MODEL (model));
390 g_object_unref (model);
393 g_object_unref (text_icon);
395 g_object_unref (attachment_icon);
397 g_object_unref (highlight_icon);
399 g_object_unref (strike_out_icon);
401 g_object_unref (underline_icon);
403 g_object_unref (squiggly_icon);
405 g_object_unref (job);