# HG changeset patch # User Christian Hammond # Date 1069536925 0 # Node ID df5b0937ea47c71893b099acf6f1f87b06c68abc # Parent 6d59800ace031e355fe887911b58a7db3fe2c77c [gaim-migrate @ 8225] Put back a default conversation placement function. This was causing very bad things to happen on qpe-gaim, though likely gtk-gaim was okay..? committer: Tailor Script diff -r 6d59800ace03 -r df5b0937ea47 src/conversation.c --- a/src/conversation.c Sat Nov 22 19:15:32 2003 +0000 +++ b/src/conversation.c Sat Nov 22 21:35:25 2003 +0000 @@ -51,6 +51,9 @@ static GList *conv_placement_fncs = NULL; static GaimConvPlacementFunc place_conv = NULL; +static void ensure_default_funcs(void); +static void conv_placement_last_created_win(GaimConversation *conv); + static gint insertname_compare(gconstpointer one, gconstpointer two) { @@ -851,7 +854,14 @@ gaim_conv_window_show(win); } else { - if (!place_conv) + if (place_conv == NULL) + { + ensure_default_funcs(); + + place_conv = conv_placement_last_created_win; + } + + if (place_conv == NULL) gaim_debug(GAIM_DEBUG_ERROR, "conversation", "This is about to suck.\n"); @@ -2324,7 +2334,6 @@ GList *wins, *convs; GaimAccount *account; - account = gaim_conversation_get_account(conv); type = gaim_conversation_get_type(conv); @@ -2357,7 +2366,8 @@ conv_placement_new_window(conv); } -static ConvPlacementData *get_conv_placement_data(const char *id) +static ConvPlacementData * +get_conv_placement_data(const char *id) { ConvPlacementData *data = NULL; GList *n; @@ -2373,7 +2383,7 @@ static void add_conv_placement_fnc(const char *id, const char *name, - GaimConvPlacementFunc fnc) + GaimConvPlacementFunc fnc) { ConvPlacementData *data; @@ -2384,13 +2394,13 @@ data->fnc = fnc; conv_placement_fncs = g_list_append(conv_placement_fncs, data); - } static void ensure_default_funcs(void) { - if (conv_placement_fncs == NULL) { + if (conv_placement_fncs == NULL) + { add_conv_placement_fnc("last", _("Last created window"), conv_placement_last_created_win); add_conv_placement_fnc("new", _("New window"),