evolution r36864 - in trunk: e-util shell
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36864 - in trunk: e-util shell
- Date: Wed, 10 Dec 2008 11:55:09 +0000 (UTC)
Author: mbarnes
Date: Wed Dec 10 11:55:08 2008
New Revision: 36864
URL: http://svn.gnome.org/viewvc/evolution?rev=36864&view=rev
Log:
2008-12-10 Matthew Barnes <mbarnes redhat com>
** Fixes bug #563250
* e-util/e-util.c (e_get_accels_filename):
New function returns the filename where custom keyboard
accelerators are stored. Currently only applies to the
various editor windows in Evolution.
* shell/main.c (main):
Load on startup and save on shutdown, custom keyboard accelerators.
Modified:
trunk/e-util/ChangeLog
trunk/e-util/e-util.c
trunk/e-util/e-util.h
trunk/shell/ChangeLog
trunk/shell/main.c
Modified: trunk/e-util/e-util.c
==============================================================================
--- trunk/e-util/e-util.c (original)
+++ trunk/e-util/e-util.c Wed Dec 10 11:55:08 2008
@@ -39,7 +39,7 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <libgnome/gnome-help.h>
-#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-init.h>
#ifdef G_OS_WIN32
#include <windows.h>
@@ -72,6 +72,27 @@
}
/**
+ * e_get_accels_filename:
+ *
+ * Returns the name of the user data file containing custom keyboard
+ * accelerator specifications.
+ *
+ * Returns: filename for accelerator specifications
+ **/
+const gchar *
+e_get_accels_filename (void)
+{
+ static gchar *filename = NULL;
+
+ if (G_UNLIKELY (filename == NULL))
+ filename = g_build_filename (
+ gnome_user_dir_get (),
+ "accels", PACKAGE, NULL);
+
+ return filename;
+}
+
+/**
* e_display_help:
* @parent: a parent #GtkWindow or %NULL
* @link_id: help section to present or %NULL
Modified: trunk/e-util/e-util.h
==============================================================================
--- trunk/e-util/e-util.h (original)
+++ trunk/e-util/e-util.h Wed Dec 10 11:55:08 2008
@@ -41,6 +41,7 @@
} EFocus;
const gchar * e_get_user_data_dir (void);
+const gchar * e_get_accels_filename (void);
void e_display_help (GtkWindow *parent,
const gchar *link_id);
Modified: trunk/shell/main.c
==============================================================================
--- trunk/shell/main.c (original)
+++ trunk/shell/main.c Wed Dec 10 11:55:08 2008
@@ -661,6 +661,7 @@
exit (0);
gnome_sound_init ("localhost");
+ gtk_accel_map_load (e_get_accels_filename ());
if (!disable_eplugin) {
e_plugin_register_type(e_plugin_lib_get_type());
@@ -693,6 +694,8 @@
bonobo_main ();
+ gtk_accel_map_save (e_get_accels_filename ());
+
e_icon_factory_shutdown ();
g_object_unref (program);
gnome_sound_shutdown ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]