23 #include "ev-document-type-builtins.h"
62 #define EV_LINK_ACTION_GET_PRIVATE(object) \
63 (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_ACTION, EvLinkActionPrivate))
70 return self->priv->type;
84 return self->priv->dest;
92 return self->priv->uri;
100 return self->priv->filename;
108 return self->priv->params;
116 return self->priv->name;
130 return self->priv->show_list;
144 return self->priv->hide_list;
158 return self->priv->toggle_list;
165 GParamSpec *param_spec)
173 g_value_set_enum (value, self->priv->type);
176 g_value_set_object (value, self->priv->dest);
179 g_value_set_string (value, self->priv->uri);
182 g_value_set_string (value, self->priv->filename);
185 g_value_set_string (value, self->priv->params);
188 g_value_set_string (value, self->priv->name);
191 g_value_set_pointer (value, self->priv->show_list);
194 g_value_set_pointer (value, self->priv->hide_list);
197 g_value_set_pointer (value, self->priv->toggle_list);
200 G_OBJECT_WARN_INVALID_PROPERTY_ID (
object,
211 GParamSpec *param_spec)
217 self->priv->type = g_value_get_enum (value);
220 self->priv->dest = g_value_dup_object (value);
223 g_free (self->priv->uri);
224 self->priv->uri = g_value_dup_string (value);
227 g_free (self->priv->filename);
228 self->priv->filename = g_value_dup_string (value);
231 g_free (self->priv->params);
232 self->priv->params = g_value_dup_string (value);
235 g_free (self->priv->name);
236 self->priv->name = g_value_dup_string (value);
239 self->priv->show_list = g_value_get_pointer (value);
242 self->priv->hide_list = g_value_get_pointer (value);
245 self->priv->toggle_list = g_value_get_pointer (value);
248 G_OBJECT_WARN_INVALID_PROPERTY_ID (
object,
262 g_clear_object (&priv->
dest);
285 g_list_foreach (priv->
show_list, (GFunc)g_object_unref, NULL);
291 g_list_foreach (priv->
hide_list, (GFunc)g_object_unref, NULL);
297 g_list_foreach (priv->
toggle_list, (GFunc)g_object_unref, NULL);
302 G_OBJECT_CLASS (ev_link_action_parent_class)->finalize (
object);
310 ev_link_action->priv->dest = NULL;
311 ev_link_action->priv->uri = NULL;
312 ev_link_action->priv->filename = NULL;
313 ev_link_action->priv->params = NULL;
314 ev_link_action->priv->name = NULL;
320 GObjectClass *g_object_class;
322 g_object_class = G_OBJECT_CLASS (ev_link_action_class);
331 g_object_class_install_property (g_object_class,
333 g_param_spec_enum (
"type",
335 "The link action type",
336 EV_TYPE_LINK_ACTION_TYPE,
339 G_PARAM_CONSTRUCT_ONLY |
340 G_PARAM_STATIC_STRINGS));
341 g_object_class_install_property (g_object_class,
343 g_param_spec_object (
"dest",
344 "Action destination",
345 "The link action destination",
348 G_PARAM_CONSTRUCT_ONLY |
349 G_PARAM_STATIC_STRINGS));
350 g_object_class_install_property (g_object_class,
352 g_param_spec_string (
"uri",
354 "The link action URI",
357 G_PARAM_CONSTRUCT_ONLY |
358 G_PARAM_STATIC_STRINGS));
359 g_object_class_install_property (g_object_class,
361 g_param_spec_string (
"filename",
363 "The link action filename",
366 G_PARAM_CONSTRUCT_ONLY |
367 G_PARAM_STATIC_STRINGS));
368 g_object_class_install_property (g_object_class,
370 g_param_spec_string (
"params",
372 "The link action params",
375 G_PARAM_CONSTRUCT_ONLY |
376 G_PARAM_STATIC_STRINGS));
377 g_object_class_install_property (g_object_class,
379 g_param_spec_string (
"name",
381 "The link action name",
384 G_PARAM_CONSTRUCT_ONLY |
385 G_PARAM_STATIC_STRINGS));
386 g_object_class_install_property (g_object_class,
388 g_param_spec_pointer (
"show-list",
390 "The list of layers that should be shown",
392 G_PARAM_CONSTRUCT_ONLY |
393 G_PARAM_STATIC_STRINGS));
394 g_object_class_install_property (g_object_class,
396 g_param_spec_pointer (
"hide-list",
398 "The list of layers that should be hidden",
400 G_PARAM_CONSTRUCT_ONLY |
401 G_PARAM_STATIC_STRINGS));
402 g_object_class_install_property (g_object_class,
404 g_param_spec_pointer (
"toggle-list",
406 "The list of layers that should be toggled",
408 G_PARAM_CONSTRUCT_ONLY |
409 G_PARAM_STATIC_STRINGS));
423 const gchar *filename)
427 "filename", filename,
446 "filename", filename,
475 "show-list", show_list,
476 "hide-list", hide_list,
477 "toggle-list", toggle_list,
503 if (a->priv->type != b->priv->type)
506 switch (a->priv->type) {
512 !g_strcmp0 (a->priv->filename, b->priv->filename);
515 return !g_strcmp0 (a->priv->uri, b->priv->uri);
518 return !g_strcmp0 (a->priv->filename, b->priv->filename) &&
519 !g_strcmp0 (a->priv->params, b->priv->params);
522 return !g_strcmp0 (a->priv->name, b->priv->name);