2
* Copyright (C) 2002 Ricardo Fern�ndez Pascual
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2, or (at your option)
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#include "bookmarks-alias-placeholder-tb-widget.h"
24
#include "galeon-marshal.h"
25
#include "gul-gobject-misc.h"
26
#include "bookmarks-widgets-private.h"
28
#include <glib/gi18n.h>
29
#include <gtk/gtklabel.h>
34
struct _GbAliasPlaceholderTbWidgetPrivate
40
* Private functions, only availble from this file
42
static void gb_alias_placeholder_tb_widget_class_init (GbAliasPlaceholderTbWidgetClass *klass);
43
static void gb_alias_placeholder_tb_widget_init (GbAliasPlaceholderTbWidget *w);
44
static void gb_alias_placeholder_tb_widget_finalize_impl (GObject *o);
45
static void gb_alias_placeholder_tb_widget_rebuild_impl (GbTbWidget *w);
47
static gpointer gb_tb_widget_class;
50
* GbAliasPlaceholderTbWidget object
53
MAKE_GET_TYPE (gb_alias_placeholder_tb_widget, "GbAliasPlaceholderTbWidget", GbAliasPlaceholderTbWidget,
54
gb_alias_placeholder_tb_widget_class_init,
55
gb_alias_placeholder_tb_widget_init, GB_TYPE_TB_WIDGET);
58
gb_alias_placeholder_tb_widget_class_init (GbAliasPlaceholderTbWidgetClass *klass)
60
G_OBJECT_CLASS (klass)->finalize = gb_alias_placeholder_tb_widget_finalize_impl;
61
GB_TB_WIDGET_CLASS (klass)->rebuild = gb_alias_placeholder_tb_widget_rebuild_impl;
62
gb_tb_widget_class = g_type_class_peek_parent (klass);
66
gb_alias_placeholder_tb_widget_init (GbAliasPlaceholderTbWidget *w)
68
GbAliasPlaceholderTbWidgetPrivate *p = g_new0 (GbAliasPlaceholderTbWidgetPrivate, 1);
73
gb_alias_placeholder_tb_widget_finalize_impl (GObject *o)
75
GbAliasPlaceholderTbWidget *w = GB_ALIAS_PLACEHOLDER_TB_WIDGET (o);
76
GbAliasPlaceholderTbWidgetPrivate *p = w->priv;
80
G_OBJECT_CLASS (gb_tb_widget_class)->finalize (o);
83
GbAliasPlaceholderTbWidget *
84
gb_alias_placeholder_tb_widget_new (GbAliasPlaceholder *alias_placeholder)
86
GbAliasPlaceholderTbWidget *ret = g_object_new (GB_TYPE_ALIAS_PLACEHOLDER_TB_WIDGET,
87
"bookmark", alias_placeholder, NULL);
92
gb_alias_placeholder_tb_widget_rebuild_impl (GbTbWidget *gtw)
94
GbAliasPlaceholderTbWidgetPrivate *p = GB_ALIAS_PLACEHOLDER_TB_WIDGET (gtw)->priv;
98
p->mainwid = gtk_label_new (_("Unresolved alias"));
99
gtk_widget_show (p->mainwid);
100
gtk_box_pack_start (GTK_BOX (gtw), p->mainwid, FALSE, FALSE, 0);
103
gb_tb_widget_setup_context_menu (gtw, p->mainwid);