From dfc592686d277ca9d4cccecf2f63aa3eac9c3da9 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 13 Nov 2019 15:01:00 -0300 Subject: [PATCH] Fixing property names. --- src/terminal/charset.c | 1 + src/terminal/drawing/oia.c | 1 - src/terminal/font/properties.c | 2 ++ src/terminal/properties/init.c | 8 +++----- src/terminal/toggles.c | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/terminal/charset.c b/src/terminal/charset.c index f19da06..90b2c26 100644 --- a/src/terminal/charset.c +++ b/src/terminal/charset.c @@ -337,6 +337,7 @@ g_free(cfg.host); g_free(cfg.display); + debug("%s=%p",__FUNCTION__,GTK_V3270_GET_CLASS(widget)->properties.remap_file); g_object_notify_by_pspec(G_OBJECT(widget), GTK_V3270_GET_CLASS(widget)->properties.remap_file); } diff --git a/src/terminal/drawing/oia.c b/src/terminal/drawing/oia.c index 17fc8a0..fd7674d 100644 --- a/src/terminal/drawing/oia.c +++ b/src/terminal/drawing/oia.c @@ -713,7 +713,6 @@ gboolean v3270_update_associated_lu(v3270 *terminal) v3270_queue_draw_area(GTK_WIDGET(terminal),rect->x,rect->y,rect->width,rect->height); } - debug("%s(%p)",__FUNCTION__,GTK_V3270_GET_CLASS(terminal)->properties.associated_lu); g_object_notify_by_pspec(G_OBJECT(terminal), GTK_V3270_GET_CLASS(terminal)->properties.associated_lu); return FALSE; diff --git a/src/terminal/font/properties.c b/src/terminal/font/properties.c index 590f593..8b216c8 100644 --- a/src/terminal/font/properties.c +++ b/src/terminal/font/properties.c @@ -64,6 +64,8 @@ LIB3270_EXPORT void v3270_set_font_family(GtkWidget *widget, const gchar *name) terminal->font.weight = lib3270_get_toggle(terminal->host,LIB3270_TOGGLE_BOLD) ? CAIRO_FONT_WEIGHT_BOLD : CAIRO_FONT_WEIGHT_NORMAL; g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_UPDATE_CONFIG], 0, "font-family", name); + + debug("%s: %p",__FUNCTION__,GTK_V3270_GET_CLASS(widget)->properties.font_family); g_object_notify_by_pspec(G_OBJECT(widget), GTK_V3270_GET_CLASS(widget)->properties.font_family); if(gtk_widget_get_realized(widget) && gtk_widget_get_has_window(widget)) diff --git a/src/terminal/properties/init.c b/src/terminal/properties/init.c index 239aa81..8d60f6e 100644 --- a/src/terminal/properties/init.c +++ b/src/terminal/properties/init.c @@ -41,22 +41,20 @@ GParamSpec **prop; } properties[] = { { "connected", &klass->properties.online }, - { "associated_lu", &klass->properties.associated_lu }, + { "associated-lu", &klass->properties.associated_lu }, { "url", &klass->properties.url }, - { "model_number", &klass->properties.model }, - { "has_selection", &klass->properties.selection }, + { "model-number", &klass->properties.model }, + { "has-selection", &klass->properties.selection }, }; size_t ix; - debug("Property %s=%u",g_param_spec_get_name(pspec),(unsigned int) property_id); g_object_class_install_property(oclass, property_id, pspec); for(ix = 0; ix < G_N_ELEMENTS(properties); ix++) { if(!g_ascii_strcasecmp(properties[ix].name,g_param_spec_get_name(pspec))) { -// debug("Property \"%s\" is special",g_param_spec_get_name(pspec)); *properties[ix].prop = pspec; break; } diff --git a/src/terminal/toggles.c b/src/terminal/toggles.c index 4b48820..a056041 100644 --- a/src/terminal/toggles.c +++ b/src/terminal/toggles.c @@ -118,6 +118,7 @@ void v3270_update_toggle(GtkWidget *widget, LIB3270_TOGGLE_ID id, unsigned char } + debug("%s: pspec=%p",__FUNCTION__,klass->properties.toggle[id]); g_object_notify_by_pspec(G_OBJECT(widget), klass->properties.toggle[id]); g_signal_emit(widget, v3270_widget_signal[V3270_SIGNAL_TOGGLE_CHANGED], 0, (guint) id, (gboolean) (value != 0), (gchar *) name); -- libgit2 0.21.2