[gedit/dbus: 1/5] Move egg desktop app init to respective GeditApp classes
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/dbus: 1/5] Move egg desktop app init to respective GeditApp classes
- Date: Wed, 5 May 2010 21:23:58 +0000 (UTC)
commit 018e7d72bbe5f08f2ca7c774c0a4f1b310d6922f
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Tue May 4 17:34:28 2010 +0200
Move egg desktop app init to respective GeditApp classes
gedit/gedit-app-osx.c | 4 ++++
gedit/gedit-app-win32.c | 4 ++++
gedit/gedit-app-x11.c | 2 ++
gedit/gedit.c | 16 ++--------------
4 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/gedit/gedit-app-osx.c b/gedit/gedit-app-osx.c
index af8bf6f..1d1858d 100644
--- a/gedit/gedit-app-osx.c
+++ b/gedit/gedit-app-osx.c
@@ -159,6 +159,10 @@ gedit_app_osx_init (GeditAppOSX *self)
(GDestroyNotify)destroy_delegate);
ige_mac_menu_set_global_key_handler_enabled (FALSE);
+
+ /* manually set name and icon */
+ g_set_application_name("gedit");
+ gtk_window_set_default_icon_name ("accessories-text-editor");
}
/* ex:ts=8:noet: */
diff --git a/gedit/gedit-app-win32.c b/gedit/gedit-app-win32.c
index d477968..42885cc 100644
--- a/gedit/gedit-app-win32.c
+++ b/gedit/gedit-app-win32.c
@@ -123,6 +123,10 @@ gedit_app_win32_init (GeditAppWin32 *self)
{
setup_path ();
prep_console ();
+
+ /* manually set name and icon */
+ g_set_application_name("gedit");
+ gtk_window_set_default_icon_name ("accessories-text-editor");
}
/* ex:ts=8:noet: */
diff --git a/gedit/gedit-app-x11.c b/gedit/gedit-app-x11.c
index 050ebd1..03c934f 100644
--- a/gedit/gedit-app-x11.c
+++ b/gedit/gedit-app-x11.c
@@ -21,6 +21,7 @@
*/
#include "gedit-app-x11.h"
+#include "eggdesktopfile.h"
#define GEDIT_APP_X11_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_APP_X11, GeditAppX11Private))
@@ -43,6 +44,7 @@ gedit_app_x11_class_init (GeditAppX11Class *klass)
static void
gedit_app_x11_init (GeditAppX11 *self)
{
+ egg_set_desktop_file (DATADIR "/applications/gedit.desktop");
}
/* ex:ts=8:noet: */
diff --git a/gedit/gedit.c b/gedit/gedit.c
index a339450..da6ff43 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -43,9 +43,6 @@
#include "gedit-app.h"
#include "gedit-encodings.h"
-#include "eggsmclient.h"
-#include "eggdesktopfile.h"
-
#include "gseal-gtk-compat.h"
#include "gedit-commands.h"
#include "gedit-debug.h"
@@ -81,27 +78,18 @@ gedit_main (gboolean service)
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), icon_dir);
g_free (icon_dir);
-#ifdef GDK_WINDOWING_X11
- /* Set the associated .desktop file */
- egg_set_desktop_file (DATADIR "/applications/gedit.desktop");
-#else
- /* manually set name and icon */
- g_set_application_name("gedit");
- gtk_window_set_default_icon_name ("accessories-text-editor");
-#endif
-
/* Init plugins engine */
gedit_debug_message (DEBUG_APP, "Init plugins");
engine = gedit_plugins_engine_get_default ();
gtk_about_dialog_set_url_hook (gedit_utils_activate_url, NULL, NULL);
+ app = gedit_app_get_default ();
+
/* Initialize session management */
gedit_debug_message (DEBUG_APP, "Init session manager");
gedit_session_init ();
- app = gedit_app_get_default ();
-
if (!service && gedit_session_is_restored ())
{
restored = gedit_session_load ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]