diff options
author | Andre Miranda <andreldm@xfce.org> | 2017-10-23 22:47:27 -0300 |
---|---|---|
committer | Andre Miranda <andreldm@xfce.org> | 2017-11-02 00:40:10 -0300 |
commit | 0fa8145c7f024a134966200ef86741115c9db3a1 (patch) | |
tree | 5321316ad70e4dc43adc762ca5abc21ddf4c4694 /thunarx | |
parent | 47fe1cbc3c4a49c93499d8d699fe9e95e68f82d9 (diff) | |
download | thunar-0fa8145c7f024a134966200ef86741115c9db3a1.tar.gz |
Rename thunarx methods *_actions to *_menu_items
Diffstat (limited to 'thunarx')
-rw-r--r-- | thunarx/thunarx-menu-item.c | 474 | ||||
-rw-r--r-- | thunarx/thunarx-menu-item.h | 53 | ||||
-rw-r--r-- | thunarx/thunarx-menu-provider.c | 112 | ||||
-rw-r--r-- | thunarx/thunarx-menu-provider.h | 46 | ||||
-rw-r--r-- | thunarx/thunarx-preferences-provider.c | 46 | ||||
-rw-r--r-- | thunarx/thunarx-preferences-provider.h | 12 | ||||
-rw-r--r-- | thunarx/thunarx-renamer.c | 98 | ||||
-rw-r--r-- | thunarx/thunarx-renamer.h | 70 | ||||
-rw-r--r-- | thunarx/thunarx.symbols | 17 |
9 files changed, 486 insertions, 442 deletions
diff --git a/thunarx/thunarx-menu-item.c b/thunarx/thunarx-menu-item.c index dcacfe75..3a48d6fe 100644 --- a/thunarx/thunarx-menu-item.c +++ b/thunarx/thunarx-menu-item.c @@ -15,55 +15,80 @@ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA */ - +#ifdef HAVE_CONFIG_H #include <config.h> +#endif + #include <glib/gi18n-lib.h> -#include "thunarx-menu-item.h" +#include <thunarx/thunarx-private.h> +#include <thunarx/thunarx-menu-item.h> + + + +#define THUNARX_MENU_ITEM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), THUNARX_TYPE_MENU_ITEM, ThunarxMenuItemPrivate)) + +/** + * SECTION: thunarx-menu-item + * @short_description: The base class for menu items added to the context menus + * @title: ThunarxMenuItem + * @include: thunarx/thunarx.h + * + * The class for menu items that can be added to Thunar's context menus + * by extensions implementing the #ThunarxMenuProvider, #ThunarxPreferencesProvider + * or #ThunarxRenamerProvider interfaces. The items returned by extensions from + * *_get_menu_items() methods are instances of this class or a derived class. + */ +/* Signal identifiers */ enum { - ACTIVATE, - LAST_SIGNAL + ACTIVATE, + LAST_SIGNAL }; +/* Property identifiers */ enum { - PROP_0, - PROP_NAME, - PROP_LABEL, - PROP_TOOLTIP, - PROP_ICON, - PROP_SENSITIVE, - PROP_PRIORITY, - PROP_MENU, - LAST_PROP + PROP_0, + PROP_NAME, + PROP_LABEL, + PROP_TOOLTIP, + PROP_ICON, + PROP_SENSITIVE, + PROP_PRIORITY, + PROP_MENU, + LAST_PROP }; -static void thunarx_menu_item_finalize (GObject *object); -static void thunarx_menu_item_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec); -static void thunarx_menu_item_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec); -struct _ThunarxMenuItemDetails +static void thunarx_menu_item_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); +static void thunarx_menu_item_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void thunarx_menu_item_finalize (GObject *object); + + + +struct _ThunarxMenuItemPrivate { - char *name; - char *label; - char *tooltip; - char *icon; - gboolean sensitive; - gboolean priority; + gchar *name; + gchar *label; + gchar *tooltip; + gchar *icon; + gboolean sensitive; + gboolean priority; }; + + static guint signals[LAST_SIGNAL]; -static GObjectClass *parent_class = NULL; G_DEFINE_TYPE (ThunarxMenuItem, thunarx_menu_item, G_TYPE_OBJECT) @@ -71,67 +96,71 @@ G_DEFINE_TYPE (ThunarxMenuItem, thunarx_menu_item, G_TYPE_OBJECT) static void -thunarx_menu_item_class_init (ThunarxMenuItemClass *class) +thunarx_menu_item_class_init (ThunarxMenuItemClass *klass) { - parent_class = g_type_class_peek_parent (class); - - G_OBJECT_CLASS (class)->finalize = thunarx_menu_item_finalize; - G_OBJECT_CLASS (class)->get_property = thunarx_menu_item_get_property; - G_OBJECT_CLASS (class)->set_property = thunarx_menu_item_set_property; - - signals[ACTIVATE] = - g_signal_new ("activate", - G_TYPE_FROM_CLASS (class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (ThunarxMenuItemClass, - activate), - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - g_object_class_install_property (G_OBJECT_CLASS (class), - PROP_NAME, - g_param_spec_string ("name", - "Name", - "Name of the item", - NULL, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_READABLE)); - g_object_class_install_property (G_OBJECT_CLASS (class), - PROP_LABEL, - g_param_spec_string ("label", - "Label", - "Label to display to the user", - NULL, - G_PARAM_READWRITE)); - g_object_class_install_property (G_OBJECT_CLASS (class), - PROP_TOOLTIP, - g_param_spec_string ("tooltip", - "Tooltip", - "Tooltip for the menu item", - NULL, - G_PARAM_READWRITE)); - g_object_class_install_property (G_OBJECT_CLASS (class), - PROP_ICON, - g_param_spec_string ("icon", - "Icon", - "Name of the icon to display in the menu item", - NULL, - G_PARAM_READWRITE)); - - g_object_class_install_property (G_OBJECT_CLASS (class), - PROP_SENSITIVE, - g_param_spec_boolean ("sensitive", - "Sensitive", - "Whether the menu item is sensitive", - TRUE, - G_PARAM_READWRITE)); - g_object_class_install_property (G_OBJECT_CLASS (class), - PROP_PRIORITY, - g_param_spec_boolean ("priority", - "Priority", - "Show priority text in toolbars", - TRUE, - G_PARAM_READWRITE)); + GObjectClass *gobject_class; + + /* add our private data to the class type */ + g_type_class_add_private (klass, sizeof (ThunarxMenuItemPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = thunarx_menu_item_finalize; + gobject_class->get_property = thunarx_menu_item_get_property; + gobject_class->set_property = thunarx_menu_item_set_property; + + signals[ACTIVATE] = + g_signal_new ("activate", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ThunarxMenuItemClass, + activate), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + g_object_class_install_property (gobject_class, + PROP_NAME, + g_param_spec_string ("name", + "Name", + "Name of the item", + NULL, + G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_LABEL, + g_param_spec_string ("label", + "Label", + "Label to display to the user", + NULL, + G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_TOOLTIP, + g_param_spec_string ("tooltip", + "Tooltip", + "Tooltip for the menu item", + NULL, + G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_ICON, + g_param_spec_string ("icon", + "Icon", + "Name of the icon to display in the menu item", + NULL, + G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, + PROP_SENSITIVE, + g_param_spec_boolean ("sensitive", + "Sensitive", + "Whether the menu item is sensitive", + TRUE, + G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_PRIORITY, + g_param_spec_boolean ("priority", + "Priority", + "Show priority text in toolbars", + TRUE, + G_PARAM_READWRITE)); } @@ -139,114 +168,51 @@ thunarx_menu_item_class_init (ThunarxMenuItemClass *class) static void thunarx_menu_item_init (ThunarxMenuItem *item) { - item->details = g_new0 (ThunarxMenuItemDetails, 1); - item->details->sensitive = TRUE; -} - - - -/** - * thunarx_menu_item_new: - * @name: identifier for the menu item - * @label: user-visible label of the menu item - * @tooltip: tooltip of the menu item - * @icon: path or name of the icon to display in the menu item - * - * Creates a new menu item that can be added to the toolbar or to a contextual menu. - * - * Returns: a newly created #ThunarxMenuItem - */ -ThunarxMenuItem * -thunarx_menu_item_new (const char *name, - const char *label, - const char *tooltip, - const char *icon) -{ - ThunarxMenuItem *item; - - g_return_val_if_fail (name != NULL, NULL); - g_return_val_if_fail (label != NULL, NULL); - - item = g_object_new (THUNARX_TYPE_MENU_ITEM, - "name", name, - "label", label, - "tooltip", tooltip, - "icon", icon, - NULL); - - return item; -} - - - -/** - * thunarx_menu_item_activate: - * @item: pointer to a #ThunarxMenuItem instance - * - * emits the activate signal. - */ -void -thunarx_menu_item_activate (ThunarxMenuItem *item) -{ - g_signal_emit (item, signals[ACTIVATE], 0); + item->priv = THUNARX_MENU_ITEM_GET_PRIVATE (item); + item->priv->sensitive = TRUE; + item->priv->priority = FALSE; } static void thunarx_menu_item_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) + guint param_id, + GValue *value, + GParamSpec *pspec) { - ThunarxMenuItem *item; - - item = THUNARX_MENU_ITEM (object); + ThunarxMenuItem *item = THUNARX_MENU_ITEM (object); - switch (param_id) + switch (param_id) { - case PROP_NAME: - { - g_value_set_string (value, item->details->name); - } + case PROP_NAME: + g_value_set_string (value, item->priv->name); break; - case PROP_LABEL: - { - g_value_set_string (value, item->details->label); - } + case PROP_LABEL: + g_value_set_string (value, item->priv->label); break; - case PROP_TOOLTIP: - { - g_value_set_string (value, item->details->tooltip); - } + case PROP_TOOLTIP: + g_value_set_string (value, item->priv->tooltip); break; - case PROP_ICON: - { - g_value_set_string (value, item->details->icon); - } + case PROP_ICON: + g_value_set_string (value, item->priv->icon); break; - case PROP_SENSITIVE: - { - g_value_set_boolean (value, item->details->sensitive); - } + case PROP_SENSITIVE: + g_value_set_boolean (value, item->priv->sensitive); break; - case PROP_PRIORITY: - { - g_value_set_boolean (value, item->details->priority); - } + case PROP_PRIORITY: + g_value_set_boolean (value, item->priv->priority); break; - default: - { - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; - } + } } @@ -257,62 +223,46 @@ thunarx_menu_item_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - ThunarxMenuItem *item; + ThunarxMenuItem *item = THUNARX_MENU_ITEM (object); - item = THUNARX_MENU_ITEM (object); - - switch (param_id) + switch (param_id) { - case PROP_NAME: - { - g_free (item->details->name); - item->details->name = g_strdup (g_value_get_string (value)); - g_object_notify (object, "name"); - } + case PROP_NAME: + g_free (item->priv->name); + item->priv->name = g_strdup (g_value_get_string (value)); + g_object_notify (object, "name"); break; - case PROP_LABEL: - { - g_free (item->details->label); - item->details->label = g_strdup (g_value_get_string (value)); - g_object_notify (object, "label"); - } + case PROP_LABEL: + g_free (item->priv->label); + item->priv->label = g_strdup (g_value_get_string (value)); + g_object_notify (object, "label"); break; - case PROP_TOOLTIP: - { - g_free (item->details->tooltip); - item->details->tooltip = g_strdup (g_value_get_string (value)); - g_object_notify (object, "tooltip"); - } + case PROP_TOOLTIP: + g_free (item->priv->tooltip); + item->priv->tooltip = g_strdup (g_value_get_string (value)); + g_object_notify (object, "tooltip"); break; - case PROP_ICON: - { - g_free (item->details->icon); - item->details->icon = g_strdup (g_value_get_string (value)); - g_object_notify (object, "icon"); - } + case PROP_ICON: + g_free (item->priv->icon); + item->priv->icon = g_strdup (g_value_get_string (value)); + g_object_notify (object, "icon"); break; - case PROP_SENSITIVE: - { - item->details->sensitive = g_value_get_boolean (value); - g_object_notify (object, "sensitive"); - } + case PROP_SENSITIVE: + item->priv->sensitive = g_value_get_boolean (value); + g_object_notify (object, "sensitive"); break; - case PROP_PRIORITY: - { - item->details->priority = g_value_get_boolean (value); - g_object_notify (object, "priority"); - } + case PROP_PRIORITY: + item->priv->priority = g_value_get_boolean (value); + g_object_notify (object, "priority"); break; - default: - { - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } } @@ -322,16 +272,88 @@ thunarx_menu_item_set_property (GObject *object, static void thunarx_menu_item_finalize (GObject *object) { - ThunarxMenuItem *item; + ThunarxMenuItem *item = THUNARX_MENU_ITEM (object); + + g_free (item->priv->name); + g_free (item->priv->label); + g_free (item->priv->tooltip); + g_free (item->priv->icon); + + (*G_OBJECT_CLASS (thunarx_menu_item_parent_class)->finalize) (object); +} + + - item = THUNARX_MENU_ITEM (object); +/** + * thunarx_menu_item_new: + * @name: identifier for the menu item + * @label: user-visible label of the menu item + * @tooltip: tooltip of the menu item + * @icon: path or name of the icon to display in the menu item + * + * Creates a new menu item that can be added to the toolbar or to a contextual menu. + * + * Returns: a newly created #ThunarxMenuItem + */ +ThunarxMenuItem * +thunarx_menu_item_new (const gchar *name, + const gchar *label, + const gchar *tooltip, + const gchar *icon) +{ + g_return_val_if_fail (name != NULL, NULL); + g_return_val_if_fail (label != NULL, NULL); + + return g_object_new (THUNARX_TYPE_MENU_ITEM, + "name", name, + "label", label, + "tooltip", tooltip, + "icon", icon, + NULL); +} - g_free (item->details->name); - g_free (item->details->label); - g_free (item->details->tooltip); - g_free (item->details->icon); - g_free (item->details); - G_OBJECT_CLASS (parent_class)->finalize (object); +/** + * thunarx_menu_item_activate: + * @item: pointer to a #ThunarxMenuItem instance + * + * Emits the activate signal. + */ +void +thunarx_menu_item_activate (ThunarxMenuItem *item) +{ + g_signal_emit (item, signals[ACTIVATE], 0); +} + + + +/** + * thunarx_menu_item_get_sensitive: + * @item: pointer to a #ThunarxMenuItem instance + * + * Returns whether the menu item is sensitive. + */ +gboolean +thunarx_menu_item_get_sensitive (ThunarxMenuItem *item) +{ + g_return_val_if_fail (THUNARX_IS_MENU_ITEM (item), FALSE); + return item->priv->sensitive; +} + + + +/** + * thunarx_menu_item_set_sensitive: + * @item: pointer to a #ThunarxMenuItem instance + * @sensitive: %TRUE to make the menu item sensitive + * + * Sets the ::sensitive property of the menu item to @sensitive. + */ +void +thunarx_menu_item_set_sensitive (ThunarxMenuItem *item, + gboolean sensitive) +{ + g_return_if_fail (THUNARX_IS_MENU_ITEM (item)); + item->priv->sensitive = sensitive; } diff --git a/thunarx/thunarx-menu-item.h b/thunarx/thunarx-menu-item.h index db61f9f3..6a64ab9f 100644 --- a/thunarx/thunarx-menu-item.h +++ b/thunarx/thunarx-menu-item.h @@ -16,38 +16,53 @@ * Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef THUNARX_MENU_ITEM_H -#define THUNARX_MENU_ITEM_H +#if !defined(THUNARX_INSIDE_THUNARX_H) && !defined(THUNARX_COMPILATION) +#error "Only <thunarx/thunarx.h> can be included directly, this file may disappear or change contents" +#endif + +#ifndef __THUNARX_MENU_ITEM_H__ +#define __THUNARX_MENU_ITEM_H__ #include <glib-object.h> -#define THUNARX_TYPE_MENU_ITEM (thunarx_menu_item_get_type()) +G_BEGIN_DECLS; + +typedef struct _ThunarxMenuItemPrivate ThunarxMenuItemPrivate; +typedef struct _ThunarxMenuItemClass ThunarxMenuItemClass; +typedef struct _ThunarxMenuItem ThunarxMenuItem; + +#define THUNARX_TYPE_MENU_ITEM (thunarx_menu_item_get_type ()) #define THUNARX_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNARX_TYPE_MENU_ITEM, ThunarxMenuItem)) #define THUNARX_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNARX_TYPE_MENU_ITEM, ThunarxMenuItemClass)) #define THUNARX_IS_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNARX_TYPE_MENU_ITEM)) #define THUNARX_IS_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), THUNARX_TYPE_MENU_ITEM)) -#define THUNARX_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), THUNARX_TYPE_MENU_ITEM, ThunarxMenuItemClass)) +#define THUNARX_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), THUNARX_TYPE_MENU_ITEM)) -typedef struct _ThunarxMenuItem ThunarxMenuItem; -typedef struct _ThunarxMenuItemDetails ThunarxMenuItemDetails; -typedef struct _ThunarxMenuItemClass ThunarxMenuItemClass; +struct _ThunarxMenuItemClass { + GObjectClass __parent__; + void (*activate) (ThunarxMenuItem *item); +}; struct _ThunarxMenuItem { - GObject parent; - ThunarxMenuItemDetails *details; -}; + GObject __parent__; -struct _ThunarxMenuItemClass { - GObjectClass parent; - void (*activate) (ThunarxMenuItem *item); + /*< private >*/ + ThunarxMenuItemPrivate *priv; }; -GType thunarx_menu_item_get_type (void); -ThunarxMenuItem *thunarx_menu_item_new (const char *name, - const char *label, - const char *tip, - const char *icon); +GType thunarx_menu_item_get_type (void) G_GNUC_CONST; + +ThunarxMenuItem *thunarx_menu_item_new (const gchar *name, + const gchar *label, + const gchar *tip, + const gchar *icon) G_GNUC_MALLOC; void thunarx_menu_item_activate (ThunarxMenuItem *item); -#endif +gboolean thunarx_menu_item_get_sensitive (ThunarxMenuItem *item); +void thunarx_menu_item_set_sensitive (ThunarxMenuItem *item, + gboolean sensitive) + +G_END_DECLS; + +#endif /* !__THUNARX_MENU_ITEM_H__ */ diff --git a/thunarx/thunarx-menu-provider.c b/thunarx/thunarx-menu-provider.c index a268860d..1b1cff6e 100644 --- a/thunarx/thunarx-menu-provider.c +++ b/thunarx/thunarx-menu-provider.c @@ -38,17 +38,17 @@ * * Extensions that implement this interface should do its best to respond as * fast as possible to method invokations by the file manager. That said, when - * the file manager calls the thunarx_menu_provider_get_file_actions() or the - * thunarx_menu_provider_get_folder_actions() method, the implementation in the + * the file manager calls the thunarx_menu_provider_get_file_menu_items() or the + * thunarx_menu_provider_get_folder_menu_items() method, the implementation in the * extension should use only the thunarx_file_info_has_mime_type() and - * thunarx_file_info_is_directory() methods to determine the actions that should + * thunarx_file_info_is_directory() methods to determine the menu items that should * be added to the file manager's context menu. Don't perform any complicated I/O - * to determine the action list, as that would block the whole file manager process. + * to determine the menu items list, as that would block the whole file manager process. * - * The <link linkend="ThunarxMenuItem">ThunarxMenuItem</link>s returned from the - * thunarx_menu_provider_get_file_actions() and thunarx_menu_provider_get_folder_actions() + * The name of <link linkend="ThunarxMenuItem">ThunarxMenuItem</link>s returned from the + * thunarx_menu_provider_get_file_menu_items() and thunarx_menu_provider_get_folder_menu_items() * methods must be namespaced with the module to avoid collision with internal file manager - * actions and actions provided by other extensions. For example, the menu action provided + * menu items and menu items provided by other extensions. For example, the menu item provided * by the <systemitem class="library">ThunarOpenTerminal</systemitem> extension should be * called <literal>ThunarOpenTerminal::open-terminal</literal>. */ @@ -80,10 +80,10 @@ thunarx_menu_provider_get_type (void) /** - * thunarx_menu_provider_get_file_actions: + * thunarx_menu_provider_get_file_menu_items: * @provider : a #ThunarxMenuProvider. - * @window : the #GtkWindow within which the actions will be used. - * @files : the list of #ThunarxFileInfo<!---->s to which the actions will be applied. + * @window : the #GtkWindow within which the menu items will be used. + * @files : the list of #ThunarxFileInfo<!---->s to which the menu items will be applied. * * Returns the list of #ThunarxMenuItem<!---->s that @provider has to offer for * @files. @@ -91,12 +91,12 @@ thunarx_menu_provider_get_type (void) * As a special note, this method automatically takes a reference on the * @provider for every #ThunarxMenuItem object returned from the real implementation * of this method in @provider. This is to make sure that the extension stays - * in memory for atleast the time that the actions are used. If the extension + * in memory for at least the time that the menu items are used. If the extension * wants to stay in memory for a longer time, it'll need to take care of this * itself (e.g. by taking an additional reference on the @provider itself, * that's released at a later time). * - * The caller is responsible to free the returned list of actions using + * The caller is responsible to free the returned list of menu items using * something like this when no longer needed: * <informalexample><programlisting> * g_list_free_full (list, g_object_unref); @@ -106,39 +106,39 @@ thunarx_menu_provider_get_type (void) * for @files. **/ GList* -thunarx_menu_provider_get_file_actions (ThunarxMenuProvider *provider, - GtkWidget *window, - GList *files) +thunarx_menu_provider_get_file_menu_items (ThunarxMenuProvider *provider, + GtkWidget *window, + GList *files) { - GList *actions; + GList *items; g_return_val_if_fail (THUNARX_IS_MENU_PROVIDER (provider), NULL); g_return_val_if_fail (GTK_IS_WINDOW (window), NULL); g_return_val_if_fail (files != NULL, NULL); - if (THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_file_actions != NULL) + if (THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_file_menu_items != NULL) { - /* query the actions from the implementation */ - actions = (*THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_file_actions) (provider, window, files); + /* query the menu items from the implementation */ + items = (*THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_file_menu_items) (provider, window, files); - /* take a reference on the provider for each action */ - thunarx_object_list_take_reference (actions, provider); + /* take a reference on the provider for each menu item */ + thunarx_object_list_take_reference (items, provider); } else { - actions = NULL; + items = NULL; } - return actions; + return items; } /** - * thunarx_menu_provider_get_folder_actions: + * thunarx_menu_provider_get_folder_menu_items: * @provider : a #ThunarxMenuProvider. - * @window : the #GtkWindow within which the actions will be used. - * @folder : the folder to which the actions should will be applied. + * @window : the #GtkWindow within which the menu items will be used. + * @folder : the folder to which the menu items should will be applied. * * Returns the list of #ThunarxMenuItem<!---->s that @provider has to offer for * @folder. @@ -146,12 +146,12 @@ thunarx_menu_provider_get_file_actions (ThunarxMenuProvider *provider, * As a special note, this method automatically takes a reference on the * @provider for every #ThunarxMenuItem object returned from the real implementation * of this method in @provider. This is to make sure that the extension stays - * in memory for atleast the time that the actions are used. If the extension + * in memory for at least the time that the menu items are used. If the extension * wants to stay in memory for a longer time, it'll need to take care of this * itself (e.g. by taking an additional reference on the @provider itself, * that's released at a later time). * - * The caller is responsible to free the returned list of actions using + * The caller is responsible to free the returned list of menu items using * something like this when no longer needed: * <informalexample><programlisting> * g_list_free_full (list, g_object_unref); @@ -161,57 +161,57 @@ thunarx_menu_provider_get_file_actions (ThunarxMenuProvider *provider, * for @folder. **/ GList* -thunarx_menu_provider_get_folder_actions (ThunarxMenuProvider *provider, - GtkWidget *window, - ThunarxFileInfo *folder) +thunarx_menu_provider_get_folder_menu_items (ThunarxMenuProvider *provider, + GtkWidget *window, + ThunarxFileInfo *folder) { - GList *actions; + GList *items; g_return_val_if_fail (THUNARX_IS_MENU_PROVIDER (provider), NULL); g_return_val_if_fail (GTK_IS_WINDOW (window), NULL); g_return_val_if_fail (THUNARX_IS_FILE_INFO (folder), NULL); g_return_val_if_fail (thunarx_file_info_is_directory (folder), NULL); - if (THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_folder_actions != NULL) + if (THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_folder_menu_items != NULL) { - /* query the actions from the implementation */ - actions = (*THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_folder_actions) (provider, window, folder); + /* query the menu items from the implementation */ + items = (*THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_folder_menu_items) (provider, window, folder); - /* take a reference on the provider for each action */ - thunarx_object_list_take_reference (actions, provider); + /* take a reference on the provider for each menu item */ + thunarx_object_list_take_reference (items, provider); } else { - actions = NULL; + items = NULL; } - return actions; + return items; } /** - * thunarx_menu_provider_get_dnd_actions: + * thunarx_menu_provider_get_dnd_menu_items: * @provider : a #ThunarxMenuProvider. - * @window : the #GtkWindow within which the actions will be used. + * @window : the #GtkWindow within which the menu items will be used. * @folder : the folder into which the @files are being dropped * @files : the list of #ThunarxFileInfo<!---->s for the files that are * being dropped to @folder in @window. * * Returns the list of #ThunarxMenuItem<!---->s that @provider has to offer for * dropping the @files into the @folder. For example, the thunar-archive-plugin - * provides <guilabel>Extract Here</guilabel> actions when dropping archive + * provides <guilabel>Extract Here</guilabel> menu items when dropping archive * files into a folder that is writable by the user. * * As a special note, this method automatically takes a reference on the * @provider for every #ThunarxMenuItem object returned from the real implementation * of this method in @provider. This is to make sure that the extension stays - * in memory for atleast the time that the actions are used. If the extension + * in memory for at least the time that the menu items are used. If the extension * wants to stay in memory for a longer time, it'll need to take care of this * itself (e.g. by taking an additional reference on the @provider itself, * that's released at a later time). * - * The caller is responsible to free the returned list of actions using + * The caller is responsible to free the returned list of menu items using * something like this when no longer needed: * <informalexample><programlisting> * g_list_free_full (list, g_object_unref); @@ -223,12 +223,12 @@ thunarx_menu_provider_get_folder_actions (ThunarxMenuProvider *provider, * Since: 0.4.1 **/ GList* -thunarx_menu_provider_get_dnd_actions (ThunarxMenuProvider *provider, - GtkWidget *window, - ThunarxFileInfo *folder, - GList *files) +thunarx_menu_provider_get_dnd_menu_items (ThunarxMenuProvider *provider, + GtkWidget *window, + ThunarxFileInfo *folder, + GList *files) { - GList *actions; + GList *items; g_return_val_if_fail (THUNARX_IS_MENU_PROVIDER (provider), NULL); g_return_val_if_fail (GTK_IS_WINDOW (window), NULL); @@ -236,18 +236,18 @@ thunarx_menu_provider_get_dnd_actions (ThunarxMenuProvider *provider, g_return_val_if_fail (thunarx_file_info_is_directory (folder), NULL); g_return_val_if_fail (files != NULL, NULL); - if (THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_dnd_actions != NULL) + if (THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_dnd_menu_items != NULL) { - /* query the actions from the implementation */ - actions = (*THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_dnd_actions) (provider, window, folder, files); + /* query the menu items from the implementation */ + items = (*THUNARX_MENU_PROVIDER_GET_IFACE (provider)->get_dnd_menu_items) (provider, window, folder, files); - /* take a reference on the provider for each action */ - thunarx_object_list_take_reference (actions, provider); + /* take a reference on the provider for each menu item */ + thunarx_object_list_take_reference (items, provider); } else { - actions = NULL; + items = NULL; } - return actions; + return items; } diff --git a/thunarx/thunarx-menu-provider.h b/thunarx/thunarx-menu-provider.h index 1adabcc9..f81ba22f 100644 --- a/thunarx/thunarx-menu-provider.h +++ b/thunarx/thunarx-menu-provider.h @@ -41,9 +41,9 @@ typedef struct _ThunarxMenuProvider ThunarxMenuProvider; /** * ThunarxMenuProviderIface: - * @get_file_actions: See thunarx_menu_provider_get_file_actions(). - * @get_folder_actions: See thunarx_menu_provider_get_folder_actions(). - * @get_dnd_actions: See thunarx_menu_provider_get_dnd_actions(). + * @get_file_menu_items: See thunarx_menu_provider_get_file_menu_items(). + * @get_folder_menu_items: See thunarx_menu_provider_get_folder_menu_items(). + * @get_dnd_menu_items: See thunarx_menu_provider_get_dnd_menu_items(). * * Interface with virtual methods implemented by extensions that provide * additional menu items for the file manager's context menus. @@ -57,18 +57,18 @@ struct _ThunarxMenuProviderIface GTypeInterface __parent__; /*< public >*/ - GList *(*get_file_actions) (ThunarxMenuProvider *provider, - GtkWidget *window, - GList *files); + GList *(*get_file_menu_items) (ThunarxMenuProvider *provider, + GtkWidget *window, + GList *files); - GList *(*get_folder_actions) (ThunarxMenuProvider *provider, - GtkWidget *window, - ThunarxFileInfo *folder); + GList *(*get_folder_menu_items) (ThunarxMenuProvider *provider, + GtkWidget *window, + ThunarxFileInfo *folder); - GList *(*get_dnd_actions) (ThunarxMenuProvider *provider, - GtkWidget *window, - ThunarxFileInfo *folder, - GList *files); + GList *(*get_dnd_menu_items) (ThunarxMenuProvider *provider, + GtkWidget *window, + ThunarxFileInfo *folder, + GList *files); /*< private >*/ void (*reserved1) (void); @@ -78,18 +78,18 @@ struct _ThunarxMenuProviderIface GType thunarx_menu_provider_get_type (void) G_GNUC_CONST; -GList *thunarx_menu_provider_get_file_actions (ThunarxMenuProvider *provider, - GtkWidget *window, - GList *files) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; +GList *thunarx_menu_provider_get_file_menu_items (ThunarxMenuProvider *provider, + GtkWidget *window, + GList *files) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -GList *thunarx_menu_provider_get_folder_actions (ThunarxMenuProvider *provider, - GtkWidget *window, - ThunarxFileInfo *folder) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; +GList *thunarx_menu_provider_get_folder_menu_items (ThunarxMenuProvider *provider, + GtkWidget *window, + ThunarxFileInfo *folder) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -GList *thunarx_menu_provider_get_dnd_actions (ThunarxMenuProvider *provider, - GtkWidget *window, - ThunarxFileInfo *folder, - GList *files) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; +GList *thunarx_menu_provider_get_dnd_menu_items (ThunarxMenuProvider *provider, + GtkWidget *window, + ThunarxFileInfo *folder, + GList *files) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS; diff --git a/thunarx/thunarx-preferences-provider.c b/thunarx/thunarx-preferences-provider.c index 97f7485f..249c7f87 100644 --- a/thunarx/thunarx-preferences-provider.c +++ b/thunarx/thunarx-preferences-provider.c @@ -32,7 +32,7 @@ * @include: thunarx/thunarx.h * * The ThunarxPreferencesProvider interface is implemented by extensions that - * want to register additional actions in the preferences menu of the file + * want to register additional items 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 @@ -41,12 +41,12 @@ * the file manager menu, because it should use desktop-wide settings for * archive managers instead). * - * The <link linkend="ThunarxMenuItem"><type>ThunarxMenuItem</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>. + * The name of <link linkend="ThunarxMenuItem"><type>ThunarxMenuItem</type></link>s + * returned from the thunarx_preferences_provider_get_menu items() method must be + * namespaced with the model to avoid collision with internal file manager menu items + * and menu items provided by other extensions. For example, the preferences menu item + * provided by the <literal>thunar-uca</literal> extension is called + * <literal>ThunarUca::manage-menu-items</literal>. */ GType @@ -76,22 +76,22 @@ thunarx_preferences_provider_get_type (void) /** - * thunarx_preferences_provider_get_actions: + * thunarx_preferences_provider_get_menu_items: * @provider : a #ThunarxPreferencesProvider. - * @window : the #GtkWindow within which the actions will be used. + * @window : the #GtkWindow within which the menu items will be used. * * Returns the list of #ThunarxMenuItem<!---->s that @provider has to offer - * as preferences within @window. These actions will usually be added + * as preferences within @window. These menu items will usually be added * to the builtin list of preferences in the "Edit" menu of the file * manager's @window. * * Plugin writers that implement this interface should make sure to - * choose descriptive action names and tooltips, and not to crowd the + * choose descriptive names and tooltips, and not to crowd the * "Edit" menu too much. That said, think twice before implementing - * this interface, as too many preference actions will render the + * this interface, as too many preference menu items will render the * file manager useless over time! * - * The caller is responsible to free the returned list of actions using + * The caller is responsible to free the returned list of menu items using * something like this when no longer needed: * <informalexample><programlisting> * g_list_free_full (list, g_object_unref); @@ -101,26 +101,26 @@ thunarx_preferences_provider_get_type (void) * to offer as preferences within @window. **/ GList* -thunarx_preferences_provider_get_actions (ThunarxPreferencesProvider *provider, - GtkWidget *window) +thunarx_preferences_provider_get_menu_items (ThunarxPreferencesProvider *provider, + GtkWidget *window) { - GList *actions; + GList *items; g_return_val_if_fail (THUNARX_IS_PREFERENCES_PROVIDER (provider), NULL); g_return_val_if_fail (GTK_IS_WINDOW (window), NULL); - if (THUNARX_PREFERENCES_PROVIDER_GET_IFACE (provider)->get_actions != NULL) + if (THUNARX_PREFERENCES_PROVIDER_GET_IFACE (provider)->get_menu_items != NULL) { - /* query the actions from the implementation */ - actions = (*THUNARX_PREFERENCES_PROVIDER_GET_IFACE (provider)->get_actions) (provider, window); + /* query the menu items from the implementation */ + items = (*THUNARX_PREFERENCES_PROVIDER_GET_IFACE (provider)->get_menu_items) (provider, window); - /* take a reference on the provider for each action */ - thunarx_object_list_take_reference (actions, provider); + /* take a reference on the provider for each menu item */ + thunarx_object_list_take_reference (items, provider); } else { - actions = NULL; + items = NULL; } - return actions; + return items; } diff --git a/thunarx/thunarx-preferences-provider.h b/thunarx/thunarx-preferences-provider.h index 856c5a18..1a742d9e 100644 --- a/thunarx/thunarx-preferences-provider.h +++ b/thunarx/thunarx-preferences-provider.h @@ -39,10 +39,10 @@ typedef struct _ThunarxPreferencesProvider ThunarxPreferencesProvider; /** * ThunarxPreferencesProviderIface: - * @get_actions: See thunarx_preferences_provider_get_actions(). + * @get_menu_items: See thunarx_preferences_provider_get_menu_items(). * * Interface with virtual methods implementation by extensions that - * want to install preferences actions in the file managers menu. + * want to install preferences items in the file managers menu. * Providers don't need to implement all of the virtual methods listed * in the interface. */ @@ -53,8 +53,8 @@ struct _ThunarxPreferencesProviderIface GTypeInterface __parent__; /*< public >*/ - GList *(*get_actions) (ThunarxPreferencesProvider *provider, - GtkWidget *window); + GList *(*get_menu_items) (ThunarxPreferencesProvider *provider, + GtkWidget *window); /*< private >*/ void (*reserved1) (void); @@ -66,8 +66,8 @@ struct _ThunarxPreferencesProviderIface GType thunarx_preferences_provider_get_type (void) G_GNUC_CONST; -GList *thunarx_preferences_provider_get_actions (ThunarxPreferencesProvider *provider, - GtkWidget *window); +GList *thunarx_preferences_provider_get_menu_items (ThunarxPreferencesProvider *provider, + GtkWidget *window); G_END_DECLS; diff --git a/thunarx/thunarx-renamer.c b/thunarx/thunarx-renamer.c index 7082dcc1..510fc89a 100644 --- a/thunarx/thunarx-renamer.c +++ b/thunarx/thunarx-renamer.c @@ -76,29 +76,29 @@ enum * button which opens a dialog with the additional settings. */ -static void thunarx_renamer_finalize (GObject *object); -static GObject *thunarx_renamer_constructor (GType type, - guint n_construct_properties, - GObjectConstructParam *construct_properties); -static void thunarx_renamer_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void thunarx_renamer_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static gchar *thunarx_renamer_real_process (ThunarxRenamer *renamer, - ThunarxFileInfo *file, - const gchar *text, - guint num); -static void thunarx_renamer_real_load (ThunarxRenamer *renamer, - GHashTable *settings); -static void thunarx_renamer_real_save (ThunarxRenamer *renamer, - GHashTable *settings); -static GList *thunarx_renamer_real_get_actions (ThunarxRenamer *renamer, - GtkWindow *window, - GList *files); +static void thunarx_renamer_finalize (GObject *object); +static GObject *thunarx_renamer_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_properties); +static void thunarx_renamer_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void thunarx_renamer_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static gchar *thunarx_renamer_real_process (ThunarxRenamer *renamer, + ThunarxFileInfo *file, + const gchar *text, + guint num); +static void thunarx_renamer_real_load (ThunarxRenamer *renamer, + GHashTable *settings); +static void thunarx_renamer_real_save (ThunarxRenamer *renamer, + GHashTable *settings); +static GList *thunarx_renamer_real_get_menu_items (ThunarxRenamer *renamer, + GtkWindow *window, + GList *files); @@ -135,7 +135,7 @@ thunarx_renamer_class_init (ThunarxRenamerClass *klass) klass->process = thunarx_renamer_real_process; klass->load = thunarx_renamer_real_load; klass->save = thunarx_renamer_real_save; - klass->get_actions = thunarx_renamer_real_get_actions; + klass->get_menu_items = thunarx_renamer_real_get_menu_items; /** * ThunarxRenamer:help-url: @@ -406,9 +406,9 @@ thunarx_renamer_real_save (ThunarxRenamer *renamer, static GList* -thunarx_renamer_real_get_actions (ThunarxRenamer *renamer, - GtkWindow *window, - GList *files) +thunarx_renamer_real_get_menu_items (ThunarxRenamer *renamer, + GtkWindow *window, + GList *files) { /* return an empty list, derived classes may override this method */ return NULL; @@ -622,7 +622,7 @@ thunarx_renamer_save (ThunarxRenamer *renamer, /** - * thunarx_renamer_get_actions: + * thunarx_renamer_get_menu_items: * @renamer : a #ThunarxRenamer. * @window : a #GtkWindow or %NULL. * @files : a #GList of #ThunarxFileInfo<!---->s. @@ -630,12 +630,12 @@ thunarx_renamer_save (ThunarxRenamer *renamer, * Returns the list of #ThunarxMenuItem<!---->s provided by @renamer for * the given list of @files. By default, this method returns %NULL * (the empty list), but derived classes may override this method - * to provide additional actions for files in the bulk renamer + * to provide additional items for files in the bulk renamer * dialog list. * * The returned #ThunarxMenuItem<!---->s will be displayed in the file's * context menu of the bulk renamer dialog, when this @renamer is - * active. For example, an ID3-Tag based renamer may add an action + * active. For example, an ID3-Tag based renamer may add an menu item * "Edit Tags" to the context menus of supported media files and, * when activated, display a dialog (which should be transient and * modal for @window, if not %NULL), which allows the users to edit @@ -643,24 +643,24 @@ thunarx_renamer_save (ThunarxRenamer *renamer, * * Derived classes that override this method should always check * first if all the #ThunarxFileInfo<!---->s in the list of @files - * are supported, and only return actions that can be performed on + * are supported, and only return menu items that can be performed on * this specific list of @files. For example, the ID3-Tag renamer * mentioned above, should first check whether all items in @files * are actually audio files. The thunarx_file_info_has_mime_type() * of the #ThunarxFileInfo interface can be used to easily test * whether a file in the @files list is of a certain MIME type. * - * Some actions may only work properly if only a single file ist + * Some menu items may only work properly if only a single file is * selected (for example, the ID3-Tag renamer will probably only * supporting editing one file at a time). In this case you have * basicly two options: Either you can return %NULL here if @files - * does not contain exactly one item, or you can return the actions + * does not contain exactly one item, or you can return the menu items * as usual, but make them insensitive, using: * <informalexample><programlisting> - * gtk_action_set_sensitive (action, FALSE); + * thunarx_menu_item_set_sensitive (item, FALSE); * </programlisting></informalexample> * The latter has the advantage that the user will still notice the - * existance of the action and probably realize that it can only be + * existance of the menu item and probably realize that it can only be * applied to a single item at once. * * The caller is responsible to free the returned list using something @@ -672,11 +672,11 @@ thunarx_renamer_save (ThunarxRenamer *renamer, * As a special note, this method automatically takes a reference on the * @renamer for every #ThunarxMenuItem object returned from the real implementation * of this method in @renamer. This is to make sure that the extension stays - * in memory for atleast the time that the actions are used. + * in memory for at least the time that the menu items are used. * - * The #ThunarxMenuItem<!---->s returned from this method must be namespaced with - * the module to avoid collision with internal file manager actions and - * actions provided by other extensions. For example, the menu action + * The name of #ThunarxMenuItem<!---->s returned from this method must be namespaced with + * the module to avoid collision with internal file manager menu items and + * menu items provided by other extensions. For example, the menu item * provided by the ID3-Tag renamer mentioned above, should be named * <literal>TagRenamer::edit-tags</literal> (if <literal>TagRenamer</literal> * is the class name). For additional information about the way #ThunarxMenuItem<!---->s @@ -690,28 +690,28 @@ thunarx_renamer_save (ThunarxRenamer *renamer, * Instead, if @window is not %NULL, add a weak reference using the * g_object_weak_ref() or g_object_add_weak_pointer() method. But don't * forget to release the weak reference if @window survived the lifetime - * of your action (which is likely to be the case in most situations). + * of your menu item (which is likely to be the case in most situations). * * Return value: the list of #ThunarxMenuItem<!---->s provided by @renamer * for the given list of @files. **/ GList* -thunarx_renamer_get_actions (ThunarxRenamer *renamer, - GtkWindow *window, - GList *files) +thunarx_renamer_get_menu_items (ThunarxRenamer *renamer, + GtkWindow *window, + GList *files) { - GList *actions; + GList *items; g_return_val_if_fail (THUNARX_IS_RENAMER (renamer), NULL); g_return_val_if_fail (window == NULL || GTK_IS_WINDOW (window), NULL); - /* query the actions from the implementation */ - actions = (*THUNARX_RENAMER_GET_CLASS (renamer)->get_actions) (renamer, window, files); + /* query the menu items from the implementation */ + items = (*THUNARX_RENAMER_GET_CLASS (renamer)->get_menu_items) (renamer, window, files); - /* take a reference on the renamer for each action */ - thunarx_object_list_take_reference (actions, renamer); + /* take a reference on the renamer for each menu item */ + thunarx_object_list_take_reference (items, renamer); - return actions; + return items; } diff --git a/thunarx/thunarx-renamer.h b/thunarx/thunarx-renamer.h index 8143aa80..5291554b 100644 --- a/thunarx/thunarx-renamer.h +++ b/thunarx/thunarx-renamer.h @@ -44,11 +44,11 @@ typedef struct _ThunarxRenamer ThunarxRenamer; /** * ThunarxRenamerClass: - * @process: see thunarx_renamer_process(). - * @load: see thunarx_renamer_load(). - * @save: see thunarx_renamer_save(). - * @get_actions: see thunarx_renamer_get_actions(). - * @changed: see thunarx_renamer_changed(). + * @process: see thunarx_renamer_process(). + * @load: see thunarx_renamer_load(). + * @save: see thunarx_renamer_save(). + * @get_menu_items: see thunarx_renamer_get_menu_items(). + * @changed: see thunarx_renamer_changed(). * * Abstract base class with virtual methods implemented by extensions * that provide additional bulk renamers for the integrated bulk @@ -64,19 +64,19 @@ struct _ThunarxRenamerClass /*< public >*/ /* virtual methods */ - gchar *(*process) (ThunarxRenamer *renamer, - ThunarxFileInfo *file, - const gchar *text, - guint index); + gchar *(*process) (ThunarxRenamer *renamer, + ThunarxFileInfo *file, + const gchar *text, + guint index); - void (*load) (ThunarxRenamer *renamer, - GHashTable *settings); - void (*save) (ThunarxRenamer *renamer, - GHashTable *settings); + void (*load) (ThunarxRenamer *renamer, + GHashTable *settings); + void (*save) (ThunarxRenamer *renamer, + GHashTable *settings); - GList *(*get_actions) (ThunarxRenamer *renamer, - GtkWindow *window, - GList *files); + GList *(*get_menu_items) (ThunarxRenamer *renamer, + GtkWindow *window, + GList *files); /*< private >*/ void (*reserved0) (void); @@ -104,31 +104,31 @@ struct _ThunarxRenamer ThunarxRenamerPrivate *priv; }; -GType thunarx_renamer_get_type (void) G_GNUC_CONST; +GType thunarx_renamer_get_type (void) G_GNUC_CONST; -const gchar *thunarx_renamer_get_help_url (ThunarxRenamer *renamer); -void thunarx_renamer_set_help_url (ThunarxRenamer *renamer, - const gchar *help_url); +const gchar *thunarx_renamer_get_help_url (ThunarxRenamer *renamer); +void thunarx_renamer_set_help_url (ThunarxRenamer *renamer, + const gchar *help_url); -const gchar *thunarx_renamer_get_name (ThunarxRenamer *renamer); -void thunarx_renamer_set_name (ThunarxRenamer *renamer, - const gchar *name); +const gchar *thunarx_renamer_get_name (ThunarxRenamer *renamer); +void thunarx_renamer_set_name (ThunarxRenamer *renamer, + const gchar *name); -gchar *thunarx_renamer_process (ThunarxRenamer *renamer, - ThunarxFileInfo *file, - const gchar *text, - guint idx) G_GNUC_MALLOC; +gchar *thunarx_renamer_process (ThunarxRenamer *renamer, + ThunarxFileInfo *file, + const gchar *text, + guint idx) G_GNUC_MALLOC; -void thunarx_renamer_load (ThunarxRenamer *renamer, - GHashTable *settings); -void thunarx_renamer_save (ThunarxRenamer *renamer, - GHashTable *settings); +void thunarx_renamer_load (ThunarxRenamer *renamer, + GHashTable *settings); +void thunarx_renamer_save (ThunarxRenamer *renamer, + GHashTable *settings); -GList *thunarx_renamer_get_actions (ThunarxRenamer *renamer, - GtkWindow *window, - GList *files) G_GNUC_MALLOC; +GList *thunarx_renamer_get_menu_items (ThunarxRenamer *renamer, + GtkWindow *window, + GList *files) G_GNUC_MALLOC; -void thunarx_renamer_changed (ThunarxRenamer *renamer); +void thunarx_renamer_changed (ThunarxRenamer *renamer); G_END_DECLS; diff --git a/thunarx/thunarx.symbols b/thunarx/thunarx.symbols index 9b0cf610..a53ed091 100644 --- a/thunarx/thunarx.symbols +++ b/thunarx/thunarx.symbols @@ -46,15 +46,22 @@ thunarx_file_info_list_get_type thunarx_file_info_list_copy thunarx_file_info_list_free +/* ThunarxMenuItem methods */ +thunarx_menu_item_get_type G_GNUC_CONST +thunarx_menu_item_new G_GNUC_MALLOC +thunarx_menu_item_activate +thunarx_menu_item_get_sensitive +thunarx_menu_item_set_sensitive + /* ThunarxMenuProvider methods */ thunarx_menu_provider_get_type G_GNUC_CONST -thunarx_menu_provider_get_file_actions G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT -thunarx_menu_provider_get_folder_actions G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT -thunarx_menu_provider_get_dnd_actions G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT +thunarx_menu_provider_get_file_menu_items G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT +thunarx_menu_provider_get_folder_menu_items G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT +thunarx_menu_provider_get_dnd_menu_items G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT /* ThunarxPreferencesProvider methods */ thunarx_preferences_provider_get_type G_GNUC_CONST -thunarx_preferences_provider_get_actions +thunarx_preferences_provider_get_menu_items /* ThunarxPropertyPage methods */ thunarx_property_page_get_type G_GNUC_CONST @@ -92,7 +99,7 @@ thunarx_renamer_set_name thunarx_renamer_process G_GNUC_MALLOC thunarx_renamer_save thunarx_renamer_load -thunarx_renamer_get_actions G_GNUC_MALLOC +thunarx_renamer_get_menu_items G_GNUC_MALLOC thunarx_renamer_changed /* ThunarxRenamerProvider methods */ |