Top |
void | thunar_action_manager_activate_selected_files () |
void | thunar_action_manager_open_selected_folders () |
void | thunar_action_manager_set_widget () |
GtkWidget * | thunar_action_manager_get_widget () |
void | thunar_action_manager_append_accelerators () |
GtkWidget * | thunar_action_manager_append_menu_item () |
gboolean | thunar_action_manager_append_open_section () |
gboolean | thunar_action_manager_append_custom_actions () |
gboolean | thunar_action_manager_check_uca_key_activation () |
void | thunar_action_manager_action_mount () |
gboolean | thunar_action_manager_action_unmount () |
gboolean | thunar_action_manager_action_eject () |
void | thunar_action_manager_set_selection () |
gboolean | thunar_action_manager_action_empty_trash () |
gboolean | thunar_action_manager_action_restore () |
gboolean | thunar_action_manager_action_restore_and_show () |
void | thunar_action_manager_set_searching () |
XfceGtkActionEntry * | thunar_action_manager_get_action_entries () |
void | device-operation-finished | No Hooks |
void | device-operation-started | No Hooks |
void | new-files-created | No Hooks |
The ThunarActionManager class manages the creation and execution of menu-item which are used by multiple menus. The management is done in a central way to prevent code duplication on various places. XfceGtkActionEntry is used in order to define a list of the managed items and ease the setup of single items.
ThunarActionManager implements the ThunarNavigator interface in order to use the "open in new tab" and "change directory" service. It as well tracks the current directory via ThunarNavigator.
ThunarActionManager implements the ThunarComponent interface in order to track the currently selected files. Based on to the current selection (and some other criteria), some menu items will not be shown, or will be insensitive.
Files which are opened via ThunarActionManager are poked first in order to e.g do missing mount operations.
As well menu-item related services, like activation of selected files and opening tabs/new windows, are provided by ThunarActionManager.
It is required to keep an instance of ThunarActionManager open, in order to listen to accellerators which target menu-items managed by ThunarActionManager. Typically a single instance of ThunarActionManager is provided by each ThunarWindow.
void thunar_action_manager_activate_selected_files (ThunarActionManager *action_mgr
,ThunarActionManagerFolderOpenAction action
,GAppInfo *app_info
);
Will try to open all selected files with the provided GAppInfo
action_mgr |
a ThunarActionManager instance |
|
action |
the ThunarActionManagerFolderOpenAction to use, if there are folders among the selected files |
|
app_info |
a GAppInfo instance |
void thunar_action_manager_open_selected_folders (ThunarActionManager *action_mgr
,gboolean open_in_tabs
);
Will open each selected folder in a new tab/window
action_mgr |
a ThunarActionManager instance |
|
open_in_tabs |
TRUE to open each folder in a new tab, FALSE to open each folder in a new window |
void thunar_action_manager_set_widget (ThunarActionManager *action_mgr
,GtkWidget *widget
);
Associates action_mgr
with widget
.
GtkWidget *
thunar_action_manager_get_widget (ThunarActionManager *action_mgr
);
Will return the parent widget of this ThunarActionManager
void thunar_action_manager_append_accelerators (ThunarActionManager *action_mgr
,GtkAccelGroup *accel_group
);
Connects all accelerators and corresponding default keys of this widget to the global accelerator list
GtkWidget * thunar_action_manager_append_menu_item (ThunarActionManager *action_mgr
,GtkMenuShell *menu
,ThunarActionManagerAction action
,gboolean force
);
Adds the selected, widget specific GtkMenuItem to the passed GtkMenuShell
action_mgr |
Instance of a ThunarActionManager |
|
menu |
GtkMenuShell to which the item should be added |
|
action |
ThunarActionManagerAction to select which item should be added |
|
force |
force to generate the item. If it cannot be used, it will be shown as insensitive |
gboolean thunar_action_manager_append_open_section (ThunarActionManager *action_mgr
,GtkMenuShell *menu
,gboolean support_tabs
,gboolean support_change_directory
,gboolean force
);
Will append the section "open/open in new window/open in new tab/open with" to the provided GtkMenuShell
action_mgr |
a ThunarActionManager instance |
|
menu |
GtkMenuShell on which the open section should be appended |
|
support_tabs |
Set to TRUE if 'open in new tab' should be shown |
|
support_change_directory |
Set to TRUE if 'open' should be shown |
|
force |
Append the open section, even if the selected folder is the current folder |
gboolean thunar_action_manager_append_custom_actions (ThunarActionManager *action_mgr
,GtkMenuShell *menu
);
Will append all custom actions which match the file-type to the provided GtkMenuShell
action_mgr |
a ThunarActionManager instance |
|
menu |
GtkMenuShell on which the custom actions should be appended |
gboolean thunar_action_manager_check_uca_key_activation (ThunarActionManager *action_mgr
,GdkEventKey *key_event
);
void
thunar_action_manager_action_mount (ThunarActionManager *action_mgr
);
Will mount the selected device, if any. The related folder will not be opened.
gboolean
thunar_action_manager_action_unmount (ThunarActionManager *action_mgr
);
gboolean
thunar_action_manager_action_eject (ThunarActionManager *action_mgr
);
Will unmount the selected device, if any
void thunar_action_manager_set_selection (ThunarActionManager *action_mgr
,GList *selected_thunar_files
,ThunarDevice *selected_device
,GFile *selected_location
);
Will set the related items as "selection" and clear any previous selection. Note that always only one of the 3 "selected" arguments should be set.
action_mgr |
a ThunarActionManager instance |
|
selected_thunar_files |
GList of selected ThunarFile instances, or NULL |
|
selected_device |
selected ThunarDevice or NULL |
|
selected_location |
selected GFile (possibly only holds an URI), or NULL |
gboolean
thunar_action_manager_action_empty_trash
(ThunarActionManager *action_mgr
);
gboolean
thunar_action_manager_action_restore (ThunarActionManager *action_mgr
);
gboolean
thunar_action_manager_action_restore_and_show
(ThunarActionManager *action_mgr
);
void thunar_action_manager_set_searching (ThunarActionManager *action_mgr
,gboolean b
);
XfceGtkActionEntry *
thunar_action_manager_get_action_entries
(void
);
“selected-device”
property “selected-device” gpointer
selected-device.
Owner: ThunarActionManager
Flags: Write
“selected-location”
property “selected-location” gpointer
selected-location.
Owner: ThunarActionManager
Flags: Write
“device-operation-finished”
signalvoid user_function (ThunarActionManager *action_mgr, ThunarDevice *device, gpointer user_data)
This signal is emitted by the action_mgr
right after the device operation (mount/unmount/eject) is finished
action_mgr |
||
device |
the ThunarDevice on which the operation was finished |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“device-operation-started”
signalvoid user_function (ThunarActionManager *action_mgr, ThunarDevice *device, gpointer user_data)
This signal is emitted by the action_mgr
right after the device operation (mount/unmount/eject) is started
action_mgr |
||
device |
the ThunarDevice on which the operation was finished |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“new-files-created”
signalvoid user_function (ThunarActionManager *action_mgr, gpointer files, gpointer user_data)
This signal is emitted by the action_mgr
whenever new files were created (e.g. via "rename", "create" or "paste")
action_mgr |
||
files |
a GList of ThunarFiles which were created |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks