anjuta r4005 - in trunk: . libanjuta src
- From: naba svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4005 - in trunk: . libanjuta src
- Date: Thu, 12 Jun 2008 20:37:48 +0000 (UTC)
Author: naba
Date: Thu Jun 12 20:37:48 2008
New Revision: 4005
URL: http://svn.gnome.org/viewvc/anjuta?rev=4005&view=rev
Log:
* src/anjuta-app.c:
* libanjuta/anjuta-ui.{ch}:
Moved accels save/load funcs to anjuta-ui.
Modified:
trunk/ChangeLog
trunk/libanjuta/anjuta-ui.c
trunk/libanjuta/anjuta-ui.h
trunk/src/anjuta-app.c
Modified: trunk/libanjuta/anjuta-ui.c
==============================================================================
--- trunk/libanjuta/anjuta-ui.c (original)
+++ trunk/libanjuta/anjuta-ui.c Thu Jun 12 20:37:48 2008
@@ -951,3 +951,48 @@
/* DEBUG_PRINT ("%s", ui_str); */
g_free (ui_str);
}
+
+/*
+ * Accels
+ */
+static gchar *
+anjuta_ui_get_accel_file (void)
+{
+ gchar *anjuta_dir = NULL;
+ gchar *filename = NULL;
+
+ anjuta_dir = anjuta_util_get_user_config_dir ();
+
+ if (anjuta_dir != NULL)
+ filename = g_build_filename (anjuta_dir, "anjuta-accels", NULL);
+
+ g_free (anjuta_dir);
+
+ return filename;
+}
+
+void
+anjuta_ui_load_accels (void)
+{
+ gchar *filename;
+
+ filename = anjuta_ui_get_accel_file ();
+ if (filename != NULL)
+ {
+ gtk_accel_map_load (filename);
+ g_free (filename);
+ }
+}
+
+void
+anjuta_ui_save_accels (void)
+{
+ gchar *filename;
+
+ filename = anjuta_ui_get_accel_file ();
+ if (filename != NULL)
+ {
+ gtk_accel_map_save (filename);
+ g_free (filename);
+ }
+}
Modified: trunk/libanjuta/anjuta-ui.h
==============================================================================
--- trunk/libanjuta/anjuta-ui.h (original)
+++ trunk/libanjuta/anjuta-ui.h Thu Jun 12 20:37:48 2008
@@ -130,6 +130,11 @@
/* Dump the whole tree in STDOUT. Useful for debugging */
void anjuta_ui_dump_tree (AnjutaUI *ui);
+/* Loading and saving accels */
+void anjuta_ui_load_accels (void);
+
+void anjuta_ui_save_accels (void);
+
/* Convenience macros to register stock icons */
#define BEGIN_REGISTER_ICON(plugin) \
{ \
Modified: trunk/src/anjuta-app.c
==============================================================================
--- trunk/src/anjuta-app.c (original)
+++ trunk/src/anjuta-app.c Thu Jun 12 20:37:48 2008
@@ -38,6 +38,7 @@
#include <bonobo/bonobo-dock-item.h>
#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/anjuta-ui.h>
#include <libanjuta/anjuta-utils.h>
#include <libanjuta/resources.h>
#include <libanjuta/anjuta-plugin-manager.h>
@@ -106,52 +107,6 @@
}
}
}
-
-
-/*
- * Accels
- */
-static gchar *
-get_accel_file (void)
-{
- gchar *anjuta_dir = NULL;
- gchar *filename = NULL;
-
- anjuta_dir = anjuta_util_get_user_config_dir ();
-
- if (anjuta_dir != NULL)
- filename = g_build_filename (anjuta_dir, "anjuta-accels", NULL);
-
- g_free (anjuta_dir);
-
- return filename;
-}
-
-static void
-load_accels (void)
-{
- gchar *filename;
-
- filename = get_accel_file ();
- if (filename != NULL)
- {
- gtk_accel_map_load (filename);
- g_free (filename);
- }
-}
-
-static void
-save_accels (void)
-{
- gchar *filename;
-
- filename = get_accel_file ();
- if (filename != NULL)
- {
- gtk_accel_map_save (filename);
- g_free (filename);
- }
-}
static void
on_gdl_style_changed (GConfClient* client, guint id, GConfEntry* entry,
@@ -840,7 +795,7 @@
G_CALLBACK (on_session_load), app);
/* Loading accels */
- load_accels ();
+ anjuta_ui_load_accels ();
}
static void
@@ -944,7 +899,7 @@
g_warning ("Saving dock layout to '%s' failed!", filename);
/* This is a good place to save the accels too */
- save_accels ();
+ anjuta_ui_save_accels ();
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]