1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

- Fix, when no image is selected

- Add patch for new GLib 2.32 API

Submitted by:	Andrey Simonenko (by email)
Approved by:	rene, miwi (mentors, implicit)
Obtained from:	Xfce git repository
This commit is contained in:
Olivier Duchateau 2013-03-09 10:59:44 +00:00
parent 35582c5762
commit d1d67541c1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=313702
3 changed files with 51 additions and 0 deletions

View File

@ -4,6 +4,7 @@
PORTNAME= xfce4-desktop
PORTVERSION= 4.10.1
PORTREVISION= 1
CATEGORIES= x11-wm xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
MASTER_SITE_SUBDIR= src/xfce/xfdesktop/${PORTVERSION:R}

View File

@ -0,0 +1,13 @@
--- ./src/main.c.orig 2013-03-02 16:37:34.000000000 +0000
+++ ./src/main.c 2013-03-09 11:32:10.000000000 +0000
@@ -255,8 +255,10 @@
xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
#if defined(ENABLE_FILE_ICONS) || defined(USE_DESKTOP_MENU)
+#if !GLIB_CHECK_VERSION (2, 32, 0)
g_thread_init(NULL);
#endif
+#endif
#ifdef ENABLE_FILE_ICONS
dbus_g_thread_init();
#endif

View File

@ -0,0 +1,37 @@
--- ./src/xfce-backdrop.c.orig 2013-03-02 16:42:00.000000000 +0000
+++ ./src/xfce-backdrop.c 2013-03-07 19:23:41.000000000 +0000
@@ -924,6 +924,8 @@
xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
{
GdkPixbuf *final_image, *image = NULL, *tmp;
+ GdkPixbufFormat *format = NULL;
+ gboolean apply_backdrop_image = FALSE;
gint i, j;
gint w, h, iw = 0, ih = 0;
XfceBackdropImageStyle istyle;
@@ -933,8 +935,12 @@
g_return_val_if_fail(XFCE_IS_BACKDROP(backdrop), NULL);
- if(backdrop->priv->show_image && backdrop->priv->image_path)
- gdk_pixbuf_get_file_info(backdrop->priv->image_path, &iw, &ih);
+ if(backdrop->priv->show_image && backdrop->priv->image_path) {
+ format = gdk_pixbuf_get_file_info(backdrop->priv->image_path, &iw, &ih);
+ /* make sure we have a usable backdrop image */
+ if(format != NULL)
+ apply_backdrop_image = TRUE;
+ }
if(backdrop->priv->width == 0 || backdrop->priv->height == 0) {
w = iw;
@@ -956,9 +962,7 @@
final_image = create_solid(&backdrop->priv->color1, w, h, FALSE, 0xff);
}
- /*check if the file exists,
- *and if it doesn't then make the background the single colour*/
- if(!g_file_test(backdrop->priv->image_path, G_FILE_TEST_EXISTS)) {
+ if(!apply_backdrop_image) {
if(backdrop->priv->brightness != 0)
final_image = adjust_brightness(final_image, backdrop->priv->brightness);