Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Wed, 03 Jun 2015 12:43:39 UTC Commit: 94389788da4c332776c4d37ab024257bd4f0146a https://github.com/geany/geany/commit/94389788da4c332776c4d37ab024257bd4f014...
Log Message: ----------- stash: Fix sync to object property
Modified Paths: -------------- src/stash.c
Modified: src/stash.c 14 lines changed, 13 insertions(+), 1 deletions(-) =================================================================== @@ -678,7 +678,19 @@ static void handle_widget_property(GtkWidget *widget, StashPref *entry, switch (action) { case PREF_DISPLAY: - g_object_set(object, name, entry->setting, NULL); + if (entry->setting_type == G_TYPE_BOOLEAN) + g_object_set(object, name, *(gboolean*)entry->setting, NULL); + else if (entry->setting_type == G_TYPE_INT) + g_object_set(object, name, *(gint*)entry->setting, NULL); + else if (entry->setting_type == G_TYPE_STRING) + g_object_set(object, name, *(gchararray*)entry->setting, NULL); + else if (entry->setting_type == G_TYPE_STRV) + g_object_set(object, name, *(gchararray**)entry->setting, NULL); + else + { + g_warning("Unhandled type %s for %s in %s()!", g_type_name(entry->setting_type), + entry->key_name, G_STRFUNC); + } break; case PREF_UPDATE: if (entry->setting_type == G_TYPE_STRING)
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).