[beast: 38/43] GXK: use Bse::warning() for runtime warnings
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 38/43] GXK: use Bse::warning() for runtime warnings
- Date: Mon, 26 Jun 2017 23:30:29 +0000 (UTC)
commit 4885625ced91cef14f87086bc5d0325e3ca4f459
Author: Tim Janik <timj gnu org>
Date: Mon Jun 26 02:08:25 2017 +0200
GXK: use Bse::warning() for runtime warnings
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/gxk/glewidgets.c | 4 ++++
beast-gtk/gxk/gxkaction.cc | 2 +-
beast-gtk/gxk/gxkassortment.cc | 2 +-
beast-gtk/gxk/gxkcanvas.cc | 4 ++--
beast-gtk/gxk/gxkimagecache.cc | 2 +-
beast-gtk/gxk/gxkparam.cc | 2 +-
beast-gtk/gxk/gxkradget.cc | 25 ++++++++++++++-----------
beast-gtk/gxk/gxksimplelabel.cc | 4 ++--
beast-gtk/gxk/gxkstock.cc | 2 +-
beast-gtk/gxk/gxkutils.cc | 14 +++++---------
10 files changed, 32 insertions(+), 29 deletions(-)
---
diff --git a/beast-gtk/gxk/glewidgets.c b/beast-gtk/gxk/glewidgets.c
index 86ce133..75b9a92 100644
--- a/beast-gtk/gxk/glewidgets.c
+++ b/beast-gtk/gxk/glewidgets.c
@@ -2115,3 +2115,7 @@ gtk_vwrap_box_size_allocate (GtkWidget *widget,
layout_cols (wbox, &area);
}
+
+/* --- generated marshallers --- */
+#include "gxkmarshal.h"
+#include "gxkmarshal.cc"
diff --git a/beast-gtk/gxk/gxkaction.cc b/beast-gtk/gxk/gxkaction.cc
index e38ab51..79d8c2d 100644
--- a/beast-gtk/gxk/gxkaction.cc
+++ b/beast-gtk/gxk/gxkaction.cc
@@ -869,7 +869,7 @@ gxk_window_remove_action_client (GtkWindow *window,
last = slist;
slist = last->next;
}
- g_warning ("failed to remove action client (%p) from GtkWindow (%p)", client_data, window);
+ Bse::warning ("failed to remove action client (%p) from GtkWindow (%p)", client_data, window);
}
/* --- action group --- */
diff --git a/beast-gtk/gxk/gxkassortment.cc b/beast-gtk/gxk/gxkassortment.cc
index 462f1df..c666b66 100644
--- a/beast-gtk/gxk/gxkassortment.cc
+++ b/beast-gtk/gxk/gxkassortment.cc
@@ -484,7 +484,7 @@ gxk_window_remove_assortment_client (GtkWindow *window,
last = slist;
slist = last->next;
}
- g_warning ("failed to remove assortment client (%p) from GtkWindow (%p)", client_data, window);
+ Bse::warning ("failed to remove assortment client (%p) from GtkWindow (%p)", client_data, window);
}
/* --- menus --- */
diff --git a/beast-gtk/gxk/gxkcanvas.cc b/beast-gtk/gxk/gxkcanvas.cc
index 3680083..030490c 100644
--- a/beast-gtk/gxk/gxkcanvas.cc
+++ b/beast-gtk/gxk/gxkcanvas.cc
@@ -124,7 +124,7 @@ gnome_canvas_item_keep_between (GnomeCanvasItem *between,
gnome_canvas_item_lower (between, z - n);
}
else
- g_warning ("gnome_canvas_item_keep_between() called for non-siblings");
+ Bse::warning ("gnome_canvas_item_keep_between() called for non-siblings");
}
}
@@ -153,7 +153,7 @@ gnome_canvas_item_keep_above (GnomeCanvasItem *above,
gnome_canvas_item_lower (above, z - n);
}
else
- g_warning ("gnome_canvas_item_keep_above() called for non-siblings");
+ Bse::warning ("gnome_canvas_item_keep_above() called for non-siblings");
}
}
diff --git a/beast-gtk/gxk/gxkimagecache.cc b/beast-gtk/gxk/gxkimagecache.cc
index b701260..6d1c20c 100644
--- a/beast-gtk/gxk/gxkimagecache.cc
+++ b/beast-gtk/gxk/gxkimagecache.cc
@@ -180,5 +180,5 @@ gxk_image_cache_unuse_pixmap (GdkPixmap *pixmap)
return;
}
}
- g_warning ("%s: no such pixmap: %p", __func__, pixmap);
+ Bse::warning ("%s: no such pixmap: %p", __func__, pixmap);
}
diff --git a/beast-gtk/gxk/gxkparam.cc b/beast-gtk/gxk/gxkparam.cc
index 1e1b5f3..fff2677 100644
--- a/beast-gtk/gxk/gxkparam.cc
+++ b/beast-gtk/gxk/gxkparam.cc
@@ -201,7 +201,7 @@ gxk_param_apply_value (GxkParam *param)
assert_return (GXK_IS_PARAM (param));
if (param->updating)
{
- g_warning ("%s: param (%p) currently in update", __func__, param);
+ Bse::warning ("%s: param (%p) currently in update", __func__, param);
return;
}
if (param->binding->set_value && param->editable && param->sensitive)
diff --git a/beast-gtk/gxk/gxkradget.cc b/beast-gtk/gxk/gxkradget.cc
index f7b610f..419ac1c 100644
--- a/beast-gtk/gxk/gxkradget.cc
+++ b/beast-gtk/gxk/gxkradget.cc
@@ -158,7 +158,7 @@ clone_list_find (CloneList *clist,
for (i = 0; i < clist->n_clones; i++)
if (clist->clones[i].source == source)
return clist->clones[i].clone;
- g_warning ("failed to find clone for %p", source);
+ Bse::warning ("failed to find clone for %p", source);
return NULL;
}
@@ -941,7 +941,7 @@ gxk_radget_parse (const gchar *domain_name,
close (fd);
if (myerror)
{
- g_warning ("GxkRadget: parsing error in \"%s\": %s", file_name, myerror->message);
+ Bse::warning ("GxkRadget: parsing error in \"%s\": %s", file_name, myerror->message);
g_error_free (myerror);
}
}
@@ -976,7 +976,7 @@ gxk_radget_parse_text (const gchar *domain_name,
radget_parser (domain, i18n_domain, -1, text, text_len < 0 ? strlen (text) : text_len, error ? error :
&myerror);
if (myerror)
{
- g_warning ("GxkRadget: parsing error: %s", myerror->message);
+ Bse::warning ("GxkRadget: parsing error: %s", myerror->message);
g_error_free (myerror);
}
}
@@ -1209,7 +1209,10 @@ radget_create_from_node (Node *node,
env->name = node->name;
/* retrive type info */
if (!gxk_radget_type_lookup (node->type, &tinfo))
- g_error ("invalid radget type: %s", g_type_name (node->type));
+ {
+ Bse::warning ("invalid radget type: %s", g_type_name (node->type));
+ return NULL;
+ }
/* precedence for property value lookups:
* - all node ancestry args
* - expanded call_args
@@ -1464,8 +1467,8 @@ radget_creator (GxkRadget *radget,
call_args = node_expand_call_args (node, user_args, &env);
n_pops++, node->call_stack = g_slist_prepend (node->call_stack, call_args);
if (radget && !g_type_is_a (G_OBJECT_TYPE (radget), node->type))
- g_warning ("GxkRadget: radget domain \"%s\": radget `%s' differs from defined type: %s",
- domain_name, G_OBJECT_TYPE_NAME (radget), node->name);
+ Bse::warning ("GxkRadget: radget domain \"%s\": radget `%s' differs from defined type: %s",
+ domain_name, G_OBJECT_TYPE_NAME (radget), node->name);
else
{
radget = radget_create_from_node (node, radget, &env, &error);
@@ -1481,14 +1484,14 @@ radget_creator (GxkRadget *radget,
gxk_radget_free_args (call_args);
env_clear (&env);
if (error)
- g_warning ("GxkRadget: while constructing radget \"%s\": %s", node->name, error->message);
+ Bse::warning ("GxkRadget: while constructing radget \"%s\": %s", node->name, error->message);
g_clear_error (&error);
}
else
- g_warning ("GxkRadget: radget domain \"%s\": no such node: %s", domain_name, name);
+ Bse::warning ("GxkRadget: radget domain \"%s\": no such node: %s", domain_name, name);
}
else
- g_warning ("GxkRadget: no such radget domain: %s", domain_name);
+ Bse::warning ("GxkRadget: no such radget domain: %s", domain_name);
return radget;
}
@@ -1824,7 +1827,7 @@ gxk_radget_add (GxkRadget *radget,
if (GTK_IS_CONTAINER (radget))
gtk_container_add ((GtkContainer*) radget, (GtkWidget*) widget);
else
- g_error ("GxkRadget: failed to find area \"%s\"", area);
+ Bse::warning ("GxkRadget: failed to find area \"%s\"", area);
}
@@ -1843,7 +1846,7 @@ radget_define_type (GType type,
i18n_domain, NULL, NULL, NULL, &error);
g_datalist_set_data (&standard_domain->nodes, name, node);
if (error)
- g_error ("while registering standard radgets: %s", error->message);
+ Bse::warning ("while registering standard radgets: %s", error->message);
}
void
diff --git a/beast-gtk/gxk/gxksimplelabel.cc b/beast-gtk/gxk/gxksimplelabel.cc
index ec14467..6de5dfd 100644
--- a/beast-gtk/gxk/gxksimplelabel.cc
+++ b/beast-gtk/gxk/gxksimplelabel.cc
@@ -301,7 +301,7 @@ simple_label_mnemonic_activate (GtkWidget *widget,
}
/* barf if there was nothing to activate */
- g_warning ("Couldn't find a target for a mnemonic activation.");
+ Bse::warning ("Couldn't find a target for a mnemonic activation.");
gdk_display_beep (gtk_widget_get_display (widget));
return FALSE;
}
@@ -446,7 +446,7 @@ simple_label_set_uline_text_internal (GxkSimpleLabel *self,
gunichar c = g_utf8_get_char (src);
if (c == (gunichar) -1)
{
- g_warning ("Invalid input string");
+ Bse::warning ("Invalid input string");
g_free (new_str);
g_free (pattern);
return;
diff --git a/beast-gtk/gxk/gxkstock.cc b/beast-gtk/gxk/gxkstock.cc
index 51f7623..5c07fd3 100644
--- a/beast-gtk/gxk/gxkstock.cc
+++ b/beast-gtk/gxk/gxkstock.cc
@@ -363,7 +363,7 @@ gxk_stock_icon_window (const gchar *stock_id)
pixbuf = gxk_stock_fallback_pixbuf (stock_id);
if (!pixbuf)
{
- g_warning ("%s: unregistered stock id: \"%s\"", G_STRLOC, stock_id);
+ Bse::warning ("%s: unregistered stock id: \"%s\"", G_STRLOC, stock_id);
return NULL;
}
diff --git a/beast-gtk/gxk/gxkutils.cc b/beast-gtk/gxk/gxkutils.cc
index 82f59b8..b7591f9 100644
--- a/beast-gtk/gxk/gxkutils.cc
+++ b/beast-gtk/gxk/gxkutils.cc
@@ -9,10 +9,6 @@
#include <stdlib.h>
-/* --- generated marshallers --- */
-#include "gxkmarshal.cc"
-
-
/* --- generated type IDs and enums --- */
#include "gxkgentypes.cc"
@@ -159,7 +155,7 @@ gxk_type_register_generated (guint n_entries,
type_id = g_flags_register_static (entries[i].type_name, (const GFlagsValue*) entries[i].type_data);
break;
default:
- g_warning ("%s: unsupported parent type `%s'", G_STRLOC, g_type_name (entries[i].parent));
+ Bse::warning ("%s: unsupported parent type `%s'", G_STRLOC, g_type_name (entries[i].parent));
type_id = 0;
break;
}
@@ -2473,7 +2469,7 @@ gxk_signal_handler_exists (gpointer instance,
return TRUE;
}
else
- g_warning ("%s: signal name \"%s\" is invalid for instance `%p'", G_STRLOC, detailed_signal, instance);
+ Bse::warning ("%s: signal name \"%s\" is invalid for instance `%p'", G_STRLOC, detailed_signal,
instance);
return FALSE;
}
@@ -2518,7 +2514,7 @@ gxk_signal_handler_pending (gpointer instance,
return TRUE;
}
else
- g_warning ("%s: signal name \"%s\" is invalid for instance `%p'", G_STRLOC, detailed_signal, instance);
+ Bse::warning ("%s: signal name \"%s\" is invalid for instance `%p'", G_STRLOC, detailed_signal,
instance);
return FALSE;
}
@@ -3178,7 +3174,7 @@ gxk_label_set_attributes (GtkLabel *label,
attr = pango_attr_scale_new (va_arg (args, gdouble));
break;
default:
- g_warning ("%s: invalid PangoAttribute type %d", __func__, attr_type);
+ Bse::warning ("%s: invalid PangoAttribute type %d", __func__, attr_type);
case -1:
case PANGO_ATTR_INVALID:
attr = NULL;
@@ -3943,7 +3939,7 @@ gxk_zfile_uncompress (guint uncompressed_size,
break;
}
if (err)
- g_error ("while decompressing (%p, %u): %s", cdata, cdata_size, err);
+ Bse::warning ("while decompressing (%p, %u): %s", cdata, cdata_size, err);
text[dlen] = 0;
return (char*) text;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]