~ubuntu-branches/ubuntu/maverick/conglomerate/maverick

« back to all changes in this revision

Viewing changes to src/cong-service-node-property-page.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 05:07:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108050706-bcg60nwqf1z3w0d6
Tags: 0.9.1-1ubuntu1
* Resynchronise with Debian (Closes: #4397).
  - Thanks, Jordan Mantha.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
2
 
 
3
/*
 
4
 * cong-service-node-property-page.c
 
5
 *
 
6
 * Copyright (C) 2005 David Malcolm
 
7
 *
 
8
 * Conglomerate is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU General Public License as
 
10
 * published by the Free Software Foundation; either version 2 of the
 
11
 * License, or (at your option) any later version.
 
12
 *
 
13
 * Conglomerate is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
21
 *
 
22
 * Authors: David Malcolm <david@davemalcolm.demon.co.uk>
 
23
 */
 
24
 
 
25
#include "global.h"
 
26
#include "cong-service-node-property-page.h"
 
27
 
 
28
struct CongServiceNodePropertyPagePrivate
 
29
{
 
30
        CongCustomPropertyPageFactoryMethod factory_method;
 
31
        gpointer user_data;
 
32
};
 
33
 
 
34
CONG_DEFINE_CLASS (CongServiceNodePropertyPage, cong_service_node_property_page, CONG_SERVICE_NODE_PROPERTY_PAGE, CongService, CONG_SERVICE_TYPE)
 
35
 
 
36
/**
 
37
 * cong_service_node_property_page_construct:
 
38
 * @node_property_page:
 
39
 * @name:
 
40
 * @description:
 
41
 * @service_id:
 
42
 * @factory_method:
 
43
 * @user_data:
 
44
 *
 
45
 * TODO: Write me
 
46
 * Returns:
 
47
 */
 
48
CongServiceNodePropertyPage*
 
49
cong_service_node_property_page_construct (CongServiceNodePropertyPage* node_property_page,
 
50
                                             const gchar *name, 
 
51
                                             const gchar *description,
 
52
                                             const gchar *service_id,
 
53
                                             CongCustomPropertyPageFactoryMethod factory_method,
 
54
                                             gpointer user_data)
 
55
{
 
56
        g_return_val_if_fail (IS_CONG_SERVICE_NODE_PROPERTY_PAGE (node_property_page), NULL);
 
57
        g_return_val_if_fail (name, NULL);
 
58
        g_return_val_if_fail (description, NULL);
 
59
        g_return_val_if_fail (service_id, NULL);
 
60
 
 
61
        cong_service_construct (CONG_SERVICE (node_property_page),
 
62
                                name,
 
63
                                description,
 
64
                                service_id);
 
65
        PRIVATE (node_property_page)->factory_method = factory_method;
 
66
        PRIVATE (node_property_page)->user_data = user_data;
 
67
 
 
68
        return node_property_page;
 
69
}
 
70
 
 
71
/**
 
72
 * cong_custom_property_page_make:
 
73
 * @custom_property_page:
 
74
 * @doc:
 
75
 * @node:
 
76
 *
 
77
 * TODO: Write me
 
78
 * Returns:
 
79
 */
 
80
GtkWidget *
 
81
cong_custom_property_page_make (CongServiceNodePropertyPage *node_property_page,
 
82
                                CongDocument *doc)
 
83
{
 
84
        g_return_val_if_fail (IS_CONG_SERVICE_NODE_PROPERTY_PAGE (node_property_page), NULL);
 
85
        g_return_val_if_fail (doc, NULL);
 
86
 
 
87
        g_assert (PRIVATE (node_property_page)->factory_method);
 
88
 
 
89
        return PRIVATE (node_property_page)->factory_method (node_property_page, 
 
90
                                                             doc);
 
91
}