Пример #1
0
static void
empathy_roster_view_constructed (GObject *object)
{
  EmpathyRosterView *self = EMPATHY_ROSTER_VIEW (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_roster_view_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  g_assert (EMPATHY_IS_ROSTER_MODEL (self->priv->model));

  /* Get saved group states. */
  empathy_contact_groups_get_all ();

  populate_view (self);

  tp_g_signal_connect_object (self->priv->model, "individual-added",
      G_CALLBACK (individual_added_cb), self, 0);
  tp_g_signal_connect_object (self->priv->model, "individual-removed",
      G_CALLBACK (individual_removed_cb), self, 0);
  tp_g_signal_connect_object (self->priv->model, "groups-changed",
      G_CALLBACK (groups_changed_cb), self, 0);

  gtk_list_box_set_sort_func (GTK_LIST_BOX (self),
      roster_view_sort, self, NULL);

  gtk_list_box_set_header_func (GTK_LIST_BOX (self), update_header, self, NULL);

  gtk_list_box_set_filter_func (GTK_LIST_BOX (self), filter_list, self, NULL);

  gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (self), FALSE);
}
Пример #2
0
static void
empathy_app_plugin_widget_constructed (GObject *object)
{
  EmpathyAppPluginWidget *self = EMPATHY_APP_PLUGIN_WIDGET (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_app_plugin_widget_parent_class)->constructed;
  GtkWidget *top;
  TpAccountManager *manager;

  if (chain_up != NULL)
    chain_up (object);

  g_assert (AG_IS_ACCOUNT (self->priv->account));

  /* Top bar */
  top = create_top_bar (self);
  gtk_widget_show (top);
  gtk_box_pack_start (GTK_BOX (self), top, FALSE, FALSE, 0);

  /* Prepare tp's account manager to find the TpAccount corresponding to our
   * AgAccount */
  manager = tp_account_manager_dup ();
  tp_proxy_prepare_async (manager, NULL,
      manager_prepared_cb, tp_weak_ref_new (self, NULL, NULL));
  g_object_unref (manager);
}
static void
mcd_client_registry_dispose (GObject *object)
{
  McdClientRegistry *self = MCD_CLIENT_REGISTRY (object);
  void (*chain_up) (GObject *) =
    G_OBJECT_CLASS (_mcd_client_registry_parent_class)->dispose;

  if (self->priv->dbus_daemon != NULL)
    {
      DBusGConnection *gconn =
        tp_proxy_get_dbus_connection (self->priv->dbus_daemon);
      DBusConnection *dconn = dbus_g_connection_get_connection (gconn);

      dbus_connection_remove_filter (dconn,
          mcd_client_registry_name_owner_filter,
          self);
    }

  tp_clear_object (&self->priv->dbus_daemon);

  if (self->priv->clients != NULL)
    {
      g_hash_table_foreach (self->priv->clients,
          mcd_client_registry_disconnect_client_signals, self);

    }

  tp_clear_pointer (&self->priv->clients, g_hash_table_unref);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #4
0
static void
constructed (GObject *object)
{
  ExampleCallStream *self = EXAMPLE_CALL_STREAM (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) example_call_stream_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  tp_dbus_daemon_register_object (
      tp_base_connection_get_dbus_daemon (self->priv->conn),
      self->priv->object_path, self);

  if (self->priv->locally_requested)
    {
      example_call_stream_change_direction (self, TRUE, TRUE);
    }
  else
    {
      example_call_stream_receive_direction_request (self, TRUE, TRUE);
    }

  if (self->priv->handle != 0)
    {
      TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
          self->priv->conn, TP_HANDLE_TYPE_CONTACT);

      tp_handle_ref (contact_repo, self->priv->handle);
    }
}
Пример #5
0
static void
empathy_roster_view_dispose (GObject *object)
{
  EmpathyRosterView *self = EMPATHY_ROSTER_VIEW (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_roster_view_parent_class)->dispose;

  /* Start by clearing the view so our internal hash tables are cleared from
   * objects being destroyed. */
  clear_view (self);

  stop_flashing (self);

  empathy_roster_view_set_live_search (self, NULL);
  g_clear_object (&self->priv->model);

  if (self->priv->search_id != 0)
    {
      g_source_remove (self->priv->search_id);
      self->priv->search_id = 0;
    }

  if (chain_up != NULL)
    chain_up (object);
}
Пример #6
0
static void
constructed (GObject *object)
{
  ExampleContactListBase *self = EXAMPLE_CONTACT_LIST_BASE (object);
  void (*chain_up) (GObject *) =
    ((GObjectClass *) example_contact_list_base_parent_class)->constructed;
  TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
      (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
  TpHandle self_handle = self->priv->conn->self_handle;
  TpHandleRepoIface *handle_repo = tp_base_connection_get_handles
      (self->priv->conn, self->priv->handle_type);

  if (chain_up != NULL)
    chain_up (object);

  g_assert (TP_IS_BASE_CONNECTION (self->priv->conn));
  g_assert (EXAMPLE_IS_CONTACT_LIST_MANAGER (self->priv->manager));

  tp_dbus_daemon_register_object (
      tp_base_connection_get_dbus_daemon (self->priv->conn),
      self->priv->object_path, self);

  tp_handle_ref (handle_repo, self->priv->handle);
  tp_group_mixin_init (object, G_STRUCT_OFFSET (ExampleContactListBase, group),
      contact_repo, self_handle);
  /* Both the subclasses have full support for telepathy-spec 0.17.6. */
  tp_group_mixin_change_flags (object,
      TP_CHANNEL_GROUP_FLAG_PROPERTIES, 0);
}
Пример #7
0
static void
empathy_geoclue_helper_finalize (GObject *object)
{
  //EmpathyGeoclueHelper *self = EMPATHY_GEOCLUE_HELPER (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_geoclue_helper_parent_class)->finalize;

  chain_up (object);
}
static void
empathy_webcredentials_monitor_constructed (GObject *object)
{
    EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object);
    void (*chain_up) (GObject *) =
        ((GObjectClass *) empathy_webcredentials_monitor_parent_class)->constructed;

    chain_up (object);

    g_assert (AG_IS_MANAGER (self->priv->manager));
}
static void
empathy_webcredentials_monitor_finalize (GObject *object)
{
    EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object);
    void (*chain_up) (GObject *) =
        ((GObjectClass *) empathy_webcredentials_monitor_parent_class)->finalize;

    g_ptr_array_unref (self->priv->failures);

    chain_up (object);
}
Пример #10
0
static void
gst_validate_ssim_dispose (GObject * object)
{
  GstValidateSsim *self = GST_VALIDATE_SSIM (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) gst_validate_ssim_parent_class)->dispose;

  gst_object_unref (self->priv->ssim);

  chain_up (object);
}
static void
tp_tls_certificate_rejection_dispose (GObject *object)
{
  TpTLSCertificateRejection *self = TP_TLS_CERTIFICATE_REJECTION (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) tp_tls_certificate_rejection_parent_class)->dispose;

  g_variant_unref (self->priv->details);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #12
