Commit 55686445 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added missing cast.

2004-02-26  Michael Natterer  <mitch@gimp.org>

	* app/file/file-open.c (file_open_image): added missing cast.

	* app/widgets/gimperrorconsole.[ch]
	* app/widgets/gimptexteditor.[ch]: renamed members so my file
	chooser patch becomes smaller ;)
parent 738d31d3
2004-02-26 Michael Natterer <mitch@gimp.org>
* app/file/file-open.c (file_open_image): added missing cast.
* app/widgets/gimperrorconsole.[ch]
* app/widgets/gimptexteditor.[ch]: renamed members so my file
chooser patch becomes smaller ;)
2004-02-26 Pedro Gimeno <pggimeno@wanadoo.es>
* app/file/file-open.c (file_open_image): Applied a fix by
......@@ -147,7 +147,7 @@ file_open_image (Gimp *gimp,
gimp_image_invalidate_layer_previews (gimage);
gimp_image_invalidate_channel_previews (gimage);
gimp_viewable_invalidate_preview (gimage);
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (gimage));
return gimage;
}
......
......@@ -193,7 +193,7 @@ gimp_error_console_init (GimpErrorConsole *console)
g_free (str);
console->filesel = NULL;
console->file_dialog = NULL;
}
static void
......@@ -201,8 +201,8 @@ gimp_error_console_destroy (GtkObject *object)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (object);
if (console->filesel)
gtk_widget_destroy (console->filesel);
if (console->file_dialog)
gtk_widget_destroy (console->file_dialog);
console->gimp->message_handler = GIMP_MESSAGE_BOX;
......@@ -214,8 +214,8 @@ gimp_error_console_unmap (GtkWidget *widget)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (widget);
if (console->filesel)
gtk_widget_destroy (console->filesel);
if (console->file_dialog)
gtk_widget_destroy (console->file_dialog);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
}
......@@ -348,20 +348,20 @@ gimp_error_console_save_ext_clicked (GtkWidget *button,
return;
}
if (console->filesel)
if (console->file_dialog)
{
gtk_window_present (GTK_WINDOW (console->filesel));
gtk_window_present (GTK_WINDOW (console->file_dialog));
return;
}
console->filesel = gtk_file_selection_new (_("Save Error Log to File"));
console->file_dialog = gtk_file_selection_new (_("Save Error Log to File"));
console->save_selection = (state & GDK_SHIFT_MASK) ? TRUE : FALSE;
g_object_add_weak_pointer (G_OBJECT (console->filesel),
(gpointer *) &console->filesel);
g_object_add_weak_pointer (G_OBJECT (console->file_dialog),
(gpointer *) &console->file_dialog);
filesel = GTK_FILE_SELECTION (console->filesel);
filesel = GTK_FILE_SELECTION (console->file_dialog);
gtk_window_set_screen (GTK_WINDOW (filesel),
gtk_window_get_screen (GTK_WINDOW (console)));
......
......@@ -48,7 +48,7 @@ struct _GimpErrorConsole
GtkWidget *clear_button;
GtkWidget *save_button;
GtkWidget *filesel;
GtkWidget *file_dialog;
gboolean save_selection;
};
......
......@@ -125,10 +125,10 @@ gimp_text_editor_class_init (GimpTextEditorClass *klass)
static void
gimp_text_editor_init (GimpTextEditor *editor)
{
editor->buffer = NULL;
editor->view = NULL;
editor->group = NULL;
editor->filesel = NULL;
editor->buffer = NULL;
editor->view = NULL;
editor->group = NULL;
editor->file_dialog = NULL;
switch (gtk_widget_get_default_direction ())
{
......@@ -311,9 +311,9 @@ gimp_text_editor_load (GtkWidget *widget,
{
GtkFileSelection *filesel;
if (editor->filesel)
if (editor->file_dialog)
{
gtk_window_present (GTK_WINDOW (editor->filesel));
gtk_window_present (GTK_WINDOW (editor->file_dialog));
return;
}
......@@ -333,8 +333,9 @@ gimp_text_editor_load (GtkWidget *widget,
G_CALLBACK (gimp_text_editor_load_response),
editor);
editor->filesel = GTK_WIDGET (filesel);
g_object_add_weak_pointer (G_OBJECT (filesel), (gpointer) &editor->filesel);
editor->file_dialog = GTK_WIDGET (filesel);
g_object_add_weak_pointer (G_OBJECT (filesel),
(gpointer) &editor->file_dialog);
gtk_widget_show (GTK_WIDGET (filesel));
}
......
......@@ -40,7 +40,7 @@ struct _GimpTextEditor
GtkTextBuffer *buffer;
GtkWidget *group;
GtkWidget *view;
GtkWidget *filesel;
GtkWidget *file_dialog;
};
struct _GimpTextEditorClass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment