• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GTK_CTREE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_CTREE函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_CTREE函数的具体用法?C++ GTK_CTREE怎么用?C++ GTK_CTREE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_CTREE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: remove_file_transfer

void
remove_file_transfer (gpointer data)
{
  gftpui_common_curtrans_data * transdata;
  GtkCTreeNode * node;
  gftp_file * curfle;

  if (GTK_CLIST (dlwdw)->selection == NULL)
    {
      ftp_log (gftp_logging_error, NULL,
              _("There are no file transfers selected\n"));
      return;
    }

  node = GTK_CLIST (dlwdw)->selection->data;
  transdata = gtk_ctree_node_get_row_data (GTK_CTREE (dlwdw), node);

  if (transdata->curfle == NULL || transdata->curfle->data == NULL)
    return;

  curfle = transdata->curfle->data;
  gftpui_common_skip_file_transfer (transdata->transfer, curfle);

  gtk_ctree_node_set_text (GTK_CTREE (dlwdw), curfle->user_data, 1,
                           _("Skipped"));
}
开发者ID:GNOME,项目名称:gftp,代码行数:26,代码来源:transfer.c


示例2: source_ctree_add_master

void source_ctree_add_master (GtkWidget *ctree, struct master *m) {
	GtkCTreeNode *node;
	GtkCTreeNode *parent = NULL;
	struct master *group = NULL;

	if (m->isgroup)
		return;

	// If set to display only configured games, and game is not configured,
	// and it's not the 'Favorites' master, just return so the display
	// isn't updated with the game type and masters.
	if (!(games[m->type].cmd) && default_show_only_configured_games && m != favorites)
		return;

	if (m->type != UNKNOWN_SERVER) {
		group = (struct master *) g_slist_nth_data (master_groups, m->type);
		source_ctree_enable_master_group (ctree, group, TRUE);
	}

	node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m);

	if (!node) {
		if (group) {
			parent = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, group);
		}
		node = gtk_ctree_insert_node (GTK_CTREE (ctree), parent, NULL, NULL, 4, NULL, NULL, NULL, NULL, TRUE, FALSE);
		gtk_ctree_node_set_row_data (GTK_CTREE (ctree), node, m);
	}
	source_ctree_show_node_status (ctree, m);
}
开发者ID:IR4T4,项目名称:xqf,代码行数:30,代码来源:xqf-ui.c


示例3: ssl_manager_delete_cb

static void ssl_manager_delete_cb(GtkWidget *widget, 
			      gpointer data) 
{
	SSLCertificate *cert;
	GList *rowlist;
	int val;
	
	rowlist = GTK_CLIST(manager.certlist)->selection;
	if (!rowlist) 
		return;
	
	cert = gtk_ctree_node_get_row_data
			(GTK_CTREE(manager.certlist),
			 GTK_CTREE_NODE(rowlist->data));
	
	if (!cert)
		return;
	val = alertpanel(_("Delete certificate"), 
			     _("Do you really want to delete this certificate?"),
			     _("Yes"), _("+No"), NULL);
	if (val != G_ALERTDEFAULT)
		return;
	
	ssl_certificate_delete_from_disk(cert);
	ssl_certificate_destroy(cert);
	gtk_ctree_remove_node(GTK_CTREE(manager.certlist), GTK_CTREE_NODE(rowlist->data));
}
开发者ID:moreorless,项目名称:claws-mail,代码行数:27,代码来源:ssl_manager.c


示例4: dirtree_refresh_node

void
dirtree_refresh_node (DirTree * dt, GtkCTreeNode * node)
{
    DirTreeNode *dirnode = NULL;
    gint    has_subdirs;
    gboolean expanded;

    dirnode = gtk_ctree_node_get_row_data (GTK_CTREE (dt), node);

    has_subdirs = tree_is_subdirs (dirnode->path, dt->show_dotfile);

    if (has_subdirs && GTK_CTREE_ROW (node)->expanded == 1)
	expanded = TRUE;
    else
	expanded = FALSE;

    if (has_subdirs)
	gtk_ctree_set_node_info (GTK_CTREE (dt), node,
				 g_basename (dirnode->path), CTREE_SPACING,
				 folder_pixmap, folder_mask, ofolder_pixmap,
				 ofolder_mask, FALSE, expanded);
    else
	gtk_ctree_set_node_info (GTK_CTREE (dt), node,
				 g_basename (dirnode->path), CTREE_SPACING,
				 folder_pixmap, folder_mask, ofolder_pixmap,
				 ofolder_mask, TRUE, expanded);
}
开发者ID:gentoo,项目名称:pornview,代码行数:27,代码来源:dirtree.c


