evolution r36865 - in branches/gnome-2-24: e-util shell
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36865 - in branches/gnome-2-24: e-util shell
- Date: Wed, 10 Dec 2008 11:55:16 +0000 (UTC)
Author: mbarnes
Date: Wed Dec 10 11:55:15 2008
New Revision: 36865
URL: http://svn.gnome.org/viewvc/evolution?rev=36865&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:
branches/gnome-2-24/e-util/ChangeLog
branches/gnome-2-24/e-util/e-util.c
branches/gnome-2-24/e-util/e-util.h
branches/gnome-2-24/shell/ChangeLog
branches/gnome-2-24/shell/main.c
Modified: branches/gnome-2-24/e-util/e-util.c
==============================================================================
--- branches/gnome-2-24/e-util/e-util.c (original)
+++ branches/gnome-2-24/e-util/e-util.c Wed Dec 10 11:55:15 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>
@@ -70,6 +70,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: branches/gnome-2-24/e-util/e-util.h
==============================================================================
--- branches/gnome-2-24/e-util/e-util.h (original)
+++ branches/gnome-2-24/e-util/e-util.h Wed Dec 10 11:55:15 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: branches/gnome-2-24/shell/main.c
==============================================================================
--- branches/gnome-2-24/shell/main.c (original)
+++ branches/gnome-2-24/shell/main.c Wed Dec 10 11:55:15 2008
@@ -656,6 +656,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());
@@ -688,6 +689,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]