~noskcaj/ubuntu/vivid/thunar/1.6.4

« back to all changes in this revision

Viewing changes to docs/reference/thunarx/html/ThunarxPropertyPage.html

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-12-04 16:46:20 UTC
  • mto: (2.1.3 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 69.
  • Revision ID: james.westby@ubuntu.com-20101204164620-h7p4t2e9z6hfhz6l
Tags: upstream-1.1.4
Import upstream version 1.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
#include <thunarx/thunarx.h>
52
52
 
53
53
                    <a class="link" href="ThunarxPropertyPage.html#ThunarxPropertyPage-struct" title="ThunarxPropertyPage">ThunarxPropertyPage</a>;
54
 
<span class="returnvalue">GtkWidget</span> *         <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-new" title="thunarx_property_page_new ()">thunarx_property_page_new</a>           (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);
55
 
<span class="returnvalue">GtkWidget</span> *         <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-new-with-label-widget" title="thunarx_property_page_new_with_label_widget ()">thunarx_property_page_new_with_label_widget</a>
56
 
                                                        (<em class="parameter"><code><span class="type">GtkWidget</span> *label_widget</code></em>);
57
 
const <span class="returnvalue">gchar</span> *       <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-get-label" title="thunarx_property_page_get_label ()">thunarx_property_page_get_label</a>     (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>);
 
54
<a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-new" title="thunarx_property_page_new ()">thunarx_property_page_new</a>           (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
 
55
<a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-new-with-label-widget" title="thunarx_property_page_new_with_label_widget ()">thunarx_property_page_new_with_label_widget</a>
 
56
                                                        (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *label_widget</code></em>);
 
57
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-get-label" title="thunarx_property_page_get_label ()">thunarx_property_page_get_label</a>     (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>);
58
58
<span class="returnvalue">void</span>                <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-set-label" title="thunarx_property_page_set_label ()">thunarx_property_page_set_label</a>     (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>,
59
 
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);
60
 
<span class="returnvalue">GtkWidget</span> *         <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-get-label-widget" title="thunarx_property_page_get_label_widget ()">thunarx_property_page_get_label_widget</a>
 
59
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
 
60
<a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-get-label-widget" title="thunarx_property_page_get_label_widget ()">thunarx_property_page_get_label_widget</a>
61
61
                                                        (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>);
62
62
<span class="returnvalue">void</span>                <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-set-label-widget" title="thunarx_property_page_set_label_widget ()">thunarx_property_page_set_label_widget</a>
63
63
                                                        (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>,
64
 
                                                         <em class="parameter"><code><span class="type">GtkWidget</span> *label_widget</code></em>);
 
64
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *label_widget</code></em>);
65
65
</pre>
66
66
</div>
67
67
<div class="refsect1" title="Object Hierarchy">
68
68
<a name="ThunarxPropertyPage.object-hierarchy"></a><h2>Object Hierarchy</h2>
69
69
<pre class="synopsis">
70
 
  GObject
71
 
   +----GInitiallyUnowned
72
 
         +----GtkObject
73
 
               +----GtkWidget
74
 
                     +----GtkContainer
75
 
                           +----GtkBin
 
70
  <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
71
   +----<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
 
72
         +----<a href="/usr/share/gtk-doc/html/gtk/GtkObject.html">GtkObject</a>
 
73
               +----<a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html">GtkWidget</a>
 
74
                     +----<a href="/usr/share/gtk-doc/html/gtk/GtkContainer.html">GtkContainer</a>
 
75
                           +----<a href="/usr/share/gtk-doc/html/gtk/GtkBin.html">GtkBin</a>
76
76
                                 +----ThunarxPropertyPage
77
77
</pre>
78
78
</div>
80
80
<a name="ThunarxPropertyPage.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
81
81
<p>
82
82
ThunarxPropertyPage implements
83
 
 AtkImplementorIface and  GtkBuildable.</p>
 
83
 AtkImplementorIface and  <a href="/usr/share/gtk-doc/html/gtk/gtk-gtkbuildable.html#GtkBuildable">GtkBuildable</a>.</p>
84
84
</div>
85
85
<div class="refsect1" title="Properties">
86
86
<a name="ThunarxPropertyPage.properties"></a><h2>Properties</h2>
87
87
<pre class="synopsis">
88
 
  "<a class="link" href="ThunarxPropertyPage.html#ThunarxPropertyPage--label" title='The "label" property'>label</a>"                    <span class="type">gchar</span>*                : Read / Write
89
 
  "<a class="link" href="ThunarxPropertyPage.html#ThunarxPropertyPage--label-widget" title='The "label-widget" property'>label-widget</a>"             <span class="type">GtkWidget</span>*            : Read / Write
 
88
  "<a class="link" href="ThunarxPropertyPage.html#ThunarxPropertyPage--label" title='The "label" property'>label</a>"                    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write
 
89
  "<a class="link" href="ThunarxPropertyPage.html#ThunarxPropertyPage--label-widget" title='The "label-widget" property'>label-widget</a>"             <a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a>*            : Read / Write
90
90
</pre>
91
91
</div>
92
92
<div class="refsect1" title="Description">
111
111
  an example of the suggested way to implement property pages, you may of course choose
112
112
  a different way):
113
113
</p>
114
 
<div class="informalexample"><pre class="programlisting">
115
 
