~ubuntu-branches/ubuntu/lucid/brasero/lucid-updates

« back to all changes in this revision

Viewing changes to libbrasero-utils/brasero-jacket-buffer.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-06-24 11:22:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100624112246-s5ubbf8tafqkir0m
Tags: 2.30.2-0ubuntu1
* New upstream release
  - Lot's of memleak fixes
  - Fixed a runtime warning related to cancelling tracker searches
  - Crash in brasero_data_project_node_removed at
    brasero-data-project.c:1163
  - brasero crashed with SIGSEGV in brasero_data_project_remove_node()
    (LP: #561319)
  - Fix a few runtime warnings with the Cover Editor
  - Text in cover editor does not show up automatically (LP: #469459)
  - Removed use of deprecated flags
  - Use accessor functions instead direct access (use GSEAL GnomeGoal)
  - Fix a bug in the layout on first start (side pane was hidden and
    remained so until the user moved it)
  - Save printer settings for cover printing
  - Write the contents of the GtkTextBuffer displayed line by displayed
    line which should improve the layout
  - "Write to Disc" button sensitivity regression
  - Fix flaw in mask that led libburn plugin not to work (not to be picked
    up actually) in some circumstances
  - Fails to burn ANY audio project
  - Move columns doesn't work (LP: #581759)
  - Brasero does not correctly handle double clicking on column separators
    (LP: #581885)
  - Bad info when burning, high CPU usage and slow burn
  - Change the priority for cdrdao and raised the one of cdda2wav plugin
  - brasero crashed with SIGSEGV in
    brasero_mmc3_get_performa nce_wrt_spd_desc() (LP: #564766)
  - brasero crashed with SIGSEGV in brasero_scsi_command_issue_sync()
    (LP: #444832)
  - Do not check for symlinks on cdda2wav so the plugin can use icedax.
  - Brasero's failure with some file names (LP: #380643)
  - Pressing create audio cd does nothing
  - Empty project not available
  - can't actually save error logs
  - doesn't handle incorrect temp dirs properly
  - Fix multi DND in GtkFileChooser
  - Displays "starting to record" during whole burn process
  - Fix wrong report of speed with both cdrecord and wodim
  - Disk project doesn't save the disk title (LP: #587924)
  - Brasero reports outdated cdrtools on cdrtools-3.00 (LP: #592075)
  - misc bug fixes
  - Updated Translations
* Removed upstream patches:
  - debian/patches/90_git_audio_project_creation.patch,
    debian/patches/91_git_audio_project_creation.patch,
    debian/patches/92_git_audio_cd_recording.patch,
    debian/patches/93_git_new_caps_function_definition.patch
* debian/patches/99_autoconf.patch:
  - refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
_gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
74
74
                                     GSList            *tags)
75
75
{
76
 
  guint left_margin_accumulative = 0;
77
 
  guint right_margin_accumulative = 0;
78
 
 
79
 
  g_return_if_fail (!dest->realized);
80
 
 
81
 
  for (; tags; tags = tags->next)
82
 
    {
83
 
      GtkTextTag *tag;
84
 
      GtkTextAttributes *vals;
85
 
 
86
 
      tag = tags->data;
87
 
      vals = tag->values;
88
 
 
89
 
      if (tag->bg_color_set)
90
 
        {
91
 
          dest->appearance.bg_color = vals->appearance.bg_color;
92
 
 
93
 
          dest->appearance.draw_bg = TRUE;
94
 
        }
95
 
      if (tag->fg_color_set)
96
 
        dest->appearance.fg_color = vals->appearance.fg_color;
97
 
      
98
 
      if (tag->pg_bg_color_set)
99
 
        {
100
 
          dest->pg_bg_color = gdk_color_copy (vals->pg_bg_color);
101
 
        }
102
 
 
103
 
      if (tag->bg_stipple_set)
104
 
        {
105
 
          g_object_ref (vals->appearance.bg_stipple);
106
 
          if (dest->appearance.bg_stipple)
107
 
            g_object_unref (dest->appearance.bg_stipple);
108
 
          dest->appearance.bg_stipple = vals->appearance.bg_stipple;
109
 
 
110
 
          dest->appearance.draw_bg = TRUE;
111
 
        }
112
 
 
113
 
      if (tag->fg_stipple_set)
114
 
        {
115
 
          g_object_ref (vals->appearance.fg_stipple);
116
 
          if (dest->appearance.fg_stipple)
117
 
            g_object_unref (dest->appearance.fg_stipple);
118
 
          dest->appearance.fg_stipple = vals->appearance.fg_stipple;
119
 
        }
120
 
 
121
 
      if (vals->font)
122
 
        {
123
 
          if (dest->font)
124
 
            pango_font_description_merge (dest->font, vals->font, TRUE);
125
 
          else
126
 
            dest->font = pango_font_description_copy (vals->font);
127
 
        }
128
 
 
129
 
      /* multiply all the scales together to get a composite */
130
 
      if (tag->scale_set)
131
 
        dest->font_scale *= vals->font_scale;
132
 
      
133
 
      if (tag->justification_set)
134
 
        dest->justification = vals->justification;
135
 
 
136
 
      if (vals->direction != GTK_TEXT_DIR_NONE)
137
 
        dest->direction = vals->direction;
138
 
 
139
 
      if (tag->left_margin_set) 
140
 
        {
141
 
          if (tag->accumulative_margin)
142
 
            left_margin_accumulative += vals->left_margin;
143
 
          else
144
 
            dest->left_margin = vals->left_margin;
145
 
        }
146
 
 
147
 
      if (tag->indent_set)
148
 
        dest->indent = vals->indent;
149
 
 
150
 
      if (tag->rise_set)
151
 
        dest->appearance.rise = vals->appearance.rise;
152
 
 
153
 
      if (tag->right_margin_set) 
154
 
        {
155
 
          if (tag->accumulative_margin)
156
 
            right_margin_accumulative += vals->right_margin;
157
 
          else
158
 
            dest->right_margin = vals->right_margin;
159
 
        }
160
 
 
161
 
      if (tag->pixels_above_lines_set)
162
 
        dest->pixels_above_lines = vals->pixels_above_lines;
163
 
 
164
 
      if (tag->pixels_below_lines_set)
165
 
        dest->pixels_below_lines = vals->pixels_below_lines;
166
 
 
167
 
      if (tag->pixels_inside_wrap_set)
168
 
        dest->pixels_inside_wrap = vals->pixels_inside_wrap;
169
 
 
170
 
      if (tag->tabs_set)
171
 
        {
172
 
          if (dest->tabs)
173
 
            pango_tab_array_free (dest->tabs);
174
 
          dest->tabs = pango_tab_array_copy (vals->tabs);
175
 
        }
176
 
 
177
 
      if (tag->wrap_mode_set)
178
 
        dest->wrap_mode = vals->wrap_mode;
179
 
 
180
 
      if (tag->underline_set)
181
 
        dest->appearance.underline = vals->appearance.underline;
182
 
 
183
 
      if (tag->strikethrough_set)
184
 
        dest->appearance.strikethrough = vals->appearance.strikethrough;
185
 
 
186
 
      if (tag->invisible_set)
187
 
        dest->invisible = vals->invisible;
188
 
 
189
 
      if (tag->editable_set)
190
 
        dest->editable = vals->editable;
191
 
 
192
 
      if (tag->bg_full_height_set)
193
 
        dest->bg_full_height = vals->bg_full_height;
194
 
 
195
 
      if (tag->language_set)
196
 
        dest->language = vals->language;
 
76
        guint left_margin_accumulative = 0;
 
77
        guint right_margin_accumulative = 0;
 
78
 
 
79
        g_return_if_fail (!dest->realized);
 
80
 
 
81
        for (; tags; tags = tags->next) {
 
82
                GtkTextTag *tag;
 
83
                gboolean accumulative_margin;
 
84
                gboolean background_set;
 
85
                gboolean fg_color_set;
 
86
                gboolean pg_bg_color_set;
 
87
                gboolean bg_stipple_set;
 
88
                gboolean fg_stipple_set;
 
89
                gboolean scale_set;
 
90
                gboolean left_margin_set;
 
91
                gboolean justification_set;
 
92
                gboolean indent_set;
 
93
                gboolean rise_set;
 
94
                gboolean right_margin_set;
 
95
                gboolean pixels_above_lines_set;
 
96
                gboolean pixels_below_lines_set;
 
97
                gboolean tabs_set;
 
98
                gboolean wrap_mode_set;
 
99
                gboolean pixels_inside_wrap_set;
 
100
                gboolean underline_set;
 
101
                gboolean strikethrough_set;
 
102
                gboolean invisible_set;
 
103
                gboolean editable_set;
 
104
                gboolean bg_full_height_set;
 
105
                gboolean language_set;
 
106
                GtkTextDirection direction;
 
107
                PangoFontDescription *font_desc;
 
108
 
 
109
                tag = tags->data;
 
110
 
 
111
                g_object_get (tag,
 
112
                              "accumulative-margin", &accumulative_margin,
 
113
                              "background-set", &background_set,
 
114
                              "foreground-set", &fg_color_set,
 
115
                              "paragraph-background-set", &pg_bg_color_set,
 
116
                              "background-stipple-set", &bg_stipple_set,
 
117
                              "foreground-stipple-set", &fg_stipple_set,
 
118
                              "scale-set", &scale_set,
 
119
                              "left-margin-set", &left_margin_set,
 
120
                              "justification-set", &justification_set,
 
121
                              "indent-set", &indent_set,
 
122
                              "rise-set", &rise_set,
 
123
                              "right-margin-set", &right_margin_set,
 
124
                              "pixels-above-lines-set", &pixels_above_lines_set,
 
125
                              "pixels-below-lines-set", &pixels_below_lines_set,
 
126
                              "tabs-set", &tabs_set,
 
127
                              "wrap-mode-set", &wrap_mode_set,
 
128
                              "pixels-inside-wrap-set", &pixels_inside_wrap_set,
 
129
                              "underline-set", &underline_set,
 
130
                              "strikethrough-set", &strikethrough_set,
 
131
                              "invisible-set", &invisible_set,
 
132
                              "editable-set", &editable_set,
 
133
                              "background-full-height-set", &bg_full_height_set,
 
134
                              "language-set", &language_set,
 
135
                              "direction", &direction,
 
136
                              "font-desc", &font_desc,
 
137
                              NULL);
 
138
 
 
139
                if (dest->appearance.draw_bg) {
 
140
                         GdkColor *color = NULL;
 
141
 
 
142
                         g_object_get (tag, "background-gdk", &color, NULL);
 
143
                         dest->appearance.bg_color = *color;
 
144
                         gdk_color_free (color);
 
145
 
 
146
                         dest->appearance.draw_bg = TRUE;
 
147
                 }
 
148
 
 
149
                if (fg_color_set) {
 
150
                        GdkColor *color = NULL;
 
151
 
 
152
                        g_object_get (tag, "foreground-gdk", &color, NULL);
 
153
                        dest->appearance.fg_color = *color;
 
154
                        gdk_color_free (color);
 
155
                }
 
156
 
 
157
                if (pg_bg_color_set) {
 
158
                        if (dest->pg_bg_color)
 
159
                                gdk_color_free (dest->pg_bg_color);
 
160
 
 
161
                        g_object_get (tag, "paragraph-background-gdk", &dest->pg_bg_color, NULL);
 
162
                }
 
163
 
 
164
                if (bg_stipple_set) {
 
165
                        if (dest->appearance.bg_stipple)
 
166
                                g_object_unref (dest->appearance.bg_stipple);
 
167
                        g_object_get (tag, "background-stipple", &dest->appearance.bg_stipple, NULL);
 
168
 
 
169
                        dest->appearance.draw_bg = TRUE;
 
170
                }
 
171
 
 
172
                if (fg_stipple_set) {
 
173
                        if (dest->appearance.fg_stipple)
 
174
                                g_object_unref (dest->appearance.fg_stipple);
 
175
                        g_object_get (tag, "foreground-stipple", &dest->appearance.fg_stipple, NULL);
 
176
                }
 
177
 
 
178
                if (font_desc) {
 
179
                        if (dest->font) {
 
180
                                pango_font_description_merge (dest->font, font_desc, TRUE);
 
181
                                pango_font_description_free (font_desc);
 
182
                        }
 
183
                        else
 
184
                                dest->font = font_desc;
 
185
                }
 
186
 
 
187
                /* multiply all the scales together to get a composite */
 
188
                if (scale_set) {
 
189
                        gdouble font_scale;
 
190
                        g_object_get (tag, "foreground-stipple", &font_scale, NULL);
 
191
                        dest->font_scale *= font_scale;
 
192
                }
 
193
 
 
194
                if (justification_set)
 
195
                        g_object_get (tag, "justification", &dest->justification, NULL);
 
196
 
 
197
                if (direction != GTK_TEXT_DIR_NONE)
 
198
                        dest->direction = direction;
 
199
 
 
200
                if (left_margin_set) {
 
201
                        gint left_margin;
 
202
 
 
203
                        g_object_get (tag, "left-margin", &left_margin, NULL);
 
204
                        if (accumulative_margin)
 
205
                                left_margin_accumulative += left_margin;
 
206
                        else
 
207
                                dest->left_margin = left_margin;
 
208
                }
 
209
 
 
210
                if (indent_set)
 
211
                        g_object_get (tag, "indent", &dest->indent, NULL);
 
212
 
 
213
                if (rise_set)
 
214
                        g_object_get (tag, "rise", &dest->appearance.rise, NULL);
 
215
 
 
216
                if (right_margin_set) {
 
217
                        gint right_margin;
 
218
 
 
219
                        g_object_get (tag, "right-margin", &right_margin, NULL);
 
220
 
 
221
                        if (accumulative_margin)
 
222
                                right_margin_accumulative += right_margin;
 
223
                        else
 
224
                                dest->right_margin = right_margin;
 
225
                }
 
226
 
 
227
                if (pixels_above_lines_set)
 
228
                        g_object_get (tag, "pixels-above-lines", &dest->pixels_above_lines, NULL);
 
229
 
 
230
                if (pixels_below_lines_set)
 
231
                        g_object_get (tag, "pixels-below-lines", &dest->pixels_below_lines, NULL);
 
232
 
 
233
                if (pixels_inside_wrap_set)
 
234
                        g_object_get (tag, "pixels-inside-wrap", &dest->pixels_inside_wrap, NULL);
 
235
 
 
236
                if (tabs_set) {
 
237
                        if (dest->tabs)
 
238
                                pango_tab_array_free (dest->tabs);
 
239
                        g_object_get (tag, "pixels-inside-wrap", &dest->tabs, NULL);
 
240
                }
 
241
 
 
242
                if (wrap_mode_set)
 
243
                        g_object_get (tag, "wrap-mode", &dest->wrap_mode, NULL);
 
244
 
 
245
                if (underline_set) {
 
246
                        gint underline;
 
247
 
 
248
                        g_object_get (tag, "underline", &underline, NULL);
 
249
                        dest->appearance.underline = underline;
 
250
                }
 
251
 
 
252
                if (strikethrough_set) {
 
253
                        gint strikethrough;
 
254
 
 
255
                        g_object_get (tag, "strikethrough", &strikethrough, NULL);
 
256
                        dest->appearance.strikethrough = strikethrough;
 
257
                }
 
258
 
 
259
                if (invisible_set) {
 
260
                        gint invisible;
 
261
 
 
262
                        g_object_get (tag, "invisible", &invisible, NULL);
 
263
                        dest->invisible = invisible;
 
264
                }
 
265
 
 
266
                if (editable_set) {
 
267
                        gint editable;
 
268
 
 
269
                        g_object_get (tag, "editable", &editable, NULL);
 
270
                        dest->editable = editable;
 
271
                }
 
272
 
 
273
                if (bg_full_height_set) {
 
274
                        gint bg_full_height;
 
275
 
 
276
                        g_object_get (tag, "background-full-height", &bg_full_height, NULL);
 
277
                        dest->bg_full_height = bg_full_height;
 
278
                }
 
279
 
 
280
                if (language_set) {
 
281
                        g_free (dest->language);
 
282
                        g_object_get (tag, "language", &dest->language, NULL);
 
283
                }
197
284
    }
198
285
 
199
 
  dest->left_margin += left_margin_accumulative;
200
 
  dest->right_margin += right_margin_accumulative;
 
286
        dest->left_margin += left_margin_accumulative;
 
287
        dest->right_margin += right_margin_accumulative;
201
288
}
202
289
 
203
290
void
255
342
 
256
343
        g_slist_foreach (priv->tags, (GFunc) g_object_unref, NULL);
257
344
        g_slist_free (priv->tags);
258
 
        priv->tags = NULL;
259
345
 
260
346
        priv->tags = gtk_text_iter_get_tags (&iter);
261
347
        g_slist_foreach (priv->tags, (GFunc) g_object_ref, NULL);
401
487
                priv->default_text = NULL;
402
488
        }
403
489
 
 
490
        if (priv->tags) {
 
491
                g_slist_foreach (priv->tags, (GFunc) g_object_unref, NULL);
 
492
                g_slist_free (priv->tags);
 
493
        }
 
494
 
404
495
        G_OBJECT_CLASS (brasero_jacket_buffer_parent_class)->finalize (object);
405
496
}
406
497