Implemented new IPlatformServices methods

This commit is contained in:
Javier Suárez Ruiz 2017-10-19 12:50:29 +02:00
Родитель 6327e76242
Коммит 0978126d18
4 изменённых файлов: 62 добавлений и 39 удалений

Просмотреть файл

@ -118,14 +118,14 @@ namespace Xamarin.Forms.Platform.GTK.Cells
private void OpenContextMenu()
{
var menu = new Menu();
var menu = new Gtk.Menu();
SetupMenuItems(menu);
menu.ShowAll();
menu.Popup();
}
private void SetupMenuItems(Menu menu)
private void SetupMenuItems(Gtk.Menu menu)
{
foreach (MenuItem item in Cell.ContextActions)
{

Просмотреть файл

@ -105,5 +105,10 @@ namespace Xamarin.Forms.Platform.GTK
return '0' + v;
return 'a' + v - 10;
}
}
public void QuitApplication()
{
Gtk.Application.Quit();
}
}
}

Просмотреть файл

@ -236,12 +236,14 @@ namespace Xamarin.Forms.Platform.GTK
ToolButton secondaryButton = ToolButtonHelper.CreateToolButton(Stock.Add);
_toolbarSection.PackStart(secondaryButton, false, false, 0);
Menu menu = new Menu();
Gtk.Menu menu = new Gtk.Menu();
foreach (var secondaryToolBarItem in secondaryToolBarItems)
{
Gtk.MenuItem menuItem = new Gtk.MenuItem(secondaryToolBarItem.Text);
menuItem.Sensitive = secondaryToolBarItem.IsEnabled;
menu.Add(menuItem);
Gtk.MenuItem menuItem = new Gtk.MenuItem(secondaryToolBarItem.Text)
{
Sensitive = secondaryToolBarItem.IsEnabled
};
menu.Add(menuItem);
menuItem.ButtonPressEvent += (sender, args) =>
{

Просмотреть файл

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2002
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Xamarin.Forms", "Xamarin.Forms", "{9AD757F5-E57A-459D-A0A7-E0675E045B84}"
EndProject
@ -3290,34 +3290,6 @@ Global
{9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x64.Build.0 = Release|Any CPU
{9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x86.ActiveCfg = Release|Any CPU
{9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x86.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|ARM.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhone.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Templates.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Templates.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x64.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x64.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x86.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x86.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Any CPU.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|ARM.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|ARM.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhone.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhone.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Templates.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Templates.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x64.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x64.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x86.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x86.Build.0 = Release|Any CPU
{29DDE791-5608-4072-8E1C-D37D72992A83}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{29DDE791-5608-4072-8E1C-D37D72992A83}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
{29DDE791-5608-4072-8E1C-D37D72992A83}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
@ -3424,6 +3396,48 @@ Global
{73A22D45-2350-457D-A191-F888148E4280}.Release|x86.ActiveCfg = Release|x86
{73A22D45-2350-457D-A191-F888148E4280}.Release|x86.Build.0 = Release|x86
{73A22D45-2350-457D-A191-F888148E4280}.Release|x86.Deploy.0 = Release|x86
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|Templates.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|ARM.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|Templates.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|x64.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.AppStore|x86.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|ARM.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhone.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Templates.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|Templates.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x64.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x64.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x86.ActiveCfg = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Debug|x86.Build.0 = Debug|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Any CPU.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|ARM.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|ARM.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhone.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhone.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Templates.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|Templates.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x64.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x64.Build.0 = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x86.ActiveCfg = Release|Any CPU
{0D497738-2598-431D-8CAF-8FBF3D9F99EC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -3488,9 +3502,11 @@ Global
{8D3DFCB7-DB10-40E5-ACFE-411AAA85520D} = {4F5E2D21-17F6-4A42-B8FB-D03D82E24EC8}
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884} = {132FB9A4-613F-44CE-95D5-758D32D231DD}
{9DB0CABB-24CC-4538-88EC-6E0A0FE40248} = {D4D57221-71D6-4031-A6F4-EC66AF0929D9}
{E175485B-3C8C-47D7-8DD5-F7FED627EB25} = {D4D57221-71D6-4031-A6F4-EC66AF0929D9}
{0D497738-2598-431D-8CAF-8FBF3D9F99EC} = {29AC50BF-B4FB-450B-9386-0C5AD4B84226}
{29DDE791-5608-4072-8E1C-D37D72992A83} = {406DE4B0-F541-4092-B0EE-F0A20E9A89F5}
{73A22D45-2350-457D-A191-F888148E4280} = {406DE4B0-F541-4092-B0EE-F0A20E9A89F5}
{0D497738-2598-431D-8CAF-8FBF3D9F99EC} = {29AC50BF-B4FB-450B-9386-0C5AD4B84226}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {650AE971-2F29-46A8-822C-FB4FCDC6A9A0}
EndGlobalSection
EndGlobal