diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-02-28 11:06:25 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-02-28 12:23:12 -0500 |
commit | bbd94b5a9ffc83569c771d81fa07457dfd61d20d (patch) | |
tree | e5a654ece274c67951fb0a8cb39d812256884aad /gtk | |
parent | 72b40266bde69effa75fabae960748c2c7832a4d (diff) | |
download | gtk+-bbd94b5a9ffc83569c771d81fa07457dfd61d20d.tar.gz |
gtk: Strip newlines from g_warning and g_error
g_logv adds one for us already.
Diffstat (limited to 'gtk')
40 files changed, 83 insertions, 86 deletions
diff --git a/gtk/deprecated/gtkcolorsel.c b/gtk/deprecated/gtkcolorsel.c index 730b2b8255..edc1f5b638 100644 --- a/gtk/deprecated/gtkcolorsel.c +++ b/gtk/deprecated/gtkcolorsel.c @@ -867,7 +867,7 @@ color_sample_drop_handle (GtkWidget *widget, */ if (length != 8) { - g_warning ("Received invalid color data\n"); + g_warning ("Received invalid color data"); return; } @@ -1595,7 +1595,7 @@ palette_drop_handle (GtkWidget *widget, */ if (length != 8) { - g_warning ("Received invalid color data\n"); + g_warning ("Received invalid color data"); return; } diff --git a/gtk/deprecated/gtkrecentaction.c b/gtk/deprecated/gtkrecentaction.c index 782d177144..4b1b1b8049 100644 --- a/gtk/deprecated/gtkrecentaction.c +++ b/gtk/deprecated/gtkrecentaction.c @@ -162,16 +162,14 @@ gtk_recent_action_unselect_uri (GtkRecentChooser *chooser, static void gtk_recent_action_select_all (GtkRecentChooser *chooser) { - g_warning ("This function is not implemented for " - "widgets of class '%s'", + g_warning ("This function is not implemented for widgets of class '%s'", g_type_name (G_OBJECT_TYPE (chooser))); } static void gtk_recent_action_unselect_all (GtkRecentChooser *chooser) { - g_warning ("This function is not implemented for " - "widgets of class '%s'", + g_warning ("This function is not implemented for widgets of class '%s'", g_type_name (G_OBJECT_TYPE (chooser))); } diff --git a/gtk/deprecated/gtkstock.c b/gtk/deprecated/gtkstock.c index a5299ebc4c..137fe68afa 100644 --- a/gtk/deprecated/gtkstock.c +++ b/gtk/deprecated/gtkstock.c @@ -106,7 +106,7 @@ real_add (const GtkStockItem *items, { if (item->modifier & NON_STATIC_MASK) { - g_warning ("Bit 29 set in stock accelerator.\n"); + g_warning ("Bit 29 set in stock accelerator."); copy = TRUE; } diff --git a/gtk/deprecated/gtkuimanager.c b/gtk/deprecated/gtkuimanager.c index 30744fd21c..b79895b25a 100644 --- a/gtk/deprecated/gtkuimanager.c +++ b/gtk/deprecated/gtkuimanager.c @@ -734,7 +734,7 @@ gtk_ui_manager_buildable_construct_child (GtkBuildable *buildable, widget = gtk_ui_manager_get_widget (GTK_UI_MANAGER (buildable), name); if (!widget) { - g_error ("Unknown ui manager child: %s\n", name); + g_error ("Unknown ui manager child: %s", name); g_free (name); return NULL; } @@ -983,7 +983,7 @@ gtk_ui_manager_insert_action_group (GtkUIManager *manager, if (strcmp (gtk_action_group_get_name (group), group_name) == 0) { g_warning ("Inserting action group '%s' into UI manager which " - "already has a group with this name\n", group_name); + "already has a group with this name", group_name); break; } } @@ -2184,8 +2184,7 @@ gtk_ui_manager_add_ui (GtkUIManager *manager, if (node_type == NODE_TYPE_UNDECIDED) { - g_warning ("item type %d not suitable for adding at '%s'", - type, path); + g_warning ("item type %d not suitable for adding at '%s'", type, path); return; } diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index bb31f5fe1e..f5df3efebe 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -800,7 +800,7 @@ gtk_calendar_init (GtkCalendar *calendar) if (strcmp (year_before, "calendar:YM") == 0) priv->year_before = 1; else if (strcmp (year_before, "calendar:MY") != 0) - g_warning ("Whoever translated calendar:MY did so wrongly.\n"); + g_warning ("Whoever translated calendar:MY did so wrongly."); #ifdef G_OS_WIN32 priv->week_start = 0; @@ -826,7 +826,7 @@ gtk_calendar_init (GtkCalendar *calendar) else if (week_origin == 19971201) /* Monday */ week_1stday = 1; else - g_warning ("Unknown value of _NL_TIME_WEEK_1STDAY.\n"); + g_warning ("Unknown value of _NL_TIME_WEEK_1STDAY."); priv->week_start = (week_1stday + first_weekday - 1) % 7; #else @@ -843,7 +843,7 @@ gtk_calendar_init (GtkCalendar *calendar) if (priv->week_start < 0 || priv->week_start > 6) { - g_warning ("Whoever translated calendar:week_start:0 did so wrongly.\n"); + g_warning ("Whoever translated calendar:week_start:0 did so wrongly."); priv->week_start = 0; } #endif @@ -3454,7 +3454,7 @@ gtk_calendar_drag_data_received (GtkWidget *widget, if (!g_date_valid (date)) { - g_warning ("Received invalid date data\n"); + g_warning ("Received invalid date data"); g_date_free (date); gtk_drag_finish (context, FALSE, FALSE, time); return; diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 025f393951..9ab5b14d72 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -199,7 +199,7 @@ gtk_cell_renderer_spinner_update_size (GtkCellRendererSpinner *cell, if (!gtk_icon_size_lookup (priv->icon_size, &priv->size, NULL)) { - g_warning ("Invalid icon size %u\n", priv->icon_size); + g_warning ("Invalid icon size %u", priv->icon_size); priv->size = 24; } } diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index ff4b8b2fd2..9fe3ac1bca 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -246,7 +246,7 @@ swatch_drag_data_received (GtkWidget *widget, */ if (length != 8) { - g_warning ("Received invalid color data\n"); + g_warning ("Received invalid color data"); return; } diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index c6481a60ca..1b2962cc36 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -555,7 +555,7 @@ verify_tree_match_results (GtkCssProvider *provider, should_match = _gtk_css_selector_matches (ruleset->selector, matcher); if (found != !!should_match) { - g_error ("expected rule '%s' to %s, but it %s\n", + g_error ("expected rule '%s' to %s, but it %s", _gtk_css_selector_to_string (ruleset->selector), should_match ? "match" : "not match", found ? "matched" : "didn't match"); diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index b98ba78abd..993f0e0a65 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -129,7 +129,7 @@ _gtk_print_get_default_user_units (void) if (strcmp (e, "default:inch")==0) return GTK_UNIT_INCH; else if (strcmp (e, "default:mm")) - g_warning ("Whoever translated default:mm did so wrongly.\n"); + g_warning ("Whoever translated default:mm did so wrongly."); return GTK_UNIT_MM; } diff --git a/gtk/gtkfilechoosernativewin32.c b/gtk/gtkfilechoosernativewin32.c index 8cc5580415..22411d35be 100644 --- a/gtk/gtkfilechoosernativewin32.c +++ b/gtk/gtkfilechoosernativewin32.c @@ -85,7 +85,7 @@ g_warning_hr (const char *msg, HRESULT hr) { char *errmsg; errmsg = g_win32_error_message (hr); - g_warning ("%s: %s\n", msg, errmsg); + g_warning ("%s: %s", msg, errmsg); g_free (errmsg); } @@ -413,11 +413,11 @@ filechooser_win32_thread (gpointer _data) &IID_IFileOpenDialog, (LPVOID *) &pfd); if (FAILED (hr)) - g_error ("Can't create FileOpenDialog: %s\n", g_win32_error_message (hr)); + g_error ("Can't create FileOpenDialog: %s", g_win32_error_message (hr)); hr = IFileDialog_GetOptions (pfd, &flags); if (FAILED (hr)) - g_error ("Can't get FileDialog options: %s\n", g_win32_error_message (hr)); + g_error ("Can't get FileDialog options: %s", g_win32_error_message (hr)); flags |= FOS_FORCEFILESYSTEM; @@ -440,7 +440,7 @@ filechooser_win32_thread (gpointer _data) hr = IFileDialog_SetOptions (pfd, flags); if (FAILED (hr)) - g_error ("Can't set FileDialog options: %s\n", g_win32_error_message (hr)); + g_error ("Can't set FileDialog options: %s", g_win32_error_message (hr)); if (data->title) { @@ -536,7 +536,7 @@ filechooser_win32_thread (gpointer _data) hr = IFileDialog_Advise (pfd, data->events, &cookie); if (FAILED (hr)) - g_error ("Can't Advise FileDialog: %s\n", g_win32_error_message (hr)); + g_error ("Can't Advise FileDialog: %s", g_win32_error_message (hr)); hr = IFileDialog_Show (pfd, data->parent); if (SUCCEEDED (hr)) @@ -551,18 +551,18 @@ filechooser_win32_thread (gpointer _data) hr = IFileOpenDialog_GetResults (pfod, &res); if (FAILED (hr)) - g_error ("Can't get FileOpenDialog results: %s\n", g_win32_error_message (hr)); + g_error ("Can't get FileOpenDialog results: %s", g_win32_error_message (hr)); hr = IShellItemArray_GetCount (res, &count); if (FAILED (hr)) - g_error ("Can't get FileOpenDialog count: %s\n", g_win32_error_message (hr)); + g_error ("Can't get FileOpenDialog count: %s", g_win32_error_message (hr)); for (i = 0; i < count; i++) { IShellItem *item; hr = IShellItemArray_GetItemAt (res, i, &item); if (FAILED (hr)) - g_error ("Can't get item at %lu: %s\n", i, g_win32_error_message (hr)); + g_error ("Can't get item at %lu: %s", i, g_win32_error_message (hr)); data_add_shell_item (data, item); IShellItem_Release (item); } @@ -575,7 +575,7 @@ filechooser_win32_thread (gpointer _data) IShellItem *item; hr = IFileDialog_GetResult (pfd, &item); if (FAILED (hr)) - g_error ("Can't get FileDialog result: %s\n", g_win32_error_message (hr)); + g_error ("Can't get FileDialog result: %s", g_win32_error_message (hr)); data_add_shell_item (data, item); IShellItem_Release (item); @@ -584,7 +584,7 @@ filechooser_win32_thread (gpointer _data) hr = IFileDialog_Unadvise (pfd, cookie); if (FAILED (hr)) - g_error ("Can't Unadvise FileDialog: %s\n", g_win32_error_message (hr)); + g_error ("Can't Unadvise FileDialog: %s", g_win32_error_message (hr)); IFileDialog_Release ((IUnknown *)pfd); diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 78b870a3d6..1552c6e9c9 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -6045,7 +6045,7 @@ gtk_file_chooser_widget_add_filter (GtkFileChooser *chooser, if (g_slist_find (priv->filters, filter)) { - g_warning ("gtk_file_chooser_add_filter() called on filter already in list\n"); + g_warning ("gtk_file_chooser_add_filter() called on filter already in list"); return; } @@ -6078,7 +6078,7 @@ gtk_file_chooser_widget_remove_filter (GtkFileChooser *chooser, if (filter_index < 0) { - g_warning ("gtk_file_chooser_remove_filter() called on filter not in list\n"); + g_warning ("gtk_file_chooser_remove_filter() called on filter not in list"); return; } diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 364474494c..ecec916002 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -3256,7 +3256,7 @@ gtk_flow_box_remove (GtkContainer *container, child = (GtkFlowBoxChild*)gtk_widget_get_parent (widget); if (!GTK_IS_FLOW_BOX_CHILD (child)) { - g_warning ("Tried to remove non-child %p\n", widget); + g_warning ("Tried to remove non-child %p", widget); return; } } diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c index a8cfaf4b29..63a943f46e 100644 --- a/gtk/gtkiconcache.c +++ b/gtk/gtkiconcache.c @@ -144,7 +144,7 @@ _gtk_icon_cache_new_for_path (const gchar *path) if (!_gtk_icon_cache_validate (&info)) { g_mapped_file_unref (map); - g_warning ("Icon cache '%s' is invalid\n", cache_filename); + g_warning ("Icon cache '%s' is invalid", cache_filename); goto done; } diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 43e6f673ea..c03c48712b 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -239,7 +239,7 @@ ensure_icon_size (GtkIconHelper *self, } else { - g_warning ("Invalid icon size %d\n", self->priv->icon_size); + g_warning ("Invalid icon size %d", self->priv->icon_size); width = height = 24; } } diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index d7dc37154d..df8fdc099e 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1192,12 +1192,12 @@ insert_theme (GtkIconTheme *icon_theme, theme->display_name = g_key_file_get_locale_string (theme_file, "Icon Theme", "Name", NULL, NULL); if (!theme->display_name) - g_warning ("Theme file for %s has no name\n", theme_name); + g_warning ("Theme file for %s has no name", theme_name); dirs = g_key_file_get_string_list (theme_file, "Icon Theme", "Directories", NULL, NULL); if (!dirs) { - g_warning ("Theme file for %s has no directories\n", theme_name); + g_warning ("Theme file for %s has no directories", theme_name); priv->themes = g_list_remove (priv->themes, theme); g_free (theme->name); g_free (theme->display_name); diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index 99d7fd3332..26c6cf191a 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -574,7 +574,7 @@ gtk_link_button_new (const gchar *uri) if (conv_err) { g_warning ("Attempting to convert URI '%s' to UTF-8, but failed " - "with error: %s\n", + "with error: %s", uri, conv_err->message); g_error_free (conv_err); diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index 59a46b88cd..c3aa6a9e7f 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -2435,7 +2435,7 @@ gtk_list_box_remove (GtkContainer *container, } else { - g_warning ("Tried to remove non-child %p\n", child); + g_warning ("Tried to remove non-child %p", child); } return; } @@ -2443,7 +2443,7 @@ gtk_list_box_remove (GtkContainer *container, row = GTK_LIST_BOX_ROW (child); if (g_sequence_iter_get_sequence (ROW_PRIV (row)->iter) != priv->children) { - g_warning ("Tried to remove non-child %p\n", child); + g_warning ("Tried to remove non-child %p", child); return; } diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index 038bab4fbf..8bf3eb19cd 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -431,7 +431,7 @@ gtk_list_store_new (gint n_columns, GType type = va_arg (args, GType); if (! _gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (type)); g_object_unref (retval); va_end (args); @@ -472,7 +472,7 @@ gtk_list_store_newv (gint n_columns, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (types[i])); g_object_unref (retval); return NULL; } @@ -513,7 +513,7 @@ gtk_list_store_set_column_types (GtkListStore *list_store, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (types[i])); continue; } gtk_list_store_set_column_type (list_store, i, types[i]); @@ -549,7 +549,7 @@ gtk_list_store_set_column_type (GtkListStore *list_store, if (!_gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (type)); return; } @@ -830,7 +830,7 @@ gtk_list_store_real_set_value (GtkListStore *list_store, { if (! (g_value_type_transformable (G_VALUE_TYPE (value), priv->column_headers[column]))) { - g_warning ("%s: Unable to convert from %s to %s\n", + g_warning ("%s: Unable to convert from %s to %s", G_STRLOC, g_type_name (G_VALUE_TYPE (value)), g_type_name (priv->column_headers[column])); @@ -840,7 +840,7 @@ gtk_list_store_real_set_value (GtkListStore *list_store, g_value_init (&real_value, priv->column_headers[column]); if (!g_value_transform (value, &real_value)) { - g_warning ("%s: Unable to make conversion from %s to %s\n", + g_warning ("%s: Unable to make conversion from %s to %s", G_STRLOC, g_type_name (G_VALUE_TYPE (value)), g_type_name (priv->column_headers[column])); diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index d3c3ba2057..3afc189f76 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1196,7 +1196,7 @@ gtk_get_locale_direction (void) if (g_strcmp0 (e, "default:RTL") == 0) dir = GTK_TEXT_DIR_RTL; else if (g_strcmp0 (e, "default:LTR") != 0) - g_warning ("Whoever translated default:LTR did so wrongly. Defaulting to LTR.\n"); + g_warning ("Whoever translated default:LTR did so wrongly. Defaulting to LTR."); return dir; } diff --git a/gtk/gtkmountoperation-x11.c b/gtk/gtkmountoperation-x11.c index 4ecef653c5..10c7bbcf81 100644 --- a/gtk/gtkmountoperation-x11.c +++ b/gtk/gtkmountoperation-x11.c @@ -160,7 +160,7 @@ get_utf8_property (Display *xdisplay, if (!g_utf8_validate (val, nitems, NULL)) { - g_warning ("Property %s contained invalid UTF-8\n", + g_warning ("Property %s contained invalid UTF-8", gdk_x11_get_xatom_name (atom)); XFree (val); return NULL; diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index f9365b0e8a..e78a5e235a 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -760,7 +760,7 @@ call_password_proxy_cb (GObject *source, &error)) { result = G_MOUNT_OPERATION_ABORTED; - g_warning ("Shell mount operation error: %s\n", error->message); + g_warning ("Shell mount operation error: %s", error->message); g_error_free (error); goto out; } @@ -927,7 +927,7 @@ call_question_proxy_cb (GObject *source, &error)) { result = G_MOUNT_OPERATION_ABORTED; - g_warning ("Shell mount operation error: %s\n", error->message); + g_warning ("Shell mount operation error: %s", error->message); g_error_free (error); goto out; } @@ -1549,7 +1549,7 @@ call_processes_proxy_cb (GObject *source, &error)) { result = G_MOUNT_OPERATION_ABORTED; - g_warning ("Shell mount operation error: %s\n", error->message); + g_warning ("Shell mount operation error: %s", error->message); g_error_free (error); goto out; } diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 1d16ab0be1..0c7bc30a56 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -2267,7 +2267,7 @@ gtk_paned_add (GtkContainer *container, else if (!priv->child2) gtk_paned_add2 (paned, widget); else - g_warning ("GtkPaned cannot have more than 2 children\n"); + g_warning ("GtkPaned cannot have more than 2 children"); } static void diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index a9399a6e9e..278832e39e 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -260,7 +260,7 @@ gtk_paper_size_new (const gchar *name) size = gtk_paper_size_new_from_info (info); else { - g_warning ("Unknown paper size %s\n", name); + g_warning ("Unknown paper size %s", name); size = g_slice_new0 (GtkPaperSize); size->name = g_strdup (name); size->display_name = g_strdup (name); diff --git a/gtk/gtkpixelcache.c b/gtk/gtkpixelcache.c index 9448401b9e..87ed977ce8 100644 --- a/gtk/gtkpixelcache.c +++ b/gtk/gtkpixelcache.c @@ -78,7 +78,7 @@ _gtk_pixel_cache_free (GtkPixelCache *cache) cache->surface || cache->surface_dirty) { - g_warning ("pixel cache freed that wasn't unmapped: tag %u surface %p sirty %p", + g_warning ("pixel cache freed that wasn't unmapped: tag %u surface %p dirty %p", cache->timeout_tag, cache->surface, cache->surface_dirty); } diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c index 8ec6dbc99b..cccdbcaaf7 100644 --- a/gtk/gtkprintbackend.c +++ b/gtk/gtkprintbackend.c @@ -121,7 +121,7 @@ gtk_print_backend_module_load (GTypeModule *module) pb_module->library = g_module_open (pb_module->path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); if (!pb_module->library) { - g_warning ("%s", g_module_error()); + g_warning ("%s", g_module_error ()); return FALSE; } @@ -133,7 +133,7 @@ gtk_print_backend_module_load (GTypeModule *module) !g_module_symbol (pb_module->library, "pb_module_create", &createp)) { - g_warning ("%s", g_module_error()); + g_warning ("%s", g_module_error ()); g_module_close (pb_module->library); return FALSE; diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 1e17b0f831..d62173ef64 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -305,7 +305,7 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, { gchar* uri; - g_warning ("%s %s", _("Error launching preview"), error->message); + g_warning ("Error launching preview: %s", error->message); g_error_free (error); error = NULL; diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 1a4b14e92d..f4142cf145 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -1676,7 +1676,7 @@ gtk_print_operation_run_with_dialog (GtkPrintOperation *op, initialized = InitCommonControlsEx (&icc); if (!initialized) - g_warning ("Failed to InitCommonControlsEx: %lu\n", GetLastError ()); + g_warning ("Failed to InitCommonControlsEx: %lu", GetLastError ()); _gtk_load_dll_with_libgtk3_manifest ("comdlg32.dll"); diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c index 2699a34bcd..504b212ac1 100644 --- a/gtk/gtkrbtree.c +++ b/gtk/gtkrbtree.c @@ -1550,7 +1550,7 @@ _gtk_rbtree_test_height (GtkRBTree *tree, computed_offset += node->children->root->offset; if (GTK_RBNODE_GET_HEIGHT (node) + computed_offset != node->offset) - g_error ("node has broken offset\n"); + g_error ("node has broken offset"); if (!_gtk_rbtree_is_nil (node->left)) _gtk_rbtree_test_height (tree, node->left); diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c index 5d6172dba6..f9a0a6020d 100644 --- a/gtk/gtkrecentchooserdefault.c +++ b/gtk/gtkrecentchooserdefault.c @@ -1228,7 +1228,7 @@ gtk_recent_chooser_default_add_filter (GtkRecentChooser *chooser, if (g_slist_find (impl->priv->filters, filter)) { - g_warning ("gtk_recent_chooser_add_filter() called on filter already in list\n"); + g_warning ("gtk_recent_chooser_add_filter() called on filter already in list"); return; } @@ -1261,7 +1261,7 @@ gtk_recent_chooser_default_remove_filter (GtkRecentChooser *chooser, if (filter_idx < 0) { - g_warning ("gtk_recent_chooser_remove_filter() called on filter not in list\n"); + g_warning ("gtk_recent_chooser_remove_filter() called on filter not in list"); return; } diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 7c9a065661..0b158a6931 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -2961,7 +2961,7 @@ settings_update_cursor_theme (GtkSettings *settings) gdk_win32_display_set_cursor_theme (display, theme, size); else #endif - g_warning ("GtkSettings Cursor Theme: Unsupported GDK backend\n"); + g_warning ("GtkSettings Cursor Theme: Unsupported GDK backend"); g_free (theme); } diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c index ee24517e7a..c71ee72a30 100644 --- a/gtk/gtksocket.c +++ b/gtk/gtksocket.c @@ -761,7 +761,7 @@ gtk_socket_add_grabbed_key (GtkSocket *socket, find_accel_key, &grabbed_key)) { - g_warning ("GtkSocket: request to add already present grabbed key %u,%#x\n", + g_warning ("GtkSocket: request to add already present grabbed key %u,%#x", keyval, modifiers); g_free (grabbed_key); return; @@ -788,7 +788,7 @@ gtk_socket_remove_grabbed_key (GtkSocket *socket, GdkModifierType modifiers) { if (!gtk_accel_group_disconnect_key (socket->priv->accel_group, keyval, modifiers)) - g_warning ("GtkSocket: request to remove non-present grabbed key %u,%#x\n", + g_warning ("GtkSocket: request to remove non-present grabbed key %u,%#x", keyval, modifiers); } @@ -1292,13 +1292,13 @@ xembed_get_info (GdkWindow *window, if (type != xembed_info_atom) { - g_warning ("_XEMBED_INFO property has wrong type\n"); + g_warning ("_XEMBED_INFO property has wrong type"); return FALSE; } if (nitems < 2) { - g_warning ("_XEMBED_INFO too short\n"); + g_warning ("_XEMBED_INFO too short"); XFree (data); return FALSE; } diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 94389333ad..8eaa09017a 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -722,7 +722,7 @@ gtk_stack_set_child_property (GtkContainer *container, continue; if (g_strcmp0 (info2->name, name) == 0) { - g_warning ("Duplicate child name in GtkStack: %s\n", name); + g_warning ("Duplicate child name in GtkStack: %s", name); break; } } diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c index acb982fd7c..fbe6e91a68 100644 --- a/gtk/gtktextbufferserialize.c +++ b/gtk/gtktextbufferserialize.c @@ -72,7 +72,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS } else { - g_warning ("Type %s is not serializable\n", g_type_name (value->g_type)); + g_warning ("Type %s is not serializable", g_type_name (value->g_type)); } G_GNUC_END_IGNORE_DEPRECATIONS @@ -192,7 +192,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS } else { - g_warning ("Type %s can not be deserialized\n", g_type_name (value->g_type)); + g_warning ("Type %s can not be deserialized", g_type_name (value->g_type)); } G_GNUC_END_IGNORE_DEPRECATIONS diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index e63b661d1d..64bcbf17fe 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -8589,7 +8589,7 @@ gtk_text_view_drag_data_received (GtkWidget *widget, if (!retval) { - g_warning ("error pasting: %s\n", error->message); + g_warning ("error pasting: %s", error->message); g_clear_error (&error); } } diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index d24b135f73..442654c1ad 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -452,7 +452,7 @@ _gtk_tree_data_list_compare_func (GtkTreeModel *model, case G_TYPE_BOXED: case G_TYPE_OBJECT: default: - g_warning ("Attempting to sort on invalid type %s\n", g_type_name (type)); + g_warning ("Attempting to sort on invalid type %s", g_type_name (type)); retval = FALSE; break; } diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index d83ea43342..dc9ce5a349 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -853,7 +853,7 @@ out: g_warning ("The model has been modified from within gtk_tree_selection_selected_foreach.\n" "This function is for observing the selections of the tree only. If\n" "you are trying to get all selected items from the tree, try using\n" - "gtk_tree_selection_get_selected_rows instead.\n"); + "gtk_tree_selection_get_selected_rows instead."); } /** diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index 792eb7730c..5cab98ba77 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -334,7 +334,7 @@ gtk_tree_store_new (gint n_columns, GType type = va_arg (args, GType); if (! _gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (type)); g_object_unref (retval); va_end (args); return NULL; @@ -370,7 +370,7 @@ gtk_tree_store_newv (gint n_columns, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (types[i])); g_object_unref (retval); return NULL; } @@ -407,7 +407,7 @@ gtk_tree_store_set_column_types (GtkTreeStore *tree_store, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (types[i])); continue; } gtk_tree_store_set_column_type (tree_store, i, types[i]); @@ -456,7 +456,7 @@ gtk_tree_store_set_column_type (GtkTreeStore *tree_store, if (!_gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s", G_STRLOC, g_type_name (type)); return; } priv->column_headers[column] = type; @@ -854,7 +854,7 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store, { if (! (g_value_type_transformable (G_VALUE_TYPE (value), priv->column_headers[column]))) { - g_warning ("%s: Unable to convert from %s to %s\n", + g_warning ("%s: Unable to convert from %s to %s", G_STRLOC, g_type_name (G_VALUE_TYPE (value)), g_type_name (priv->column_headers[column])); @@ -864,7 +864,7 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store, g_value_init (&real_value, priv->column_headers[column]); if (!g_value_transform (value, &real_value)) { - g_warning ("%s: Unable to make conversion from %s to %s\n", + g_warning ("%s: Unable to make conversion from %s to %s", G_STRLOC, g_type_name (G_VALUE_TYPE (value)), g_type_name (priv->column_headers[column])); diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 16a185583d..b77c1539ca 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -9486,12 +9486,12 @@ gtk_widget_set_parent (GtkWidget *widget, if (priv->parent != NULL) { - g_warning ("Can't set a parent on widget which has a parent\n"); + g_warning ("Can't set a parent on widget which has a parent"); return; } if (_gtk_widget_is_toplevel (widget)) { - g_warning ("Can't set a parent on a toplevel widget\n"); + g_warning ("Can't set a parent on a toplevel widget"); return; } diff --git a/gtk/gtkwin32.c b/gtk/gtkwin32.c index 4f1598ea0e..bf707ad743 100644 --- a/gtk/gtkwin32.c +++ b/gtk/gtkwin32.c @@ -120,7 +120,7 @@ _gtk_load_dll_with_libgtk3_manifest (const gchar *dll_name) if (activation_ctx_handle == INVALID_HANDLE_VALUE && error_code != ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET) - g_warning ("Failed to CreateActCtx for module %p, resource %p: %lu\n", + g_warning ("Failed to CreateActCtx for module %p, resource %p: %lu", gtk_dll, resource_name, GetLastError ()); else if (error_code != ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET) { @@ -128,12 +128,12 @@ _gtk_load_dll_with_libgtk3_manifest (const gchar *dll_name) activated = ActivateActCtx (activation_ctx_handle, &activation_cookie); if (!activated) - g_warning ("Failed to ActivateActCtx: %lu\n", GetLastError ()); + g_warning ("Failed to ActivateActCtx: %lu", GetLastError ()); LoadLibraryA (dll_name); if (activated && !DeactivateActCtx (0, activation_cookie)) - g_warning ("Failed to DeactivateActCtx: %lu\n", GetLastError ()); + g_warning ("Failed to DeactivateActCtx: %lu", GetLastError ()); ReleaseActCtx (activation_ctx_handle); } diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index a5b9a27e28..9347eb2fcf 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1404,7 +1404,7 @@ gtk_window_titlebar_action (GtkWindow *window, gtk_window_do_popup (window, (GdkEventButton*) event); else { - g_warning ("Unsupported titlebar action %s\n", action); + g_warning ("Unsupported titlebar action %s", action); retval = FALSE; } @@ -2395,7 +2395,7 @@ gtk_window_set_wmclass (GtkWindow *window, priv->wmclass_class = g_strdup (wmclass_class); if (_gtk_widget_get_realized (GTK_WIDGET (window))) - g_warning ("gtk_window_set_wmclass: shouldn't set wmclass after window is realized!\n"); + g_warning ("gtk_window_set_wmclass: shouldn't set wmclass after window is realized!"); } /** @@ -9462,7 +9462,7 @@ gtk_window_move_resize (GtkWindow *window) "size_changed: %d pos_changed: %d hints_changed: %d\n" "configure_notify_received: %d\n" "configure_request_count: %d\n" - "position_constraints_changed: %d\n", + "position_constraints_changed: %d", priv->title ? priv->title : "(no title)", info->last.configure_request.x, info->last.configure_request.y, @@ -11268,7 +11268,7 @@ gtk_window_activate_menubar (GtkWindow *window, if (keyval == 0) { - g_warning ("Failed to parse menu bar accelerator '%s'\n", accel); + g_warning ("Failed to parse menu bar accelerator '%s'", accel); g_free (accel); return FALSE; } |