dialog = dialog;
switch (button) {
case GTK_RESPONSE_CANCEL:
- gtk_timeout_remove (timeouttag);
+ g_source_remove (timeouttag);
timeouttag = 0;
if (connectingdialog == 0) return;
client_disconnect ();
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(connectingdialog)->vbox),
progressbar, TRUE, TRUE, 0);
- timeouttag = gtk_timeout_add (20, (GtkFunction)connectingdialog_timeout,
- NULL);
+ timeouttag = g_timeout_add (20, (GtkFunction)connectingdialog_timeout,
+ NULL);
g_signal_connect (G_OBJECT(connectingdialog), "response",
GTK_SIGNAL_FUNC(connectingdialog_button), NULL);
g_signal_connect (G_OBJECT(connectingdialog), "delete_event",
/* entry and label */
hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
widget = gtk_label_new (_("Team name:"));
- gtk_box_pack_start_defaults (GTK_BOX (hbox), widget);
+ gtk_box_pack_start (GTK_BOX (hbox), widget ,TRUE, TRUE, 0);
entry = gnome_entry_new ("Team");
gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (entry))),
team_utf8);
g_object_set (G_OBJECT (gnome_entry_gtk_entry (GNOME_ENTRY (entry))),
"activates_default", TRUE, NULL);
- gtk_box_pack_start_defaults (GTK_BOX (hbox), entry);
+ gtk_box_pack_start (GTK_BOX (hbox), entry ,TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD_SMALL);
- gtk_box_pack_end_defaults (GTK_BOX (GTK_DIALOG (team_dialog)->vbox), hbox);
+ gtk_box_pack_end (GTK_BOX (GTK_DIALOG (team_dialog)->vbox), hbox ,TRUE, TRUE, 0);
/* pass the entry in the data pointer */
g_signal_connect (G_OBJECT(team_dialog), "response",
sound_playsound (S_YOULOSE);
/* end timeout thingies */
if (movedowntimeout)
- gtk_timeout_remove (movedowntimeout);
+ g_source_remove (movedowntimeout);
if (nextblocktimeout)
- gtk_timeout_remove (nextblocktimeout);
+ g_source_remove (nextblocktimeout);
movedowntimeout = nextblocktimeout = 0;
tetris_makeblock (-1, 0);
}
sound_stopmidi ();
ingame = playing = FALSE;
if (movedowntimeout)
- gtk_timeout_remove (movedowntimeout);
+ g_source_remove (movedowntimeout);
if (nextblocktimeout)
- gtk_timeout_remove (nextblocktimeout);
+ g_source_remove (nextblocktimeout);
movedowntimeout = nextblocktimeout = 0;
tetris_makeblock (-1, 0);
fields_drawnextblock (blankblock);
void tetrinet_settimeout (int duration)
{
if (movedowntimeout)
- gtk_timeout_remove (movedowntimeout);
- movedowntimeout = gtk_timeout_add (duration, (GtkFunction)tetrinet_timeout,
- NULL);
+ g_source_remove (movedowntimeout);
+ movedowntimeout = g_timeout_add (duration, (GtkFunction)tetrinet_timeout,
+ NULL);
}
void tetrinet_removetimeout (void)
{
if (movedowntimeout)
- gtk_timeout_remove (movedowntimeout);
+ g_source_remove (movedowntimeout);
movedowntimeout = 0;
}
if (nextblocktimeout) return;
tetrinet_removetimeout ();
nextblocktimeout =
- gtk_timeout_add ( (btrixgame ? 0 : NEXTBLOCKDELAY),
- (GtkFunction)tetrinet_nextblocktimeout, NULL);
+ g_timeout_add ((btrixgame ? 0 : NEXTBLOCKDELAY),
+ (GtkFunction)tetrinet_nextblocktimeout, NULL);
}
gint tetrinet_nextblocktimeout (void)
/* end of if */ ;
}
/* give it a little delay in drawing */
- gtk_timeout_add (40, (GtkFunction)tetrinet_removelinestimeout,
- NULL);
+ g_timeout_add (40, (GtkFunction)tetrinet_removelinestimeout,
+ NULL);
return sound;
}
{
if (now) {
if (mutimeout) {
- gtk_timeout_remove (mutimeout);
+ g_source_remove (mutimeout);
moderatorupdate_timeout ();
}
}
else {
if (mutimeout)
- gtk_timeout_remove (mutimeout);
- mutimeout = gtk_timeout_add (PARTYLINEDELAY2, (GtkFunction)moderatorupdate_timeout, NULL);
+ g_source_remove (mutimeout);
+ mutimeout = g_timeout_add (PARTYLINEDELAY2,
+ (GtkFunction)moderatorupdate_timeout, NULL);
}
}
void partylineupdate (int now)
{
- if (putimeout) gtk_timeout_remove (putimeout);
+ if (putimeout) g_source_remove (putimeout);
if (now)
partylineupdate_timeout ();
else
- putimeout = gtk_timeout_add (PARTYLINEDELAY1, (GtkFunction)partylineupdate_timeout,
- NULL);
+ putimeout = g_timeout_add (PARTYLINEDELAY1, (GtkFunction)partylineupdate_timeout,
+ NULL);
}
void partylineupdate_join (char *name)