aboutsummaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-03 13:13:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-03 13:13:14 -0700
commitaa3838308b22dd3940e6b18cb23224356544da92 (patch)
tree96b9ab46d2d84d41a07e8852df49885c0d0c2238 /macos.c
parent1a1b392c37fe01a2eff746594ff2f5b4210e52c6 (diff)
downloadsubsurface-aa3838308b22dd3940e6b18cb23224356544da92.tar.gz
Similar build fix for Mac
Apparently only older Linux toolchains didn't bother to throw up with the remainders of Gtk related code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'macos.c')
-rw-r--r--macos.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/macos.c b/macos.c
index 38e58f54b..d28ea1dae 100644
--- a/macos.c
+++ b/macos.c
@@ -151,8 +151,11 @@ const char *subsurface_icon_name()
{
static char path[PATH_MAX];
+#if USE_GTK_UI
snprintf(path, sizeof(path), "%s/%s", gtkosx_application_get_resource_path(), ICON_NAME);
-
+#else
+ /* need Qt path */
+#endif
return path;
}
@@ -174,15 +177,18 @@ const char *subsurface_gettext_domainpath(char *argv0)
{
/* on a Mac we ignore the argv0 argument and instead use the resource_path
* to figure out where to find the translation files */
+#if USE_GTK_UI
static char buffer[PATH_MAX];
const char *resource_path = gtkosx_application_get_resource_path();
if (resource_path) {
snprintf(buffer, sizeof(buffer), "%s/share/locale", resource_path);
return buffer;
}
+#endif /* USE_GTK_UI */
return "./share/locale";
}
+#if USE_GTK_UI
static void show_main_window(GtkWidget *w, gpointer data)
{
gtk_widget_show(main_window);
@@ -230,6 +236,7 @@ void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
gtkosx_application_ready(osx_app);
}
+#endif /* UES_GTK_UI */
void subsurface_command_line_init(gint *argc, gchar ***argv)
{