diff options
author | jsorg71 <jsorg71> | 2008-05-07 01:52:24 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2008-05-07 01:52:24 +0000 |
commit | 71f58fad8bddd07a708d04ff7d9e32b7c6268567 (patch) | |
tree | f62b64c2337694914f56ca2bbd7197fb06fcaf38 /xrdp | |
parent | ef69b94717eb4f33caa691ade2537cbbfe2d1002 (diff) | |
download | xrdp-proprietary-71f58fad8bddd07a708d04ff7d9e32b7c6268567.tar.gz xrdp-proprietary-71f58fad8bddd07a708d04ff7d9e32b7c6268567.zip |
use share path when loading files
Diffstat (limited to 'xrdp')
-rw-r--r-- | xrdp/xrdp_font.c | 6 | ||||
-rw-r--r-- | xrdp/xrdp_login_wnd.c | 7 | ||||
-rw-r--r-- | xrdp/xrdp_wm.c | 7 |
3 files changed, 14 insertions, 6 deletions
diff --git a/xrdp/xrdp_font.c b/xrdp/xrdp_font.c index 3c2e8099..7b143d43 100644 --- a/xrdp/xrdp_font.c +++ b/xrdp/xrdp_font.c @@ -75,9 +75,11 @@ xrdp_font_create(struct xrdp_wm* wm) int datasize; int file_size; struct xrdp_font_char* f; + char file_path[256]; DEBUG(("in xrdp_font_create")); - file_size = g_file_get_size(DEFAULT_FONT_NAME); + g_snprintf(file_path, 255, "%s/%s", XRDP_SHARE_PATH, DEFAULT_FONT_NAME); + file_size = g_file_get_size(file_path); if (file_size < 1) { return 0; @@ -86,7 +88,7 @@ xrdp_font_create(struct xrdp_wm* wm) self->wm = wm; make_stream(s); init_stream(s, file_size + 1024); - fd = g_file_open(DEFAULT_FONT_NAME); + fd = g_file_open(file_path); if (fd != -1) { b = g_file_read(fd, s->data, file_size + 1024); diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index bc15d940..784c06fa 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -444,6 +444,7 @@ xrdp_login_wnd_create(struct xrdp_wm* self) { struct xrdp_bitmap* but; struct xrdp_bitmap* combo; + char file_path[256]; /* draw login window */ self->login_window = xrdp_bitmap_create(400, 200, self->screen->bpp, @@ -461,7 +462,8 @@ xrdp_login_wnd_create(struct xrdp_wm* self) /* image */ but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self); - xrdp_bitmap_load(but, "xrdp256.bmp", self->palette); + g_snprintf(file_path, 255, "%s/xrdp256.bmp", XRDP_SHARE_PATH); + xrdp_bitmap_load(but, file_path, self->palette); but->parent = self->screen; but->owner = self->screen; but->left = self->screen->width - but->width; @@ -470,7 +472,8 @@ xrdp_login_wnd_create(struct xrdp_wm* self) /* image */ but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self); - xrdp_bitmap_load(but, "ad256.bmp", self->palette); + g_snprintf(file_path, 255, "%s/ad256.bmp", XRDP_SHARE_PATH); + xrdp_bitmap_load(but, file_path, self->palette); but->parent = self->login_window; but->owner = self->login_window; but->left = 10; diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index fe432825..c54e8691 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -333,13 +333,16 @@ int APP_CC xrdp_wm_load_static_pointers(struct xrdp_wm* self) { struct xrdp_pointer_item pointer_item; + char file_path[256]; DEBUG(("sending cursor")); - xrdp_wm_load_pointer(self, "cursor1.cur", pointer_item.data, + g_snprintf(file_path, 255, "%s/cursor1.cur", XRDP_SHARE_PATH); + xrdp_wm_load_pointer(self, file_path, pointer_item.data, pointer_item.mask, &pointer_item.x, &pointer_item.y); xrdp_cache_add_pointer_static(self->cache, &pointer_item, 1); DEBUG(("sending cursor")); - xrdp_wm_load_pointer(self, "cursor0.cur", pointer_item.data, + g_snprintf(file_path, 255, "%s/cursor0.cur", XRDP_SHARE_PATH); + xrdp_wm_load_pointer(self, file_path, pointer_item.data, pointer_item.mask, &pointer_item.x, &pointer_item.y); xrdp_cache_add_pointer_static(self->cache, &pointer_item, 0); return 0; |