diff --git a/src/x11/meta-shadow-factory.c b/src/x11/meta-shadow-factory.c index a7e480067..2494d1e98 100644 --- a/src/x11/meta-shadow-factory.c +++ b/src/x11/meta-shadow-factory.c @@ -924,7 +924,7 @@ make_shadow (MetaShadow *shadow, if (error) { - meta_warning ("Failed to allocate shadow texture: %s", error->message); + g_warning ("Failed to allocate shadow texture: %s", error->message); g_error_free (error); } diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index 463e3c7a0..7f3499ea6 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -366,9 +366,11 @@ meta_x11_display_dispose (GObject *object) mtk_x11_error_trap_push (x11_display->xdisplay); XSelectInput (x11_display->xdisplay, x11_display->xroot, 0); if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success) - meta_warning ("Could not release screen %d on display \"%s\"", - DefaultScreen (x11_display->xdisplay), - x11_display->name); + { + g_warning ("Could not release screen %d on display \"%s\"", + DefaultScreen (x11_display->xdisplay), + x11_display->name); + } x11_display->xroot = None; } @@ -647,7 +649,7 @@ init_x11_bell (MetaX11Display *x11_display) NULL, NULL)) { x11_display->xkb_base_event_type = -1; - meta_warning ("could not find XKB extension."); + g_warning ("Could not find XKB extension."); } else { @@ -853,8 +855,10 @@ take_manager_selection (MetaX11Display *x11_display, } else { - meta_warning (_("Display “%s” already has a window manager; try using the --replace option to replace the current window manager."), - x11_display->name); + g_warning (_("Display “%s” already has a window manager; " + "try using the --replace option to replace " + "the current window manager."), + x11_display->name); return None; } } @@ -868,7 +872,8 @@ take_manager_selection (MetaX11Display *x11_display, if (XGetSelectionOwner (x11_display->xdisplay, manager_atom) != new_owner) { - meta_warning ("Could not acquire selection: %s", XGetAtomName (x11_display->xdisplay, manager_atom)); + g_warning ("Could not acquire selection: %s", + XGetAtomName (x11_display->xdisplay, manager_atom)); return None; } @@ -1234,11 +1239,9 @@ open_x_display (MetaDisplay *display, if (xdisplay == NULL) { - meta_warning (_("Failed to open X Window System display “%s”"), - xdisplay_name); - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Failed to open X11 display"); + _("Failed to open X Window System display “%s”"), + xdisplay_name); return NULL; } @@ -1469,11 +1472,9 @@ meta_x11_display_new (MetaDisplay *display, */ if (xroot == None) { - meta_warning (_("Screen %d on display “%s” is invalid"), - number, XDisplayName (NULL)); - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Failed to open default X11 screen"); + _("Screen %d on display “%s” is invalid"), + number, XDisplayName (NULL)); XFlush (xdisplay); XCloseDisplay (xdisplay); diff --git a/src/x11/session.c b/src/x11/session.c index fc720d9bc..566e21f0f 100644 --- a/src/x11/session.c +++ b/src/x11/session.c @@ -909,15 +909,15 @@ save_state (MetaContext *context) if (mkdir (mutter_dir, 0700) < 0 && errno != EEXIST) { - meta_warning ("Could not create directory '%s': %s", - mutter_dir, g_strerror (errno)); + g_warning ("Could not create directory '%s': %s", + mutter_dir, g_strerror (errno)); } if (mkdir (session_dir, 0700) < 0 && errno != EEXIST) { - meta_warning ("Could not create directory '%s': %s", - session_dir, g_strerror (errno)); + g_warning ("Could not create directory '%s': %s", + session_dir, g_strerror (errno)); } meta_topic (META_DEBUG_SM, "Saving session to '%s'", full_save_file ()); @@ -926,8 +926,8 @@ save_state (MetaContext *context) if (outfile == NULL) { - meta_warning ("Could not open session file '%s' for writing: %s", - full_save_file (), g_strerror (errno)); + g_warning ("Could not open session file '%s' for writing: %s", + full_save_file (), g_strerror (errno)); goto out; } @@ -1072,13 +1072,13 @@ save_state (MetaContext *context) /* FIXME need a dialog for this */ if (ferror (outfile)) { - meta_warning ("Error writing session file '%s': %s", + g_warning ("Error writing session file '%s': %s", full_save_file (), g_strerror (errno)); } if (fclose (outfile)) { - meta_warning ("Error closing session file '%s': %s", - full_save_file (), g_strerror (errno)); + g_warning ("Error closing session file '%s': %s", + full_save_file (), g_strerror (errno)); } } @@ -1185,8 +1185,8 @@ load_state (const char *previous_save_file) error: - meta_warning ("Failed to parse saved session file: %s", - error->message); + g_warning ("Failed to parse saved session file: %s", + error->message); g_error_free (error); if (parse_data.info) diff --git a/src/x11/window-props.c b/src/x11/window-props.c index db3d43d3c..4d36f3422 100644 --- a/src/x11/window-props.c +++ b/src/x11/window-props.c @@ -242,8 +242,8 @@ complain_about_broken_client (MetaWindow *window, MetaPropValue *value, gboolean initial) { - meta_warning ("Broken client! Window %s changed client leader window or SM client ID", - window->desc); + g_warning ("Window %s changed client leader window or SM client ID", + window->desc); } static void diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index efe8118ce..a7eb7dbdf 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -4300,9 +4300,9 @@ meta_window_x11_recalc_window_type (MetaWindow *window) priv->type_atom); mtk_x11_error_trap_pop (x11_display->xdisplay); - meta_warning ("Unrecognized type atom [%s] set for %s ", - atom_name ? atom_name : "unknown", - window->desc); + g_warning ("Unrecognized type atom [%s] set for %s ", + atom_name ? atom_name : "unknown", + window->desc); if (atom_name) XFree (atom_name); diff --git a/src/x11/xprops.c b/src/x11/xprops.c index dbc426d2e..39f275942 100644 --- a/src/x11/xprops.c +++ b/src/x11/xprops.c @@ -155,14 +155,17 @@ validate_or_free_results (GetPropertyResults *results, if (res_name == NULL) res_name = "unknown"; - meta_warning ("Window 0x%lx has property %s that was expected to have type %s format %d and actually has type %s format %d n_items %d. This is most likely an application bug, not a window manager bug. The window has title=\"%s\" class=\"%s\" name=\"%s\"", - results->xwindow, - prop_name ? prop_name : "(bad atom)", - expected_name ? expected_name : "(bad atom)", - expected_format, - type_name ? type_name : "(bad atom)", - results->format, (int) results->n_items, - title, res_class, res_name); + g_warning ("Window 0x%lx has property %s that was expected to have type %s " + "format %d and actually has type %s format %d n_items %d. " + "This is most likely an application bug, not a window manager bug. " + "The window has title=\"%s\" class=\"%s\" name=\"%s\"", + results->xwindow, + prop_name ? prop_name : "(bad atom)", + expected_name ? expected_name : "(bad atom)", + expected_format, + type_name ? type_name : "(bad atom)", + results->format, (int) results->n_items, + title, res_class, res_name); meta_XFree (type_name); meta_XFree (expected_name); @@ -368,8 +371,8 @@ utf8_string_from_results (GetPropertyResults *results, char *name; name = XGetAtomName (results->x11_display->xdisplay, results->xatom); - meta_warning ("Property %s on window 0x%lx contained invalid UTF-8", - name, results->xwindow); + g_warning ("Property %s on window 0x%lx contained invalid UTF-8", + name, results->xwindow); meta_XFree (name); g_free (results->prop); results->prop = NULL; @@ -435,8 +438,8 @@ utf8_list_from_results (GetPropertyResults *results, mtk_x11_error_trap_push (results->x11_display->xdisplay); name = XGetAtomName (results->x11_display->xdisplay, results->xatom); mtk_x11_error_trap_pop (results->x11_display->xdisplay); - meta_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list", - name, results->xwindow, i); + g_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list", + name, results->xwindow, i); meta_XFree (name); g_free (results->prop); results->prop = NULL; @@ -628,8 +631,8 @@ text_property_to_utf8 (GetPropertyResults *results, mtk_x11_error_trap_push (results->x11_display->xdisplay); name = XGetAtomName (results->x11_display->xdisplay, results->xatom); mtk_x11_error_trap_pop (results->x11_display->xdisplay); - meta_warning ("Property %s on window 0x%lx contained invalid UTF-8", - name, results->xwindow); + g_warning ("Property %s on window 0x%lx contained invalid UTF-8", + name, results->xwindow); meta_XFree (name); goto out;