#include "config.h"
#include <string.h>
#include "ev-bookmarks.h"
Go to the source code of this file.
Definition at line 156 of file ev-bookmarks.c.
158 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
164 g_object_class_install_property (gobject_class,
166 g_param_spec_object (
"metadata",
168 "The document metadata",
170 G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
171 G_PARAM_STATIC_STRINGS));
174 g_signal_new (
"changed",
179 g_cclosure_marshal_VOID__VOID,
static void ev_bookmarks_constructed |
( |
GObject * |
object) | |
|
|
static |
Definition at line 116 of file ev-bookmarks.c.
123 GError *error = NULL;
128 if (!bm_list_str || bm_list_str[0] ==
'\0')
131 bm_list = g_variant_parse ((
const GVariantType *)
"a(us)",
132 bm_list_str, NULL, NULL,
135 g_warning (
"Error getting bookmarks: %s\n", error->message);
136 g_error_free (error);
141 g_variant_iter_init (&iter, bm_list);
142 while ((child = g_variant_iter_next_value (&iter))) {
145 g_variant_get (child,
"(us)", &bm->
page, &bm->
title);
147 bookmarks->
items = g_list_prepend (bookmarks->
items, bm);
148 g_variant_unref (child);
150 g_variant_unref (bm_list);
152 bookmarks->
items = g_list_reverse (bookmarks->
items);
static void ev_bookmarks_finalize |
( |
GObject * |
object) | |
|
|
static |
Definition at line 76 of file ev-bookmarks.c.
80 if (bookmarks->
items) {
82 bookmarks->
items = NULL;
86 g_object_unref (bookmarks->
metadata);
90 G_OBJECT_CLASS (ev_bookmarks_parent_class)->finalize (
object);
GList* ev_bookmarks_get_bookmarks |
( |
EvBookmarks * |
bookmarks) | |
|
gboolean ev_bookmarks_has_bookmarks |
( |
EvBookmarks * |
bookmarks) | |
|
static void ev_bookmarks_init |
( |
EvBookmarks * |
bookmarks) | |
|
|
static |
static void ev_bookmarks_save |
( |
EvBookmarks * |
bookmarks) | |
|
|
static |
Definition at line 193 of file ev-bookmarks.c.
196 GVariantBuilder builder;
200 if (!bookmarks->
items) {
205 g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
206 for (l = bookmarks->
items; l; l = g_list_next (l)) {
209 g_variant_builder_add (&builder,
"(u&s)", bm->
page, bm->
title);
211 bm_list = g_variant_builder_end (&builder);
213 bm_list_str = g_variant_print (bm_list,
FALSE);
214 g_variant_unref (bm_list);
216 g_free (bm_list_str);
static void ev_bookmarks_set_property |
( |
GObject * |
object, |
|
|
guint |
prop_id, |
|
|
const GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
Definition at line 99 of file ev-bookmarks.c.
111 G_OBJECT_WARN_INVALID_PROPERTY_ID (
object, prop_id, pspec);