gedit r6675 - in branches/win32: . gedit



Author: icq
Date: Sun Dec 21 20:53:29 2008
New Revision: 6675
URL: http://svn.gnome.org/viewvc/gedit?rev=6675&view=rev

Log:
2008-12-21  Ignacio Casal Quinteiro  <nacho resa gmail com>

        * gedit/gedit.c:
        * gedit/gedit-app.c:
        * gedit/Makefile.am:
        * configure.ac:
        Add some ifdefs to not build bacon on windows.



Modified:
   branches/win32/ChangeLog
   branches/win32/configure.ac
   branches/win32/gedit/Makefile.am
   branches/win32/gedit/gedit-app.c
   branches/win32/gedit/gedit.c

Modified: branches/win32/configure.ac
==============================================================================
--- branches/win32/configure.ac	(original)
+++ branches/win32/configure.ac	Sun Dec 21 20:53:29 2008
@@ -205,7 +205,8 @@
 AC_SUBST(GEDIT_LIBS)
 AC_SUBST(GEDIT_CFLAGS)
 
-if test "$platform_osx" = "no"; then
+if test "$platform_osx" = "no" &&
+   test "$platform_win32" = no; then
 	PKG_CHECK_MODULES(EGG_SMCLIENT, [
 		sm >= 1.0.0
 	])

Modified: branches/win32/gedit/Makefile.am
==============================================================================
--- branches/win32/gedit/Makefile.am	(original)
+++ branches/win32/gedit/Makefile.am	Sun Dec 21 20:53:29 2008
@@ -194,15 +194,20 @@
 	cd $(distdir); rm -f $(BUILT_SOURCES)
 
 install-exec-hook:
-	rm -f $(DESTDIR)$(bindir)/gnome-text-editor
-	ln -s gedit $(DESTDIR)$(bindir)/gnome-text-editor
 if PLATFORM_WIN32
 	$(mkinstalldirs) "$(DESTDIR)$(libdir)"
 	$(INSTALL_DATA) libgedit-$(GEDIT_API_VERSION).a "$(DESTDIR)$(libdir)"
+else
+	rm -f $(DESTDIR)$(bindir)/gnome-text-editor
+	ln -s gedit $(DESTDIR)$(bindir)/gnome-text-editor
 endif
 
+if !PLATFORM_WIN32
 BACON_DIR=$(srcdir)/../../libbacon/src/
 BACON_FILES=bacon-message-connection.h bacon-message-connection.c
 
 regenerate-built-sources:
 	BACONFILES="$(BACON_FILES)" BACONDIR="$(BACON_DIR)" $(top_srcdir)/gedit/update-from-bacon.sh
+else
+BACON_DIR=
+endif

Modified: branches/win32/gedit/gedit-app.c
==============================================================================
--- branches/win32/gedit/gedit-app.c	(original)
+++ branches/win32/gedit/gedit-app.c	Sun Dec 21 20:53:29 2008
@@ -441,6 +441,7 @@
 
 	t = time (NULL);
 
+#ifndef G_OS_WIN32
 	return g_strdup_printf ("gedit-window-%d-%d-%d-%ld-%d %s",
 				getpid (),
 				getgid (),
@@ -448,6 +449,12 @@
 				(long) t,
 				serial++,
 				g_get_host_name ());
+#else
+	return g_strdup_printf ("gedit-window-%ld-%d %s",
+				(long) t,
+				serial++,
+				g_get_host_name ());
+#endif
 }
 	     
 static GeditWindow *

Modified: branches/win32/gedit/gedit.c
==============================================================================
--- branches/win32/gedit/gedit.c	(original)
+++ branches/win32/gedit/gedit.c	Sun Dec 21 20:53:29 2008
@@ -56,12 +56,16 @@
 #include "gedit-utils.h"
 #include "gedit-window.h"
 
-#include "bacon-message-connection.h"
 #include "eggsmclient.h"
 #include "eggdesktopfile.h"
 
 static guint32 startup_timestamp = 0;
+
+#ifndef G_OS_WIN32
+#include "bacon-message-connection.h"
+
 static BaconMessageConnection *connection;
+#endif
 
 static void
 show_version_and_quit (void)
@@ -207,6 +211,7 @@
 }
 
 /* serverside */
+#ifndef G_OS_WIN32
 static void
 on_message_received (const char *message,
 		     gpointer    data)
@@ -456,6 +461,7 @@
 
 	g_string_free (command, TRUE);
 }
+#endif /* G_OS_WIN32 */
 
 int
 main (int argc, char *argv[])
@@ -500,6 +506,7 @@
 
 	g_option_context_free (context);
 
+#ifndef G_OS_WIN32
 	gedit_debug_message (DEBUG_APP, "Create bacon connection");
 
 	connection = bacon_message_connection_new ("gedit");
@@ -536,6 +543,7 @@
 	{
 		g_warning ("Cannot create the 'gedit' connection.");
 	}
+#endif
 
 	gedit_debug_message (DEBUG_APP, "Set icon");
 	
@@ -543,7 +551,7 @@
 					   GEDIT_ICONDIR);
 
 	/* Set the associated .desktop file */
-#ifndef PLATFORM_OSX
+#if !defined PLATFORM_OSX && !defined PLATFORM_WIN32
 	egg_set_desktop_file (DATADIR "/applications/gedit.desktop");
 #endif
 
@@ -607,7 +615,9 @@
 	gedit_debug_message (DEBUG_APP, "Start gtk-main");		
 	gtk_main();
 
+#ifndef G_OS_WIN32
 	bacon_message_connection_free (connection);
+#endif
 
 	/* We kept the original engine reference here. So let's unref it to
 	 * finalize it properly. 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]