mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Fix problem where signals with "_" in them appeared twice in the result
Sun Oct 29 02:31:03 2000 Owen Taylor <otaylor@redhat.com> * gsignal.c (g_type_signals): Fix problem where signals with "_" in them appeared twice in the result array.
This commit is contained in:
parent
300e3bb247
commit
fbe5df779c
@ -1,3 +1,8 @@
|
|||||||
|
Sun Oct 29 02:31:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gsignal.c (g_type_signals): Fix problem where signals
|
||||||
|
with "_" in them appeared twice in the result array.
|
||||||
|
|
||||||
Sun Oct 29 01:58:44 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Oct 29 01:58:44 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gsignal.h: Add g_type_signals() - a function to list
|
* gsignal.h: Add g_type_signals() - a function to list
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
* this code is based on the original GtkSignal implementation
|
* this code is based on the original GtkSignal implementation
|
||||||
* for the Gtk+ library by Peter Mattis <petm@xcf.berkeley.edu>
|
* for the Gtk+ library by Peter Mattis <petm@xcf.berkeley.edu>
|
||||||
*/
|
*/
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "gsignal.h"
|
#include "gsignal.h"
|
||||||
|
|
||||||
#include "gbsearcharray.h"
|
#include "gbsearcharray.h"
|
||||||
@ -718,8 +720,15 @@ g_type_signals (GType itype,
|
|||||||
for (i = 0; i < n_nodes; i++)
|
for (i = 0; i < n_nodes; i++)
|
||||||
{
|
{
|
||||||
if (keys[i].itype == itype)
|
if (keys[i].itype == itype)
|
||||||
|
{
|
||||||
|
gchar *name = g_quark_to_string (keys[i].quark);
|
||||||
|
/* Signal names with "_" in them are aliases to the same
|
||||||
|
* name with "-" instead of "_".
|
||||||
|
*/
|
||||||
|
if (!strchr (name, '_'))
|
||||||
g_array_append_val (result, keys[i].signal_id);
|
g_array_append_val (result, keys[i].signal_id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*n_ids = result->len;
|
*n_ids = result->len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user