##ifndef __TAG_PAGE_H__
116
 
##define __TAG_PAGE_H__
117
 
##include &lt;thunarx/thunarx.h&gt;
118
 
G_BEGIN_DECLS;
119
 
typedef struct _TagPageClass TagPageClass;
120
 
typedef struct _TagPage      TagPage;
121
 
#define TAG_TYPE_PAGE            (tag_page_get_type ())
122
 
#define TAG_PAGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TAG_TYPE_PAGE, TagPage))
123
 
#define TAG_PAGE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TAG_TYPE_PAGE, TagPageClass))
124
 
#define TAG_IS_PAGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TAG_TYPE_PAGE))
125
 
#define TAG_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TAG_TYPE_PAGE))
126
 
#define TAG_PAGE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TAG_TYPE_PAGE, TagPageClass))
127
 
/* these two functions are implemented automatically by the THUNARX_DEFINE_TYPE macro */
128
 
GType            tag_page_get_type      (void) G_GNUC_CONST G_GNUC_INTERNAL;
129
 
void             tag_page_register_type (ThunarxProviderPlugin *plugin) G_GNUC_INTERNAL;
130
 
GtkWidget       *tag_page_new           (ThunarxFileInfo       *file) G_GNUC_INTERNAL G_GNUC_MALLOC;
131
 
ThunarxFileInfo *tag_page_get_file      (TagPage               *tag_page) G_GNUC_INTERNAL;
132
 
void             tag_page_set_file      (TagPage               *tag_page,
133
 
                                         ThunarxFileInfo       *file) G_GNUC_INTERNAL;
134
 
G_END_DECLS;
135
 
##endif /* !__TAG_PAGE_H__ */
136
 
</pre></div>
 
114
<div class="informalexample">
 
115
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
116
    <tbody>
 
117
      <tr>
 
118
        <td class="listing_lines" align="right"><pre>1
 
119
2
 
120
3
 
121
4
 
122
5
 
123
6
 
124
7
 
125
8
 
126
9
 
127
10
 
128
11
 
129
12
 
130
13
 
131
14
 
132
15
 
133
16
 
134
17
 
135
18
 
136
19
 
137
20
 
138
21</pre></td>
 
139
        <td class="listing_code"><pre class="programlisting"><span class="preproc">#</span><span class="normal">#ifndef __TAG_PAGE_H__</span>
 
140
<span class="preproc">#</span><span class="normal">#define __TAG_PAGE_H__</span>
 
141
<span class="preproc">#</span><span class="normal">#include </span><span class="symbol">&lt;</span><span class="normal">thunarx</span><span class="symbol">/</span><span class="normal">thunarx</span><span class="symbol">.</span><span class="normal">h</span><span class="symbol">&gt;</span>
 
142
<span class="normal"><a href="/usr/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html#G-BEGIN-DECLS:CAPS">G_BEGIN_DECLS</a></span><span class="symbol">;</span>
 
143
<span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_TagPageClass</span><span class="normal"> TagPageClass</span><span class="symbol">;</span>
 
144
<span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_TagPage</span><span class="normal">      TagPage</span><span class="symbol">;</span>
 
145
<span class="preproc">#define</span><span class="normal"> </span><span class="function">TAG_TYPE_PAGE</span><span class="normal">            </span><span class="symbol">(</span><span class="function">tag_page_get_type</span><span class="normal"> </span><span class="symbol">())</span>
 
146
<span class="preproc">#define</span><span class="normal"> </span><span class="function">TAG_PAGE</span><span class="symbol">(</span><span class="normal">obj</span><span class="symbol">)</span><span class="normal">            </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAST:CAPS">G_TYPE_CHECK_INSTANCE_CAST</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal">obj</span><span class="symbol">),</span><span class="normal"> TAG_TYPE_PAGE</span><span class="symbol">,</span><span class="normal"> TagPage</span><span class="symbol">))</span>
 
147
<span class="preproc">#define</span><span class="normal"> </span><span class="function">TAG_PAGE_CLASS</span><span class="symbol">(</span><span class="normal">klass</span><span class="symbol">)</span><span class="normal">    </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-CHECK-CLASS-CAST:CAPS">G_TYPE_CHECK_CLASS_CAST</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal">klass</span><span class="symbol">),</span><span class="normal"> TAG_TYPE_PAGE</span><span class="symbol">,</span><span class="normal"> TagPageClass</span><span class="symbol">))</span>
 
148
<span class="preproc">#define</span><span class="normal"> </span><span class="function">TAG_IS_PAGE</span><span class="symbol">(</span><span class="normal">obj</span><span class="symbol">)</span><span class="normal">         </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-TYPE:CAPS">G_TYPE_CHECK_INSTANCE_TYPE</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal">obj</span><span class="symbol">),</span><span class="normal"> TAG_TYPE_PAGE</span><span class="symbol">))</span>
 
149
<span class="preproc">#define</span><span class="normal"> </span><span class="function">TAG_IS_PAGE_CLASS</span><span class="symbol">(</span><span class="normal">klass</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-CHECK-CLASS-TYPE:CAPS">G_TYPE_CHECK_CLASS_TYPE</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal">klass</span><span class="symbol">),</span><span class="normal"> TAG_TYPE_PAGE</span><span class="symbol">))</span>
 
