Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 58408 Details for
Bug 91941
gnome-utils 2.10.1 with new dbus/hal API
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
files/gnome-utils-2.9.92-gfloppy_new_hal_api.patch
gnome-utils-2.9.92-gfloppy_new_hal_api.patch (text/plain), 2.42 KB, created by
Doug Goldstein (RETIRED)
on 2005-05-08 14:51:43 UTC
(
hide
)
Description:
files/gnome-utils-2.9.92-gfloppy_new_hal_api.patch
Filename:
MIME Type:
Creator:
Doug Goldstein (RETIRED)
Created:
2005-05-08 14:51:43 UTC
Size:
2.42 KB
patch
obsolete
>--- gnome-utils-2.9.92/gfloppy/src/main.c.gfloppy_new_hal_api 2005-01-24 10:54:50.000000000 -0500 >+++ gnome-utils-2.9.92/gfloppy/src/main.c 2005-03-08 14:58:09.411484000 -0500 >@@ -153,6 +153,37 @@ > > #define HAL_FLOPPY_DEV_KEY "block.device" > >+static LibHalContext * >+get_hal_context () >+{ >+ LibHalContext *hal_ctx; >+ hal_ctx = NULL; >+ >+ hal_ctx = libhal_ctx_new (); >+ if (hal_ctx) { >+ DBusConnection *dbus_conn; >+ DBusError error; >+ >+ dbus_error_init (&error); >+ dbus_conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error); >+ >+ if (dbus_error_is_set (&error)) { >+ dbus_error_free (&error); >+ return NULL; >+ } >+ >+ libhal_ctx_set_dbus_connection (hal_ctx, dbus_conn); >+ >+ if (!libhal_ctx_init (hal_ctx, &error)) { >+ dbus_error_free (&error); >+ libhal_ctx_free (hal_ctx); >+ return NULL; >+ } >+ } >+ >+ return hal_ctx; >+} >+ > static FloppyStatus * > get_hal_floppies (gint *num_devices, gint *num_ok, LibHalContext *ctx) > { >@@ -160,10 +191,11 @@ > gchar **device_list; > FloppyStatus *floppies; > >- device_list = hal_manager_find_device_string_match (ctx, >- HAL_FLOPPY_KEY, >- HAL_FLOPPY_VALUE, >- num_devices); >+ device_list = libhal_manager_find_device_string_match (ctx, >+ HAL_FLOPPY_KEY, >+ HAL_FLOPPY_VALUE, >+ num_devices, >+ NULL); > > floppies = NULL; > >@@ -174,9 +206,10 @@ > > for (i = 0; i < *num_devices; i++) { > floppies[i].device_path = >- hal_device_get_property_string (ctx, >+ libhal_device_get_property_string (ctx, > device_list[i], >- HAL_FLOPPY_DEV_KEY); >+ HAL_FLOPPY_DEV_KEY, >+ NULL); > > floppies[i].status = test_floppy_device (floppies[i].device_path); > >@@ -184,7 +217,7 @@ > (*num_ok)++; > } > >- hal_free_string_array (device_list); >+ libhal_free_string_array (device_list); > } else { > *num_devices = 1; > >@@ -554,7 +587,7 @@ > GNOME_PARAM_APP_DATADIR,DATADIR,NULL); > > #ifdef USE_HAL >- ctx = (gpointer) hal_initialize (NULL, FALSE); >+ ctx = (gpointer)get_hal_context (); > #endif > > gtk_window_set_default_icon_name ("gnome-dev-floppy"); >@@ -694,7 +727,14 @@ > g_object_unref (G_OBJECT (client)); > > #ifdef USE_HAL >- hal_shutdown (ctx); >+ if (ctx != NULL) { >+ DBusError derror; >+ libhal_ctx_shutdown ((LibHalContext *)ctx, &derror); >+ if (dbus_error_is_set (&derror)) >+ dbus_error_free (&derror); >+ >+ libhal_ctx_free ((LibHalContext *)ctx); >+ } > #endif > > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 91941
:
58407
| 58408