summary refs log tree commit diff stats
path: root/src/fe-gtk/joind.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-05-12 01:43:27 -0400
committerTingPing <tingping@tingping.se>2013-09-20 17:24:39 -0400
commitae04663aa91f864250fd109fe6433c8dea7c4a93 (patch)
treed02b14b3ef494c0f82fcf17ce8c8b4fffe9bcf3c /src/fe-gtk/joind.c
parent9f8073ab7705e0b5d9b83cb046741bd5c5f78f05 (diff)
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.
Diffstat (limited to 'src/fe-gtk/joind.c')
-rw-r--r--src/fe-gtk/joind.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c
index 55d62e3b..7cdb7a14 100644
--- a/src/fe-gtk/joind.c
+++ b/src/fe-gtk/joind.c
@@ -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);