Exemplo n.º 1
0
Arquivo: ft.c Projeto: Oxyoptia/x3270
/**
 * File transfer module registration.
 */
void
ft_register(void)
{
    static action_table_t ft_actions[] = {
	{ "Transfer",	Transfer_action,	ACTION_KE }
    };

    /* Register for state changes. */
    register_schange(ST_CONNECT, ft_connected);
    register_schange(ST_3270_MODE, ft_in3270);

    /* Register actions. */
    register_actions(ft_actions, ARRAY_SIZE(ft_actions));
}
Exemplo n.º 2
0
 void init_actions(void)
 {
	static const gchar	*group_name[]	= { "default", "online", "offline", "selection", "clipboard", "paste", "filetransfer" };
 	GtkAction				*dunno			= gtk_action_new("Dunno",NULL,NULL,NULL);
	int						f;

	#ifdef DEBUG
		if(ACTION_GROUP_MAX != G_N_ELEMENTS(group_name))
		{
			Trace("Unexpected action_group size, found %d, expecting %d",(int) G_N_ELEMENTS(group_name),(int) ACTION_GROUP_MAX);
			exit(-1);
		}
	#endif

	for(f=0;f<ACTION_GROUP_MAX;f++)
	{
		action_group[f] = gtk_action_group_new(group_name[f]);

		Trace("action(%d): %p %s",f,action_group[f],group_name[f]);
		gtk_action_group_set_translation_domain(action_group[f], PACKAGE_NAME);
	}

	action_group[f] = 0;
	g_object_set_data(G_OBJECT(topwindow),"ActionGroups",action_group);

	for(f=0;f<G_N_ELEMENTS(action_by_id);f++)
		action_by_id[f] = dunno;

#ifdef 	X3270_FT
	set_ft_action_state(hSession,0,NULL);
	register_schange(ST_3270_MODE, set_ft_action_state);
#else
	gtk_action_group_set_sensitive(ft_actions,FALSE);
#endif

 }