150
<span class="preproc">#define</span><span class="normal"> </span><span class="function">TAG_PAGE_GET_CLASS</span><span class="symbol">(</span><span class="normal">obj</span><span class="symbol">)</span><span class="normal">  </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-INSTANCE-GET-CLASS:CAPS">G_TYPE_INSTANCE_GET_CLASS</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal">obj</span><span class="symbol">),</span><span class="normal"> TAG_TYPE_PAGE</span><span class="symbol">,</span><span class="normal"> TagPageClass</span><span class="symbol">))</span>
 
151
<span class="comment">/* these two functions are implemented automatically by the THUNARX_DEFINE_TYPE macro */</span>
 
152
<span class="usertype">GType</span><span class="normal">            </span><span class="function">tag_page_get_type</span><span class="normal">      </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html#G-GNUC-CONST:CAPS">G_GNUC_CONST</a></span><span class="symbol">;</span>
 
153
<span class="type">void</span><span class="normal">             </span><span class="function">tag_page_register_type</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ThunarxProviderPlugin</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">plugin</span><span class="symbol">);</span>
 
154
<span class="usertype">GtkWidget</span><span class="normal">       </span><span class="symbol">*</span><span class="function">tag_page_new</span><span class="normal">           </span><span class="symbol">(</span><span class="usertype">ThunarxFileInfo</span><span class="normal">       </span><span class="symbol">*</span><span class="normal">file</span><span class="symbol">)</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html#G-GNUC-MALLOC:CAPS">G_GNUC_MALLOC</a></span><span class="symbol">;</span>
 
155
<span class="usertype">ThunarxFileInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="function">tag_page_get_file</span><span class="normal">      </span><span class="symbol">(</span><span class="usertype">TagPage</span><span class="normal">               </span><span class="symbol">*</span><span class="normal">tag_page</span><span class="symbol">);</span>
 
156
<span class="type">void</span><span class="normal">             </span><span class="function">tag_page_set_file</span><span class="normal">      </span><span class="symbol">(</span><span class="usertype">TagPage</span><span class="normal">               </span><span class="symbol">*</span><span class="normal">tag_page</span><span class="symbol">,</span>
 
157
<span class="normal">                                         </span><span class="usertype">ThunarxFileInfo</span><span class="normal">       </span><span class="symbol">*</span><span class="normal">file</span><span class="symbol">);</span>
 
158
<span class="normal"><a href="/usr/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html#G-END-DECLS:CAPS">G_END_DECLS</a></span><span class="symbol">;</span>
 
159
<span class="preproc">#</span><span class="normal">#endif </span><span class="comment">/* !__TAG_PAGE_H__ */</span></pre></td>
 
160
      </tr>
 
161
    </tbody>
 
162
  </table>
 
163
</div>
 
164
 
137
165
<p>
138
166
  And the <code class="filename">tag-page.c</code> source file could look like this:
139
167
</p>
140
 
<div class="informalexample"><pre class="programlisting">
141
 
##include "tag-page.h"
142
 
/* Property identifiers */
143
 
enum
144
 
{
145
 
  PROP_0,
146
 
  PROP_FILE,
147
 
};
148
 
static void tag_page_class_init   (TagPageClass *klass);
149
 
static void tag_page_init         (TagPage          *tag_page);
150
 
static void tag_page_finalize     (GObject          *object);
151
 
static void tag_page_get_property (GObject          *object,
152
 
                                   guint             prop_id,
153
 
                                   GValue           *value,
154
 
                                   GParamSpec       *pspec);
155
 
static void tag_page_set_property (GObject          *object,
156
 
                                   guint             prop_id,
157
 
                                   const GValue     *value,
158
 
                                   GParamSpec       *pspec);
159
 
static void tag_page_file_changed (ThunarxFileInfo  *file,
160
 
                                   TagPage          *tag_page);
161
 
struct _TagPageClass
162
 
{
163
 
  ThunarxPropertyPageClass __parent__;
164
 
};
165
 
struct _TagPage
166
 
{
167
 
  ThunarxPropertyPage __parent__;
168
 
  ThunarxFileInfo    *file;
169
 
  /* your widgets... */
170
 
};
171
 
/* implements the tag_page_get_type() and tag_page_register_type() functions */
172
 
THUNARX_DEFINE_TYPE (TagPage, tag_page, THUNARX_TYPE_PROPERTY_PAGE);
173
 
static void
174
 
tag_page_class_init (TagPageClass *klass)
175
 
{
176
 
  GObjectClass *gobject_class;
177
 
  gobject_class = G_OBJECT_CLASS (klass);
178
 
  gobject_class-&gt;finalize = tag_page_finalize;
179
 
  gobject_class-&gt;get_property = tag_page_get_property;
180
 
  gobject_class-&gt;set_property = tag_page_set_property;
181
 
  /**
182
 
   * TagPage:file:
183
 
   *
184
 
   * The <a class="link" href="ThunarxFileInfo.html" title="ThunarxFileInfo">ThunarxFileInfo</a> displayed by this TagPage.
185
 
   **/
186
 
  g_object_class_install_property (gobject_class,
187
 
                                   PROP_FILE,
188
 
                                   g_param_spec_object ("file", "file", "file,
189
 
                                                        THUNARX_TYPE_FILE_INFO,
190
 
                                                        G_PARAM_READWRITE));
191
 
}
192
 
