Initial commit
[fillmore] / src / marina / marina / DialogUtils.c
diff --git a/src/marina/marina/DialogUtils.c b/src/marina/marina/DialogUtils.c
new file mode 100644 (file)
index 0000000..b0cc9f5
--- /dev/null
@@ -0,0 +1,1207 @@
+/* DialogUtils.c generated by valac, the Vala compiler
+ * generated from DialogUtils.vala, do not modify */
+
+/* Copyright 2009-2010 Yorba Foundation
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later).  See the COPYING file in this distribution. 
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gee.h>
+#include <stdio.h>
+#include <hildon/hildon-file-chooser-dialog.h>
+#include <errno.h>
+#include <glib/gstdio.h>
+#include <hildon/hildon.h>
+#include <float.h>
+#include <math.h>
+#include <gst/gst.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+
+
+#define DIALOG_UTILS_TYPE_FILTER_DESCRIPTION_STRUCT (dialog_utils_filter_description_struct_get_type ())
+typedef struct _DialogUtilsfilter_description_struct DialogUtilsfilter_description_struct;
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define __g_slist_free_g_free0(var) ((var == NULL) ? NULL : (var = (_g_slist_free_g_free (var), NULL)))
+
+#define DIALOG_UTILS_TYPE_BUTTON_STRUCT (dialog_utils_button_struct_get_type ())
+typedef struct _DialogUtilsButtonStruct DialogUtilsButtonStruct;
+
+#define TYPE_CLIP_VIEW (clip_view_get_type ())
+#define CLIP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CLIP_VIEW, ClipView))
+#define CLIP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CLIP_VIEW, ClipViewClass))
+#define IS_CLIP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CLIP_VIEW))
+#define IS_CLIP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CLIP_VIEW))
+#define CLIP_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CLIP_VIEW, ClipViewClass))
+
+typedef struct _ClipView ClipView;
+typedef struct _ClipViewClass ClipViewClass;
+typedef struct _ClipViewPrivate ClipViewPrivate;
+
+#define MODEL_TYPE_CLIP (model_clip_get_type ())
+#define MODEL_CLIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MODEL_TYPE_CLIP, ModelClip))
+#define MODEL_CLIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MODEL_TYPE_CLIP, ModelClipClass))
+#define MODEL_IS_CLIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MODEL_TYPE_CLIP))
+#define MODEL_IS_CLIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MODEL_TYPE_CLIP))
+#define MODEL_CLIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MODEL_TYPE_CLIP, ModelClipClass))
+
+typedef struct _ModelClip ModelClip;
+typedef struct _ModelClipClass ModelClipClass;
+typedef struct _ModelClipPrivate ModelClipPrivate;
+
+#define MODEL_TYPE_CLIP_FILE (model_clip_file_get_type ())
+#define MODEL_CLIP_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MODEL_TYPE_CLIP_FILE, ModelClipFile))
+#define MODEL_CLIP_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MODEL_TYPE_CLIP_FILE, ModelClipFileClass))
+#define MODEL_IS_CLIP_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MODEL_TYPE_CLIP_FILE))
+#define MODEL_IS_CLIP_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MODEL_TYPE_CLIP_FILE))
+#define MODEL_CLIP_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MODEL_TYPE_CLIP_FILE, ModelClipFileClass))
+
+typedef struct _ModelClipFile ModelClipFile;
+typedef struct _ModelClipFileClass ModelClipFileClass;
+
+#define MODEL_TYPE_MEDIA_TYPE (model_media_type_get_type ())
+typedef struct _ModelClipFilePrivate ModelClipFilePrivate;
+
+#define TYPE_FRACTION (fraction_get_type ())
+typedef struct _Fraction Fraction;
+
+#define TYPE_TIME_CODE (time_code_get_type ())
+typedef struct _TimeCode TimeCode;
+
+struct _DialogUtilsfilter_description_struct {
+       char* name;
+       char* extension;
+};
+
+struct _DialogUtilsButtonStruct {
+       char* title;
+       GtkResponseType type;
+};
+
+struct _ClipView {
+       GtkDrawingArea parent_instance;
+       ClipViewPrivate * priv;
+       ModelClip* clip;
+       gint64 initial_time;
+       gboolean is_selected;
+       gint height;
+};
+
+struct _ClipViewClass {
+       GtkDrawingAreaClass parent_class;
+};
+
+typedef enum  {
+       MODEL_MEDIA_TYPE_AUDIO,
+       MODEL_MEDIA_TYPE_VIDEO
+} ModelMediaType;
+
+struct _ModelClip {
+       GObject parent_instance;
+       ModelClipPrivate * priv;
+       ModelClipFile* clipfile;
+       ModelMediaType type;
+       gboolean is_recording;
+       char* name;
+};
+
+struct _ModelClipClass {
+       GObjectClass parent_class;
+};
+
+struct _ModelClipFile {
+       GObject parent_instance;
+       ModelClipFilePrivate * priv;
+       char* filename;
+       GstCaps* video_caps;
+       GstCaps* audio_caps;
+       GdkPixbuf* thumbnail;
+};
+
+struct _ModelClipFileClass {
+       GObjectClass parent_class;
+};
+
+struct _Fraction {
+       gint numerator;
+       gint denominator;
+};
+
+struct _TimeCode {
+       gint hour;
+       gint minute;
+       gint second;
+       gint frame;
+       gboolean drop_code;
+};
+
+
+
+GType dialog_utils_filter_description_struct_get_type (void);
+DialogUtilsfilter_description_struct* dialog_utils_filter_description_struct_dup (const DialogUtilsfilter_description_struct* self);
+void dialog_utils_filter_description_struct_free (DialogUtilsfilter_description_struct* self);
+void dialog_utils_filter_description_struct_copy (const DialogUtilsfilter_description_struct* self, DialogUtilsfilter_description_struct* dest);
+void dialog_utils_filter_description_struct_destroy (DialogUtilsfilter_description_struct* self);
+GtkFileFilter* dialog_utils_add_filter (GtkFileChooserDialog* d, const char* name, const char* extension);
+void dialog_utils_add_filters (DialogUtilsfilter_description_struct* filter_descriptions, int filter_descriptions_length1, GtkFileChooserDialog* d, GeeArrayList* filters, gboolean allow_all);
+static void _g_slist_free_g_free (GSList* self);
+gboolean dialog_utils_open (GtkWindow* parent, DialogUtilsfilter_description_struct* filter_descriptions, int filter_descriptions_length1, gboolean allow_multiple, gboolean allow_all, GSList** filenames);
+void dialog_utils_error (const char* major_message, const char* minor_message);
+char* append_extension (const char* path, const char* extension);
+gboolean dialog_utils_confirm_replace (GtkWindow* parent, const char* filename);
+gboolean dialog_utils_save (GtkWindow* parent, const char* title, gboolean create_directory, DialogUtilsfilter_description_struct* filter_descriptions, int filter_descriptions_length1, char** filename);
+char* dialog_utils_bold_message (const char* message);
+void dialog_utils_warning (const char* major_message, const char* minor_message);
+GType dialog_utils_button_struct_get_type (void);
+DialogUtilsButtonStruct* dialog_utils_button_struct_dup (const DialogUtilsButtonStruct* self);
+void dialog_utils_button_struct_free (DialogUtilsButtonStruct* self);
+void dialog_utils_button_struct_copy (const DialogUtilsButtonStruct* self, DialogUtilsButtonStruct* dest);
+void dialog_utils_button_struct_destroy (DialogUtilsButtonStruct* self);
+GtkResponseType dialog_utils_run_dialog (GtkWindow* parent, GtkMessageType type, const char* title, const char* message, DialogUtilsButtonStruct* buttons, int buttons_length1);
+GtkResponseType dialog_utils_two_button_dialog (const char* message, const char* first_button, const char* second_button);
+GtkResponseType dialog_utils_delete_keep (const char* message);
+GtkResponseType dialog_utils_add_cancel (const char* message);
+GtkResponseType dialog_utils_delete_cancel (const char* message);
+void dialog_utils_button_struct_init (DialogUtilsButtonStruct *self, const char* title, GtkResponseType type);
+static void _vala_DialogUtilsButtonStruct_array_free (DialogUtilsButtonStruct* array, gint array_length);
+GtkResponseType dialog_utils_save_close_cancel (GtkWindow* parent, const char* title, const char* message);
+GtkAlignment* dialog_utils_get_aligned_label (float x, float y, float exp_x, float exp_y, const char* text, gboolean selectable);
+void dialog_utils_add_label_to_table (GtkTable* t, const char* str, gint x, gint y, gint xpad, gint ypad, gboolean selectable);
+GType clip_view_get_type (void);
+GType model_clip_get_type (void);
+GType model_clip_file_get_type (void);
+GType model_media_type_get_type (void);
+GType fraction_get_type (void);
+Fraction* fraction_dup (const Fraction* self);
+void fraction_free (Fraction* self);
+GType time_code_get_type (void);
+TimeCode* time_code_dup (const TimeCode* self);
+void time_code_free (TimeCode* self);
+void frame_to_time (gint frame, Fraction* rate, TimeCode* result);
+gint time_to_frame_with_rate (gint64 time, Fraction* rate);
+gint64 model_clip_get_duration (ModelClip* self);
+char* time_code_to_string (TimeCode *self);
+gint64 model_clip_file_get_length (ModelClipFile* self);
+char* time_to_string (gint64 time);
+gboolean model_clip_is_trimmed (ModelClip* self);
+gboolean model_clip_file_has_caps_structure (ModelClipFile* self, ModelMediaType m);
+gboolean model_clip_file_get_dimensions (ModelClipFile* self, gint* w, gint* h);
+gboolean model_clip_file_get_frame_rate (ModelClipFile* self, Fraction* rate);
+gboolean model_clip_file_get_sample_rate (ModelClipFile* self, gint* rate);
+gboolean model_clip_file_get_num_channels_string (ModelClipFile* self, char** s);
+void dialog_utils_show_clip_properties (GtkWindow* parent, ClipView* selected_clip, ModelClipFile* clip_file, Fraction* frames_per_second);
+
+
+
+void dialog_utils_filter_description_struct_copy (const DialogUtilsfilter_description_struct* self, DialogUtilsfilter_description_struct* dest) {
+       dest->name = g_strdup (self->name);
+       dest->extension = g_strdup (self->extension);
+}
+
+
+void dialog_utils_filter_description_struct_destroy (DialogUtilsfilter_description_struct* self) {
+       _g_free0 (self->name);
+       _g_free0 (self->extension);
+}
+
+
+DialogUtilsfilter_description_struct* dialog_utils_filter_description_struct_dup (const DialogUtilsfilter_description_struct* self) {
+       DialogUtilsfilter_description_struct* dup;
+       dup = g_new0 (DialogUtilsfilter_description_struct, 1);
+       dialog_utils_filter_description_struct_copy (self, dup);
+       return dup;
+}
+
+
+void dialog_utils_filter_description_struct_free (DialogUtilsfilter_description_struct* self) {
+       dialog_utils_filter_description_struct_destroy (self);
+       g_free (self);
+}
+
+
+GType dialog_utils_filter_description_struct_get_type (void) {
+       static volatile gsize dialog_utils_filter_description_struct_type_id__volatile = 0;
+       if (g_once_init_enter (&dialog_utils_filter_description_struct_type_id__volatile)) {
+               GType dialog_utils_filter_description_struct_type_id;
+               dialog_utils_filter_description_struct_type_id = g_boxed_type_register_static ("DialogUtilsfilter_description_struct", (GBoxedCopyFunc) dialog_utils_filter_description_struct_dup, (GBoxedFreeFunc) dialog_utils_filter_description_struct_free);
+               g_once_init_leave (&dialog_utils_filter_description_struct_type_id__volatile, dialog_utils_filter_description_struct_type_id);
+       }
+       return dialog_utils_filter_description_struct_type_id__volatile;
+}
+
+
+#line 13 "DialogUtils.vala"
+GtkFileFilter* dialog_utils_add_filter (GtkFileChooserDialog* d, const char* name, const char* extension) {
+#line 242 "DialogUtils.c"
+       GtkFileFilter* result = NULL;
+       GtkFileFilter* filter;
+#line 13 "DialogUtils.vala"
+       g_return_val_if_fail (GTK_IS_FILE_CHOOSER_DIALOG (d), NULL);
+#line 13 "DialogUtils.vala"
+       g_return_val_if_fail (name != NULL, NULL);
+#line 14 "DialogUtils.vala"
+       filter = g_object_ref_sink (gtk_file_filter_new ());
+#line 15 "DialogUtils.vala"
+       gtk_file_filter_set_name (filter, name);
+#line 16 "DialogUtils.vala"
+       if (extension != NULL) {
+#line 255 "DialogUtils.c"
+               char* _tmp0_;
+#line 17 "DialogUtils.vala"
+               gtk_file_filter_add_pattern (filter, _tmp0_ = g_strconcat ("*.", extension, NULL));
+#line 259 "DialogUtils.c"
+               _g_free0 (_tmp0_);
+       } else {
+#line 19 "DialogUtils.vala"
+               gtk_file_filter_add_pattern (filter, "*");
+#line 264 "DialogUtils.c"
+       }
+#line 21 "DialogUtils.vala"
+       gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (d), filter);
+#line 268 "DialogUtils.c"
+       result = filter;
+#line 22 "DialogUtils.vala"
+       return result;
+#line 272 "DialogUtils.c"
+}
+
+
+#line 25 "DialogUtils.vala"
+void dialog_utils_add_filters (DialogUtilsfilter_description_struct* filter_descriptions, int filter_descriptions_length1, GtkFileChooserDialog* d, GeeArrayList* filters, gboolean allow_all) {
+#line 278 "DialogUtils.c"
+       gint length;
+       GtkFileFilter* _tmp2_;
+#line 25 "DialogUtils.vala"
+       g_return_if_fail (GTK_IS_FILE_CHOOSER_DIALOG (d));
+#line 25 "DialogUtils.vala"
+       g_return_if_fail (GEE_IS_ARRAY_LIST (filters));
+#line 28 "DialogUtils.vala"
+       length = filter_descriptions_length1;
+#line 287 "DialogUtils.c"
+       {
+               gint i;
+#line 29 "DialogUtils.vala"
+               i = 0;
+#line 292 "DialogUtils.c"
+               {
+                       gboolean _tmp0_;
+#line 29 "DialogUtils.vala"
+                       _tmp0_ = TRUE;
+#line 29 "DialogUtils.vala"
+                       while (TRUE) {
+#line 299 "DialogUtils.c"
+                               GtkFileFilter* filter;
+#line 29 "DialogUtils.vala"
+                               if (!_tmp0_) {
+#line 29 "DialogUtils.vala"
+                                       i = i + 1;
+#line 305 "DialogUtils.c"
+                               }
+#line 29 "DialogUtils.vala"
+                               _tmp0_ = FALSE;
+#line 29 "DialogUtils.vala"
+                               if (!(i < length)) {
+#line 29 "DialogUtils.vala"
+                                       break;
+#line 313 "DialogUtils.c"
+                               }
+#line 30 "DialogUtils.vala"
+                               filter = dialog_utils_add_filter (d, filter_descriptions[i].name, filter_descriptions[i].extension);
+#line 32 "DialogUtils.vala"
+                               gee_abstract_collection_add (GEE_ABSTRACT_COLLECTION (filters), filter);
+#line 319 "DialogUtils.c"
+                               _g_object_unref0 (filter);
+                       }
+               }
+       }
+#line 35 "DialogUtils.vala"
+       if (allow_all) {
+#line 326 "DialogUtils.c"
+               GtkFileFilter* _tmp1_;
+#line 36 "DialogUtils.vala"
+               _tmp1_ = dialog_utils_add_filter (d, "All files", NULL);
+#line 330 "DialogUtils.c"
+               _g_object_unref0 (_tmp1_);
+       }
+#line 40 "DialogUtils.vala"
+       g_assert (filter_descriptions_length1 == gee_collection_get_size (GEE_COLLECTION (filters)));
+#line 42 "DialogUtils.vala"
+       gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (d), _tmp2_ = (GtkFileFilter*) gee_abstract_list_get (GEE_ABSTRACT_LIST (filters), 0));
+#line 337 "DialogUtils.c"
+       _g_object_unref0 (_tmp2_);
+}
+
+
+static void _g_slist_free_g_free (GSList* self) {
+       g_slist_foreach (self, (GFunc) g_free, NULL);
+       g_slist_free (self);
+}
+
+
+#line 45 "DialogUtils.vala"
+gboolean dialog_utils_open (GtkWindow* parent, DialogUtilsfilter_description_struct* filter_descriptions, int filter_descriptions_length1, gboolean allow_multiple, gboolean allow_all, GSList** filenames) {
+#line 350 "DialogUtils.c"
+       gboolean result = FALSE;
+       gboolean return_value;
+       HildonFileChooserDialog* file_chooser;
+       GeeArrayList* filters;
+#line 45 "DialogUtils.vala"
+       g_return_val_if_fail (GTK_IS_WINDOW (parent), FALSE);
+#line 357 "DialogUtils.c"
+       if (filenames != NULL) {
+               *filenames = NULL;
+       }
+#line 47 "DialogUtils.vala"
+       fprintf (stdout, "open called\n");
+#line 48 "DialogUtils.vala"
+       fflush (stdout);
+#line 49 "DialogUtils.vala"
+       return_value = FALSE;
+#line 50 "DialogUtils.vala"
+       file_chooser = g_object_ref_sink ((HildonFileChooserDialog*) hildon_file_chooser_dialog_new (parent, GTK_FILE_CHOOSER_ACTION_OPEN));
+#line 51 "DialogUtils.vala"
+       gtk_window_set_title (GTK_WINDOW (file_chooser), "Open Files");
+#line 55 "DialogUtils.vala"
+       hildon_file_chooser_dialog_set_show_upnp (file_chooser, TRUE);
+#line 56 "DialogUtils.vala"
+       filters = gee_array_list_new (GTK_TYPE_FILE_FILTER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
+#line 57 "DialogUtils.vala"
+       dialog_utils_add_filters (filter_descriptions, filter_descriptions_length1, GTK_FILE_CHOOSER_DIALOG (file_chooser), filters, allow_all);
+#line 58 "DialogUtils.vala"
+       gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (file_chooser), allow_multiple);
+#line 59 "DialogUtils.vala"
+       if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_OK) {
+#line 381 "DialogUtils.c"
+               GSList* _tmp0_;
+#line 60 "DialogUtils.vala"
+               return_value = TRUE;
+#line 61 "DialogUtils.vala"
+               *filenames = (_tmp0_ = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (file_chooser)), __g_slist_free_g_free0 (*filenames), _tmp0_);
+#line 387 "DialogUtils.c"
+       }
+#line 63 "DialogUtils.vala"
+       gtk_object_destroy (GTK_OBJECT (file_chooser));
+#line 391 "DialogUtils.c"
+       result = return_value;
+       _g_object_unref0 (file_chooser);
+       _g_object_unref0 (filters);
+#line 64 "DialogUtils.vala"
+       return result;
+#line 397 "DialogUtils.c"
+}
+
+
+#line 67 "DialogUtils.vala"
+gboolean dialog_utils_save (GtkWindow* parent, const char* title, gboolean create_directory, DialogUtilsfilter_description_struct* filter_descriptions, int filter_descriptions_length1, char** filename) {
+#line 403 "DialogUtils.c"
+       gboolean result = FALSE;
+       gboolean return_value;
+       HildonFileChooserDialog* file_chooser;
+       gint length;
+       GeeArrayList* filters;
+#line 67 "DialogUtils.vala"
+       g_return_val_if_fail (GTK_IS_WINDOW (parent), FALSE);
+#line 67 "DialogUtils.vala"
+       g_return_val_if_fail (title != NULL, FALSE);
+#line 67 "DialogUtils.vala"
+       g_return_val_if_fail (filename != NULL, FALSE);
+#line 69 "DialogUtils.vala"
+       return_value = FALSE;
+#line 72 "DialogUtils.vala"
+       file_chooser = g_object_ref_sink ((HildonFileChooserDialog*) hildon_file_chooser_dialog_new (parent, GTK_FILE_CHOOSER_ACTION_SAVE));
+#line 73 "DialogUtils.vala"
+       gtk_window_set_title (GTK_WINDOW (file_chooser), title);
+#line 74 "DialogUtils.vala"
+       hildon_file_chooser_dialog_set_show_upnp (file_chooser, FALSE);
+#line 75 "DialogUtils.vala"
+       if ((*filename) != NULL) {
+#line 425 "DialogUtils.c"
+               char* _tmp0_;
+#line 76 "DialogUtils.vala"
+               gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (file_chooser), _tmp0_ = g_path_get_dirname (*filename));
+#line 429 "DialogUtils.c"
+               _g_free0 (_tmp0_);
+       } else {
+       }
+#line 80 "DialogUtils.vala"
+       length = filter_descriptions_length1;
+#line 81 "DialogUtils.vala"
+       filters = gee_array_list_new (GTK_TYPE_FILE_FILTER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
+#line 88 "DialogUtils.vala"
+       while (TRUE) {
+#line 439 "DialogUtils.c"
+               char* local_filename;
+               GtkFileFilter* selected_filter;
+               gint i;
+               char* _tmp3_;
+               gboolean _tmp4_ = FALSE;
+#line 88 "DialogUtils.vala"
+               if (!(gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_OK)) {
+#line 88 "DialogUtils.vala"
+                       break;
+#line 449 "DialogUtils.c"
+               }
+#line 89 "DialogUtils.vala"
+               local_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser));
+#line 90 "DialogUtils.vala"
+               if (create_directory) {
+#line 455 "DialogUtils.c"
+                       char* _tmp2_;
+                       char* _tmp1_;
+#line 91 "DialogUtils.vala"
+                       if (g_mkdir (local_filename, 0777) != 0) {
+#line 92 "DialogUtils.vala"
+                               dialog_utils_error ("Could not create directory", g_strerror (errno));
+#line 462 "DialogUtils.c"
+                               ;
+#line 93 "DialogUtils.vala"
+                               gtk_window_present (GTK_WINDOW (file_chooser));
+#line 466 "DialogUtils.c"
+                               _g_free0 (local_filename);
+#line 94 "DialogUtils.vala"
+                               continue;
+#line 470 "DialogUtils.c"
+                       }
+#line 96 "DialogUtils.vala"
+                       local_filename = (_tmp2_ = g_build_filename (local_filename, _tmp1_ = g_path_get_basename (local_filename), NULL), _g_free0 (local_filename), _tmp2_);
+#line 474 "DialogUtils.c"
+                       _g_free0 (_tmp1_);
+               }
+#line 100 "DialogUtils.vala"
+               selected_filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (file_chooser));
+#line 102 "DialogUtils.vala"
+               i = 0;
+#line 481 "DialogUtils.c"
+               {
+                       GeeIterator* _file_filter_it;
+                       _file_filter_it = gee_abstract_collection_iterator (GEE_ABSTRACT_COLLECTION (filters));
+#line 103 "DialogUtils.vala"
+                       while (TRUE) {
+#line 487 "DialogUtils.c"
+                               GtkFileFilter* file_filter;
+#line 103 "DialogUtils.vala"
+                               if (!gee_iterator_next (_file_filter_it)) {
+#line 103 "DialogUtils.vala"
+                                       break;
+#line 493 "DialogUtils.c"
+                               }
+#line 103 "DialogUtils.vala"
+                               file_filter = (GtkFileFilter*) gee_iterator_get (_file_filter_it);
+#line 104 "DialogUtils.vala"
+                               if (file_filter == selected_filter) {
+#line 499 "DialogUtils.c"
+                                       _g_object_unref0 (file_filter);
+#line 105 "DialogUtils.vala"
+                                       break;
+#line 503 "DialogUtils.c"
+                               }
+#line 107 "DialogUtils.vala"
+                               i = i + 1;
+#line 507 "DialogUtils.c"
+                               _g_object_unref0 (file_filter);
+                       }
+                       _g_object_unref0 (_file_filter_it);
+               }
+#line 110 "DialogUtils.vala"
+               g_assert (i < length);
+#line 112 "DialogUtils.vala"
+               local_filename = (_tmp3_ = append_extension (local_filename, filter_descriptions[i].extension), _g_free0 (local_filename), _tmp3_);
+#line 113 "DialogUtils.vala"
+               if (!g_file_test (local_filename, G_FILE_TEST_EXISTS)) {
+#line 113 "DialogUtils.vala"
+                       _tmp4_ = TRUE;
+#line 520 "DialogUtils.c"
+               } else {
+#line 114 "DialogUtils.vala"
+                       _tmp4_ = dialog_utils_confirm_replace (parent, local_filename);
+#line 524 "DialogUtils.c"
+               }
+#line 113 "DialogUtils.vala"
+               if (_tmp4_) {
+#line 528 "DialogUtils.c"
+                       char* _tmp5_;
+#line 115 "DialogUtils.vala"
+                       return_value = TRUE;
+#line 116 "DialogUtils.vala"
+                       *filename = (_tmp5_ = g_strdup (local_filename), _g_free0 (*filename), _tmp5_);
+#line 534 "DialogUtils.c"
+                       _g_free0 (local_filename);
+#line 117 "DialogUtils.vala"
+                       break;
+#line 538 "DialogUtils.c"
+               } else {
+#line 120 "DialogUtils.vala"
+                       gtk_window_present (GTK_WINDOW (file_chooser));
+#line 542 "DialogUtils.c"
+               }
+               _g_free0 (local_filename);
+       }
+#line 123 "DialogUtils.vala"
+       gtk_object_destroy (GTK_OBJECT (file_chooser));
+#line 548 "DialogUtils.c"
+       result = return_value;
+       _g_object_unref0 (file_chooser);
+       _g_object_unref0 (filters);
+#line 124 "DialogUtils.vala"
+       return result;
+#line 554 "DialogUtils.c"
+}
+
+
+#line 127 "DialogUtils.vala"
+char* dialog_utils_bold_message (const char* message) {
+#line 560 "DialogUtils.c"
+       char* result = NULL;
+#line 127 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, NULL);
+#line 564 "DialogUtils.c"
+       result = g_strdup (message);
+#line 128 "DialogUtils.vala"
+       return result;
+#line 568 "DialogUtils.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+       return self ? g_object_ref (self) : NULL;
+}
+
+
+#line 131 "DialogUtils.vala"
+void dialog_utils_warning (const char* major_message, const char* minor_message) {
+#line 579 "DialogUtils.c"
+       char* message;
+       GtkWidget* banner;
+#line 131 "DialogUtils.vala"
+       g_return_if_fail (major_message != NULL);
+#line 132 "DialogUtils.vala"
+       message = dialog_utils_bold_message (major_message);
+#line 133 "DialogUtils.vala"
+       if (minor_message != NULL) {
+#line 588 "DialogUtils.c"
+               char* _tmp1_;
+               char* _tmp0_;
+#line 134 "DialogUtils.vala"
+               message = (_tmp1_ = g_strconcat (_tmp0_ = g_strconcat (message, "\n\n", NULL), minor_message, NULL), _g_free0 (message), _tmp1_);
+#line 593 "DialogUtils.c"
+               _g_free0 (_tmp0_);
+       }
+#line 136 "DialogUtils.vala"
+       banner = _g_object_ref0 (hildon_banner_show_information_with_markup (NULL, NULL, message));
+#line 137 "DialogUtils.vala"
+       hildon_banner_set_timeout (HILDON_BANNER (banner), (guint) (1000 * 2));
+#line 600 "DialogUtils.c"
+       _g_free0 (message);
+       _g_object_unref0 (banner);
+}
+
+
+#line 140 "DialogUtils.vala"
+void dialog_utils_error (const char* major_message, const char* minor_message) {
+#line 608 "DialogUtils.c"
+       char* message;
+       GtkWidget* banner;
+#line 140 "DialogUtils.vala"
+       g_return_if_fail (major_message != NULL);
+#line 141 "DialogUtils.vala"
+       message = dialog_utils_bold_message (major_message);
+#line 142 "DialogUtils.vala"
+       if (minor_message != NULL) {
+#line 617 "DialogUtils.c"
+               char* _tmp1_;
+               char* _tmp0_;
+#line 143 "DialogUtils.vala"
+               message = (_tmp1_ = g_strconcat (_tmp0_ = g_strconcat (message, "\n\n", NULL), minor_message, NULL), _g_free0 (message), _tmp1_);
+#line 622 "DialogUtils.c"
+               _g_free0 (_tmp0_);
+       }
+#line 145 "DialogUtils.vala"
+       banner = _g_object_ref0 (hildon_banner_show_information_with_markup (NULL, NULL, message));
+#line 146 "DialogUtils.vala"
+       hildon_banner_set_timeout (HILDON_BANNER (banner), (guint) (1000 * 2));
+#line 629 "DialogUtils.c"
+       _g_free0 (message);
+       _g_object_unref0 (banner);
+}
+
+
+#line 149 "DialogUtils.vala"
+GtkResponseType dialog_utils_run_dialog (GtkWindow* parent, GtkMessageType type, const char* title, const char* message, DialogUtilsButtonStruct* buttons, int buttons_length1) {
+#line 637 "DialogUtils.c"
+       GtkResponseType result = 0;
+       HildonDialog* dialog;
+       GtkVBox* content;
+       GtkLabel* label;
+       gint length;
+       GtkResponseType response;
+#line 149 "DialogUtils.vala"
+       g_return_val_if_fail ((parent == NULL) || GTK_IS_WINDOW (parent), 0);
+#line 149 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, 0);
+#line 152 "DialogUtils.vala"
+       if (NULL == title) {
+#line 152 "DialogUtils.vala"
+               title = "Message";
+#line 652 "DialogUtils.c"
+       }
+#line 153 "DialogUtils.vala"
+       dialog = g_object_ref_sink ((HildonDialog*) hildon_dialog_new ());
+#line 154 "DialogUtils.vala"
+       gtk_widget_set_parent (GTK_WIDGET (dialog), GTK_WIDGET (parent));
+#line 155 "DialogUtils.vala"
+       gtk_window_set_title (GTK_WINDOW (dialog), title);
+#line 156 "DialogUtils.vala"
+       content = _g_object_ref0 (GTK_VBOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))));
+#line 157 "DialogUtils.vala"
+       label = g_object_ref_sink ((GtkLabel*) gtk_label_new (message));
+#line 159 "DialogUtils.vala"
+       gtk_label_set_single_line_mode (label, FALSE);
+#line 160 "DialogUtils.vala"
+       gtk_label_set_line_wrap (label, TRUE);
+#line 162 "DialogUtils.vala"
+       gtk_container_add (GTK_CONTAINER (content), GTK_WIDGET (label));
+#line 164 "DialogUtils.vala"
+       length = buttons_length1;
+#line 672 "DialogUtils.c"
+       {
+               gint i;
+#line 165 "DialogUtils.vala"
+               i = 0;
+#line 677 "DialogUtils.c"
+               {
+                       gboolean _tmp0_;
+#line 165 "DialogUtils.vala"
+                       _tmp0_ = TRUE;
+#line 165 "DialogUtils.vala"
+                       while (TRUE) {
+#line 165 "DialogUtils.vala"
+                               if (!_tmp0_) {
+#line 165 "DialogUtils.vala"
+                                       i = i + 1;
+#line 688 "DialogUtils.c"
+                               }
+#line 165 "DialogUtils.vala"
+                               _tmp0_ = FALSE;
+#line 165 "DialogUtils.vala"
+                               if (!(i < length)) {
+#line 165 "DialogUtils.vala"
+                                       break;
+#line 696 "DialogUtils.c"
+                               }
+#line 166 "DialogUtils.vala"
+                               hildon_dialog_add_button (dialog, buttons[i].title, (gint) buttons[i].type);
+#line 700 "DialogUtils.c"
+                       }
+               }
+       }
+#line 169 "DialogUtils.vala"
+       gtk_widget_show_all (GTK_WIDGET (dialog));
+#line 170 "DialogUtils.vala"
+       response = (GtkResponseType) gtk_dialog_run (GTK_DIALOG (dialog));
+#line 171 "DialogUtils.vala"
+       gtk_object_destroy (GTK_OBJECT (dialog));
+#line 710 "DialogUtils.c"
+       result = response;
+       _g_object_unref0 (dialog);
+       _g_object_unref0 (content);
+       _g_object_unref0 (label);
+#line 173 "DialogUtils.vala"
+       return result;
+#line 717 "DialogUtils.c"
+}
+
+
+#line 176 "DialogUtils.vala"
+GtkResponseType dialog_utils_two_button_dialog (const char* message, const char* first_button, const char* second_button) {
+#line 723 "DialogUtils.c"
+       GtkResponseType result = 0;
+       HildonDialog* d;
+       GtkVBox* contents;
+       GtkVBox* vbox;
+       GtkLabel* label;
+       GtkResponseType r;
+#line 176 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, 0);
+#line 176 "DialogUtils.vala"
+       g_return_val_if_fail (first_button != NULL, 0);
+#line 176 "DialogUtils.vala"
+       g_return_val_if_fail (second_button != NULL, 0);
+#line 177 "DialogUtils.vala"
+       d = g_object_ref_sink ((HildonDialog*) hildon_dialog_new ());
+#line 179 "DialogUtils.vala"
+       contents = _g_object_ref0 (GTK_VBOX (gtk_dialog_get_content_area (GTK_DIALOG (d))));
+#line 180 "DialogUtils.vala"
+       vbox = g_object_ref_sink ((GtkVBox*) gtk_vbox_new (TRUE, 4));
+#line 181 "DialogUtils.vala"
+       label = g_object_ref_sink ((GtkLabel*) gtk_label_new (message));
+#line 182 "DialogUtils.vala"
+       gtk_label_set_use_markup (label, TRUE);
+#line 183 "DialogUtils.vala"
+       gtk_label_set_single_line_mode (label, FALSE);
+#line 184 "DialogUtils.vala"
+       gtk_label_set_line_wrap (label, TRUE);
+#line 185 "DialogUtils.vala"
+       gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (label), TRUE, TRUE, 0);
+#line 186 "DialogUtils.vala"
+       gtk_container_add (GTK_CONTAINER (contents), GTK_WIDGET (vbox));
+#line 187 "DialogUtils.vala"
+       hildon_dialog_add_buttons (d, first_button, GTK_RESPONSE_NO, second_button, GTK_RESPONSE_YES, NULL);
+#line 190 "DialogUtils.vala"
+       gtk_widget_show_all (GTK_WIDGET (d));
+#line 191 "DialogUtils.vala"
+       r = (GtkResponseType) gtk_dialog_run (GTK_DIALOG (d));
+#line 192 "DialogUtils.vala"
+       gtk_object_destroy (GTK_OBJECT (d));
+#line 762 "DialogUtils.c"
+       result = r;
+       _g_object_unref0 (d);
+       _g_object_unref0 (contents);
+       _g_object_unref0 (vbox);
+       _g_object_unref0 (label);
+#line 194 "DialogUtils.vala"
+       return result;
+#line 770 "DialogUtils.c"
+}
+
+
+#line 197 "DialogUtils.vala"
+GtkResponseType dialog_utils_delete_keep (const char* message) {
+#line 776 "DialogUtils.c"
+       GtkResponseType result = 0;
+#line 197 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, 0);
+#line 780 "DialogUtils.c"
+       result = dialog_utils_two_button_dialog (message, "Keep", GTK_STOCK_DELETE);
+#line 198 "DialogUtils.vala"
+       return result;
+#line 784 "DialogUtils.c"
+}
+
+
+#line 201 "DialogUtils.vala"
+GtkResponseType dialog_utils_add_cancel (const char* message) {
+#line 790 "DialogUtils.c"
+       GtkResponseType result = 0;
+#line 201 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, 0);
+#line 794 "DialogUtils.c"
+       result = dialog_utils_two_button_dialog (message, GTK_STOCK_CANCEL, GTK_STOCK_ADD);
+#line 202 "DialogUtils.vala"
+       return result;
+#line 798 "DialogUtils.c"
+}
+
+
+#line 205 "DialogUtils.vala"
+GtkResponseType dialog_utils_delete_cancel (const char* message) {
+#line 804 "DialogUtils.c"
+       GtkResponseType result = 0;
+#line 205 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, 0);
+#line 808 "DialogUtils.c"
+       result = dialog_utils_two_button_dialog (message, GTK_STOCK_CANCEL, GTK_STOCK_DELETE);
+#line 206 "DialogUtils.vala"
+       return result;
+#line 812 "DialogUtils.c"
+}
+
+
+#line 209 "DialogUtils.vala"
+gboolean dialog_utils_confirm_replace (GtkWindow* parent, const char* filename) {
+#line 818 "DialogUtils.c"
+       gboolean result = FALSE;
+#line 209 "DialogUtils.vala"
+       g_return_val_if_fail ((parent == NULL) || GTK_IS_WINDOW (parent), FALSE);
+#line 209 "DialogUtils.vala"
+       g_return_val_if_fail (filename != NULL, FALSE);
+#line 824 "DialogUtils.c"
+       result = GTK_RESPONSE_YES == dialog_utils_two_button_dialog ("<big><b>A file named \"%s\" already exists.  Do you want to replace it" \
+"?</b></big>", "Cancel", "Replace");
+#line 210 "DialogUtils.vala"
+       return result;
+#line 828 "DialogUtils.c"
+}
+
+
+#line 214 "DialogUtils.vala"
+void dialog_utils_button_struct_init (DialogUtilsButtonStruct *self, const char* title, GtkResponseType type) {
+#line 834 "DialogUtils.c"
+       char* _tmp0_;
+#line 214 "DialogUtils.vala"
+       g_return_if_fail (title != NULL);
+#line 838 "DialogUtils.c"
+       memset (self, 0, sizeof (DialogUtilsButtonStruct));
+#line 215 "DialogUtils.vala"
+       (*self).title = (_tmp0_ = g_strdup (title), _g_free0 ((*self).title), _tmp0_);
+#line 216 "DialogUtils.vala"
+       (*self).type = type;
+#line 844 "DialogUtils.c"
+}
+
+
+void dialog_utils_button_struct_copy (const DialogUtilsButtonStruct* self, DialogUtilsButtonStruct* dest) {
+       dest->title = g_strdup (self->title);
+       dest->type = self->type;
+}
+
+
+void dialog_utils_button_struct_destroy (DialogUtilsButtonStruct* self) {
+       _g_free0 (self->title);
+}
+
+
+DialogUtilsButtonStruct* dialog_utils_button_struct_dup (const DialogUtilsButtonStruct* self) {
+       DialogUtilsButtonStruct* dup;
+       dup = g_new0 (DialogUtilsButtonStruct, 1);
+       dialog_utils_button_struct_copy (self, dup);
+       return dup;
+}
+
+
+void dialog_utils_button_struct_free (DialogUtilsButtonStruct* self) {
+       dialog_utils_button_struct_destroy (self);
+       g_free (self);
+}
+
+
+GType dialog_utils_button_struct_get_type (void) {
+       static volatile gsize dialog_utils_button_struct_type_id__volatile = 0;
+       if (g_once_init_enter (&dialog_utils_button_struct_type_id__volatile)) {
+               GType dialog_utils_button_struct_type_id;
+               dialog_utils_button_struct_type_id = g_boxed_type_register_static ("DialogUtilsButtonStruct", (GBoxedCopyFunc) dialog_utils_button_struct_dup, (GBoxedFreeFunc) dialog_utils_button_struct_free);
+               g_once_init_leave (&dialog_utils_button_struct_type_id__volatile, dialog_utils_button_struct_type_id);
+       }
+       return dialog_utils_button_struct_type_id__volatile;
+}
+
+
+static void _vala_DialogUtilsButtonStruct_array_free (DialogUtilsButtonStruct* array, gint array_length) {
+       if (array != NULL) {
+               int i;
+               for (i = 0; i < array_length; i = i + 1) {
+                       dialog_utils_button_struct_destroy (&array[i]);
+               }
+       }
+       g_free (array);
+}
+
+
+#line 223 "DialogUtils.vala"
+GtkResponseType dialog_utils_save_close_cancel (GtkWindow* parent, const char* title, const char* message) {
+#line 897 "DialogUtils.c"
+       GtkResponseType result = 0;
+       DialogUtilsButtonStruct* _tmp4_;
+       gint _buttons_size_;
+       gint buttons_length1;
+       DialogUtilsButtonStruct* _tmp3_ = NULL;
+       DialogUtilsButtonStruct _tmp0_ = {0};
+       DialogUtilsButtonStruct _tmp1_ = {0};
+       DialogUtilsButtonStruct _tmp2_ = {0};
+       DialogUtilsButtonStruct* buttons;
+#line 223 "DialogUtils.vala"
+       g_return_val_if_fail ((parent == NULL) || GTK_IS_WINDOW (parent), 0);
+#line 223 "DialogUtils.vala"
+       g_return_val_if_fail (message != NULL, 0);
+#line 911 "DialogUtils.c"
+       buttons = (_tmp4_ = (_tmp3_ = g_new0 (DialogUtilsButtonStruct, 3), _tmp3_[0] = (dialog_utils_button_struct_init (&_tmp0_, GTK_STOCK_CLOSE, GTK_RESPONSE_NO), _tmp0_), _tmp3_[1] = (dialog_utils_button_struct_init (&_tmp1_, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL), _tmp1_), _tmp3_[2] = (dialog_utils_button_struct_init (&_tmp2_, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT), _tmp2_), _tmp3_), buttons_length1 = 3, _buttons_size_ = buttons_length1, _tmp4_);
+       result = dialog_utils_run_dialog (parent, GTK_MESSAGE_WARNING, title, message, buttons, buttons_length1);
+       buttons = (_vala_DialogUtilsButtonStruct_array_free (buttons, buttons_length1), NULL);
+#line 230 "DialogUtils.vala"
+       return result;
+#line 917 "DialogUtils.c"
+}
+
+
+#line 233 "DialogUtils.vala"
+GtkAlignment* dialog_utils_get_aligned_label (float x, float y, float exp_x, float exp_y, const char* text, gboolean selectable) {
+#line 923 "DialogUtils.c"
+       GtkAlignment* result = NULL;
+       GtkLabel* l;
+       GtkAlignment* a;
+#line 233 "DialogUtils.vala"
+       g_return_val_if_fail (text != NULL, NULL);
+#line 235 "DialogUtils.vala"
+       l = g_object_ref_sink ((GtkLabel*) gtk_label_new (text));
+#line 236 "DialogUtils.vala"
+       gtk_label_set_line_wrap (l, TRUE);
+#line 237 "DialogUtils.vala"
+       gtk_label_set_use_markup (l, TRUE);
+#line 238 "DialogUtils.vala"
+       gtk_label_set_selectable (l, selectable);
+#line 240 "DialogUtils.vala"
+       a = g_object_ref_sink ((GtkAlignment*) gtk_alignment_new (x, y, exp_x, exp_y));
+#line 241 "DialogUtils.vala"
+       gtk_container_add (GTK_CONTAINER (a), GTK_WIDGET (l));
+#line 941 "DialogUtils.c"
+       result = a;
+       _g_object_unref0 (l);
+#line 243 "DialogUtils.vala"
+       return result;
+#line 946 "DialogUtils.c"
+}
+
+
+#line 246 "DialogUtils.vala"
+void dialog_utils_add_label_to_table (GtkTable* t, const char* str, gint x, gint y, gint xpad, gint ypad, gboolean selectable) {
+#line 952 "DialogUtils.c"
+       GtkAlignment* a;
+#line 246 "DialogUtils.vala"
+       g_return_if_fail (GTK_IS_TABLE (t));
+#line 246 "DialogUtils.vala"
+       g_return_if_fail (str != NULL);
+#line 248 "DialogUtils.vala"
+       a = dialog_utils_get_aligned_label (0.0f, 0.0f, 0.0f, 0.0f, str, selectable);
+#line 249 "DialogUtils.vala"
+       gtk_table_attach (t, GTK_WIDGET (a), (guint) x, (guint) (x + 1), (guint) y, (guint) (y + 1), GTK_FILL, GTK_FILL, (guint) xpad, (guint) ypad);
+#line 962 "DialogUtils.c"
+       _g_object_unref0 (a);
+}
+
+
+#line 252 "DialogUtils.vala"
+void dialog_utils_show_clip_properties (GtkWindow* parent, ClipView* selected_clip, ModelClipFile* clip_file, Fraction* frames_per_second) {
+#line 969 "DialogUtils.c"
+       HildonDialog* d;
+       GtkTable* t;
+       gint row;
+       gint tab_padding;
+       char* _tmp2_;
+#line 252 "DialogUtils.vala"
+       g_return_if_fail (GTK_IS_WINDOW (parent));
+#line 252 "DialogUtils.vala"
+       g_return_if_fail ((selected_clip == NULL) || IS_CLIP_VIEW (selected_clip));
+#line 252 "DialogUtils.vala"
+       g_return_if_fail ((clip_file == NULL) || MODEL_IS_CLIP_FILE (clip_file));
+#line 254 "DialogUtils.vala"
+       d = g_object_ref_sink ((HildonDialog*) hildon_dialog_new_with_buttons ("Clip Properties", parent, GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL));
+#line 256 "DialogUtils.vala"
+       if (selected_clip != NULL) {
+#line 257 "DialogUtils.vala"
+               clip_file = selected_clip->clip->clipfile;
+#line 987 "DialogUtils.c"
+       }
+#line 260 "DialogUtils.vala"
+       g_object_set (G_OBJECT (d), "has-separator", FALSE, NULL);
+#line 262 "DialogUtils.vala"
+       t = g_object_ref_sink ((GtkTable*) gtk_table_new ((guint) 10, (guint) 2, FALSE));
+#line 263 "DialogUtils.vala"
+       row = 0;
+#line 264 "DialogUtils.vala"
+       tab_padding = 25;
+#line 997 "DialogUtils.c"
+       {
+               gint i;
+#line 266 "DialogUtils.vala"
+               i = 0;
+#line 1002 "DialogUtils.c"
+               {
+                       gboolean _tmp0_;
+#line 266 "DialogUtils.vala"
+                       _tmp0_ = TRUE;
+#line 266 "DialogUtils.vala"
+                       while (TRUE) {
+#line 266 "DialogUtils.vala"
+                               if (!_tmp0_) {
+#line 266 "DialogUtils.vala"
+                                       i++;
+#line 1013 "DialogUtils.c"
+                               }
+#line 266 "DialogUtils.vala"
+                               _tmp0_ = FALSE;
+#line 266 "DialogUtils.vala"
+                               if (!(i < 10)) {
+#line 266 "DialogUtils.vala"
+                                       break;
+#line 1021 "DialogUtils.c"
+                               }
+#line 267 "DialogUtils.vala"
+                               gtk_table_set_row_spacing (t, (guint) i, (guint) 10);
+#line 1025 "DialogUtils.c"
+                       }
+               }
+       }
+#line 269 "DialogUtils.vala"
+       row = 1;
+#line 270 "DialogUtils.vala"
+       dialog_utils_add_label_to_table (t, "<b>Clip</b>", 0, row++, 5, 0, FALSE);
+#line 272 "DialogUtils.vala"
+       if (selected_clip != NULL) {
+#line 1035 "DialogUtils.c"
+               char* _tmp1_;
+#line 273 "DialogUtils.vala"
+               dialog_utils_add_label_to_table (t, "<i>Name:</i>", 0, row, tab_padding, 0, FALSE);
+#line 274 "DialogUtils.vala"
+               dialog_utils_add_label_to_table (t, _tmp1_ = g_strdup_printf ("%s", selected_clip->clip->name), 1, row++, 5, 0, TRUE);
+#line 1041 "DialogUtils.c"
+               _g_free0 (_tmp1_);
+       }
+#line 277 "DialogUtils.vala"
+       dialog_utils_add_label_to_table (t, "<i>Location:</i>", 0, row, tab_padding, 0, FALSE);
+#line 278 "DialogUtils.vala"
+       dialog_utils_add_label_to_table (t, _tmp2_ = g_strdup_printf ("%s", clip_file->filename), 1, row++, 5, 0, TRUE);
+#line 1048 "DialogUtils.c"
+       _g_free0 (_tmp2_);
+#line 280 "DialogUtils.vala"
+       if (selected_clip != NULL) {
+#line 1052 "DialogUtils.c"
+               char* length_string;
+               char* actual_length;
+               gboolean _tmp3_ = FALSE;
+               char* _tmp10_;
+#line 281 "DialogUtils.vala"
+               dialog_utils_add_label_to_table (t, "<i>Timeline length:</i>", 0, row, tab_padding, 0, FALSE);
+#line 283 "DialogUtils.vala"
+               length_string = g_strdup ("");
+#line 284 "DialogUtils.vala"
+               actual_length = g_strdup ("");
+#line 286 "DialogUtils.vala"
+               if (frames_per_second != NULL) {
+#line 286 "DialogUtils.vala"
+                       _tmp3_ = (*frames_per_second).numerator > 0;
+#line 1067 "DialogUtils.c"
+               } else {
+#line 286 "DialogUtils.vala"
+                       _tmp3_ = FALSE;
+#line 1071 "DialogUtils.c"
+               }
+#line 286 "DialogUtils.vala"
+               if (_tmp3_) {
+#line 1075 "DialogUtils.c"
+                       TimeCode _tmp4_ = {0};
+                       TimeCode time;
+                       char* _tmp5_;
+                       TimeCode _tmp6_ = {0};
+                       char* _tmp7_;
+#line 287 "DialogUtils.vala"
+                       time = (frame_to_time (time_to_frame_with_rate (model_clip_get_duration (selected_clip->clip), frames_per_second), frames_per_second, &_tmp4_), _tmp4_);
+#line 289 "DialogUtils.vala"
+                       length_string = (_tmp5_ = time_code_to_string (&time), _g_free0 (length_string), _tmp5_);
+#line 290 "DialogUtils.vala"
+                       time = (frame_to_time (time_to_frame_with_rate (model_clip_file_get_length (selected_clip->clip->clipfile), frames_per_second), frames_per_second, &_tmp6_), _tmp6_);
+#line 292 "DialogUtils.vala"
+                       actual_length = (_tmp7_ = time_code_to_string (&time), _g_free0 (actual_length), _tmp7_);
+#line 1089 "DialogUtils.c"
+               } else {
+                       char* _tmp8_;
+                       char* _tmp9_;
+#line 294 "DialogUtils.vala"
+                       length_string = (_tmp8_ = time_to_string (model_clip_get_duration (selected_clip->clip)), _g_free0 (length_string), _tmp8_);
+#line 295 "DialogUtils.vala"
+                       actual_length = (_tmp9_ = time_to_string (model_clip_file_get_length (selected_clip->clip->clipfile)), _g_free0 (actual_length), _tmp9_);
+#line 1097 "DialogUtils.c"
+               }
+#line 298 "DialogUtils.vala"
+               dialog_utils_add_label_to_table (t, _tmp10_ = g_strdup_printf ("%s", length_string), 1, row++, 5, 0, TRUE);
+#line 1101 "DialogUtils.c"
+               _g_free0 (_tmp10_);
+#line 300 "DialogUtils.vala"
+               if (model_clip_is_trimmed (selected_clip->clip)) {
+#line 1105 "DialogUtils.c"
+                       char* _tmp11_;
+#line 301 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, "<i>Actual length:</i>", 0, row, tab_padding, 0, FALSE);
+#line 302 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, _tmp11_ = g_strdup_printf ("%s", actual_length), 1, row++, 5, 0, TRUE);
+#line 1111 "DialogUtils.c"
+                       _g_free0 (_tmp11_);
+               }
+               _g_free0 (length_string);
+               _g_free0 (actual_length);
+       }
+#line 306 "DialogUtils.vala"
+       if (model_clip_file_has_caps_structure (clip_file, MODEL_MEDIA_TYPE_VIDEO)) {
+#line 1119 "DialogUtils.c"
+               gint w = 0;
+               gint h = 0;
+               Fraction r = {0};
+#line 307 "DialogUtils.vala"
+               dialog_utils_add_label_to_table (t, "<b>Video</b>", 0, row++, 5, 0, FALSE);
+#line 310 "DialogUtils.vala"
+               if (model_clip_file_get_dimensions (clip_file, &w, &h)) {
+#line 1127 "DialogUtils.c"
+                       char* _tmp12_;
+#line 311 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, "<i>Dimensions:</i>", 0, row, tab_padding, 0, FALSE);
+#line 312 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, _tmp12_ = g_strdup_printf ("%d x %d", w, h), 1, row++, 5, 0, TRUE);
+#line 1133 "DialogUtils.c"
+                       _g_free0 (_tmp12_);
+               }
+#line 316 "DialogUtils.vala"
+               if (model_clip_file_get_frame_rate (clip_file, &r)) {
+#line 317 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, "<i>Frame rate:</i>", 0, row, tab_padding, 0, FALSE);
+#line 319 "DialogUtils.vala"
+                       if ((r.numerator % r.denominator) != 0) {
+#line 1142 "DialogUtils.c"
+                               char* _tmp13_;
+#line 320 "DialogUtils.vala"
+                               dialog_utils_add_label_to_table (t, _tmp13_ = g_strdup_printf ("%.2f frames per second", (double) (r.numerator / ((float) r.denominator))), 1, row++, 5, 0, TRUE);
+#line 1146 "DialogUtils.c"
+                               _g_free0 (_tmp13_);
+                       } else {
+                               char* _tmp14_;
+#line 324 "DialogUtils.vala"
+                               dialog_utils_add_label_to_table (t, _tmp14_ = g_strdup_printf ("%d frames per second", r.numerator / r.denominator), 1, row++, 5, 0, TRUE);
+#line 1152 "DialogUtils.c"
+                               _g_free0 (_tmp14_);
+                       }
+               }
+       }
+#line 330 "DialogUtils.vala"
+       if (model_clip_file_has_caps_structure (clip_file, MODEL_MEDIA_TYPE_AUDIO)) {
+#line 1159 "DialogUtils.c"
+               gint rate = 0;
+               char* s;
+               char* _tmp18_;
+               gboolean _tmp17_;
+               char* _tmp16_ = NULL;
+#line 331 "DialogUtils.vala"
+               dialog_utils_add_label_to_table (t, "<b>Audio</b>", 0, row++, 5, 0, FALSE);
+#line 334 "DialogUtils.vala"
+               if (model_clip_file_get_sample_rate (clip_file, &rate)) {
+#line 1169 "DialogUtils.c"
+                       char* _tmp15_;
+#line 335 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, "<i>Sample rate:</i>", 0, row, tab_padding, 0, FALSE);
+#line 336 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, _tmp15_ = g_strdup_printf ("%d Hz", rate), 1, row++, 5, 0, TRUE);
+#line 1175 "DialogUtils.c"
+                       _g_free0 (_tmp15_);
+               }
+               s = NULL;
+#line 340 "DialogUtils.vala"
+               if ((_tmp17_ = model_clip_file_get_num_channels_string (clip_file, &_tmp16_), s = (_tmp18_ = _tmp16_, _g_free0 (s), _tmp18_), _tmp17_)) {
+#line 1181 "DialogUtils.c"
+                       char* _tmp19_;
+#line 341 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, "<i>Number of channels:</i>", 0, row, tab_padding, 0, FALSE);
+#line 342 "DialogUtils.vala"
+                       dialog_utils_add_label_to_table (t, _tmp19_ = g_strdup_printf ("%s", s), 1, row++, 5, 0, TRUE);
+#line 1187 "DialogUtils.c"
+                       _g_free0 (_tmp19_);
+               }
+               _g_free0 (s);
+       }
+#line 346 "DialogUtils.vala"
+       gtk_box_pack_start (GTK_BOX (GTK_DIALOG (d)->vbox), GTK_WIDGET (t), FALSE, FALSE, (guint) 0);
+#line 348 "DialogUtils.vala"
+       gtk_widget_show_all (GTK_WIDGET (d));
+#line 349 "DialogUtils.vala"
+       gtk_dialog_run (GTK_DIALOG (d));
+#line 350 "DialogUtils.vala"
+       gtk_object_destroy (GTK_OBJECT (d));
+#line 1200 "DialogUtils.c"
+       _g_object_unref0 (d);
+       _g_object_unref0 (t);
+}
+
+
+
+