Date:2012-05-28 07:53:01 (11 years 10 months ago)
Author:Werner Almesberger
Commit:326a480b6339fe0684c5fa744cbdd3746026c166
Message:gui_frame.c: display a question mark before variables used as key

Files: gui_frame.c (5 diffs)

Change Details

gui_frame.c
220220static GtkWidget *popup_single_var_widget;
221221
222222
223
224223static void add_row_here(struct table *table, struct row **anchor)
225224{
226225    struct row *row;
...... 
801800    struct table *table)
802801{
803802    GtkWidget *hbox, *field;
804    char *expr;
803    char *name, *expr;
805804
806805    if (!table->vars || table->vars->next)
807806        return;
...... 
811810    hbox = gtk_hbox_new(FALSE, 0);
812811    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
813812
814    field = label_in_box_new(table->vars->name,
815        "Variable name. Click to edit.");
813    name = stralloc_printf("%s%s", table->vars->key ? "?" : "",
814        table->vars->name);
815    field = label_in_box_new(name, "Variable name. Click to edit.");
816    free(name);
817
816818    gtk_box_pack_start(GTK_BOX(hbox), box_of_label(field), FALSE, FALSE, 0);
817819    label_in_box_bg(field, COLOR_VAR_PASSIVE);
818820    table->vars->widget = field;
...... 
988990    struct value *value;
989991    int n_vars = 0, n_rows = 0;
990992    int n_var, n_row, pos;
991    char *expr;
993    char *name, *expr;
992994    GdkColor color;
993995
994996    for (var = table->vars; var; var = var->next)
...... 
10221024            gtk_table_set_col_spacings(GTK_TABLE(tab), 1);
10231025        }
10241026
1025        field = label_in_box_new(var->name,
1027        name = stralloc_printf("%s%s", var->key ? "?" : "", var->name);
1028        field = label_in_box_new(name,
10261029            "Variable (column) name. Click to edit.");
1030        free(name);
1031
10271032        gtk_table_attach_defaults(GTK_TABLE(tab), box_of_label(field),
10281033            n_vars, n_vars+1, 0, 1);
10291034        label_in_box_bg(field, COLOR_VAR_PASSIVE);

Archive Download the corresponding diff file

Branches:
master



interactive