Mercurial > pidgin.yaz
comparison src/gtksavedstatuses.c @ 13194:7099a443131d
[gaim-migrate @ 15557]
The other half of sf patch #1414103, from Sadrul Habib Chowdhury
"Make the initial selection in the substatus-
edit dialog correct (currently it always opens with the
last status in the list selected)."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 09 Feb 2006 00:00:08 +0000 |
parents | 3426bc61bb8b |
children | d8f238864c88 |
comparison
equal
deleted
inserted
replaced
13193:3426bc61bb8b | 13194:7099a443131d |
---|---|
1390 GtkWidget *toolbar; | 1390 GtkWidget *toolbar; |
1391 GtkWidget *vbox; | 1391 GtkWidget *vbox; |
1392 GtkWidget *win; | 1392 GtkWidget *win; |
1393 GtkTreeIter iter; | 1393 GtkTreeIter iter; |
1394 GtkCellRenderer *rend; | 1394 GtkCellRenderer *rend; |
1395 const char *id = NULL; | 1395 const char *status_id = NULL; |
1396 const GList *list; | 1396 const GList *list; |
1397 gboolean select = FALSE; | 1397 gboolean select = FALSE; |
1398 | 1398 |
1399 g_return_if_fail(status_editor != NULL); | 1399 g_return_if_fail(status_editor != NULL); |
1400 g_return_if_fail(account != NULL); | 1400 g_return_if_fail(account != NULL); |
1522 if (substatus != NULL) | 1522 if (substatus != NULL) |
1523 { | 1523 { |
1524 gtk_imhtml_append_text(dialog->message, | 1524 gtk_imhtml_append_text(dialog->message, |
1525 gaim_savedstatus_substatus_get_message(substatus), | 1525 gaim_savedstatus_substatus_get_message(substatus), |
1526 0); | 1526 0); |
1527 id = gaim_status_type_get_id(gaim_savedstatus_substatus_get_type(substatus)); | 1527 status_id = gaim_status_type_get_id(gaim_savedstatus_substatus_get_type(substatus)); |
1528 } | 1528 } |
1529 /* TODO: Else get the generic status type from our parent */ | |
1529 } | 1530 } |
1530 | 1531 |
1531 for (list = gaim_account_get_status_types(account); list; list = list->next) | 1532 for (list = gaim_account_get_status_types(account); list; list = list->next) |
1532 { | 1533 { |
1533 GaimStatusType *status_type; | 1534 GaimStatusType *status_type; |
1550 SUBSTATUS_COLUMN_STATUS_ID, id, | 1551 SUBSTATUS_COLUMN_STATUS_ID, id, |
1551 SUBSTATUS_COLUMN_STATUS_NAME, name, | 1552 SUBSTATUS_COLUMN_STATUS_NAME, name, |
1552 -1); | 1553 -1); |
1553 if (pixbuf != NULL) | 1554 if (pixbuf != NULL) |
1554 g_object_unref(pixbuf); | 1555 g_object_unref(pixbuf); |
1555 if (id && !strcmp(id, gaim_status_type_get_id(status_type))) | 1556 if ((status_id != NULL) && !strcmp(status_id, id)) |
1556 { | 1557 { |
1557 gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo), &iter); | 1558 gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo), &iter); |
1558 select = TRUE; | 1559 select = TRUE; |
1559 } | 1560 } |
1560 } | 1561 } |