~ubuntu-branches/ubuntu/natty/empathy/natty-updates

« back to all changes in this revision

Viewing changes to libempathy-gtk/empathy-chat-window.c

Tags: upstream-0.22.0
ImportĀ upstreamĀ versionĀ 0.22.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
2
/*
3
3
 * Copyright (C) 2003-2007 Imendio AB
4
 
 * Copyright (C) 2007 Collabora Ltd.
 
4
 * Copyright (C) 2007-2008 Collabora Ltd.
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or
7
7
 * modify it under the terms of the GNU General Public License as
934
934
 
935
935
        priv = GET_PRIV (window);
936
936
 
937
 
        /* Only save geometry information if there is ONE chat visible. */
938
 
        if (g_list_length (priv->chats) > 1) {
939
 
                return FALSE;
940
 
        }
941
 
 
942
937
        if (priv->save_geometry_id != 0) {
943
938
                g_source_remove (priv->save_geometry_id);
944
939
        }
1731
1726
                              EmpathyChat       *chat)
1732
1727
{
1733
1728
        EmpathyChatWindowPriv *priv;
1734
 
        GtkWidget            *label;
1735
 
        GtkWidget            *child;
 
1729
        GtkWidget             *label;
 
1730
        GtkWidget             *child;
 
1731
        gint                   x, y, w, h;
1736
1732
 
1737
1733
        g_return_if_fail (window != NULL);
1738
1734
        g_return_if_fail (EMPATHY_IS_CHAT (chat));
1745
1741
        /* Set the chat window */
1746
1742
        empathy_chat_set_window (chat, window);
1747
1743
 
1748
 
        if (g_list_length (priv->chats) == 0) {
1749
 
                gint x, y, w, h;
1750
 
 
1751
 
                empathy_chat_load_geometry (chat, &x, &y, &w, &h);
1752
 
 
1753
 
                if (x >= 0 && y >= 0) {
1754
 
                        /* Let the window manager position it if we don't have
1755
 
                         * good x, y coordinates.
1756
 
                         */
1757
 
                        gtk_window_move (GTK_WINDOW (priv->dialog), x, y);
1758
 
                }
1759
 
 
1760
 
                if (w > 0 && h > 0) {
1761
 
                        /* Use the defaults from the glade file if we don't have
1762
 
                         * good w, h geometry.
1763
 
                         */
1764
 
                        gtk_window_resize (GTK_WINDOW (priv->dialog), w, h);
1765
 
                }
 
1744
        empathy_chat_load_geometry (chat, &x, &y, &w, &h);
 
1745
 
 
1746
        if (x >= 0 && y >= 0) {
 
1747
                /* Let the window manager position it if we don't have
 
1748
                 * good x, y coordinates.
 
1749
                 */
 
1750
                gtk_window_move (GTK_WINDOW (priv->dialog), x, y);
 
1751
        }
 
1752
 
 
1753
        if (w > 0 && h > 0) {
 
1754
                /* Use the defaults from the glade file if we don't have
 
1755
                 * good w, h geometry.
 
1756
                 */
 
1757
                gtk_window_resize (GTK_WINDOW (priv->dialog), w, h);
1766
1758
        }
1767
1759
 
1768
1760
        child = empathy_chat_get_widget (chat);