示例5: fill_source_ctree

static void fill_source_ctree (GtkWidget *ctree) {
	GSList *list;
	GSList *list2;
	GtkCTreeNode *node;
	GtkCTreeNode *parent;
	struct master *group;
	struct master *m;

	source_ctree_add_master (ctree, favorites);

	for (list = master_groups; list; list = list->next) {
		group = (struct master *) list->data;
		if (group->masters) {
			// If set to display only configured games, and game is not configured,
			// don't update the display with the master.
			if (games[group->type].cmd || !default_show_only_configured_games) {
				source_ctree_enable_master_group (ctree, group, FALSE);
				parent = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, group);

				for (list2 = group->masters; list2; list2 = list2->next) {
					m = (struct master *) list2->data;
					node = gtk_ctree_insert_node (GTK_CTREE (ctree), parent, NULL, NULL, 4, NULL, NULL, NULL, NULL, TRUE, FALSE);
					gtk_ctree_node_set_row_data (GTK_CTREE (ctree), node, m);
					source_ctree_show_node_status (ctree, m);
				}
			}
		}
	}
}
开发者ID:IR4T4,项目名称:xqf,代码行数:29,代码来源:xqf-ui.c


示例6: gftpui_add_file_to_transfer

void
gftpui_add_file_to_transfer (gftp_transfer * tdata, GList * curfle)
{
  gftpui_common_curtrans_data * transdata;
  char *text[2];
  gftp_file * fle;

  fle = curfle->data;
  text[0] = gftpui_gtk_get_utf8_file_pos (fle);

  if (fle->transfer_action == GFTP_TRANS_ACTION_SKIP)
    text[1] = _("Skipped");
  else
    text[1] = _("Waiting...");

  fle->user_data = gtk_ctree_insert_node (GTK_CTREE (dlwdw),
                                          tdata->user_data, NULL, text, 5,
                                          NULL, NULL, NULL, NULL,
                                          FALSE, FALSE);
  transdata = g_malloc0 (sizeof (*transdata));
  transdata->transfer = tdata;
  transdata->curfle = curfle;

  gtk_ctree_node_set_row_data (GTK_CTREE (dlwdw), fle->user_data, transdata);
}
开发者ID:GNOME,项目名称:gftp,代码行数:25,代码来源:gtkui_transfer.c


示例7: gdisp_popupMenuHandler

/*
 * Popup Menu Handler.
 * Expand or Collapse the whole hierarchical tree.
 */
static void
gdisp_popupMenuHandler ( Kernel_T    *kernel,
			 PopupMenu_T *menu,
			 gpointer     menuData, /* cTree */
			 gpointer     itemData )
{

  GtkWidget *cTree  = (GtkWidget*)menuData;
  guint      action = GPOINTER_TO_UINT(itemData);

  /*
   * itemData : 0-collapse, 1-expand
   */
  if (action == 1 /* expand */) {

    gtk_ctree_expand_recursive(GTK_CTREE(cTree),
			       (GtkCTreeNode*)NULL);

  }
  else {

    gtk_ctree_collapse_recursive(GTK_CTREE(cTree),
				 (GtkCTreeNode*)NULL);

  }

}
开发者ID:deweerdt,项目名称:TSP,代码行数:31,代码来源:gdisp_sampledSymbols.c


示例8: icon_selected

static void icon_selected (MimeView *mimeview, gint num, MimeInfo *partinfo)
{
	GtkCTreeNode *node;
	node = gtk_ctree_find_by_row_data(GTK_CTREE(mimeview->ctree), NULL, partinfo);
	if (node)
		gtk_ctree_select(GTK_CTREE(mimeview->ctree), node);
}		
开发者ID:moreorless,项目名称:claws-mail,代码行数:7,代码来源:mimeview.c


示例9: switch

