Mercurial > pidgin.yaz
changeset 27995:9f9e70099573
merge of '080022da62aff247ec296e6c817cae0fc476b6a6'
and '3b1faad42b89245e12673c727b8f0c237e96c798'
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Wed, 22 Jul 2009 03:15:48 +0000 |
parents | feb17f2b5b7a (current diff) c43c87965db9 (diff) |
children | b29eac4769e9 |
files | |
diffstat | 3 files changed, 30 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/blist.c Wed Jul 22 03:11:05 2009 +0000 +++ b/libpurple/blist.c Wed Jul 22 03:15:48 2009 +0000 @@ -1299,8 +1299,8 @@ PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); PurpleChat *chat; - g_return_val_if_fail(account != NULL, FALSE); - g_return_val_if_fail(components != NULL, FALSE); + g_return_val_if_fail(account != NULL, NULL); + g_return_val_if_fail(components != NULL, NULL); chat = g_new0(PurpleChat, 1); chat->account = account;
--- a/libpurple/win32/targets.mak Wed Jul 22 03:11:05 2009 +0000 +++ b/libpurple/win32/targets.mak Wed Jul 22 03:15:48 2009 +0000 @@ -36,7 +36,7 @@ $(PIDGIN_INSTALL_DIR): mkdir -p $(PIDGIN_INSTALL_DIR) -$(PIDGIN_INSTALL_PERLMOD_DIR): +$(PIDGIN_INSTALL_PERL_DIR): mkdir -p $(PIDGIN_INSTALL_PERL_DIR) $(PIDGIN_INSTALL_PLUGINS_DIR):
--- a/pidgin/gtkblist.c Wed Jul 22 03:11:05 2009 +0000 +++ b/pidgin/gtkblist.c Wed Jul 22 03:15:48 2009 +0000 @@ -6980,12 +6980,9 @@ static void add_chat_cb(GtkWidget *w, PidginAddChatData *data) { - GHashTable *components; GList *tmp; PurpleChat *chat; - PurpleGroup *group; - const char *group_name; - const char *value; + GHashTable *components; components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); @@ -7001,7 +6998,8 @@ } else { - value = gtk_entry_get_text(tmp->data); + const char *value = gtk_entry_get_text(tmp->data); + if (*value != '\0') g_hash_table_replace(components, g_strdup(g_object_get_data(tmp->data, "identifier")), @@ -7010,28 +7008,31 @@ } chat = purple_chat_new(data->chat_data.rq_data.account, - gtk_entry_get_text(GTK_ENTRY(data->alias_entry)), - components); - - group_name = pidgin_text_combo_box_entry_get_text(data->group_combo); - - group = NULL; - if ((group_name != NULL) && (*group_name != '\0') && ((group = purple_find_group(group_name)) == NULL)) - { - group = purple_group_new(group_name); - purple_blist_add_group(group, NULL); - } - - if (chat != NULL) - { + gtk_entry_get_text(GTK_ENTRY(data->alias_entry)), + components); + + if (chat != NULL) { + PurpleGroup *group; + const char *group_name; + + group_name = pidgin_text_combo_box_entry_get_text(data->group_combo); + + group = NULL; + if ((group_name != NULL) && (*group_name != '\0') && + ((group = purple_find_group(group_name)) == NULL)) + { + group = purple_group_new(group_name); + purple_blist_add_group(group, NULL); + } + purple_blist_add_chat(chat, group, NULL); - } - - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->autojoin))) - purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-autojoin", TRUE); - - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->persistent))) - purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-persistent", TRUE); + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->autojoin))) + purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-autojoin", TRUE); + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->persistent))) + purple_blist_node_set_bool((PurpleBlistNode*)chat, "gtk-persistent", TRUE); + } gtk_widget_destroy(data->chat_data.rq_data.window); g_free(data->chat_data.default_chat_name);