Changeset 88eaf4b


Ignore:
Timestamp:
2010-06-06T01:24:13Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
16834a5
Parents:
1f0224c
Message:

buddy_sendbuffer should be renamed, since it has to work for users and
chats. For smooth transitions, add an old_key attribute to settings
which can be used as a (temporary) alias.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r1f0224c r88eaf4b  
    9999       
    100100        s = set_add( &b->set, "away_devoice", "true", NULL/*set_eval_away_devoice*/, irc );
    101         s = set_add( &b->set, "buddy_sendbuffer", "false", set_eval_bool, irc );
    102         s = set_add( &b->set, "buddy_sendbuffer_delay", "200", set_eval_int, irc );
    103101        s = set_add( &b->set, "charset", "utf-8", set_eval_charset, irc );
    104102        //s = set_add( &b->set, "control_channel", irc->channel, NULL/*set_eval_control_channel*/, irc );
     
    109107        s = set_add( &b->set, "lcnicks", "true", set_eval_bool, irc );
    110108        s = set_add( &b->set, "ops", "both", NULL/*set_eval_ops*/, irc );
     109        s = set_add( &b->set, "paste_buffer", "false", set_eval_bool, irc );
     110        s->old_key = g_strdup( "buddy_sendbuffer" );
     111        s = set_add( &b->set, "paste_buffer_delay", "200", set_eval_int, irc );
     112        s->old_key = g_strdup( "buddy_sendbuffer_delay" );
    111113        s = set_add( &b->set, "private", "true", set_eval_bool, irc );
    112114        s = set_add( &b->set, "query_order", "lifo", NULL, irc );
  • set.c

    r1f0224c r88eaf4b  
    6969        while( s )
    7070        {
    71                 if( g_strcasecmp( s->key, key ) == 0 )
     71                if( g_strcasecmp( s->key, key ) == 0 ||
     72                    ( s->old_key && g_strcasecmp( s->old_key, key ) == 0 ) )
    7273                        break;
    7374                s = s->next;
     
    176177               
    177178                g_free( s->key );
    178                 if( s->value ) g_free( s->value );
    179                 if( s->def ) g_free( s->def );
     179                g_free( s->old_key );
     180                g_free( s->value );
     181                g_free( s->def );
    180182                g_free( s );
    181183        }
  • set.h

    r1f0224c r88eaf4b  
    5454       
    5555        char *key;
     56        char *old_key;  /* Previously known as; for smooth upgrades. */
    5657        char *value;
    5758        char *def;      /* Default value. If the set_setstr() function
Note: See TracChangeset for help on using the changeset viewer.