GtkWidget *create_cwidget (GtkWidget *scrollwin, struct clist_def *cldef) {
	GtkWidget *alignment;
	GtkWidget *label;
	GtkWidget *clist;
	char buf[256];
	int i;

	switch (cldef->type) {
		case CWIDGET_CLIST:
			clist = gtk_clist_new (cldef->columns);
			break;

		case CWIDGET_CTREE:
			clist = gtk_ctree_new (cldef->columns, 0);
			gtk_ctree_set_line_style (GTK_CTREE (clist), GTK_CTREE_LINES_NONE);
			gtk_ctree_set_expander_style (GTK_CTREE (clist), GTK_CTREE_EXPANDER_TRIANGLE);
			gtk_ctree_set_indent (GTK_CTREE (clist), 10);
			break;

		default:
			return NULL;
	}

	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

	GTK_CLIST_SET_FLAG (GTK_CLIST (clist), CLIST_SHOW_TITLES);
	gtk_container_add (GTK_CONTAINER (scrollwin), clist);

	gtk_clist_set_selection_mode (GTK_CLIST (clist), cldef->mode);

	for (i = 0; i < cldef->columns; i++) {
		g_snprintf (buf, 256, "/" CONFIG_FILE "/%s Geometry/%s=%d",
				cldef->name, cldef->cols[i].name, cldef->cols[i].width);
		gtk_clist_set_column_width (GTK_CLIST (clist), i, config_get_int (buf));
		if (cldef->cols[i].justify != GTK_JUSTIFY_LEFT) {
			gtk_clist_set_column_justification (GTK_CLIST (clist), i, cldef->cols[i].justify);
		}

		alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);

		label = gtk_label_new (_(cldef->cols[i].name));
		gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
		gtk_container_add (GTK_CONTAINER (alignment), label);
		gtk_widget_show (label);

		cldef->cols[i].widget = label;

		gtk_clist_set_column_widget (GTK_CLIST (clist), i, alignment);
		gtk_widget_show (alignment);
	}

	gtk_clist_set_sort_column (GTK_CLIST (clist), cldef->sort_column);
	gtk_clist_set_sort_type (GTK_CLIST (clist), cldef->sort_type);

	clist_column_set_title (GTK_CLIST (clist), cldef, TRUE);

	return clist;
}
开发者ID:IR4T4,项目名称:xqf,代码行数:58,代码来源:xqf-ui.c


示例10: move_transfer_down

void
move_transfer_down (gpointer data)
{
  GList * firstentry, * secentry, * lastentry;
  gftpui_common_curtrans_data * transdata;
  GtkCTreeNode * node;

  if (GTK_CLIST (dlwdw)->selection == NULL)
    {
      ftp_log (gftp_logging_error, NULL,
	      _("There are no file transfers selected\n"));
      return;
    }
  node = GTK_CLIST (dlwdw)->selection->data;
  transdata = gtk_ctree_node_get_row_data (GTK_CTREE (dlwdw), node);

  if (transdata->curfle == NULL)
    return;

  g_static_mutex_lock (&transdata->transfer->structmutex);
  if (transdata->curfle->next != NULL && (!transdata->transfer->started ||
      (transdata->transfer->curfle != transdata->curfle && 
       transdata->transfer->curfle != transdata->curfle->next)))
    {
      if (transdata->curfle->prev == NULL)
        {
          firstentry = transdata->curfle->next;
          lastentry = transdata->curfle->next->next;
          transdata->transfer->files = firstentry;
          transdata->transfer->files->prev = NULL;
          transdata->transfer->files->next = transdata->curfle;
          transdata->curfle->prev = transdata->transfer->files;
          transdata->curfle->next = lastentry;
          if (lastentry != NULL)
            lastentry->prev = transdata->curfle;
        }
      else
        {
          firstentry = transdata->curfle->prev;
          secentry = transdata->curfle->next;
          lastentry = transdata->curfle->next->next;
          firstentry->next = secentry;
          secentry->prev = firstentry;
          secentry->next = transdata->curfle;
          transdata->curfle->prev = secentry;
          transdata->curfle->next = lastentry;
          if (lastentry != NULL)
            lastentry->prev = transdata->curfle;
        }

      gtk_ctree_move (GTK_CTREE (dlwdw), 
                      ((gftp_file *) transdata->curfle->data)->user_data,
                      transdata->transfer->user_data, 
                      transdata->curfle->next != NULL ?
                          ((gftp_file *) transdata->curfle->next->data)->user_data: NULL);
    }
  g_static_mutex_unlock (&transdata->transfer->structmutex);
}
开发者ID:GNOME,项目名称:gftp,代码行数:58,代码来源:transfer.c


示例11: source_ctree_remove_master_group