static void
193
 
tag_page_init (TagPage *tag_page)
194
 
{
195
 
  GtkWidget *table;
196
 
  /* you can of course also use a GtkVBox here, or whatever */
197
 
  table = gtk_table_new (2, 2, FALSE);
198
 
  gtk_container_add (GTK_CONTAINER (tag_page), table);
199
 
  gtk_widget_show (table);
200
 
  /* add your widgets to the table... */
201
 
}
202
 
static void
203
 
tag_page_finalize (GObject *object)
204
 
{
205
 
  TagPage *tag_page = TAG_PAGE (object);
206
 
  /* disconnect from the file */
207
 
  tag_page_set_file (tag_page, NULL);
208
 
  /* release any additional resources... */
209
 
  (*G_OBJECT_CLASS (tag_page_parent_class)-&gt;finalize) (object);
210
 
}
211
 
static void
212
 
tag_page_get_property (GObject    *object,
213
 
                       guint       prop_id,
214
 
                       GValue     *value,
215
 
                       GParamSpec *pspec)
216
 
{
217
 
  TagPage *tag_page = TAG_PAGE (object);
218
 
  switch (prop_id)
219
 
    {
220
 
    case PROP_FILE:
221
 
      g_value_set_object (value, tag_page_get_file (tag_page));
222
 
      break;
223
 
    default:
224
 
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
225
 
      break;
226
 
    }
227
 
}
228
 
static void
229
 
tag_page_set_property (GObject      *object,
230
 
                       guint         prop_id,
231
 
                       const GValue *value,
232
 
                       GParamSpec   *pspec)
233
 
{
234
 
  TagPage *tag_page = TAG_PAGE (object);
235
 
  switch (prop_id)
236
 
    {
237
 
    case PROP_FILE:
238
 
      tag_page_set_file (tag_page, g_value_get_object (value));
239
 
      break;
240
 
    default:
241
 
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
242
 
      break;
243
 
    }
244
 
}
245
 
static void
246
 
tag_page_file_changed (ThunarxFileInfo *file,
247
 
                       TagPage         *tag_page)
248
 
{
249
 
  /* update your user interface elements in the tag_page
250
 
   * to display the new state of the file...
251
 
   */
252
 
}
253
 
GtkWidget*
254
 
tag_page_new (ThunarxFileInfo *file)
255
 
{
256
 
  return g_object_new (TAG_TYPE_PAGE, "file", file, NULL);
257
 
}
258
 
ThunarxFileInfo*
259
 
tag_page_get_file (TagPage *tag_page)
260
 
{
261
 
  g_return_val_if_fail (TAG_IS_PAGE (tag_page), NULL);
262
 
  return tag_page-&gt;file;
263
 
}
264
 
void
265
 
tag_page_set_file (TagPage         *tag_page,
266
 
                   ThunarxFileInfo *file)
267
 
{
268
 
  g_return_if_fail (TAG_IS_PAGE (tag_page));
269
 
  g_return_if_fail (file == NULL || THUNARX_IS_FILE_INFO (file));
270
 
  if (tag_page-&gt;file != NULL)
271
 
    {
272
 
      g_signal_handlers_disconnect_by_func (tag_page-&gt;file, tag_page_file_changed, tag_page);
273
 
      g_object_unref (G_OBJECT (tag_page-&gt;file));
274
 
    }
275
 
  tag_page-&gt;file = file;
276
 
  if (file != NULL)
277
 
    {
278
 
      g_object_ref (file);
279
 
      tag_page_file_changed (file, tag_page);
280
 
      g_signal_connect (file, "changed", G_CALLBACK (tag_page_file_changed), tag_page);
281
 
    }
282
 
  g_object_notify (G_OBJECT (tag_page), "file");
283
 
}
284
 
</pre></div>
 
168
<div class="informalexample">
 
169
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
170
    <tbody>
 
171
      <tr>
 
172
        <td class="listing_lines" align="right"><pre>1
 
173
2
 
174
3
 
175
4
 
176
5
 
177
6
 
178
7
 
179
8
 
180
9
 
181
10
 
182
11
 
183
12
 
184
13
 
185
14
 
186
15
 
187
16
 
188
17
 
189
18
 
190
19
 
191
20
 
192
21
 
193
22
 
194
23
 
195
24
 
196
25
 
197
26
 
198
27
 
199
28
 
200
29
 
201
30
 
202
31
 
203
32
 
204
33
 
205
34
 
206
35
 
207
36
 
208
37
 
209
38
 
210
39
 
211
40
 
212
41
 
213
42
 
214
43
 
215
44
 
216
45
 
217
46
 
218
47
 
219
48
 
220
49
 
221
50
 
222
51
 
223
52
 
224
53
 
225
54
 
226
55
 
227
56
 
228
57
 
229
58
 
230
59
 
231
60
 
232
61
 
233
62
 
234
63
 
235
64
 
236
65
 
237
66
 
238
67
 
239
68
 
240
69
 
241
70
 
242
71
 
243
72
 
244
73
 
245
74
 
246
75
 
247
76
 
248
77
 
249
78
 
250
79
 
251
80
 
252
81
 
253
82
 
254
83
 
255
84
 
256
85
 
257
86
 
258
87
 
259
88
 
260
89
 
261
90
 
