! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
XfceAboutDialog patch to add icon property getter and setter
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Libxfcegui4
Component:
General

Comments

Description Jeff Franks 2005-08-28 13:53:21 CEST
An icon property getter and setter are missing. These functions are useful for
langauge bindings, something you need to be aware of know. Also it will be
consistent with the other XfceAboutDialog getters and setters.

I have included a patch that adds and uses the icon property getter and setter
functions. Benedikt said I could apply this patch but I don't have the
permissions to do this. 

Reproducible: Always
Steps to Reproduce:
1. 
2. 
3. 




diff -ru libxfcegui4/libxfcegui4/xfce_aboutdialog.c
libxfcegui4-new/libxfcegui4/xfce_aboutdialog.c
--- libxfcegui4/libxfcegui4/xfce_aboutdialog.c	2005-08-26 23:50:54.000000000 +1000
+++ libxfcegui4-new/libxfcegui4/xfce_aboutdialog.c	2005-08-27 00:06:46.000000000
+1000
@@ -664,10 +664,7 @@
 			priv->pixbuf = NULL;
 		}
 			
-		priv->pixbuf = pix;
-		
-		xfce_about_dialog_update_info_icon (dialog);
-		
+		xfce_about_dialog_set_icon(dialog, pix);		
 		break;
 		
 	/* credits ? */
@@ -1014,30 +1011,28 @@
     }
 
     
-                xfce_about_info_set_program(xinfo, info->program);
-                xfce_about_dialog_update_info_program (dialog);
+  xfce_about_info_set_program(xinfo, info->program);
+  xfce_about_dialog_update_info_program (dialog);
                 
-		xfce_about_info_set_version(xinfo, info->version);
-		xfce_about_dialog_update_info_version (dialog);
+  xfce_about_info_set_version(xinfo, info->version);
+  xfce_about_dialog_update_info_version (dialog);
 		
-		xfce_about_info_set_description(xinfo, info->description);
-		xfce_about_dialog_update_info_description (dialog);
+  xfce_about_info_set_description(xinfo, info->description);
+  xfce_about_dialog_update_info_description (dialog);
 		
-		xfce_about_info_set_copyright(xinfo, info->copyright);
-		xfce_about_dialog_update_info_copyright (dialog);
+  xfce_about_info_set_copyright(xinfo, info->copyright);
+  xfce_about_dialog_update_info_copyright (dialog);
 		
-		xfce_about_info_set_license(xinfo, info->license);
-		xfce_about_dialog_update_info_license (dialog);
+  xfce_about_info_set_license(xinfo, info->license);
+  xfce_about_dialog_update_info_license (dialog);
 		
-		xfce_about_info_set_homepage(xinfo, info->homepage);
-		xfce_about_dialog_update_info_homepage (dialog);
+  xfce_about_info_set_homepage(xinfo, info->homepage);
+  xfce_about_dialog_update_info_homepage (dialog);
 
-		priv->pixbuf = g_object_ref (G_OBJECT (icon));
-		xfce_about_dialog_update_info_icon (dialog);
+  xfce_about_dialog_set_icon(dialog, icon);		
 		
-		/*xinfo, */
-		xfce_about_dialog_update_info_credits (dialog);
-                                  
+  /*xinfo, */
+  xfce_about_dialog_update_info_credits (dialog);
 
   return(GTK_WIDGET(dialog));
 }
@@ -1121,6 +1116,13 @@
 	xfce_about_dialog_update_info_homepage (dialog);
 }
 
+void xfce_about_dialog_set_icon(XfceAboutDialog* dialog, GdkPixbuf *icon)
+{
+	XfceAboutDialogPrivate *priv;
+	priv->pixbuf = g_object_ref (G_OBJECT (icon));
+	xfce_about_dialog_update_info_icon (dialog);
+}
+
 void xfce_about_dialog_add_credit(XfceAboutDialog* dialog, 
 	const gchar   *name,
 	const gchar   *mail,
@@ -1188,3 +1190,9 @@
 	return info->homepage;
 }
 
+GdkPixbuf *xfce_about_dialog_get_icon(XfceAboutDialog* dialog)
+{
+	XfceAboutDialogPrivate* priv;
+	return priv->pixbuf;
+}
+
diff -ru libxfcegui4/libxfcegui4/xfce_aboutdialog.h
libxfcegui4-new/libxfcegui4/xfce_aboutdialog.h
--- libxfcegui4/libxfcegui4/xfce_aboutdialog.h	2005-08-26 23:50:54.000000000 +1000
+++ libxfcegui4-new/libxfcegui4/xfce_aboutdialog.h	2005-08-26 23:56:37.000000000
+1000
@@ -94,6 +94,7 @@
 void xfce_about_dialog_set_copyright(XfceAboutDialog* dialog, const gchar *value);
 void xfce_about_dialog_set_license(XfceAboutDialog* dialog, const gchar *value);
 void xfce_about_dialog_set_homepage(XfceAboutDialog* dialog, const gchar *value);
+void xfce_about_dialog_set_icon(XfceAboutDialog* dialog, GdkPixbuf *icon);
 void xfce_about_dialog_add_credit(XfceAboutDialog* dialog,
 	const gchar   *name,
 	const gchar   *mail,
@@ -105,6 +106,7 @@
 const gchar *xfce_about_dialog_get_copyright(XfceAboutDialog* dialog);
 const gchar *xfce_about_dialog_get_license(XfceAboutDialog* dialog);
 const gchar *xfce_about_dialog_get_homepage(XfceAboutDialog* dialog);
+GdkPixbuf   *xfce_about_dialog_get_icon(XfceAboutDialog* dialog);
 
 G_END_DECLS;
Comment 1 Jeff Franks 2005-08-28 13:54:52 CEST
Created attachment 301 
Adds to XfceAboutDialog an icon property getter and setter
Comment 2 Harold Aling 2007-09-23 18:15:34 CEST
Ehm, doe anybody know the status of this one?
Comment 3 Nick Schermer editbugs 2007-09-23 18:42:55 CEST
Fixed in 4.4 and trunk.

Bug #1132

Reported by:
Jeff Franks
Reported on: 2005-08-28
Last modified on: 2009-07-15

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information