//static void source_ctree_remove_master_group (GtkWidget *ctree,
void source_ctree_remove_master_group (GtkWidget *ctree, struct master *m) {
	GtkCTreeNode *node;

	if (!m->isgroup)
		return;

	node = gtk_ctree_find_by_row_data (GTK_CTREE (ctree), NULL, m);
	if (node) {
		gtk_ctree_remove_node (GTK_CTREE (ctree), node);
	}
}
开发者ID:IR4T4,项目名称:xqf,代码行数:12,代码来源:xqf-ui.c


示例12: plCTRow

static void plCTRow(GtkWidget * widget, gint row, gint column, GdkEventButton * bevent, gpointer data)
{
 DirNodeType  * DirNode;
 GtkCTreeNode * node;
 node=gtk_ctree_node_nth( GTK_CTREE( widget ),row );
 DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( widget ),node );
 current_path=DirNode->path;
 gtk_ctree_expand( GTK_CTREE( widget ),node );
 scan_dir( DirNode->path );
 if ( CLFileSelected ) free( CLFileSelected ); CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) );
}
开发者ID:AlbertoBarraja,项目名称:svc_dash,代码行数:11,代码来源:pl.c


示例13: putmail

int
putmail (GtkWidget * widget)
{
    synopsis *s;
    GtkCTreeNode *n;
    GtkWidget *from, *subj, *date, *recipt, *body;
    char *shtuff;

    if (widget != NULL)
      {
	  n = gtk_ctree_node_nth (GTK_CTREE (widget),
				  (&(GTK_CTREE (widget)->clist))->focus_row);
	  s = (synopsis *) gtk_ctree_node_get_row_data (GTK_CTREE (widget),
							n);
	  if (s)
	      shtuff = (char *) db_read_body (s->id);
	  else
	    {
		printf ("synopsis for row %d is NULL!\n", (&(GTK_CTREE (widget)->clist))->focus_row);
		return FALSE;
	    }
      }
    else
      {
	  s = (synopsis *) malloc (sizeof (synopsis));
	  s->sender = strdup (" ");
	  s->subject = strdup (" ");
	  s->date = strdup (" ");
	  s->sender = strdup (" ");
	  shtuff = strdup (" ");
      }
    from = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (gems), "entry1");
    date = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (gems), "entry2");
    subj = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (gems), "entry3");
    recipt = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (gems), "entry4");
    body = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (gems), "text1");

    gtk_entry_set_text (GTK_ENTRY (from), s->sender);
    gtk_entry_set_text (GTK_ENTRY (subj), s->subject);
    gtk_entry_set_text (GTK_ENTRY (date), s->date);
    gtk_text_freeze (GTK_TEXT (body));
    gtk_text_set_point (GTK_TEXT (body), 0);
    gtk_text_forward_delete (GTK_TEXT (body),
			     gtk_text_get_length (GTK_TEXT (body)));
    gtk_text_insert (GTK_TEXT (body), NULL, NULL, NULL, shtuff, -1);
    gtk_text_thaw (GTK_TEXT (body));
    if (widget == NULL)
      {
	  free (s);
	  free (shtuff);
      }
    return TRUE;
}
开发者ID:erikg,项目名称:GEMS,代码行数:53,代码来源:extra.c


示例14: source_ctree_select_source

void source_ctree_select_source (struct master *m) {
	GtkCTreeNode *node;
	GtkVisibility vis;

	node = gtk_ctree_find_by_row_data (GTK_CTREE (source_ctree), NULL, m);
	gtk_ctree_unselect_recursive (GTK_CTREE (source_ctree), NULL);
	gtk_ctree_select (GTK_CTREE (source_ctree), node);

	vis = gtk_ctree_node_is_visible (GTK_CTREE (source_ctree), node);

	if (vis != GTK_VISIBILITY_FULL)
		gtk_ctree_node_moveto (GTK_CTREE (source_ctree), node, 0, 0.2, 0.0);
}
开发者ID:IR4T4,项目名称:xqf,代码行数:13,代码来源:xqf-ui.c


示例15: on_toolbar_reply_clicked

