don't call gtk_widget_set_direction() on a non-existant widget. Fixes bug

2004-05-10  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptexteditor.c (gimp_text_editor_set_direction):
	don't call gtk_widget_set_direction() on a non-existant widget.
	Fixes bug #141792.
This commit is contained in:
Sven Neumann 2004-05-10 18:10:18 +00:00 committed by Sven Neumann
parent 9544608ef7
commit 54cb4777c8
2 changed files with 16 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2004-05-10 Sven Neumann <sven@gimp.org>
* app/widgets/gimptexteditor.c (gimp_text_editor_set_direction):
don't call gtk_widget_set_direction() on a non-existant widget.
Fixes bug #141792.
2004-05-10 Sven Neumann <sven@gimp.org>
* app/gui/tips-dialog.c: added missing newline in error message.

View file

@ -315,14 +315,17 @@ gimp_text_editor_set_direction (GimpTextEditor *editor,
G_CALLBACK (gimp_text_editor_dir_changed),
editor);
switch (editor->base_dir)
if (editor->view)
{
case GIMP_TEXT_DIRECTION_LTR:
gtk_widget_set_direction (editor->view, GTK_TEXT_DIR_LTR);
break;
case GIMP_TEXT_DIRECTION_RTL:
gtk_widget_set_direction (editor->view, GTK_TEXT_DIR_RTL);
break;
switch (editor->base_dir)
{
case GIMP_TEXT_DIRECTION_LTR:
gtk_widget_set_direction (editor->view, GTK_TEXT_DIR_LTR);
break;
case GIMP_TEXT_DIRECTION_RTL:
gtk_widget_set_direction (editor->view, GTK_TEXT_DIR_RTL);
break;
}
}
g_signal_emit (editor, text_editor_signals[DIR_CHANGED], 0);