Esempio n. 1
0
static Ret ftk_bluetooth_on_prepare_options_menu(void* ctx, FtkWidget* menu_panel)
{
	FtkWidget* item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("검색"));
	ftk_menu_item_set_clicked_listener(item, ftk_bluetooth_on_scan, ctx);
	ftk_widget_show(item, 1);

	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Quit"));
	ftk_menu_item_set_clicked_listener(item, ftk_bluetooth_on_shutdown, ctx);
	ftk_widget_show(item, 1);

	return RET_OK;
}
Esempio n. 2
0
static Ret ftk_file_browser_on_prepare_options_menu_for_choose(void* ctx, FtkWidget* menu_panel)
{
	FtkWidget* item = NULL;
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("OK"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_ok, ctx);
	ftk_widget_show(item, 1);
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Cancel"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_cancel, ctx);
	ftk_widget_show(item, 1);

	return	RET_OK;
}
Esempio n. 3
0
static Ret ftk_file_browser_on_prepare_options_menu(void* ctx, FtkWidget* menu_panel)
{
	FtkWidget* item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Remove"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_remove, ctx);
	ftk_widget_show(item, 1);
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Rename"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_rename, ctx);
	ftk_widget_show(item, 1);
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Create Folder"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_create_folder, ctx);
	ftk_widget_show(item, 1);
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Detail"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_detail, ctx);
	ftk_widget_show(item, 1);
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Quit"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_quit, ctx);
	ftk_widget_show(item, 1);
	
	item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("More"));
	ftk_menu_item_set_clicked_listener(item, ftk_file_browser_on_more, ctx);
	ftk_widget_show(item, 1);

	return	RET_OK;
}
Esempio n. 4
0
static Ret desktop_on_prepare_options_menu(void* ctx, FtkWidget* menu_panel)
{
	FtkWidget* item = ftk_menu_item_create(menu_panel);
	ftk_widget_set_text(item, _("Shutdown"));
	ftk_menu_item_set_clicked_listener(item, desktop_on_shutdown, ctx);
	ftk_widget_show(item, 1);

#ifdef USE_VNC
	item = ftk_menu_item_create(menu_panel);
	if(ftk_display_vnc_is_active())
	{
		ftk_widget_set_text(item, _("Stop VNC"));
	}
	else
	{
		ftk_widget_set_text(item, _("Start VNC"));
	}
	ftk_menu_item_set_clicked_listener(item, desktop_on_vnc, ctx);
	ftk_widget_show(item, 1);
#endif

	return	RET_OK;
}
Esempio n. 5
0
static Ret on_prepare_options_menu(void* ctx, FtkWidget* menu_panel)
{
	int i = 0;
	for(i = 0; i < 3; i++)
	{
		char text[32] = {0};
		FtkWidget* item = ftk_menu_item_create(menu_panel);
		ftk_snprintf(text, sizeof(text), "Menu%02d", i);
		ftk_widget_set_text(item, text);
		ftk_widget_show(item, 1);
	}

	return i > 0 ? RET_OK : RET_FAIL;
}
Esempio n. 6
0
static Ret designer_on_prepare_options_menu(void* ctx, FtkWidget* menu_panel)
{
	size_t i = 0;
	FtkWidget* item = NULL;
	FtkWidget* win = (FtkWidget*)ctx;

	for(i = 0; i < FTK_ARRAY_SIZE(s_menu_items); i++)	
	{
		item = ftk_menu_item_create(menu_panel);
		ftk_widget_set_text(item, _(s_menu_items[i].name));
		ftk_menu_item_set_clicked_listener(item, s_menu_items[i].on_clicked, win);
		ftk_widget_show(item, 1);
	}
	
	return RET_OK;
}