Commit 2d1d39fc authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

always use get_parent to get the chooser, added utility function

parent c9d88b06
......@@ -720,12 +720,8 @@ egg_file_format_chooser_realize (GtkWidget *widget)
g_return_if_fail (NULL == self->priv->chooser);
parent = gtk_widget_get_toplevel (widget);
if (!GTK_IS_FILE_CHOOSER (parent))
parent = gtk_widget_get_parent (widget);
while (parent && !GTK_IS_FILE_CHOOSER (parent))
parent = gtk_widget_get_parent (widget);
while ((parent != NULL) && !GTK_IS_FILE_CHOOSER (parent))
parent = gtk_widget_get_parent (parent);
self->priv->chooser = GTK_FILE_CHOOSER (parent);
......@@ -1217,4 +1213,11 @@ egg_file_format_chooser_append_extension (EggFileFormatChooser *self,
return result;
}
void
egg_file_format_chooser_emit_size_changed (EggFileFormatChooser *self)
{
if (self->priv->size_changed_event == 0)
self->priv->size_changed_event = gdk_threads_add_idle (emit_default_size_changed, self);
}
/* vim: set sw=2 sta et: */
......@@ -76,6 +76,7 @@ gpointer egg_file_format_chooser_get_format_data (EggFileFormatChooser
gchar* egg_file_format_chooser_append_extension (EggFileFormatChooser *self,
const gchar *filename,
guint format);
void egg_file_format_chooser_emit_size_changed (EggFileFormatChooser *self);
G_END_DECLS
......
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