262
91
 
263
92
 
264
93
 
265
94
 
266
95
 
267
96
 
268
97
 
269
98
 
270
99
 
271
100
 
272
101
 
273
102
 
274
103
 
275
104
 
276
105
 
277
106
 
278
107
 
279
108
 
280
109
 
281
110
 
282
111
 
283
112
 
284
113
 
285
114
 
286
115
 
287
116
 
288
117
 
289
118
 
290
119
 
291
120
 
292
121
 
293
122
 
294
123
 
295
124
 
296
125
 
297
126
 
298
127
 
299
128
 
300
129
 
301
130
 
302
131
 
303
132
 
304
133
 
305
134
 
306
135
 
307
136
 
308
137
 
309
138
 
310
139
 
311
140
 
312
141
 
313
142
 
314
143</pre></td>
 
315
        <td class="listing_code"><pre class="programlisting"><span class="preproc">#</span><span class="normal">#include </span><span class="string">"tag-page.h"</span>
 
316
<span class="comment">/* Property identifiers */</span>
 
317
<span class="keyword">enum</span>
 
318
<span class="cbracket">{</span>
 
319
<span class="normal">  PROP_0</span><span class="symbol">,</span>
 
320
<span class="normal">  PROP_FILE</span><span class="symbol">,</span>
 
321
<span class="cbracket">}</span><span class="symbol">;</span>
 
322
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">tag_page_class_init</span><span class="normal">   </span><span class="symbol">(</span><span class="usertype">TagPageClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">klass</span><span class="symbol">);</span>
 
323
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">tag_page_init</span><span class="normal">         </span><span class="symbol">(</span><span class="usertype">TagPage</span><span class="normal">          </span><span class="symbol">*</span><span class="normal">tag_page</span><span class="symbol">);</span>
 
324
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">tag_page_finalize</span><span class="normal">     </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal">          </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">);</span>
 
325
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">tag_page_get_property</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal">          </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">,</span>
 
326
<span class="normal">                                   </span><span class="usertype">guint</span><span class="normal">             prop_id</span><span class="symbol">,</span>
 
327
<span class="normal">                                   </span><span class="usertype">GValue</span><span class="normal">           </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">,</span>
 
328
<span class="normal">                                   </span><span class="usertype">GParamSpec</span><span class="normal">       </span><span class="symbol">*</span><span class="normal">pspec</span><span class="symbol">);</span>
 
329
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">tag_page_set_property</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal">          </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">,</span>
 
330
<span class="normal">                                   </span><span class="usertype">guint</span><span class="normal">             prop_id</span><span class="symbol">,</span>
 
331
<span class="normal">                                   </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GValue</span><span class="normal">     </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">,</span>
 
332
<span class="normal">                                   </span><span class="usertype">GParamSpec</span><span class="normal">       </span><span class="symbol">*</span><span class="normal">pspec</span><span class="symbol">);</span>
 
333
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">tag_page_file_changed</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ThunarxFileInfo</span><span class="normal">  </span><span class="symbol">*</span><span class="normal">file</span><span class="symbol">,</span>
 
334
<span class="normal">                                   </span><span class="usertype">TagPage</span><span class="normal">          </span><span class="symbol">*</span><span class="normal">tag_page</span><span class="symbol">);</span>
 
335
<span class="keyword">struct</span><span class="normal"> </span><span class="classname">_TagPageClass</span>
 
336
<span class="cbracket">{</span>
 
337
<span class="normal">  ThunarxPropertyPageClass __parent__</span><span class="symbol">;</span>
 
338
<span class="cbracket">}</span><span class="symbol">;</span>
 
339
<span class="keyword">struct</span><span class="normal"> </span><span class="classname">_TagPage</span>
 
340
<span class="cbracket">{</span>
 
341
<span class="normal">  <a href="ThunarxPropertyPage.html">ThunarxPropertyPage</a> __parent__</span><span class="symbol">;</span>
 
342
<span class="normal">  </span><span class="usertype">ThunarxFileInfo</span><span class="normal">    </span><span class="symbol">*</span><span class="normal">file</span><span class="symbol">;</span>
 
343
<span class="normal">  </span><span class="comment">/* your widgets... */</span>
 
344
<span class="cbracket">}</span><span class="symbol">;</span>
 
345
<span class="comment">/* implements the tag_page_get_type() and tag_page_register_type() functions */</span>
 
346
<span class="function"><a href="ThunarxProviderPlugin.html#THUNARX-DEFINE-TYPE:CAPS">THUNARX_DEFINE_TYPE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TagPage</span><span class="symbol">,</span><span class="normal"> tag_page</span><span class="symbol">,</span><span class="normal"> THUNARX_TYPE_PROPERTY_PAGE</span><span class="symbol">);</span>
 
347
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
 
348
<span class="function">tag_page_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TagPageClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">klass</span><span class="symbol">)</span>
 
