+2003-06-14 Dani Carbonell <bocata@panete.net>
+
+ * src/commands.c (show_connect_button, show_disconnect_button):
+ new functions, to show and hide the connect button in the toolbar.
+ (make_menus): hide the disconnect button at startup.
+
+ * src/commands.h (show_disconnect_button, show_disconnect_button):
+ new functions.
+
+ * src/tetrinet.c (tetrinet_inmessage): added logic to show and
+ hide the connect/disconnect buttons.
+
2003-06-13 Dani Carbonell <bocata@panete.net>
* src/tetrinet.c (tetrinet_key): fixed this keypress signal
gnome_app_create_toolbar (app, toolbar);
gtk_widget_hide (toolbar[4].widget);
+ gtk_widget_hide (toolbar[1].widget);
}
/* callbacks */
client_outmessage (OUT_STARTGAME, buf);
}
+void show_connect_button (void)
+{
+ gtk_widget_hide (toolbar[1].widget);
+ gtk_widget_show (toolbar[0].widget);
+}
+
+void show_disconnect_button (void)
+{
+ gtk_widget_hide (toolbar[0].widget);
+ gtk_widget_show (toolbar[1].widget);
+}
+
void show_stop_button (void)
{
gtk_widget_hide (toolbar[3].widget);
void about_command (void);
void show_start_button (void);
void show_stop_button (void);
+void show_connect_button (void);
+void show_disconnect_button (void);
void commands_checkstate (void);
up_chan_list_source = g_timeout_add (30000, (GSourceFunc) partyline_update_channel_list, NULL);
partyline_joining_channel ("");
show_start_button ();
+ show_disconnect_button ();
break;
case IN_DISCONNECT:
if (!connected) {
TETRI_TB_C_DARK_GREEN, TETRI_TB_BOLD);
partyline_clear_list_channel ();
partyline_joining_channel (NULL);
+ show_connect_button ();
break;
case IN_CONNECTERROR:
connecterror:
gtk_dialog_run (GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
g_free (data_utf8);
+ show_connect_button ();
}
break;
case IN_PLAYERNUM: