~ubuntu-branches/ubuntu/maverick/conglomerate/maverick

« back to all changes in this revision

Viewing changes to src/cong-editor-node-entity-decl.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 05:07:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108050706-bcg60nwqf1z3w0d6
Tags: 0.9.1-1ubuntu1
* Resynchronise with Debian (Closes: #4397).
  - Thanks, Jordan Mantha.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
}
101
101
 
102
102
#if 1
 
103
static GdkColor* 
 
104
theme_cb (CongEditorArea *area,
 
105
          CongDispspecGCUsage usage)
 
106
{
 
107
        switch (usage) {
 
108
        default: g_assert_not_reached ();
 
109
        case CONG_DISPSPEC_GC_USAGE_BOLD_LINE:
 
110
                return cong_eel_rgb_to_gdk_color2 (0x00,
 
111
                                                   0x00,
 
112
                                                   0x00);
 
113
        case CONG_DISPSPEC_GC_USAGE_DIM_LINE:
 
114
                return cong_eel_rgb_to_gdk_color2 (0x00,
 
115
                                                   0x00,
 
116
                                                   0x00);
 
117
        case CONG_DISPSPEC_GC_USAGE_BACKGROUND:
 
118
                return cong_eel_rgb_to_gdk_color2 (0xff,
 
119
                                                   0xff,
 
120
                                                   0xff);
 
121
        case CONG_DISPSPEC_GC_USAGE_TEXT:
 
122
                return cong_eel_rgb_to_gdk_color2 (0x00,
 
123
                                                   0x00,
 
124
                                                   0x00);
 
125
        }
 
126
}
 
127
 
103
128
static void 
104
129
entity_decl_create_areas (CongEditorNode *editor_node,
105
130
                          const CongAreaCreationInfo *creation_info)
106
131
{
107
132
        CongEditorArea *block_area;
108
133
        gchar *title;
109
 
        GdkColor col_bold;
110
 
        GdkColor col_dim;
111
 
        GdkColor col_background;
112
 
        GdkColor col_text;
113
134
 
114
135
        g_return_if_fail (editor_node);
115
136
 
116
137
#if 1
117
 
        title = g_strdup_printf ("Entity declaration: \"%s\"", 
118
 
                                 cong_editor_node_get_node (editor_node)->name);
119
 
 
120
 
        cong_eel_rgb_to_gdk_color (&col_bold,
121
 
                                   0x00,
122
 
                                   0x00,
123
 
                                   0x00);
124
 
        cong_eel_rgb_to_gdk_color (&col_dim,
125
 
                                   0x00,
126
 
                                   0x00,
127
 
                                   0x00);
128
 
        cong_eel_rgb_to_gdk_color (&col_background,
129
 
                                   0xff,
130
 
                                   0xff,
131
 
                                   0xff);
132
 
        cong_eel_rgb_to_gdk_color (&col_text,
133
 
                                   0x00,
134
 
                                   0x00,
135
 
                                   0x00);
136
 
 
137
 
        block_area = cong_editor_area_structural_new (cong_editor_node_get_widget (editor_node),
138
 
                                                      NULL,
139
 
                                                      title,
140
 
                                                      &col_bold,
141
 
                                                      &col_dim,
142
 
                                                      &col_background,
143
 
                                                      &col_text);
144
 
 
145
 
        g_free (title);
 
138
        if (1) {
 
139
                title = g_strdup_printf ("Entity declaration: \"%s\"", 
 
140
                                         cong_editor_node_get_node (editor_node)->name);
 
141
                
 
142
                block_area = cong_editor_area_structural_new (cong_editor_node_get_widget (editor_node),
 
143
                                                              NULL,
 
144
                                                              title,
 
145
                                                              theme_cb);
 
146
                
 
147
                g_free (title);
 
148
        } else {
 
149
        }
146
150
#else
147
151
        block_area = cong_editor_area_entity_decl_new (cong_editor_node_get_widget (editor_node),
148
152
                                                       cong_editor_node_get_node (editor_node)->name);
149
153
#endif
150
154
 
 
155
        cong_editor_area_connect_node_signals (block_area,
 
156
                                               editor_node);
 
157
 
151
158
        cong_editor_node_create_block_area (editor_node,
152
159
                                            creation_info,
153
160
                                            block_area,