diff options
author | Vasily_Makarov <danilka.pro@gmail.com> | 2011-10-20 09:18:58 +0400 |
---|---|---|
committer | Vasily_Makarov <danilka.pro@gmail.com> | 2011-10-20 09:18:58 +0400 |
commit | 97911ac99f187a7c2c3eb4324b04cbb39b8e9bee (patch) | |
tree | 65919bfae696bba7eb6a6d7ef3fc67d58d961f59 /saedit | |
parent | 95213c9cdb04d1791d55c231331467edce9ab722 (diff) | |
download | tools-97911ac99f187a7c2c3eb4324b04cbb39b8e9bee.tar.gz tools-97911ac99f187a7c2c3eb4324b04cbb39b8e9bee.tar.bz2 tools-97911ac99f187a7c2c3eb4324b04cbb39b8e9bee.tar.xz tools-97911ac99f187a7c2c3eb4324b04cbb39b8e9bee.zip |
Correct freeing info after opening new file or creating new
Diffstat (limited to 'saedit')
-rw-r--r-- | saedit/interface.c | 2 | ||||
-rw-r--r-- | saedit/interface.ui | 46 | ||||
-rw-r--r-- | saedit/main.c | 7 | ||||
-rw-r--r-- | saedit/main.h | 3 |
4 files changed, 33 insertions, 25 deletions
diff --git a/saedit/interface.c b/saedit/interface.c index 8238416..cda7493 100644 --- a/saedit/interface.c +++ b/saedit/interface.c @@ -57,7 +57,7 @@ void file_new() { gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(xml_file_chooser_button), ""); gtk_widget_set_sensitive(reload_menu_item, FALSE); - free_lists(gen_sae_info); + free_current_info(); } void set_up_interface() { diff --git a/saedit/interface.ui b/saedit/interface.ui index 73193ee..59127fd 100644 --- a/saedit/interface.ui +++ b/saedit/interface.ui @@ -471,7 +471,7 @@ Reid Yaro <reidyaro@gmail.com></property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">4</property> + <property name="position">5</property> </packing> </child> <child> @@ -491,21 +491,6 @@ Reid Yaro <reidyaro@gmail.com></property> </packing> </child> <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Imagesets</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">7</property> - </packing> - </child> - <child> <object class="GtkButton" id="button3"> <property name="label" translatable="yes">Parse XML Buffer</property> <property name="visible">True</property> @@ -517,14 +502,14 @@ Reid Yaro <reidyaro@gmail.com></property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">7</property> + <property name="position">6</property> </packing> </child> <child> - <object class="GtkLabel" id="label4"> + <object class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Actions</property> + <property name="label" translatable="yes">Imagesets</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -532,7 +517,7 @@ Reid Yaro <reidyaro@gmail.com></property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">9</property> + <property name="position">7</property> </packing> </child> <child> @@ -550,10 +535,10 @@ Reid Yaro <reidyaro@gmail.com></property> </packing> </child> <child> - <object class="GtkLabel" id="label5"> + <object class="GtkLabel" id="label4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Directions</property> + <property name="label" translatable="yes">Actions</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -561,7 +546,7 @@ Reid Yaro <reidyaro@gmail.com></property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">11</property> + <property name="position">9</property> </packing> </child> <child> @@ -578,6 +563,21 @@ Reid Yaro <reidyaro@gmail.com></property> </packing> </child> <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Directions</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">11</property> + </packing> + </child> + <child> <object class="GtkComboBoxText" id="animationscbox"> <property name="visible">True</property> <property name="can_focus">False</property> diff --git a/saedit/main.c b/saedit/main.c index 8385f60..bf5b5e4 100644 --- a/saedit/main.c +++ b/saedit/main.c @@ -110,7 +110,7 @@ void open_xml_file(GtkButton *button) { gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(xml_file_chooser_button)); } - free_lists(gen_sae_info); + free_current_info(); } void save_to_xml_file(gchar *filename) { @@ -158,6 +158,11 @@ void free_lists(SAEInfo *sae_info) { free_animations(sae_info); } +void free_current_info() { + free_lists(gen_sae_info); + player = NULL; +} + //Callbacks void data_folder_set_callback(GtkFileChooserButton *widget, gpointer data) { diff --git a/saedit/main.h b/saedit/main.h index 163a685..af78d8f 100644 --- a/saedit/main.h +++ b/saedit/main.h @@ -75,6 +75,9 @@ void free_imagesets(SAEInfo *sae_info); void free_actions(SAEInfo *sae_info); void free_animations(SAEInfo *sae_info); void free_imageset(SAEInfo *sae_info); +void free_lists(SAEInfo *sae_info); + +void free_current_info(); //Callbacks void data_folder_set_callback(GtkFileChooserButton *widget, gpointer data); |