[PATCH] Changes to make the glib-removal-hack branch build on MacOSX

subsurface at henrik.synth.no subsurface at henrik.synth.no
Sun Oct 6 04:43:45 UTC 2013


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

Tested with the Homebrew packaging system

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
 Rules.mk          | 2 +-
 download-dialog.c | 2 --
 gtk-gui.c         | 2 --
 macos.c           | 6 +++---
 main.cpp          | 1 -
 planner-gtk.c     | 1 -
 planner.c         | 1 -
 qt-gui.cpp        | 1 -
 qthelper.h        | 4 ++--
 webservice.c      | 1 -
 windows.c         | 6 +++---
 11 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/Rules.mk b/Rules.mk
index a62b1be..bab6752 100644
--- a/Rules.mk
+++ b/Rules.mk
@@ -48,7 +48,7 @@ CREATOR_FILES = $(NAME).config $(NAME).creator $(NAME).files $(NAME).includes
 
 all: $(TARGET) doc
 
-$(TARGET): gen_version_file $(ALL_OBJS) $(MSGOBJS) $(INFOPLIST)
+$(TARGET): gen_version_file $(ALL_OBJS) $(INFOPLIST)
 	@$(PRETTYECHO) '    LINK' $(TARGET)
 	$(COMPILE_PREFIX)$(CXX) $(LDFLAGS) -o $(TARGET) $(ALL_OBJS) $(LIBS)
 
diff --git a/download-dialog.c b/download-dialog.c
index b985625..b5632d5 100644
--- a/download-dialog.c
+++ b/download-dialog.c
@@ -1,5 +1,3 @@
-#include <libintl.h>
-#include <glib/gi18n.h>
 #include "dive.h"
 #include "divelist.h"
 #include "display.h"
diff --git a/gtk-gui.c b/gtk-gui.c
index e873fc6..7ec3d88 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -8,8 +8,6 @@
  * functions. It's renamed back to gtk-ui.c to keep the old Gtk code
  * around for reference in case we still need it... all that has now been
  * ripped out of qt-gui.cpp */
-#include <libintl.h>
-#include <glib/gi18n.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
diff --git a/macos.c b/macos.c
index a3709cf..4f41970 100644
--- a/macos.c
+++ b/macos.c
@@ -42,7 +42,7 @@ void subsurface_set_conf(const char *name, const char *value)
 	CFPreferencesSetAppValue(CFSTR_VAR(name), CFSTR_VAR(value), SUBSURFACE_PREFERENCES);
 }
 
-void subsurface_set_conf_bool(const char *name, int value)
+void subsurface_set_conf_bool(const char *name, bool value)
 {
 	CFPreferencesSetAppValue(CFSTR_VAR(name),
 		value ? kCFBooleanTrue : kCFBooleanFalse, SUBSURFACE_PREFERENCES);
@@ -252,12 +252,12 @@ void subsurface_command_line_exit(int *argc, char ***argv)
 	/* this is a no-op */
 }
 
-int subsurface_os_feature_available(os_feature_t f)
+bool subsurface_os_feature_available(os_feature_t f)
 {
 	return TRUE;
 }
 
-int subsurface_launch_for_uri(const char* uri)
+bool subsurface_launch_for_uri(const char* uri)
 {
 	CFURLRef urlref = CFURLCreateWithBytes(NULL, uri, strlen(uri), kCFStringEncodingMacRoman, NULL);
 	OSStatus status = LSOpenCFURLRef(urlref, NULL);
diff --git a/main.cpp b/main.cpp
index 67f07c8..fddf508 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,7 +4,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <time.h>
-#include <libintl.h>
 
 #include "qt-gui.h"
 #include "version.h"
diff --git a/planner-gtk.c b/planner-gtk.c
index d5fddec..b6306bd 100644
--- a/planner-gtk.c
+++ b/planner-gtk.c
@@ -4,7 +4,6 @@
  *
  * (c) Dirk Hohndel 2013
  */
-#include <libintl.h>
 #include <glib/gi18n.h>
 #include <unistd.h>
 #include <ctype.h>
diff --git a/planner.c b/planner.c
index ee93a56..d2233bb 100644
--- a/planner.c
+++ b/planner.c
@@ -4,7 +4,6 @@
  *
  * (c) Dirk Hohndel 2013
  */
-#include <libintl.h>
 #if 0
 #include <glib/gi18n.h>
 #else
diff --git a/qt-gui.cpp b/qt-gui.cpp
index 8f1c85d..62f762e 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -1,6 +1,5 @@
 /* qt-gui.cpp */
 /* Qt UI implementation */
-#include <libintl.h>
 #if 0
 #include <glib/gi18n.h>
 #endif
diff --git a/qthelper.h b/qthelper.h
index 0bb7c19..0ab184b 100644
--- a/qthelper.h
+++ b/qthelper.h
@@ -29,8 +29,8 @@ public:
 	void rmDC(QString m, uint32_t d);
 	DiveComputerNode matchDC(QString m, uint32_t d);
 	DiveComputerNode matchModel(QString m);
-	QMultiMap<QString, struct DiveComputerNode> dcMap;
-	QMultiMap<QString, struct DiveComputerNode> dcWorkingMap;
+	QMultiMap<QString, class DiveComputerNode> dcMap;
+	QMultiMap<QString, class DiveComputerNode> dcWorkingMap;
 };
 
 QString weight_string(int weight_in_grams);
diff --git a/webservice.c b/webservice.c
index f4f8bae..e713e12 100644
--- a/webservice.c
+++ b/webservice.c
@@ -1,4 +1,3 @@
-#include <libintl.h>
 #include <glib/gi18n.h>
 #include <libsoup/soup.h>
 #include <libxml/tree.h>
diff --git a/windows.c b/windows.c
index 823615c..fb28839 100644
--- a/windows.c
+++ b/windows.c
@@ -60,7 +60,7 @@ void subsurface_set_conf_int(const char *name, int value)
 	RegSetValueEx(hkey, (LPCTSTR)name, 0, REG_DWORD, (const BYTE *)&value, 4);
 }
 
-void subsurface_set_conf_bool(const char *name, int value)
+void subsurface_set_conf_bool(const char *name, bool value)
 {
 	subsurface_set_conf_int(name, value);
 }
@@ -305,7 +305,7 @@ void subsurface_command_line_exit(gint *argc, gchar ***argv)
 	g_free(*argv);
 }
 
-gboolean subsurface_launch_for_uri(const char* uri)
+bool subsurface_launch_for_uri(const char* uri)
 {
 	gboolean ret = FALSE;
 	wchar_t *wuri = (wchar_t *)g_utf8_to_utf16(uri, -1, NULL, NULL, NULL);
@@ -320,7 +320,7 @@ gboolean subsurface_launch_for_uri(const char* uri)
 }
 
 /* check if we are running a newer OS version */
-gboolean subsurface_os_feature_available(os_feature_t f)
+bool subsurface_os_feature_available(os_feature_t f)
 {
 	switch (f) {
 	case UTF8_FONT_WITH_STARS:
-- 
1.8.3.4 (Apple Git-47)



More information about the subsurface mailing list