void
on_toolbar_reply_clicked (GtkButton * UNUSED(button), gpointer UNUSED(user_data))
{
    synopsis *s;
    GtkCTreeNode *n;
    GtkWidget *from, *subj, *date, *recipt, *body, *comp, *widget;
    char *shtuff, buf[1024];

    if ((widget = lookup_widget (gems, "mailbox")) == NULL)
	return;
    comp = create_compose ();
    from = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (comp), "entry1");
    /* to = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (comp), "entry5"); */
    date = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (comp), "entry2");
    subj = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (comp), "entry6");
    recipt = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (comp), "entry4");
    body = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (comp), "text2");

    n = gtk_ctree_node_nth (GTK_CTREE (widget),
	(&(GTK_CTREE (widget)->clist))->focus_row);
    s = (synopsis *) gtk_ctree_node_get_row_data (GTK_CTREE (widget), n);
    shtuff = replyify (s, (char *)db_read_body (s->id));

    gtk_entry_set_text (GTK_ENTRY (from), s->sender);
    /*
     * if(!strncasecmp("re: ", s->subject, 4)) 
     */
    if (tolower (s->subject[0]) == 'r' && tolower (s->subject[1]) == 'e'
	&& s->subject[2] == ':' && s->subject[3] == ' ')
	sprintf (buf, "%s", s->subject);
    else
	sprintf (buf, "Re: %s", s->subject);
    gtk_entry_set_text (GTK_ENTRY (subj), buf);
    gtk_entry_set_text (GTK_ENTRY (date), s->date);


    gtk_text_freeze (GTK_TEXT (body));
    gtk_text_set_point (GTK_TEXT (body), 0);
    gtk_text_forward_delete (GTK_TEXT (body),
	gtk_text_get_length (GTK_TEXT (body)));
    gtk_text_insert (GTK_TEXT (body), NULL, NULL, NULL, shtuff, -1);
    gtk_text_thaw (GTK_TEXT (body));
    if (widget == NULL)
    {
	free (s);
	free (shtuff);
    }
    gtk_text_set_editable (GTK_TEXT (body), TRUE);
    gtk_widget_show (comp);
    return;
}
开发者ID:erikg,项目名称:GEMS,代码行数:51,代码来源:callbacks.c


示例16: add_a_site_to_the_tree

int add_a_site_to_the_tree(struct site *a_site, gint operation) 
{
    struct ctree_attachment *info_to_add;
    gchar *tmp, *node_label[1];
    
    tmp = getAppropriateTreeLabel(a_site);
    node_label[0] = tmp;
    
    site_item = gtk_ctree_insert_node(GTK_CTREE(the_tree), NULL, NULL, node_label,
				      0, NULL, NULL, NULL, NULL, FALSE, FALSE);
    g_free (tmp);
    
    info_to_add = malloc(sizeof(struct ctree_attachment));
    info_to_add->file_or_site = IS_A_SITE;
    info_to_add->info_struct = (void *) a_site;
    gtk_ctree_node_set_row_data(GTK_CTREE(the_tree), site_item,
				(gpointer) info_to_add);

    /* Read site info */
   if (site_readfiles(a_site) != SITE_OK)
     /* We effectively have no info file, so just read the stored state. */
     site_read_local_state(a_site);

    /* Catchup or init, if that's required */
    if (operation == 1)
      {
	  site_initialize(a_site);
	  printf("Initialised site\n");
      }
    else if (operation == 2)
      {
	  site_catchup(a_site);
	  printf("Caught-up new site.\n");
      }
/* As far as I can tell, this doesn't need to be done. 
 * Not sure why it's in here*/
    site_write_stored_state(a_site);
    
    
    if (operation != 3)
      {
	  gtk_clist_freeze(GTK_CLIST(the_tree));
	  populate_site_node(GTK_CTREE_NODE(site_item), a_site);
	  gtk_clist_thaw(GTK_CLIST(the_tree));
      }
    
    return 0;
}
开发者ID:GCrean,项目名称:sitecopy,代码行数:48,代码来源:tree.c


示例17: GTK_CTREE

