ThunarxPropertyPage

ThunarxPropertyPage — The base class for pages added to the properties dialog

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <thunarx/thunarx.h>

                    ThunarxPropertyPage;
GtkWidget *         thunarx_property_page_new           (const gchar *label);
GtkWidget *         thunarx_property_page_new_with_label_widget
                                                        (GtkWidget *label_widget);
const gchar *       thunarx_property_page_get_label     (ThunarxPropertyPage *property_page);
void                thunarx_property_page_set_label     (ThunarxPropertyPage *property_page,
                                                         const gchar *label);
GtkWidget *         thunarx_property_page_get_label_widget
                                                        (ThunarxPropertyPage *property_page);
void                thunarx_property_page_set_label_widget
                                                        (ThunarxPropertyPage *property_page,
                                                         GtkWidget *label_widget);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----ThunarxPropertyPage

Implemented Interfaces

ThunarxPropertyPage implements AtkImplementorIface and GtkBuildable.

Properties

  "label"                    gchar*                : Read / Write
  "label-widget"             GtkWidget*            : Read / Write

Description

The class for pages that can be added to Thunar's file properties dialog by extensions implementing the ThunarxPropertyPageProvider interface. The pages returned by extensions from thunarx_property_page_provider_get_pages() method are instances of this class or a derived class. Note that extensions do not need to subclass ThunarxPropertyPage, but may also instantiate it directly and add widgets to it, but I strongly suggest to create a subclass as it usually leads to better modularization and thereby better maintainability in the code.

To pick up the TagPage example from the thunarx_property_page_provider_get_pages() description again, you'd create a new class TagPage, that inherits ThunarxPropertyPage (using the THUNARX_DEFINE_TYPE macro), which provides several user interface elements in the property, and defines atleast one property named "file", which is the ThunarxFileInfo whose tags are displayed in the property page. For example, the tag-page.h header file would look like this (this is really just an example of the suggested way to implement property pages, you may of course choose a different way):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24