mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 01:30:19 +00:00
First round of using GTK accessor functions
This is the first step to build with GSEAL_ENABLE setup.c uses a deprecated fontchooser, chanview-tabs.c didn't like the conversion, and I am waiting to do some work on xtext.c before converting it.
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
static void
|
||||
joind_radio2_cb (GtkWidget *radio, server *serv)
|
||||
{
|
||||
if (GTK_TOGGLE_BUTTON (radio)->active)
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio)))
|
||||
{
|
||||
gtk_widget_grab_focus (serv->gui->joind_entry);
|
||||
gtk_editable_set_position (GTK_EDITABLE (serv->gui->joind_entry), 999);
|
||||
@@ -79,13 +79,13 @@ joind_ok_cb (GtkWidget *ok, server *serv)
|
||||
}
|
||||
|
||||
/* do nothing */
|
||||
if (GTK_TOGGLE_BUTTON (serv->gui->joind_radio1)->active)
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (serv->gui->joind_radio1)))
|
||||
goto xit;
|
||||
|
||||
/* join specific channel */
|
||||
if (GTK_TOGGLE_BUTTON (serv->gui->joind_radio2)->active)
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (serv->gui->joind_radio2)))
|
||||
{
|
||||
char *text = GTK_ENTRY (serv->gui->joind_entry)->text;
|
||||
char *text = (char *)gtk_entry_get_text (GTK_ENTRY (serv->gui->joind_entry));
|
||||
if (strlen (text) < 2)
|
||||
{
|
||||
fe_message (_("Channel name too short, try again."), FE_MSG_ERROR);
|
||||
@@ -100,7 +100,7 @@ joind_ok_cb (GtkWidget *ok, server *serv)
|
||||
|
||||
xit:
|
||||
prefs.hex_gui_join_dialog = 0;
|
||||
if (GTK_TOGGLE_BUTTON (serv->gui->joind_check)->active)
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (serv->gui->joind_check)))
|
||||
prefs.hex_gui_join_dialog = 1;
|
||||
|
||||
gtk_widget_destroy (serv->gui->joind_win);
|
||||
@@ -134,7 +134,7 @@ joind_show_dialog (server *serv)
|
||||
gtk_window_set_type_hint (GTK_WINDOW (dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);
|
||||
gtk_window_set_position (GTK_WINDOW (dialog1), GTK_WIN_POS_MOUSE);
|
||||
|
||||
dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
|
||||
dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (dialog1));
|
||||
gtk_widget_show (dialog_vbox1);
|
||||
|
||||
vbox1 = gtk_vbox_new (FALSE, 0);
|
||||
@@ -167,7 +167,7 @@ joind_show_dialog (server *serv)
|
||||
label = gtk_label_new (_("In the Server-List window, no channel (chat room) has been entered to be automatically joined for this network."));
|
||||
gtk_widget_show (label);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
|
||||
GTK_LABEL (label)->wrap = TRUE;
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
|
||||
label = gtk_label_new (_("What would you like to do next?"));
|
||||
@@ -223,14 +223,14 @@ joind_show_dialog (server *serv)
|
||||
gtk_widget_show (checkbutton1);
|
||||
gtk_box_pack_start (GTK_BOX (vbox1), checkbutton1, FALSE, FALSE, 0);
|
||||
|
||||
dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
|
||||
dialog_action_area1 = gtk_dialog_get_action_area (GTK_DIALOG (dialog1));
|
||||
gtk_widget_show (dialog_action_area1);
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
|
||||
|
||||
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
|
||||
gtk_widget_show (okbutton1);
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog1)->action_area), okbutton1, FALSE, TRUE, 0);
|
||||
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_end (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog1))), okbutton1, FALSE, TRUE, 0);
|
||||
gtk_widget_set_can_default (okbutton1, TRUE);
|
||||
|
||||
g_signal_connect (G_OBJECT (dialog1), "destroy",
|
||||
G_CALLBACK (joind_destroy_cb), serv);
|
||||
|
||||
Reference in New Issue
Block a user