static GtkCTreeNode *mimeview_append_part(MimeView *mimeview,
					  MimeInfo *partinfo,
					  GtkCTreeNode *parent)
{
	GtkCTree *ctree = GTK_CTREE(mimeview->ctree);
	GtkCTreeNode *node;
	static gchar content_type[64];
	gchar *str[N_MIMEVIEW_COLS];

	if (partinfo->type != MIMETYPE_UNKNOWN && partinfo->subtype) {
		g_snprintf(content_type, 64, "%s/%s", procmime_get_media_type_str(partinfo->type), partinfo->subtype);
	} else {
		g_snprintf(content_type, 64, "UNKNOWN");
	}

	str[COL_MIMETYPE] = content_type;
	str[COL_SIZE] = to_human_readable(partinfo->length);
	if (prefs_common.attach_desc)
		str[COL_NAME] = (gchar *) get_part_description(partinfo);
	else
		str[COL_NAME] = (gchar *) get_part_name(partinfo);

	node = gtk_ctree_insert_node(ctree, parent, NULL, str, 0,
				     NULL, NULL, NULL, NULL,
				     FALSE, TRUE);
	gtk_ctree_node_set_row_data(ctree, node, partinfo);

	return node;
}
开发者ID:moreorless,项目名称:claws-mail,代码行数:29,代码来源:mimeview.c


示例18: mimeview_show_message

void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
			   const gchar *file)
{
	GtkCTree *ctree = GTK_CTREE(mimeview->ctree);
	GtkCTreeNode *node;

	mimeview_clear(mimeview);

	g_return_if_fail(file != NULL);
	g_return_if_fail(mimeinfo != NULL);

	mimeview->mimeinfo = mimeinfo;

	mimeview->file = g_strdup(file);

	gtk_signal_handler_block_by_func(GTK_OBJECT(ctree), mimeview_selected,
					 mimeview);

	mimeview_set_multipart_tree(mimeview, mimeinfo, NULL);
	icon_list_create(mimeview, mimeinfo);

	gtk_signal_handler_unblock_by_func(GTK_OBJECT(ctree),
					   mimeview_selected, mimeview);

	node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
	if (node) {
		gtk_ctree_select(ctree, node);
		icon_list_toggle_by_mime_info
			(mimeview, gtk_ctree_node_get_row_data(ctree, node));
		gtkut_ctree_set_focus_row(ctree, node);
	}
}
开发者ID:moreorless,项目名称:claws-mail,代码行数:32,代码来源:mimeview.c


示例19: create_transfer

static void
create_transfer (gftp_transfer * tdata)
{
  if (tdata->fromreq->stopable)
    return;

  if (GFTP_IS_SAME_HOST_START_TRANS ((gftp_window_data *) tdata->fromwdata,
                                     tdata->fromreq))
    {
      gftp_swap_socks (tdata->fromreq, 
                       ((gftp_window_data *) tdata->fromwdata)->request);
      update_window (tdata->fromwdata);
    }

  if (GFTP_IS_SAME_HOST_START_TRANS ((gftp_window_data *) tdata->towdata,
                                     tdata->toreq))
    {
      gftp_swap_socks (tdata->toreq, 
                       ((gftp_window_data *) tdata->towdata)->request);
      update_window (tdata->towdata);
    }

  num_transfers_in_progress++;
  tdata->started = 1;
  tdata->stalled = 1;
  gtk_ctree_node_set_text (GTK_CTREE (dlwdw), tdata->user_data, 1,
                           _("Connecting..."));

  if (tdata->thread_id == NULL)
    tdata->thread_id = g_malloc0 (sizeof (pthread_t));

  pthread_create (tdata->thread_id, NULL, _gftpui_transfer_files, tdata);
}
开发者ID:GNOME,项目名称:gftp,代码行数:33,代码来源:transfer.c


示例20: delete_selected

void delete_selected(gint button_number)
{
    struct site *tmp, *tmp2;
    extern GtkCTree *the_tree;
    extern GtkCTreeNode *current_site_node;
    extern gboolean rcfile_saved;

    if (button_number != GNOME_YES)
	return;
    if ((selected_site != NULL) && (all_sites != NULL)) {
	if (strcmp(all_sites->name, selected_site->name) == 0) {
	    all_sites = all_sites->next;
	} else {
	    tmp = find_prev_site(selected_site);
	    if (tmp->next != NULL) {
		tmp2 = tmp->next;
		tmp->next = tmp2->next;
	    }
	}
	gtk_ctree_remove_node(GTK_CTREE(the_tree),
			      GTK_CTREE_NODE(current_site_node));
	selected_site = NULL;
	current_site_node = NULL;
    } else {
	gnome_error_dialog("I've detected no site is selected, but one should be selected in order to get here. Oh dear.");
    }
    clear_main_area();
    rcfile_saved = false;
}
开发者ID:GCrean,项目名称:sitecopy,代码行数:29,代码来源:operations.c



注:本文中的GTK_CTREE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_DIALOG函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_CONTAINER函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap