Commit ddaae4cf authored by Naba Kumar's avatar Naba Kumar

src/compiler_options_cbs.c, compiler_options.h, compiler_options_gui.c,

	* src/compiler_options_cbs.c, compiler_options.h, compiler_options_gui.c,
	  Fixed Bug #499807, ie crash on removing libs, includes, defines from
	  the compiler options dialog.

	* ChangeLog:
	  Correct todays date. :)
parent c7349123
2002-01-25 Naba Kumar <kh_naba@users.sourceforge.net>
2002-01-26 Naba Kumar <kh_naba@users.sourceforge.net>
* src/compiler_options_cbs.c, compiler_options.h, compiler_options_gui.c,
Fixed Bug #499807, ie crash on removing libs, includes, defines from
the compiler options dialog.
* ChangeLog:
Correct todays date. :)
2002-01-26 Naba Kumar <kh_naba@users.sourceforge.net>
* Fix for bug #499373
* data/properties/anjuta.properties, ada.properties, cpp.properties,
java, properties, latex.properties, lua.properties, others.properties,
perl.properties:
......@@ -13,7 +24,7 @@
Commented #DEBUG switch.
2002-01-25 Naba Kumar <kh_naba@users.sourceforge.net>
2002-01-26 Naba Kumar <kh_naba@users.sourceforge.net>
* scripts/*: Added files which I forgot previously.
......
......@@ -145,4 +145,7 @@ void compiler_options_set_prjmacros_in_file (CompilerOptions * co, FILE* fp);
/* private */
void compiler_options_set_in_properties (CompilerOptions* co, PropsID props);
void compiler_options_connect_signals(CompilerOptions* co);
void compiler_options_disconnect_signals(CompilerOptions* co);
#endif
......@@ -352,9 +352,14 @@ on_co_inc_remove_clicked (GtkButton * button, gpointer data)
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.inc_clist)->row_list) < 1)
return;
compiler_options_disconnect_signals(co);
gtk_entry_set_text (GTK_ENTRY (co->widgets.inc_entry), "");
gtk_clist_remove (GTK_CLIST (co->widgets.inc_clist), co->inc_index);
compiler_options_update_controls (co);
compiler_options_connect_signals(co);
}
void
......@@ -445,9 +450,14 @@ on_co_lib_remove_clicked (GtkButton * button, gpointer data)
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.lib_clist)->row_list) < 1)
return;
compiler_options_disconnect_signals(co);
gtk_entry_set_text (GTK_ENTRY (co->widgets.lib_entry), "");
gtk_clist_remove (GTK_CLIST (co->widgets.lib_clist), co->lib_index);
compiler_options_update_controls (co);
compiler_options_connect_signals(co);
}
void
......@@ -628,9 +638,14 @@ on_co_def_remove_clicked (GtkButton * button, gpointer data)
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.def_clist)->row_list) < 1)
return;
compiler_options_disconnect_signals(co);
gtk_entry_set_text (GTK_ENTRY (co->widgets.def_entry), "");
gtk_clist_remove (GTK_CLIST (co->widgets.def_clist), co->def_index);
compiler_options_update_controls (co);
compiler_options_connect_signals(co);
}
void
......
......@@ -187,7 +187,9 @@ create_compiler_options_gui (CompilerOptions * co)
GTK_WIDGET_SET_FLAGS (comopt_cancel, GTK_CAN_DEFAULT);
gtk_accel_group_attach (app->accel_group, GTK_OBJECT (window1));
compiler_options_connect_signals(co);
gtk_signal_connect (GTK_OBJECT (dialog1), "delete_event",
GTK_SIGNAL_FUNC (on_comopt_delete_event), co);
gtk_signal_connect (GTK_OBJECT (comopt_ok), "clicked",
......@@ -265,10 +267,6 @@ create_compiler_options_page0 (CompilerOptions * co)
gtk_box_pack_start (GTK_BOX (vbox1), button2, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button2), 5);
gtk_signal_connect (GTK_OBJECT (clist1), "select_row",
GTK_SIGNAL_FUNC (on_co_supp_clist_select_row),
co);
gtk_signal_connect (GTK_OBJECT (button0), "clicked",
GTK_SIGNAL_FUNC (on_co_supp_info_clicked), co);
......@@ -376,8 +374,6 @@ create_compiler_options_page1 (CompilerOptions * co)
gtk_box_pack_start (GTK_BOX (vbox1), button4, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button4), 5);
gtk_signal_connect (GTK_OBJECT (clist1), "select_row",
GTK_SIGNAL_FUNC (on_co_inc_clist_select_row), co);
gtk_signal_connect (GTK_OBJECT (button0), "clicked",
GTK_SIGNAL_FUNC (on_co_inc_add_clicked), co);
gtk_signal_connect (GTK_OBJECT (button1), "clicked",
......@@ -496,9 +492,6 @@ create_compiler_options_page2 (CompilerOptions * co)
gtk_box_pack_start (GTK_BOX (vbox1), button4, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button4), 5);
gtk_signal_connect (GTK_OBJECT (clist1), "select_row",
GTK_SIGNAL_FUNC
(on_co_lib_paths_clist_select_row), co);
gtk_signal_connect (GTK_OBJECT (button0), "clicked",
GTK_SIGNAL_FUNC (on_co_lib_paths_add_clicked),
co);
......@@ -653,8 +646,6 @@ create_compiler_options_page3 (CompilerOptions * co)
gtk_box_pack_start (GTK_BOX (vbox1), button4, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button4), 5);
gtk_signal_connect (GTK_OBJECT (clist1), "select_row",
GTK_SIGNAL_FUNC (on_co_lib_clist_select_row), co);
gtk_signal_connect (GTK_OBJECT (clist2), "select_row",
GTK_SIGNAL_FUNC
(on_co_lib_stock_clist_select_row), co);
......@@ -781,8 +772,6 @@ create_compiler_options_page4 (CompilerOptions * co)
gtk_box_pack_start (GTK_BOX (vbox1), button4, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button4), 5);
gtk_signal_connect (GTK_OBJECT (clist1), "select_row",
GTK_SIGNAL_FUNC (on_co_def_clist_select_row), co);
gtk_signal_connect (GTK_OBJECT (button0), "clicked",
GTK_SIGNAL_FUNC (on_co_def_add_clicked), co);
gtk_signal_connect (GTK_OBJECT (button1), "clicked",
......@@ -1167,3 +1156,49 @@ create_compiler_options_page7 (CompilerOptions * co)
return frame;
}
void
compiler_options_connect_signals(CompilerOptions* co)
{
gtk_signal_connect (GTK_OBJECT (co->widgets.supp_clist), "select_row",
GTK_SIGNAL_FUNC (on_co_supp_clist_select_row),
co);
gtk_signal_connect (GTK_OBJECT (co->widgets.inc_clist), "select_row",
GTK_SIGNAL_FUNC (on_co_inc_clist_select_row), co);
gtk_signal_connect (GTK_OBJECT (co->widgets.lib_paths_clist), "select_row",
GTK_SIGNAL_FUNC (on_co_lib_paths_clist_select_row),
co);
gtk_signal_connect (GTK_OBJECT (co->widgets.lib_clist), "select_row",
GTK_SIGNAL_FUNC (on_co_lib_clist_select_row),
co);
gtk_signal_connect (GTK_OBJECT (co->widgets.def_clist), "select_row",
GTK_SIGNAL_FUNC (on_co_def_clist_select_row),
co);
}
void
compiler_options_disconnect_signals(CompilerOptions* co)
{
gtk_signal_disconnect_by_func (GTK_OBJECT (co->widgets.supp_clist),
GTK_SIGNAL_FUNC (on_co_supp_clist_select_row),
co);
gtk_signal_disconnect_by_func (GTK_OBJECT (co->widgets.inc_clist),
GTK_SIGNAL_FUNC (on_co_inc_clist_select_row), co);
gtk_signal_disconnect_by_func (GTK_OBJECT (co->widgets.lib_paths_clist),
GTK_SIGNAL_FUNC (on_co_lib_paths_clist_select_row),
co);
gtk_signal_disconnect_by_func (GTK_OBJECT (co->widgets.lib_clist),
GTK_SIGNAL_FUNC (on_co_lib_clist_select_row),
co);
gtk_signal_disconnect_by_func (GTK_OBJECT (co->widgets.def_clist),
GTK_SIGNAL_FUNC (on_co_def_clist_select_row),
co);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment