Mercurial > pidgin
changeset 1790:c4864ac7792b
[gaim-migrate @ 1800]
left-justify for whiny-ass bitches
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 01 May 2001 02:55:49 +0000 |
parents | 511af0edd6f1 |
children | b4cc5f391133 |
files | src/away.c src/prefs.c |
diffstat | 2 files changed, 25 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/away.c Tue May 01 01:46:42 2001 +0000 +++ b/src/away.c Tue May 01 02:55:49 2001 +0000 @@ -307,20 +307,23 @@ #endif if (prefs_away_list != NULL) { + GtkWidget *hbox; gtk_list_clear_items(GTK_LIST(prefs_away_list), 0, -1); while (awy) { a = (struct away_message *)awy->data; + list_item = gtk_list_item_new(); + gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); + gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a); + gtk_object_set_user_data(GTK_OBJECT(list_item), a); + gtk_widget_show(list_item); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_container_add(GTK_CONTAINER(list_item), hbox); + gtk_widget_show(hbox); + label = gtk_label_new(a->name); - list_item = gtk_list_item_new(); - gtk_container_add(GTK_CONTAINER(list_item), label); - gtk_signal_connect(GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(away_list_clicked), a); -/* gtk_signal_connect(GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(away_list_unclicked), a);*/ - gtk_object_set_user_data(GTK_OBJECT(list_item), a); - + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); - gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); - gtk_widget_show(list_item); awy = g_slist_next(awy); }
--- a/src/prefs.c Tue May 01 01:46:42 2001 +0000 +++ b/src/prefs.c Tue May 01 02:55:49 2001 +0000 @@ -1764,20 +1764,24 @@ while (awy) { a = (struct away_message *)awy->data; + list_item = gtk_list_item_new(); + gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); + gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a); + gtk_object_set_user_data(GTK_OBJECT(list_item), a); + gtk_widget_show(list_item); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_container_add(GTK_CONTAINER(list_item), hbox); + gtk_widget_show(hbox); + label = gtk_label_new(a->name); - list_item = gtk_list_item_new(); - gtk_container_add(GTK_CONTAINER(list_item), label); - gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), - a); -/* gtk_signal_connect(GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(away_list_unclicked), a);*/ - gtk_object_set_user_data(GTK_OBJECT(list_item), a); - + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); - gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); - gtk_widget_show(list_item); awy = awy->next; } + if (away_messages != NULL) + gtk_list_select_item(GTK_LIST(prefs_away_list), 0); gtk_widget_show(prefdialog); }