diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-01-25 11:59:32 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-01-25 11:59:32 +0000 |
commit | 5563da141e1fd0474f1eeedb967209c55227abae (patch) | |
tree | 79edb6566aecd22050117f9728b17e40156fd093 /src/trg-json-widgets.c | |
parent | 4d57ef2197461c450aaaf79cdbb31b256ae0e81e (diff) |
issue 175. make some (incomplete) changes as per the GTK+ best practices document - mainly using a pointer in the public class to access the private object (on a few important classes for now) for performance, and don't use C99 (C99 comments or mixed declarations/statements).
Diffstat (limited to 'src/trg-json-widgets.c')
-rw-r--r-- | src/trg-json-widgets.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/trg-json-widgets.c b/src/trg-json-widgets.c index 49e8ded..5f6fb1e 100644 --- a/src/trg-json-widgets.c +++ b/src/trg-json-widgets.c @@ -117,8 +117,9 @@ GtkWidget *trg_json_widget_entry_new(GList ** wl, JsonObject * obj, return w; } -void trg_json_widget_time_save(GtkWidget * widget, JsonObject * obj, - gchar * key) +void +trg_json_widget_time_save(GtkWidget * widget, JsonObject * obj, + gchar * key) { json_object_set_double_member(obj, key, @@ -155,23 +156,26 @@ GtkWidget *trg_json_widget_spin_new(GList ** wl, JsonObject * obj, return w; } -void trg_json_widget_check_save(GtkWidget * widget, JsonObject * obj, - gchar * key) +void +trg_json_widget_check_save(GtkWidget * widget, JsonObject * obj, + gchar * key) { gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); json_object_set_boolean_member(obj, key, active); } -void trg_json_widget_entry_save(GtkWidget * widget, JsonObject * obj, - gchar * key) +void +trg_json_widget_entry_save(GtkWidget * widget, JsonObject * obj, + gchar * key) { json_object_set_string_member(obj, key, gtk_entry_get_text(GTK_ENTRY(widget))); } -void trg_json_widget_spin_save_double(GtkWidget * widget, JsonObject * obj, - gchar * key) +void +trg_json_widget_spin_save_double(GtkWidget * widget, JsonObject * obj, + gchar * key) { json_object_set_double_member(obj, key, gtk_spin_button_get_value(GTK_SPIN_BUTTON |