devhelp r1219 - in trunk: . src
- From: rhult svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1219 - in trunk: . src
- Date: Sun, 12 Oct 2008 07:27:59 +0000 (UTC)
Author: rhult
Date: Sun Oct 12 07:27:59 2008
New Revision: 1219
URL: http://svn.gnome.org/viewvc/devhelp?rev=1219&view=rev
Log:
2008-10-12 Richard Hult <richard imendio com>
* src/dh-main.c: (main): Ignore -psn_* on quartz, which is added
by Finder.
* src/dh-util.c: (util_get_mac_data_dir): Point to the Resources
directory inside the bundle.
* src/dh-window.c: (window_populate): Use
dh_util_build_data_filename.
Modified:
trunk/ChangeLog
trunk/src/dh-main.c
trunk/src/dh-util.c
trunk/src/dh-window.c
Modified: trunk/src/dh-main.c
==============================================================================
--- trunk/src/dh-main.c (original)
+++ trunk/src/dh-main.c Sun Oct 12 07:27:59 2008
@@ -212,6 +212,22 @@
}
};
+#ifdef GDK_WINDOWING_QUARTZ
+ {
+ gint i;
+
+ for (i = 0; i < argc; i++) {
+ if (g_str_has_prefix (argv[i], "-psn_")) {
+ for (; i < argc-1; i++) {
+ argv[i] = argv[i+1];
+ }
+ argc--;
+ break;
+ }
+ }
+ }
+#endif
+
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
Modified: trunk/src/dh-util.c
==============================================================================
--- trunk/src/dh-util.c (original)
+++ trunk/src/dh-util.c Sun Oct 12 07:27:59 2008
@@ -145,7 +145,7 @@
UInt32 creator;
CFURLRef cf_url;
CFStringRef cf_string;
- gchar *ret;
+ gchar *ret, *tmp;
/* The environment variable overrides all. */
env = g_getenv ("DEVHELP_DATADIR");
@@ -170,7 +170,10 @@
CFRelease (cf_string);
CFRelease (cf_url);
- return ret;
+ tmp = g_build_filename (ret, "Contents", "Resources", NULL);
+ g_free (ret);
+
+ return tmp;
}
#endif
Modified: trunk/src/dh-window.c
==============================================================================
--- trunk/src/dh-window.c (original)
+++ trunk/src/dh-window.c Sun Oct 12 07:27:59 2008
@@ -612,15 +612,18 @@
window_populate (DhWindow *window)
{
DhWindowPriv *priv;
+ gchar *path;
GtkWidget *book_tree_sw;
GNode *contents_tree;
GList *keywords;
priv = window->priv;
+ path = dh_util_build_data_filename ("devhelp", "ui", "window.ui", NULL);
gtk_ui_manager_add_ui_from_file (priv->manager,
- DATADIR "/devhelp/ui/window.ui",
+ path,
NULL);
+ g_free (path);
gtk_ui_manager_ensure_update (priv->manager);
#ifdef GDK_WINDOWING_QUARTZ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]