Re: Combo and glist destroy signal problem
- From: learfox furry ao net
- To: Marco Quezada <mquezada nlxcorp com>
- Cc: GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: Combo and glist destroy signal problem
- Date: Thu, 18 Jan 2001 14:17:50 -0800 (PST)
In the example callback the contents of the combo is cleared without
destroying the combo so that new variables or strings can be added to it.
The line you are looking for is the one I pointed out with the asterix.
Then afterwards, inside the READ_DATA_MATRIX() function I call
gtk_combo_set_popdown_strings on the newly loaded values of the GList to
fill the combo again.
Wait a minute, but the example you are showing is for a file selection
dialog?
The GtkCombo that I'm reffering to is destroyed, when it is destroyed
a "destroy" signal is emitted and my "destroy" signal callback needs to
deallocate the glist that was previously set on that just destroyed
GtkCombo.
My question was that is the GtkCombo destroyed first then "destroy" signal
emitted or the other way around?
void
on_file_sel_ok_button_clicked (GtkButton *button,
gpointer user_data)
{
int length;
int i = 0;
int j = 0;
char temp_string[128];
TAMAL_GLBL->ASCII_FILE_NAME = "";
TAMAL_GLBL->ASCII_FILE_NAME =
gtk_file_selection_get_filename(GTK_FILE_SELECTION(TAMAL_GLBL->file_selection_dialog));
length = strlen(TAMAL_GLBL->ASCII_FILE_NAME);
if(TAMAL_GLBL->ASCII_FILE_NAME[length - 1] != '/')
{
TAMAL_GLBL->variable_index_list = NULL;
<---------------------------------******
while(TAMAL_GLBL->ASCII_FILE_NAME[length] != '/')
{
temp_string[i] = TAMAL_GLBL->ASCII_FILE_NAME[length - 1];
length = length - 1;
++i;
}
temp_string[i-1] = '\0';
i = 0;
length = strlen(temp_string) - 1;
for(j = length; j >= 0; --j)
{
TAMAL_GLBL->SHORT_ASCII_FILE_NAME[j] = temp_string[i];
++i;
}
TAMAL_GLBL->SHORT_ASCII_FILE_NAME[i] = '\0';
TAMAL_GLBL->PARAMETERS = 0;
TAMAL_GLBL->OPENED_FILES = 1;
UNCOMPRESS_SOURCE_FILE(TAMAL_GLBL->ASCII_FILE_NAME);
gtk_object_destroy(GTK_OBJECT(TAMAL_GLBL->file_selection_dialog));
READ_DATA_MATRIX();
}
else
{
gtk_statusbar_push( GTK_STATUSBAR(TAMAL_GLBL->statusbar),
TAMAL_GLBL->status_context_id, "You Sir, are and
IDIOT");
while (gtk_events_pending())
{
gtk_main_iteration();
}
}
}
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
..__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]