~bcurtiswx/ubuntu/precise/empathy/3.4.2.3-0ubuntu1

« back to all changes in this revision

Viewing changes to libempathy-gtk/empathy-contact-dialogs.c

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2011-12-21 15:12:56 UTC
  • mfrom: (1.1.84)
  • Revision ID: package-import@ubuntu.com-20111221151256-9b1pny75wphfmqd6
Tags: 3.3.3-0ubuntu1
* New upstream version
  - Require folks >= 0.6.6 (LP: #907501)
* debian/control
  - bump build depends for folks to >= 0.6.6
* debian/watch
  - use the .xz file

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
static GList *subscription_dialogs = NULL;
41
41
static GList *information_dialogs = NULL;
42
 
static GList *edit_dialogs = NULL;
43
42
static GtkWidget *personal_dialog = NULL;
44
43
static GtkWidget *new_contact_dialog = NULL;
45
44
 
263
262
}
264
263
 
265
264
void
266
 
empathy_contact_edit_dialog_show (EmpathyContact *contact,
267
 
                                  GtkWindow      *parent)
268
 
{
269
 
        GtkWidget *dialog;
270
 
        GtkWidget *button;
271
 
        GtkWidget *contact_widget;
272
 
        GList     *l;
273
 
 
274
 
        g_return_if_fail (EMPATHY_IS_CONTACT (contact));
275
 
 
276
 
        l = g_list_find_custom (edit_dialogs,
277
 
                                contact,
278
 
                                (GCompareFunc) contact_dialogs_find);
279
 
        if (l) {
280
 
                gtk_window_present (GTK_WINDOW (l->data));
281
 
                return;
282
 
        }
283
 
 
284
 
        /* Create dialog */
285
 
        dialog = gtk_dialog_new ();
286
 
        gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
287
 
        gtk_window_set_title (GTK_WINDOW (dialog), _("Edit Contact Information"));
288
 
 
289
 
        /* Close button */
290
 
        button = gtk_button_new_with_label (GTK_STOCK_CLOSE);
291
 
        gtk_button_set_use_stock (GTK_BUTTON (button), TRUE);
292
 
        gtk_dialog_add_action_widget (GTK_DIALOG (dialog),
293
 
                                      button,
294
 
                                      GTK_RESPONSE_CLOSE);
295
 
        gtk_widget_set_can_default (button, TRUE);
296
 
        gtk_window_set_default (GTK_WINDOW (dialog), button);
297
 
        gtk_widget_show (button);
298
 
 
299
 
        /* Contact info widget */
300
 
        contact_widget = empathy_contact_widget_new (contact,
301
 
                EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
302
 
                EMPATHY_CONTACT_WIDGET_EDIT_GROUPS |
303
 
                EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE);
304
 
        gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8);
305
 
        gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
306
 
                            contact_widget,
307
 
                            TRUE, TRUE, 0);
308
 
        gtk_widget_show (contact_widget);
309
 
 
310
 
        g_object_set_data (G_OBJECT (dialog), "contact_widget", contact_widget);
311
 
        edit_dialogs = g_list_prepend (edit_dialogs, dialog);
312
 
 
313
 
        g_signal_connect (dialog, "response",
314
 
                          G_CALLBACK (contact_dialogs_response_cb),
315
 
                          &edit_dialogs);
316
 
 
317
 
        if (parent) {
318
 
                gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
319
 
        }
320
 
 
321
 
        gtk_widget_show (dialog);
322
 
}
323
 
 
324
 
void
325
265
empathy_contact_personal_dialog_show (GtkWindow *parent)
326
266
{
327
267
        GtkWidget *button;