0
static void
empathy_app_plugin_widget_dispose (GObject *object)
{
  EmpathyAppPluginWidget *self = EMPATHY_APP_PLUGIN_WIDGET (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_app_plugin_widget_parent_class)->dispose;

  g_clear_object (&self->priv->account);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #13
0
static void
tp_tests_room_list_chan_finalize (GObject *object)
{
  TpTestsRoomListChan *self = TP_TESTS_ROOM_LIST_CHAN (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) tp_tests_room_list_chan_parent_class)->finalize;

  g_free (self->priv->server);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #14
0
static void
tp_tests_room_list_chan_constructed (GObject *object)
{
  TpTestsRoomListChan *self = TP_TESTS_ROOM_LIST_CHAN (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) tp_tests_room_list_chan_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  tp_base_channel_register (TP_BASE_CHANNEL (self));
}
Пример #15
0
static void
gst_validate_override_finalize (GObject * object)
{
  GstValidateOverride *self = GST_VALIDATE_OVERRIDE (object);

  void (*chain_up) (GObject *) =
      ((GObjectClass *) gst_validate_override_parent_class)->finalize;

  g_hash_table_unref (self->priv->level_override);

  chain_up (object);
}
static void
empathy_webcredentials_monitor_dispose (GObject *object)
{
    EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object);
    void (*chain_up) (GObject *) =
        ((GObjectClass *) empathy_webcredentials_monitor_parent_class)->dispose;

    g_clear_object (&self->priv->manager);
    g_clear_object (&self->priv->proxy);

    chain_up (object);
}
Пример #17
0
static void
finalize (GObject *object)
{
  ExampleCallStream *self = EXAMPLE_CALL_STREAM (object);
  void (*chain_up) (GObject *) =
    ((GObjectClass *) example_call_stream_parent_class)->finalize;

  g_free (self->priv->object_path);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #18
0
static void
tp_channel_dispatcher_constructed (GObject *object)
{
  TpChannelDispatcher *self = TP_CHANNEL_DISPATCHER (object);
  void (*chain_up) (GObject *) =
    ((GObjectClass *) tp_channel_dispatcher_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  g_return_if_fail (tp_proxy_get_dbus_daemon (self) != NULL);
}
static void
tp_tls_certificate_rejection_finalize (GObject *object)
{
  TpTLSCertificateRejection *self = TP_TLS_CERTIFICATE_REJECTION (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) tp_tls_certificate_rejection_parent_class)->finalize;

  g_free (self->priv->dbus_error);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #20
0
static void
empathy_roster_view_remove (GtkContainer *container,
    GtkWidget *widget)
{
  EmpathyRosterView *self = EMPATHY_ROSTER_VIEW (container);
  void (*chain_up) (GtkContainer *, GtkWidget *) =
      ((GtkContainerClass *) empathy_roster_view_parent_class)->remove;

  chain_up (container, widget);

  if (EMPATHY_IS_ROSTER_CONTACT (widget))
    remove_from_displayed (self, (EmpathyRosterContact *) widget);
}
Пример #21
0
static void
tp_debug_message_finalize (GObject *object)
{
  TpDebugMessage *self = TP_DEBUG_MESSAGE (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) tp_debug_message_parent_class)->finalize;

  g_free (self->priv->domain);
  g_free (self->priv->category);
  g_free (self->priv->message);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #22
0
static void
empathy_roster_view_finalize (GObject *object)
{
  EmpathyRosterView *self = EMPATHY_ROSTER_VIEW (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_roster_view_parent_class)->finalize;

  g_hash_table_unref (self->priv->roster_contacts);
  g_hash_table_unref (self->priv->roster_groups);
  g_hash_table_unref (self->priv->displayed_contacts);
  g_queue_free_full (self->priv->events, event_free);

  if (chain_up != NULL)
    chain_up (object);
}
Пример #23
0
static void
constructed (GObject *object)
{
  ExampleCSHRoomManager *self = EXAMPLE_CSH_ROOM_MANAGER (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) example_csh_room_manager_parent_class)->constructed;

  if (chain_up != NULL)
    {
      chain_up (object);
    }

  self->priv->status_changed_id = g_signal_connect (self->priv->conn,
      "status-changed", (GCallback) status_changed_cb, self);
}
Пример #24
0
static void
list_constructed (GObject *object)
{
  ExampleContactList *self = EXAMPLE_CONTACT_LIST (object);
  void (*chain_up) (GObject *) =
    ((GObjectClass *) example_contact_list_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  g_assert (self->parent.priv->handle_type == TP_HANDLE_TYPE_LIST);

  switch (self->parent.priv->handle)
    {
    case EXAMPLE_CONTACT_LIST_PUBLISH:
      /* We can stop publishing presence to people, but we can't
       * start sending people our presence unless they ask for it.
       *
       * (We can accept people's requests to see our presence - but that's
       * always allowed, so there's no flag.)
       */
      tp_group_mixin_change_flags (object,
          TP_CHANNEL_GROUP_FLAG_CAN_REMOVE, 0);
      break;
    case EXAMPLE_CONTACT_LIST_STORED:
      /* We can add people to our roster (not that that's very useful without
       * also adding them to subscribe), and we can remove them altogether
       * (which implicitly removes them from subscribe, publish, and all
       * user-defined groups).
       */
      tp_group_mixin_change_flags (object,
          TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE, 0);
      break;
    case EXAMPLE_CONTACT_LIST_SUBSCRIBE:
      /* We can ask people to show us their presence, attaching a message.
       * We can also cancel (rescind) requests that they haven't replied to,
       * and stop receiving their presence after they allow it.
       */
      tp_group_mixin_change_flags (object,
          TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_MESSAGE_ADD |
          TP_CHANNEL_GROUP_FLAG_CAN_REMOVE |
          TP_CHANNEL_GROUP_FLAG_CAN_RESCIND,
          0);
      break;
    default:
      g_assert_not_reached ();
    }
}
Пример #25
0
static void
constructed (GObject *object)
{
  ExampleCallableMediaStream *self = EXAMPLE_CALLABLE_MEDIA_STREAM (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) example_callable_media_stream_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  g_object_get (self->priv->channel,
      "connection", &self->priv->conn,
      NULL);
  self->priv->call_terminated_id = g_signal_connect (self->priv->channel,
      "call-terminated", G_CALLBACK (call_terminated_cb), self);
}
Пример #26
0
static void
gst_validate_ssim_finalize (GObject * object)
{
  GstValidateSsim *self = GST_VALIDATE_SSIM (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) gst_validate_ssim_parent_class)->finalize;

  g_list_free_full (self->priv->converters,
      (GDestroyNotify) ssim_convert_info_free);

  if (self->priv->outconverter_info.converter)
    gst_video_converter_free (self->priv->outconverter_info.converter);
  g_hash_table_unref (self->priv->ref_frames_cache);

  chain_up (object);
}
Пример #27
0
static void
group_constructed (GObject *object)
{
  ExampleContactGroup *self = EXAMPLE_CONTACT_GROUP (object);
  void (*chain_up) (GObject *) =
    ((GObjectClass *) example_contact_group_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  g_assert (self->parent.priv->handle_type == TP_HANDLE_TYPE_GROUP);

  /* We can add people to user-defined groups, and also remove them. */
  tp_group_mixin_change_flags (object,
      TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE, 0);
}
Пример #28
0
static void
constructed (GObject *object)
{
  TpBaseConnection *base = TP_BASE_CONNECTION (object);
  void (*chain_up) (GObject *) =
    G_OBJECT_CLASS (example_call_connection_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  tp_contacts_mixin_init (object,
      G_STRUCT_OFFSET (ExampleCallConnection, contacts_mixin));
  tp_base_connection_register_with_contacts_mixin (base);

  tp_presence_mixin_init (object,
      G_STRUCT_OFFSET (ExampleCallConnection, presence_mixin));
  tp_presence_mixin_simple_presence_register_with_contacts_mixin (object);
}
Пример #29
0
static void
empathy_geoclue_helper_dispose (GObject *object)
{
  EmpathyGeoclueHelper *self = EMPATHY_GEOCLUE_HELPER (object);
  void (*chain_up) (GObject *) =
      ((GObjectClass *) empathy_geoclue_helper_parent_class)->dispose;

  if (self->priv->started)
    {
      gclue_client_call_stop (self->priv->client, NULL, NULL, NULL);

      self->priv->started = FALSE;
    }

  g_clear_object (&self->priv->location);
  g_clear_object (&self->priv->client);

  chain_up (object);
}
static void
mcd_client_registry_constructed (GObject *object)
{
  McdClientRegistry *self = MCD_CLIENT_REGISTRY (object);
  void (*chain_up) (GObject *) =
    G_OBJECT_CLASS (_mcd_client_registry_parent_class)->constructed;

  if (chain_up != NULL)
    chain_up (object);

  g_return_if_fail (self->priv->dbus_daemon != NULL);

  DEBUG ("Starting to look for clients");

  watch_clients (self);

  tp_cli_dbus_daemon_call_list_names (self->priv->dbus_daemon, -1,
      mcd_client_registry_list_names_cb, NULL, NULL, object);
}