Commit bbd94b5a authored by Matthias Clasen's avatar Matthias Clasen

gtk: Strip newlines from g_warning and g_error

g_logv adds one for us already.
parent 72b40266
......@@ -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;
}
......
......@@ -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)));
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
}
......
......@@ -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;
}
......
......@@ -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");
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
}
}
......
......@@ -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;
}
......
......@@ -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;
}
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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]));
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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");
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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);
}
......
......@@ -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;
}
......
......@@ -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;
}
}
......
......@@ -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
......
......@@ -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);
}
}
......
......@@ -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;
}
......
......@@ -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.");
}
/**
......
......@@ -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]));
......
......@@ -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;
}
......
......@@ -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);
}
......
......@@ -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)",