~ubuntu-branches/ubuntu/vivid/vino/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/06_use-ubuntu-help.patch/server/vino-status-tube-icon.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-11-18 15:53:41 UTC
  • mfrom: (1.4.8)
  • Revision ID: package-import@ubuntu.com-20131118155341-u7aet62hkfzomvi6
Tags: 3.8.1-0ubuntu1
* New upstream version, drop changes included in the new version
* debian/patches/revert_use_prompt_notification.patch:
  - revert upstream change to use a notification with actions to accept or
    deny clients, since notify-osd doesn't support those, we keep using
    the old standalone dialog instead
* debian/patches/git_tls_read.patch:
  - "Fix reading of TLS data to account for cached data"

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <string.h>
25
25
#include <gtk/gtk.h>
26
26
#include <gio/gdesktopappinfo.h>
27
 
#ifdef VINO_HAVE_LIBNOTIFY
28
27
#include <glib/gi18n.h>
29
28
#include <libnotify/notify.h>
30
 
#endif
31
29
 
32
30
#include "vino-status-tube-icon.h"
33
31
#include "vino-enums.h"
40
38
  GtkWidget *disconnect_dialog;
41
39
  VinoStatusTubeIconVisibility visibility;
42
40
 
43
 
#ifdef VINO_HAVE_LIBNOTIFY
44
41
  NotifyNotification *new_client_notification;
45
 
#endif
46
42
};
47
43
 
48
44
G_DEFINE_TYPE (VinoStatusTubeIcon, vino_status_tube_icon, GTK_TYPE_STATUS_ICON);
59
55
{
60
56
  VinoStatusTubeIcon *icon = VINO_STATUS_TUBE_ICON (object);
61
57
 
62
 
#ifdef VINO_HAVE_LIBNOTIFY
63
58
  if (icon->priv->new_client_notification != NULL)
64
59
    {
65
60
      notify_notification_close (icon->priv->new_client_notification, NULL);
66
61
      g_object_unref (icon->priv->new_client_notification);
67
62
      icon->priv->new_client_notification = NULL;
68
63
    }
69
 
#endif
70
64
 
71
65
  if (icon->priv->menu != NULL)
72
66
    {
107
101
vino_status_tube_icon_init (VinoStatusTubeIcon *icon)
108
102
{
109
103
  icon->priv = G_TYPE_INSTANCE_GET_PRIVATE (icon, VINO_TYPE_STATUS_TUBE_ICON, VinoStatusTubeIconPrivate);
110
 
#ifdef VINO_HAVE_LIBNOTIFY
111
104
  icon->priv->new_client_notification = NULL;
112
 
#endif
113
105
}
114
106
 
115
107
static void
375
367
    }
376
368
}
377
369
 
378
 
#ifdef VINO_HAVE_LIBNOTIFY
379
370
static void
380
371
vino_status_tube_icon_show_invalidated_notif_closed
381
372
    (VinoStatusTubeIcon *icon)
383
374
  dprintf (TUBE, "Notification was closed");
384
375
  vino_tube_server_fire_closed (icon->priv->server);
385
376
}
386
 
#endif
387
377
 
388
378
void
389
379
vino_status_tube_icon_show_notif (VinoStatusTubeIcon *icon,
390
380
    const gchar *summary, const gchar *body, gboolean invalidated)
391
381
{
392
 
#ifdef VINO_HAVE_LIBNOTIFY
393
382
#define NOTIFICATION_TIMEOUT 5
394
383
 
395
384
  GError *error;
414
403
      filename = g_strdup ("stock_person");
415
404
 
416
405
  icon->priv->new_client_notification =
417
 
#ifdef VINO_HAVE_LIBNOTIFY_0_7
418
406
      notify_notification_new (summary, body, filename);
419
 
#else
420
 
      notify_notification_new_with_status_icon (summary, body,
421
 
      filename, GTK_STATUS_ICON (icon));
422
 
#endif
423
407
 
424
408
  g_free (filename);
425
409
 
 
410
  notify_notification_set_hint_string (icon->priv->new_client_notification,
 
411
                                       "desktop-entry", "vino-server");
426
412
  notify_notification_set_timeout (icon->priv->new_client_notification,
427
413
      NOTIFICATION_TIMEOUT * 1000);
428
414
 
440
426
    }
441
427
 
442
428
#undef NOTIFICATION_TIMEOUT
443
 
#else
444
 
  if (invalidated)
445
 
    vino_tube_server_fire_closed (icon->priv->server);
446
 
#endif /* VINO_HAVE_LIBNOTIFY */
447
429
}
448
430