reviewed by: Bastien Nocera <hadess@hadess.net>
2006-01-11 Sebastien Bacher <seb128@debian.org> reviewed by: Bastien Nocera <hadess@hadess.net> * actions/acme-fb-level.c: (acme_fblevel_error_quark), (acme_fblevel_new): * actions/acme-fb-level.h: * gnome-settings-multimedia-keys.c: (gnome_settings_multimedia_keys_load): cleanup messages about pmu on powerbook, patch by Jeroen Zwartepoorte <jeroen.zwartepoorte@gmail.com> (Closes: #132655)
This commit is contained in:
parent
821ca6fcf2
commit
b62b47635a
4 changed files with 59 additions and 30 deletions
|
@ -148,26 +148,6 @@ do_sleep_action (char *cmd1, char *cmd2)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef USE_FBLEVEL
|
||||
static char*
|
||||
permission_problem_string (const char *file)
|
||||
{
|
||||
return g_strdup_printf (_("Permissions on the file %s are broken\n"), file);
|
||||
}
|
||||
|
||||
static void
|
||||
fblevel_problem_cb (void)
|
||||
{
|
||||
char *msg;
|
||||
|
||||
msg = permission_problem_string ("/dev/pmu");
|
||||
acme_error (msg);
|
||||
g_free (msg);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char *images[] = {
|
||||
PIXMAPSDIR "/gnome-speakernotes-muted.png",
|
||||
PIXMAPSDIR "/gnome-speakernotes.png",
|
||||
|
@ -800,6 +780,7 @@ gnome_settings_multimedia_keys_load (GConfClient *client)
|
|||
{
|
||||
GSList *l;
|
||||
Acme *acme;
|
||||
GError *err = NULL;
|
||||
|
||||
acme = g_new0 (Acme, 1);
|
||||
acme->xml = NULL;
|
||||
|
@ -819,11 +800,12 @@ gnome_settings_multimedia_keys_load (GConfClient *client)
|
|||
|
||||
#ifdef USE_FBLEVEL
|
||||
/* initialise Frame Buffer level handler */
|
||||
if (acme_fblevel_is_powerbook () != FALSE)
|
||||
{
|
||||
acme->levobj = acme_fblevel_new();
|
||||
if (acme->levobj == NULL)
|
||||
fblevel_problem_cb ();
|
||||
acme->levobj = acme_fblevel_new (&err);
|
||||
if (acme->levobj == NULL && err != NULL) {
|
||||
if (!g_error_matches (err, ACME_FBLEVEL_ERROR,
|
||||
ACME_FBLEVEL_ERROR_NO_POWERBOOK))
|
||||
acme_error (err->message);
|
||||
g_error_free (err);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue