Beispiel #1
0
static void
ide_git_vcs__monitor_changed_cb (IdeGitVcs         *self,
                                 GFile             *file,
                                 GFile             *other_file,
                                 GFileMonitorEvent  event_type,
                                 gpointer           user_data)
{
  g_autofree gchar *name = NULL;
  g_autofree gchar *other_name = NULL;

  IDE_ENTRY;

  g_assert (IDE_IS_GIT_VCS (self));
  g_assert (G_IS_FILE (file));
  g_assert (!other_file || G_IS_FILE (other_file));

  name = g_file_get_basename (file);

  if (other_file != NULL)
    other_name = g_file_get_basename (other_file);

  if (dzl_str_equal0 (name, "index") ||
      dzl_str_equal0 (other_name, "index"))
    {
      dzl_clear_source (&self->changed_timeout);
      self->changed_timeout = g_timeout_add_seconds (DEFAULT_CHANGED_TIMEOUT_SECS,
                                                     ide_git_vcs__changed_timeout_cb,
                                                     self);
    }

  IDE_EXIT;
}
static void
ide_fancy_tree_view_destroy (GtkWidget *widget)
{
  IdeFancyTreeView *self = (IdeFancyTreeView *)widget;
  IdeFancyTreeViewPrivate *priv = ide_fancy_tree_view_get_instance_private (self);

  dzl_clear_source (&priv->relayout_source);

  GTK_WIDGET_CLASS (ide_fancy_tree_view_parent_class)->destroy (widget);
}
Beispiel #3
0
static void
ide_source_map_show_map_and_queue_fade (IdeSourceMap *self)
{
  g_assert (IDE_IS_SOURCE_MAP (self));

  dzl_clear_source (&self->delayed_conceal_timeout);

  if (self->in_map == FALSE)
    self->delayed_conceal_timeout = g_timeout_add (CONCEAL_TIMEOUT,
                                                   ide_source_map_do_conceal,
                                                   self);

  if (self->show_map == FALSE)
    {
      self->show_map = TRUE;
      g_signal_emit (self, signals [SHOW_MAP], 0);
    }
}
Beispiel #4
0
static void
ide_git_vcs_dispose (GObject *object)
{
  IdeGitVcs *self = (IdeGitVcs *)object;

  IDE_ENTRY;

  dzl_clear_source (&self->changed_timeout);

  if (self->monitor)
    {
      if (!g_file_monitor_is_cancelled (self->monitor))
        g_file_monitor_cancel (self->monitor);
      g_clear_object (&self->monitor);
    }

  g_clear_object (&self->change_monitor_repository);
  g_clear_object (&self->repository);
  g_clear_object (&self->working_directory);

  G_OBJECT_CLASS (ide_git_vcs_parent_class)->dispose (object);

  IDE_EXIT;
}