[Patch] Dbus-Support on FreeBSD (dbus 0.34) and gcc 2.95 compatibility

Simon Barner <[email protected]> Sat, 23 Jul 2005 12:35:11 +0200
Newsgroups gmane.editors.mlview.devel
Message-ID <[email protected]>
--===============0957042443==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG"
Content-Disposition: inline


--1UWUbFP1cBYEclgG
Content-Type: multipart/mixed; boundary="/04w6evG8XlLl3ft"
Content-Disposition: inline


--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Dear MlView developers,

I am the maintainer of the FreeBSD mlview port. Could you please have a
look at the attached patches, and -- if you agree with them --
incorporate them into your next release?

ptch-src_mlview-app-context.c simpliy moves a variable declaration at
the beginning of a function -- for gcc 2.95 compat (Maybe more patches
of this kind are necessary; this one is in the FreeBSD ports collection
since MlView 0.7.1)

patch-src_mlview-service.c is needed for compat. with dbus 0.34. I'm not
familiar with DBus at all, but maybe the patch is helpful for you
anyway.

Best regards,
 Simon

P.S. Please Cc: me in your replys because I'm not a member of this list.

--/04w6evG8XlLl3ft
Content-Type: text/x-csrc; charset=us-ascii
Content-Disposition: attachment; filename="patch-src_mlview-app-context.c"
Content-Transfer-Encoding: quoted-printable

--- src/mlview-app-context.c.orig	Tue Jan 11 09:37:44 2005
+++ src/mlview-app-context.c	Tue Jan 11 09:38:02 2005
@@ -1348,13 +1348,14 @@
 mlview_app_context_get_file_chooser (MlViewAppContext *a_this,
                                      const gchar *a_title, MlViewFileChoos=
erMode a_mode)
 {
+	GtkWidget * parent_window =3D NULL ;
+
         g_return_val_if_fail (a_this=20
                               && MLVIEW_IS_APP_CONTEXT (a_this)
                               && PRIVATE (a_this),
                               NULL) ;
=20
         /*if (!PRIVATE (a_this)->file_chooser) {*/
-	GtkWidget * parent_window =3D NULL ;
=20
 	parent_window =3D mlview_app_context_get_element (a_this,
 							"MlViewMainWindow") ;

--/04w6evG8XlLl3ft
Content-Type: text/x-csrc; charset=us-ascii
Content-Disposition: attachment; filename="patch-src_mlview-service.c"
Content-Transfer-Encoding: quoted-printable

--- src/mlview-service.c.orig	Sat Jul 23 12:10:16 2005
+++ src/mlview-service.c	Sat Jul 23 12:23:14 2005
@@ -282,23 +282,23 @@
 	service_name =3D g_strdup_printf ("%s.%s",=20
 				        PRIVATE (a_this)->name,
 			                tab) ;
-	service_result =3D dbus_bus_acquire_service=20
+	service_result =3D dbus_bus_request_name=20
 		(dbus_connection,
 		 service_name, 0, &dbus_error) ;
=20
 	switch (service_result) {
-		case DBUS_SERVICE_REPLY_PRIMARY_OWNER:
+		case DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER:
 			/*we started the service, OK*/
 			mlview_utils_trace_debug=20
 				("Service name: %s registered\n",
 				 service_name) ;
 			status =3D register_dbus_objects (a_this) ;
 			break ;
-		case DBUS_SERVICE_REPLY_ALREADY_OWNER:
+		case DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER:
 			/*we were already started as service. OK still*/
 			status =3D MLVIEW_OK ;
 			break ;
-		case DBUS_SERVICE_REPLY_SERVICE_EXISTS:
+		case DBUS_REQUEST_NAME_REPLY_EXISTS:
 			/*=20
 			 * an other process has been registered under
 			 * with the same service name. So we can't be registered
@@ -312,7 +312,7 @@
 					 "moment") ;
 			}
 			goto try_service_name ;
-		case DBUS_SERVICE_REPLY_IN_QUEUE:
+		case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
 			/*
 			 * our request is queued. (bus overcrowded ?) KO
 			 */

--/04w6evG8XlLl3ft--

--1UWUbFP1cBYEclgG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFC4h1eCkn+/eutqCoRAjSDAJsEVzfUO/Df5YuD7uxydOBqGDcZ5ACgiqPE
b8Q3Ag2bLhQ4XIFqNsdmjJ8=
=ZtRz
-----END PGP SIGNATURE-----

--1UWUbFP1cBYEclgG--

--===============0957042443==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mlview-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/mlview-list

--===============0957042443==--