349
<span class="cbracket">{</span>
 
350
<span class="normal">  </span><span class="usertype">GObjectClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">gobject_class</span><span class="symbol">;</span>
 
351
<span class="normal">  gobject_class </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">klass</span><span class="symbol">);</span>
 
352
<span class="normal">  gobject_class</span><span class="symbol">-&gt;</span><span class="normal">finalize </span><span class="symbol">=</span><span class="normal"> tag_page_finalize</span><span class="symbol">;</span>
 
353
<span class="normal">  gobject_class</span><span class="symbol">-&gt;</span><span class="normal">get_property </span><span class="symbol">=</span><span class="normal"> tag_page_get_property</span><span class="symbol">;</span>
 
354
<span class="normal">  gobject_class</span><span class="symbol">-&gt;</span><span class="normal">set_property </span><span class="symbol">=</span><span class="normal"> tag_page_set_property</span><span class="symbol">;</span>
 
355
<span class="normal">  </span><span class="comment">/**</span>
 
356
<span class="comment">   * TagPage:file:</span>
 
357
<span class="comment">   *</span>
 
358
<span class="comment">   * The </span><span class="keyword">&lt;a</span><span class="normal"> </span><span class="type">class</span><span class="symbol">=</span><span class="string">"link"</span><span class="normal"> </span><span class="type">href</span><span class="symbol">=</span><span class="string">"ThunarxFileInfo.html"</span><span class="normal"> </span><span class="type">title</span><span class="symbol">=</span><span class="string">"ThunarxFileInfo"</span><span class="keyword">&gt;</span><span class="comment">ThunarxFileInfo</span><span class="keyword">&lt;/a&gt;</span><span class="comment"> displayed by this </span><span class="keyword">&lt;GTKDOCLINK</span><span class="normal"> </span><span class="type">HREF</span><span class="symbol">=</span><span class="string">"TagPage"</span><span class="keyword">&gt;</span><span class="comment">TagPage</span><span class="keyword">&lt;/GTKDOCLINK&gt;</span><span class="comment">.</span>
 
359
<span class="comment">   **/</span>
 
360
<span class="normal">  </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-class-install-property">g_object_class_install_property</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">gobject_class</span><span class="symbol">,</span>
 
361
<span class="normal">                                   PROP_FILE</span><span class="symbol">,</span>
 
362
<span class="normal">                                   </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-object">g_param_spec_object</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"file"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"file"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"file,</span>
 
363
<span class="string">                                                        THUNARX_TYPE_FILE_INFO,</span>
 
364
<span class="string">                                                        G_PARAM_READWRITE));</span>
 
365
<span class="string">}</span>
 
366
<span class="string">static void</span>
 
367
<span class="string">tag_page_init (TagPage *tag_page)</span>
 
368
<span class="string">{</span>
 
369
<span class="string">  GtkWidget *table;</span>
 
370
<span class="string">  /* you can of course also use a GtkVBox here, or whatever */</span>
 
371
<span class="string">  table = gtk_table_new (2, 2, FALSE);</span>
 
372
<span class="string">  gtk_container_add (GTK_CONTAINER (tag_page), table);</span>
 
373
<span class="string">  gtk_widget_show (table);</span>
 
374
<span class="string">  /* add your widgets to the table... */</span>
 
375
<span class="string">}</span>
 
376
<span class="string">static void</span>
 
377
<span class="string">tag_page_finalize (GObject *object)</span>
 
378
<span class="string">{</span>
 
379
<span class="string">  TagPage *tag_page = TAG_PAGE (object);</span>
 
380
<span class="string">  /* disconnect from the file */</span>
 
381
<span class="string">  tag_page_set_file (tag_page, NULL);</span>
 
382
<span class="string">  /* release any additional resources... */</span>
 
383
<span class="string">  (*G_OBJECT_CLASS (tag_page_parent_class)-&gt;finalize) (object);</span>
 
384
<span class="string">}</span>
 
385
<span class="string">static void</span>
 
386
<span class="string">tag_page_get_property (GObject    *object,</span>
 
387
<span class="string">                       guint       prop_id,</span>
 
388
<span class="string">                       GValue     *value,</span>
 
389
<span class="string">                       GParamSpec *pspec)</span>
 
390
<span class="string">{</span>
 
391
<span class="string">  TagPage *tag_page = TAG_PAGE (object);</span>
 
392
<span class="string">  switch (prop_id)</span>
 
393
<span class="string">    {</span>
 
394
<span class="string">    case PROP_FILE:</span>
 
395
<span class="string">      g_value_set_object (value, tag_page_get_file (tag_page));</span>
 
396
<span class="string">      break;</span>
 
397
<span class="string">    default:</span>
 
398
<span class="string">      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);</span>
 
399
<span class="string">      break;</span>
 
400
<span class="string">    }</span>
 
401
<span class="string">}</span>
 
402
<span class="string">static void</span>
 
403
<span class="string">tag_page_set_property (GObject      *object,</span>
 
404
<span class="string">                       guint         prop_id,</span>
 
405
<span class="string">                       const GValue *value,</span>
 
406
<span class="string">                       GParamSpec   *pspec)</span>
 
407
<span class="string">{</span>
 
408
<span class="string">  TagPage *tag_page = TAG_PAGE (object);</span>
 
409
<span class="string">  switch (prop_id)</span>
 
410
<span class="string">    {</span>
 
411
<span class="string">    case PROP_FILE:</span>
 
412
<span class="string">      tag_page_set_file (tag_page, g_value_get_object (value));</span>
 
413
<span class="string">      break;</span>
 
414
<span class="string">    default:</span>
 
415
<span class="string">      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);</span>
 
416
<span class="string">      break;</span>
 
417
<span class="string">    }</span>
 
