Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 619343 Details for
Bug 861712
gedit crash when opening a vala generated c file
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
File that crashes the program
swell-foop.c (text/x-csrc), 54.10 KB, created by
Ignacio Hernandez
on 2012-09-30 07:37:02 UTC
(
hide
)
Description:
File that crashes the program
Filename:
MIME Type:
Creator:
Ignacio Hernandez
Created:
2012-09-30 07:37:02 UTC
Size:
54.10 KB
patch
obsolete
>/* swell-foop.c generated by valac 0.18.0, the Vala compiler > * generated from swell-foop.vala, do not modify */ > > >#include <glib.h> >#include <glib-object.h> >#include <gtk/gtk.h> >#include <stdlib.h> >#include <string.h> >#include <gio/gio.h> >#include <clutter/clutter.h> >#include <clutter-gtk/clutter-gtk.h> >#include <games-scores.h> >#include <glib/gi18n-lib.h> >#include <gdk/gdk.h> >#include <games-score.h> >#include <float.h> >#include <math.h> >#include <games-scores-dialog.h> >#include <locale.h> >#include <stdio.h> > > >#define TYPE_SWELL_FOOP (swell_foop_get_type ()) >#define SWELL_FOOP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SWELL_FOOP, SwellFoop)) >#define SWELL_FOOP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SWELL_FOOP, SwellFoopClass)) >#define IS_SWELL_FOOP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SWELL_FOOP)) >#define IS_SWELL_FOOP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SWELL_FOOP)) >#define SWELL_FOOP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SWELL_FOOP, SwellFoopClass)) > >typedef struct _SwellFoop SwellFoop; >typedef struct _SwellFoopClass SwellFoopClass; >typedef struct _SwellFoopPrivate SwellFoopPrivate; > >#define TYPE_SIZE (size_get_type ()) >typedef struct _Size Size; > >#define TYPE_GAME (game_get_type ()) >#define GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME, Game)) >#define GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME, GameClass)) >#define IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME)) >#define IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME)) >#define GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME, GameClass)) > >typedef struct _Game Game; >typedef struct _GameClass GameClass; > >#define TYPE_GAME_VIEW (game_view_get_type ()) >#define GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME_VIEW, GameView)) >#define GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME_VIEW, GameViewClass)) >#define IS_GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME_VIEW)) >#define IS_GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME_VIEW)) >#define GAME_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME_VIEW, GameViewClass)) > >typedef struct _GameView GameView; >typedef struct _GameViewClass GameViewClass; >#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) >#define _g_free0(var) (var = (g_free (var), NULL)) >typedef struct _GameViewPrivate GameViewPrivate; >#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) >#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL))) > >struct _Size { > gchar* id; > gchar* name; > gint columns; > gint rows; >}; > >struct _SwellFoop { > GtkApplication parent_instance; > SwellFoopPrivate * priv; > Size* sizes; > gint sizes_length1; >}; > >struct _SwellFoopClass { > GtkApplicationClass parent_class; >}; > >struct _SwellFoopPrivate { > GSettings* settings; > GtkWindow* main_window; > Game* game; > GameView* view; > ClutterStage* stage; > GtkClutterEmbed* clutter_embed; > GamesScores* high_scores; > GtkDialog* preferences_dialog; > GtkLabel* current_score_label; >}; > >struct _GameView { > ClutterGroup parent_instance; > GameViewPrivate * priv; > gboolean is_zealous; >}; > >struct _GameViewClass { > ClutterGroupClass parent_class; >}; > > >static gpointer swell_foop_parent_class = NULL; > >GType swell_foop_get_type (void) G_GNUC_CONST; >GType size_get_type (void) G_GNUC_CONST; >Size* size_dup (const Size* self); >void size_free (Size* self); >void size_copy (const Size* self, Size* dest); >void size_destroy (Size* self); >GType game_get_type (void) G_GNUC_CONST; >GType game_view_get_type (void) G_GNUC_CONST; >#define SWELL_FOOP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SWELL_FOOP, SwellFoopPrivate)) >enum { > SWELL_FOOP_DUMMY_PROPERTY >}; >static void _vala_Size_array_free (Size* array, gint array_length); >static void swell_foop_new_game_cb (SwellFoop* self); >static void _swell_foop_new_game_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); >static void swell_foop_scores_cb (SwellFoop* self); >static void _swell_foop_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); >void swell_foop_preferences_cb (SwellFoop* self); >static void _swell_foop_preferences_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); >static void swell_foop_help_cb (SwellFoop* self); >static void _swell_foop_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); >static void swell_foop_about_cb (SwellFoop* self); >static void _swell_foop_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); >static void swell_foop_quit_cb (SwellFoop* self); >static void _swell_foop_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); >SwellFoop* swell_foop_new (void); >SwellFoop* swell_foop_construct (GType object_type); >static void swell_foop_real_startup (GApplication* base); >static void swell_foop_update_score_cb (SwellFoop* self, gint points_awarded); >static void swell_foop_get_size (SwellFoop* self, Size* result); >Game* game_new (gint rows, gint columns, gint color_num); >Game* game_construct (GType object_type, gint rows, gint columns, gint color_num); >static void _swell_foop_update_score_cb_game_update_score (Game* _sender, gint points_awarded, gpointer self); >static void swell_foop_complete_cb (SwellFoop* self); >static void _swell_foop_complete_cb_game_complete (Game* _sender, gpointer self); >GameView* game_view_new (void); >GameView* game_view_construct (GType object_type); >void game_view_set_theme_name (GameView* self, const gchar* value); >void game_view_set_game (GameView* self, Game* value); >gboolean game_view_board_left_cb (GameView* self); >static gboolean _game_view_board_left_cb_gtk_widget_leave_notify_event (GtkWidget* _sender, GdkEventCrossing* event, gpointer self); >static void _vala_GamesScoresCategory_array_free (GamesScoresCategory* array, gint array_length); >static gboolean swell_foop_key_release_event_cb (SwellFoop* self, ClutterActor* actor, ClutterKeyEvent* event); >static gboolean _swell_foop_key_release_event_cb_clutter_actor_key_release_event (ClutterActor* _sender, ClutterKeyEvent* event, gpointer self); >void swell_foop_new_game (SwellFoop* self); >void game_view_cursor_move (GameView* self, gint x, gint y); >void game_view_cursor_click (GameView* self); >gint game_get_score (Game* self); >static void swell_foop_real_shutdown (GApplication* base); >gboolean game_has_completed (Game* self); >static void swell_foop_real_activate (GApplication* base); >static void swell_foop_preferences_response_cb (SwellFoop* self); >static void _swell_foop_preferences_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self); >void G_MODULE_EXPORT select_theme (GtkComboBox* theme_combo, SwellFoop* self); >void G_MODULE_EXPORT set_zealous_animation (GtkCheckButton* button, SwellFoop* self); >void G_MODULE_EXPORT update_size (GtkComboBox* size_combo, SwellFoop* self); >void G_MODULE_EXPORT update_colors (GtkSpinButton* button, SwellFoop* self); >void swell_foop_show (SwellFoop* self); >gint swell_foop_main (gchar** args, int args_length1); >static void swell_foop_finalize (GObject* obj); >static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); >static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); > >static const GActionEntry SWELL_FOOP_action_entries[6] = {{"new-game", _swell_foop_new_game_cb_gsimple_action_activate_callback}, {"scores", _swell_foop_scores_cb_gsimple_action_activate_callback}, {"preferences", _swell_foop_preferences_cb_gsimple_action_activate_callback}, {"help", _swell_foop_help_cb_gsimple_action_activate_callback}, {"about", _swell_foop_about_cb_gsimple_action_activate_callback}, {"quit", _swell_foop_quit_cb_gsimple_action_activate_callback}}; > >static void _vala_Size_array_free (Size* array, gint array_length) { > if (array != NULL) { > int i; > for (i = 0; i < array_length; i = i + 1) { > size_destroy (&array[i]); > } > } > g_free (array); >} > > >static void _swell_foop_new_game_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { > swell_foop_new_game_cb (self); >} > > >static void _swell_foop_scores_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { > swell_foop_scores_cb (self); >} > > >static void _swell_foop_preferences_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { > swell_foop_preferences_cb (self); >} > > >static void _swell_foop_help_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { > swell_foop_help_cb (self); >} > > >static void _swell_foop_about_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { > swell_foop_about_cb (self); >} > > >static void _swell_foop_quit_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { > swell_foop_quit_cb (self); >} > > >SwellFoop* swell_foop_construct (GType object_type) { > SwellFoop * self = NULL; > self = (SwellFoop*) g_object_new (object_type, "application-id", "org.gnome.swell-foop", "flags", G_APPLICATION_FLAGS_NONE, NULL); > return self; >} > > >SwellFoop* swell_foop_new (void) { > return swell_foop_construct (TYPE_SWELL_FOOP); >} > > >static gpointer _g_object_ref0 (gpointer self) { > return self ? g_object_ref (self) : NULL; >} > > >static void _swell_foop_update_score_cb_game_update_score (Game* _sender, gint points_awarded, gpointer self) { > swell_foop_update_score_cb (self, points_awarded); >} > > >static void _swell_foop_complete_cb_game_complete (Game* _sender, gpointer self) { > swell_foop_complete_cb (self); >} > > >static gboolean _game_view_board_left_cb_gtk_widget_leave_notify_event (GtkWidget* _sender, GdkEventCrossing* event, gpointer self) { > gboolean result; > result = game_view_board_left_cb (self); > return result; >} > > >static void _vala_GamesScoresCategory_array_free (GamesScoresCategory* array, gint array_length) { > if (array != NULL) { > int i; > for (i = 0; i < array_length; i = i + 1) { > (&array[i]); > } > } > g_free (array); >} > > >static gboolean _swell_foop_key_release_event_cb_clutter_actor_key_release_event (ClutterActor* _sender, ClutterKeyEvent* event, gpointer self) { > gboolean result; > result = swell_foop_key_release_event_cb (self, _sender, event); > return result; >} > > >static void swell_foop_real_startup (GApplication* base) { > SwellFoop * self; > GSettings* _tmp0_; > GtkApplicationWindow* _tmp1_; > GtkWindow* _tmp2_; > const gchar* _tmp3_ = NULL; > GtkWindow* _tmp4_; > GtkBox* _tmp5_; > GtkBox* vbox; > GtkWindow* _tmp6_; > GMenu* _tmp7_; > GMenu* menu; > GMenu* _tmp8_; > GMenu* section; > GMenu* _tmp9_; > GMenu* _tmp10_; > const gchar* _tmp11_ = NULL; > GMenu* _tmp12_; > const gchar* _tmp13_ = NULL; > GMenu* _tmp14_; > const gchar* _tmp15_ = NULL; > GMenu* _tmp16_; > GMenu* _tmp17_; > GMenu* _tmp18_; > const gchar* _tmp19_ = NULL; > GMenu* _tmp20_; > const gchar* _tmp21_ = NULL; > GMenu* _tmp22_; > GMenu* _tmp23_; > GMenu* _tmp24_; > const gchar* _tmp25_ = NULL; > GtkToolbar* _tmp26_; > GtkToolbar* toolbar; > GtkStyleContext* _tmp27_ = NULL; > GtkToolButton* _tmp28_; > GtkToolButton* new_game_button; > GtkToolButton* _tmp29_; > GtkToolButton* preferences_button; > GtkBox* _tmp30_; > GtkBox* status_box; > GtkLabel* _tmp31_; > GtkLabel* _tmp32_; > GtkLabel* _tmp33_; > GtkToolItem* _tmp34_; > GtkToolItem* status_item; > GtkClutterEmbed* _tmp35_; > GtkClutterEmbed* _tmp36_; > GtkClutterEmbed* _tmp37_; > GtkClutterEmbed* _tmp38_; > ClutterActor* _tmp39_ = NULL; > ClutterStage* _tmp40_; > ClutterStage* _tmp41_; > ClutterColor _tmp42_ = {0}; > Size* _tmp43_ = NULL; > Size* _tmp44_; > gint _tmp44__length1; > gchar* _tmp45_; > const gchar* _tmp46_ = NULL; > gchar* _tmp47_; > Size _tmp48_ = {0}; > Size _tmp49_; > Size* _tmp50_; > gint _tmp50__length1; > gchar* _tmp51_; > const gchar* _tmp52_ = NULL; > gchar* _tmp53_; > Size _tmp54_ = {0}; > Size _tmp55_; > Size* _tmp56_; > gint _tmp56__length1; > gchar* _tmp57_; > const gchar* _tmp58_ = NULL; > gchar* _tmp59_; > Size _tmp60_ = {0}; > Size _tmp61_; > Size _tmp62_ = {0}; > Size _tmp63_; > gint _tmp64_; > Size _tmp65_ = {0}; > Size _tmp66_; > gint _tmp67_; > GSettings* _tmp68_; > gint _tmp69_ = 0; > Game* _tmp70_; > Game* _tmp71_; > Game* _tmp72_; > GameView* _tmp73_; > GameView* _tmp74_; > GSettings* _tmp75_; > gchar* _tmp76_ = NULL; > gchar* _tmp77_; > GameView* _tmp78_; > GSettings* _tmp79_; > gboolean _tmp80_ = FALSE; > GameView* _tmp81_; > Game* _tmp82_; > ClutterStage* _tmp83_; > GameView* _tmp84_; > ClutterStage* _tmp85_; > GameView* _tmp86_; > gfloat _tmp87_; > gfloat _tmp88_; > GameView* _tmp89_; > gfloat _tmp90_; > gfloat _tmp91_; > GtkClutterEmbed* _tmp92_; > ClutterStage* _tmp93_; > gfloat _tmp94_; > gfloat _tmp95_; > ClutterStage* _tmp96_; > gfloat _tmp97_; > gfloat _tmp98_; > GtkClutterEmbed* _tmp99_; > GameView* _tmp100_; > GamesScoresCategory* _tmp101_ = NULL; > GamesScoresCategory* _tmp102_; > gint _tmp102__length1; > GamesScores* _tmp103_; > GamesScores* _tmp104_; > GSettings* _tmp105_; > gchar* _tmp106_ = NULL; > gchar* _tmp107_; > GamesScores* _tmp108_; > const gchar* _tmp109_ = NULL; > GamesScores* _tmp110_; > const gchar* _tmp111_ = NULL; > GamesScores* _tmp112_; > const gchar* _tmp113_ = NULL; > ClutterStage* _tmp114_; > self = (SwellFoop*) base; > G_APPLICATION_CLASS (swell_foop_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication)); > _tmp0_ = g_settings_new ("org.gnome.swell-foop"); > _g_object_unref0 (self->priv->settings); > self->priv->settings = _tmp0_; > g_action_map_add_action_entries ((GActionMap*) self, (const GActionEntry*) SWELL_FOOP_action_entries, G_N_ELEMENTS (SWELL_FOOP_action_entries), self); > gtk_application_add_accelerator ((GtkApplication*) self, "<Primary>n", "app.new-game", NULL); > _tmp1_ = (GtkApplicationWindow*) gtk_application_window_new ((GtkApplication*) self); > g_object_ref_sink (_tmp1_); > _g_object_unref0 (self->priv->main_window); > self->priv->main_window = (GtkWindow*) _tmp1_; > _tmp2_ = self->priv->main_window; > _tmp3_ = _ ("Swell Foop"); > gtk_window_set_title (_tmp2_, _tmp3_); > _tmp4_ = self->priv->main_window; > gtk_window_set_resizable (_tmp4_, FALSE); > _tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); > g_object_ref_sink (_tmp5_); > vbox = _tmp5_; > gtk_widget_show ((GtkWidget*) vbox); > _tmp6_ = self->priv->main_window; > gtk_container_add ((GtkContainer*) _tmp6_, (GtkWidget*) vbox); > _tmp7_ = g_menu_new (); > menu = _tmp7_; > _tmp8_ = g_menu_new (); > section = _tmp8_; > _tmp9_ = section; > g_menu_append_section (menu, NULL, (GMenuModel*) _tmp9_); > _tmp10_ = section; > _tmp11_ = _ ("_New Game"); > g_menu_append (_tmp10_, _tmp11_, "app.new-game"); > _tmp12_ = section; > _tmp13_ = _ ("_Scores"); > g_menu_append (_tmp12_, _tmp13_, "app.scores"); > _tmp14_ = section; > _tmp15_ = _ ("_Preferences"); > g_menu_append (_tmp14_, _tmp15_, "app.preferences"); > _tmp16_ = g_menu_new (); > _g_object_unref0 (section); > section = _tmp16_; > _tmp17_ = section; > g_menu_append_section (menu, NULL, (GMenuModel*) _tmp17_); > _tmp18_ = section; > _tmp19_ = _ ("_Help"); > g_menu_append (_tmp18_, _tmp19_, "app.help"); > _tmp20_ = section; > _tmp21_ = _ ("_About"); > g_menu_append (_tmp20_, _tmp21_, "app.about"); > _tmp22_ = g_menu_new (); > _g_object_unref0 (section); > section = _tmp22_; > _tmp23_ = section; > g_menu_append_section (menu, NULL, (GMenuModel*) _tmp23_); > _tmp24_ = section; > _tmp25_ = _ ("_Quit"); > g_menu_append (_tmp24_, _tmp25_, "app.quit"); > gtk_application_set_app_menu ((GtkApplication*) self, (GMenuModel*) menu); > _tmp26_ = (GtkToolbar*) gtk_toolbar_new (); > g_object_ref_sink (_tmp26_); > toolbar = _tmp26_; > gtk_toolbar_set_show_arrow (toolbar, FALSE); > _tmp27_ = gtk_widget_get_style_context ((GtkWidget*) toolbar); > gtk_style_context_add_class (_tmp27_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR); > gtk_widget_show ((GtkWidget*) toolbar); > gtk_box_pack_start (vbox, (GtkWidget*) toolbar, FALSE, TRUE, (guint) 0); > _tmp28_ = (GtkToolButton*) gtk_tool_button_new (NULL, "_New"); > g_object_ref_sink (_tmp28_); > new_game_button = _tmp28_; > gtk_tool_button_set_icon_name (new_game_button, "document-new"); > gtk_tool_button_set_use_underline (new_game_button, TRUE); > gtk_actionable_set_action_name ((GtkActionable*) new_game_button, "app.new-game"); > gtk_tool_item_set_is_important ((GtkToolItem*) new_game_button, TRUE); > gtk_widget_show ((GtkWidget*) new_game_button); > gtk_toolbar_insert (toolbar, (GtkToolItem*) new_game_button, -1); > _tmp29_ = (GtkToolButton*) gtk_tool_button_new (NULL, "_Preferences"); > g_object_ref_sink (_tmp29_); > preferences_button = _tmp29_; > gtk_tool_button_set_icon_name (preferences_button, "gnome-settings"); > gtk_tool_button_set_use_underline (preferences_button, TRUE); > gtk_actionable_set_action_name ((GtkActionable*) preferences_button, "app.preferences"); > gtk_tool_item_set_is_important ((GtkToolItem*) preferences_button, TRUE); > gtk_widget_show ((GtkWidget*) preferences_button); > gtk_toolbar_insert (toolbar, (GtkToolItem*) preferences_button, -1); > _tmp30_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10); > g_object_ref_sink (_tmp30_); > status_box = _tmp30_; > gtk_widget_set_halign ((GtkWidget*) status_box, GTK_ALIGN_END); > gtk_widget_set_valign ((GtkWidget*) status_box, GTK_ALIGN_CENTER); > gtk_widget_show ((GtkWidget*) status_box); > _tmp31_ = (GtkLabel*) gtk_label_new (""); > g_object_ref_sink (_tmp31_); > _g_object_unref0 (self->priv->current_score_label); > self->priv->current_score_label = _tmp31_; > _tmp32_ = self->priv->current_score_label; > gtk_widget_show ((GtkWidget*) _tmp32_); > _tmp33_ = self->priv->current_score_label; > gtk_box_pack_start (status_box, (GtkWidget*) _tmp33_, FALSE, FALSE, (guint) 0); > swell_foop_update_score_cb (self, 0); > _tmp34_ = gtk_tool_item_new (); > g_object_ref_sink (_tmp34_); > status_item = _tmp34_; > gtk_tool_item_set_expand (status_item, TRUE); > gtk_container_add ((GtkContainer*) status_item, (GtkWidget*) status_box); > gtk_widget_show ((GtkWidget*) status_item); > gtk_toolbar_insert (toolbar, status_item, -1); > _tmp35_ = (GtkClutterEmbed*) gtk_clutter_embed_new (); > g_object_ref_sink (_tmp35_); > _g_object_unref0 (self->priv->clutter_embed); > self->priv->clutter_embed = _tmp35_; > _tmp36_ = self->priv->clutter_embed; > gtk_widget_show ((GtkWidget*) _tmp36_); > _tmp37_ = self->priv->clutter_embed; > gtk_box_pack_start (vbox, (GtkWidget*) _tmp37_, TRUE, TRUE, (guint) 0); > _tmp38_ = self->priv->clutter_embed; > _tmp39_ = gtk_clutter_embed_get_stage (_tmp38_); > _tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, clutter_stage_get_type (), ClutterStage)); > _g_object_unref0 (self->priv->stage); > self->priv->stage = _tmp40_; > _tmp41_ = self->priv->stage; > clutter_color_from_string (&_tmp42_, "#000000"); > clutter_stage_set_color (_tmp41_, &_tmp42_); > _tmp43_ = g_new0 (Size, 3); > self->sizes = (_vala_Size_array_free (self->sizes, self->sizes_length1), NULL); > self->sizes = _tmp43_; > self->sizes_length1 = 3; > _tmp44_ = self->sizes; > _tmp44__length1 = self->sizes_length1; > _tmp45_ = g_strdup ("small"); > _tmp46_ = _ ("Small"); > _tmp47_ = g_strdup (_tmp46_); > _g_free0 (_tmp48_.id); > _tmp48_.id = _tmp45_; > _g_free0 (_tmp48_.name); > _tmp48_.name = _tmp47_; > _tmp48_.columns = 6; > _tmp48_.rows = 5; > size_destroy (&_tmp44_[0]); > _tmp44_[0] = _tmp48_; > _tmp49_ = _tmp44_[0]; > _tmp50_ = self->sizes; > _tmp50__length1 = self->sizes_length1; > _tmp51_ = g_strdup ("normal"); > _tmp52_ = _ ("Normal"); > _tmp53_ = g_strdup (_tmp52_); > _g_free0 (_tmp54_.id); > _tmp54_.id = _tmp51_; > _g_free0 (_tmp54_.name); > _tmp54_.name = _tmp53_; > _tmp54_.columns = 15; > _tmp54_.rows = 10; > size_destroy (&_tmp50_[1]); > _tmp50_[1] = _tmp54_; > _tmp55_ = _tmp50_[1]; > _tmp56_ = self->sizes; > _tmp56__length1 = self->sizes_length1; > _tmp57_ = g_strdup ("large"); > _tmp58_ = _ ("Large"); > _tmp59_ = g_strdup (_tmp58_); > _g_free0 (_tmp60_.id); > _tmp60_.id = _tmp57_; > _g_free0 (_tmp60_.name); > _tmp60_.name = _tmp59_; > _tmp60_.columns = 20; > _tmp60_.rows = 15; > size_destroy (&_tmp56_[2]); > _tmp56_[2] = _tmp60_; > _tmp61_ = _tmp56_[2]; > swell_foop_get_size (self, &_tmp62_); > _tmp63_ = _tmp62_; > _tmp64_ = _tmp63_.rows; > swell_foop_get_size (self, &_tmp65_); > _tmp66_ = _tmp65_; > _tmp67_ = _tmp66_.columns; > _tmp68_ = self->priv->settings; > _tmp69_ = g_settings_get_int (_tmp68_, "colors"); > _tmp70_ = game_new (_tmp64_, _tmp67_, _tmp69_); > _g_object_unref0 (self->priv->game); > self->priv->game = _tmp70_; > size_destroy (&_tmp66_); > size_destroy (&_tmp63_); > _tmp71_ = self->priv->game; > g_signal_connect_object (_tmp71_, "update-score", (GCallback) _swell_foop_update_score_cb_game_update_score, self, 0); > _tmp72_ = self->priv->game; > g_signal_connect_object (_tmp72_, "complete", (GCallback) _swell_foop_complete_cb_game_complete, self, 0); > _tmp73_ = game_view_new (); > g_object_ref_sink (_tmp73_); > _g_object_unref0 (self->priv->view); > self->priv->view = _tmp73_; > _tmp74_ = self->priv->view; > _tmp75_ = self->priv->settings; > _tmp76_ = g_settings_get_string (_tmp75_, "theme"); > _tmp77_ = _tmp76_; > game_view_set_theme_name (_tmp74_, _tmp77_); > _g_free0 (_tmp77_); > _tmp78_ = self->priv->view; > _tmp79_ = self->priv->settings; > _tmp80_ = g_settings_get_boolean (_tmp79_, "zealous"); > _tmp78_->is_zealous = _tmp80_; > _tmp81_ = self->priv->view; > _tmp82_ = self->priv->game; > game_view_set_game (_tmp81_, _tmp82_); > _tmp83_ = self->priv->stage; > _tmp84_ = self->priv->view; > clutter_container_add_actor ((ClutterContainer*) _tmp83_, (ClutterActor*) _tmp84_); > _tmp85_ = self->priv->stage; > _tmp86_ = self->priv->view; > _tmp87_ = clutter_actor_get_width ((ClutterActor*) _tmp86_); > _tmp88_ = _tmp87_; > _tmp89_ = self->priv->view; > _tmp90_ = clutter_actor_get_height ((ClutterActor*) _tmp89_); > _tmp91_ = _tmp90_; > clutter_actor_set_size ((ClutterActor*) _tmp85_, _tmp88_, _tmp91_); > _tmp92_ = self->priv->clutter_embed; > _tmp93_ = self->priv->stage; > _tmp94_ = clutter_actor_get_width ((ClutterActor*) _tmp93_); > _tmp95_ = _tmp94_; > _tmp96_ = self->priv->stage; > _tmp97_ = clutter_actor_get_height ((ClutterActor*) _tmp96_); > _tmp98_ = _tmp97_; > gtk_widget_set_size_request ((GtkWidget*) _tmp92_, (gint) _tmp95_, (gint) _tmp98_); > _tmp99_ = self->priv->clutter_embed; > _tmp100_ = self->priv->view; > g_signal_connect_object ((GtkWidget*) _tmp99_, "leave-notify-event", (GCallback) _game_view_board_left_cb_gtk_widget_leave_notify_event, _tmp100_, 0); > _tmp101_ = g_new0 (GamesScoresCategory, 0); > _tmp102_ = _tmp101_; > _tmp102__length1 = 0; > _tmp103_ = games_scores_new ("swell-foop", _tmp102_, 0, NULL, NULL, 0, GAMES_SCORES_STYLE_PLAIN_DESCENDING); > _g_object_unref0 (self->priv->high_scores); > self->priv->high_scores = _tmp103_; > _tmp102_ = (_vala_GamesScoresCategory_array_free (_tmp102_, _tmp102__length1), NULL); > _tmp104_ = self->priv->high_scores; > _tmp105_ = self->priv->settings; > _tmp106_ = g_settings_get_string (_tmp105_, "size"); > _tmp107_ = _tmp106_; > games_scores_set_category (_tmp104_, _tmp107_); > _g_free0 (_tmp107_); > _tmp108_ = self->priv->high_scores; > _tmp109_ = _ ("Small"); > games_scores_add_category (_tmp108_, "small", _tmp109_); > _tmp110_ = self->priv->high_scores; > _tmp111_ = _ ("Normal"); > games_scores_add_category (_tmp110_, "normal", _tmp111_); > _tmp112_ = self->priv->high_scores; > _tmp113_ = _ ("Large"); > games_scores_add_category (_tmp112_, "large", _tmp113_); > _tmp114_ = self->priv->stage; > g_signal_connect_object ((ClutterActor*) _tmp114_, "key-release-event", (GCallback) _swell_foop_key_release_event_cb_clutter_actor_key_release_event, self, 0); > _g_object_unref0 (status_item); > _g_object_unref0 (status_box); > _g_object_unref0 (preferences_button); > _g_object_unref0 (new_game_button); > _g_object_unref0 (toolbar); > _g_object_unref0 (section); > _g_object_unref0 (menu); > _g_object_unref0 (vbox); >} > > >static gboolean swell_foop_key_release_event_cb (SwellFoop* self, ClutterActor* actor, ClutterKeyEvent* event) { > gboolean result = FALSE; > ClutterKeyEvent _tmp0_; > guint _tmp1_; > g_return_val_if_fail (self != NULL, FALSE); > g_return_val_if_fail (actor != NULL, FALSE); > g_return_val_if_fail (event != NULL, FALSE); > _tmp0_ = *event; > _tmp1_ = _tmp0_.keyval; > switch (_tmp1_) { > case CLUTTER_KEY_F2: > { > swell_foop_new_game (self); > break; > } > case CLUTTER_KEY_Up: > { > GameView* _tmp2_; > _tmp2_ = self->priv->view; > game_view_cursor_move (_tmp2_, 0, 1); > break; > } > case CLUTTER_KEY_Down: > { > GameView* _tmp3_; > _tmp3_ = self->priv->view; > game_view_cursor_move (_tmp3_, 0, -1); > break; > } > case CLUTTER_KEY_Left: > { > GameView* _tmp4_; > _tmp4_ = self->priv->view; > game_view_cursor_move (_tmp4_, -1, 0); > break; > } > case CLUTTER_KEY_Right: > { > GameView* _tmp5_; > _tmp5_ = self->priv->view; > game_view_cursor_move (_tmp5_, 1, 0); > break; > } > case CLUTTER_KEY_space: > case CLUTTER_KEY_Return: > { > GameView* _tmp6_; > _tmp6_ = self->priv->view; > game_view_cursor_click (_tmp6_); > break; > } > default: > { > break; > } > } > result = FALSE; > return result; >} > > >static void swell_foop_get_size (SwellFoop* self, Size* result) { > Size* _tmp17_; > gint _tmp17__length1; > Size _tmp18_; > Size _tmp19_ = {0}; > g_return_if_fail (self != NULL); > { > gint i; > i = 0; > { > gboolean _tmp0_; > _tmp0_ = TRUE; > while (TRUE) { > gboolean _tmp1_; > gint _tmp3_; > Size* _tmp4_; > gint _tmp4__length1; > Size* _tmp5_; > gint _tmp5__length1; > gint _tmp6_; > Size _tmp7_; > const gchar* _tmp8_; > GSettings* _tmp9_; > gchar* _tmp10_ = NULL; > gchar* _tmp11_; > gboolean _tmp12_; > _tmp1_ = _tmp0_; > if (!_tmp1_) { > gint _tmp2_; > _tmp2_ = i; > i = _tmp2_ + 1; > } > _tmp0_ = FALSE; > _tmp3_ = i; > _tmp4_ = self->sizes; > _tmp4__length1 = self->sizes_length1; > if (!(_tmp3_ < _tmp4__length1)) { > break; > } > _tmp5_ = self->sizes; > _tmp5__length1 = self->sizes_length1; > _tmp6_ = i; > _tmp7_ = _tmp5_[_tmp6_]; > _tmp8_ = _tmp7_.id; > _tmp9_ = self->priv->settings; > _tmp10_ = g_settings_get_string (_tmp9_, "size"); > _tmp11_ = _tmp10_; > _tmp12_ = g_strcmp0 (_tmp8_, _tmp11_) == 0; > _g_free0 (_tmp11_); > if (_tmp12_) { > Size* _tmp13_; > gint _tmp13__length1; > gint _tmp14_; > Size _tmp15_; > Size _tmp16_ = {0}; > _tmp13_ = self->sizes; > _tmp13__length1 = self->sizes_length1; > _tmp14_ = i; > _tmp15_ = _tmp13_[_tmp14_]; > size_copy (&_tmp15_, &_tmp16_); > *result = _tmp16_; > return; > } > } > } > } > _tmp17_ = self->sizes; > _tmp17__length1 = self->sizes_length1; > _tmp18_ = _tmp17_[0]; > size_copy (&_tmp18_, &_tmp19_); > *result = _tmp19_; > return; >} > > >static void swell_foop_update_score_cb (SwellFoop* self, gint points_awarded) { > gint score; > Game* _tmp0_; > GtkLabel* _tmp4_; > const gchar* _tmp5_ = NULL; > gint _tmp6_; > gchar* _tmp7_ = NULL; > gchar* _tmp8_; > g_return_if_fail (self != NULL); > score = 0; > _tmp0_ = self->priv->game; > if (_tmp0_ != NULL) { > Game* _tmp1_; > gint _tmp2_; > gint _tmp3_; > _tmp1_ = self->priv->game; > _tmp2_ = game_get_score (_tmp1_); > _tmp3_ = _tmp2_; > score = _tmp3_; > } > _tmp4_ = self->priv->current_score_label; > _tmp5_ = _ ("Score: %4u "); > _tmp6_ = score; > _tmp7_ = g_strdup_printf (_tmp5_, _tmp6_); > _tmp8_ = _tmp7_; > gtk_label_set_text (_tmp4_, _tmp8_); > _g_free0 (_tmp8_); >} > > >static void swell_foop_complete_cb (SwellFoop* self) { > GamesScores* _tmp0_; > Game* _tmp1_; > gint _tmp2_; > gint _tmp3_; > g_return_if_fail (self != NULL); > _tmp0_ = self->priv->high_scores; > _tmp1_ = self->priv->game; > _tmp2_ = game_get_score (_tmp1_); > _tmp3_ = _tmp2_; > games_scores_add_plain_score (_tmp0_, (guint32) _tmp3_); >} > > >static void swell_foop_real_shutdown (GApplication* base) { > SwellFoop * self; > gboolean _tmp0_ = FALSE; > gboolean _tmp1_ = FALSE; > Game* _tmp2_; > gboolean _tmp5_; > gboolean _tmp9_; > self = (SwellFoop*) base; > G_APPLICATION_CLASS (swell_foop_parent_class)->shutdown ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication)); > _tmp2_ = self->priv->game; > if (_tmp2_ != NULL) { > Game* _tmp3_; > gboolean _tmp4_ = FALSE; > _tmp3_ = self->priv->game; > _tmp4_ = game_has_completed (_tmp3_); > _tmp1_ = !_tmp4_; > } else { > _tmp1_ = FALSE; > } > _tmp5_ = _tmp1_; > if (_tmp5_) { > Game* _tmp6_; > gint _tmp7_; > gint _tmp8_; > _tmp6_ = self->priv->game; > _tmp7_ = game_get_score (_tmp6_); > _tmp8_ = _tmp7_; > _tmp0_ = _tmp8_ > 0; > } else { > _tmp0_ = FALSE; > } > _tmp9_ = _tmp0_; > if (_tmp9_) { > GamesScores* _tmp10_; > Game* _tmp11_; > gint _tmp12_; > gint _tmp13_; > _tmp10_ = self->priv->high_scores; > _tmp11_ = self->priv->game; > _tmp12_ = game_get_score (_tmp11_); > _tmp13_ = _tmp12_; > games_scores_add_plain_score (_tmp10_, (guint32) _tmp13_); > } >} > > >static void swell_foop_real_activate (GApplication* base) { > SwellFoop * self; > GtkWindow* _tmp0_; > self = (SwellFoop*) base; > _tmp0_ = self->priv->main_window; > gtk_window_present (_tmp0_); >} > > >static void _swell_foop_preferences_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) { > swell_foop_preferences_response_cb (self); >} > > >void swell_foop_preferences_cb (SwellFoop* self) { > GtkDialog* _tmp0_; > GtkBuilder* _tmp2_; > GtkBuilder* preferences_builder; > GtkBuilder* _tmp8_; > GObject* _tmp9_ = NULL; > GtkDialog* _tmp10_; > GtkBuilder* _tmp11_; > GObject* _tmp12_ = NULL; > GtkComboBox* _tmp13_; > GtkComboBox* theme_combo; > GtkComboBox* _tmp14_; > GtkTreeModel* _tmp15_; > GtkTreeModel* _tmp16_; > GtkListStore* _tmp17_; > GtkListStore* model; > GtkTreeIter iter = {0}; > GtkListStore* _tmp18_; > GtkTreeIter _tmp19_ = {0}; > GtkListStore* _tmp20_; > GtkTreeIter _tmp21_; > const gchar* _tmp22_ = NULL; > GSettings* _tmp23_; > gchar* _tmp24_ = NULL; > gchar* _tmp25_; > gboolean _tmp26_; > GtkListStore* _tmp29_; > GtkTreeIter _tmp30_ = {0}; > GtkListStore* _tmp31_; > GtkTreeIter _tmp32_; > const gchar* _tmp33_ = NULL; > GSettings* _tmp34_; > gchar* _tmp35_ = NULL; > gchar* _tmp36_; > gboolean _tmp37_; > GtkBuilder* _tmp40_; > GObject* _tmp41_ = NULL; > GtkComboBox* _tmp42_; > GtkComboBox* size_combo; > GtkComboBox* _tmp43_; > GtkTreeModel* _tmp44_; > GtkTreeModel* _tmp45_; > GtkListStore* _tmp46_; > GtkBuilder* _tmp74_; > GObject* _tmp75_ = NULL; > GSettings* _tmp76_; > gint _tmp77_ = 0; > GtkBuilder* _tmp78_; > GObject* _tmp79_ = NULL; > GSettings* _tmp80_; > gboolean _tmp81_ = FALSE; > GtkBuilder* _tmp82_; > GtkDialog* _tmp83_; > GtkDialog* _tmp84_; > GError * _inner_error_ = NULL; > g_return_if_fail (self != NULL); > _tmp0_ = self->priv->preferences_dialog; > if (_tmp0_ != NULL) { > GtkDialog* _tmp1_; > _tmp1_ = self->priv->preferences_dialog; > gtk_window_present ((GtkWindow*) _tmp1_); > return; > } > _tmp2_ = gtk_builder_new (); > preferences_builder = _tmp2_; > { > GtkBuilder* _tmp3_; > gchar* _tmp4_ = NULL; > gchar* _tmp5_; > _tmp3_ = preferences_builder; > _tmp4_ = g_build_filename (DATADIR, "preferences.ui", NULL, NULL); > _tmp5_ = _tmp4_; > gtk_builder_add_from_file (_tmp3_, _tmp5_, &_inner_error_); > _g_free0 (_tmp5_); > if (_inner_error_ != NULL) { > goto __catch1_g_error; > } > } > goto __finally1; > __catch1_g_error: > { > GError* e = NULL; > GError* _tmp6_; > const gchar* _tmp7_; > e = _inner_error_; > _inner_error_ = NULL; > _tmp6_ = e; > _tmp7_ = _tmp6_->message; > g_warning ("swell-foop.vala:252: Could not load preferences UI: %s", _tmp7_); > _g_error_free0 (e); > } > __finally1: > if (_inner_error_ != NULL) { > _g_object_unref0 (preferences_builder); > g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); > g_clear_error (&_inner_error_); > return; > } > _tmp8_ = preferences_builder; > _tmp9_ = gtk_builder_get_object (_tmp8_, "preferences"); > _tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GTK_TYPE_DIALOG, GtkDialog)); > _g_object_unref0 (self->priv->preferences_dialog); > self->priv->preferences_dialog = _tmp10_; > _tmp11_ = preferences_builder; > _tmp12_ = gtk_builder_get_object (_tmp11_, "theme-selector"); > _tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, GTK_TYPE_COMBO_BOX) ? ((GtkComboBox*) _tmp12_) : NULL); > theme_combo = _tmp13_; > _tmp14_ = theme_combo; > _tmp15_ = gtk_combo_box_get_model (_tmp14_); > _tmp16_ = _tmp15_; > _tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GTK_TYPE_LIST_STORE, GtkListStore)); > model = _tmp17_; > _tmp18_ = model; > gtk_list_store_append (_tmp18_, &_tmp19_); > iter = _tmp19_; > _tmp20_ = model; > _tmp21_ = iter; > _tmp22_ = _ ("Colors"); > gtk_list_store_set (_tmp20_, &_tmp21_, 0, _tmp22_, 1, "colors", -1, -1); > _tmp23_ = self->priv->settings; > _tmp24_ = g_settings_get_string (_tmp23_, "theme"); > _tmp25_ = _tmp24_; > _tmp26_ = g_strcmp0 (_tmp25_, "colors") == 0; > _g_free0 (_tmp25_); > if (_tmp26_) { > GtkComboBox* _tmp27_; > GtkTreeIter _tmp28_; > _tmp27_ = theme_combo; > _tmp28_ = iter; > gtk_combo_box_set_active_iter (_tmp27_, &_tmp28_); > } > _tmp29_ = model; > gtk_list_store_append (_tmp29_, &_tmp30_); > iter = _tmp30_; > _tmp31_ = model; > _tmp32_ = iter; > _tmp33_ = _ ("Shapes and Colors"); > gtk_list_store_set (_tmp31_, &_tmp32_, 0, _tmp33_, 1, "shapesandcolors", -1, -1); > _tmp34_ = self->priv->settings; > _tmp35_ = g_settings_get_string (_tmp34_, "theme"); > _tmp36_ = _tmp35_; > _tmp37_ = g_strcmp0 (_tmp36_, "shapesandcolors") == 0; > _g_free0 (_tmp36_); > if (_tmp37_) { > GtkComboBox* _tmp38_; > GtkTreeIter _tmp39_; > _tmp38_ = theme_combo; > _tmp39_ = iter; > gtk_combo_box_set_active_iter (_tmp38_, &_tmp39_); > } > _tmp40_ = preferences_builder; > _tmp41_ = gtk_builder_get_object (_tmp40_, "size-selector"); > _tmp42_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp41_, GTK_TYPE_COMBO_BOX) ? ((GtkComboBox*) _tmp41_) : NULL); > size_combo = _tmp42_; > _tmp43_ = size_combo; > _tmp44_ = gtk_combo_box_get_model (_tmp43_); > _tmp45_ = _tmp44_; > _tmp46_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GTK_TYPE_LIST_STORE, GtkListStore)); > _g_object_unref0 (model); > model = _tmp46_; > { > gint i; > i = 0; > { > gboolean _tmp47_; > _tmp47_ = TRUE; > while (TRUE) { > gboolean _tmp48_; > gint _tmp50_; > Size* _tmp51_; > gint _tmp51__length1; > GtkListStore* _tmp52_; > GtkTreeIter _tmp53_ = {0}; > GtkListStore* _tmp54_; > GtkTreeIter _tmp55_; > Size* _tmp56_; > gint _tmp56__length1; > gint _tmp57_; > Size _tmp58_; > const gchar* _tmp59_; > Size* _tmp60_; > gint _tmp60__length1; > gint _tmp61_; > Size _tmp62_; > const gchar* _tmp63_; > GSettings* _tmp64_; > gchar* _tmp65_ = NULL; > gchar* _tmp66_; > Size* _tmp67_; > gint _tmp67__length1; > gint _tmp68_; > Size _tmp69_; > const gchar* _tmp70_; > gboolean _tmp71_; > _tmp48_ = _tmp47_; > if (!_tmp48_) { > gint _tmp49_; > _tmp49_ = i; > i = _tmp49_ + 1; > } > _tmp47_ = FALSE; > _tmp50_ = i; > _tmp51_ = self->sizes; > _tmp51__length1 = self->sizes_length1; > if (!(_tmp50_ < _tmp51__length1)) { > break; > } > _tmp52_ = model; > gtk_list_store_append (_tmp52_, &_tmp53_); > iter = _tmp53_; > _tmp54_ = model; > _tmp55_ = iter; > _tmp56_ = self->sizes; > _tmp56__length1 = self->sizes_length1; > _tmp57_ = i; > _tmp58_ = _tmp56_[_tmp57_]; > _tmp59_ = _tmp58_.name; > _tmp60_ = self->sizes; > _tmp60__length1 = self->sizes_length1; > _tmp61_ = i; > _tmp62_ = _tmp60_[_tmp61_]; > _tmp63_ = _tmp62_.id; > gtk_list_store_set (_tmp54_, &_tmp55_, 0, _tmp59_, 1, _tmp63_, -1, -1); > _tmp64_ = self->priv->settings; > _tmp65_ = g_settings_get_string (_tmp64_, "size"); > _tmp66_ = _tmp65_; > _tmp67_ = self->sizes; > _tmp67__length1 = self->sizes_length1; > _tmp68_ = i; > _tmp69_ = _tmp67_[_tmp68_]; > _tmp70_ = _tmp69_.id; > _tmp71_ = g_strcmp0 (_tmp66_, _tmp70_) == 0; > _g_free0 (_tmp66_); > if (_tmp71_) { > GtkComboBox* _tmp72_; > GtkTreeIter _tmp73_; > _tmp72_ = size_combo; > _tmp73_ = iter; > gtk_combo_box_set_active_iter (_tmp72_, &_tmp73_); > } > } > } > } > _tmp74_ = preferences_builder; > _tmp75_ = gtk_builder_get_object (_tmp74_, "colors-spinner"); > _tmp76_ = self->priv->settings; > _tmp77_ = g_settings_get_int (_tmp76_, "colors"); > gtk_spin_button_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, GTK_TYPE_SPIN_BUTTON, GtkSpinButton), (gdouble) _tmp77_); > _tmp78_ = preferences_builder; > _tmp79_ = gtk_builder_get_object (_tmp78_, "zealous-checkbox"); > _tmp80_ = self->priv->settings; > _tmp81_ = g_settings_get_boolean (_tmp80_, "zealous"); > gtk_toggle_button_set_active ((GtkToggleButton*) G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, GTK_TYPE_CHECK_BUTTON, GtkCheckButton), _tmp81_); > _tmp82_ = preferences_builder; > gtk_builder_connect_signals (_tmp82_, self); > _tmp83_ = self->priv->preferences_dialog; > g_signal_connect_object (_tmp83_, "response", (GCallback) _swell_foop_preferences_response_cb_gtk_dialog_response, self, 0); > _tmp84_ = self->priv->preferences_dialog; > gtk_window_present ((GtkWindow*) _tmp84_); > _g_object_unref0 (size_combo); > _g_object_unref0 (model); > _g_object_unref0 (theme_combo); > _g_object_unref0 (preferences_builder); >} > > >void G_MODULE_EXPORT select_theme (GtkComboBox* theme_combo, SwellFoop* self) { > GtkTreeIter iter = {0}; > GtkComboBox* _tmp0_; > GtkTreeIter _tmp1_ = {0}; > gboolean _tmp2_ = FALSE; > gchar* new_theme = NULL; > GtkComboBox* _tmp3_; > GtkTreeModel* _tmp4_; > GtkTreeModel* _tmp5_; > GtkTreeIter _tmp6_; > const gchar* _tmp7_; > GSettings* _tmp8_; > gchar* _tmp9_ = NULL; > gchar* _tmp10_; > gboolean _tmp11_; > GSettings* _tmp12_; > const gchar* _tmp13_; > GameView* _tmp14_; > const gchar* _tmp15_; > g_return_if_fail (self != NULL); > g_return_if_fail (theme_combo != NULL); > _tmp0_ = theme_combo; > _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_); > iter = _tmp1_; > if (!_tmp2_) { > return; > } > _tmp3_ = theme_combo; > _tmp4_ = gtk_combo_box_get_model (_tmp3_); > _tmp5_ = _tmp4_; > _tmp6_ = iter; > gtk_tree_model_get (_tmp5_, &_tmp6_, 1, &new_theme, -1, -1); > _tmp7_ = new_theme; > _tmp8_ = self->priv->settings; > _tmp9_ = g_settings_get_string (_tmp8_, "theme"); > _tmp10_ = _tmp9_; > _tmp11_ = g_strcmp0 (_tmp7_, _tmp10_) == 0; > _g_free0 (_tmp10_); > if (_tmp11_) { > _g_free0 (new_theme); > return; > } > _tmp12_ = self->priv->settings; > _tmp13_ = new_theme; > g_settings_set_string (_tmp12_, "theme", _tmp13_); > _tmp14_ = self->priv->view; > _tmp15_ = new_theme; > game_view_set_theme_name (_tmp14_, _tmp15_); > _g_free0 (new_theme); >} > > >void G_MODULE_EXPORT set_zealous_animation (GtkCheckButton* button, SwellFoop* self) { > GSettings* _tmp0_; > GtkCheckButton* _tmp1_; > gboolean _tmp2_; > gboolean _tmp3_; > GameView* _tmp4_; > GSettings* _tmp5_; > gboolean _tmp6_ = FALSE; > g_return_if_fail (self != NULL); > g_return_if_fail (button != NULL); > _tmp0_ = self->priv->settings; > _tmp1_ = button; > _tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_); > _tmp3_ = _tmp2_; > g_settings_set_boolean (_tmp0_, "zealous", _tmp3_); > _tmp4_ = self->priv->view; > _tmp5_ = self->priv->settings; > _tmp6_ = g_settings_get_boolean (_tmp5_, "zealous"); > _tmp4_->is_zealous = _tmp6_; >} > > >void G_MODULE_EXPORT update_size (GtkComboBox* size_combo, SwellFoop* self) { > GtkTreeIter iter = {0}; > GtkComboBox* _tmp0_; > GtkTreeIter _tmp1_ = {0}; > gboolean _tmp2_ = FALSE; > gchar* new_size = NULL; > GtkComboBox* _tmp3_; > GtkTreeModel* _tmp4_; > GtkTreeModel* _tmp5_; > GtkTreeIter _tmp6_; > const gchar* _tmp7_; > GSettings* _tmp8_; > gchar* _tmp9_ = NULL; > gchar* _tmp10_; > gboolean _tmp11_; > GSettings* _tmp12_; > const gchar* _tmp13_; > GamesScores* _tmp14_; > const gchar* _tmp15_; > g_return_if_fail (self != NULL); > g_return_if_fail (size_combo != NULL); > _tmp0_ = size_combo; > _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_); > iter = _tmp1_; > if (!_tmp2_) { > return; > } > _tmp3_ = size_combo; > _tmp4_ = gtk_combo_box_get_model (_tmp3_); > _tmp5_ = _tmp4_; > _tmp6_ = iter; > gtk_tree_model_get (_tmp5_, &_tmp6_, 1, &new_size, -1, -1); > _tmp7_ = new_size; > _tmp8_ = self->priv->settings; > _tmp9_ = g_settings_get_string (_tmp8_, "size"); > _tmp10_ = _tmp9_; > _tmp11_ = g_strcmp0 (_tmp7_, _tmp10_) == 0; > _g_free0 (_tmp10_); > if (_tmp11_) { > _g_free0 (new_size); > return; > } > _tmp12_ = self->priv->settings; > _tmp13_ = new_size; > g_settings_set_string (_tmp12_, "size", _tmp13_); > _tmp14_ = self->priv->high_scores; > _tmp15_ = new_size; > games_scores_set_category (_tmp14_, _tmp15_); > swell_foop_new_game (self); > _g_free0 (new_size); >} > > >void G_MODULE_EXPORT update_colors (GtkSpinButton* button, SwellFoop* self) { > GtkSpinButton* _tmp0_; > gdouble _tmp1_ = 0.0; > gint new_colors; > gint _tmp2_; > GSettings* _tmp3_; > gint _tmp4_ = 0; > GSettings* _tmp5_; > gint _tmp6_; > g_return_if_fail (self != NULL); > g_return_if_fail (button != NULL); > _tmp0_ = button; > _tmp1_ = gtk_spin_button_get_value (_tmp0_); > new_colors = (gint) _tmp1_; > _tmp2_ = new_colors; > _tmp3_ = self->priv->settings; > _tmp4_ = g_settings_get_int (_tmp3_, "colors"); > if (_tmp2_ == _tmp4_) { > return; > } > _tmp5_ = self->priv->settings; > _tmp6_ = new_colors; > g_settings_set_int (_tmp5_, "colors", _tmp6_); > swell_foop_new_game (self); >} > > >static void swell_foop_preferences_response_cb (SwellFoop* self) { > GtkDialog* _tmp0_; > g_return_if_fail (self != NULL); > _tmp0_ = self->priv->preferences_dialog; > gtk_widget_destroy ((GtkWidget*) _tmp0_); > _g_object_unref0 (self->priv->preferences_dialog); > self->priv->preferences_dialog = NULL; >} > > >void swell_foop_show (SwellFoop* self) { > GtkWindow* _tmp0_; > g_return_if_fail (self != NULL); > _tmp0_ = self->priv->main_window; > gtk_widget_show ((GtkWidget*) _tmp0_); >} > > >static void swell_foop_new_game_cb (SwellFoop* self) { > g_return_if_fail (self != NULL); > swell_foop_new_game (self); >} > > >static void swell_foop_scores_cb (SwellFoop* self) { > GtkWindow* _tmp0_; > GamesScores* _tmp1_; > const gchar* _tmp2_ = NULL; > GamesScoresDialog* _tmp3_; > GamesScoresDialog* scores_dialog; > const gchar* _tmp4_ = NULL; > g_return_if_fail (self != NULL); > _tmp0_ = self->priv->main_window; > _tmp1_ = self->priv->high_scores; > _tmp2_ = _ ("Swell Foop Scores"); > _tmp3_ = games_scores_dialog_new (_tmp0_, _tmp1_, _tmp2_); > g_object_ref_sink (_tmp3_); > scores_dialog = _tmp3_; > _tmp4_ = _ ("Size:"); > games_scores_dialog_set_category_description (scores_dialog, _tmp4_); > gtk_dialog_run ((GtkDialog*) scores_dialog); > gtk_widget_destroy ((GtkWidget*) scores_dialog); > _g_object_unref0 (scores_dialog); >} > > >static void swell_foop_quit_cb (SwellFoop* self) { > GtkWindow* _tmp0_; > g_return_if_fail (self != NULL); > _tmp0_ = self->priv->main_window; > gtk_widget_destroy ((GtkWidget*) _tmp0_); >} > > >static void swell_foop_help_cb (SwellFoop* self) { > GError * _inner_error_ = NULL; > g_return_if_fail (self != NULL); > { > GtkWindow* _tmp0_; > GdkScreen* _tmp1_ = NULL; > guint32 _tmp2_ = 0U; > _tmp0_ = self->priv->main_window; > _tmp1_ = gtk_window_get_screen (_tmp0_); > _tmp2_ = gtk_get_current_event_time (); > gtk_show_uri (_tmp1_, "help:swell-foop", _tmp2_, &_inner_error_); > if (_inner_error_ != NULL) { > goto __catch2_g_error; > } > } > goto __finally2; > __catch2_g_error: > { > GError* e = NULL; > GError* _tmp3_; > const gchar* _tmp4_; > e = _inner_error_; > _inner_error_ = NULL; > _tmp3_ = e; > _tmp4_ = _tmp3_->message; > g_warning ("swell-foop.vala:382: Failed to show help: %s", _tmp4_); > _g_error_free0 (e); > } > __finally2: > if (_inner_error_ != NULL) { > g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); > g_clear_error (&_inner_error_); > return; > } >} > > >static void swell_foop_about_cb (SwellFoop* self) { > gchar* _tmp0_; > gchar* _tmp1_; > gchar** _tmp2_ = NULL; > gchar** authors; > gint authors_length1; > gint _authors_size_; > gchar* _tmp3_; > gchar** _tmp4_ = NULL; > gchar** artists; > gint artists_length1; > gint _artists_size_; > gchar** _tmp5_ = NULL; > gchar** documenters; > gint documenters_length1; > gint _documenters_size_; > gchar* _tmp6_; > gchar* license; > GtkWindow* _tmp7_; > const gchar* _tmp8_ = NULL; > const gchar* _tmp9_ = NULL; > const gchar* _tmp10_ = NULL; > const gchar* _tmp11_ = NULL; > const gchar* _tmp12_ = NULL; > g_return_if_fail (self != NULL); > _tmp0_ = g_strdup ("Tim Horton"); > _tmp1_ = g_strdup ("Sophia Yu"); > _tmp2_ = g_new0 (gchar*, 3 + 1); > _tmp2_[0] = _tmp0_; > _tmp2_[1] = _tmp1_; > _tmp2_[2] = NULL; > authors = _tmp2_; > authors_length1 = 3; > _authors_size_ = authors_length1; > _tmp3_ = g_strdup ("Tim Horton"); > _tmp4_ = g_new0 (gchar*, 2 + 1); > _tmp4_[0] = _tmp3_; > _tmp4_[1] = NULL; > artists = _tmp4_; > artists_length1 = 2; > _artists_size_ = artists_length1; > _tmp5_ = g_new0 (gchar*, 1 + 1); > _tmp5_[0] = NULL; > documenters = _tmp5_; > documenters_length1 = 1; > _documenters_size_ = documenters_length1; > _tmp6_ = g_strdup ("Swell Foop is free software; you can redistribute it and/or modify it " \ >"under the terms of the GNU General Public License as published by the " \ >"Free Software Foundation; either version 2 of the License, or (at your" \ >" option) any later version.\n" \ >"\n" \ >"Swell Foop is distributed in the hope that it will be useful, but WITH" \ >"OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY" \ >" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licen" \ >"se for more details.\n" \ >"\n" \ >"You should have received a copy of the GNU General Public License alon" \ >"g with Swell Foop; if not, write to the Free Software Foundation, Inc." \ >", 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"); > license = _tmp6_; > _tmp7_ = self->priv->main_window; > _tmp8_ = _ ("Swell Foop"); > _tmp9_ = _ ("I want to play that game! You know, they all light-up and you click on" \ >" them and they vanish!\n" \ >"\n" \ >"Swell Foop is a part of GNOME Games."); > _tmp10_ = _ ("Copyright \xc2\xa9 2009 Tim Horton"); > _tmp11_ = _ ("translator-credits"); > _tmp12_ = _ ("GNOME Games web site"); > gtk_show_about_dialog (_tmp7_, "program-name", _tmp8_, "version", VERSION, "comments", _tmp9_, "copyright", _tmp10_, "license", license, "wrap-license", TRUE, "authors", authors, "artists", artists, "documenters", documenters, "translator-credits", _tmp11_, "logo-icon-name", "swell-foop", "website", "http://www.gnome.org/projects/gnome-games", "website-label", _tmp12_, NULL, NULL); > _g_free0 (license); > documenters = (_vala_array_free (documenters, documenters_length1, (GDestroyNotify) g_free), NULL); > artists = (_vala_array_free (artists, artists_length1, (GDestroyNotify) g_free), NULL); > authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL); >} > > >void swell_foop_new_game (SwellFoop* self) { > Size _tmp0_ = {0}; > Size _tmp1_; > gint _tmp2_; > Size _tmp3_ = {0}; > Size _tmp4_; > gint _tmp5_; > GSettings* _tmp6_; > gint _tmp7_ = 0; > Game* _tmp8_; > Game* _tmp9_; > Game* _tmp10_; > GameView* _tmp11_; > GSettings* _tmp12_; > gchar* _tmp13_ = NULL; > gchar* _tmp14_; > GameView* _tmp15_; > Game* _tmp16_; > GameView* _tmp17_; > GSettings* _tmp18_; > gboolean _tmp19_ = FALSE; > ClutterStage* _tmp20_; > GameView* _tmp21_; > gfloat _tmp22_; > gfloat _tmp23_; > GameView* _tmp24_; > gfloat _tmp25_; > gfloat _tmp26_; > GtkClutterEmbed* _tmp27_; > ClutterStage* _tmp28_; > gfloat _tmp29_; > gfloat _tmp30_; > ClutterStage* _tmp31_; > gfloat _tmp32_; > gfloat _tmp33_; > g_return_if_fail (self != NULL); > swell_foop_get_size (self, &_tmp0_); > _tmp1_ = _tmp0_; > _tmp2_ = _tmp1_.rows; > swell_foop_get_size (self, &_tmp3_); > _tmp4_ = _tmp3_; > _tmp5_ = _tmp4_.columns; > _tmp6_ = self->priv->settings; > _tmp7_ = g_settings_get_int (_tmp6_, "colors"); > _tmp8_ = game_new (_tmp2_, _tmp5_, _tmp7_); > _g_object_unref0 (self->priv->game); > self->priv->game = _tmp8_; > size_destroy (&_tmp4_); > size_destroy (&_tmp1_); > _tmp9_ = self->priv->game; > g_signal_connect_object (_tmp9_, "update-score", (GCallback) _swell_foop_update_score_cb_game_update_score, self, 0); > _tmp10_ = self->priv->game; > g_signal_connect_object (_tmp10_, "complete", (GCallback) _swell_foop_complete_cb_game_complete, self, 0); > _tmp11_ = self->priv->view; > _tmp12_ = self->priv->settings; > _tmp13_ = g_settings_get_string (_tmp12_, "theme"); > _tmp14_ = _tmp13_; > game_view_set_theme_name (_tmp11_, _tmp14_); > _g_free0 (_tmp14_); > _tmp15_ = self->priv->view; > _tmp16_ = self->priv->game; > game_view_set_game (_tmp15_, _tmp16_); > _tmp17_ = self->priv->view; > _tmp18_ = self->priv->settings; > _tmp19_ = g_settings_get_boolean (_tmp18_, "zealous"); > _tmp17_->is_zealous = _tmp19_; > _tmp20_ = self->priv->stage; > _tmp21_ = self->priv->view; > _tmp22_ = clutter_actor_get_width ((ClutterActor*) _tmp21_); > _tmp23_ = _tmp22_; > _tmp24_ = self->priv->view; > _tmp25_ = clutter_actor_get_height ((ClutterActor*) _tmp24_); > _tmp26_ = _tmp25_; > clutter_actor_set_size ((ClutterActor*) _tmp20_, _tmp23_, _tmp26_); > _tmp27_ = self->priv->clutter_embed; > _tmp28_ = self->priv->stage; > _tmp29_ = clutter_actor_get_width ((ClutterActor*) _tmp28_); > _tmp30_ = _tmp29_; > _tmp31_ = self->priv->stage; > _tmp32_ = clutter_actor_get_height ((ClutterActor*) _tmp31_); > _tmp33_ = _tmp32_; > gtk_widget_set_size_request ((GtkWidget*) _tmp27_, (gint) _tmp30_, (gint) _tmp33_); > swell_foop_update_score_cb (self, 0); >} > > >gint swell_foop_main (gchar** args, int args_length1) { > gint result = 0; > ClutterInitError _tmp0_ = 0; > GOptionContext* _tmp1_; > GOptionContext* context; > GOptionContext* _tmp2_; > GOptionContext* _tmp3_; > GOptionGroup* _tmp4_ = NULL; > GOptionContext* _tmp5_; > GOptionGroup* _tmp6_ = NULL; > const gchar* _tmp11_ = NULL; > SwellFoop* _tmp12_; > SwellFoop* app; > SwellFoop* _tmp13_; > gchar** _tmp14_; > gint _tmp14__length1; > gint _tmp15_ = 0; > GError * _inner_error_ = NULL; > setlocale (LC_ALL, ""); > bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); > bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); > textdomain (GETTEXT_PACKAGE); > games_scores_startup (); > _tmp0_ = gtk_clutter_init (&args_length1, &args); > if (_tmp0_ != CLUTTER_INIT_SUCCESS) { > g_warning ("swell-foop.vala:440: Failed to initialise Clutter"); > result = EXIT_FAILURE; > return result; > } > _tmp1_ = g_option_context_new (""); > context = _tmp1_; > _tmp2_ = context; > g_option_context_set_translation_domain (_tmp2_, GETTEXT_PACKAGE); > _tmp3_ = context; > _tmp4_ = gtk_get_option_group (TRUE); > g_option_context_add_group (_tmp3_, _tmp4_); > _tmp5_ = context; > _tmp6_ = clutter_get_option_group_without_init (); > g_option_context_add_group (_tmp5_, _tmp6_); > { > GOptionContext* _tmp7_; > _tmp7_ = context; > g_option_context_parse (_tmp7_, &args_length1, &args, &_inner_error_); > if (_inner_error_ != NULL) { > goto __catch3_g_error; > } > } > goto __finally3; > __catch3_g_error: > { > GError* e = NULL; > FILE* _tmp8_; > GError* _tmp9_; > const gchar* _tmp10_; > e = _inner_error_; > _inner_error_ = NULL; > _tmp8_ = stderr; > _tmp9_ = e; > _tmp10_ = _tmp9_->message; > fprintf (_tmp8_, "%s\n", _tmp10_); > result = EXIT_FAILURE; > _g_error_free0 (e); > _g_option_context_free0 (context); > return result; > } > __finally3: > if (_inner_error_ != NULL) { > _g_option_context_free0 (context); > g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); > g_clear_error (&_inner_error_); > return 0; > } > _tmp11_ = _ ("Swell Foop"); > g_set_application_name (_tmp11_); > gtk_window_set_default_icon_name ("swellfoop"); > _tmp12_ = swell_foop_new (); > app = _tmp12_; > _tmp13_ = app; > _tmp14_ = args; > _tmp14__length1 = args_length1; > _tmp15_ = g_application_run ((GApplication*) _tmp13_, _tmp14__length1, _tmp14_); > result = _tmp15_; > _g_object_unref0 (app); > _g_option_context_free0 (context); > return result; >} > > >int main (int argc, char ** argv) { > g_type_init (); > return swell_foop_main (argv, argc); >} > > >static void swell_foop_class_init (SwellFoopClass * klass) { > swell_foop_parent_class = g_type_class_peek_parent (klass); > g_type_class_add_private (klass, sizeof (SwellFoopPrivate)); > G_APPLICATION_CLASS (klass)->startup = swell_foop_real_startup; > G_APPLICATION_CLASS (klass)->shutdown = swell_foop_real_shutdown; > G_APPLICATION_CLASS (klass)->activate = swell_foop_real_activate; > G_OBJECT_CLASS (klass)->finalize = swell_foop_finalize; >} > > >static void swell_foop_instance_init (SwellFoop * self) { > self->priv = SWELL_FOOP_GET_PRIVATE (self); > self->priv->game = NULL; > self->priv->preferences_dialog = NULL; >} > > >static void swell_foop_finalize (GObject* obj) { > SwellFoop * self; > self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SWELL_FOOP, SwellFoop); > _g_object_unref0 (self->priv->settings); > _g_object_unref0 (self->priv->main_window); > _g_object_unref0 (self->priv->game); > _g_object_unref0 (self->priv->view); > _g_object_unref0 (self->priv->stage); > _g_object_unref0 (self->priv->clutter_embed); > _g_object_unref0 (self->priv->high_scores); > _g_object_unref0 (self->priv->preferences_dialog); > _g_object_unref0 (self->priv->current_score_label); > self->sizes = (_vala_Size_array_free (self->sizes, self->sizes_length1), NULL); > G_OBJECT_CLASS (swell_foop_parent_class)->finalize (obj); >} > > >GType swell_foop_get_type (void) { > static volatile gsize swell_foop_type_id__volatile = 0; > if (g_once_init_enter (&swell_foop_type_id__volatile)) { > static const GTypeInfo g_define_type_info = { sizeof (SwellFoopClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) swell_foop_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwellFoop), 0, (GInstanceInitFunc) swell_foop_instance_init, NULL }; > GType swell_foop_type_id; > swell_foop_type_id = g_type_register_static (GTK_TYPE_APPLICATION, "SwellFoop", &g_define_type_info, 0); > g_once_init_leave (&swell_foop_type_id__volatile, swell_foop_type_id); > } > return swell_foop_type_id__volatile; >} > > >void size_copy (const Size* self, Size* dest) { > const gchar* _tmp0_; > gchar* _tmp1_; > const gchar* _tmp2_; > gchar* _tmp3_; > gint _tmp4_; > gint _tmp5_; > _tmp0_ = (*self).id; > _tmp1_ = g_strdup (_tmp0_); > _g_free0 ((*dest).id); > (*dest).id = _tmp1_; > _tmp2_ = (*self).name; > _tmp3_ = g_strdup (_tmp2_); > _g_free0 ((*dest).name); > (*dest).name = _tmp3_; > _tmp4_ = (*self).columns; > (*dest).columns = _tmp4_; > _tmp5_ = (*self).rows; > (*dest).rows = _tmp5_; >} > > >void size_destroy (Size* self) { > _g_free0 ((*self).id); > _g_free0 ((*self).name); >} > > >Size* size_dup (const Size* self) { > Size* dup; > dup = g_new0 (Size, 1); > size_copy (self, dup); > return dup; >} > > >void size_free (Size* self) { > size_destroy (self); > g_free (self); >} > > >GType size_get_type (void) { > static volatile gsize size_type_id__volatile = 0; > if (g_once_init_enter (&size_type_id__volatile)) { > GType size_type_id; > size_type_id = g_boxed_type_register_static ("Size", (GBoxedCopyFunc) size_dup, (GBoxedFreeFunc) size_free); > g_once_init_leave (&size_type_id__volatile, size_type_id); > } > return size_type_id__volatile; >} > > >static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { > if ((array != NULL) && (destroy_func != NULL)) { > int i; > for (i = 0; i < array_length; i = i + 1) { > if (((gpointer*) array)[i] != NULL) { > destroy_func (((gpointer*) array)[i]); > } > } > } >} > > >static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { > _vala_array_destroy (array, array_length, destroy_func); > g_free (array); >} > > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 861712
: 619343