]> git.sur5r.net Git - glabels/blob - src/object-editor-text-page.c
Imported Upstream version 2.2.8
[glabels] / src / object-editor-text-page.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2
3 /*
4  *  (GLABELS) Label and Business Card Creation program for GNOME
5  *
6  *  object-editor.c:  object properties editor module
7  *
8  *  Copyright (C) 2003  Jim Evins <evins@snaught.com>.
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with this program; if not, write to the Free Software
22  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23  */
24 #include <config.h>
25
26 #include "object-editor.h"
27
28 #include <glib/gi18n.h>
29 #include <gtk/gtktogglebutton.h>
30 #include <gtk/gtkspinbutton.h>
31 #include <gtk/gtkcombobox.h>
32 #include <math.h>
33
34 #include "prefs.h"
35 #include "mygal/widget-color-combo.h"
36 #include "color.h"
37 #include "util.h"
38
39 #include "object-editor-private.h"
40
41 #include "debug.h"
42
43 /*===========================================*/
44 /* Private macros                            */
45 /*===========================================*/
46
47 /*===========================================*/
48 /* Private data types                        */
49 /*===========================================*/
50
51 /*===========================================*/
52 /* Private globals                           */
53 /*===========================================*/
54
55 /*===========================================*/
56 /* Local function prototypes                 */
57 /*===========================================*/
58
59 static void align_toggle_cb (GtkToggleButton *toggle,
60                              glObjectEditor  *editor);
61 static void text_radio_toggled_cb              (glObjectEditor        *editor);
62
63
64 /*--------------------------------------------------------------------------*/
65 /* PRIVATE.  Prepare size page.                                             */
66 /*--------------------------------------------------------------------------*/
67 void
68 gl_object_editor_prepare_text_page (glObjectEditor       *editor)
69 {
70         GList        *family_names = NULL;
71
72         gl_debug (DEBUG_EDITOR, "START");
73
74         /* Extract widgets from XML tree. */
75         editor->priv->text_page_vbox =
76                 glade_xml_get_widget (editor->priv->gui, "text_page_vbox");
77         editor->priv->text_family_combo =
78                 glade_xml_get_widget (editor->priv->gui, "text_family_combo");
79         editor->priv->text_size_spin =
80                 glade_xml_get_widget (editor->priv->gui, "text_size_spin");
81         editor->priv->text_bold_toggle =
82                 glade_xml_get_widget (editor->priv->gui, "text_bold_toggle");
83         editor->priv->text_italic_toggle =
84                 glade_xml_get_widget (editor->priv->gui, "text_italic_toggle");
85         editor->priv->text_color_combo =
86                 glade_xml_get_widget (editor->priv->gui, "text_color_combo");
87         editor->priv->text_color_radio =
88                 glade_xml_get_widget (editor->priv->gui, "text_color_radio");
89         editor->priv->text_color_key_radio =
90                 glade_xml_get_widget (editor->priv->gui, "text_color_key_radio");
91         editor->priv->text_color_key_combo =
92                 glade_xml_get_widget (editor->priv->gui, "text_color_key_combo");
93         editor->priv->text_left_toggle =
94                 glade_xml_get_widget (editor->priv->gui, "text_left_toggle");
95         editor->priv->text_center_toggle =
96                 glade_xml_get_widget (editor->priv->gui, "text_center_toggle");
97         editor->priv->text_right_toggle =
98                 glade_xml_get_widget (editor->priv->gui, "text_right_toggle");
99         editor->priv->text_line_spacing_spin =
100                 glade_xml_get_widget (editor->priv->gui, "text_line_spacing_spin");
101         editor->priv->text_auto_shrink_check =
102                 glade_xml_get_widget (editor->priv->gui, "text_auto_shrink_check");
103
104         gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->text_family_combo));
105         gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->text_color_key_combo));
106
107         /* Load family names */
108         family_names = gl_util_get_font_family_list ();
109         gl_util_combo_box_set_strings (GTK_COMBO_BOX(editor->priv->text_family_combo),
110                                        family_names);
111
112         /* Modify widgets */
113         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio), TRUE);
114         gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE);
115     gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE);
116
117         /* Un-hide */
118         gtk_widget_show_all (editor->priv->text_page_vbox);
119
120         /* Connect signals */
121         g_signal_connect_swapped (G_OBJECT (editor->priv->text_family_combo),
122                                   "changed",
123                                   G_CALLBACK (gl_object_editor_changed_cb),
124                                   G_OBJECT (editor));
125         g_signal_connect_swapped (G_OBJECT (editor->priv->text_size_spin),
126                                   "changed",
127                                   G_CALLBACK (gl_object_editor_changed_cb),
128                                   G_OBJECT (editor));
129         g_signal_connect_swapped (G_OBJECT (editor->priv->text_bold_toggle),
130                                   "toggled",
131                                   G_CALLBACK (gl_object_editor_changed_cb),
132                                   G_OBJECT (editor));
133         g_signal_connect_swapped (G_OBJECT (editor->priv->text_italic_toggle),
134                                   "toggled",
135                                   G_CALLBACK (gl_object_editor_changed_cb),
136                                   G_OBJECT (editor));
137         g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_combo),
138                                   "color_changed",
139                                   G_CALLBACK (gl_object_editor_changed_cb),
140                                   G_OBJECT (editor));
141         g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_combo),
142                                   "changed",
143                                   G_CALLBACK (gl_object_editor_changed_cb),
144                                   G_OBJECT (editor));
145         g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_radio),
146                                   "toggled",
147                                   G_CALLBACK (text_radio_toggled_cb),
148                                   G_OBJECT (editor));                             
149         g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_radio),
150                                   "toggled",
151                                   G_CALLBACK (text_radio_toggled_cb),
152                                   G_OBJECT (editor));
153
154         g_signal_connect (G_OBJECT (editor->priv->text_left_toggle),
155                           "toggled",
156                           G_CALLBACK (align_toggle_cb),
157                           G_OBJECT (editor));
158         g_signal_connect (G_OBJECT (editor->priv->text_center_toggle),
159                           "toggled",
160                           G_CALLBACK (align_toggle_cb),
161                           G_OBJECT (editor));
162         g_signal_connect (G_OBJECT (editor->priv->text_right_toggle),
163                           "toggled",
164                           G_CALLBACK (align_toggle_cb),
165                           G_OBJECT (editor));
166
167         g_signal_connect_swapped (G_OBJECT (editor->priv->text_line_spacing_spin),
168                                   "changed",
169                                   G_CALLBACK (gl_object_editor_changed_cb),
170                                   G_OBJECT (editor));
171
172         g_signal_connect_swapped (G_OBJECT (editor->priv->text_auto_shrink_check),
173                                   "toggled",
174                                   G_CALLBACK (gl_object_editor_changed_cb),
175                                   G_OBJECT (editor));
176
177         gl_debug (DEBUG_EDITOR, "END");
178 }
179
180 /*--------------------------------------------------------------------------*/
181 /* PRIVATE.  Alignment togglebutton callback.                               */
182 /*--------------------------------------------------------------------------*/
183 static void
184 align_toggle_cb (GtkToggleButton *toggle,
185                  glObjectEditor  *editor)
186 {
187         if (editor->priv->stop_signals) return;
188
189         if (gtk_toggle_button_get_active (toggle)) {
190  
191                 if (GTK_WIDGET (toggle) == GTK_WIDGET (editor->priv->text_left_toggle)) {
192                         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
193                                                       (editor->priv->text_center_toggle),
194                                                       FALSE);
195                         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
196                                                       (editor->priv->text_right_toggle),
197                                                       FALSE);
198                 } else if (GTK_WIDGET (toggle) ==
199                            GTK_WIDGET (editor->priv->text_center_toggle)) {
200                         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
201                                                       (editor->priv->text_left_toggle),
202                                                       FALSE);
203                         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
204                                                       (editor->priv->text_right_toggle),
205                                                       FALSE);
206                 } else if (GTK_WIDGET (toggle) ==
207                            GTK_WIDGET (editor->priv->text_right_toggle)) {
208                         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
209                                                       (editor->priv->text_left_toggle),
210                                                       FALSE);
211                         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
212                                                       (editor->priv->text_center_toggle),
213                                                       FALSE);
214                 }
215
216                 /* Emit our "changed" signal */
217                 g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0);
218         }
219
220 }
221
222 /*****************************************************************************/
223 /* Set font family.                                                          */
224 /*****************************************************************************/
225 void
226 gl_object_editor_set_font_family (glObjectEditor      *editor,
227                                   const gchar         *font_family)
228 {
229         GList    *family_names;
230         gchar    *old_font_family;
231         gchar    *good_font_family;
232
233         gl_debug (DEBUG_EDITOR, "START");
234
235         editor->priv->stop_signals = TRUE;
236
237         old_font_family = gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_family_combo));
238
239         if ( !old_font_family || g_utf8_collate( old_font_family, font_family ) )
240         {
241
242                 /* Make sure we have a valid font family.  if not provide a good default. */
243                 family_names = gl_util_get_font_family_list ();
244                 if (g_list_find_custom (family_names, font_family, (GCompareFunc)g_utf8_collate)) {
245                         good_font_family = g_strdup (font_family);
246                 } else {
247                         if (family_names != NULL) {
248                                 good_font_family = g_strdup (family_names->data); /* 1st entry */
249                         } else {
250                                 good_font_family = NULL;
251                         }
252                 }
253                 gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->text_family_combo), good_font_family);
254                 g_free (good_font_family);
255         }
256
257         g_free (old_font_family);
258
259         editor->priv->stop_signals = FALSE;
260
261         gl_debug (DEBUG_EDITOR, "END");
262 }
263
264 /*****************************************************************************/
265 /* Query font family.                                                        */
266 /*****************************************************************************/
267 gchar *
268 gl_object_editor_get_font_family (glObjectEditor      *editor)
269 {
270         gchar *font_family;
271
272         gl_debug (DEBUG_EDITOR, "START");
273
274         font_family = gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_family_combo));
275
276         gl_debug (DEBUG_EDITOR, "END");
277
278         return font_family;
279 }
280
281 /*****************************************************************************/
282 /* Set font size.                                                            */
283 /*****************************************************************************/
284 void
285 gl_object_editor_set_font_size (glObjectEditor      *editor,
286                                 gdouble              font_size)
287 {
288         gl_debug (DEBUG_EDITOR, "START");
289
290         editor->priv->stop_signals = TRUE;
291
292         gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->text_size_spin),
293                                    font_size);
294
295         editor->priv->stop_signals = FALSE;
296
297         gl_debug (DEBUG_EDITOR, "END");
298 }
299
300 /*****************************************************************************/
301 /* Query font size.                                                          */
302 /*****************************************************************************/
303 gdouble
304 gl_object_editor_get_font_size (glObjectEditor      *editor)
305 {
306         gdouble font_size;
307
308         gl_debug (DEBUG_EDITOR, "START");
309
310         font_size =
311                 gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->text_size_spin));
312
313         gl_debug (DEBUG_EDITOR, "END");
314
315         return font_size;
316 }
317
318 /*****************************************************************************/
319 /* Set font weight.                                                          */
320 /*****************************************************************************/
321 void
322 gl_object_editor_set_font_weight (glObjectEditor      *editor,
323                                   PangoWeight          font_weight)
324 {
325         gl_debug (DEBUG_EDITOR, "START");
326
327         editor->priv->stop_signals = TRUE;
328
329         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_bold_toggle),
330                                       (font_weight == PANGO_WEIGHT_BOLD));
331
332         editor->priv->stop_signals = FALSE;
333
334         gl_debug (DEBUG_EDITOR, "END");
335 }
336
337 /*****************************************************************************/
338 /* Query font weight.                                                        */
339 /*****************************************************************************/
340 PangoWeight
341 gl_object_editor_get_font_weight (glObjectEditor      *editor)
342 {
343         PangoWeight font_weight;
344
345         gl_debug (DEBUG_EDITOR, "START");
346
347         if (gtk_toggle_button_get_active
348             (GTK_TOGGLE_BUTTON (editor->priv->text_bold_toggle))) {
349                 font_weight = PANGO_WEIGHT_BOLD;
350         } else {
351                 font_weight = PANGO_WEIGHT_NORMAL;
352         }
353
354         gl_debug (DEBUG_EDITOR, "END");
355
356         return font_weight;
357 }
358
359 /*****************************************************************************/
360 /* Set font italic flag.                                                     */
361 /*****************************************************************************/
362 void
363 gl_object_editor_set_font_italic_flag (glObjectEditor      *editor,
364                                        gboolean             font_italic_flag)
365 {
366         gl_debug (DEBUG_EDITOR, "START");
367
368         editor->priv->stop_signals = TRUE;
369
370         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_italic_toggle),
371                                       font_italic_flag);
372
373         editor->priv->stop_signals = FALSE;
374
375         gl_debug (DEBUG_EDITOR, "END");
376 }
377
378 /*****************************************************************************/
379 /* Query font italic flag.                                                   */
380 /*****************************************************************************/
381 gboolean
382 gl_object_editor_get_font_italic_flag (glObjectEditor      *editor)
383 {
384         gboolean italic_flag;
385
386         gl_debug (DEBUG_EDITOR, "START");
387
388         italic_flag =
389                 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
390                                               (editor->priv->text_italic_toggle));
391
392         gl_debug (DEBUG_EDITOR, "END");
393
394         return italic_flag;
395 }
396
397 /*****************************************************************************/
398 /* Set text alignment.                                                       */
399 /*****************************************************************************/
400 void
401 gl_object_editor_set_text_alignment (glObjectEditor      *editor,
402                                      PangoAlignment       align)
403 {
404         gl_debug (DEBUG_EDITOR, "START");
405
406         editor->priv->stop_signals = TRUE;
407
408         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_left_toggle),
409                                       (align == PANGO_ALIGN_LEFT));
410         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_center_toggle),
411                                       (align == PANGO_ALIGN_CENTER));
412         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_right_toggle),
413                                       (align == PANGO_ALIGN_RIGHT));
414
415         editor->priv->stop_signals = FALSE;
416
417         gl_debug (DEBUG_EDITOR, "END");
418 }
419
420 /*****************************************************************************/
421 /* Query text alignment.                                                     */
422 /*****************************************************************************/
423 PangoAlignment
424 gl_object_editor_get_text_alignment (glObjectEditor      *editor)
425 {
426         PangoAlignment align;
427
428         gl_debug (DEBUG_EDITOR, "START");
429
430         if (gtk_toggle_button_get_active
431             (GTK_TOGGLE_BUTTON (editor->priv->text_left_toggle))) {
432                 align = PANGO_ALIGN_LEFT;
433         } else
434             if (gtk_toggle_button_get_active
435                 (GTK_TOGGLE_BUTTON (editor->priv->text_right_toggle))) {
436                 align = PANGO_ALIGN_RIGHT;
437         } else
438             if (gtk_toggle_button_get_active
439                 (GTK_TOGGLE_BUTTON (editor->priv->text_center_toggle))) {
440                 align = PANGO_ALIGN_CENTER;
441         } else {
442                 align = PANGO_ALIGN_LEFT;       /* Should not happen. */
443         }
444
445         gl_debug (DEBUG_EDITOR, "END");
446
447         return align;
448 }
449
450 /*****************************************************************************/
451 /* Set text color.                                                           */
452 /*****************************************************************************/
453 void
454 gl_object_editor_set_text_color (glObjectEditor      *editor,
455                                  gboolean             merge_flag,
456                                  glColorNode         *text_color_node)
457 {
458         GdkColor *gdk_color;
459
460         gl_debug (DEBUG_EDITOR, "START");
461
462         editor->priv->stop_signals = TRUE;
463
464         gl_debug (DEBUG_EDITOR, "color field %s(%d) / %X", text_color_node->key, text_color_node->field_flag, text_color_node->color);
465         
466         gtk_widget_set_sensitive (editor->priv->text_color_key_radio, merge_flag);
467
468         if ( text_color_node->color == GL_COLOR_NONE ) {
469
470                 color_combo_set_color_to_default (COLOR_COMBO(editor->priv->text_color_combo));
471
472         } else {
473                 
474         gdk_color = gl_color_to_gdk_color (text_color_node->color);
475         color_combo_set_color (COLOR_COMBO(editor->priv->text_color_combo), gdk_color);
476         g_free (gdk_color);
477         }
478         
479         if (!text_color_node->field_flag || !merge_flag) {
480                 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
481                                                   (editor->priv->text_color_radio), TRUE); 
482                 gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE);
483                 gl_debug (DEBUG_EDITOR, "color field false 0");
484                 gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE);
485                 
486         } else {
487                 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
488                                                   (editor->priv->text_color_key_radio), TRUE); 
489                 gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE);
490                 gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE);
491                 
492                 gl_debug (DEBUG_EDITOR, "color field true 1");
493                 gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo), "");
494                 gl_debug (DEBUG_EDITOR, "color field true 2");
495         }
496
497         editor->priv->stop_signals = FALSE;
498
499         gl_debug (DEBUG_EDITOR, "END");
500 }
501
502 /*****************************************************************************/
503 /* Query text color.                                                         */
504 /*****************************************************************************/
505 glColorNode*
506 gl_object_editor_get_text_color (glObjectEditor      *editor)
507 {
508         GdkColor    *gdk_color;
509         glColorNode *color_node;
510         gboolean     is_default;
511
512         gl_debug (DEBUG_EDITOR, "START");
513
514         color_node = gl_color_node_new_default ();
515         
516         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_key_radio))) {
517                 color_node->field_flag = TRUE;
518                 color_node->color = gl_prefs->default_text_color;
519                 color_node->key = 
520                         gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo));
521     } else {
522                 color_node->field_flag = FALSE;
523                 color_node->key = NULL;
524                 gdk_color = color_combo_get_color (COLOR_COMBO(editor->priv->text_color_combo),
525                                            &is_default);
526
527         if (is_default) {
528                 color_node->color = gl_prefs->default_text_color;
529         } else {
530                 color_node->color = gl_color_from_gdk_color (gdk_color);
531         }
532         }      
533
534         gl_debug (DEBUG_EDITOR, "END");
535
536         return color_node;
537 }
538
539
540 /*****************************************************************************/
541 /* Set text line spacing.                                                    */
542 /*****************************************************************************/
543 void
544 gl_object_editor_set_text_line_spacing (glObjectEditor      *editor,
545                                         gdouble              text_line_spacing)
546 {
547         gl_debug (DEBUG_EDITOR, "START");
548
549         editor->priv->stop_signals = TRUE;
550
551         gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->text_line_spacing_spin),
552                                    text_line_spacing);
553
554         editor->priv->stop_signals = FALSE;
555
556         gl_debug (DEBUG_EDITOR, "END");
557 }
558
559 /*****************************************************************************/
560 /* Query text line spacing.                                                  */
561 /*****************************************************************************/
562 gdouble
563 gl_object_editor_get_text_line_spacing (glObjectEditor      *editor)
564 {
565         gdouble text_line_spacing;
566
567         gl_debug (DEBUG_EDITOR, "START");
568
569         text_line_spacing = 
570                 gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->text_line_spacing_spin));
571
572         gl_debug (DEBUG_EDITOR, "END");
573
574         return text_line_spacing;
575 }
576
577 /*****************************************************************************/
578 /* Set auto shrink checkbox.                                                 */
579 /*****************************************************************************/
580 void
581 gl_object_editor_set_text_auto_shrink (glObjectEditor      *editor,
582                                        gboolean             auto_shrink)
583 {
584         gl_debug (DEBUG_EDITOR, "START");
585
586         editor->priv->stop_signals = TRUE;
587
588         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_auto_shrink_check),
589                                       auto_shrink);
590
591         editor->priv->stop_signals = FALSE;
592
593         gl_debug (DEBUG_EDITOR, "END");
594 }
595
596 /*****************************************************************************/
597 /* Query auto shrink checkbox.                                               */
598 /*****************************************************************************/
599 gboolean    gl_object_editor_get_text_auto_shrink (glObjectEditor      *editor)
600 {
601         gboolean auto_shrink;
602
603         gl_debug (DEBUG_EDITOR, "START");
604
605         auto_shrink = 
606                 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_auto_shrink_check));
607
608         gl_debug (DEBUG_EDITOR, "END");
609
610         return auto_shrink;
611 }
612
613 /*--------------------------------------------------------------------------*/
614 /* PRIVATE.  color radio callback.                                           */
615 /*--------------------------------------------------------------------------*/
616 static void
617 text_radio_toggled_cb (glObjectEditor *editor)
618 {
619         if (editor->priv->stop_signals) return;
620
621         gl_debug (DEBUG_EDITOR, "START");
622         
623         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio))) {
624                 gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE);
625                 gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE);
626         } else {
627                 gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE);
628                 gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE);
629                 
630         }
631  
632         /* Emit our "changed" signal */
633         g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0);
634  
635         gl_debug (DEBUG_EDITOR, "END");
636 }