418
<span class="string">}</span>
 
419
<span class="string">static void</span>
 
420
<span class="string">tag_page_file_changed (ThunarxFileInfo *file,</span>
 
421
<span class="string">                       TagPage         *tag_page)</span>
 
422
<span class="string">{</span>
 
423
<span class="string">  /* update your user interface elements in the tag_page</span>
 
424
<span class="string">   * to display the new state of the file...</span>
 
425
<span class="string">   */</span>
 
426
<span class="string">}</span>
 
427
<span class="string">GtkWidget*</span>
 
428
<span class="string">tag_page_new (ThunarxFileInfo *file)</span>
 
429
<span class="string">{</span>
 
430
<span class="string">  return g_object_new (TAG_TYPE_PAGE, "</span><span class="normal">file</span><span class="string">", file, NULL);</span>
 
431
<span class="string">}</span>
 
432
<span class="string">ThunarxFileInfo*</span>
 
433
<span class="string">tag_page_get_file (TagPage *tag_page)</span>
 
434
<span class="string">{</span>
 
435
<span class="string">  g_return_val_if_fail (TAG_IS_PAGE (tag_page), NULL);</span>
 
436
<span class="string">  return tag_page-&gt;file;</span>
 
437
<span class="string">}</span>
 
438
<span class="string">void</span>
 
439
<span class="string">tag_page_set_file (TagPage         *tag_page,</span>
 
440
<span class="string">                   ThunarxFileInfo *file)</span>
 
441
<span class="string">{</span>
 
442
<span class="string">  g_return_if_fail (TAG_IS_PAGE (tag_page));</span>
 
443
<span class="string">  g_return_if_fail (file == NULL || THUNARX_IS_FILE_INFO (file));</span>
 
444
<span class="string">  if (tag_page-&gt;file != NULL)</span>
 
445
<span class="string">    {</span>
 
446
<span class="string">      g_signal_handlers_disconnect_by_func (tag_page-&gt;file, tag_page_file_changed, tag_page);</span>
 
447
<span class="string">      g_object_unref (G_OBJECT (tag_page-&gt;file));</span>
 
448
<span class="string">    }</span>
 
449
<span class="string">  tag_page-&gt;file = file;</span>
 
450
<span class="string">  if (file != NULL)</span>
 
451
<span class="string">    {</span>
 
452
<span class="string">      g_object_ref (file);</span>
 
453
<span class="string">      tag_page_file_changed (file, tag_page);</span>
 
454
<span class="string">      g_signal_connect (file, "</span><span class="normal">changed</span><span class="string">", G_CALLBACK (tag_page_file_changed), tag_page);</span>
 
455
<span class="string">    }</span>
 
456
<span class="string">  g_object_notify (G_OBJECT (tag_page), "</span><span class="normal">file</span><span class="string">");</span>
 
457
<span class="string">}</span></pre></td>
 
458
      </tr>
 
459
    </tbody>
 
460
  </table>
 
461
</div>
 
462
 
285
463
<p>
286
464
  If this seems to be too complicated to you, just don't follow the suggestion. But keep in mind, that
287
465
  while the above solution is a little longer than a less structured solution, it yields great flexbility
307
485
<hr>
308
486
<div class="refsect2" title="thunarx_property_page_new ()">
309
487
<a name="thunarx-property-page-new"></a><h3>thunarx_property_page_new ()</h3>
310
 
