comparison lwlib/lwlib.c @ 450:98528da0b7fc r21-2-40

Import from CVS: tag r21-2-40
author cvs
date Mon, 13 Aug 2007 11:39:20 +0200
parents abe6d1db359e
children 4b7d425dd3c2
comparison
equal deleted inserted replaced
449:c83749d23eb5 450:98528da0b7fc
260 else if (new->args && old->args && new->args != old->args) 260 else if (new->args && old->args && new->args != old->args)
261 { 261 {
262 /* #### Do something more sensible here than just copying the 262 /* #### Do something more sensible here than just copying the
263 new values (like actually merging the values). */ 263 new values (like actually merging the values). */
264 lw_copy_widget_value_args (new, old); 264 lw_copy_widget_value_args (new, old);
265 changed = True;
266 }
267 else if (new->args && new->args == old->args && new->args->args_changed == True)
268 {
265 changed = True; 269 changed = True;
266 } 270 }
267 271
268 return changed; 272 return changed;
269 } 273 }
754 758
755 for (instance = info->instances; instance; instance = instance->next) 759 for (instance = info->instances; instance; instance = instance->next)
756 update_one_widget_instance (instance, deep_p); 760 update_one_widget_instance (instance, deep_p);
757 761
758 for (val = info->val; val; val = val->next) 762 for (val = info->val; val; val = val->next)
759 val->change = NO_CHANGE; 763 {
764 val->change = NO_CHANGE;
765 if (val->args)
766 val->args->args_changed = False;
767 }
760 } 768 }
761 769
762 void 770 void
763 lw_modify_all_widgets (LWLIB_ID id, widget_value *val, Boolean deep_p) 771 lw_modify_all_widgets (LWLIB_ID id, widget_value *val, Boolean deep_p)
764 { 772 {
819 val->change = STRUCTURAL_CHANGE; 827 val->change = STRUCTURAL_CHANGE;
820 828
821 update_one_widget_instance (instance, True); 829 update_one_widget_instance (instance, True);
822 830
823 for (val = instance->info->val; val; val = val->next) 831 for (val = instance->info->val; val; val = val->next)
824 val->change = NO_CHANGE; 832 {
833 val->change = NO_CHANGE;
834 if (val->args)
835 val->args->args_changed = False;
836 }
825 } 837 }
826 838
827 /* strcasecmp() is not sufficiently portable or standard, 839 /* strcasecmp() is not sufficiently portable or standard,
828 and it's easier just to write our own. */ 840 and it's easier just to write our own. */
829 static int 841 static int
839 if (c1 == '\0') return 0; 851 if (c1 == '\0') return 0;
840 } 852 }
841 } 853 }
842 854
843 static widget_creation_function 855 static widget_creation_function
844 find_in_table (const char *type, widget_creation_entry *table) 856 find_in_table (const char *type, const widget_creation_entry table[])
845 { 857 {
846 widget_creation_entry *cur; 858 const widget_creation_entry *cur;
847 for (cur = table; cur->type; cur++) 859 for (cur = table; cur->type; cur++)
848 if (!ascii_strcasecmp (type, cur->type)) 860 if (!ascii_strcasecmp (type, cur->type))
849 return cur->function; 861 return cur->function;
850 return NULL; 862 return NULL;
851 } 863 }
1391 } 1403 }
1392 1404
1393 if (wv->args->nargs > 10) 1405 if (wv->args->nargs > 10)
1394 return; 1406 return;
1395 1407
1408 /* Register the change. */
1409 wv->args->args_changed = True;
1396 /* If the arg is already there then we must replace it. */ 1410 /* If the arg is already there then we must replace it. */
1397 for (i = 0; i < wv->args->nargs; i++) 1411 for (i = 0; i < wv->args->nargs; i++)
1398 { 1412 {
1399 if (!strcmp (wv->args->args[i].name, name)) 1413 if (!strcmp (wv->args->args[i].name, name))
1400 { 1414 {