2
* gedit-bookmarks-message-remove.c
3
* This file is part of gedit
5
* Copyright (C) 2011 - Paolo Borelli
7
* gedit is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* gedit is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with gedit; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor,
20
* Boston, MA 02110-1301 USA
24
#include <gedit/gedit-view.h>
25
#include "gedit-bookmarks-message-remove.h"
27
#define GEDIT_BOOKMARKS_MESSAGE_REMOVE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_BOOKMARKS_MESSAGE_REMOVE, GeditBookmarksMessageRemovePrivate))
37
struct _GeditBookmarksMessageRemovePrivate
43
G_DEFINE_TYPE (GeditBookmarksMessageRemove, gedit_bookmarks_message_remove, GEDIT_TYPE_MESSAGE)
46
gedit_bookmarks_message_remove_finalize (GObject *obj)
48
GeditBookmarksMessageRemove *msg = GEDIT_BOOKMARKS_MESSAGE_REMOVE (obj);
52
g_object_unref (msg->priv->view);
56
g_object_unref (msg->priv->iter);
59
G_OBJECT_CLASS (gedit_bookmarks_message_remove_parent_class)->finalize (obj);
63
gedit_bookmarks_message_remove_get_property (GObject *obj,
68
GeditBookmarksMessageRemove *msg;
70
msg = GEDIT_BOOKMARKS_MESSAGE_REMOVE (obj);
75
g_value_set_object (value, msg->priv->view);
78
g_value_set_boxed (value, msg->priv->iter);
84
gedit_bookmarks_message_remove_set_property (GObject *obj,
89
GeditBookmarksMessageRemove *msg;
91
msg = GEDIT_BOOKMARKS_MESSAGE_REMOVE (obj);
99
g_object_unref (msg->priv->view);
101
msg->priv->view = g_value_dup_object (value);
108
g_boxed_free (GTK_TYPE_TEXT_ITER, msg->priv->iter);
110
msg->priv->iter = g_boxed_copy (GTK_TYPE_TEXT_ITER, value);
117
gedit_bookmarks_message_remove_class_init (GeditBookmarksMessageRemoveClass *klass)
119
GObjectClass *object_class = G_OBJECT_CLASS(klass);
121
object_class->finalize = gedit_bookmarks_message_remove_finalize;
123
object_class->get_property = gedit_bookmarks_message_remove_get_property;
124
object_class->set_property = gedit_bookmarks_message_remove_set_property;
126
g_object_class_install_property (object_class,
128
g_param_spec_object ("view",
134
G_PARAM_STATIC_STRINGS));
136
g_object_class_install_property (object_class,
138
g_param_spec_boxed ("iter",
144
G_PARAM_STATIC_STRINGS));
146
g_type_class_add_private (object_class, sizeof (GeditBookmarksMessageRemovePrivate));
150
gedit_bookmarks_message_remove_init (GeditBookmarksMessageRemove *message)
152
message->priv = GEDIT_BOOKMARKS_MESSAGE_REMOVE_GET_PRIVATE (message);