<pre class="programlisting"><span class="returnvalue">GtkWidget</span> *         thunarx_property_page_new           (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
 
488
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         thunarx_property_page_new           (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
311
489
<p>
312
490
Allocates a new <a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> widget and sets its label to the
313
 
specified <em class="parameter"><code>label</code></em>. If <em class="parameter"><code>label</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, the label is omitted.
 
491
specified <em class="parameter"><code>label</code></em>. If <em class="parameter"><code>label</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the label is omitted.
314
492
</p>
315
493
<div class="variablelist"><table border="0">
316
494
<col align="left" valign="top">
332
510
<hr>
333
511
<div class="refsect2" title="thunarx_property_page_new_with_label_widget ()">
334
512
<a name="thunarx-property-page-new-with-label-widget"></a><h3>thunarx_property_page_new_with_label_widget ()</h3>
335
 
<pre class="programlisting"><span class="returnvalue">GtkWidget</span> *         thunarx_property_page_new_with_label_widget
336
 
                                                        (<em class="parameter"><code><span class="type">GtkWidget</span> *label_widget</code></em>);</pre>
 
513
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         thunarx_property_page_new_with_label_widget
 
514
                                                        (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *label_widget</code></em>);</pre>
337
515
<p>
338
516
Allocates a new <a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> widget and sets its label to
339
517
the specified <em class="parameter"><code>label_widget</code></em>.
343
521
<tbody>
344
522
<tr>
345
523
<td><p><span class="term"><em class="parameter"><code>label_widget</code></em> :</span></p></td>
346
 
<td>a <span class="type">GtkWidget</span>, which should be used as label.
 
524
<td>a <a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a>, which should be used as label.
347
525
</td>
348
526
</tr>
349
527
<tr>
357
535
<hr>
358
536
<div class="refsect2" title="thunarx_property_page_get_label ()">
359
537
<a name="thunarx-property-page-get-label"></a><h3>thunarx_property_page_get_label ()</h3>
360
 
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       thunarx_property_page_get_label     (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>);</pre>
 
538
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       thunarx_property_page_get_label     (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>);</pre>
361
539
<p>
362
 
If the <em class="parameter"><code>property_page</code></em>'s label widget is a <span class="type">GtkLabel</span>, returns the text
363
 
in the label widget (the <em class="parameter"><code>property_page</code></em> will have a <span class="type">GtkLabel</span> for the
364
 
label widget if a non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> argument was passed to <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-new" title="thunarx_property_page_new ()"><code class="function">thunarx_property_page_new()</code></a>).
 
540
If the <em class="parameter"><code>property_page</code></em>'s label widget is a <a href="/usr/share/gtk-doc/html/gtk/GtkLabel.html"><span class="type">GtkLabel</span></a>, returns the text
 
541
in the label widget (the <em class="parameter"><code>property_page</code></em> will have a <a href="/usr/share/gtk-doc/html/gtk/GtkLabel.html"><span class="type">GtkLabel</span></a> for the
 
542
label widget if a non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> argument was passed to <a class="link" href="ThunarxPropertyPage.html#thunarx-property-page-new" title="thunarx_property_page_new ()"><code class="function">thunarx_property_page_new()</code></a>).
365
543
</p>
366
544
<div class="variablelist"><table border="0">
367
545
<col align="left" valign="top">
373
551
</tr>
374
552
<tr>
375
553
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
376
 
<td> the text in the label or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if there was no label widget or
377
 
              the label widget was not a <span class="type">GtkLabel</span>. The returned string is
 
554
<td> the text in the label or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there was no label widget or
 
555
              the label widget was not a <a href="/usr/share/gtk-doc/html/gtk/GtkLabel.html"><span class="type">GtkLabel</span></a>. The returned string is
378
556
              owned by the <em class="parameter"><code>property_page</code></em> and must not be modified or freed.
379
557
</td>
380
558
</tr>
385
563
<div class="refsect2" title="thunarx_property_page_set_label ()">
386
564
<a name="thunarx-property-page-set-label"></a><h3>thunarx_property_page_set_label ()</h3>
387
565
<pre class="programlisting"><span class="returnvalue">void</span>                thunarx_property_page_set_label     (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>,
388
 
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
 
566
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
389
567
<p>
390
 
Sets the text of the label. If <em class="parameter"><code>label</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, the current label is
 
568
Sets the text of the label. If <em class="parameter"><code>label</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the current label is
391
569
removed.
392
570
</p>
393
571
<div class="variablelist"><table border="0">
409
587
<hr>
410
588
<div class="refsect2" title="thunarx_property_page_get_label_widget ()">
411
589
<a name="thunarx-property-page-get-label-widget"></a><h3>thunarx_property_page_get_label_widget ()</h3>
412
 
<pre class="programlisting"><span class="returnvalue">GtkWidget</span> *         thunarx_property_page_get_label_widget
 
590
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         thunarx_property_page_get_label_widget
413
591
                                                        (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>);</pre>
414
592
<p>
415
593
Returns the label widget for the <em class="parameter"><code>property_page</code></em>. See
425
603
</tr>
426
604
<tr>
427
605
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
428
 
<td> the label widget or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if there is none.
 
606
<td> the label widget or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is none.
429
607
</td>
430
608
</tr>
431
609
</tbody>
436
614
<a name="thunarx-property-page-set-label-widget"></a><h3>thunarx_property_page_set_label_widget ()</h3>
437
615
<pre class="programlisting"><span class="returnvalue">void</span>                thunarx_property_page_set_label_widget
438
616
                                                        (<em class="parameter"><code><a class="link" href="ThunarxPropertyPage.html" title="ThunarxPropertyPage"><span class="type">ThunarxPropertyPage</span></a> *property_page</code></em>,
439
 
                                                         <em class="parameter"><code><span class="type">GtkWidget</span> *label_widget</code></em>);</pre>
 
617
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *label_widget</code></em>);</pre>
440
618
<p>
441
619
Sets the label widget for the <em class="parameter"><code>property_page</code></em>. This is the widget
442
620
that will appear in the notebook header for the <em class="parameter"><code>property_page</code></em>.
462
640
<a name="ThunarxPropertyPage.property-details"></a><h2>Property Details</h2>
463
641
<div class="refsect2" title='The "label" property'>
464
642
<a name="ThunarxPropertyPage--label"></a><h3>The <code class="literal">"label"</code> property</h3>
465
 
<pre class="programlisting">  "label"                    <span class="type">gchar</span>*                : Read / Write</pre>
 
643
<pre class="programlisting">  "label"                    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write</pre>
466
644
<p>Text of the page's label.</p>
467
645
<p>Default value: NULL</p>
468
646
</div>
469
647
<hr>
470
648
<div class="refsect2" title='The "label-widget" property'>
471
649
<a name="ThunarxPropertyPage--label-widget"></a><h3>The <code class="literal">"label-widget"</code> property</h3>
472
 
<pre class="programlisting">  "label-widget"             <span class="type">GtkWidget</span>*            : Read / Write</pre>
 
650
<pre class="programlisting">  "label-widget"             <a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a>*            : Read / Write</pre>
473
651
<p>A widget to display in place of the usual page label.</p>
474
652
</div>
475
653
</div>