<!-- ##### SECTION Title ##### -->
ThunarxPreferencesProvider

<!-- ##### SECTION Short_Description ##### -->
The interface to extensions that provide preferences

<!-- ##### SECTION Long_Description ##### -->
<para>
  The ThunarxPreferencesProvider interface is implemented by extensions that
  want to register additional actions in the preferences menu of the file
  manager. In general this should only be done by extensions that are closely
  tied to the file manager (for example, the <literal>thunar-uca</literal> is
  such an extension, while an extension that just adds <guimenuitem>Compress
  file</guimenuitem> and <guimenuitem>Uncompress file</guimenuitem> to the
  context menu of compressed files should not add their own preferences to
  the file manager menu, because it should use desktop-wide settings for
  archive managers instead).
</para>

<para>
  The <link linkend="GtkAction"><type>GtkAction</type></link>s returned from the
  thunarx_preferences_provider_get_actions() method must be namespaced with the
  model to avoid collision with internal file manager actions and actions provided
  by other extensions. For example, the preferences action provided by the
  <literal>thunar-uca</literal> extension is called
  <literal>ThunarUca::manage-actions</literal>.
</para>

<example>
  <title>Preferences provider example</title>

  <programlisting>
static void hello_preferences_provider_init (ThunarxPreferencesProviderIface *iface);
static void hello_get_actions               (ThunarxPreferencesProvider      *provider,
                                             GtkWidget                       *window);

THUNARX_DEFINE_TYPE_WITH_CODE (Hello, hello, G_TYPE_OBJECT,
                               THUNARX_IMPLEMENT_INTERFACE (THUNARX_TYPE_PREFERENCES_PROVIDER,
                                                            hello_preferences_provider_init));

static void
hello_preferences_provider_init (ThunarxPreferencesProviderIface *iface)
{
  iface->get_actions = hello_get_actions;
}

static void
hello_activated (GtkWidget *window)
{
  GtkWidget *dialog;

  dialog = gtk_message_dialog_new (GTK_WINDOW (window),
                                   GTK_DIALOG_MODAL
                                   | GTK_DIALOG_DESTROY_WITH_PARENT,
                                   GTK_MESSAGE_INFO,
                                   GTK_BUTTONS_OK,
                                   "Hello World!");
  gtk_dialog_run (GTK_DIALOG (dialog));
  gtk_widget_destroy (dialog);
}

static GList*
hello_get_actions (ThunarxPreferencesProvider *provider,
                   GtkWidget                  *window)
{
  GtkAction *action;
  GClosure  *closure;

  action = gtk_action_new ("Hello::say-hello", "Say hello", "Say hello", NULL);
  closure = g_cclosure_object_new_swap (G_CALLBACK (hello_activated), G_OBJECT (window));
  g_signal_connect_closure (G_OBJECT (action), "activate", closure, TRUE);

  return g_list_prepend (NULL, action);
}
  </programlisting>
</example>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->
Stable

<!-- ##### STRUCT ThunarxPreferencesProviderIface ##### -->
<para>
  Interface with virtual methods implementation by extensions that
  want to install preferences actions in the file managers menu.
</para>

<para>
  Providers don't need to implement all of the virtual methods listed
  in the interface.
</para>

@get_actions: See thunarx_preferences_provider_get_actions().

<!-- ##### STRUCT ThunarxPreferencesProvider ##### -->
<para>
  Preferences provider type.
</para>


<!-- ##### FUNCTION thunarx_preferences_provider_get_actions ##### -->
<para>

</para>

@provider: 
@window: 
@Returns: 


