Merge branch 'wip/chergert/remove-emit-by-name' into 'master'

texttag: avoid use of g_signal_emit_by_name()

See merge request GNOME/gtk!1088
This commit is contained in:
Timm Bäder 2019-09-08 07:40:55 +00:00
commit c53f58e839
3 changed files with 13 additions and 4 deletions

View File

@ -77,6 +77,7 @@
#include "gtktexttag.h"
#include "gtktexttypes.h"
#include "gtktexttagtable.h"
#include "gtktexttagtableprivate.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
@ -2029,10 +2030,7 @@ gtk_text_tag_changed (GtkTextTag *tag,
* added, this would increase significantly the number of signal connections.
*/
if (priv->table != NULL)
g_signal_emit_by_name (priv->table,
"tag-changed",
tag,
size_changed);
_gtk_text_tag_table_tag_changed (priv->table, tag, size_changed);
}
static int

View File

@ -484,3 +484,11 @@ _gtk_text_tag_table_remove_buffer (GtkTextTagTable *table,
priv->buffers = g_slist_remove (priv->buffers, buffer);
}
void
_gtk_text_tag_table_tag_changed (GtkTextTagTable *table,
GtkTextTag *tag,
gboolean size_changed)
{
g_signal_emit (table, signals[TAG_CHANGED], 0, tag, size_changed);
}

View File

@ -33,6 +33,9 @@ void _gtk_text_tag_table_add_buffer (GtkTextTagTable *table,
gpointer buffer);
void _gtk_text_tag_table_remove_buffer (GtkTextTagTable *table,
gpointer buffer);
void _gtk_text_tag_table_tag_changed (GtkTextTagTable *table,
GtkTextTag *tag,
gboolean size_changed);
G_END_DECLS