From 451eef9b275ce006b270a3569d96e531e24dd15a Mon Sep 17 00:00:00 2001 From: Alexander van der Meij Date: Fri, 29 Aug 2014 20:52:13 +0200 Subject: implementation of extension interface and status management (gsoc2014) --- libcaja-private/Makefile.am | 2 + libcaja-private/caja-column-utilities.c | 3 +- libcaja-private/caja-extensions.c | 205 +++ libcaja-private/caja-extensions.h | 48 + libcaja-private/caja-file.c | 4 +- libcaja-private/caja-global-preferences.c | 1 + libcaja-private/caja-global-preferences.h | 5 +- libcaja-private/caja-module.c | 11 +- libcaja-private/caja-module.h | 2 +- libcaja-private/org.mate.caja.gschema.xml.in | 9 + src/caja-application.c | 4 +- src/caja-file-management-properties-main.c | 2 +- src/caja-file-management-properties.c | 93 ++ src/caja-file-management-properties.ui | 1783 +++++++++----------------- src/caja-window-manage-views.c | 3 +- src/caja-window-menus.c | 3 +- src/caja-window-toolbars.c | 3 +- src/file-manager/fm-directory-view.c | 3 +- src/file-manager/fm-properties-window.c | 3 +- 19 files changed, 1017 insertions(+), 1170 deletions(-) create mode 100644 libcaja-private/caja-extensions.c create mode 100644 libcaja-private/caja-extensions.h diff --git a/libcaja-private/Makefile.am b/libcaja-private/Makefile.am index b3bffb2f..4e7b10f9 100644 --- a/libcaja-private/Makefile.am +++ b/libcaja-private/Makefile.am @@ -85,6 +85,8 @@ libcaja_private_la_SOURCES = \ caja-dnd.h \ caja-emblem-utils.c \ caja-emblem-utils.h \ + caja-extensions.c \ + caja-extensions.h \ caja-entry.c \ caja-entry.h \ caja-file-attributes.h \ diff --git a/libcaja-private/caja-column-utilities.c b/libcaja-private/caja-column-utilities.c index 1ba570df..49b022c8 100644 --- a/libcaja-private/caja-column-utilities.c +++ b/libcaja-private/caja-column-utilities.c @@ -29,6 +29,7 @@ #include #include #include +#include #include static GList * @@ -140,7 +141,7 @@ get_extension_columns (void) GList *providers; GList *l; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_COLUMN_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_COLUMN_PROVIDER); columns = NULL; diff --git a/libcaja-private/caja-extensions.c b/libcaja-private/caja-extensions.c new file mode 100644 index 00000000..b15923fd --- /dev/null +++ b/libcaja-private/caja-extensions.c @@ -0,0 +1,205 @@ +/* + * caja-extension.c - extension management functions + * + * Copyright (C) 2014 MATE Desktop. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * Author: Alexander van der Meij + */ + +#include "caja-extensions.h" + +#include "caja-global-preferences.h" +#include "caja-module.h" + +#include + + +static GList *caja_extensions = NULL; + + +Extension * +extension_new (gchar *filename, gboolean state, GObject *module) +{ + Extension *ext; + + ext = g_new0 (Extension, 1); + ext->filename = filename; + ext->state = state; + ext->module = module; + return ext; +} + +/* functions related to persistent configuration through gsettings: */ + +static gboolean +gsettings_key_has_value (const gchar *value) +{ + gchar **list; + gint i; + + list = g_settings_get_strv (caja_extension_preferences, + CAJA_PREFERENCES_DISABLED_EXTENSIONS); + + if (list != NULL) + { + for (i = 0; list[i]; i++) + { + if (g_ascii_strcasecmp (value, list[i]) == 0) + { + g_strfreev (list); + return TRUE; + } + } + } + g_strfreev (list); + return FALSE; +} + +static gboolean +gsettings_append_to_list (const char *value) +{ + gchar **current; + gchar **new; + gint size; + gboolean retval; + + current = g_settings_get_strv (caja_extension_preferences, + CAJA_PREFERENCES_DISABLED_EXTENSIONS); + + for (size = 0; current[size] != NULL; size++); + + size += 1; + size += 1; + + new = g_realloc_n (current, size, sizeof (gchar *)); + + new[size - 2] = g_strdup (value); + new[size - 1] = NULL; + + retval = g_settings_set_strv (caja_extension_preferences, + CAJA_PREFERENCES_DISABLED_EXTENSIONS, + (const gchar **) new); + + g_strfreev (new); + return retval; +} + +static gboolean +gsettings_remove_from_list (const char *value) +{ + gchar **current; + GArray *array; + gint i; + gboolean retval; + + current = g_settings_get_strv (caja_extension_preferences, + CAJA_PREFERENCES_DISABLED_EXTENSIONS); + + array = g_array_new (TRUE, TRUE, sizeof (gchar *)); + + for (i = 0; current[i] != NULL; i++) + { + if (g_strcmp0 (current[i], value) != 0) + array = g_array_append_val (array, current[i]); + } + + retval = g_settings_set_strv (caja_extension_preferences, + CAJA_PREFERENCES_DISABLED_EXTENSIONS, + (const gchar **) array->data); + + g_strfreev (current); + g_array_free (array, TRUE); + return retval; +} + +/* functions related to the extension management */ + +static gboolean +caja_extension_is_disabled (const gchar *extname) +{ + if (gsettings_key_has_value (extname)) + { + return TRUE; + } + return FALSE; +} + +GList * +caja_extensions_get_for_type (GType type) +{ + GList *l; + GList *ret = NULL; + + for (l = caja_extensions; l != NULL; l = l->next) + { + Extension *ext = l->data; + if (ext->state) // only load enabled extensions + { + if (G_TYPE_CHECK_INSTANCE_TYPE (G_OBJECT (ext->module), type)) + { + g_object_ref (ext->module); + ret = g_list_prepend (ret, ext->module); + } + } + } + g_list_free (l); + return ret; +} + +GList * +caja_extensions_get_list (void) +{ + return caja_extensions; +} + +void +caja_extension_register (gchar *filename, GObject *module) +{ + gboolean state = TRUE; // new extensions are enabled by default. + gchar *extname; + + extname = g_strndup (filename, strlen(filename) - 3); + + if (caja_extension_is_disabled (extname)) + state = FALSE; + + Extension *ext = extension_new (extname, state, module); + caja_extensions = g_list_append (caja_extensions, ext); +} + +gboolean +caja_extension_set_state (Extension *ext, gboolean new_state) +{ + if (ext) + { + g_return_val_if_fail (ext->state != new_state, FALSE); + ext->state = new_state; + } + + gboolean retval; + if (new_state) { + retval = gsettings_remove_from_list (ext->filename); + } + else { + retval = gsettings_append_to_list (ext->filename); + } + + g_return_val_if_fail (retval == TRUE, FALSE); + return TRUE; +} + diff --git a/libcaja-private/caja-extensions.h b/libcaja-private/caja-extensions.h new file mode 100644 index 00000000..35d0a50e --- /dev/null +++ b/libcaja-private/caja-extensions.h @@ -0,0 +1,48 @@ +/* + * caja-extension.c - extension management functions + * + * Copyright (C) 2014 MATE Desktop. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * Author: Alexander van der Meij + */ + +#ifndef CAJA_EXTENSIONS_H +#define CAJA_EXTENSIONS_H + +#include +#include + +typedef struct _Extension { + gchar *filename; + gboolean state; + GObject *module; +}Extension; + +#define EXTENSION(x) ((Extension*)x) + +void caja_extension_register (gchar *filename, GObject *module); + +void caja_extensions_setup (void); +GList *caja_extensions_get_list (void); +GList *caja_extensions_get_for_type (GType type); + + + + +#endif // CAJA_EXTENSIONS_H + diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c index 3e642391..d80629e2 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -62,6 +62,8 @@ #include #include +#include + #include #include #include @@ -7586,7 +7588,7 @@ caja_file_invalidate_extension_info_internal (CajaFile *file) g_list_free_full (file->details->pending_info_providers, g_object_unref); file->details->pending_info_providers = - caja_module_get_extensions_for_type (CAJA_TYPE_INFO_PROVIDER); + caja_extensions_get_for_type (CAJA_TYPE_INFO_PROVIDER); } void diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c index f66dc95f..98f44e80 100644 --- a/libcaja-private/caja-global-preferences.c +++ b/libcaja-private/caja-global-preferences.c @@ -83,6 +83,7 @@ caja_global_preferences_init (void) caja_desktop_preferences = g_settings_new("org.mate.caja.desktop"); caja_tree_sidebar_preferences = g_settings_new("org.mate.caja.sidebar-panels.tree"); caja_list_view_preferences = g_settings_new("org.mate.caja.list-view"); + caja_extension_preferences = g_settings_new("org.mate.caja.extensions"); mate_background_preferences = g_settings_new("org.mate.background"); mate_lockdown_preferences = g_settings_new("org.mate.lockdown"); diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h index ee76abb8..d97c7225 100644 --- a/libcaja-private/caja-global-preferences.h +++ b/libcaja-private/caja-global-preferences.h @@ -202,10 +202,8 @@ typedef enum #define CAJA_PREFERENCES_DESKTOP_VOLUMES_VISIBLE "volumes-visible" #define CAJA_PREFERENCES_DESKTOP_NETWORK_VISIBLE "network-icon-visible" #define CAJA_PREFERENCES_DESKTOP_NETWORK_NAME "network-icon-name" - - /* Lockdown */ #define CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE "disable-command-line" - +#define CAJA_PREFERENCES_DISABLED_EXTENSIONS "disabled-extensions" void caja_global_preferences_init (void); char *caja_global_preferences_get_default_folder_viewer_preference_as_iid (void); @@ -218,6 +216,7 @@ GSettings *caja_desktop_preferences; GSettings *caja_tree_sidebar_preferences; GSettings *caja_compact_view_preferences; GSettings *caja_list_view_preferences; +GSettings *caja_extension_preferences; GSettings *mate_background_preferences; GSettings *mate_lockdown_preferences; diff --git a/libcaja-private/caja-module.c b/libcaja-private/caja-module.c index b24dc053..07951498 100644 --- a/libcaja-private/caja-module.c +++ b/libcaja-private/caja-module.c @@ -152,6 +152,7 @@ module_object_weak_notify (gpointer user_data, GObject *object) static void add_module_objects (CajaModule *module) { + GObject *object; const GType *types; int num_types; int i; @@ -164,8 +165,10 @@ add_module_objects (CajaModule *module) { break; } - caja_module_add_type (types[i]); + object = caja_module_add_type (types[i]); } + gchar *filename = g_path_get_basename (module->path); + caja_extension_register (filename, object); } static CajaModule * @@ -210,10 +213,8 @@ load_module_dir (const char *dirname) name, NULL); caja_module_load_file (filename); - g_free (filename); } } - g_dir_close (dir); } } @@ -236,6 +237,7 @@ void caja_module_setup (void) { static gboolean initialized = FALSE; + GList *res; if (!initialized) { @@ -279,7 +281,7 @@ caja_module_extension_list_free (GList *extensions) g_list_free (extensions); } -void +GObject * caja_module_add_type (GType type) { GObject *object; @@ -290,4 +292,5 @@ caja_module_add_type (GType type) NULL); module_objects = g_list_prepend (module_objects, object); + return object; } diff --git a/libcaja-private/caja-module.h b/libcaja-private/caja-module.h index b89cbf34..c02ad17a 100644 --- a/libcaja-private/caja-module.h +++ b/libcaja-private/caja-module.h @@ -37,7 +37,7 @@ extern "C" { /* Add a type to the module interface - allows caja to add its own modules * without putting them in separate shared libraries */ - void caja_module_add_type (GType type); + GObject *caja_module_add_type (GType type); #ifdef __cplusplus } diff --git a/libcaja-private/org.mate.caja.gschema.xml.in b/libcaja-private/org.mate.caja.gschema.xml.in index 1cf7fa0e..8aef7ade 100644 --- a/libcaja-private/org.mate.caja.gschema.xml.in +++ b/libcaja-private/org.mate.caja.gschema.xml.in @@ -457,4 +457,13 @@ <_description>The side pane view to show in newly opened windows. + + + + [ ] + List of extensions in disabled state. + This list contains the extensions that are currently de-activated. + + + diff --git a/src/caja-application.c b/src/caja-application.c index 415d7bec..b7199725 100644 --- a/src/caja-application.c +++ b/src/caja-application.c @@ -69,7 +69,7 @@ #include #include #include -#include +#include #include #include #include @@ -471,7 +471,7 @@ menu_provider_init_callback (void) GList *providers; GList *l; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_MENU_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_MENU_PROVIDER); for (l = providers; l != NULL; l = l->next) { diff --git a/src/caja-file-management-properties-main.c b/src/caja-file-management-properties-main.c index 6a407b71..b2b79552 100644 --- a/src/caja-file-management-properties-main.c +++ b/src/caja-file-management-properties-main.c @@ -27,8 +27,8 @@ #include #include -#include #include +#include #include "caja-file-management-properties.h" diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index d5f62b68..a0902ed2 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -174,6 +175,14 @@ static const char * const icon_captions_components[] = NULL }; +enum +{ + EXT_STATE_COLUMN, + EXT_ICON_COLUMN, + EXT_INFO_COLUMN, + EXT_STRUCT_COLUMN +}; + static void caja_file_management_properties_dialog_update_media_sensitivity (GtkBuilder *builder); static void @@ -604,6 +613,38 @@ out: g_free (x_content_type); } +static void +extension_state_toggled (GtkCellRendererToggle *cell, gchar *path_str, gpointer data) +{ + GtkTreeIter iter; + GtkTreePath *path; + GtkTreeModel *model; + gboolean new_state; + Extension *ext; + + path = gtk_tree_path_new_from_string (path_str); + model = gtk_tree_view_get_model (GTK_TREE_VIEW (data)); + + g_object_get (G_OBJECT (cell), "active", &new_state, NULL); + gtk_tree_model_get_iter_from_string (model, &iter, path_str); + + + + new_state ^= 1; + + if (&iter != NULL) + { + gtk_tree_model_get (model, &iter, EXT_STRUCT_COLUMN, &ext, -1); + + if (caja_extension_set_state (ext, new_state)) + { + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + EXT_STATE_COLUMN, new_state, -1); + } + } + gtk_tree_path_free (path); +} + static void caja_file_management_properties_dialog_setup_media_page (GtkBuilder *builder) @@ -715,6 +756,57 @@ skip: caja_file_management_properties_dialog_update_media_sensitivity (builder); } +static void +caja_file_management_properties_dialog_setup_extension_page (GtkBuilder *builder) +{ + GtkCellRendererToggle *toggle; + GtkListStore *store; + GtkTreeView *view; + GtkTreeIter iter; + GtkIconTheme *icon_theme; + GdkPixbuf *ext_pixbuf_icon; + gchar *ext_text_info; + + GList *extensions; + int i; + + extensions = caja_extensions_get_list (); + + view = GTK_TREE_VIEW ( + gtk_builder_get_object (builder, "extension_view")); + store = GTK_LIST_STORE ( + gtk_builder_get_object (builder, "extension_store")); + + toggle = GTK_CELL_RENDERER_TOGGLE ( + gtk_builder_get_object (builder, "extension_toggle")); + g_object_set (toggle, "xpad", 6, NULL); + + g_signal_connect (toggle, "toggled", + G_CALLBACK (extension_state_toggled), view); + + icon_theme = gtk_icon_theme_get_default(); + ext_pixbuf_icon = gtk_icon_theme_load_icon (icon_theme, "gtk-open", + GTK_ICON_SIZE_SMALL_TOOLBAR, + GTK_ICON_LOOKUP_USE_BUILTIN, NULL); + + for (i = 0; i < g_list_length (extensions); i++) + { + Extension* ext = EXTENSION (g_list_nth_data (extensions, i)); + + ext_text_info = g_markup_printf_escaped ("%s\n%s", + ext->filename, + "This is a placeholder."); + + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + EXT_STATE_COLUMN, ext->state, + EXT_ICON_COLUMN, ext_pixbuf_icon, + EXT_INFO_COLUMN, ext_text_info, + EXT_STRUCT_COLUMN, ext, -1); + } + g_free (ext_text_info); +} + static void bind_builder_bool (GtkBuilder *builder, GSettings *settings, @@ -1010,6 +1102,7 @@ caja_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi caja_file_management_properties_dialog_setup_icon_caption_page (builder); caja_file_management_properties_dialog_setup_list_column_page (builder); caja_file_management_properties_dialog_setup_media_page (builder); + caja_file_management_properties_dialog_setup_extension_page (builder); g_signal_connect_swapped (caja_media_preferences, "changed::" CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER, diff --git a/src/caja-file-management-properties.ui b/src/caja-file-management-properties.ui index d952f720..dbba67dd 100644 --- a/src/caja-file-management-properties.ui +++ b/src/caja-file-management-properties.ui @@ -1,8 +1,32 @@ - - + + + + + + + + + + + + + + + + + True + False + gtk-about + + + True + False + gtk-preferences + + @@ -17,8 +41,26 @@ + + + + + + + + Always + + + Local Files Only + + + Never + + + + @@ -50,6 +92,7 @@ + @@ -78,6 +121,7 @@ + @@ -106,6 +150,7 @@ + @@ -134,6 +179,7 @@ + @@ -150,6 +196,7 @@ + @@ -166,6 +213,7 @@ + @@ -203,22 +251,7 @@ - - - - - Always - - - Local Files Only - - - Never - - - - - + @@ -234,155 +267,123 @@ + False 5 File Management Preferences - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False + center + dialog True - False + False 2 True - GTK_BUTTONBOX_END + False + end + gtk-help True - True True - gtk-help + True + False True - GTK_RELIEF_NORMAL - True + + False + False + 0 + + gtk-close True - True True - gtk-close + True + False True - GTK_RELIEF_NORMAL - True + + False + False + 1 + - 0 False True - GTK_PACK_END + end + 0 - 5 True True - True - True - GTK_POS_TOP - False - False + 5 - 12 True - False + False + 12 18 True - False + False 6 True + False + 0 <b>Default View</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 View _new folders using: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 default_view_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model1 @@ -392,51 +393,42 @@ - 0 False + True + 1 - 0 False + True + 0 True - False + False 12 True + False + 0 _Arrange items: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 sort_order_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model2 @@ -446,146 +438,117 @@ - 0 False + True + 1 - 0 False + True + 1 + Sort _folders before files True True - Sort _folders before files + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 2 + Show hidden and _backup files True True - Show hidden and _backup files + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 3 - 0 False + True + 1 - 0 False + True + 0 True - False + False 6 True + False + 0 <b>Icon View Defaults</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 Default _zoom level: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 icon_view_zoom_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model3 @@ -595,147 +558,117 @@ - 0 False + True + 1 - 0 False + True + 0 + _Use compact layout True True - _Use compact layout + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 1 + _Text beside icons True True - _Text beside icons + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 2 - 0 False + True + 1 - 0 False True + 1 True - False + False 6 True + False + 0 <b>Compact View Defaults</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 _Default zoom level: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 compact_view_zoom_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model4 @@ -745,129 +678,102 @@ - 0 False + True + 1 - 0 False + True + 0 + A_ll columns have the same width True True - A_ll columns have the same width + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 1 - 0 False + True + 1 - 0 False True + 2 True - False + False 6 True + False + 0 <b>List View Defaults</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 D_efault zoom level: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 list_view_zoom_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model5 @@ -877,997 +783,736 @@ - 0 False + True + 1 - 0 False + True + 0 - 0 False + True + 1 - 0 False True + 3 True - False + False 6 True + False + 0 <b>Tree View Defaults</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 + Show _only folders True True - Show _only folders + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 0 - 0 False + True + 1 - 0 False True + 4 - - False - True - True + False Views - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + False + - 12 True - False + False + 12 18 True - False + False 6 True + False + 0 <b>Behavior</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False - 0 + False + _Single click to open items True True - _Single click to open items + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 0 + _Double click to open items True True - _Double click to open items + False True - GTK_RELIEF_NORMAL - True - False - False True single_click_radiobutton - 6 False False + 6 + 1 + Open each _folder in its own window True True - Open each _folder in its own window + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 2 - 0 False False + 1 - 0 False True + 0 True - False + False 6 True + False + 0 <b>Executable Text Files</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 + _Run executable text files when they are opened True True - _Run executable text files when they are opened + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 0 + _View executable text files when they are opened True True - _View executable text files when they are opened + False True - GTK_RELIEF_NORMAL - True - False - False True scripts_execute_radiobutton - 0 False False + 1 + _Ask each time True True - _Ask each time + False True - GTK_RELIEF_NORMAL - True - False - False True scripts_execute_radiobutton - 0 False False + 2 - 0 False False + 1 - 0 False True + 1 True - False + False 6 True + False + 0 <b>Trash</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 + Ask before _emptying the Trash or deleting files True True - Ask before _emptying the Trash or deleting files + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 0 + I_nclude a Delete command that bypasses Trash True True - I_nclude a Delete command that bypasses Trash + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 1 - 0 False False + 1 - 0 False True + 2 - False - True + 1 True + False Behavior - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + 1 + False + - 12 True - False + False + 12 18 True - False + False 6 True + False + 0 <b>Icon Captions</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True + False + 0 Choose the order of information to appear beneath icon names. More information will appear when zooming in closer. - False - False - GTK_JUSTIFY_LEFT True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - 0 + False True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False - 0 False False + 0 True - False - True - 0 + False + 0 - 0 False False + 1 - 0 False False + 1 True - False - 0 + False True - + False True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True - 0 + False + 0 - 0 False False + 1 - 0 False False + 2 True - False - 0 + False True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False - 0 False False + 0 True - False - True - 0 + False + 0 - 0 False False + 1 - 0 False False + 3 - 0 False False + 1 - 0 False True + 0 True - False + False 6 True + False + 0 <b>Date</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 12 True + False _Format: True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 date_format_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True - 0 + False + 0 - 0 False False + 1 - 0 False False + 1 - 0 False False + 1 True - False + False 6 True + False + 0 <b>Size</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 + _Show file sizes with IEC units True True - _Show file sizes with IEC units + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 1 - 0 False False + 2 - False - True + 2 True + False Display - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + 2 + False + - 12 True - False + False + 12 18 True - False + False 6 True + False + 0 <b>List Columns</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True + False + 0 Choose the order of information to appear in the list view. - False - False - GTK_JUSTIFY_LEFT True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 @@ -1877,127 +1522,93 @@ - 0 False + True + 1 - 0 False + True + 0 - False - True + 3 True + False List Columns - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + 3 + False + - 12 True - False + False + 12 18 True - False + False 6 True + False + 0 <b>Text Files</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 Show te_xt in icons: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 preview_text_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model6 @@ -2007,114 +1618,87 @@ - 0 False False + 1 - 0 False False + 0 - 0 False False + 1 - 0 False True + 0 True - False + False 6 True + False + 0 <b>Other Previewable Files</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 Show _thumbnails: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 preview_image_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model7 @@ -2124,53 +1708,42 @@ - 0 False False + 1 - 0 False False + 0 True - False + False 12 True + False + 0 _Only for files smaller than: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 preview_image_size_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model8 @@ -2180,111 +1753,87 @@ - 0 False + True + 1 - 0 False + True + 1 - 0 False + True + 1 - 0 False True + 1 True - False + False 6 True + False + 0 <b>Sound Files</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 Preview _sound files: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 preview_sound_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model9 @@ -2294,111 +1843,87 @@ - 0 False + True + 1 - 0 False + True + 0 - 0 False + True + 1 - 0 False True + 2 True - False + False 6 True + False + 0 <b>Folders</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True - False + False 12 True + False + 0 Count _number of items: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 preview_folder_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - False - True + False model10 @@ -2408,637 +1933,590 @@ - 0 False + True + 1 - 0 False + True + 0 - 0 False + True + 1 - 0 False True + 3 - False - True + 4 True + False Preview - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + 4 + False + - 12 True - False + False + 12 6 True - False + False 6 True - False + False 6 True + False + 0 <b>Media Handling</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True + False + 0 Choose what happens when inserting media or connecting devices to the system - False True - GTK_JUSTIFY_LEFT True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True + False 5 2 - False - 6 6 + 6 True + False + 0 CD _Audio: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_audio_cdda_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 - 0 - 1 - fill + GTK_FILL True + False + 0 _DVD Video: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_video_dvd_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 1 2 - fill + GTK_FILL True - False - True + False 1 2 - 0 - 1 - fill + GTK_FILL True - False - True + False 1 2 1 2 - fill - fill + GTK_FILL + GTK_FILL True + False + 0 _Music Player: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_music_player_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 2 3 - fill + GTK_FILL True - False - True + False 1 2 2 3 - fill - fill + GTK_FILL + GTK_FILL True + False + 0 _Photos: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_dcf_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 3 4 - fill + GTK_FILL True - False - True + False 1 2 3 4 - fill - fill + GTK_FILL + GTK_FILL True + False + 0 _Software: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_software_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 4 5 - fill + GTK_FILL True - False - True + False 1 2 4 5 - fill - fill + GTK_FILL + GTK_FILL - 0 False + True + 1 - 0 False + True + 1 - 0 False + True + 0 True - False + False 6 True + False + 0 <b>Other Media</b> - False True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 True - False + False 6 True + False + 0 Less common media formats can be configured here - False True - GTK_JUSTIFY_LEFT True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False False + 0 True + False 2 2 - False - 6 6 + 6 True - False - True + False 1 2 - 0 - 1 - fill + GTK_FILL True + False + 0 Acti_on: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_other_action_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 1 2 - fill + GTK_FILL True - False - True + False 1 2 1 2 - fill - fill + GTK_FILL + GTK_FILL True + False + 0 _Type: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 media_other_type_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 - 1 - 0 - 1 - fill + GTK_FILL - 0 False + True + 1 - 0 False + True + 1 - 0 False + True + 1 - 0 False False + 0 + _Never prompt or start programs on media insertion True True - _Never prompt or start programs on media insertion + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 1 + B_rowse media when inserted True True - B_rowse media when inserted + False True - GTK_RELIEF_NORMAL - True - False - False True - 0 False False + 2 - False - True + 5 True + False Media - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + 5 + False + - - - + True + False 12 - vertical + 6 + + + True + False + 0 + <b>Available _Extensions:</b> + True + True + + + False + True + 0 + + + + + True + True + automatic + automatic + in + + + 100 + 270 + True + True + extension_store + False + True + + + True + column + True + + + + 0 + + + + + + + True + Extension + + + + 1 + + + + + + + column + + + + 2 + + + + + + + + + True + True + 1 + + - + + True + False + 8 + end + + + _About Extension + True + False + True + True + image1 + True + + + False + False + 0 + + + + + C_onfigure Extension + True + False + True + True + image2 + True + + + False + False + 1 + + + + + False + False + 2 + @@ -3048,18 +2526,19 @@ True - Plugins + False + Extensions 3 False - - 0 False + True + 1 diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c index 616e85be..09d1ac94 100644 --- a/src/caja-window-manage-views.c +++ b/src/caja-window-manage-views.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -1648,7 +1649,7 @@ slot_add_extension_extra_widgets (CajaWindowSlot *slot) GtkWidget *widget; char *uri; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_LOCATION_WIDGET_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_LOCATION_WIDGET_PROVIDER); uri = g_file_get_uri (slot->location); for (l = providers; l != NULL; l = l->next) diff --git a/src/caja-window-menus.c b/src/caja-window-menus.c index 8646060e..2fc0d640 100644 --- a/src/caja-window-menus.c +++ b/src/caja-window-menus.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1019,7 +1020,7 @@ get_extension_menus (CajaWindow *window) GList *items; GList *l; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_MENU_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_MENU_PROVIDER); items = NULL; slot = caja_window_get_active_slot (window); diff --git a/src/caja-window-toolbars.c b/src/caja-window-toolbars.c index 1d6a22fb..0ad576fa 100644 --- a/src/caja-window-toolbars.c +++ b/src/caja-window-toolbars.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -117,7 +118,7 @@ get_extension_toolbar_items (CajaNavigationWindow *window) GList *providers; GList *l; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_MENU_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_MENU_PROVIDER); items = NULL; slot = CAJA_WINDOW (window)->details->active_pane->active_slot; diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index cbd950a3..eadb3750 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -4801,7 +4802,7 @@ get_all_extension_menu_items (GtkWidget *window, GList *providers; GList *l; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_MENU_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_MENU_PROVIDER); items = NULL; for (l = providers; l != NULL; l = l->next) { diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index d348a08a..ddec36b9 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -4959,7 +4960,7 @@ append_extension_pages (FMPropertiesWindow *window) GList *providers; GList *p; - providers = caja_module_get_extensions_for_type (CAJA_TYPE_PROPERTY_PAGE_PROVIDER); + providers = caja_extensions_get_for_type (CAJA_TYPE_PROPERTY_PAGE_PROVIDER); for (p = providers; p != NULL; p = p->next) { CajaPropertyPageProvider *provider; -- cgit v1.2.1