[gedit] Remove checking nautilus "enable-delete" setting
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Remove checking nautilus "enable-delete" setting
- Date: Tue, 3 Mar 2015 09:25:26 +0000 (UTC)
commit 3bed781fca0f128d0c960f095aca3dfd30c0923d
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Mar 3 09:05:46 2015 +0100
Remove checking nautilus "enable-delete" setting
Nautilus removed this setting
plugins/filebrowser/gedit-file-browser-plugin.c | 15 --------
plugins/filebrowser/gedit-file-browser-widget.c | 36 +-------------------
...ome.gedit.plugins.filebrowser.gschema.xml.in.in | 3 --
3 files changed, 1 insertions(+), 53 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/gedit-file-browser-plugin.c
index 412757b..62c932f 100644
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
+++ b/plugins/filebrowser/gedit-file-browser-plugin.c
@@ -52,7 +52,6 @@
#define NAUTILUS_BASE_SETTINGS "org.gnome.nautilus.preferences"
#define NAUTILUS_FALLBACK_SETTINGS "org.gnome.gedit.plugins.filebrowser.nautilus"
#define NAUTILUS_CLICK_POLICY_KEY "click-policy"
-#define NAUTILUS_ENABLE_DELETE_KEY "enable-delete"
#define NAUTILUS_CONFIRM_TRASH_KEY "confirm-trash"
#define TERMINAL_BASE_SETTINGS "org.gnome.desktop.default-applications.terminal"
@@ -72,7 +71,6 @@ struct _GeditFileBrowserPluginPrivate
gboolean confirm_trash;
guint click_policy_handle;
- guint enable_delete_handle;
guint confirm_trash_handle;
};
@@ -354,13 +352,6 @@ install_nautilus_prefs (GeditFileBrowserPlugin *plugin)
G_CALLBACK (on_click_policy_changed),
plugin);
- /* Bind enable-delete */
- g_settings_bind (priv->nautilus_settings,
- NAUTILUS_ENABLE_DELETE_KEY,
- priv->tree_widget,
- "enable-delete",
- G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-
/* Get confirm_trash */
prefb = g_settings_get_boolean (priv->nautilus_settings,
NAUTILUS_CONFIRM_TRASH_KEY);
@@ -599,12 +590,6 @@ gedit_file_browser_plugin_deactivate (GeditWindowActivatable *activatable)
priv->click_policy_handle);
}
- if (priv->enable_delete_handle)
- {
- g_signal_handler_disconnect (priv->nautilus_settings,
- priv->enable_delete_handle);
- }
-
if (priv->confirm_trash_handle)
{
g_signal_handler_disconnect (priv->nautilus_settings,
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index 72a3da6..bd5a2d7 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -65,7 +65,6 @@ enum
PROP_0,
PROP_FILTER_PATTERN,
- PROP_ENABLE_DELETE
};
/* Signals */
@@ -152,15 +151,11 @@ struct _GeditFileBrowserWidgetPrivate
GtkWidget *location_next_menu;
GtkWidget *current_location_menu_item;
- gboolean enable_delete;
-
GCancellable *cancellable;
GdkCursor *busy_cursor;
};
-static void set_enable_delete (GeditFileBrowserWidget *obj,
- gboolean enable);
static void on_model_set (GObject *gobject,
GParamSpec *arg1,
GeditFileBrowserWidget *obj);
@@ -439,9 +434,6 @@ gedit_file_browser_widget_get_property (GObject *object,
case PROP_FILTER_PATTERN:
g_value_set_string (value, obj->priv->filter_pattern_str);
break;
- case PROP_ENABLE_DELETE:
- g_value_set_boolean (value, obj->priv->enable_delete);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -462,9 +454,6 @@ gedit_file_browser_widget_set_property (GObject *object,
gedit_file_browser_widget_set_filter_pattern (obj,
g_value_get_string (value));
break;
- case PROP_ENABLE_DELETE:
- set_enable_delete (obj, g_value_get_boolean (value));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -489,13 +478,6 @@ gedit_file_browser_widget_class_init (GeditFileBrowserWidgetClass *klass)
"The filter pattern",
"",
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_ENABLE_DELETE,
- g_param_spec_boolean ("enable-delete",
- "Enable delete",
- "Enable permanently deleting items",
- TRUE,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
signals[LOCATION_ACTIVATED] =
g_signal_new ("location-activated",
@@ -808,19 +790,6 @@ fill_locations_model (GeditFileBrowserWidget *obj)
gedit_file_browser_widget_show_bookmarks (obj);
}
-static void
-set_enable_delete (GeditFileBrowserWidget *obj,
- gboolean enable)
-{
- GAction *action;
- obj->priv->enable_delete = enable;
-
- action = g_action_map_lookup_action (G_ACTION_MAP (obj->priv->action_group),
- "delete");
-
- g_simple_action_set_enabled (G_SIMPLE_ACTION (action), enable);
-}
-
static gboolean
filter_real (GeditFileBrowserStore *model,
GtkTreeIter *iter,
@@ -1036,8 +1005,6 @@ gedit_file_browser_widget_init (GeditFileBrowserWidget *obj)
"browser",
G_ACTION_GROUP (obj->priv->action_group));
- set_enable_delete (obj, obj->priv->enable_delete);
-
gtk_widget_init_template (GTK_WIDGET (obj));
g_signal_connect (obj->priv->previous_button, "button-press-event",
@@ -2967,8 +2934,7 @@ on_treeview_key_press_event (GeditFileBrowserView *treeview,
event->keyval == GDK_KEY_KP_Delete)
{
- if ((event->state & modifiers) == GDK_SHIFT_MASK &&
- obj->priv->enable_delete)
+ if ((event->state & modifiers) == GDK_SHIFT_MASK)
{
delete_selected_files (obj, FALSE);
return TRUE;
diff --git a/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
b/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
index cc76ab8..7a384c7 100644
--- a/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
+++ b/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
@@ -51,9 +51,6 @@
<key name="click-policy" enum="org.gnome.gedit.plugins.filebrowser.nautilus.ClickPolicy">
<default>'double'</default>
</key>
- <key name="enable-delete" type="b">
- <default>false</default>
- </key>
<key name="confirm-trash" type="b">
<default>true</default>
</key>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]