mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Warn if you try to add a tool item to a toolbar using the deprecated API.
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtktoolbar.c (internal_insert_element): Warn if you try to add a tool item to a toolbar using the deprecated API.
This commit is contained in:
parent
d0a5b4e0c8
commit
92295447cb
@ -1,3 +1,8 @@
|
||||
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
|
||||
add a tool item to a toolbar using the deprecated API.
|
||||
|
||||
Fri Jul 23 13:04:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
|
||||
add a tool item to a toolbar using the deprecated API.
|
||||
|
||||
Fri Jul 23 13:04:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
|
||||
add a tool item to a toolbar using the deprecated API.
|
||||
|
||||
Fri Jul 23 13:04:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
|
||||
add a tool item to a toolbar using the deprecated API.
|
||||
|
||||
Fri Jul 23 13:04:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
|
||||
|
@ -72,6 +72,10 @@ typedef struct _ToolbarContent ToolbarContent;
|
||||
*/
|
||||
#define SLIDE_SPEED 600 /* How fast the items slide, in pixels per second */
|
||||
|
||||
#define MIXED_API_WARNING \
|
||||
"Mixing deprecated and non-deprecated GtkToolbar API is not allowed"
|
||||
|
||||
|
||||
/* Properties */
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -3595,6 +3599,8 @@ internal_insert_element (GtkToolbar *toolbar,
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
else if (type != GTK_TOOLBAR_CHILD_RADIOBUTTON)
|
||||
g_return_val_if_fail (widget == NULL, NULL);
|
||||
if (GTK_IS_TOOL_ITEM (widget))
|
||||
g_warning (MIXED_API_WARNING);
|
||||
|
||||
if (!gtk_toolbar_check_old_api (toolbar))
|
||||
return NULL;
|
||||
@ -4586,9 +4592,6 @@ get_shadow_type (GtkToolbar *toolbar)
|
||||
/*
|
||||
* API checks
|
||||
*/
|
||||
#define mixed_api_warning \
|
||||
"mixing deprecated and non-deprecated GtkToolbar API is not allowed"
|
||||
|
||||
static gboolean
|
||||
gtk_toolbar_check_old_api (GtkToolbar *toolbar)
|
||||
{
|
||||
@ -4596,7 +4599,7 @@ gtk_toolbar_check_old_api (GtkToolbar *toolbar)
|
||||
|
||||
if (priv->api_mode == NEW_API)
|
||||
{
|
||||
g_warning (mixed_api_warning);
|
||||
g_warning (MIXED_API_WARNING);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -4611,7 +4614,7 @@ gtk_toolbar_check_new_api (GtkToolbar *toolbar)
|
||||
|
||||
if (priv->api_mode == OLD_API)
|
||||
{
|
||||
g_warning (mixed_api_warning);
|
||||
g_warning (MIXED_API_WARNING);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user