[nautilus] Remove gtk accel map functionality
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Remove gtk accel map functionality
- Date: Thu, 26 Apr 2012 14:08:26 +0000 (UTC)
commit b3fc292bceb64c1a4799df320bd235b314466aef
Author: William Jon McCann <jmccann redhat com>
Date: Wed Apr 25 19:58:54 2012 -0400
Remove gtk accel map functionality
https://bugzilla.gnome.org/show_bug.cgi?id=646584
libnautilus-private/nautilus-file-utilities.c | 21 ----------
src/nautilus-application.c | 51 -------------------------
2 files changed, 0 insertions(+), 72 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index fda1229..92ccef3 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -116,27 +116,6 @@ nautilus_get_user_directory (void)
return user_directory;
}
-/**
- * nautilus_get_accel_map_file:
- *
- * Get the path for the filename containing nautilus accelerator map.
- * The filename need not exist.
- *
- * Return value: the filename path, or NULL if the home directory could not be found
- **/
-char *
-nautilus_get_accel_map_file (void)
-{
- const gchar *override;
-
- override = g_getenv ("GNOME22_USER_DIR");
-
- if (override) {
- return g_build_filename (override, "accels/nautilus", NULL);
- } else {
- return g_build_filename (g_get_home_dir (), ".gnome2/accels/nautilus", NULL);
- }
-}
typedef struct {
char *type;
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index f98700f..d46624f 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -84,14 +84,9 @@
#define START_STATE_CONFIG "start-state"
-#define NAUTILUS_ACCEL_MAP_SAVE_DELAY 30
-
/* Keeps track of all the desktop windows. */
static GList *nautilus_application_desktop_windows;
-/* The saving of the accelerator map was requested */
-static gboolean save_of_accel_map_requested = FALSE;
-
static void desktop_changed_callback (gpointer user_data);
static void mount_removed_callback (GVolumeMonitor *monitor,
GMount *mount,
@@ -1108,50 +1103,6 @@ init_desktop (NautilusApplication *self)
self);
}
-static gboolean
-nautilus_application_save_accel_map (gpointer data)
-{
- if (save_of_accel_map_requested) {
- char *accel_map_filename;
- accel_map_filename = nautilus_get_accel_map_file ();
- if (accel_map_filename) {
- gtk_accel_map_save (accel_map_filename);
- g_free (accel_map_filename);
- }
- save_of_accel_map_requested = FALSE;
- }
-
- return FALSE;
-}
-
-static void
-queue_accel_map_save_callback (GtkAccelMap *object, gchar *accel_path,
- guint accel_key, GdkModifierType accel_mods,
- gpointer user_data)
-{
- if (!save_of_accel_map_requested) {
- save_of_accel_map_requested = TRUE;
- g_timeout_add_seconds (NAUTILUS_ACCEL_MAP_SAVE_DELAY,
- nautilus_application_save_accel_map, NULL);
- }
-}
-
-static void
-init_gtk_accels (void)
-{
- char *accel_map_filename;
-
- /* load accelerator map, and register save callback */
- accel_map_filename = nautilus_get_accel_map_file ();
- if (accel_map_filename) {
- gtk_accel_map_load (accel_map_filename);
- g_free (accel_map_filename);
- }
-
- g_signal_connect (gtk_accel_map_get (), "changed",
- G_CALLBACK (queue_accel_map_save_callback), NULL);
-}
-
static void
nautilus_application_startup (GApplication *app)
{
@@ -1186,7 +1137,6 @@ nautilus_application_startup (GApplication *app)
/* initialize theming */
init_icons_and_styles ();
- init_gtk_accels ();
/* initialize nautilus modules */
nautilus_module_setup ();
@@ -1223,7 +1173,6 @@ nautilus_application_quit_mainloop (GApplication *app)
DEBUG ("Quitting mainloop");
nautilus_icon_info_clear_caches ();
- nautilus_application_save_accel_map (NULL);
G_APPLICATION_CLASS (nautilus_application_parent_class)->quit_mainloop (app);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]